/* * 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.Solar.V20181011 { using Newtonsoft.Json; using System.Threading.Tasks; using TencentCloud.Common; using TencentCloud.Common.Profile; using TencentCloud.Solar.V20181011.Models; public class SolarClient : AbstractClient{ private const string endpoint = "solar.tencentcloudapi.com"; private const string version = "2018-10-11"; /// /// Client constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". public SolarClient(Credential credential, string region) : this(credential, region, new ClientProfile()) { } /// /// Client Constructor. /// /// Credentials. /// Region name, such as "ap-guangzhou". /// Client profiles. public SolarClient(Credential credential, string region, ClientProfile profile) : base(endpoint, version, credential, region, profile) { } /// /// 员工渠道更改员工状态 /// /// /// public async Task CheckStaffChUser(CheckStaffChUserRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CheckStaffChUser"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 员工渠道更改员工状态 /// /// /// public CheckStaffChUserResponse CheckStaffChUserSync(CheckStaffChUserRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CheckStaffChUser"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 复制活动渠道的策略 /// /// /// public async Task CopyActivityChannel(CopyActivityChannelRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CopyActivityChannel"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 复制活动渠道的策略 /// /// /// public CopyActivityChannelResponse CopyActivityChannelSync(CopyActivityChannelRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CopyActivityChannel"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 创建项目 /// /// /// public async Task CreateProject(CreateProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 创建项目 /// /// /// public CreateProjectResponse CreateProjectSync(CreateProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 创建子项目 /// /// /// public async Task CreateSubProject(CreateSubProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "CreateSubProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 创建子项目 /// /// /// public CreateSubProjectResponse CreateSubProjectSync(CreateSubProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "CreateSubProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除项目 /// /// /// public async Task DeleteProject(DeleteProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DeleteProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 删除项目 /// /// /// public DeleteProjectResponse DeleteProjectSync(DeleteProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DeleteProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 客户档案查询客户详情 /// /// /// public async Task DescribeCustomer(DescribeCustomerRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeCustomer"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 客户档案查询客户详情 /// /// /// public DescribeCustomerResponse DescribeCustomerSync(DescribeCustomerRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeCustomer"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 查询客户档案列表 /// /// /// public async Task DescribeCustomers(DescribeCustomersRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeCustomers"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 查询客户档案列表 /// /// /// public DescribeCustomersResponse DescribeCustomersSync(DescribeCustomersRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeCustomers"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 项目详情展示 /// /// /// public async Task DescribeProject(DescribeProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 项目详情展示 /// /// /// public DescribeProjectResponse DescribeProjectSync(DescribeProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 项目库存详情 /// /// /// public async Task DescribeProjectStock(DescribeProjectStockRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeProjectStock"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 项目库存详情 /// /// /// public DescribeProjectStockResponse DescribeProjectStockSync(DescribeProjectStockRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeProjectStock"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 项目列表展示 /// /// /// public async Task DescribeProjects(DescribeProjectsRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeProjects"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 项目列表展示 /// /// /// public DescribeProjectsResponse DescribeProjectsSync(DescribeProjectsRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeProjects"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 素材查询服务号模板的列表(样例) /// /// /// public async Task DescribeResourceTemplateHeaders(DescribeResourceTemplateHeadersRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeResourceTemplateHeaders"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 素材查询服务号模板的列表(样例) /// /// /// public DescribeResourceTemplateHeadersResponse DescribeResourceTemplateHeadersSync(DescribeResourceTemplateHeadersRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeResourceTemplateHeaders"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 子项目详情 /// /// /// public async Task DescribeSubProject(DescribeSubProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "DescribeSubProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 子项目详情 /// /// /// public DescribeSubProjectResponse DescribeSubProjectSync(DescribeSubProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeSubProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 把审批中的工单置为已失效 /// /// /// public async Task ExpireFlow(ExpireFlowRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ExpireFlow"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 把审批中的工单置为已失效 /// /// /// public ExpireFlowResponse ExpireFlowSync(ExpireFlowRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ExpireFlow"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改项目 /// /// /// public async Task ModifyProject(ModifyProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ModifyProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 修改项目 /// /// /// public ModifyProjectResponse ModifyProjectSync(ModifyProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ModifyProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 下线项目 /// /// /// public async Task OffLineProject(OffLineProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "OffLineProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 下线项目 /// /// /// public OffLineProjectResponse OffLineProjectSync(OffLineProjectRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "OffLineProject"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 补充子项目库存 /// /// /// public async Task ReplenishProjectStock(ReplenishProjectStockRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "ReplenishProjectStock"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 补充子项目库存 /// /// /// public ReplenishProjectStockResponse ReplenishProjectStockSync(ReplenishProjectStockRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "ReplenishProjectStock"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 发送企业微信触达任务 /// /// /// public async Task SendWxTouchTask(SendWxTouchTaskRequest req) { JsonResponseModel rsp = null; try { var strResp = await this.InternalRequest(req, "SendWxTouchTask"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } /// /// 发送企业微信触达任务 /// /// /// public SendWxTouchTaskResponse SendWxTouchTaskSync(SendWxTouchTaskRequest req) { JsonResponseModel rsp = null; try { var strResp = this.InternalRequestSync(req, "SendWxTouchTask"); rsp = JsonConvert.DeserializeObject>(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return rsp.Response; } } }