Aspose::Email::Clients::Google::GmailClient Class Reference

Base class for Gmail client More...

Inherits Aspose::Email::Clients::Google::IBaseGmailClient.

Public Member Functions

System::String get_DefaultEmail () override
 Gets default email address More...
 
virtual void set_DefaultEmail (System::String value)
 Sets default email address More...
 
System::String get_AccessToken () override
 Gets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically. More...
 
void set_AccessToken (System::String value) override
 Sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically. More...
 
System::SharedPtr< System::Net::IWebProxy > get_Proxy () override
 Gets the proxy. More...
 
void set_Proxy (System::SharedPtr< System::Net::IWebProxy > value) override
 Sets the proxy. More...
 
int32_t get_Timeout () override
 Gets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds). More...
 
void set_Timeout (int32_t value) override
 Sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds). More...
 
 GmailClient (System::String clientId, System::String clientSecret, System::String refreshToken)
 Initializes a new instance of the GmailClient based class More...
 
 GmailClient (System::String clientId, System::String clientSecret, System::String refreshToken, System::SharedPtr< System::Net::IWebProxy > proxy)
 Initializes a new instance of the GmailClient based class More...
 
 GmailClient (System::String accessToken)
 Initializes a new instance of the GmailClient based class More...
 
 GmailClient (System::String accessToken, System::SharedPtr< System::Net::IWebProxy > proxy)
 Initializes a new instance of the GmailClient based class More...
 
 GmailClient (System::String clientId, System::String clientSecret, System::String refreshToken, System::String defaultEmail)
 Initializes a new instance of the GmailClient based class More...
 
 GmailClient (System::String clientId, System::String clientSecret, System::String refreshToken, System::SharedPtr< System::Net::IWebProxy > proxy, System::String defaultEmail)
 Initializes a new instance of the GmailClient based class More...
 
 GmailClient (System::String accessToken, System::String defaultEmail)
 Initializes a new instance of the GmailClient based class More...
 
 GmailClient (System::String accessToken, System::SharedPtr< System::Net::IWebProxy > proxy, System::String defaultEmail)
 Initializes a new instance of the GmailClient based class More...
 
void RefreshToken () override
 Refresh access token More...
 
void Dispose () override
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 

Static Public Member Functions

static int32_t get_DefaultTimeout ()
 Gets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds). More...
 
static void set_DefaultTimeout (int32_t value)
 Sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds). More...
 
static System::SharedPtr< IGmailClientGetInstance (System::String accessToken, System::String defaultEmail)
 Gets instance of Gmail client More...
 
static System::SharedPtr< IGmailClientGetInstance (System::String accessToken, System::SharedPtr< System::Net::IWebProxy > proxy, System::String defaultEmail)
 Gets instance of Gmail client More...
 
static System::SharedPtr< IGmailClientGetInstance (System::String clientId, System::String clientSecret, System::String refreshToken, System::String defaultEmail)
 Gets instance of Gmail client More...
 
static System::SharedPtr< IGmailClientGetInstance (System::String clientId, System::String clientSecret, System::String refreshToken, System::SharedPtr< System::Net::IWebProxy > proxy, System::String defaultEmail)
 Gets instance of Gmail client More...
 

Friends

class Aspose::Email::Clients::Google::GmailClient_v3
 

Detailed Description

Base class for Gmail client

Constructor & Destructor Documentation

◆ GmailClient() [1/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  clientId,
System::String  clientSecret,
System::String  refreshToken 
)

Initializes a new instance of the GmailClient based class

Parameters
clientIdThe client ID obtained from the Google Cloud Console during application registration.
clientSecretThe client secret obtained during application registration.
refreshTokenOAuth 2.0 refresh token

◆ GmailClient() [2/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  clientId,
System::String  clientSecret,
System::String  refreshToken,
System::SharedPtr< System::Net::IWebProxy >  proxy 
)

Initializes a new instance of the GmailClient based class

Parameters
clientIdThe client ID obtained from the Google Cloud Console during application registration.
clientSecretThe client secret obtained during application registration.
refreshTokenOAuth 2.0 refresh token
proxyIWebProxy for Gmail client

◆ GmailClient() [3/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  accessToken)

Initializes a new instance of the GmailClient based class

Parameters
accessTokenOAuth 2.0 access token

◆ GmailClient() [4/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  accessToken,
System::SharedPtr< System::Net::IWebProxy >  proxy 
)

Initializes a new instance of the GmailClient based class

Parameters
accessTokenOAuth 2.0 access token
proxyIWebProxy for Gmail client

◆ GmailClient() [5/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  clientId,
System::String  clientSecret,
System::String  refreshToken,
System::String  defaultEmail 
)

Initializes a new instance of the GmailClient based class

Parameters
clientIdThe client ID obtained from the Google Cloud Console during application registration.
clientSecretThe client secret obtained during application registration.
refreshTokenOAuth 2.0 refresh token
defaultEmailDefault email address

◆ GmailClient() [6/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  clientId,
System::String  clientSecret,
System::String  refreshToken,
System::SharedPtr< System::Net::IWebProxy >  proxy,
System::String  defaultEmail 
)

Initializes a new instance of the GmailClient based class

Parameters
clientIdThe client ID obtained from the Google Cloud Console during application registration.
clientSecretThe client secret obtained during application registration.
refreshTokenOAuth 2.0 refresh token
proxyIWebProxy for Gmail client
defaultEmailDefault email address

◆ GmailClient() [7/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  accessToken,
System::String  defaultEmail 
)

Initializes a new instance of the GmailClient based class

Parameters
accessTokenOAuth 2.0 access token
defaultEmailDefault email address

◆ GmailClient() [8/8]

Aspose::Email::Clients::Google::GmailClient::GmailClient ( System::String  accessToken,
System::SharedPtr< System::Net::IWebProxy >  proxy,
System::String  defaultEmail 
)

Initializes a new instance of the GmailClient based class

Parameters
accessTokenOAuth 2.0 access token
proxyIWebProxy for Gmail client
defaultEmailDefault email address

Member Function Documentation

◆ Dispose()

void Aspose::Email::Clients::Google::GmailClient::Dispose ( )
override

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

◆ get_AccessToken()

System::String Aspose::Email::Clients::Google::GmailClient::get_AccessToken ( )
overridevirtual

Gets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.

Implements Aspose::Email::Clients::Google::IBaseGmailClient.

◆ get_DefaultEmail()

System::String Aspose::Email::Clients::Google::GmailClient::get_DefaultEmail ( )
overridevirtual

Gets default email address

Implements Aspose::Email::Clients::Google::IBaseGmailClient.

◆ get_DefaultTimeout()

static int32_t Aspose::Email::Clients::Google::GmailClient::get_DefaultTimeout ( )
static

Gets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).

◆ get_Proxy()

System::SharedPtr<System::Net::IWebProxy> Aspose::Email::Clients::Google::GmailClient::get_Proxy ( )
overridevirtual

◆ get_Timeout()

int32_t Aspose::Email::Clients::Google::GmailClient::get_Timeout ( )
overridevirtual

Gets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

Implements Aspose::Email::Clients::Google::IBaseGmailClient.

◆ GetInstance() [1/4]

static System::SharedPtr<IGmailClient> Aspose::Email::Clients::Google::GmailClient::GetInstance ( System::String  accessToken,
System::SharedPtr< System::Net::IWebProxy >  proxy,
System::String  defaultEmail 
)
static

Gets instance of Gmail client

Parameters
accessTokenOAuth 2.0 access token
proxyIWebProxy for Gmail client
defaultEmailDefault email address
Returns
Returns instance of Gmail client

◆ GetInstance() [2/4]

static System::SharedPtr<IGmailClient> Aspose::Email::Clients::Google::GmailClient::GetInstance ( System::String  accessToken,
System::String  defaultEmail 
)
static

Gets instance of Gmail client

Parameters
accessTokenOAuth 2.0 access token
defaultEmailDefault email address
Returns
Returns instance of Gmail client

◆ GetInstance() [3/4]

static System::SharedPtr<IGmailClient> Aspose::Email::Clients::Google::GmailClient::GetInstance ( System::String  clientId,
System::String  clientSecret,
System::String  refreshToken,
System::SharedPtr< System::Net::IWebProxy >  proxy,
System::String  defaultEmail 
)
static

Gets instance of Gmail client

Parameters
clientIdThe client ID obtained from the Google Cloud Console during application registration.
clientSecretThe client secret obtained during application registration.
refreshTokenOAuth 2.0 refresh token
proxyIWebProxy for Gmail client
defaultEmailDefault email address
Returns
Returns instance of Gmail client

◆ GetInstance() [4/4]

static System::SharedPtr<IGmailClient> Aspose::Email::Clients::Google::GmailClient::GetInstance ( System::String  clientId,
System::String  clientSecret,
System::String  refreshToken,
System::String  defaultEmail 
)
static

Gets instance of Gmail client

Parameters
clientIdThe client ID obtained from the Google Cloud Console during application registration.
clientSecretThe client secret obtained during application registration.
refreshTokenOAuth 2.0 refresh token
defaultEmailDefault email address
Returns
Returns instance of Gmail client

◆ RefreshToken()

void Aspose::Email::Clients::Google::GmailClient::RefreshToken ( )
overridevirtual

Refresh access token

Implements Aspose::Email::Clients::Google::IBaseGmailClient.

◆ set_AccessToken()

void Aspose::Email::Clients::Google::GmailClient::set_AccessToken ( System::String  value)
overridevirtual

Sets OAuth 2.0 access token In case if refresh token is set, access token is generated automatically.

Implements Aspose::Email::Clients::Google::IBaseGmailClient.

◆ set_DefaultEmail()

virtual void Aspose::Email::Clients::Google::GmailClient::set_DefaultEmail ( System::String  value)
virtual

Sets default email address

◆ set_DefaultTimeout()

static void Aspose::Email::Clients::Google::GmailClient::set_DefaultTimeout ( int32_t  value)
static

Sets the default timeout value for ActiveSync client instances The default value is 100,000 milliseconds (100 seconds).

◆ set_Proxy()

void Aspose::Email::Clients::Google::GmailClient::set_Proxy ( System::SharedPtr< System::Net::IWebProxy >  value)
overridevirtual

◆ set_Timeout()

void Aspose::Email::Clients::Google::GmailClient::set_Timeout ( int32_t  value)
overridevirtual

Sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

Implements Aspose::Email::Clients::Google::IBaseGmailClient.

Friends And Related Function Documentation

◆ Aspose::Email::Clients::Google::GmailClient_v3

friend class Aspose::Email::Clients::Google::GmailClient_v3
friend