Class: TencentCloud::Vm::V20200709::Client
- Inherits:
-
Common::AbstractClient
- Object
- Common::AbstractClient
- TencentCloud::Vm::V20200709::Client
- Defined in:
- lib/v20200709/client.rb
Instance Method Summary collapse
-
#CancelTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20200709::CancelTaskResponse`.
-
#CreateBizConfig(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20200709::CreateBizConfigResponse`.
-
#CreateVideoModerationTask(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20200709::CreateVideoModerationTaskResponse`.
-
#DescribeTaskDetail(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20200709::DescribeTaskDetailResponse`.
-
#DescribeVideoStat(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20200709::DescribeVideoStatResponse`.
-
#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/v20200709/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2020-07-09' 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::V20200709::CancelTaskResponse`
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/v20200709/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 |
#CreateBizConfig(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20200709::CreateBizConfigResponse`
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/v20200709/client.rb', line 65 def CreateBizConfig(request) body = send_request('CreateBizConfig', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = CreateBizConfigResponse.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::V20200709::CreateVideoModerationTaskResponse`
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/v20200709/client.rb', line 89 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::V20200709::DescribeTaskDetailResponse`
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/v20200709/client.rb', line 113 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 |
#DescribeVideoStat(request) ⇒ Object
@rtype: :class:‘Tencentcloud::vm::V20200709::DescribeVideoStatResponse`
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/v20200709/client.rb', line 137 def DescribeVideoStat(request) body = send_request('DescribeVideoStat', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeVideoStatResponse.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 |