15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_CLIENT_OPTIONS_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_CLIENT_OPTIONS_H
18#include "google/cloud/storage/oauth2/credentials.h"
19#include "google/cloud/storage/options.h"
20#include "google/cloud/storage/version.h"
21#include "google/cloud/common_options.h"
22#include "google/cloud/options.h"
30GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
33std::string RestEndpoint(
Options const&);
34std::string IamRestEndpoint(
Options const&);
35std::string IamRestPath();
36std::string JsonEndpoint(
Options const&);
37std::string JsonUploadEndpoint(
Options const&);
38std::string XmlEndpoint(
Options const&);
39std::string IamEndpoint(
Options const&);
51template <
typename P,
typename... Policies>
53 opts = ApplyPolicy(std::move(opts), std::forward<P>(head));
54 return ApplyPolicies(std::move(opts), std::forward<Policies>(tail)...);
64
65
66
67
68
69
70
71
72
73
81 ssl_root_path_ = std::move(ssl_root_path);
86 std::string ssl_root_path_;
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
110
111
112
113
114
115
116
121
122
123
124
125
126
127
128
133
134
135
136
137
138
139
140
141
148
149
155
156
163
164
165 std::string
const&
endpoint()
const {
170
171
178
179
185
186
193
194
195 std::string
const&
version()
const {
196 return opts_
.get<internal
::TargetApiVersionOption
>();
200
201
203 opts_
.set<internal
::TargetApiVersionOption
>(std::move(version)
);
208
209
210
214
215
216
220
221
222
226
227
228
232
233
237
238
245
246
247
253
254
255
262
263
264
270
271
272
276
277
283
284
288
289
290
294
295
296
299 if (!user_agent_prefix_.empty()) {
301 prefix += user_agent_prefix_;
303 user_agent_prefix_ = std::move(prefix);
313
314
315
321
322
323
330
331
332
333
334
335
341
342
343
344
345
346
353
354
355
361
362
363
370
371
372
378
379
380
387
388
389
395
396
397
411
412
413
414
415
416
417
418
419
420
421
427
428
429
440 explicit ClientOptions(
Options o);
449 std::string user_agent_prefix_;
452GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
ValueTypeT< T > const & get() const
ValueTypeT< T > & lookup(ValueTypeT< T > value={})
Options & set(ValueTypeT< T > v)
Describes the configuration for low-level connection features.
Definition: client_options.h:74
ChannelOptions & set_ssl_root_path(std::string ssl_root_path)
Definition: client_options.h:80
std::string ssl_root_path() const
Definition: client_options.h:77
Describes the configuration for a storage::Client object.
Definition: client_options.h:107
ClientOptions & set_iam_endpoint(std::string endpoint)
Definition: client_options.h:187
std::size_t maximum_socket_send_size() const
Definition: client_options.h:390
ClientOptions & set_enable_raw_client_tracing(bool enable)
ClientOptions(std::shared_ptr< oauth2::Credentials > credentials, ChannelOptions channel_options)
Constructor with channel options.
std::size_t download_buffer_size() const
Definition: client_options.h:265
ClientOptions & add_user_agent_prefix(std::string prefix)
Definition: client_options.h:297
ClientOptions & set_maximum_simple_upload_size(std::size_t v)
Definition: client_options.h:324
bool enable_http_tracing() const
static StatusOr< ClientOptions > CreateDefaultClientOptions(ChannelOptions const &channel_options)
std::string const & user_agent_prefix() const
Definition: client_options.h:291
std::size_t maximum_simple_upload_size() const
Definition: client_options.h:316
std::string const & iam_endpoint() const
Definition: client_options.h:180
ClientOptions & set_enable_http_tracing(bool enable)
ClientOptions & set_maximum_socket_send_size(std::size_t v)
Definition: client_options.h:398
ClientOptions & set_enable_sigpipe_handler(bool v)
Definition: client_options.h:364
std::size_t upload_buffer_size() const
Definition: client_options.h:278
std::string const & version() const
Definition: client_options.h:195
bool enable_raw_client_tracing() const
std::shared_ptr< oauth2::Credentials > credentials() const
Definition: client_options.h:150
std::chrono::seconds download_stall_timeout() const
Control the maximum amount of time allowed for "stalls" during a download.
Definition: client_options.h:422
ClientOptions & add_user_agent_prefx(std::string const &v)
Definition: client_options.h:308
ChannelOptions & channel_options()
Definition: client_options.h:404
std::size_t maximum_socket_recv_size() const
Definition: client_options.h:373
ClientOptions & set_download_stall_timeout(std::chrono::seconds v)
Definition: client_options.h:430
ClientOptions(std::shared_ptr< oauth2::Credentials > credentials)
Constructor with channel options.
Definition: client_options.h:117
ChannelOptions const & channel_options() const
Definition: client_options.h:407
static StatusOr< ClientOptions > CreateDefaultClientOptions()
Creates a ClientOptions with Google Application Default Credentials.
ClientOptions & set_connection_pool_size(std::size_t size)
Definition: client_options.h:256
std::size_t connection_pool_size() const
Definition: client_options.h:248
ClientOptions & set_endpoint(std::string endpoint)
Definition: client_options.h:172
std::string const & project_id() const
Definition: client_options.h:234
ClientOptions & set_credentials(std::shared_ptr< oauth2::Credentials > c)
Definition: client_options.h:157
ClientOptions & set_maximum_socket_recv_size(std::size_t v)
Definition: client_options.h:381
std::string const & endpoint() const
Definition: client_options.h:165
ClientOptions & SetDownloadBufferSize(std::size_t size)
ClientOptions & set_project_id(std::string v)
Definition: client_options.h:239
bool enable_ssl_locking_callbacks() const
If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking.
Definition: client_options.h:336
ClientOptions & set_enable_ssl_locking_callbacks(bool v)
If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking.
Definition: client_options.h:347
bool enable_sigpipe_handler() const
Definition: client_options.h:356
ClientOptions & SetUploadBufferSize(std::size_t size)
ClientOptions & set_version(std::string version)
Definition: client_options.h:202
Define the interface for the idempotency policy.
Definition: idempotency_policy.h:58
Interface for OAuth 2.0 credentials used to access Google Cloud services.
Definition: credentials.h:47
Authentication components for Google Cloud Storage.
Definition: anonymous_credentials.h:26
Contains all the Google Cloud Storage C++ client APIs.
Definition: auto_finalize.h:24
Set the maximum connection pool size.
Definition: options.h:144
Control the formatted I/O download buffer.
Definition: options.h:161
Disables automatic OpenSSL sigpipe handler.
Definition: options.h:221
Disables automatic OpenSSL locking.
Definition: options.h:210
Configure the IAM endpoint for the GCS client library.
Definition: options.h:93
Control the maximum socket receive buffer.
Definition: options.h:232
Control the maximum socket send buffer.
Definition: options.h:242
Defines the threshold to switch from simple to resumable uploads for files.
Definition: options.h:194
Configure oauth2::Credentials for the GCS client library.
Definition: options.h:105
Set the Google Cloud Platform project id.
Definition: options.h:114
Configure the REST endpoint for the GCS client library.
Definition: options.h:84
Sets the transfer stall timeout.
Definition: options.h:263
Control the formatted I/O upload buffer.
Definition: options.h:179