/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Taf.V20200210 { using Newtonsoft.Json; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Taf.V20200210.Models; public class TafClient : AbstractClient{ private const string endpoint = "taf.tencentcloudapi.com"; private const string version = "2020-02-10"; /// /// Client constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". public TafClient(Credential credential, string region) : this(credential, region, new ClientProfile()) { } /// /// Client Constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". /// Client profiles. public TafClient(Credential credential, string region, ClientProfile profile) : base(endpoint, version, credential, region, profile) { } /// /// DetectAccountActivity /// /// /// public async Task DetectAccountActivity(DetectAccountActivityRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DetectAccountActivity"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// DetectAccountActivity /// /// /// public DetectAccountActivityResponse DetectAccountActivitySync(DetectAccountActivityRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DetectAccountActivity"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// DetectFraudKOL /// /// /// public async Task DetectFraudKOL(DetectFraudKOLRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DetectFraudKOL"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// DetectFraudKOL /// /// /// public DetectFraudKOLResponse DetectFraudKOLSync(DetectFraudKOLRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DetectFraudKOL"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// EnhanceTaDegree /// /// /// public async Task EnhanceTaDegree(EnhanceTaDegreeRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "EnhanceTaDegree"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// EnhanceTaDegree /// /// /// public EnhanceTaDegreeResponse EnhanceTaDegreeSync(EnhanceTaDegreeRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "EnhanceTaDegree"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 流量反欺诈-流量验准定制版 /// /// /// public async Task RecognizeCustomizedAudience(RecognizeCustomizedAudienceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "RecognizeCustomizedAudience"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 流量反欺诈-流量验准定制版 /// /// /// public RecognizeCustomizedAudienceResponse RecognizeCustomizedAudienceSync(RecognizeCustomizedAudienceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "RecognizeCustomizedAudience"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// RecognizePreciseTargetAudience /// /// /// public async Task RecognizePreciseTargetAudience(RecognizePreciseTargetAudienceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "RecognizePreciseTargetAudience"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// RecognizePreciseTargetAudience /// /// /// public RecognizePreciseTargetAudienceResponse RecognizePreciseTargetAudienceSync(RecognizePreciseTargetAudienceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "RecognizePreciseTargetAudience"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 流量反欺诈-流量验准 /// /// /// public async Task RecognizeTargetAudience(RecognizeTargetAudienceRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "RecognizeTargetAudience"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 流量反欺诈-流量验准 /// /// /// public RecognizeTargetAudienceResponse RecognizeTargetAudienceSync(RecognizeTargetAudienceRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "RecognizeTargetAudience"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// SendTrafficSecuritySmsMessage /// /// /// public async Task SendTrafficSecuritySmsMessage(SendTrafficSecuritySmsMessageRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SendTrafficSecuritySmsMessage"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// SendTrafficSecuritySmsMessage /// /// /// public SendTrafficSecuritySmsMessageResponse SendTrafficSecuritySmsMessageSync(SendTrafficSecuritySmsMessageRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SendTrafficSecuritySmsMessage"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } } }