Skip to content

Commit 7ec4475

Browse files
authored
feat(networkconnectivity): add DataTransferService (#15464)
1 parent 3067a93 commit 7ec4475

36 files changed

+9680
-8
lines changed

generator/generator_config.textproto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,6 +3055,13 @@ service {
30553055
retryable_status_codes: ["kUnavailable"]
30563056
}
30573057
3058+
service {
3059+
service_proto_path: "google/cloud/networkconnectivity/v1/data_transfer.proto"
3060+
product_path: "google/cloud/networkconnectivity/v1"
3061+
initial_copyright_year: "2025"
3062+
retryable_status_codes: ["kUnavailable"]
3063+
}
3064+
30583065
# Network Management
30593066
service {
30603067
service_proto_path: "google/cloud/networkmanagement/v1/reachability.proto"

generator/internal/descriptor_utils.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ ParameterCommentSubstitution substitutions[] = {
261261
// Extra quotes in asset/v1.
262262
{R"""( "folders/12345")", or a )""", R"""( "folders/12345"), or a )"""},
263263

264+
// From google/cloud/networkconnectivity/v1/data_transfer.proto
265+
{R"""(`FieldMask is used)""", R"""(`FieldMask` is used)"""},
266+
264267
// Doxygen gets confused by single quotes in code spans:
265268
// https://www.doxygen.nl/manual/markdown.html#mddox_code_spans
266269
// The workaround is to double quote these:

google/cloud/networkconnectivity/doc/environment-variables.dox

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ environment variables are convenient when troubleshooting problems.
1010

1111
<!-- inject-endpoint-env-vars-start -->
1212

13+
- `GOOGLE_CLOUD_CPP_DATA_TRANSFER_SERVICE_ENDPOINT=...` overrides the
14+
`EndpointOption` (which defaults to "networkconnectivity.googleapis.com")
15+
used by `MakeDataTransferServiceConnection()`.
16+
1317
- `GOOGLE_CLOUD_CPP_HUB_SERVICE_ENDPOINT=...` overrides the
1418
`EndpointOption` (which defaults to "networkconnectivity.googleapis.com")
1519
used by `MakeHubServiceConnection()`.

google/cloud/networkconnectivity/doc/main.dox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The library also has other classes that provide helpers, configuration
3333
parameters, and infrastructure to mock the `*Client` classes when testing your
3434
application.
3535

36+
- [\c networkconnectivity_v1::DataTransferServiceClient](@ref google::cloud::networkconnectivity_v1::DataTransferServiceClient)
3637
- [\c networkconnectivity_v1::HubServiceClient](@ref google::cloud::networkconnectivity_v1::HubServiceClient)
3738
- [\c networkconnectivity_v1::PolicyBasedRoutingServiceClient](@ref google::cloud::networkconnectivity_v1::PolicyBasedRoutingServiceClient)
3839
<!-- inject-client-list-end -->

google/cloud/networkconnectivity/doc/override-authentication.dox

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ this default. You can do so by providing the
99
The following example shows how to explicitly load a service account key file:
1010

1111
<!-- inject-service-account-snippet-start -->
12-
@snippet hub_client_samples.cc with-service-account
12+
@snippet data_transfer_client_samples.cc with-service-account
1313

1414
Follow these links to find examples for other \c *Client classes:
1515

16+
- [\c networkconnectivity_v1::DataTransferServiceClient](@ref networkconnectivity_v1::DataTransferServiceClient-service-account-snippet)
1617
- [\c networkconnectivity_v1::HubServiceClient](@ref networkconnectivity_v1::HubServiceClient-service-account-snippet)
1718
- [\c networkconnectivity_v1::PolicyBasedRoutingServiceClient](@ref networkconnectivity_v1::PolicyBasedRoutingServiceClient-service-account-snippet)
1819

@@ -32,6 +33,12 @@ guide for more details.
3233

3334
// <!-- inject-authentication-pages-start -->
3435

36+
/*! @page networkconnectivity_v1::DataTransferServiceClient-service-account-snippet Override networkconnectivity_v1::DataTransferServiceClient Authentication Defaults
37+
38+
@snippet google/cloud/networkconnectivity/v1/samples/data_transfer_client_samples.cc with-service-account
39+
40+
*/
41+
3542
/*! @page networkconnectivity_v1::HubServiceClient-service-account-snippet Override networkconnectivity_v1::HubServiceClient Authentication Defaults
3643

3744
@snippet google/cloud/networkconnectivity/v1/samples/hub_client_samples.cc with-service-account

google/cloud/networkconnectivity/doc/override-endpoint.dox

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ library. Use the
77
client library to change this default.
88

99
<!-- inject-endpoint-snippet-start -->
10-
For example, this will override the default endpoint for `networkconnectivity_v1::HubServiceClient`:
10+
For example, this will override the default endpoint for `networkconnectivity_v1::DataTransferServiceClient`:
1111

12-
@snippet hub_client_samples.cc set-client-endpoint
12+
@snippet data_transfer_client_samples.cc set-client-endpoint
1313

1414
Follow these links to find examples for other \c *Client classes:
1515

16+
- [\c networkconnectivity_v1::DataTransferServiceClient](@ref networkconnectivity_v1::DataTransferServiceClient-endpoint-snippet)
1617
- [\c networkconnectivity_v1::HubServiceClient](@ref networkconnectivity_v1::HubServiceClient-endpoint-snippet)
1718
- [\c networkconnectivity_v1::PolicyBasedRoutingServiceClient](@ref networkconnectivity_v1::PolicyBasedRoutingServiceClient-endpoint-snippet)
1819

@@ -22,6 +23,12 @@ Follow these links to find examples for other \c *Client classes:
2223

2324
// <!-- inject-endpoint-pages-start -->
2425

26+
/*! @page networkconnectivity_v1::DataTransferServiceClient-endpoint-snippet Override networkconnectivity_v1::DataTransferServiceClient Endpoint Configuration
27+
28+
@snippet google/cloud/networkconnectivity/v1/samples/data_transfer_client_samples.cc set-client-endpoint
29+
30+
*/
31+
2532
/*! @page networkconnectivity_v1::HubServiceClient-endpoint-snippet Override networkconnectivity_v1::HubServiceClient Endpoint Configuration
2633

2734
@snippet google/cloud/networkconnectivity/v1/samples/hub_client_samples.cc set-client-endpoint

google/cloud/networkconnectivity/doc/override-retry-policies.dox

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,22 @@ will use `FooBarIdempotencyPolicy`. This policy is very conservative.
6868
@section networkconnectivity-override-retry-example Example
6969

7070
<!-- inject-retry-snippet-start -->
71-
For example, this will override the retry policies for `networkconnectivity_v1::HubServiceClient`:
71+
For example, this will override the retry policies for `networkconnectivity_v1::DataTransferServiceClient`:
7272

73-
@snippet hub_client_samples.cc set-retry-policy
73+
@snippet data_transfer_client_samples.cc set-retry-policy
7474

7575
This assumes you have created a custom idempotency policy. Such as:
7676

77-
@snippet hub_client_samples.cc custom-idempotency-policy
77+
@snippet data_transfer_client_samples.cc custom-idempotency-policy
7878

79-
This will override the polling policies for `networkconnectivity_v1::HubServiceClient`
79+
This will override the polling policies for `networkconnectivity_v1::DataTransferServiceClient`
8080

81-
@snippet hub_client_samples.cc set-polling-policy
81+
@snippet data_transfer_client_samples.cc set-polling-policy
8282

8383

8484
Follow these links to find examples for other \c *Client classes:
8585

86+
- [\c networkconnectivity_v1::DataTransferServiceClient](@ref networkconnectivity_v1::DataTransferServiceClient-retry-snippet)
8687
- [\c networkconnectivity_v1::HubServiceClient](@ref networkconnectivity_v1::HubServiceClient-retry-snippet)
8788
- [\c networkconnectivity_v1::PolicyBasedRoutingServiceClient](@ref networkconnectivity_v1::PolicyBasedRoutingServiceClient-retry-snippet)
8889

@@ -100,6 +101,18 @@ Follow these links to find examples for other \c *Client classes:
100101

101102
// <!-- inject-retry-pages-start -->
102103

104+
/*! @page networkconnectivity_v1::DataTransferServiceClient-retry-snippet Override networkconnectivity_v1::DataTransferServiceClient Retry Policies
105+
106+
This shows how to override the retry policies for networkconnectivity_v1::DataTransferServiceClient:
107+
108+
@snippet google/cloud/networkconnectivity/v1/samples/data_transfer_client_samples.cc set-retry-policy
109+
110+
Assuming you have created a custom idempotency policy. Such as:
111+
112+
@snippet google/cloud/networkconnectivity/v1/samples/data_transfer_client_samples.cc custom-idempotency-policy
113+
114+
*/
115+
103116
/*! @page networkconnectivity_v1::HubServiceClient-retry-snippet Override networkconnectivity_v1::HubServiceClient Retry Policies
104117

105118
This shows how to override the retry policies for networkconnectivity_v1::HubServiceClient:

0 commit comments

Comments
 (0)