class TencentCloud::Hasim::V20210716::Client

def CreateRule(request)

Parameters:
  • request: () -- Request instance for CreateRule.
def CreateRule(request)
  body = send_request('CreateRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateRuleResponse.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

def CreateTactic(request)

Parameters:
  • request: () -- Request instance for CreateTactic.
def CreateTactic(request)
  body = send_request('CreateTactic', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTacticResponse.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

def CreateTag(request)

Parameters:
  • request: () -- Request instance for CreateTag.
def CreateTag(request)
  body = send_request('CreateTag', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTagResponse.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

def DeleteRule(request)

Parameters:
  • request: () -- Request instance for DeleteRule.
def DeleteRule(request)
  body = send_request('DeleteRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteRuleResponse.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

def DeleteTactic(request)

Parameters:
  • request: () -- Request instance for DeleteTactic.
def DeleteTactic(request)
  body = send_request('DeleteTactic', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteTacticResponse.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

def DeleteTag(request)

Parameters:
  • request: () -- Request instance for DeleteTag.
def DeleteTag(request)
  body = send_request('DeleteTag', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteTagResponse.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

def DescribeLink(request)

Parameters:
  • request: () -- Request instance for DescribeLink.
def DescribeLink(request)
  body = send_request('DescribeLink', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeLinkResponse.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

def DescribeLinks(request)

Parameters:
  • request: () -- Request instance for DescribeLinks.
def DescribeLinks(request)
  body = send_request('DescribeLinks', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeLinksResponse.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

def DescribeOrders(request)

Parameters:
  • request: () -- Request instance for DescribeOrders.
def DescribeOrders(request)
  body = send_request('DescribeOrders', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeOrdersResponse.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

def DescribeRule(request)

Parameters:
  • request: () -- Request instance for DescribeRule.
def DescribeRule(request)
  body = send_request('DescribeRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeRuleResponse.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

def DescribeRules(request)

Parameters:
  • request: () -- Request instance for DescribeRules.
def DescribeRules(request)
  body = send_request('DescribeRules', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeRulesResponse.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

def DescribeTactic(request)

Parameters:
  • request: () -- Request instance for DescribeTactic.
def DescribeTactic(request)
  body = send_request('DescribeTactic', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeTacticResponse.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

def DescribeTactics(request)

Parameters:
  • request: () -- Request instance for DescribeTactics.
def DescribeTactics(request)
  body = send_request('DescribeTactics', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeTacticsResponse.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

def DescribeTags(request)

Parameters:
  • request: () -- Request instance for DescribeTags.
def DescribeTags(request)
  body = send_request('DescribeTags', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeTagsResponse.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

def ModifyLinkAdvancedLog(request)

Parameters:
  • request: () -- Request instance for ModifyLinkAdvancedLog.
def ModifyLinkAdvancedLog(request)
  body = send_request('ModifyLinkAdvancedLog', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyLinkAdvancedLogResponse.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

def ModifyLinkTactic(request)

Parameters:
  • request: () -- Request instance for ModifyLinkTactic.
def ModifyLinkTactic(request)
  body = send_request('ModifyLinkTactic', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyLinkTacticResponse.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

def ModifyLinkTele(request)

Parameters:
  • request: () -- Request instance for ModifyLinkTele.
def ModifyLinkTele(request)
  body = send_request('ModifyLinkTele', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyLinkTeleResponse.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

def ModifyRule(request)

Parameters:
  • request: () -- Request instance for ModifyRule.
def ModifyRule(request)
  body = send_request('ModifyRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyRuleResponse.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

def ModifyRuleStatus(request)

Parameters:
  • request: () -- Request instance for ModifyRuleStatus.
def ModifyRuleStatus(request)
  body = send_request('ModifyRuleStatus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyRuleStatusResponse.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

def ModifyTactic(request)

Parameters:
  • request: () -- Request instance for ModifyTactic.
def ModifyTactic(request)
  body = send_request('ModifyTactic', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyTacticResponse.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

def ModifyTag(request)

Parameters:
  • request: () -- Request instance for ModifyTag.
def ModifyTag(request)
  body = send_request('ModifyTag', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifyTagResponse.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

def RenewLinkInfo(request)

Parameters:
  • request: () -- Request instance for RenewLinkInfo.
def RenewLinkInfo(request)
  body = send_request('RenewLinkInfo', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = RenewLinkInfoResponse.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

def initialize(credential, region, profile = nil)

def initialize(credential, region, profile = nil)
    api_version = '2021-07-16'
    api_endpoint = 'hasim.tencentcloudapi.com'
    sdk_version = 'HASIM_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end