Skip to content

Commit 4aa572e

Browse files
committed
regen samples
1 parent 5f18504 commit 4aa572e

File tree

485 files changed

+1475
-1455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+1475
-1455
lines changed

generator/integration_tests/golden/v1/samples/deprecated_client_samples.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "google/cloud/credentials.h"
2424
#include "google/cloud/internal/getenv.h"
2525
#include "google/cloud/testing_util/example_driver.h"
26+
#include "google/cloud/universe_domain.h"
2627
#include <fstream>
2728
#include <iostream>
2829
#include <string>
@@ -58,12 +59,11 @@ void SetClientUniverseDomain(std::vector<std::string> const& argv) {
5859
// in the provided Options for the Universe Domain associated with the
5960
// credentials and adds it to the set of Options.
6061
// If no UnifiedCredentialsOption is set, GoogleDefaultCredentials are used.
61-
ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
62+
auto ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
6263

6364
if (!ud_options.ok()) throw std::move(ud_options).status();
6465
auto ud_client = google::cloud::golden_v1::DeprecatedServiceClient(
65-
google::cloud::golden_v1::MakeDeprecatedServiceConnection(ud_options));
66-
66+
google::cloud::golden_v1::MakeDeprecatedServiceConnection(*ud_options));
6767
//! [set-client-universe-domain]
6868
}
6969

@@ -150,6 +150,9 @@ void AutoRun(std::vector<std::string> const& argv) {
150150

151151
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
152152
WithServiceAccount({keyfile});
153+
154+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
155+
SetClientUniverseDomain({});
153156
}
154157

155158
} // namespace
@@ -159,6 +162,7 @@ int main(int argc, char* argv[]) { // NOLINT(bugprone-exception-escape)
159162
{"set-client-endpoint", SetClientEndpoint},
160163
{"set-retry-policy", SetRetryPolicy},
161164
{"with-service-account", WithServiceAccount},
165+
{"set-client-universe-domain", SetClientUniverseDomain},
162166
{"auto", AutoRun},
163167
});
164168
return example.Run(argc, argv);

generator/integration_tests/golden/v1/samples/golden_kitchen_sink_client_samples.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "google/cloud/credentials.h"
2424
#include "google/cloud/internal/getenv.h"
2525
#include "google/cloud/testing_util/example_driver.h"
26+
#include "google/cloud/universe_domain.h"
2627
#include <fstream>
2728
#include <iostream>
2829
#include <string>
@@ -58,12 +59,11 @@ void SetClientUniverseDomain(std::vector<std::string> const& argv) {
5859
// in the provided Options for the Universe Domain associated with the
5960
// credentials and adds it to the set of Options.
6061
// If no UnifiedCredentialsOption is set, GoogleDefaultCredentials are used.
61-
ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
62+
auto ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
6263

6364
if (!ud_options.ok()) throw std::move(ud_options).status();
6465
auto ud_client = google::cloud::golden_v1::GoldenKitchenSinkClient(
65-
google::cloud::golden_v1::MakeGoldenKitchenSinkConnection(ud_options));
66-
66+
google::cloud::golden_v1::MakeGoldenKitchenSinkConnection(*ud_options));
6767
//! [set-client-universe-domain]
6868
}
6969

@@ -150,6 +150,9 @@ void AutoRun(std::vector<std::string> const& argv) {
150150

151151
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
152152
WithServiceAccount({keyfile});
153+
154+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
155+
SetClientUniverseDomain({});
153156
}
154157

155158
} // namespace
@@ -159,6 +162,7 @@ int main(int argc, char* argv[]) { // NOLINT(bugprone-exception-escape)
159162
{"set-client-endpoint", SetClientEndpoint},
160163
{"set-retry-policy", SetRetryPolicy},
161164
{"with-service-account", WithServiceAccount},
165+
{"set-client-universe-domain", SetClientUniverseDomain},
162166
{"auto", AutoRun},
163167
});
164168
return example.Run(argc, argv);

generator/integration_tests/golden/v1/samples/golden_rest_only_client_samples.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "google/cloud/credentials.h"
2424
#include "google/cloud/internal/getenv.h"
2525
#include "google/cloud/testing_util/example_driver.h"
26+
#include "google/cloud/universe_domain.h"
2627
#include <fstream>
2728
#include <iostream>
2829
#include <string>
@@ -64,12 +65,11 @@ void SetClientUniverseDomain(std::vector<std::string> const& argv) {
6465
// in the provided Options for the Universe Domain associated with the
6566
// credentials and adds it to the set of Options.
6667
// If no UnifiedCredentialsOption is set, GoogleDefaultCredentials are used.
67-
ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
68+
auto ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
6869

6970
if (!ud_options.ok()) throw std::move(ud_options).status();
7071
auto ud_client = google::cloud::golden_v1::GoldenRestOnlyClient(
71-
google::cloud::golden_v1::MakeGoldenRestOnlyConnection(ud_options));
72-
72+
google::cloud::golden_v1::MakeGoldenRestOnlyConnection(*ud_options));
7373
//! [set-client-universe-domain]
7474
}
7575

@@ -156,6 +156,9 @@ void AutoRun(std::vector<std::string> const& argv) {
156156

157157
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
158158
WithServiceAccount({keyfile});
159+
160+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
161+
SetClientUniverseDomain({});
159162
}
160163

161164
} // namespace
@@ -165,6 +168,7 @@ int main(int argc, char* argv[]) { // NOLINT(bugprone-exception-escape)
165168
{"set-client-endpoint", SetClientEndpoint},
166169
{"set-retry-policy", SetRetryPolicy},
167170
{"with-service-account", WithServiceAccount},
171+
{"set-client-universe-domain", SetClientUniverseDomain},
168172
{"auto", AutoRun},
169173
});
170174
return example.Run(argc, argv);

generator/integration_tests/golden/v1/samples/golden_thing_admin_client_samples.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "google/cloud/internal/getenv.h"
2525
#include "google/cloud/polling_policy.h"
2626
#include "google/cloud/testing_util/example_driver.h"
27+
#include "google/cloud/universe_domain.h"
2728
#include <fstream>
2829
#include <iostream>
2930
#include <string>
@@ -60,12 +61,11 @@ void SetClientUniverseDomain(std::vector<std::string> const& argv) {
6061
// in the provided Options for the Universe Domain associated with the
6162
// credentials and adds it to the set of Options.
6263
// If no UnifiedCredentialsOption is set, GoogleDefaultCredentials are used.
63-
ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
64+
auto ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
6465

6566
if (!ud_options.ok()) throw std::move(ud_options).status();
6667
auto ud_client = google::cloud::golden_v1::GoldenThingAdminClient(
67-
google::cloud::golden_v1::MakeGoldenThingAdminConnection(ud_options));
68-
68+
google::cloud::golden_v1::MakeGoldenThingAdminConnection(*ud_options));
6969
//! [set-client-universe-domain]
7070
}
7171

@@ -189,6 +189,9 @@ void AutoRun(std::vector<std::string> const& argv) {
189189

190190
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
191191
WithServiceAccount({keyfile});
192+
193+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
194+
SetClientUniverseDomain({});
192195
}
193196

194197
} // namespace
@@ -199,6 +202,7 @@ int main(int argc, char* argv[]) { // NOLINT(bugprone-exception-escape)
199202
{"set-retry-policy", SetRetryPolicy},
200203
{"set-polling-policy", SetPollingPolicy},
201204
{"with-service-account", WithServiceAccount},
205+
{"set-client-universe-domain", SetClientUniverseDomain},
202206
{"auto", AutoRun},
203207
});
204208
return example.Run(argc, argv);

generator/integration_tests/golden/v1/samples/request_id_client_samples.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "google/cloud/internal/getenv.h"
2525
#include "google/cloud/polling_policy.h"
2626
#include "google/cloud/testing_util/example_driver.h"
27+
#include "google/cloud/universe_domain.h"
2728
#include <fstream>
2829
#include <iostream>
2930
#include <string>
@@ -60,12 +61,11 @@ void SetClientUniverseDomain(std::vector<std::string> const& argv) {
6061
// in the provided Options for the Universe Domain associated with the
6162
// credentials and adds it to the set of Options.
6263
// If no UnifiedCredentialsOption is set, GoogleDefaultCredentials are used.
63-
ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
64+
auto ud_options = google::cloud::AddUniverseDomainOption(std::move(options));
6465

6566
if (!ud_options.ok()) throw std::move(ud_options).status();
6667
auto ud_client = google::cloud::golden_v1::RequestIdServiceClient(
67-
google::cloud::golden_v1::MakeRequestIdServiceConnection(ud_options));
68-
68+
google::cloud::golden_v1::MakeRequestIdServiceConnection(*ud_options));
6969
//! [set-client-universe-domain]
7070
}
7171

@@ -189,6 +189,9 @@ void AutoRun(std::vector<std::string> const& argv) {
189189

190190
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
191191
WithServiceAccount({keyfile});
192+
193+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
194+
SetClientUniverseDomain({});
192195
}
193196

194197
} // namespace
@@ -199,6 +202,7 @@ int main(int argc, char* argv[]) { // NOLINT(bugprone-exception-escape)
199202
{"set-retry-policy", SetRetryPolicy},
200203
{"set-polling-policy", SetPollingPolicy},
201204
{"with-service-account", WithServiceAccount},
205+
{"set-client-universe-domain", SetClientUniverseDomain},
202206
{"auto", AutoRun},
203207
});
204208
return example.Run(argc, argv);

google/cloud/accessapproval/v1/samples/access_approval_client_samples.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ void AutoRun(std::vector<std::string> const& argv) {
163163
std::cout << "\nRunning SetRetryPolicy() example" << std::endl;
164164
SetRetryPolicy({});
165165

166-
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
167-
SetClientUniverseDomain({});
168-
169166
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
170167
WithServiceAccount({keyfile});
168+
169+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
170+
SetClientUniverseDomain({});
171171
}
172172

173173
} // namespace

google/cloud/accesscontextmanager/v1/samples/access_context_manager_client_samples.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ void AutoRun(std::vector<std::string> const& argv) {
215215
std::cout << "\nRunning SetRetryPolicy() example" << std::endl;
216216
SetRetryPolicy({});
217217

218-
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
219-
SetClientUniverseDomain({});
220-
221218
std::cout << "\nRunning SetPollingPolicy() example" << std::endl;
222219
SetPollingPolicy({});
223220

224221
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
225222
WithServiceAccount({keyfile});
223+
224+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
225+
SetClientUniverseDomain({});
226226
}
227227

228228
} // namespace

google/cloud/advisorynotifications/v1/samples/advisory_notifications_client_samples.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ void AutoRun(std::vector<std::string> const& argv) {
174174
std::cout << "\nRunning SetRetryPolicy() example" << std::endl;
175175
SetRetryPolicy({});
176176

177-
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
178-
SetClientUniverseDomain({});
179-
180177
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
181178
WithServiceAccount({keyfile});
179+
180+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
181+
SetClientUniverseDomain({});
182182
}
183183

184184
} // namespace

google/cloud/aiplatform/v1/samples/dataset_client_samples.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ void AutoRun(std::vector<std::string> const& argv) {
203203
std::cout << "\nRunning SetRetryPolicy() example" << std::endl;
204204
SetRetryPolicy({});
205205

206-
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
207-
SetClientUniverseDomain({});
208-
209206
std::cout << "\nRunning SetPollingPolicy() example" << std::endl;
210207
SetPollingPolicy({});
211208

212209
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
213210
WithServiceAccount({keyfile});
211+
212+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
213+
SetClientUniverseDomain({});
214214
}
215215

216216
} // namespace

google/cloud/aiplatform/v1/samples/deployment_resource_pool_client_samples.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ void AutoRun(std::vector<std::string> const& argv) {
220220
std::cout << "\nRunning SetRetryPolicy() example" << std::endl;
221221
SetRetryPolicy({});
222222

223-
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
224-
SetClientUniverseDomain({});
225-
226223
std::cout << "\nRunning SetPollingPolicy() example" << std::endl;
227224
SetPollingPolicy({});
228225

229226
std::cout << "\nRunning WithServiceAccount() example" << std::endl;
230227
WithServiceAccount({keyfile});
228+
229+
std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl;
230+
SetClientUniverseDomain({});
231231
}
232232

233233
} // namespace

0 commit comments

Comments
 (0)