/*
* 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.Iottid.V20190411
{
using Newtonsoft.Json;
using System.Threading.Tasks;
using TencentCloud.Common;
using TencentCloud.Common.Profile;
using TencentCloud.Iottid.V20190411.Models;
public class IottidClient : AbstractClient{
private const string endpoint = "iottid.tencentcloudapi.com";
private const string version = "2019-04-11";
///
/// Client constructor.
///
/// Credentials.
/// Region name, such as "ap-guangzhou".
public IottidClient(Credential credential, string region)
: this(credential, region, new ClientProfile())
{
}
///
/// Client Constructor.
///
/// Credentials.
/// Region name, such as "ap-guangzhou".
/// Client profiles.
public IottidClient(Credential credential, string region, ClientProfile profile)
: base(endpoint, version, credential, region, profile)
{
}
///
/// 单向认证测试TID
///
///
///
public async Task AuthTestTid(AuthTestTidRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "AuthTestTid");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 单向认证测试TID
///
///
///
public AuthTestTidResponse AuthTestTidSync(AuthTestTidRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "AuthTestTid");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 安全芯片TID烧录回执
///
///
///
public async Task BurnTidNotify(BurnTidNotifyRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "BurnTidNotify");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 安全芯片TID烧录回执
///
///
///
public BurnTidNotifyResponse BurnTidNotifySync(BurnTidNotifyRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "BurnTidNotify");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 安全芯片为载体的TID空发回执,绑定TID与订单号。
///
///
///
public async Task DeliverTidNotify(DeliverTidNotifyRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DeliverTidNotify");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 安全芯片为载体的TID空发回执,绑定TID与订单号。
///
///
///
public DeliverTidNotifyResponse DeliverTidNotifySync(DeliverTidNotifyRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DeliverTidNotify");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 设备服务商请求空发产品订单的TID信息
///
///
///
public async Task DeliverTids(DeliverTidsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DeliverTids");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 设备服务商请求空发产品订单的TID信息
///
///
///
public DeliverTidsResponse DeliverTidsSync(DeliverTidsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DeliverTids");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 查询指定订单的可空发的白盒密钥数量
///
///
///
public async Task DescribeAvailableLibCount(DescribeAvailableLibCountRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribeAvailableLibCount");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 查询指定订单的可空发的白盒密钥数量
///
///
///
public DescribeAvailableLibCountResponse DescribeAvailableLibCountSync(DescribeAvailableLibCountRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribeAvailableLibCount");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 查询企业用户TID平台控制台权限
///
///
///
public async Task DescribePermission(DescribePermissionRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DescribePermission");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 查询企业用户TID平台控制台权限
///
///
///
public DescribePermissionResponse DescribePermissionSync(DescribePermissionRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DescribePermission");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 下载芯片订单的TID
///
///
///
public async Task DownloadTids(DownloadTidsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "DownloadTids");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 下载芯片订单的TID
///
///
///
public DownloadTidsResponse DownloadTidsSync(DownloadTidsRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "DownloadTids");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 上传硬件唯一标识码,是软加固设备身份参数。本接口如遇到错误数据,则所有当次上传数据失效。
///
///
///
public async Task UploadDeviceUniqueCode(UploadDeviceUniqueCodeRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "UploadDeviceUniqueCode");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 上传硬件唯一标识码,是软加固设备身份参数。本接口如遇到错误数据,则所有当次上传数据失效。
///
///
///
public UploadDeviceUniqueCodeResponse UploadDeviceUniqueCodeSync(UploadDeviceUniqueCodeRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "UploadDeviceUniqueCode");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 下载控制台验证芯片烧录信息,保证TID与中心信息一致
///
///
///
public async Task VerifyChipBurnInfo(VerifyChipBurnInfoRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = await this.InternalRequest(req, "VerifyChipBurnInfo");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
///
/// 下载控制台验证芯片烧录信息,保证TID与中心信息一致
///
///
///
public VerifyChipBurnInfoResponse VerifyChipBurnInfoSync(VerifyChipBurnInfoRequest req)
{
JsonResponseModel rsp = null;
try
{
var strResp = this.InternalRequestSync(req, "VerifyChipBurnInfo");
rsp = JsonConvert.DeserializeObject>(strResp);
}
catch (JsonSerializationException e)
{
throw new TencentCloudSDKException(e.Message);
}
return rsp.Response;
}
}
}