Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ea33e14

Browse filesBrowse files
authored
feat(devicestreaming): generate library (#15079)
* feat(devicestreaming): generate library * Run generators and format their outputs * Add API baseline * Manually update READMEs, quickstart, and top-level stuff * changelog
1 parent 12d9697 commit ea33e14
Copy full SHA for ea33e14

File tree

Expand file treeCollapse file tree

56 files changed

+4092
-0
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

56 files changed

+4092
-0
lines changed

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ the APIs in these libraries are stable, and are ready for production use.
1313

1414
- [Financial Services API](/google/cloud/financialservices/README.md)
1515
- [Storage Batch Operations API](/google/cloud/storagebatchoperations/README.md)
16+
- [Device Streaming API](/google/cloud/devicestreaming/README.md)
1617

1718
### Updated Libraries
1819

‎README.md

Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ See each library's `README.md` file for more information about:
224224
- [Developer Connect API](google/cloud/developerconnect/README.md)
225225
[[quickstart]](google/cloud/developerconnect/quickstart/README.md)
226226
[[reference]](https://cloud.google.com/cpp/docs/reference/developerconnect/latest)
227+
- [Device Streaming API](google/cloud/devicestreaming/README.md)
228+
[[quickstart]](google/cloud/devicestreaming/quickstart/README.md)
229+
[[reference]](https://cloud.google.com/cpp/docs/reference/devicestreaming/latest)
227230
- [Dialogflow CX API](google/cloud/dialogflow_cx/README.md)
228231
[[quickstart]](google/cloud/dialogflow_cx/quickstart/README.md)
229232
[[reference]](https://cloud.google.com/cpp/docs/reference/dialogflow_cx/latest)
Binary file not shown.

‎ci/etc/expected_install_directories

Copy file name to clipboardExpand all lines: ci/etc/expected_install_directories
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,10 @@
698698
./include/google/cloud/developerconnect/v1
699699
./include/google/cloud/developerconnect/v1/internal
700700
./include/google/cloud/developerconnect/v1/mocks
701+
./include/google/cloud/devicestreaming
702+
./include/google/cloud/devicestreaming/v1
703+
./include/google/cloud/devicestreaming/v1/internal
704+
./include/google/cloud/devicestreaming/v1/mocks
701705
./include/google/cloud/dialogflow
702706
./include/google/cloud/dialogflow/cx
703707
./include/google/cloud/dialogflow/cx/v3
@@ -1372,6 +1376,8 @@
13721376
./lib64/cmake/google_cloud_cpp_deploy_mocks
13731377
./lib64/cmake/google_cloud_cpp_developerconnect
13741378
./lib64/cmake/google_cloud_cpp_developerconnect_mocks
1379+
./lib64/cmake/google_cloud_cpp_devicestreaming
1380+
./lib64/cmake/google_cloud_cpp_devicestreaming_mocks
13751381
./lib64/cmake/google_cloud_cpp_dialogflow_cx
13761382
./lib64/cmake/google_cloud_cpp_dialogflow_cx_mocks
13771383
./lib64/cmake/google_cloud_cpp_dialogflow_es

‎cmake/GoogleCloudCppFeatures.cmake

Copy file name to clipboardExpand all lines: cmake/GoogleCloudCppFeatures.cmake
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ set(GOOGLE_CLOUD_CPP_GA_LIBRARIES
8888
"datastream"
8989
"deploy"
9090
"developerconnect"
91+
"devicestreaming"
9192
"dialogflow_cx"
9293
"dialogflow_es"
9394
"discoveryengine"
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@com_google_googleapis//google/api:annotations_proto
2+
@com_google_googleapis//google/api:client_proto
3+
@com_google_googleapis//google/api:field_behavior_proto
4+
@com_google_googleapis//google/api:http_proto
5+
@com_google_googleapis//google/api:launch_stage_proto
6+
@com_google_googleapis//google/api:resource_proto
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@com_google_googleapis//google/cloud/devicestreaming/v1:adb_service.proto
2+
@com_google_googleapis//google/cloud/devicestreaming/v1:service.proto

‎external/googleapis/update_libraries.sh

Copy file name to clipboardExpand all lines: external/googleapis/update_libraries.sh
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ declare -A -r LIBRARIES=(
129129
["datastream"]="@com_google_googleapis//google/cloud/datastream/v1:datastream_cc_grpc"
130130
["deploy"]="@com_google_googleapis//google/cloud/deploy/v1:deploy_cc_grpc"
131131
["developerconnect"]="@com_google_googleapis//google/cloud/developerconnect/v1:developerconnect_cc_grpc"
132+
["devicestreaming"]="@com_google_googleapis//google/cloud/devicestreaming/v1:devicestreaming_cc_grpc"
132133
["dialogflow_es"]="@com_google_googleapis//google/cloud/dialogflow/v2:dialogflow_cc_grpc"
133134
["dialogflow_cx"]="@com_google_googleapis//google/cloud/dialogflow/cx/v3:cx_cc_grpc"
134135
["discoveryengine"]="@com_google_googleapis//google/cloud/discoveryengine/v1:discoveryengine_cc_grpc"

‎generator/generator_config.textproto

Copy file name to clipboardExpand all lines: generator/generator_config.textproto
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,14 @@ service {
20092009
retryable_status_codes: ["kUnavailable"]
20102010
}
20112011
2012+
# Device Streaming
2013+
service {
2014+
service_proto_path: "google/cloud/devicestreaming/v1/service.proto"
2015+
product_path: "google/cloud/devicestreaming/v1"
2016+
initial_copyright_year: "2025"
2017+
retryable_status_codes: ["kUnavailable"]
2018+
}
2019+
20122020
# Dialogflow CX
20132021
service {
20142022
service_proto_path: "google/cloud/dialogflow/cx/v3/environment.proto"
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
load("//bazel:gapic.bzl", "cc_gapic_library")
16+
17+
package(default_visibility = ["//visibility:private"])
18+
19+
licenses(["notice"]) # Apache 2.0
20+
21+
service_dirs = ["v1/"]
22+
23+
googleapis_deps = [
24+
"@com_google_googleapis//google/cloud/devicestreaming/v1:devicestreaming_cc_grpc",
25+
]
26+
27+
cc_gapic_library(
28+
name = "devicestreaming",
29+
googleapis_deps = googleapis_deps,
30+
service_dirs = service_dirs,
31+
)
+33Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# ~~~
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
# ~~~
16+
17+
include(GoogleCloudCppLibrary)
18+
19+
google_cloud_cpp_add_gapic_library(devicestreaming "Device Streaming API"
20+
SERVICE_DIRS "v1/")
21+
22+
if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
23+
add_executable(devicestreaming_quickstart "quickstart/quickstart.cc")
24+
target_link_libraries(devicestreaming_quickstart
25+
PRIVATE google-cloud-cpp::devicestreaming)
26+
google_cloud_cpp_add_common_options(devicestreaming_quickstart)
27+
add_test(
28+
NAME devicestreaming_quickstart
29+
COMMAND cmake -P "${PROJECT_SOURCE_DIR}/cmake/quickstart-runner.cmake"
30+
$<TARGET_FILE:devicestreaming_quickstart> GOOGLE_CLOUD_PROJECT)
31+
set_tests_properties(devicestreaming_quickstart
32+
PROPERTIES LABELS "integration-test;quickstart")
33+
endif ()
+62Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Device Streaming API C++ Client Library
2+
3+
This directory contains an idiomatic C++ client library for the
4+
[Device Streaming API][cloud-service-docs].
5+
6+
The Cloud API for device streaming usage.
7+
8+
While this library is **GA**, please note that the Google Cloud C++ client
9+
libraries do **not** follow [Semantic Versioning](https://semver.org/).
10+
11+
## Quickstart
12+
13+
The [quickstart/](quickstart/README.md) directory contains a minimal environment
14+
to get started using this client library in a larger project. The following
15+
"Hello World" program is used in this quickstart, and should give you a taste of
16+
this library.
17+
18+
<!-- inject-quickstart-start -->
19+
20+
```cc
21+
#include "google/cloud/devicestreaming/v1/direct_access_client.h"
22+
#include "google/cloud/location.h"
23+
#include <iostream>
24+
25+
int main(int argc, char* argv[]) try {
26+
if (argc != 2) {
27+
std::cerr << "Usage: " << argv[0] << " project-id\n";
28+
return 1;
29+
}
30+
31+
auto const project_id = std::string(argv[1]);
32+
auto const parent = "projects/" + project_id;
33+
34+
namespace devicestreaming = ::google::cloud::devicestreaming_v1;
35+
auto client = devicestreaming::DirectAccessServiceClient(
36+
devicestreaming::MakeDirectAccessServiceConnection());
37+
38+
for (auto r : client.ListDeviceSessions(parent)) {
39+
if (!r) throw std::move(r).status();
40+
std::cout << r->DebugString() << "\n";
41+
}
42+
43+
return 0;
44+
} catch (google::cloud::Status const& status) {
45+
std::cerr << "google::cloud::Status thrown: " << status << "\n";
46+
return 1;
47+
}
48+
```
49+
50+
<!-- inject-quickstart-end -->
51+
52+
## More Information
53+
54+
- Official documentation about the [Device Streaming API][cloud-service-docs]
55+
service
56+
- [Reference doxygen documentation][doxygen-link] for each release of this
57+
client library
58+
- Detailed header comments in our [public `.h`][source-link] files
59+
60+
[cloud-service-docs]: https://cloud.google.com/device-streaming/docs
61+
[doxygen-link]: https://cloud.google.com/cpp/docs/reference/devicestreaming/latest/
62+
[source-link]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/devicestreaming
+50Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*!
2+
3+
@page devicestreaming-env Environment Variables
4+
5+
A number of environment variables can be used to configure the behavior of
6+
the library. There are also functions to configure this behavior in code. The
7+
environment variables are convenient when troubleshooting problems.
8+
9+
@section devicestreaming-env-endpoint Endpoint Overrides
10+
11+
<!-- inject-endpoint-env-vars-start -->
12+
13+
- `GOOGLE_CLOUD_CPP_DIRECT_ACCESS_SERVICE_ENDPOINT=...` overrides the
14+
`EndpointOption` (which defaults to "devicestreaming.googleapis.com")
15+
used by `MakeDirectAccessServiceConnection()`.
16+
17+
<!-- inject-endpoint-env-vars-end -->
18+
19+
@see google::cloud::EndpointOption
20+
21+
@section devicestreaming-env-logging Logging
22+
23+
`GOOGLE_CLOUD_CPP_ENABLE_TRACING=rpc`: turns on tracing for most gRPC
24+
calls. The library injects an additional Stub decorator that prints each gRPC
25+
request and response. Unless you have configured your own logging backend,
26+
you should also set `GOOGLE_CLOUD_CPP_ENABLE_CLOG` to produce any output on
27+
the program's console.
28+
29+
@see google::cloud::LoggingComponentsOption
30+
31+
`GOOGLE_CLOUD_CPP_TRACING_OPTIONS=...`: modifies the behavior of gRPC tracing,
32+
including whether messages will be output on multiple lines, or whether
33+
string/bytes fields will be truncated.
34+
35+
@see google::cloud::GrpcTracingOptionsOption
36+
37+
`GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes`: turns on logging in the library, basically
38+
the library always "logs" but the logging infrastructure has no backend to
39+
actually print anything until the application sets a backend or they set this
40+
environment variable.
41+
42+
@see google::cloud::LogBackend
43+
@see google::cloud::LogSink
44+
45+
@section devicestreaming-env-project Setting the Default Project
46+
47+
`GOOGLE_CLOUD_PROJECT=...`: is used in examples and integration tests to
48+
configure the GCP project. This has no effect in the library.
49+
50+
*/
+47Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*!
2+
3+
@mainpage Device Streaming API C++ Client Library
4+
5+
An idiomatic C++ client library for the [Device Streaming API][cloud-service-docs].
6+
7+
The Cloud API for device streaming usage.
8+
9+
While this library is **GA**, please note that the Google Cloud C++ client libraries do **not** follow
10+
[Semantic Versioning](https://semver.org/).
11+
12+
@tableofcontents{HTML:2}
13+
14+
## Quickstart
15+
16+
The following shows the code that you'll run in the
17+
`google/cloud/devicestreaming/quickstart/` directory,
18+
which should give you a taste of the Device Streaming API C++ client library API.
19+
20+
@snippet quickstart.cc all
21+
22+
## Main classes
23+
24+
<!-- inject-client-list-start -->
25+
The main class in this library is
26+
[`devicestreaming_v1::DirectAccessServiceClient`](@ref google::cloud::devicestreaming_v1::DirectAccessServiceClient). All RPCs are exposed
27+
as member functions of this class. Other classes provide helpers, configuration
28+
parameters, and infrastructure to mock
29+
[`devicestreaming_v1::DirectAccessServiceClient`](@ref google::cloud::devicestreaming_v1::DirectAccessServiceClient) when testing your
30+
application.
31+
<!-- inject-client-list-end -->
32+
33+
## More Information
34+
35+
- @ref common-error-handling - describes how the library reports errors.
36+
- @ref devicestreaming-override-endpoint - describes how to override the default
37+
endpoint.
38+
- @ref devicestreaming-override-authentication - describes how to change the
39+
authentication credentials used by the library.
40+
- @ref devicestreaming-override-retry - describes how to change the default retry
41+
policies.
42+
- @ref devicestreaming-env - describes environment variables that can configure the
43+
behavior of the library.
44+
45+
[cloud-service-docs]: https://cloud.google.com/device-streaming/docs
46+
47+
*/
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*!
2+
@defgroup google-cloud-devicestreaming-options Device Streaming API Configuration Options
3+
4+
This library uses the same mechanism (`google::cloud::Options`) and the common
5+
[options](@ref options) as all other C++ client libraries for its configuration.
6+
Some `*Option` classes, which are only used in this library, are documented in
7+
this page.
8+
9+
@see @ref options - for an overview of client library configuration.
10+
*/
+35Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*!
2+
@page devicestreaming-override-authentication How to Override the Authentication Credentials
3+
4+
Unless otherwise configured, the client libraries use
5+
[Application Default Credentials] to authenticate with Google Cloud Services.
6+
While this works for most applications, in some cases you may need to override
7+
this default. You can do so by providing the
8+
[UnifiedCredentialsOption](@ref google::cloud::UnifiedCredentialsOption)
9+
The following example shows how to explicitly load a service account key file:
10+
11+
<!-- inject-service-account-snippet-start -->
12+
@snippet direct_access_client_samples.cc with-service-account
13+
14+
<!-- inject-service-account-snippet-end -->
15+
16+
Keep in mind that we chose this as an example because it is relatively easy to
17+
understand. Consult the [Best practices for managing service account keys]
18+
guide for more details.
19+
20+
@see @ref guac - for more information on the factory functions to create
21+
`google::cloud::Credentials` objects.
22+
23+
[Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys
24+
[Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
25+
26+
*/
27+
28+
// <!-- inject-authentication-pages-start -->
29+
30+
/*! @page devicestreaming_v1::DirectAccessServiceClient-service-account-snippet Override devicestreaming_v1::DirectAccessServiceClient Authentication Defaults
31+
32+
@snippet google/cloud/devicestreaming/v1/samples/direct_access_client_samples.cc with-service-account
33+
34+
*/
35+
// <!-- inject-authentication-pages-end -->
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*!
2+
@page devicestreaming-override-endpoint How to Override the Default Endpoint
3+
4+
In some cases, you may need to override the default endpoint used by the client
5+
library. Use the
6+
[EndpointOption](@ref google::cloud::EndpointOption) when initializing the
7+
client library to change this default.
8+
9+
<!-- inject-endpoint-snippet-start -->
10+
For example, this will override the default endpoint for `devicestreaming_v1::DirectAccessServiceClient`:
11+
12+
@snippet direct_access_client_samples.cc set-client-endpoint
13+
14+
<!-- inject-endpoint-snippet-end -->
15+
16+
*/
17+
18+
// <!-- inject-endpoint-pages-start -->
19+
20+
/*! @page devicestreaming_v1::DirectAccessServiceClient-endpoint-snippet Override devicestreaming_v1::DirectAccessServiceClient Endpoint Configuration
21+
22+
@snippet google/cloud/devicestreaming/v1/samples/direct_access_client_samples.cc set-client-endpoint
23+
24+
*/
25+
// <!-- inject-endpoint-pages-end -->

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.