Class: TencentCloud::Tia::V20180226::Client

Inherits:
Common::AbstractClient
  • Object
show all
Defined in:
lib/v20180226/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(credential, region, profile = nil) ⇒ Client

Returns a new instance of Client.



24
25
26
27
28
29
# File 'lib/v20180226/client.rb', line 24

def initialize(credential, region, profile = nil)
    api_version = '2018-02-26'
    api_endpoint = 'tia.tencentcloudapi.com'
    sdk_version = 'TIA_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end

Instance Method Details

#CreateJob(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::CreateJobResponse`

Parameters:

  • request:

    Request instance for CreateJob.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/v20180226/client.rb', line 37

def CreateJob(request)
  body = send_request('CreateJob', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateJobResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#CreateModel(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::CreateModelResponse`

Parameters:

  • request:

    Request instance for CreateModel.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/v20180226/client.rb', line 61

def CreateModel(request)
  body = send_request('CreateModel', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateModelResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteJob(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::DeleteJobResponse`

Parameters:

  • request:

    Request instance for DeleteJob.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/v20180226/client.rb', line 85

def DeleteJob(request)
  body = send_request('DeleteJob', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteJobResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DeleteModel(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::DeleteModelResponse`

Parameters:

  • request:

    Request instance for DeleteModel.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/v20180226/client.rb', line 109

def DeleteModel(request)
  body = send_request('DeleteModel', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteModelResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeJob(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::DescribeJobResponse`

Parameters:

  • request:

    Request instance for DescribeJob.



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/v20180226/client.rb', line 133

def DescribeJob(request)
  body = send_request('DescribeJob', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeJobResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#DescribeModel(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::DescribeModelResponse`

Parameters:

  • request:

    Request instance for DescribeModel.



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/v20180226/client.rb', line 157

def DescribeModel(request)
  body = send_request('DescribeModel', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeModelResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#InstallAgent(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::InstallAgentResponse`

Parameters:

  • request:

    Request instance for InstallAgent.



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/v20180226/client.rb', line 181

def InstallAgent(request)
  body = send_request('InstallAgent', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = InstallAgentResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListJobs(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::ListJobsResponse`

Parameters:

  • request:

    Request instance for ListJobs.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/v20180226/client.rb', line 205

def ListJobs(request)
  body = send_request('ListJobs', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListJobsResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#ListModels(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::ListModelsResponse`

Parameters:

  • request:

    Request instance for ListModels.



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/v20180226/client.rb', line 229

def ListModels(request)
  body = send_request('ListModels', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListModelsResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end

#QueryLogs(request) ⇒ Object

@rtype: :class:‘Tencentcloud::tia::V20180226::QueryLogsResponse`

Parameters:

  • request:

    Request instance for QueryLogs.



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/v20180226/client.rb', line 253

def QueryLogs(request)
  body = send_request('QueryLogs', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = QueryLogsResponse.new
    model.deserialize(response['Response'])
    model
  else
    code = response['Response']['Error']['Code']
    message = response['Response']['Error']['Message']
    reqid = response['Response']['RequestId']
    raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
  end
rescue TencentCloud::Common::TencentCloudSDKException => e
  raise e
rescue StandardError => e
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end