Skip to content

Commit 738c248

Browse files
author
coolli(李帅)
committed
release_3.0.5
1 parent 61e6b37 commit 738c248

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+610
-581
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?php
2+
/*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*/
20+
21+
namespace TencentCloud\Aai\V20180522;
22+
use TencentCloud\Common\AbstractClient;
23+
use TencentCloud\Common\Profile\ClientProfile;
24+
use TencentCloud\Common\Credential;
25+
use TencentCloud\Aai\V20180522\Models as Models;
26+
27+
/**
28+
* @method Models\SentenceRecognitionResponse SentenceRecognition(Models\SentenceRecognitionRequest $req) 识别60s内的短语音。
29+
*/
30+
31+
class AaiClient extends AbstractClient
32+
{
33+
/**
34+
* @var string 产品默认域名
35+
*/
36+
protected $endpoint = "aai.tencentcloudapi.com";
37+
38+
/**
39+
* @var string api版本号
40+
*/
41+
protected $version = "2018-05-22";
42+
43+
/**
44+
* CvmClient constructor.
45+
* @param Credential $credential 认证类实例
46+
* @param string $region 地域
47+
* @param ClientProfile $profile client配置
48+
*/
49+
function __construct($credential, $region, $profile=null)
50+
{
51+
parent::__construct($this->endpoint, $this->version, $credential, $region, $profile);
52+
}
53+
54+
public function returnResponse($action, $response)
55+
{
56+
$respClass = "TencentCloud"."\\".ucfirst("aai")."\\"."V20180522\\Models"."\\".ucfirst($action)."Response";
57+
$obj = new $respClass();
58+
$obj->deserialize($response);
59+
return $obj;
60+
}
61+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
<?php
2+
/*
3+
* Licensed to the Apache Software Foundation (ASF) under one
4+
* or more contributor license agreements. See the NOTICE file
5+
* distributed with this work for additional information
6+
* regarding copyright ownership. The ASF licenses this file
7+
* to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance
9+
* with the License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing,
14+
* software distributed under the License is distributed on an
15+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
* KIND, either express or implied. See the License for the
17+
* specific language governing permissions and limitations
18+
* under the License.
19+
*/
20+
namespace TencentCloud\Aai\V20180522\Models;
21+
use TencentCloud\Common\AbstractModel;
22+
23+
/**
24+
* @method integer getProjectId() 获取腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
25+
* @method void setProjectId(integer $ProjectId) 设置腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
26+
* @method integer getSubServiceType() 获取子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。
27+
* @method void setSubServiceType(integer $SubServiceType) 设置子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。
28+
* @method string getEngSerViceType() 获取引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。
29+
* @method void setEngSerViceType(string $EngSerViceType) 设置引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。
30+
* @method integer getSourceType() 获取语音数据来源。0:语音 URL;1:语音数据(post body)。
31+
* @method void setSourceType(integer $SourceType) 设置语音数据来源。0:语音 URL;1:语音数据(post body)。
32+
* @method string getUrl() 获取语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。
33+
* @method void setUrl(string $Url) 设置语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。
34+
* @method string getVoiceFormat() 获取识别音频的音频格式(支持mp3,wav)。
35+
* @method void setVoiceFormat(string $VoiceFormat) 设置识别音频的音频格式(支持mp3,wav)。
36+
* @method string getUsrAudioKey() 获取用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
37+
* @method void setUsrAudioKey(string $UsrAudioKey) 设置用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
38+
* @method string getData() 获取语音数据,当SourceType 值为1时必须填写,为0可不写。
39+
* @method void setData(string $Data) 设置语音数据,当SourceType 值为1时必须填写,为0可不写。
40+
* @method integer getDataLen() 获取数据长度,当 SourceType 值为1时必须填写,为0可不写。
41+
* @method void setDataLen(integer $DataLen) 设置数据长度,当 SourceType 值为1时必须填写,为0可不写。
42+
*/
43+
44+
/**
45+
*SentenceRecognition请求参数结构体
46+
*/
47+
class SentenceRecognitionRequest extends AbstractModel
48+
{
49+
/**
50+
* @var integer 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
51+
*/
52+
public $ProjectId;
53+
54+
/**
55+
* @var integer 子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。
56+
*/
57+
public $SubServiceType;
58+
59+
/**
60+
* @var string 引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。
61+
*/
62+
public $EngSerViceType;
63+
64+
/**
65+
* @var integer 语音数据来源。0:语音 URL;1:语音数据(post body)。
66+
*/
67+
public $SourceType;
68+
69+
/**
70+
* @var string 语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。
71+
*/
72+
public $Url;
73+
74+
/**
75+
* @var string 识别音频的音频格式(支持mp3,wav)。
76+
*/
77+
public $VoiceFormat;
78+
79+
/**
80+
* @var string 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
81+
*/
82+
public $UsrAudioKey;
83+
84+
/**
85+
* @var string 语音数据,当SourceType 值为1时必须填写,为0可不写。
86+
*/
87+
public $Data;
88+
89+
/**
90+
* @var integer 数据长度,当 SourceType 值为1时必须填写,为0可不写。
91+
*/
92+
public $DataLen;
93+
/**
94+
* @param integer $ProjectId 腾讯云项目 ID,可填 0,总长度不超过 1024 字节。
95+
* @param integer $SubServiceType 子服务类型。0:离线语音识别。1:实时流式识别,2,一句话识别。
96+
* @param string $EngSerViceType 引擎类型。8k:电话 8k 通用模型;16k:16k 通用模型。
97+
* @param integer $SourceType 语音数据来源。0:语音 URL;1:语音数据(post body)。
98+
* @param string $Url 语音 URL,公网可下载。当 SourceType 值为 0 时须填写该字段,为 1 时不填;URL 的长度大于 0,小于 2048。
99+
* @param string $VoiceFormat 识别音频的音频格式(支持mp3,wav)。
100+
* @param string $UsrAudioKey 用户端对此任务的唯一标识,用户自助生成,用于用户查找识别结果。
101+
* @param string $Data 语音数据,当SourceType 值为1时必须填写,为0可不写。
102+
* @param integer $DataLen 数据长度,当 SourceType 值为1时必须填写,为0可不写。
103+
*/
104+
function __construct()
105+
{
106+
107+
}
108+
/**
109+
* 内部实现,用户禁止调用
110+
*/
111+
public function deserialize($param)
112+
{
113+
if ($param === null) {
114+
return;
115+
}
116+
if (array_key_exists("ProjectId",$param) and $param["ProjectId"] !== null) {
117+
$this->ProjectId = $param["ProjectId"];
118+
}
119+
120+
if (array_key_exists("SubServiceType",$param) and $param["SubServiceType"] !== null) {
121+
$this->SubServiceType = $param["SubServiceType"];
122+
}
123+
124+
if (array_key_exists("EngSerViceType",$param) and $param["EngSerViceType"] !== null) {
125+
$this->EngSerViceType = $param["EngSerViceType"];
126+
}
127+
128+
if (array_key_exists("SourceType",$param) and $param["SourceType"] !== null) {
129+
$this->SourceType = $param["SourceType"];
130+
}
131+
132+
if (array_key_exists("Url",$param) and $param["Url"] !== null) {
133+
$this->Url = $param["Url"];
134+
}
135+
136+
if (array_key_exists("VoiceFormat",$param) and $param["VoiceFormat"] !== null) {
137+
$this->VoiceFormat = $param["VoiceFormat"];
138+
}
139+
140+
if (array_key_exists("UsrAudioKey",$param) and $param["UsrAudioKey"] !== null) {
141+
$this->UsrAudioKey = $param["UsrAudioKey"];
142+
}
143+
144+
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
145+
$this->Data = $param["Data"];
146+
}
147+
148+
if (array_key_exists("DataLen",$param) and $param["DataLen"] !== null) {
149+
$this->DataLen = $param["DataLen"];
150+
}
151+
}
152+
}

src/TencentCloud/Cvm/V20170312/Models/QueryMigrateTaskResponse.php src/TencentCloud/Aai/V20180522/Models/SentenceRecognitionResponse.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,32 @@
1717
* specific language governing permissions and limitations
1818
* under the License.
1919
*/
20-
namespace TencentCloud\Cvm\V20170312\Models;
20+
namespace TencentCloud\Aai\V20180522\Models;
2121
use TencentCloud\Common\AbstractModel;
2222

2323
/**
24-
* @method string getStatus() 获取任务状态
25-
* @method void setStatus(string $Status) 设置任务状态
24+
* @method string getResult() 获取识别结果。
25+
* @method void setResult(string $Result) 设置识别结果。
2626
* @method string getRequestId() 获取唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
2727
* @method void setRequestId(string $RequestId) 设置唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
2828
*/
2929

3030
/**
31-
*QueryMigrateTask返回参数结构体
31+
*SentenceRecognition返回参数结构体
3232
*/
33-
class QueryMigrateTaskResponse extends AbstractModel
33+
class SentenceRecognitionResponse extends AbstractModel
3434
{
3535
/**
36-
* @var string 任务状态
36+
* @var string 识别结果。
3737
*/
38-
public $Status;
38+
public $Result;
3939

4040
/**
4141
* @var string 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
4242
*/
4343
public $RequestId;
4444
/**
45-
* @param string $Status 任务状态
45+
* @param string $Result 识别结果。
4646
* @param string $RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
4747
*/
4848
function __construct()
@@ -57,8 +57,8 @@ public function deserialize($param)
5757
if ($param === null) {
5858
return;
5959
}
60-
if (array_key_exists("Status",$param) and $param["Status"] !== null) {
61-
$this->Status = $param["Status"];
60+
if (array_key_exists("Result",$param) and $param["Result"] !== null) {
61+
$this->Result = $param["Result"];
6262
}
6363

6464
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {

src/TencentCloud/Batch/V20170312/BatchClient.php

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
* @method Models\SubmitJobResponse SubmitJob(Models\SubmitJobRequest $req) 用于提交一个作业
4949
* @method Models\TerminateComputeNodeResponse TerminateComputeNode(Models\TerminateComputeNodeRequest $req) 用于销毁计算节点。
5050
对于状态为CREATED、CREATION_FAILED、RUNNING和ABNORMAL的节点,允许销毁处理。
51+
* @method Models\TerminateComputeNodesResponse TerminateComputeNodes(Models\TerminateComputeNodesRequest $req) 用于批量销毁计算节点,不允许重复销毁同一个节点。
5152
* @method Models\TerminateJobResponse TerminateJob(Models\TerminateJobRequest $req) 用于终止作业。
5253
终止作业的效果相当于所含的所有任务实例进行TerminateTaskInstance操作。具体效果和用法可参考TerminateTaskInstance。
5354
* @method Models\TerminateTaskInstanceResponse TerminateTaskInstance(Models\TerminateTaskInstanceRequest $req) 用于终止任务实例

src/TencentCloud/Batch/V20170312/Models/ComputeNode.php

+24
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
* @method void setTaskInstanceNumAvailable(integer $TaskInstanceNumAvailable) 设置计算节点运行 TaskInstance 可用容量。0表示计算节点忙碌。
3838
* @method string getAgentVersion() 获取Batch Agent 版本
3939
* @method void setAgentVersion(string $AgentVersion) 设置Batch Agent 版本
40+
* @method array getPrivateIpAddresses() 获取实例内网IP
41+
* @method void setPrivateIpAddresses(array $PrivateIpAddresses) 设置实例内网IP
42+
* @method array getPublicIpAddresses() 获取实例公网IP
43+
* @method void setPublicIpAddresses(array $PublicIpAddresses) 设置实例公网IP
4044
*/
4145

4246
/**
@@ -83,6 +87,16 @@ class ComputeNode extends AbstractModel
8387
* @var string Batch Agent 版本
8488
*/
8589
public $AgentVersion;
90+
91+
/**
92+
* @var array 实例内网IP
93+
*/
94+
public $PrivateIpAddresses;
95+
96+
/**
97+
* @var array 实例公网IP
98+
*/
99+
public $PublicIpAddresses;
86100
/**
87101
* @param string $ComputeNodeId 计算节点ID
88102
* @param string $ComputeNodeInstanceId 计算节点实例ID,对于CVM场景,即为CVM的InstanceId
@@ -92,6 +106,8 @@ class ComputeNode extends AbstractModel
92106
* @param string $ResourceCreatedTime 资源创建完成时间
93107
* @param integer $TaskInstanceNumAvailable 计算节点运行 TaskInstance 可用容量。0表示计算节点忙碌。
94108
* @param string $AgentVersion Batch Agent 版本
109+
* @param array $PrivateIpAddresses 实例内网IP
110+
* @param array $PublicIpAddresses 实例公网IP
95111
*/
96112
function __construct()
97113
{
@@ -136,5 +152,13 @@ public function deserialize($param)
136152
if (array_key_exists("AgentVersion",$param) and $param["AgentVersion"] !== null) {
137153
$this->AgentVersion = $param["AgentVersion"];
138154
}
155+
156+
if (array_key_exists("PrivateIpAddresses",$param) and $param["PrivateIpAddresses"] !== null) {
157+
$this->PrivateIpAddresses = $param["PrivateIpAddresses"];
158+
}
159+
160+
if (array_key_exists("PublicIpAddresses",$param) and $param["PublicIpAddresses"] !== null) {
161+
$this->PublicIpAddresses = $param["PublicIpAddresses"];
162+
}
139163
}
140164
}

src/TencentCloud/Batch/V20170312/Models/DescribeJobResponse.php

+12
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
* @method void setTaskMetrics(TaskMetrics $TaskMetrics) 设置任务统计指标
4444
* @method TaskInstanceView getTaskInstanceMetrics() 获取任务实例统计指标
4545
* @method void setTaskInstanceMetrics(TaskInstanceView $TaskInstanceMetrics) 设置任务实例统计指标
46+
* @method string getStateReason() 获取作业失败原因
47+
* @method void setStateReason(string $StateReason) 设置作业失败原因
4648
* @method string getRequestId() 获取唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
4749
* @method void setRequestId(string $RequestId) 设置唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
4850
*/
@@ -107,6 +109,11 @@ class DescribeJobResponse extends AbstractModel
107109
*/
108110
public $TaskInstanceMetrics;
109111

112+
/**
113+
* @var string 作业失败原因
114+
*/
115+
public $StateReason;
116+
110117
/**
111118
* @var string 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
112119
*/
@@ -123,6 +130,7 @@ class DescribeJobResponse extends AbstractModel
123130
* @param array $DependenceSet 任务间依赖信息
124131
* @param TaskMetrics $TaskMetrics 任务统计指标
125132
* @param TaskInstanceView $TaskInstanceMetrics 任务实例统计指标
133+
* @param string $StateReason 作业失败原因
126134
* @param string $RequestId 唯一请求ID,每次请求都会返回。定位问题时需要提供该次请求的RequestId。
127135
*/
128136
function __construct()
@@ -193,6 +201,10 @@ public function deserialize($param)
193201
$this->TaskInstanceMetrics->deserialize($param["TaskInstanceMetrics"]);
194202
}
195203

204+
if (array_key_exists("StateReason",$param) and $param["StateReason"] !== null) {
205+
$this->StateReason = $param["StateReason"];
206+
}
207+
196208
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
197209
$this->RequestId = $param["RequestId"];
198210
}

src/TencentCloud/Batch/V20170312/Models/Filter.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
> * 若存在多个`Filter`时,`Filter`间的关系为逻辑与(`AND`)关系。
3333
> * 若同一个`Filter`存在多个`Values`,同一`Filter`下`Values`间的关系为逻辑或(`OR`)关系。
3434
>
35-
> 以[DescribeInstances](/document/api/213/9388)接口的`Filter`为例。若我们需要查询可用区(`zone`)为广州一区 ***并且*** 实例计费模式(`instance-charge-type`)为包年包月 ***或者*** 按量计费的实例时,可如下实现:
35+
> 以[DescribeInstances](https://cloud.tencent.com/document/api/213/9388)接口的`Filter`为例。若我们需要查询可用区(`zone`)为广州一区 ***并且*** 实例计费模式(`instance-charge-type`)为包年包月 ***或者*** 按量计费的实例时,可如下实现:
3636
```
37-
Filters.1.Name=zone
38-
&Filters.1.Values.1=ap-guangzhou-1
39-
&Filters.2.Name=instance-charge-type
40-
&Filters.2.Values.1=PREPAID
41-
&Filters.3.Values.2=POSTPAID_BY_HOUR
37+
Filters.0.Name=zone
38+
&Filters.0.Values.0=ap-guangzhou-1
39+
&Filters.1.Name=instance-charge-type
40+
&Filters.1.Values.0=PREPAID
41+
&Filters.1.Values.1=POSTPAID_BY_HOUR
4242
```
4343
*/
4444
class Filter extends AbstractModel

0 commit comments

Comments
 (0)