Google Cloud Storage C++ Client 2.13.0
A C++ Client Library for Google Cloud Storage
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
google::cloud::storage::ClientOptions Class Reference

Describes the configuration for a storage::Client object. More...

#include <google/cloud/storage/client_options.h>

Public Member Functions

 ClientOptions (std::shared_ptr< oauth2::Credentials > credentials)
 Constructor with channel options. More...
 
 ClientOptions (std::shared_ptr< oauth2::Credentials > credentials, ChannelOptions channel_options)
 Constructor with channel options. More...
 
std::shared_ptr< oauth2::Credentialscredentials () const
 
ClientOptionsset_credentials (std::shared_ptr< oauth2::Credentials > c)
 
std::string const & endpoint () const
 
ClientOptionsset_endpoint (std::string endpoint)
 
std::string const & iam_endpoint () const
 
ClientOptionsset_iam_endpoint (std::string endpoint)
 
std::string const & version () const
 
ClientOptionsset_version (std::string version)
 
bool enable_http_tracing () const
 
ClientOptionsset_enable_http_tracing (bool enable)
 
bool enable_raw_client_tracing () const
 
ClientOptionsset_enable_raw_client_tracing (bool enable)
 
std::string const & project_id () const
 
ClientOptionsset_project_id (std::string v)
 
std::size_t connection_pool_size () const
 
ClientOptionsset_connection_pool_size (std::size_t size)
 
std::size_t download_buffer_size () const
 
ClientOptionsSetDownloadBufferSize (std::size_t size)
 
std::size_t upload_buffer_size () const
 
ClientOptionsSetUploadBufferSize (std::size_t size)
 
std::string const & user_agent_prefix () const
 
ClientOptionsadd_user_agent_prefix (std::string prefix)
 
ClientOptionsadd_user_agent_prefx (std::string const &v)
 
std::size_t maximum_simple_upload_size () const
 
ClientOptionsset_maximum_simple_upload_size (std::size_t v)
 
bool enable_ssl_locking_callbacks () const
 If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking. More...
 
ClientOptionsset_enable_ssl_locking_callbacks (bool v)
 If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking. More...
 
bool enable_sigpipe_handler () const
 
ClientOptionsset_enable_sigpipe_handler (bool v)
 
std::size_t maximum_socket_recv_size () const
 
ClientOptionsset_maximum_socket_recv_size (std::size_t v)
 
std::size_t maximum_socket_send_size () const
 
ClientOptionsset_maximum_socket_send_size (std::size_t v)
 
ChannelOptionschannel_options ()
 
ChannelOptions const & channel_options () const
 
std::chrono::seconds download_stall_timeout () const
 Control the maximum amount of time allowed for "stalls" during a download. More...
 
ClientOptionsset_download_stall_timeout (std::chrono::seconds v)
 

Static Public Member Functions

static StatusOr< ClientOptionsCreateDefaultClientOptions ()
 Creates a ClientOptions with Google Application Default Credentials. More...
 
static StatusOr< ClientOptionsCreateDefaultClientOptions (ChannelOptions const &channel_options)
 

Detailed Description

Describes the configuration for a storage::Client object.

By default, several environment variables are read to configure the client:

Constructor & Destructor Documentation

◆ ClientOptions() [1/2]

google::cloud::storage::ClientOptions::ClientOptions ( std::shared_ptr< oauth2::Credentials credentials)
inlineexplicit

Constructor with channel options.

Deprecated:
use google::cloud::Options instead.
Parameters
credentialshow to authenticate to the client. Using a nullptr for credentials results in undefined behavior.

◆ ClientOptions() [2/2]

google::cloud::storage::ClientOptions::ClientOptions ( std::shared_ptr< oauth2::Credentials credentials,
ChannelOptions  channel_options 
)

Constructor with channel options.

Deprecated:
use google::cloud::Options instead.
Parameters
credentialshow to authenticate to the client. Using a nullptr for credentials results in undefined behavior.
channel_optionsthe configuration for SSL certificate validation.

Member Function Documentation

◆ add_user_agent_prefix()

ClientOptions & google::cloud::storage::ClientOptions::add_user_agent_prefix ( std::string  prefix)
inline

◆ add_user_agent_prefx()

ClientOptions & google::cloud::storage::ClientOptions::add_user_agent_prefx ( std::string const &  v)
inline

◆ channel_options() [1/2]

ChannelOptions & google::cloud::storage::ClientOptions::channel_options ( )
inline
Deprecated:
Use google::cloud::Options and CAPathOption instead.

◆ channel_options() [2/2]

ChannelOptions const & google::cloud::storage::ClientOptions::channel_options ( ) const
inline
Deprecated:
Use google::cloud::Options and CAPathOption instead.

◆ connection_pool_size()

std::size_t google::cloud::storage::ClientOptions::connection_pool_size ( ) const
inline

◆ CreateDefaultClientOptions() [1/2]

static StatusOr< ClientOptions > google::cloud::storage::ClientOptions::CreateDefaultClientOptions ( )
static

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.

◆ CreateDefaultClientOptions() [2/2]

static StatusOr< ClientOptions > google::cloud::storage::ClientOptions::CreateDefaultClientOptions ( ChannelOptions const &  channel_options)
static
Deprecated:
Please use google::cloud::Options instead.

◆ credentials()

std::shared_ptr< oauth2::Credentials > google::cloud::storage::ClientOptions::credentials ( ) const
inline

◆ download_buffer_size()

std::size_t google::cloud::storage::ClientOptions::download_buffer_size ( ) const
inline

◆ download_stall_timeout()

std::chrono::seconds google::cloud::storage::ClientOptions::download_stall_timeout ( ) const
inline

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.

◆ enable_http_tracing()

bool google::cloud::storage::ClientOptions::enable_http_tracing ( ) const

◆ enable_raw_client_tracing()

bool google::cloud::storage::ClientOptions::enable_raw_client_tracing ( ) const

◆ enable_sigpipe_handler()

bool google::cloud::storage::ClientOptions::enable_sigpipe_handler ( ) const
inline
Deprecated:
Use google::cloud::Options and EnableCurlSigpipeOption instead.

◆ enable_ssl_locking_callbacks()

bool google::cloud::storage::ClientOptions::enable_ssl_locking_callbacks ( ) const
inline

If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking.

Deprecated:
Use google::cloud::options and EnableCurlSslLockingOption instead.

◆ endpoint()

std::string const & google::cloud::storage::ClientOptions::endpoint ( ) const
inline

◆ iam_endpoint()

std::string const & google::cloud::storage::ClientOptions::iam_endpoint ( ) const
inline

◆ maximum_simple_upload_size()

std::size_t google::cloud::storage::ClientOptions::maximum_simple_upload_size ( ) const
inline

◆ maximum_socket_recv_size()

std::size_t google::cloud::storage::ClientOptions::maximum_socket_recv_size ( ) const
inline

◆ maximum_socket_send_size()

std::size_t google::cloud::storage::ClientOptions::maximum_socket_send_size ( ) const
inline

◆ project_id()

std::string const & google::cloud::storage::ClientOptions::project_id ( ) const
inline

◆ set_connection_pool_size()

ClientOptions & google::cloud::storage::ClientOptions::set_connection_pool_size ( std::size_t  size)
inline

◆ set_credentials()

ClientOptions & google::cloud::storage::ClientOptions::set_credentials ( std::shared_ptr< oauth2::Credentials c)
inline

◆ set_download_stall_timeout()

ClientOptions & google::cloud::storage::ClientOptions::set_download_stall_timeout ( std::chrono::seconds  v)
inline

◆ set_enable_http_tracing()

ClientOptions & google::cloud::storage::ClientOptions::set_enable_http_tracing ( bool  enable)

◆ set_enable_raw_client_tracing()

ClientOptions & google::cloud::storage::ClientOptions::set_enable_raw_client_tracing ( bool  enable)

◆ set_enable_sigpipe_handler()

ClientOptions & google::cloud::storage::ClientOptions::set_enable_sigpipe_handler ( bool  v)
inline
Deprecated:
Use google::cloud::Options and EnableCurlSigpipeOption instead.

◆ set_enable_ssl_locking_callbacks()

ClientOptions & google::cloud::storage::ClientOptions::set_enable_ssl_locking_callbacks ( bool  v)
inline

If true and using OpenSSL 1.0.2 the library configures the OpenSSL callbacks for locking.

Deprecated:
Use google::cloud::options and EnableCurlSslLockingOption instead.

◆ set_endpoint()

ClientOptions & google::cloud::storage::ClientOptions::set_endpoint ( std::string  endpoint)
inline

◆ set_iam_endpoint()

ClientOptions & google::cloud::storage::ClientOptions::set_iam_endpoint ( std::string  endpoint)
inline

◆ set_maximum_simple_upload_size()

ClientOptions & google::cloud::storage::ClientOptions::set_maximum_simple_upload_size ( std::size_t  v)
inline

◆ set_maximum_socket_recv_size()

ClientOptions & google::cloud::storage::ClientOptions::set_maximum_socket_recv_size ( std::size_t  v)
inline

◆ set_maximum_socket_send_size()

ClientOptions & google::cloud::storage::ClientOptions::set_maximum_socket_send_size ( std::size_t  v)
inline

◆ set_project_id()

ClientOptions & google::cloud::storage::ClientOptions::set_project_id ( std::string  v)
inline

◆ set_version()

ClientOptions & google::cloud::storage::ClientOptions::set_version ( std::string  version)
inline
Deprecated:
This was intended for development and not a public API.

◆ SetDownloadBufferSize()

ClientOptions & google::cloud::storage::ClientOptions::SetDownloadBufferSize ( std::size_t  size)

◆ SetUploadBufferSize()

ClientOptions & google::cloud::storage::ClientOptions::SetUploadBufferSize ( std::size_t  size)

◆ upload_buffer_size()

std::size_t google::cloud::storage::ClientOptions::upload_buffer_size ( ) const
inline

◆ user_agent_prefix()

std::string const & google::cloud::storage::ClientOptions::user_agent_prefix ( ) const
inline

◆ version()

std::string const & google::cloud::storage::ClientOptions::version ( ) const
inline
Deprecated:
This was intended for development and not a public API.