Class: TencentCloud::Vm::V20210922::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Vm::V20210922::Client
- Defined in:
- lib/v20210922/client.rb
Instance Method Summary collapse
-
#CancelTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20210922::CancelTaskResponse`.
-
#CreateVideoModerationTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20210922::CreateVideoModerationTaskResponse`.
-
#DescribeTaskDetail(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20210922::DescribeTaskDetailResponse`.
-
#DescribeTasks(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20210922::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/v20210922/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2021-09-22' 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::V20210922::CancelTaskResponse`
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/v20210922/client.rb', line 37 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::V20210922::CreateVideoModerationTaskResponse`
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/v20210922/client.rb', line 111 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::V20210922::DescribeTaskDetailResponse`
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/v20210922/client.rb', line 135 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::V20210922::DescribeTasksResponse`
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/v20210922/client.rb', line 159 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 |