Class: TencentCloud::Common::ClientProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/tencentcloud-sdk-common/profile/client_profile.rb

Overview

basic httpprofile

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sign_method = 'TC3-HMAC-SHA256', http_profile = nil, language = 'zh-CN', debug = false) ⇒ ClientProfile

Initializes a new ClientProfile with default values

Parameters:

  • sign_method (String) (defaults to: 'TC3-HMAC-SHA256')

    the signing method (default: ‘TC3-HMAC-SHA256’)

  • http_profile (HttpProfile, nil) (defaults to: nil)

    the HTTP profile (default: nil)

  • language (String) (defaults to: 'zh-CN')

    the language for responses (default: ‘zh-CN’)

  • debug (Boolean) (defaults to: false)

    whether to enable debug mode (default: false)



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/tencentcloud-sdk-common/profile/client_profile.rb', line 15

def initialize(sign_method = 'TC3-HMAC-SHA256', http_profile = nil,
               language = 'zh-CN', debug = false)
  @sign_method = sign_method
  @http_profile = http_profile || HttpProfile.new
  valid_language = %w[zh-CN en-US]
  unless valid_language.include? language
    raise TencentCloudSDKException.new('ClientError', "Language invalid, choices: #{valid_language}")
  end

  @language = language
  @debug = debug
  @unsigned_payload = false
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/client_profile.rb', line 7

def debug
  @debug
end

#http_profileObject

Returns the value of attribute http_profile.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/client_profile.rb', line 7

def http_profile
  @http_profile
end

#languageObject

Returns the value of attribute language.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/client_profile.rb', line 7

def language
  @language
end

#sign_methodObject

Returns the value of attribute sign_method.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/client_profile.rb', line 7

def sign_method
  @sign_method
end

#unsigned_payloadObject

Returns the value of attribute unsigned_payload.



7
8
9
# File 'lib/tencentcloud-sdk-common/profile/client_profile.rb', line 7

def unsigned_payload
  @unsigned_payload
end