Class: TencentCloud::Vm::V20201229::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Vm::V20201229::Client
- Defined in:
- lib/v20201229/client.rb
Instance Method Summary collapse
-
#CancelTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::CancelTaskResponse`.
-
#CreateVideoModerationTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::CreateVideoModerationTaskResponse`.
-
#DescribeTaskDetail(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::DescribeTaskDetailResponse`.
-
#DescribeTasks(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::DescribeTasksResponse`.
-
#initialize(credential, region, profile = nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(credential, region, profile = nil) ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 29 |
# File 'lib/v20201229/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2020-12-29' api_endpoint = 'vm.tencentcloudapi.com' sdk_version = 'VM_' + File.read(File.('../VERSION', __dir__)).strip super(credential, region, api_version, api_endpoint, sdk_version, profile) end |
Instance Method Details
#CancelTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::CancelTaskResponse`
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/v20201229/client.rb', line 39 def CancelTask(request) body = send_request('CancelTask', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CancelTaskResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#CreateVideoModerationTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::CreateVideoModerationTaskResponse`
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/v20201229/client.rb', line 100 def CreateVideoModerationTask(request) body = send_request('CreateVideoModerationTask', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CreateVideoModerationTaskResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeTaskDetail(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::DescribeTaskDetailResponse`
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/v20201229/client.rb', line 124 def DescribeTaskDetail(request) body = send_request('DescribeTaskDetail', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeTaskDetailResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeTasks(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20201229::DescribeTasksResponse`
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/v20201229/client.rb', line 150 def DescribeTasks(request) body = send_request('DescribeTasks', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeTasksResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |