This commit is contained in:
Your Name
2026-03-27 18:06:12 +08:00
parent 9160c36735
commit 099bc1dd22
645 changed files with 276473 additions and 957 deletions
+2 -1
View File
@@ -16,7 +16,7 @@ return array(
'WpOrg\\Requests\\' => array($vendorDir . '/rmccue/requests/src'),
'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
'TheNorthMemory\\Xml\\' => array($vendorDir . '/thenorthmemory/xml/src'),
'TencentCloud\\' => array($vendorDir . '/tencentcloud/common/src/TencentCloud', $vendorDir . '/tencentcloud/sms/src/TencentCloud'),
'TencentCloud\\' => array($vendorDir . '/tencentcloud/common/src/TencentCloud', $vendorDir . '/tencentcloud/sms/src/TencentCloud', $vendorDir . '/tencentcloud/trtc/src/TencentCloud'),
'Symfony\\Polyfill\\Php81\\' => array($vendorDir . '/symfony/polyfill-php81'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
@@ -45,6 +45,7 @@ return array(
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'),
'Overtrue\\Socialite\\' => array($vendorDir . '/overtrue/socialite/src'),
'Overtrue\\Pinyin\\' => array($vendorDir . '/overtrue/pinyin/src'),
'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'),
'Nyholm\\Psr7Server\\' => array($vendorDir . '/nyholm/psr7-server/src'),
+6
View File
@@ -101,6 +101,7 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
'O' =>
array (
'Overtrue\\Socialite\\' => 19,
'Overtrue\\Pinyin\\' => 16,
'OSS\\' => 4,
),
'N' =>
@@ -194,6 +195,7 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
array (
0 => __DIR__ . '/..' . '/tencentcloud/common/src/TencentCloud',
1 => __DIR__ . '/..' . '/tencentcloud/sms/src/TencentCloud',
2 => __DIR__ . '/..' . '/tencentcloud/trtc/src/TencentCloud',
),
'Symfony\\Polyfill\\Php81\\' =>
array (
@@ -308,6 +310,10 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e
array (
0 => __DIR__ . '/..' . '/overtrue/socialite/src',
),
'Overtrue\\Pinyin\\' =>
array (
0 => __DIR__ . '/..' . '/overtrue/pinyin/src',
),
'OSS\\' =>
array (
0 => __DIR__ . '/..' . '/aliyuncs/oss-sdk-php/src/OSS',
+123
View File
@@ -1861,6 +1861,83 @@
],
"install-path": "../nyholm/psr7-server"
},
{
"name": "overtrue/pinyin",
"version": "6.0.1",
"version_normalized": "6.0.1.0",
"source": {
"type": "git",
"url": "https://github.com/overtrue/pinyin.git",
"reference": "d79364f289f5ccdabdd3142556d4254c7574f87c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/overtrue/pinyin/zipball/d79364f289f5ccdabdd3142556d4254c7574f87c",
"reference": "d79364f289f5ccdabdd3142556d4254c7574f87c",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"require-dev": {
"brainmaestro/composer-git-hooks": "^3.0",
"laravel/pint": "^1.10",
"nunomaduro/termwind": "^1.0 || ^2.0",
"phpunit/phpunit": "^10.5 || ^11.5 || ^12.0"
},
"time": "2026-03-06T13:15:43+00:00",
"bin": [
"bin/pinyin"
],
"type": "library",
"extra": {
"hooks": {
"pre-push": [
"composer pint",
"composer test"
],
"pre-commit": [
"composer pint",
"composer test"
]
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Overtrue\\Pinyin\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "overtrue",
"email": "anzhengchao@gmail.com",
"homepage": "http://github.com/overtrue"
}
],
"description": "Chinese to pinyin translator.",
"homepage": "https://github.com/overtrue/pinyin",
"keywords": [
"Chinese",
"Pinyin",
"cn2pinyin"
],
"support": {
"issues": "https://github.com/overtrue/pinyin/issues",
"source": "https://github.com/overtrue/pinyin/tree/6.0.1"
},
"funding": [
{
"url": "https://github.com/overtrue",
"type": "github"
}
],
"install-path": "../overtrue/pinyin"
},
{
"name": "overtrue/socialite",
"version": "4.8.1",
@@ -4559,6 +4636,52 @@
},
"install-path": "../tencentcloud/sms"
},
{
"name": "tencentcloud/trtc",
"version": "3.0.990",
"version_normalized": "3.0.990.0",
"source": {
"type": "git",
"url": "https://github.com/tencentcloud-sdk-php/trtc.git",
"reference": "bd4722704c2ee8f53018238848c07fec54d3d8ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/tencentcloud-sdk-php/trtc/zipball/bd4722704c2ee8f53018238848c07fec54d3d8ce",
"reference": "bd4722704c2ee8f53018238848c07fec54d3d8ce",
"shasum": ""
},
"require": {
"tencentcloud/common": "3.0.990"
},
"time": "2023-10-09T00:53:31+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"TencentCloud\\": "./src/TencentCloud"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "tencentcloudapi",
"email": "tencentcloudapi@tencent.com",
"homepage": "https://github.com/tencentcloud-sdk-php/trtc",
"role": "Developer"
}
],
"description": "TencentCloudApi php sdk trtc",
"homepage": "https://github.com/tencentcloud-sdk-php/trtc",
"support": {
"issues": "https://github.com/tencentcloud-sdk-php/trtc/issues",
"source": "https://github.com/tencentcloud-sdk-php/trtc/tree/3.0.990"
},
"install-path": "../tencentcloud/trtc"
},
{
"name": "thenorthmemory/xml",
"version": "1.1.1",
+24 -6
View File
@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'topthink/think',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'c0664f047398025141f03a0ddd52851637986cce',
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -223,6 +223,15 @@
'aliases' => array(),
'dev_requirement' => false,
),
'overtrue/pinyin' => array(
'pretty_version' => '6.0.1',
'version' => '6.0.1.0',
'reference' => 'd79364f289f5ccdabdd3142556d4254c7574f87c',
'type' => 'library',
'install_path' => __DIR__ . '/../overtrue/pinyin',
'aliases' => array(),
'dev_requirement' => false,
),
'overtrue/socialite' => array(
'pretty_version' => '4.8.1',
'version' => '4.8.1.0',
@@ -595,6 +604,15 @@
'aliases' => array(),
'dev_requirement' => false,
),
'tencentcloud/trtc' => array(
'pretty_version' => '3.0.990',
'version' => '3.0.990.0',
'reference' => 'bd4722704c2ee8f53018238848c07fec54d3d8ce',
'type' => 'library',
'install_path' => __DIR__ . '/../tencentcloud/trtc',
'aliases' => array(),
'dev_requirement' => false,
),
'thenorthmemory/xml' => array(
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
@@ -614,9 +632,9 @@
'dev_requirement' => false,
),
'topthink/think' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => 'c0664f047398025141f03a0ddd52851637986cce',
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
+2 -2
View File
@@ -4,8 +4,8 @@
$issues = array();
if (!(PHP_VERSION_ID >= 80002)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.0.2". You are running ' . PHP_VERSION . '.';
if (!(PHP_VERSION_ID >= 80100)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
+1
View File
@@ -0,0 +1 @@
github: [overtrue]
+12
View File
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: phpunit/phpunit
versions:
- ">= 8.a, < 9"
@@ -0,0 +1,29 @@
name: Test
on: [push, pull_request]
jobs:
phpunit:
name: PHP-${{ matrix.php_version }}-${{ matrix.prefer }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php_version:
- 8.1
- 8.2
- 8.3
- 8.4
- 8.5
prefer:
- stable
- lowest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
coverage: none
- name: Install Dependencies
run: composer update --prefer-dist --no-interaction --prefer-${{ matrix.prefer }}
- name: Run PHPUnit
run: ./vendor/bin/phpunit
+212
View File
@@ -0,0 +1,212 @@
## [6.0.0] - 2025-09-09
### 🚀 Major Features
- **性能优化策略系统**: 全新的转换策略架构,针对不同使用场景提供最优性能
- **内存优化策略** (Memory Optimized): 占用 ~400KB 内存,适合 Web 请求和内存受限环境
- **缓存策略** (Cached): 占用 ~4MB 内存,重复转换性能提升 2-3 倍,适合批处理任务
- **智能策略** (Smart): 占用 600KB-1.5MB 内存,根据文本复杂度自适应加载
- **ConverterFactory**: 新的工厂模式管理转换器实例和策略选择
- **自动策略选择**: 根据运行环境(Web/CLI/内存限制)自动推荐最佳策略
- **性能基准测试工具**: 内置的策略性能对比和监控工具
- **内存监控**: 支持实时监控内存使用情况和性能指标
### 🔧 API Changes
- 新增 `Pinyin::useMemoryOptimized()` - 切换到内存优化策略
- 新增 `Pinyin::useCached()` - 切换到缓存策略
- 新增 `Pinyin::useSmart()` - 切换到智能策略
- 新增 `Pinyin::useAutoStrategy()` - 自动选择最佳策略
- 新增 `Pinyin::clearCache()` - 清理所有转换器缓存
- 新增 `ConverterFactory::make($strategy)` - 创建指定策略的转换器
- 新增 `ConverterFactory::recommend()` - 获取推荐策略
- 新增 `ConverterFactory::getStrategiesInfo()` - 获取所有策略信息
### ⚡ Performance Improvements
- **内存使用优化**: 默认内存占用从 ~4MB 降低到 ~400KB
- **转换速度提升**: 缓存策略下重复转换速度提升 2-3 倍
- **智能加载**: 根据文本复杂度动态调整数据加载策略
- **按需加载**: 内存优化策略仅在需要时加载转换数据
### 📊 Benchmark & Monitoring
- 新增 `php benchmark/run.php` - 运行性能基准测试
- 新增 `php benchmark/compare-strategies.php` - 策略对比测试
- 新增基准测试文档 `docs/benchmark-guide.md`
- 支持内存使用情况实时监控
#### 运行基准测试
```bash
# 运行标准基准测试,显示所有方法的性能表现
php benchmark/run.php
# 详细的策略对比测试,对比三种策略的性能差异
php benchmark/compare-strategies.php
```
基准测试会显示:
- 每种策略的执行时间和内存使用情况
- 不同文本长度下的性能表现
- 策略之间的性能对比和推荐场景
### 🔄 Breaking Changes
- **默认策略变更**: 从全缓存改为内存优化策略,降低默认内存占用
- **转换器架构重构**: 引入策略模式,旧的直接实例化转换器方式仍兼容
- **性能特征变化**: 首次转换可能略慢,但内存占用显著降低
### 🔧 Backward Compatibility
- 完全兼容 5.x API,现有代码无需修改即可使用
- `heteronym()` 方法(5.3.3+ 引入)继续保持兼容
- 所有原有的转换方法 (`sentence`, `phrase`, `chars` 等) 保持不变
### 📚 Documentation
- 更新 README.md 增加性能优化策略说明
- 新增性能对比表格和使用建议
- 新增基准测试指南
- 新增性能优化最佳实践
### 🔧 Development Tools
- 新增性能基准测试脚本
- 新增策略对比工具
- 增强命令行工具支持策略选择
### 🛠️ Migration Guide
从 5.x 升级到 6.0 非常简单,所有现有代码都能正常工作:
#### 无需任何修改(推荐)
```php
// 5.x 和 6.x 都能正常工作
Pinyin::sentence('你好世界');
// 6.x 默认使用内存优化策略,内存占用更低
```
#### 保持 5.x 完全相同的性能特征
```php
// 如果你需要与 5.x 完全相同的高性能(高内存占用)
Pinyin::useCached(); // 一次设置,全局生效
Pinyin::sentence('你好世界');
```
#### 使用新的性能优化特性
```php
// 自动选择最佳策略(推荐用于新项目)
Pinyin::useAutoStrategy();
// 或者根据场景手动选择:
// Web 应用(内存受限)
Pinyin::useMemoryOptimized();
// 批处理任务(性能优先)
Pinyin::useCached();
// 通用场景(平衡)
Pinyin::useSmart();
```
#### 性能监控和优化
```php
// 监控内存使用
$initialMemory = memory_get_usage();
$result = Pinyin::sentence('测试文本');
$memoryUsed = memory_get_usage() - $initialMemory;
echo "内存使用: " . round($memoryUsed / 1024, 2) . " KB";
// 批处理完成后清理缓存
Pinyin::useCached();
// ... 批量处理 ...
Pinyin::clearCache(); // 释放内存
```
### 💡 Performance Comparison
| 策略 | 内存占用 | 首次转换 | 重复转换 | 推荐场景 |
|-----|---------|---------|---------|---------|
| Memory Optimized | ~400KB | 中等 | 中等 | Web 请求、内存受限环境 |
| Cached | ~4MB | 慢 | **最快** (2-3x) | 批处理、长时运行进程 |
| Smart | 600KB-1.5MB | 快 | 快 | 通用场景、自动优化 |
基于 1000 次转换的基准测试结果:
| 文本长度 | Memory Optimized | Cached | Smart |
|---------|-----------------|--------|-------|
| 短文本 (<10字) | 1.2ms | 0.5ms | 0.8ms |
| 中等文本 (10-50字) | 3.5ms | 1.2ms | 2.1ms |
| 长文本 (>100字) | 8.7ms | 3.1ms | 5.2ms |
## [5.3.4] - 2025-03-16
### 🚀 Features
- Resolved #211
### ⚙️ Miscellaneous Tasks
- Format
## [5.3.3] - 2024-08-01
### 🚀 Features
- 使用 heteronym 代替 polyphonic 多音字 #184
- 取首字母时,能否保留完整的英文 #199
### 🐛 Bug Fixes
- 修复 琢 的音频顺序 #207
- 补充案例 #207
- Tests
- Tests
## [5.3.2] - 2024-03-19
### 🚀 Features
- 取首字母时,能否保留完整的英文 #199
## [5.3.1] - 2024-03-19
### 🐛 Bug Fixes
- 「仆区」应该读 pú ōu 而非 pú qū #200
- Tests #200
## [5.3.0] - 2023-10-27
### 🚀 Features
- 添加sentenceFull,支持保留其他字符 (#198)
- Full sentence, #198
## [5.2.2] - 2023-09-27
### ⚙️ Miscellaneous Tasks
- Bin
## [5.2.1] - 2023-06-17
### 🐛 Bug Fixes
- Bin
## [5.2.0] - 2023-06-12
### 🚀 Features
- 增加 Pinyin::polyphonesAsArray. fixed #195
### 📚 Documentation
- 更新文档提示
- 更新文档提示
- 更新文档提示
## [5.1.0] - 2023-04-27
### 💼 Other
- 移除错误语法 (#190)
## [5.0.0] - 2022-07-24
### 🐛 Bug Fixes
- 优化符号匹配规则
## [1.0-beta] - 2014-07-16
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 安正超
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+528
View File
@@ -0,0 +1,528 @@
# Pinyin
[![Test](https://github.com/overtrue/pinyin/actions/workflows/test.yml/badge.svg)](https://github.com/overtrue/pinyin/actions/workflows/test.yml)
[![Latest Stable Version](https://poser.pugx.org/overtrue/pinyin/v/stable.svg)](https://packagist.org/packages/overtrue/pinyin) [![Total Downloads](https://poser.pugx.org/overtrue/pinyin/downloads.svg)](https://packagist.org/packages/overtrue/pinyin) [![Latest Unstable Version](https://poser.pugx.org/overtrue/pinyin/v/unstable.svg)](https://packagist.org/packages/overtrue/pinyin) [![License](https://poser.pugx.org/overtrue/pinyin/license.svg)](https://packagist.org/packages/overtrue/pinyin)
:cn: 基于 [mozillazg/pinyin-data](https://github.com/mozillazg/pinyin-data) 词典的中文转拼音工具,更准确的支持多音字的汉字转拼音解决方案。
[喜欢我的项目?点击这里支持我](https://github.com/sponsors/overtrue)
## 特性
- 准确的多音字支持
- 多种拼音风格(声调符号、数字声调、无声调)
- 支持姓氏识别
- 灵活的性能优化策略
- 内存友好的设计
- 完善的测试覆盖
## 安装
使用 Composer 安装:
```bash
composer require overtrue/pinyin:^6.0
```
## 使用
### 拼音风格
除了获取首字母的方法外,所有方法都支持第二个参数,用于指定拼音的格式,可选值为:
- `symbol` (默认)声调符号,例如 `pīn yīn`
- `none` 不输出声调,例如 `pin yin`
- `number` 末尾数字模式的拼音,例如 `pin1 yin1`
你可以使用字符串值或者 `ToneStyle` 枚举:
```php
use Overtrue\Pinyin\Pinyin;
use Overtrue\Pinyin\ToneStyle;
// 使用字符串
echo Pinyin::sentence('你好', 'none'); // ni hao
echo Pinyin::sentence('你好', 'number'); // ni3 hao3
echo Pinyin::sentence('你好', 'symbol'); // nǐ hǎo
// 使用枚举(推荐)
echo Pinyin::sentence('你好', ToneStyle::NONE); // ni hao
echo Pinyin::sentence('你好', ToneStyle::NUMBER); // ni3 hao3
echo Pinyin::sentence('你好', ToneStyle::SYMBOL); // nǐ hǎo
```
### 返回值
除了 `permalink` 返回字符串外,其它方法都返回集合类型 [`Overtrue\Pinyin\Collection`](https://github.com/overtrue/pinyin/blob/master/src/Collection.php)
```php
use Overtrue\Pinyin\Pinyin;
$pinyin = Pinyin::sentence('你好,世界');
```
你可以通过以下方式访问集合内容:
```php
echo $pinyin; // nǐ hǎo shì jiè
// 直接将对象转成字符串
$string = (string) $pinyin; // nǐ hǎo shì jiè
$pinyin->toArray(); // ['nǐ', 'hǎo', 'shì', 'jiè']
// 直接使用索引访问
$pinyin[0]; // 'nǐ'
// 使用函数遍历
$pinyin->map('ucfirst'); // ['Nǐ', 'Hǎo', 'Shì', 'Jiè']
// 拼接为字符串
$pinyin->join(' '); // 'nǐ hǎo shì jiè'
$pinyin->join('-'); // 'nǐ-hǎo-shì-jiè'
// 转成 json
$pinyin->toJson(); // '["nǐ","hǎo","shì","jiè"]'
json_encode($pinyin); // '["nǐ","hǎo","shì","jiè"]'
```
### 文字段落转拼音
```php
use Overtrue\Pinyin\Pinyin;
use Overtrue\Pinyin\ToneStyle;
echo Pinyin::sentence('带着希望去旅行,比到达终点更美好');
// dài zhe xī wàng qù lǚ xíng bǐ dào dá zhōng diǎn gèng měi hǎo
// 去除声调
echo Pinyin::sentence('带着希望去旅行,比到达终点更美好', ToneStyle::NONE);
// dai zhe xi wang qu lv xing bi dao da zhong dian geng mei hao
// 保留所有非汉字字符
echo Pinyin::fullSentence('ル是片假名,π是希腊字母', ToneStyle::NONE);
// ル shi pian jia ming ,π shi xi la zi mu
```
### 生成用于链接的拼音字符串
通常用于文章链接等,可以使用 `permalink` 方法获取拼音字符串:
```php
echo Pinyin::permalink('带着希望去旅行'); // dai-zhe-xi-wang-qu-lyu-xing
echo Pinyin::permalink('带着希望去旅行', '.'); // dai.zhe.xi.wang.qu.lyu.xing
```
### 获取首字符字符串
通常用于创建搜索用的索引,可以使用 `abbr` 方法转换:
```php
Pinyin::abbr('带着希望去旅行'); // ['d', 'z', 'x', 'w', 'q', 'l', 'x']
echo Pinyin::abbr('带着希望去旅行')->join('-'); // d-z-x-w-q-l-x
echo Pinyin::abbr('你好2018')->join(''); // nh2018
echo Pinyin::abbr('Happy New Year! 2018')->join(''); // HNY2018
// 保留原字符串的英文单词
echo Pinyin::abbr('CGV电影院', false, true)->join(''); // CGVdyy
```
**姓名首字母**
将首字作为姓氏转换,其余作为普通词语转换:
```php
Pinyin::nameAbbr('欧阳'); // ['o', 'y']
echo Pinyin::nameAbbr('单单单')->join('-'); // s-d-d
```
### 姓名转换
姓名的姓的读音有些与普通字不一样,比如 ‘单’ 常见的音为 `dan`,而作为姓的时候读 `shan`
```php
Pinyin::name('单某某'); // ['shàn', 'mǒu', 'mǒu']
Pinyin::name('单某某', 'none'); // ['shan', 'mou', 'mou']
Pinyin::name('单某某', 'none')->join('-'); // shan-mou-mou
```
### 护照姓名转换
根据国家规定 [关于中国护照旅行证上姓名拼音 ü(吕、律、闾、绿、女等)统一拼写为 YU 的提醒](http://sg.china-embassy.gov.cn/lsfw/zghz1/hzzxdt/201501/t20150122_2022198.htm) 的规则,将 `ü` 转换为 `yu`
```php
Pinyin::passportName('吕小布'); // ['lyu', 'xiao', 'bu']
Pinyin::passportName('女小花'); // ['nyu', 'xiao', 'hua']
Pinyin::passportName('律师'); // ['lyu', 'shi']
```
### 多音字
多音字的返回值为关联数组的集合,默认返回去重后的所有读音:
```php
$pinyin = Pinyin::heteronym('重庆');
$pinyin['重']; // ["zhòng", "chóng", "tóng"]
$pinyin['庆']; // ["qìng"]
$pinyin->toArray();
// [
// "重": ["zhòng", "chóng", "tóng"],
// "庆": ["qìng"]
// ]
```
如果不想要去重,可以数组形式返回:
```php
$pinyin = Pinyin::heteronym('重庆重庆', ToneStyle::SYMBOL, true);
// or
$pinyin = Pinyin::heteronymAsList('重庆重庆', ToneStyle::SYMBOL);
$pinyin->toArray();
// [
// ["重" => ["zhòng", "chóng", "tóng"]],
// ["庆" => ["qìng"]],
// ["重" => ["zhòng", "chóng", "tóng"]],
// ["庆" => ["qìng"]]
// ]
```
### 单字转拼音
和多音字类似,单字的返回值为字符串,多音字将根据该字字频调整得到常用音:
```php
$pinyin = Pinyin::chars('重庆');
echo $pinyin['重']; // "zhòng"
echo $pinyin['庆']; // "qìng"
$pinyin->toArray();
// [
// "重": "zhòng",
// "庆": "qìng"
// ]
```
> **Warning**
>
> 当单字处理时由于多音字来自词频表中取得常用音,所以在词语环境下可能出现不正确的情况,建议使用多音字处理。
## 性能优化策略 🚀
v6.0+ 版本提供了三种不同的转换策略,以适应不同的使用场景:
### 1. 内存优化策略(Memory Optimized- 默认
- **内存占用**~400KB
- **适用场景**:Web 请求、内存受限环境
- **特点**:每次加载一个词典段,用完即释放
```php
use Overtrue\Pinyin\Pinyin;
// 使用内存优化策略(默认)
Pinyin::useMemoryOptimized();
$result = Pinyin::sentence('你好世界');
echo $result; // nǐ hǎo shì jiè
```
### 2. 缓存策略(Cached
- **内存占用**~4MB
- **适用场景**:批处理、长时运行进程
- **特点**:缓存所有词典数据,重复转换速度提升 2-3 倍
```php
// 使用缓存策略
Pinyin::useCached();
// 批量处理时性能更好
foreach ($largeDataset as $text) {
$result = Pinyin::sentence($text);
echo $result . "\n";
}
// 清理缓存(可选)
\Overtrue\Pinyin\Converters\CachedConverter::clearCache();
```
### 3. 智能策略(Smart
- **内存占用**600KB-1.5MB
- **适用场景**:通用场景、自动优化
- **特点**:根据文本长度智能选择加载策略
```php
// 使用智能策略
Pinyin::useSmart();
// 短文本自动优化
$result1 = Pinyin::sentence('你好'); // 跳过长词词典
echo $result1; // nǐ hǎo
// 长文本自动调整
$result2 = Pinyin::sentence($longText); // 加载必要的词典
echo $result2;
```
### 自动选择策略
```php
// 根据运行环境自动选择最佳策略
Pinyin::useAutoStrategy();
// 获取推荐策略信息
$recommended = \Overtrue\Pinyin\ConverterFactory::recommend();
echo "推荐策略: {$recommended}";
```
### 直接使用 Converter
```php
use Overtrue\Pinyin\ConverterFactory;
// 创建特定策略的转换器
$converter = ConverterFactory::make('cached');
$result = $converter->convert('你好世界');
echo $result; // nǐ hǎo shì jiè
// 监控内存使用情况
$initialMemory = memory_get_usage();
$converter->convert('测试文本');
$memoryGrowth = memory_get_usage() - $initialMemory;
echo "内存增长: " . round($memoryGrowth / 1024, 2) . " KB";
```
### 性能对比
| 策略 | 内存占用 | 首次转换 | 重复转换 | 推荐场景 |
|-----|---------|---------|---------|---------|
| Memory Optimized | ~400KB | 中等 | 中等 | Web 请求 |
| Cached | ~4MB | 慢 | **最快** | 批处理 |
| Smart | 600KB-1.5MB | 快 | 快 | 通用场景 |
运行基准测试查看实际性能:
```bash
# 运行标准基准测试
php benchmark/run.php
# 详细的策略对比测试
php benchmark/compare-strategies.php
```
## 性能优化最佳实践
### 选择合适的策略
根据您的使用场景选择最合适的转换策略:
#### Web 应用(Laravel、Symfony 等)
```php
// 在应用启动时设置
Pinyin::useMemoryOptimized(); // 默认策略,内存占用最小
// 或在 ServiceProvider 中配置
public function boot()
{
Pinyin::useMemoryOptimized();
}
```
#### CLI 批处理脚本
```php
// 处理大量数据时使用缓存策略
Pinyin::useCached();
$results = [];
foreach ($thousandsOfTexts as $text) {
$results[] = Pinyin::sentence($text);
}
// 处理完成后清理缓存
\Overtrue\Pinyin\Converters\CachedConverter::clearCache();
```
#### 队列任务处理
```php
class ConvertPinyinJob implements ShouldQueue
{
public function handle()
{
// 队列任务中使用智能策略
Pinyin::useSmart();
// 处理任务...
}
}
```
### 性能监控
```php
use Overtrue\Pinyin\ConverterFactory;
// 监控不同策略的内存使用情况
$strategies = ['memory', 'cached', 'smart'];
foreach ($strategies as $strategy) {
$converter = ConverterFactory::make($strategy);
$initialMemory = memory_get_usage();
$converter->convert('测试文本');
$memoryGrowth = memory_get_usage() - $initialMemory;
echo "策略: {$strategy}, 内存增长: " . round($memoryGrowth / 1024, 2) . " KB" . PHP_EOL;
}
```
### 基准测试
项目提供了多个基准测试工具:
```bash
# 运行标准基准测试
php benchmark/run.php
# 详细的策略对比
php benchmark/compare-strategies.php
```
基准测试会显示不同策略的性能对比,包括:
- 内存使用情况
- 转换速度
- 不同文本长度的性能表现
### 内存管理建议
1. **生产环境**:使用 `Memory Optimized` 策略,避免内存泄漏
2. **开发环境**:可以使用 `Smart` 策略,平衡性能和内存
3. **批处理任务**:使用 `Cached` 策略,处理完成后调用 `clearCache()`
4. **内存受限环境**:严格使用 `Memory Optimized` 策略
### 性能对比数据
基于 1000 次转换的基准测试结果:
| 场景 | Memory Optimized | Cached | Smart |
|-----|-----------------|--------|-------|
| 短文本(<10字) | 1.2ms | 0.5ms | 0.8ms |
| 中等文本(10-50字) | 3.5ms | 1.2ms | 2.1ms |
| 长文本(>100字) | 8.7ms | 3.1ms | 5.2ms |
| 内存占用 | 400KB | 4MB | 1.5MB |
> 💡 **提示**:缓存策略在重复转换时性能提升约 2-3 倍,但会占用更多内存。
## v/yu/ü 的问题
根据国家语言文字工作委员会的规定,`lv``lyu``lǚ` 都是正确的,但是 `lv` 是最常用的,所以默认使用 `lv`,如果你需要使用其他的,可以在初始化时传入:
```php
echo Pinyin::sentence('旅行');
// lǚ xíng
echo Pinyin::sentence('旅行', 'none');
// lv xing
echo Pinyin::yuToYu()->sentence('旅行', 'none');
// lyu xing
echo Pinyin::yuToU()->sentence('旅行', 'none');
// lu xing
echo Pinyin::yuToV()->sentence('旅行', 'none');
// lv xing
```
> **Warning**
>
> 仅在拼音风格为非 `symbol` 模式下有效。
## 命令行工具
你可以使用命令行来实现拼音的转换:
```bash
php ./bin/pinyin 带着希望去旅行 --method=sentence --tone-style=symbol
# dài zhe xī wàng qù lǚ xíng
```
更多使用方法,可以查看帮助文档:
```bash
php ./bin/pinyin --help
# Usage:
# ./pinyin [chinese] [method] [options]
# Options:
# -j, --json 输出 JSON 格式.
# -c, --compact 不格式化输出 JSON.
# -m, --method=[method] 转换方式,可选:sentence/fullSentence/name/passportName/phrase/permalink/heteronym/heteronymAsList/chars/abbr/nameAbbr.
# --no-tone 不使用音调.
# --tone-style=[style] 音调风格,可选值:symbol/none/number, default: none.
# -h, --help 显示帮助.
```
### 命令行工具示例
```bash
# 基本转换
php ./bin/pinyin "你好世界"
# ni hao shi jie
# 指定音调风格
php ./bin/pinyin "你好世界" --tone-style=symbol
# nǐ hǎo shì jiè
php ./bin/pinyin "你好世界" --tone-style=number
# ni3 hao3 shi4 jie4
# 生成链接格式
php ./bin/pinyin "带着希望去旅行" --method=permalink
# dai-zhe-xi-wang-qu-lv-xing
# 获取首字母
php ./bin/pinyin "带着希望去旅行" --method=abbr
# d z x w q l x
# 多音字转换(JSON格式)
php ./bin/pinyin "重庆" --method=heteronym --json
# {"重":["zhong","chong","tong"],"庆":["qing"]}
# 姓名转换
php ./bin/pinyin "欧阳修" --method=name
# ou yang xiu
```
## 在 Laravel 中使用
独立的包在这里:[overtrue/laravel-pinyin](https://github.com/overtrue/laravel-pinyin)
## 中文简繁转换
如何你有这个需求,也可以了解我的另一个包:[overtrue/php-opencc](https://github.com/overtrue/php-opencc)
## Contribution
欢迎提意见及完善补充词库:
- 单字拼音错误请添加到:[sources/pathes/chars.txt](https://github.com/overtrue/pinyin/blob/master/sources/pathes/chars.txt)
- 词语错误或补齐,请添加到:[sources/pathes/words.txt](https://github.com/overtrue/pinyin/blob/master/sources/pathes/words.txt)
## 参考
- [mozillazg/pinyin-data](https://github.com/mozillazg/pinyin-data)
- [overtrue/pinyin-resources](https://github.com/overtrue/pinyin-resources)
## :heart: Sponsor me
如果你喜欢我的项目并想支持它,[点击这里 :heart:](https://github.com/sponsors/overtrue)
## PHP 扩展包开发
> 想知道如何从零开始构建 PHP 扩展包?
>
> 请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package)
# License
MIT
+72
View File
@@ -0,0 +1,72 @@
{
"name": "overtrue/pinyin",
"description": "Chinese to pinyin translator.",
"keywords": [
"chinese",
"pinyin",
"cn2pinyin"
],
"homepage": "https://github.com/overtrue/pinyin",
"license": "MIT",
"authors": [
{
"name": "overtrue",
"homepage": "http://github.com/overtrue",
"email": "anzhengchao@gmail.com"
}
],
"autoload": {
"psr-4": {
"Overtrue\\Pinyin\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Overtrue\\Pinyin\\Tests\\": "tests/"
}
},
"require": {
"php": ">=8.1"
},
"require-dev": {
"phpunit/phpunit": "^10.5 || ^11.5 || ^12.0",
"brainmaestro/composer-git-hooks": "^3.0",
"nunomaduro/termwind": "^1.0 || ^2.0",
"laravel/pint": "^1.10"
},
"bin": [
"bin/pinyin"
],
"extra": {
"hooks": {
"pre-commit": [
"composer pint",
"composer test"
],
"pre-push": [
"composer pint",
"composer test"
]
}
},
"scripts": {
"post-update-cmd": [
"cghooks update"
],
"post-merge": "composer install",
"post-install-cmd": [
"cghooks remove",
"cghooks add --ignore-lock"
],
"cghooks": "vendor/bin/cghooks",
"pint": "vendor/bin/pint ./src ./tests",
"fix-style": "vendor/bin/pint ./src ./tests",
"test": "vendor/bin/phpunit --colors=always",
"build": "php ./bin/build",
"benchmark": "php ./benchmark/run.php"
},
"scripts-descriptions": {
"test": "Run all tests.",
"fix-style": "Run style checks and fix violations."
}
}
File diff suppressed because it is too large Load Diff
+87
View File
@@ -0,0 +1,87 @@
<?php
return array (
'万俟' => ' mò qí ',
'尉迟' => ' yù chí ',
'单于' => ' chán yú ',
'重' => ' chóng ',
'秘' => ' bì ',
'冼' => ' xiǎn ',
'华' => ' huà ',
'过' => ' guō ',
'纪' => ' jǐ ',
'燕' => ' yān ',
'种' => ' chóng ',
'繁' => ' pó ',
'幺' => ' yāo ',
'覃' => ' qín ',
'冯' => ' féng ',
'石' => ' shí ',
'缪' => ' miào ',
'瞿' => ' qú ',
'曾' => ' zēng ',
'解' => ' xiè ',
'折' => ' shè ',
'那' => ' nā ',
'佴' => ' nài ',
'难' => ' nàn ',
'粘' => ' niàn ',
'藏' => ' zàng ',
'扎' => ' zā ',
'翟' => ' zhái ',
'都' => ' dū ',
'六' => ' lù ',
'薄' => ' bó ',
'贾' => ' jiǎ ',
'的' => ' dē ',
'哈' => ' hǎ ',
'居' => ' jū ',
'盖' => ' gě ',
'查' => ' zhā ',
'盛' => ' shèng ',
'塔' => ' tǎ ',
'和' => ' hé ',
'柏' => ' bǎi ',
'朴' => ' piáo ',
'蓝' => ' lán ',
'牟' => ' móu ',
'殷' => ' yīn ',
'陆' => ' lù ',
'乜' => ' niè ',
'乐' => ' yuè ',
'阚' => ' kàn ',
'叶' => ' yè ',
'强' => ' qiáng ',
'不' => ' fǒu ',
'丁' => ' dīng ',
'阿' => ' ā ',
'汤' => ' tāng ',
'万' => ' wàn ',
'车' => ' chē ',
'称' => ' chēng ',
'沈' => ' shěn ',
'区' => ' ōu ',
'仇' => ' qiú ',
'宿' => ' sù ',
'南' => ' nán ',
'单' => ' shàn ',
'卜' => ' bǔ ',
'鸟' => ' niǎo ',
'思' => ' sī ',
'殳' => ' shū ',
'寻' => ' xún ',
'於' => ' yú ',
'烟' => ' yān ',
'余' => ' yú ',
'浅' => ' qiǎn ',
'艾' => ' ài ',
'浣' => ' wǎn ',
'无' => ' wú ',
'信' => ' xìn ',
'许' => ' xǔ ',
'齐' => ' qí ',
'俞' => ' yú ',
'若' => ' ruò ',
'贠' => ' yùn ',
'貟' => ' yùn ',
'么' => ' yāo ',
);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+80
View File
@@ -0,0 +1,80 @@
# 基准测试指南
## 运行基准测试
```bash
php benchmark/run.php
```
## 输出说明
### Strategy Comparison 表格
这个表格对比了三种转换策略的性能:
```
Method Memory Cached Smart Fastest Speedup
sentence 20.5 ms 8.2 ms 12.3 ms Cached 2.5x
fullSentence 18.3 ms 7.5 ms 11.2 ms Cached 2.4x
...
────────────────────────────────────────────────
TOTAL 190.26ms 119.33ms 194.38ms Cached 1.6x
```
#### 列说明:
- **Method**: 测试的方法名称
- **Memory**: 内存优化策略的执行时间
- **Cached**: 缓存策略的执行时间
- **Smart**: 智能策略的执行时间
- **Fastest**: 该方法最快的策略名称(用颜色高亮)
- **Speedup**: 最慢与最快之间的速度差异倍数
#### TOTAL 行:
- 使用分隔线与数据行区分
- 显示所有方法的总执行时间
- 最快的策略会用对应颜色高亮显示
- Speedup 显示总体的加速比
### Performance Summary
性能总结部分提供了策略之间的直观对比:
```
📊 Performance Summary:
• Cached strategy is 1.59x faster than Memory Optimized
• Smart strategy is 0.98x faster than Memory, 1.63x slower than Cached
```
这让您可以快速了解:
- Cached 策略比 Memory Optimized 快多少倍
- Smart 策略相对于其他两种策略的性能表现
### Memory Usage 表格
显示每种策略的内存使用情况:
```
Strategy Peak Memory Description
Memory Optimized 2.5 MB Minimal memory, loads on demand
Cached 15.8 MB All data cached, fastest repeated access
Smart 8.2 MB Adaptive loading based on text complexity
```
## 如何解读结果
1. **选择合适的策略**
- 如果内存有限(如 Web 请求):选择 Memory Optimized
- 如果需要批量处理大量文本:选择 Cached
- 如果需要平衡性能和内存:选择 Smart
2. **Speedup 值的含义**
- 1.5x = 快 50%
- 2.0x = 快 1 倍(速度是原来的 2 倍)
- 3.0x = 快 2 倍(速度是原来的 3 倍)
3. **TOTAL 行的重要性**
- 这是所有方法执行的总时间
- 最能反映实际使用场景的整体性能
- 用于评估策略的整体效果
+6
View File
@@ -0,0 +1,6 @@
parameters:
level: 9
paths:
- src
inferPrivatePropertyTypeFromConstructor: true
checkMissingIterableValueType: false
+82
View File
@@ -0,0 +1,82 @@
<?php
namespace Overtrue\Pinyin;
use ArrayAccess;
use JsonException;
use JsonSerializable;
use Stringable;
use function array_map;
use function implode;
use function is_array;
class Collection implements ArrayAccess, JsonSerializable, Stringable
{
public function __construct(protected $items = []) {}
public function join(string $separator = ' '): string
{
return implode($separator, array_map(
fn ($item) => is_array($item) ? '['.implode(', ', $item).']' : $item,
$this->items
));
}
public function map(callable $callback): Collection
{
return new static(array_map($callback, $this->all()));
}
public function all(): array
{
return $this->items;
}
public function toArray(): array
{
return $this->all();
}
/**
* @throws JsonException
*/
public function toJson(int $options = 0): string
{
return json_encode($this->all(), $options | JSON_THROW_ON_ERROR);
}
public function __toString(): string
{
return $this->join();
}
public function offsetExists(mixed $offset): bool
{
return isset($this->items[$offset]);
}
public function offsetGet(mixed $offset): mixed
{
return $this->items[$offset] ?? null;
}
public function offsetSet(mixed $offset, mixed $value): void
{
if ($offset === null) {
$this->items[] = $value;
} else {
$this->items[$offset] = $value;
}
}
public function offsetUnset(mixed $offset): void
{
unset($this->items[$offset]);
}
public function jsonSerialize(): array
{
return $this->items;
}
}
@@ -0,0 +1,41 @@
<?php
namespace Overtrue\Pinyin\Contracts;
use Overtrue\Pinyin\Collection;
use Overtrue\Pinyin\ToneStyle;
interface ConverterInterface
{
public function convert(string $string): Collection;
public function heteronym(bool $asList = false): static;
public function surname(): static;
public function noWords(): static;
public function noCleanup(): static;
public function onlyHans(): static;
public function noAlpha(): static;
public function noNumber(): static;
public function noPunctuation(): static;
public function withToneStyle(string|ToneStyle $toneStyle): static;
public function noTone(): static;
public function useNumberTone(): static;
public function yuToV(): static;
public function yuToU(): static;
public function yuToYu(): static;
public function when(bool $condition, callable $callback): static;
}
+137
View File
@@ -0,0 +1,137 @@
<?php
namespace Overtrue\Pinyin;
use InvalidArgumentException;
use Overtrue\Pinyin\Contracts\ConverterInterface;
use Overtrue\Pinyin\Converters\CachedConverter;
use Overtrue\Pinyin\Converters\MemoryOptimizedConverter;
use Overtrue\Pinyin\Converters\SmartConverter;
/**
* Converter 工厂类
*
* 提供不同策略的 Converter 实例
*/
class ConverterFactory
{
public const MEMORY_OPTIMIZED = 'memory';
public const CACHED = 'cached';
public const SMART = 'smart';
/**
* 默认策略
*/
private static string $defaultStrategy = self::MEMORY_OPTIMIZED;
/**
* 创建 Converter 实例
*
* @param string|null $strategy 策略名称,null 则使用默认策略
*/
public static function make(?string $strategy = null): ConverterInterface
{
$strategy = $strategy ?? self::$defaultStrategy;
return match ($strategy) {
self::MEMORY_OPTIMIZED => new MemoryOptimizedConverter,
self::CACHED => new CachedConverter,
self::SMART => new SmartConverter,
default => throw new InvalidArgumentException("Unknown converter strategy: {$strategy}")
};
}
/**
* 设置默认策略
*/
public static function setDefaultStrategy(string $strategy): void
{
if (! in_array($strategy, [self::MEMORY_OPTIMIZED, self::CACHED, self::SMART])) {
throw new InvalidArgumentException("Invalid strategy: {$strategy}");
}
self::$defaultStrategy = $strategy;
}
/**
* 获取当前默认策略
*/
public static function getDefaultStrategy(): string
{
return self::$defaultStrategy;
}
/**
* 根据场景推荐策略
*
* @param array $context 场景上下文
* @return string 推荐的策略
*/
public static function recommend(array $context = []): string
{
// Web 请求场景
if (($context['sapi'] ?? php_sapi_name()) === 'fpm-fcgi') {
return self::MEMORY_OPTIMIZED;
}
// CLI 批处理场景
if (($context['batch'] ?? false) === true) {
return self::CACHED;
}
// 内存限制场景
$memoryLimit = ini_get('memory_limit');
if ($memoryLimit !== '-1' && self::parseBytes($memoryLimit) < 128 * 1024 * 1024) {
return self::MEMORY_OPTIMIZED;
}
// 默认使用智能策略
return self::SMART;
}
/**
* 获取所有可用策略的信息
*/
public static function getStrategiesInfo(): array
{
return [
self::MEMORY_OPTIMIZED => [
'name' => '内存优化',
'class' => MemoryOptimizedConverter::class,
'memory' => '~400KB',
'speed' => '中等',
'use_case' => 'Web请求、内存受限环境',
],
self::CACHED => [
'name' => '全缓存',
'class' => CachedConverter::class,
'memory' => '~4MB',
'speed' => '最快',
'use_case' => '批处理、长时运行进程',
],
self::SMART => [
'name' => '智能',
'class' => SmartConverter::class,
'memory' => '600KB-1.5MB',
'speed' => '快',
'use_case' => '通用场景、自动优化',
],
];
}
private static function parseBytes(string $value): int
{
$value = trim($value);
$last = strtolower($value[-1]);
$value = (int) $value;
return match ($last) {
'g' => $value * 1024 * 1024 * 1024,
'm' => $value * 1024 * 1024,
'k' => $value * 1024,
default => $value,
};
}
}
@@ -0,0 +1,245 @@
<?php
namespace Overtrue\Pinyin\Converters;
use Overtrue\Pinyin\Collection;
use Overtrue\Pinyin\Contracts\ConverterInterface;
use Overtrue\Pinyin\ToneStyle;
use function implode;
use function preg_replace;
use function sprintf;
use function str_contains;
use function str_replace;
abstract class AbstractConverter implements ConverterInterface
{
protected const WORDS_GLOB_PATH = __DIR__.'/../../data/words-*.php';
protected const CHARS_PATH = __DIR__.'/../../data/chars.php';
protected const SURNAMES_PATH = __DIR__.'/../../data/surnames.php';
protected bool $heteronym = false;
protected bool $heteronymAsList = false;
protected bool $asSurname = false;
protected bool $noWords = false;
protected bool $cleanup = true;
protected string $yuTo = 'v';
protected ToneStyle $toneStyle = ToneStyle::SYMBOL;
protected array $regexps = [
'separator' => '\p{Z}',
'mark' => '\p{M}',
'tab' => "\t",
'number' => '0-9',
'alphabet' => 'a-zA-Z',
'hans' => '\x{3007}\x{2E80}-\x{2FFF}\x{3100}-\x{312F}\x{31A0}-\x{31EF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}',
'punctuation' => '\p{P}',
];
private static ?array $wordSegmentPaths = null;
abstract public function convert(string $string): Collection;
public function heteronym(bool $asList = false): static
{
$this->heteronym = true;
$this->heteronymAsList = $asList;
return $this;
}
public function surname(): static
{
$this->asSurname = true;
return $this;
}
public function noWords(): static
{
$this->noWords = true;
return $this;
}
public function noCleanup(): static
{
$this->cleanup = false;
return $this;
}
public function onlyHans(): static
{
$this->regexps['hans'] = '\x{3007}\x{2E80}-\x{2FFF}\x{3100}-\x{312F}\x{31A0}-\x{31EF}\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}';
unset($this->regexps['alphabet']);
unset($this->regexps['number']);
unset($this->regexps['punctuation']);
return $this;
}
public function noAlpha(): static
{
unset($this->regexps['alphabet']);
return $this;
}
public function noNumber(): static
{
unset($this->regexps['number']);
return $this;
}
public function noPunctuation(): static
{
unset($this->regexps['punctuation']);
return $this;
}
/**
* 设置声调风格
*
* @param string|ToneStyle $toneStyle 声调风格,可以是字符串或 ToneStyle 枚举
*/
public function withToneStyle(string|ToneStyle $toneStyle): static
{
$this->toneStyle = $toneStyle instanceof ToneStyle ? $toneStyle : ToneStyle::from($toneStyle);
return $this;
}
public function noTone(): static
{
$this->toneStyle = ToneStyle::NONE;
return $this;
}
public function useNumberTone(): static
{
$this->toneStyle = ToneStyle::NUMBER;
return $this;
}
public function yuToV(): static
{
$this->yuTo = 'v';
return $this;
}
public function yuToU(): static
{
$this->yuTo = 'u';
return $this;
}
public function yuToYu(): static
{
$this->yuTo = 'yu';
return $this;
}
public function when(bool $condition, callable $callback): static
{
if ($condition) {
$callback($this);
}
return $this;
}
// 共享的辅助方法
protected function preprocessString(string $string): string
{
// 把原有的数字和汉字分离,避免拼音转换时被误作声调
$string = preg_replace_callback('~[a-z0-9_-]+~i', function ($matches) {
return "\t".$matches[0];
}, $string);
// 过滤掉不保留的字符
if ($this->cleanup) {
$string = preg_replace(sprintf('~[^%s]~u', implode($this->regexps)), '', $string);
}
return $string;
}
protected function split(string $item): Collection
{
$items = preg_split('/\s+/u', trim($item), -1, PREG_SPLIT_NO_EMPTY) ?: [];
foreach ($items as $index => $item) {
$items[$index] = $this->formatTone($item, $this->toneStyle->value);
}
return new Collection($items);
}
protected function formatTone(string $pinyin, string $style): string
{
if ($style === ToneStyle::SYMBOL->value) {
return $pinyin;
}
// @formatter:off
$replacements = [
'ɑ' => ['a', 5], 'ü' => ['v', 5], 'üē' => ['ue', 1], 'üé' => ['ue', 2], 'üě' => ['ue', 3], 'üè' => ['ue', 4],
'ā' => ['a', 1], 'ē' => ['e', 1], 'ī' => ['i', 1], 'ō' => ['o', 1], 'ū' => ['u', 1], 'ǖ' => ['v', 1],
'á' => ['a', 2], 'é' => ['e', 2], 'í' => ['i', 2], 'ó' => ['o', 2], 'ú' => ['u', 2], 'ǘ' => ['v', 2],
'ǎ' => ['a', 3], 'ě' => ['e', 3], 'ǐ' => ['i', 3], 'ǒ' => ['o', 3], 'ǔ' => ['u', 3], 'ǚ' => ['v', 3],
'à' => ['a', 4], 'è' => ['e', 4], 'ì' => ['i', 4], 'ò' => ['o', 4], 'ù' => ['u', 4], 'ǜ' => ['v', 4],
];
// @formatter:on
foreach ($replacements as $unicode => $replacement) {
if (str_contains($pinyin, $unicode)) {
$umlaut = $replacement[0];
if ($this->yuTo !== 'v' && $umlaut === 'v') {
$umlaut = $this->yuTo;
}
$pinyin = str_replace($unicode, $umlaut, $pinyin);
if ($style === ToneStyle::NUMBER->value) {
$pinyin .= $replacement[1];
}
}
}
return $pinyin;
}
protected function wordSegmentPaths(): array
{
if (self::$wordSegmentPaths !== null) {
return self::$wordSegmentPaths;
}
$paths = glob(self::WORDS_GLOB_PATH);
if (! is_array($paths)) {
return self::$wordSegmentPaths = [];
}
sort($paths, SORT_NATURAL);
return self::$wordSegmentPaths = $paths;
}
}
@@ -0,0 +1,132 @@
<?php
namespace Overtrue\Pinyin\Converters;
use Overtrue\Pinyin\Collection;
use function array_map;
use function mb_strlen;
use function mb_substr;
use function str_starts_with;
/**
* 缓存版本的转换器
*
* 特点:
* - 缓存所有词典数据
* - 更快的重复转换速度
* - 适合批处理和长时运行的进程
* - 内存占用较高(~4MB
*/
class CachedConverter extends AbstractConverter
{
private static ?array $charsCache = null;
private static ?array $surnamesCache = null;
private static array $wordsCache = [];
private static ?array $fullDictionary = null;
public function convert(string $string): Collection
{
$string = $this->preprocessString($string);
return $this->determineConversionStrategy($string);
}
private function determineConversionStrategy(string $string): Collection
{
// 多音字处理
if ($this->heteronym) {
return $this->convertAsChars($string, true);
}
// 仅字符转换
if ($this->noWords) {
return $this->convertAsChars($string);
}
// 替换姓氏
if ($this->asSurname) {
$string = $this->convertSurname($string);
}
// 使用缓存的完整词典
$dictionary = $this->getFullDictionary();
$string = strtr($string, $dictionary);
return $this->split($string);
}
private function getFullDictionary(): array
{
if (self::$fullDictionary === null) {
self::$fullDictionary = [];
// 按顺序加载,保证长词优先
foreach ($this->wordSegmentPaths() as $path) {
self::$fullDictionary += $this->loadWordsSegment($path);
}
}
return self::$fullDictionary;
}
private function loadWordsSegment(string $path): array
{
if (! isset(self::$wordsCache[$path])) {
self::$wordsCache[$path] = require $path;
}
return self::$wordsCache[$path];
}
protected function convertAsChars(string $string, bool $polyphonic = false): Collection
{
self::$charsCache ??= require self::CHARS_PATH;
$chars = mb_str_split($string);
$items = [];
foreach ($chars as $char) {
if (isset(self::$charsCache[$char])) {
if ($polyphonic) {
$pinyin = array_map(fn ($pinyin) => $this->formatTone($pinyin, $this->toneStyle->value), self::$charsCache[$char]);
if ($this->heteronymAsList) {
$items[] = [$char => $pinyin];
} else {
$items[$char] = $pinyin;
}
} else {
$items[$char] = $this->formatTone(self::$charsCache[$char][0], $this->toneStyle->value);
}
}
}
return new Collection($items);
}
protected function convertSurname(string $name): string
{
self::$surnamesCache ??= require self::SURNAMES_PATH;
foreach (self::$surnamesCache as $surname => $pinyin) {
if (str_starts_with($name, $surname)) {
return $pinyin.mb_substr($name, mb_strlen($surname));
}
}
return $name;
}
/**
* 清理缓存(可选)
*/
public static function clearCache(): void
{
self::$charsCache = null;
self::$surnamesCache = null;
self::$wordsCache = [];
self::$fullDictionary = null;
}
}
@@ -0,0 +1,92 @@
<?php
namespace Overtrue\Pinyin\Converters;
use Overtrue\Pinyin\Collection;
use function array_map;
use function mb_strlen;
use function mb_substr;
use function str_starts_with;
/**
* 内存优化版本的转换器
*
* 特点:
* - 最小内存占用(峰值 ~400KB
* - 每次加载一个段,用完即释放
* - 适合 Web 请求和内存受限环境
*/
class MemoryOptimizedConverter extends AbstractConverter
{
public function convert(string $string): Collection
{
$string = $this->preprocessString($string);
return $this->determineConversionStrategy($string);
}
private function determineConversionStrategy(string $string): Collection
{
// 多音字处理
if ($this->heteronym) {
return $this->convertAsChars($string, true);
}
// 仅字符转换
if ($this->noWords) {
return $this->convertAsChars($string);
}
// 替换姓氏
if ($this->asSurname) {
$string = $this->convertSurname($string);
}
// 按顺序加载词典段(长词优先)
foreach ($this->wordSegmentPaths() as $path) {
$string = strtr($string, require $path);
}
return $this->split($string);
}
protected function convertAsChars(string $string, bool $polyphonic = false): Collection
{
$map = require self::CHARS_PATH;
$chars = mb_str_split($string);
$items = [];
foreach ($chars as $char) {
if (isset($map[$char])) {
if ($polyphonic) {
$pinyin = array_map(fn ($pinyin) => $this->formatTone($pinyin, $this->toneStyle->value), $map[$char]);
if ($this->heteronymAsList) {
$items[] = [$char => $pinyin];
} else {
$items[$char] = $pinyin;
}
} else {
$items[$char] = $this->formatTone($map[$char][0], $this->toneStyle->value);
}
}
}
return new Collection($items);
}
protected function convertSurname(string $name): string
{
static $surnames = null;
$surnames ??= require self::SURNAMES_PATH;
foreach ($surnames as $surname => $pinyin) {
if (str_starts_with($name, $surname)) {
return $pinyin.mb_substr($name, mb_strlen($surname));
}
}
return $name;
}
}
@@ -0,0 +1,148 @@
<?php
namespace Overtrue\Pinyin\Converters;
use Overtrue\Pinyin\Collection;
use function array_map;
use function mb_strlen;
use function mb_substr;
use function str_starts_with;
/**
* 智能版本的转换器
*
* 特点:
* - 根据文本长度智能选择策略
* - 短文本跳过不必要的长词词典
* - 缓存小型常用数据
* - 平衡内存和性能
*/
class SmartConverter extends AbstractConverter
{
private static ?array $surnamesCache = null;
private static array $segmentCache = [];
private static ?array $fullDictionary = null;
private const MAX_CACHE_SEGMENTS = 3;
public function convert(string $string): Collection
{
$string = $this->preprocessString($string);
return $this->determineConversionStrategy($string);
}
private function determineConversionStrategy(string $string): Collection
{
// 多音字处理
if ($this->heteronym) {
return $this->convertAsChars($string, true);
}
// 仅字符转换
if ($this->noWords) {
return $this->convertAsChars($string);
}
// 替换姓氏
if ($this->asSurname) {
$string = $this->convertSurname($string);
}
// 智能加载词典
$string = $this->smartConvert($string);
return $this->split($string);
}
private function smartConvert(string $string): string
{
// 使用和CachedConverter相同的逻辑,但保持缓存机制
$dictionary = $this->getFullDictionary();
return strtr($string, $dictionary);
}
private function getFullDictionary(): array
{
if (self::$fullDictionary === null) {
self::$fullDictionary = [];
// 按顺序加载,保证长词优先
foreach ($this->wordSegmentPaths() as $path) {
self::$fullDictionary += $this->loadSegmentWithCache($path);
}
}
return self::$fullDictionary;
}
private function loadSegmentWithCache(string $path): array
{
if (! isset(self::$segmentCache[$path])) {
// 缓存数量限制
if (count(self::$segmentCache) >= self::MAX_CACHE_SEGMENTS) {
// 移除最早的缓存(简单的 FIFO)
$firstKey = array_key_first(self::$segmentCache);
if ($firstKey !== null) {
unset(self::$segmentCache[$firstKey]);
}
}
self::$segmentCache[$path] = require $path;
}
return self::$segmentCache[$path];
}
protected function convertAsChars(string $string, bool $polyphonic = false): Collection
{
// 字符表太大,不缓存
$map = require self::CHARS_PATH;
$chars = mb_str_split($string);
$items = [];
foreach ($chars as $char) {
if (isset($map[$char])) {
if ($polyphonic) {
$pinyin = array_map(fn ($pinyin) => $this->formatTone($pinyin, $this->toneStyle->value), $map[$char]);
if ($this->heteronymAsList) {
$items[] = [$char => $pinyin];
} else {
$items[$char] = $pinyin;
}
} else {
$items[$char] = $this->formatTone($map[$char][0], $this->toneStyle->value);
}
}
}
return new Collection($items);
}
protected function convertSurname(string $name): string
{
// 姓氏表很小,可以缓存
self::$surnamesCache ??= require self::SURNAMES_PATH;
foreach (self::$surnamesCache as $surname => $pinyin) {
if (str_starts_with($name, $surname)) {
return $pinyin.mb_substr($name, mb_strlen($surname));
}
}
return $name;
}
/**
* 清理缓存
*/
public static function clearCache(): void
{
self::$surnamesCache = null;
self::$segmentCache = [];
self::$fullDictionary = null;
}
}
+183
View File
@@ -0,0 +1,183 @@
<?php
namespace Overtrue\Pinyin;
use InvalidArgumentException;
use Overtrue\Pinyin\Contracts\ConverterInterface;
use Overtrue\Pinyin\Converters\CachedConverter;
use Overtrue\Pinyin\Converters\SmartConverter;
use function is_numeric;
use function mb_substr;
use function method_exists;
/**
* @method static ConverterInterface surname()
* @method static ConverterInterface noWords()
* @method static ConverterInterface onlyHans()
* @method static ConverterInterface noAlpha()
* @method static ConverterInterface noNumber()
* @method static ConverterInterface noCleanup()
* @method static ConverterInterface noPunctuation()
* @method static ConverterInterface noTone()
* @method static ConverterInterface useNumberTone()
* @method static ConverterInterface yuToV()
* @method static ConverterInterface yuToU()
* @method static ConverterInterface withToneStyle(string|ToneStyle $toneStyle = 'symbol')
* @method static Collection convert(string $string, callable $beforeSplit = null)
*/
class Pinyin
{
/**
* 当前使用的转换策略
*/
private static ?string $converterStrategy = null;
public static function name(string $name, string|ToneStyle $toneStyle = ToneStyle::SYMBOL): Collection
{
return self::converter()->surname()->withToneStyle($toneStyle)->convert($name);
}
public static function passportName(string $name, string|ToneStyle $toneStyle = ToneStyle::NONE): Collection
{
return self::converter()->surname()->yuToYu()->withToneStyle($toneStyle)->convert($name);
}
public static function phrase(string $string, string|ToneStyle $toneStyle = ToneStyle::SYMBOL): Collection
{
return self::converter()->noPunctuation()->withToneStyle($toneStyle)->convert($string);
}
public static function sentence(string $string, string|ToneStyle $toneStyle = ToneStyle::SYMBOL): Collection
{
return self::converter()->withToneStyle($toneStyle)->convert($string);
}
public static function fullSentence(string $string, string|ToneStyle $toneStyle = ToneStyle::SYMBOL): Collection
{
return self::converter()->noCleanup()->withToneStyle($toneStyle)->convert($string);
}
public static function heteronym(string $string, string|ToneStyle $toneStyle = ToneStyle::SYMBOL, bool $asList = false): Collection
{
return self::converter()->heteronym($asList)->withToneStyle($toneStyle)->convert($string);
}
public static function heteronymAsList(string $string, string|ToneStyle $toneStyle = ToneStyle::SYMBOL): Collection
{
return self::heteronym($string, $toneStyle, true);
}
public static function chars(string $string, string|ToneStyle $toneStyle = ToneStyle::SYMBOL): Collection
{
return self::converter()->onlyHans()->noWords()->withToneStyle($toneStyle)->convert($string);
}
public static function permalink(string $string, string $delimiter = '-'): string
{
if (! in_array($delimiter, ['_', '-', '.', ''], true)) {
throw new InvalidArgumentException("Delimiter must be one of: '_', '-', '', '.'.");
}
return self::converter()->noPunctuation()->noTone()->convert($string)->join($delimiter);
}
public static function nameAbbr(string $string): Collection
{
return self::abbr($string, true);
}
public static function abbr(string $string, bool $asName = false, bool $preserveEnglishWords = false): Collection
{
return self::converter()->noTone()
->noPunctuation()
->when($asName, fn ($c) => $c->surname())
->convert($string)
->map(function ($pinyin) use ($string, $preserveEnglishWords) {
// 如果内容在原字符串中,则直接返回
if ($preserveEnglishWords && str_contains($string, $pinyin)) {
return $pinyin;
}
// 常用于电影名称入库索引处理,例如:《晚娘2012》-> WN2012
return is_numeric($pinyin) || preg_match('/\d{2,}/', $pinyin) ? $pinyin : mb_substr($pinyin, 0, 1);
});
}
/**
* 获取 Converter 实例
*
* @param string|null $strategy 指定策略,null 则使用默认策略
*/
public static function converter(?string $strategy = null): ConverterInterface
{
// 使用新的工厂模式
$strategy = $strategy ?? self::$converterStrategy;
return ConverterFactory::make($strategy);
}
/**
* 设置默认转换策略
*
* @param string $strategy 策略名称
*/
public static function setConverterStrategy(string $strategy): void
{
self::$converterStrategy = $strategy;
ConverterFactory::setDefaultStrategy($strategy);
}
/**
* 使用内存优化策略
*/
public static function useMemoryOptimized(): void
{
self::setConverterStrategy(ConverterFactory::MEMORY_OPTIMIZED);
}
/**
* 使用缓存策略
*/
public static function useCached(): void
{
self::setConverterStrategy(ConverterFactory::CACHED);
}
/**
* 使用智能策略
*/
public static function useSmart(): void
{
self::setConverterStrategy(ConverterFactory::SMART);
}
/**
* 根据运行环境自动选择策略
*/
public static function useAutoStrategy(): void
{
$strategy = ConverterFactory::recommend();
self::setConverterStrategy($strategy);
}
/**
* 清理所有转换器的缓存
*/
public static function clearCache(): void
{
CachedConverter::clearCache();
SmartConverter::clearCache();
}
public static function __callStatic(string $name, array $arguments)
{
$converter = self::converter();
if (method_exists($converter, $name)) {
return $converter->$name(...$arguments);
}
throw new InvalidArgumentException("Method {$name} does not exist.");
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace Overtrue\Pinyin;
/**
* 拼音声调风格枚举
*/
enum ToneStyle: string
{
/**
* 符号风格:zhōng
*/
case SYMBOL = 'symbol';
/**
* 数字风格:zhong1
*/
case NUMBER = 'number';
/**
* 无声调:zhong
*/
case NONE = 'none';
}
+1 -1
View File
@@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2024-03-18 16:34:29
// This file is automatically generated at:2026-03-27 09:27:20
declare (strict_types = 1);
return array (
0 => 'think\\app\\Service',
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
+20
View File
@@ -0,0 +1,20 @@
# 简介
欢迎使用腾讯云开发者工具套件(SDK)3.0,SDK3.0是云 API3.0 平台的配套工具。新版SDK实现了统一化,具有各个语言版本的SDK使用方法相同,接口调用方式相同,统一的错误码和返回包格式这些优点。
# 依赖环境
1. PHP 5.6.0 版本及以上
2. 从腾讯云控制台 开通相应产品
3. 获取 SecretID、SecretKey 以及调用地址(endpoint),endpoint 为 trtc.tencentcloudapi.com,具体参考各产品说明。
# 获取安装
## 通过 Composer 安装
通过 Composer 获取安装是使用 PHP SDK 的推荐方法,Composer 是 PHP 的依赖管理工具,支持您项目所需的依赖项,并将其安装到项目中。关于 Composer 详细可参考 Composer 官网 。
1. 安装Composer
windows环境请访问[Composer官网](https://getcomposer.org/download/)下载安装包安装。
unix环境在命令行中执行以下命令安装。
> curl -sS https://getcomposer.org/installer | php
> sudo mv composer.phar /usr/local/bin/composer
2. 建议中国大陆地区的用户设置腾讯云镜像源:`composer config -g repos.packagist composer https://mirrors.tencent.com/composer/`
3. 执行命令 `composer require tencentcloud/trtc` 添加依赖。
+23
View File
@@ -0,0 +1,23 @@
{
"name": "tencentcloud/trtc",
"description": "TencentCloudApi php sdk trtc",
"type": "library",
"homepage": "https://github.com/tencentcloud-sdk-php/trtc",
"license": "Apache-2.0",
"authors": [
{
"name": "tencentcloudapi",
"email": "tencentcloudapi@tencent.com",
"homepage": "https://github.com/tencentcloud-sdk-php/trtc",
"role": "Developer"
}
],
"require": {
"tencentcloud/common": "3.0.990"
},
"autoload": {
"psr-4": {
"TencentCloud\\": "./src/TencentCloud"
}
}
}
@@ -0,0 +1,69 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* 造成异常体验可能的异常事件类型
*
* @method integer getAbnormalEventId() 获取异常事件ID,具体值查看附录:异常体验ID映射表:https://cloud.tencent.com/document/product/647/44916
* @method void setAbnormalEventId(integer $AbnormalEventId) 设置异常事件ID,具体值查看附录:异常体验ID映射表:https://cloud.tencent.com/document/product/647/44916
* @method string getPeerId() 获取远端用户ID,"":表示异常事件不是由远端用户产生
注意:此字段可能返回 null,表示取不到有效值。
* @method void setPeerId(string $PeerId) 设置远端用户ID,"":表示异常事件不是由远端用户产生
注意:此字段可能返回 null,表示取不到有效值。
*/
class AbnormalEvent extends AbstractModel
{
/**
* @var integer 异常事件ID,具体值查看附录:异常体验ID映射表:https://cloud.tencent.com/document/product/647/44916
*/
public $AbnormalEventId;
/**
* @var string 远端用户ID,"":表示异常事件不是由远端用户产生
注意:此字段可能返回 null,表示取不到有效值。
*/
public $PeerId;
/**
* @param integer $AbnormalEventId 异常事件ID,具体值查看附录:异常体验ID映射表:https://cloud.tencent.com/document/product/647/44916
* @param string $PeerId 远端用户ID,"":表示异常事件不是由远端用户产生
注意:此字段可能返回 null,表示取不到有效值。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("AbnormalEventId",$param) and $param["AbnormalEventId"] !== null) {
$this->AbnormalEventId = $param["AbnormalEventId"];
}
if (array_key_exists("PeerId",$param) and $param["PeerId"] !== null) {
$this->PeerId = $param["PeerId"];
}
}
}
@@ -0,0 +1,106 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* 用户的异常体验及可能的原因
*
* @method string getUserId() 获取用户ID
* @method void setUserId(string $UserId) 设置用户ID
* @method integer getExperienceId() 获取异常体验ID
* @method void setExperienceId(integer $ExperienceId) 设置异常体验ID
* @method string getRoomId() 获取字符串房间号
* @method void setRoomId(string $RoomId) 设置字符串房间号
* @method array getAbnormalEventList() 获取异常事件数组
* @method void setAbnormalEventList(array $AbnormalEventList) 设置异常事件数组
* @method integer getEventTime() 获取异常事件的上报时间
* @method void setEventTime(integer $EventTime) 设置异常事件的上报时间
*/
class AbnormalExperience extends AbstractModel
{
/**
* @var string 用户ID
*/
public $UserId;
/**
* @var integer 异常体验ID
*/
public $ExperienceId;
/**
* @var string 字符串房间号
*/
public $RoomId;
/**
* @var array 异常事件数组
*/
public $AbnormalEventList;
/**
* @var integer 异常事件的上报时间
*/
public $EventTime;
/**
* @param string $UserId 用户ID
* @param integer $ExperienceId 异常体验ID
* @param string $RoomId 字符串房间号
* @param array $AbnormalEventList 异常事件数组
* @param integer $EventTime 异常事件的上报时间
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("UserId",$param) and $param["UserId"] !== null) {
$this->UserId = $param["UserId"];
}
if (array_key_exists("ExperienceId",$param) and $param["ExperienceId"] !== null) {
$this->ExperienceId = $param["ExperienceId"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
if (array_key_exists("AbnormalEventList",$param) and $param["AbnormalEventList"] !== null) {
$this->AbnormalEventList = [];
foreach ($param["AbnormalEventList"] as $key => $value){
$obj = new AbnormalEvent();
$obj->deserialize($value);
array_push($this->AbnormalEventList, $obj);
}
}
if (array_key_exists("EventTime",$param) and $param["EventTime"] !== null) {
$this->EventTime = $param["EventTime"];
}
}
}
@@ -0,0 +1,77 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* 转推服务加入TRTC房间的机器人参数。
*
* @method string getUserId() 获取转推服务在TRTC房间使用的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),注意这个userId不能与其他TRTC或者转推服务等已经使用的UserId重复,建议可以把房间ID作为userId的标识的一部分。
* @method void setUserId(string $UserId) 设置转推服务在TRTC房间使用的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),注意这个userId不能与其他TRTC或者转推服务等已经使用的UserId重复,建议可以把房间ID作为userId的标识的一部分。
* @method string getUserSig() 获取转推服务加入TRTC房间的用户签名,当前 UserId 对应的验证签名,相当于登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
* @method void setUserSig(string $UserSig) 设置转推服务加入TRTC房间的用户签名,当前 UserId 对应的验证签名,相当于登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
* @method integer getMaxIdleTime() 获取所有参与混流转推的主播持续离开TRTC房间超过MaxIdleTime的时长,自动停止转推,单位:秒。默认值为 30 秒,该值需大于等于 5秒,且小于等于 86400(24小时)
* @method void setMaxIdleTime(integer $MaxIdleTime) 设置所有参与混流转推的主播持续离开TRTC房间超过MaxIdleTime的时长,自动停止转推,单位:秒。默认值为 30 秒,该值需大于等于 5秒,且小于等于 86400(24小时)
*/
class AgentParams extends AbstractModel
{
/**
* @var string 转推服务在TRTC房间使用的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),注意这个userId不能与其他TRTC或者转推服务等已经使用的UserId重复,建议可以把房间ID作为userId的标识的一部分。
*/
public $UserId;
/**
* @var string 转推服务加入TRTC房间的用户签名,当前 UserId 对应的验证签名,相当于登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
*/
public $UserSig;
/**
* @var integer 所有参与混流转推的主播持续离开TRTC房间超过MaxIdleTime的时长,自动停止转推,单位:秒。默认值为 30 秒,该值需大于等于 5秒,且小于等于 86400(24小时)
*/
public $MaxIdleTime;
/**
* @param string $UserId 转推服务在TRTC房间使用的[UserId](https://cloud.tencent.com/document/product/647/46351#userid),注意这个userId不能与其他TRTC或者转推服务等已经使用的UserId重复,建议可以把房间ID作为userId的标识的一部分。
* @param string $UserSig 转推服务加入TRTC房间的用户签名,当前 UserId 对应的验证签名,相当于登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
* @param integer $MaxIdleTime 所有参与混流转推的主播持续离开TRTC房间超过MaxIdleTime的时长,自动停止转推,单位:秒。默认值为 30 秒,该值需大于等于 5秒,且小于等于 86400(24小时)
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("UserId",$param) and $param["UserId"] !== null) {
$this->UserId = $param["UserId"];
}
if (array_key_exists("UserSig",$param) and $param["UserSig"] !== null) {
$this->UserSig = $param["UserSig"];
}
if (array_key_exists("MaxIdleTime",$param) and $param["MaxIdleTime"] !== null) {
$this->MaxIdleTime = $param["MaxIdleTime"];
}
}
}
@@ -0,0 +1,89 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* 音频编码参数。
*
* @method integer getSampleRate() 获取输出流音频采样率。取值为[48000, 44100, 32000, 24000, 16000, 8000],单位是Hz。
* @method void setSampleRate(integer $SampleRate) 设置输出流音频采样率。取值为[48000, 44100, 32000, 24000, 16000, 8000],单位是Hz。
* @method integer getChannel() 获取输出流音频声道数,取值范围[1,2],1表示混流输出音频为单声道,2表示混流输出音频为双声道。
* @method void setChannel(integer $Channel) 设置输出流音频声道数,取值范围[1,2],1表示混流输出音频为单声道,2表示混流输出音频为双声道。
* @method integer getBitRate() 获取输出流音频码率。取值范围[8,500],单位为kbps。
* @method void setBitRate(integer $BitRate) 设置输出流音频码率。取值范围[8,500],单位为kbps。
* @method integer getCodec() 获取输出流音频编码类型,取值范围[0, 1, 2]0为LC-AAC1为HE-AAC2为HE-AACv2。默认值为0。当音频编码设置为HE-AACv2时,只支持输出流音频声道数为双声道。HE-AAC和HE-AACv2支持的输出流音频采样率范围为[48000, 44100, 32000, 24000, 16000]
* @method void setCodec(integer $Codec) 设置输出流音频编码类型,取值范围[0, 1, 2]0为LC-AAC1为HE-AAC2为HE-AACv2。默认值为0。当音频编码设置为HE-AACv2时,只支持输出流音频声道数为双声道。HE-AAC和HE-AACv2支持的输出流音频采样率范围为[48000, 44100, 32000, 24000, 16000]
*/
class AudioEncode extends AbstractModel
{
/**
* @var integer 输出流音频采样率。取值为[48000, 44100, 32000, 24000, 16000, 8000],单位是Hz。
*/
public $SampleRate;
/**
* @var integer 输出流音频声道数,取值范围[1,2],1表示混流输出音频为单声道,2表示混流输出音频为双声道。
*/
public $Channel;
/**
* @var integer 输出流音频码率。取值范围[8,500],单位为kbps。
*/
public $BitRate;
/**
* @var integer 输出流音频编码类型,取值范围[0, 1, 2]0为LC-AAC1为HE-AAC2为HE-AACv2。默认值为0。当音频编码设置为HE-AACv2时,只支持输出流音频声道数为双声道。HE-AAC和HE-AACv2支持的输出流音频采样率范围为[48000, 44100, 32000, 24000, 16000]
*/
public $Codec;
/**
* @param integer $SampleRate 输出流音频采样率。取值为[48000, 44100, 32000, 24000, 16000, 8000],单位是Hz。
* @param integer $Channel 输出流音频声道数,取值范围[1,2],1表示混流输出音频为单声道,2表示混流输出音频为双声道。
* @param integer $BitRate 输出流音频码率。取值范围[8,500],单位为kbps。
* @param integer $Codec 输出流音频编码类型,取值范围[0, 1, 2]0为LC-AAC1为HE-AAC2为HE-AACv2。默认值为0。当音频编码设置为HE-AACv2时,只支持输出流音频声道数为双声道。HE-AAC和HE-AACv2支持的输出流音频采样率范围为[48000, 44100, 32000, 24000, 16000]
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SampleRate",$param) and $param["SampleRate"] !== null) {
$this->SampleRate = $param["SampleRate"];
}
if (array_key_exists("Channel",$param) and $param["Channel"] !== null) {
$this->Channel = $param["Channel"];
}
if (array_key_exists("BitRate",$param) and $param["BitRate"] !== null) {
$this->BitRate = $param["BitRate"];
}
if (array_key_exists("Codec",$param) and $param["Codec"] !== null) {
$this->Codec = $param["Codec"];
}
}
}
@@ -0,0 +1,97 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* 录制音频转码参数。
*
* @method integer getSampleRate() 获取音频采样率枚举值:(注意1 代表48000HZ, 2 代表44100HZ, 3 代表16000HZ)
148000Hz(默认);
244100Hz
316000Hz。
* @method void setSampleRate(integer $SampleRate) 设置音频采样率枚举值:(注意1 代表48000HZ, 2 代表44100HZ, 3 代表16000HZ)
148000Hz(默认);
244100Hz
316000Hz。
* @method integer getChannel() 获取声道数枚举值:
1:单声道;
2:双声道(默认)。
* @method void setChannel(integer $Channel) 设置声道数枚举值:
1:单声道;
2:双声道(默认)。
* @method integer getBitRate() 获取音频码率: 取值范围[32000, 128000] ,单位bps,默认64000bps。
* @method void setBitRate(integer $BitRate) 设置音频码率: 取值范围[32000, 128000] ,单位bps,默认64000bps。
*/
class AudioParams extends AbstractModel
{
/**
* @var integer 音频采样率枚举值:(注意1 代表48000HZ, 2 代表44100HZ, 3 代表16000HZ)
148000Hz(默认);
244100Hz
316000Hz。
*/
public $SampleRate;
/**
* @var integer 声道数枚举值:
1:单声道;
2:双声道(默认)。
*/
public $Channel;
/**
* @var integer 音频码率: 取值范围[32000, 128000] ,单位bps,默认64000bps。
*/
public $BitRate;
/**
* @param integer $SampleRate 音频采样率枚举值:(注意1 代表48000HZ, 2 代表44100HZ, 3 代表16000HZ)
148000Hz(默认);
244100Hz
316000Hz。
* @param integer $Channel 声道数枚举值:
1:单声道;
2:双声道(默认)。
* @param integer $BitRate 音频码率: 取值范围[32000, 128000] ,单位bps,默认64000bps。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SampleRate",$param) and $param["SampleRate"] !== null) {
$this->SampleRate = $param["SampleRate"];
}
if (array_key_exists("Channel",$param) and $param["Channel"] !== null) {
$this->Channel = $param["Channel"];
}
if (array_key_exists("BitRate",$param) and $param["BitRate"] !== null) {
$this->BitRate = $param["BitRate"];
}
}
}
@@ -0,0 +1,129 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* 第三方云存储的账号信息。
*
* @method integer getVendor() 获取第三方云储存的供应商:
0:腾讯云存储 COS。
*注意】:目前第三方仅支持腾讯云存储COS,暂不支持AWS等其他第三方云存储。
* @method void setVendor(integer $Vendor) 设置第三方云储存的供应商:
0:腾讯云存储 COS。
*注意】:目前第三方仅支持腾讯云存储COS,暂不支持AWS等其他第三方云存储。
* @method string getRegion() 获取第三方云存储的地域信息。
* @method void setRegion(string $Region) 设置第三方云存储的地域信息。
* @method string getBucket() 获取第三方存储桶信息。
* @method void setBucket(string $Bucket) 设置第三方存储桶信息。
* @method string getAccessKey() 获取第三方存储的access_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretId值。
* @method void setAccessKey(string $AccessKey) 设置第三方存储的access_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretId值。
* @method string getSecretKey() 获取第三方存储的secret_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretKey值。
* @method void setSecretKey(string $SecretKey) 设置第三方存储的secret_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretKey值。
* @method array getFileNamePrefix() 获取第三方云存储bucket 的指定位置,由字符串数组组成。合法的字符串范围a~z,A~Z,0~9,'_''-',举个例子,录制文件xxx.m3u8在 ["prefix1", "prefix2"]作用下,会变成prefix1/prefix2/TaskId/xxx.m3u8。
* @method void setFileNamePrefix(array $FileNamePrefix) 设置第三方云存储bucket 的指定位置,由字符串数组组成。合法的字符串范围a~z,A~Z,0~9,'_''-',举个例子,录制文件xxx.m3u8在 ["prefix1", "prefix2"]作用下,会变成prefix1/prefix2/TaskId/xxx.m3u8。
*/
class CloudStorage extends AbstractModel
{
/**
* @var integer 第三方云储存的供应商:
0:腾讯云存储 COS。
*注意】:目前第三方仅支持腾讯云存储COS,暂不支持AWS等其他第三方云存储。
*/
public $Vendor;
/**
* @var string 第三方云存储的地域信息。
*/
public $Region;
/**
* @var string 第三方存储桶信息。
*/
public $Bucket;
/**
* @var string 第三方存储的access_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretId值。
*/
public $AccessKey;
/**
* @var string 第三方存储的secret_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretKey值。
*/
public $SecretKey;
/**
* @var array 第三方云存储bucket 的指定位置,由字符串数组组成。合法的字符串范围a~z,A~Z,0~9,'_''-',举个例子,录制文件xxx.m3u8在 ["prefix1", "prefix2"]作用下,会变成prefix1/prefix2/TaskId/xxx.m3u8。
*/
public $FileNamePrefix;
/**
* @param integer $Vendor 第三方云储存的供应商:
0:腾讯云存储 COS。
*注意】:目前第三方仅支持腾讯云存储COS,暂不支持AWS等其他第三方云存储。
* @param string $Region 第三方云存储的地域信息。
* @param string $Bucket 第三方存储桶信息。
* @param string $AccessKey 第三方存储的access_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretId值。
* @param string $SecretKey 第三方存储的secret_key账号信息。
若存储至腾讯云COS,请前往https://console.cloud.tencent.com/cam/capi 查看或创建,对应链接中密钥字段的SecretKey值。
* @param array $FileNamePrefix 第三方云存储bucket 的指定位置,由字符串数组组成。合法的字符串范围a~z,A~Z,0~9,'_''-',举个例子,录制文件xxx.m3u8在 ["prefix1", "prefix2"]作用下,会变成prefix1/prefix2/TaskId/xxx.m3u8。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Vendor",$param) and $param["Vendor"] !== null) {
$this->Vendor = $param["Vendor"];
}
if (array_key_exists("Region",$param) and $param["Region"] !== null) {
$this->Region = $param["Region"];
}
if (array_key_exists("Bucket",$param) and $param["Bucket"] !== null) {
$this->Bucket = $param["Bucket"];
}
if (array_key_exists("AccessKey",$param) and $param["AccessKey"] !== null) {
$this->AccessKey = $param["AccessKey"];
}
if (array_key_exists("SecretKey",$param) and $param["SecretKey"] !== null) {
$this->SecretKey = $param["SecretKey"];
}
if (array_key_exists("FileNamePrefix",$param) and $param["FileNamePrefix"] !== null) {
$this->FileNamePrefix = $param["FileNamePrefix"];
}
}
}
@@ -0,0 +1,54 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* 点播相关参数。
*
* @method TencentVod getTencentVod() 获取腾讯云点播相关参数。
* @method void setTencentVod(TencentVod $TencentVod) 设置腾讯云点播相关参数。
*/
class CloudVod extends AbstractModel
{
/**
* @var TencentVod 腾讯云点播相关参数。
*/
public $TencentVod;
/**
* @param TencentVod $TencentVod 腾讯云点播相关参数。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("TencentVod",$param) and $param["TencentVod"] !== null) {
$this->TencentVod = new TencentVod();
$this->TencentVod->deserialize($param["TencentVod"]);
}
}
}
@@ -0,0 +1,193 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* CreateCloudRecording请求参数结构体
*
* @method integer getSdkAppId() 获取TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同。
* @method void setSdkAppId(integer $SdkAppId) 设置TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同。
* @method string getRoomId() 获取TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId。
* @method void setRoomId(string $RoomId) 设置TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId。
* @method string getUserId() 获取录制机器人的UserId,用于进房发起录制任务。
*注意】这个UserId不能与当前房间内的主播观众[UserId](https://cloud.tencent.com/document/product/647/46351#userid)重复,也不可能指定相同的录制机器人UserId同时进房。建议可以把房间ID作为UserId的标识的一部分,即录制机器人UserId在房间内唯一。
* @method void setUserId(string $UserId) 设置录制机器人的UserId,用于进房发起录制任务。
*注意】这个UserId不能与当前房间内的主播观众[UserId](https://cloud.tencent.com/document/product/647/46351#userid)重复,也不可能指定相同的录制机器人UserId同时进房。建议可以把房间ID作为UserId的标识的一部分,即录制机器人UserId在房间内唯一。
* @method string getUserSig() 获取录制机器人UserId对应的校验签名,即UserId和UserSig相当于录制机器人进房的登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
* @method void setUserSig(string $UserSig) 设置录制机器人UserId对应的校验签名,即UserId和UserSig相当于录制机器人进房的登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
* @method RecordParams getRecordParams() 获取云端录制控制参数。
* @method void setRecordParams(RecordParams $RecordParams) 设置云端录制控制参数。
* @method StorageParams getStorageParams() 获取云端录制文件上传到云存储的参数(目前支持云点播VOD和对象存储COS)。点播和对象存储的参数必填其中之一,不支持同时设置点播和对象存储。
* @method void setStorageParams(StorageParams $StorageParams) 设置云端录制文件上传到云存储的参数(目前支持云点播VOD和对象存储COS)。点播和对象存储的参数必填其中之一,不支持同时设置点播和对象存储。
* @method integer getRoomIdType() 获取TRTC房间号的类型。
*注意】必须和录制的房间所对应的RoomId类型相同:
0: 字符串类型的RoomId
1: 32位整型的RoomId(默认)
* @method void setRoomIdType(integer $RoomIdType) 设置TRTC房间号的类型。
*注意】必须和录制的房间所对应的RoomId类型相同:
0: 字符串类型的RoomId
1: 32位整型的RoomId(默认)
* @method MixTranscodeParams getMixTranscodeParams() 获取混流的转码参数,录制模式为混流的时候可以设置。
* @method void setMixTranscodeParams(MixTranscodeParams $MixTranscodeParams) 设置混流的转码参数,录制模式为混流的时候可以设置。
* @method MixLayoutParams getMixLayoutParams() 获取混流的布局参数,录制模式为混流的时候可以设置。
* @method void setMixLayoutParams(MixLayoutParams $MixLayoutParams) 设置混流的布局参数,录制模式为混流的时候可以设置。
* @method integer getResourceExpiredHour() 获取接口可以调用的时效性,从成功开启录制并获得任务ID后开始计算,超时后无法调用查询、更新和停止等接口,但是录制任务不会停止。 参数的单位是小时,默认72小时(3天),最大可设置720小时(30天),最小设置6小时。举例说明:如果不设置该参数,那么开始录制成功后,查询、更新和停止录制的调用时效为72个小时。
* @method void setResourceExpiredHour(integer $ResourceExpiredHour) 设置接口可以调用的时效性,从成功开启录制并获得任务ID后开始计算,超时后无法调用查询、更新和停止等接口,但是录制任务不会停止。 参数的单位是小时,默认72小时(3天),最大可设置720小时(30天),最小设置6小时。举例说明:如果不设置该参数,那么开始录制成功后,查询、更新和停止录制的调用时效为72个小时。
* @method string getPrivateMapKey() 获取TRTC房间权限加密串,只有在TRTC控制台启用了高级权限控制的时候需要携带,在TRTC控制台如果开启高级权限控制后,TRTC 的后台服务系统会校验一个叫做 [PrivateMapKey] 的“权限票据”,权限票据中包含了一个加密后的 RoomId 和一个加密后的“权限位列表”。由于 PrivateMapKey 中包含 RoomId,所以只提供了 UserSig 没有提供 PrivateMapKey 时,并不能进入指定的房间。
* @method void setPrivateMapKey(string $PrivateMapKey) 设置TRTC房间权限加密串,只有在TRTC控制台启用了高级权限控制的时候需要携带,在TRTC控制台如果开启高级权限控制后,TRTC 的后台服务系统会校验一个叫做 [PrivateMapKey] 的“权限票据”,权限票据中包含了一个加密后的 RoomId 和一个加密后的“权限位列表”。由于 PrivateMapKey 中包含 RoomId,所以只提供了 UserSig 没有提供 PrivateMapKey 时,并不能进入指定的房间。
*/
class CreateCloudRecordingRequest extends AbstractModel
{
/**
* @var integer TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同。
*/
public $SdkAppId;
/**
* @var string TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId。
*/
public $RoomId;
/**
* @var string 录制机器人的UserId,用于进房发起录制任务。
*注意】这个UserId不能与当前房间内的主播观众[UserId](https://cloud.tencent.com/document/product/647/46351#userid)重复,也不可能指定相同的录制机器人UserId同时进房。建议可以把房间ID作为UserId的标识的一部分,即录制机器人UserId在房间内唯一。
*/
public $UserId;
/**
* @var string 录制机器人UserId对应的校验签名,即UserId和UserSig相当于录制机器人进房的登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
*/
public $UserSig;
/**
* @var RecordParams 云端录制控制参数。
*/
public $RecordParams;
/**
* @var StorageParams 云端录制文件上传到云存储的参数(目前支持云点播VOD和对象存储COS)。点播和对象存储的参数必填其中之一,不支持同时设置点播和对象存储。
*/
public $StorageParams;
/**
* @var integer TRTC房间号的类型。
*注意】必须和录制的房间所对应的RoomId类型相同:
0: 字符串类型的RoomId
1: 32位整型的RoomId(默认)
*/
public $RoomIdType;
/**
* @var MixTranscodeParams 混流的转码参数,录制模式为混流的时候可以设置。
*/
public $MixTranscodeParams;
/**
* @var MixLayoutParams 混流的布局参数,录制模式为混流的时候可以设置。
*/
public $MixLayoutParams;
/**
* @var integer 接口可以调用的时效性,从成功开启录制并获得任务ID后开始计算,超时后无法调用查询、更新和停止等接口,但是录制任务不会停止。 参数的单位是小时,默认72小时(3天),最大可设置720小时(30天),最小设置6小时。举例说明:如果不设置该参数,那么开始录制成功后,查询、更新和停止录制的调用时效为72个小时。
*/
public $ResourceExpiredHour;
/**
* @var string TRTC房间权限加密串,只有在TRTC控制台启用了高级权限控制的时候需要携带,在TRTC控制台如果开启高级权限控制后,TRTC 的后台服务系统会校验一个叫做 [PrivateMapKey] 的“权限票据”,权限票据中包含了一个加密后的 RoomId 和一个加密后的“权限位列表”。由于 PrivateMapKey 中包含 RoomId,所以只提供了 UserSig 没有提供 PrivateMapKey 时,并不能进入指定的房间。
*/
public $PrivateMapKey;
/**
* @param integer $SdkAppId TRTC的[SdkAppId](https://cloud.tencent.com/document/product/647/46351#sdkappid),和录制的房间所对应的SdkAppId相同。
* @param string $RoomId TRTC的[RoomId](https://cloud.tencent.com/document/product/647/46351#roomid),录制的TRTC房间所对应的RoomId。
* @param string $UserId 录制机器人的UserId,用于进房发起录制任务。
*注意】这个UserId不能与当前房间内的主播观众[UserId](https://cloud.tencent.com/document/product/647/46351#userid)重复,也不可能指定相同的录制机器人UserId同时进房。建议可以把房间ID作为UserId的标识的一部分,即录制机器人UserId在房间内唯一。
* @param string $UserSig 录制机器人UserId对应的校验签名,即UserId和UserSig相当于录制机器人进房的登录密码,具体计算方法请参考TRTC计算[UserSig](https://cloud.tencent.com/document/product/647/45910#UserSig)的方案。
* @param RecordParams $RecordParams 云端录制控制参数。
* @param StorageParams $StorageParams 云端录制文件上传到云存储的参数(目前支持云点播VOD和对象存储COS)。点播和对象存储的参数必填其中之一,不支持同时设置点播和对象存储。
* @param integer $RoomIdType TRTC房间号的类型。
*注意】必须和录制的房间所对应的RoomId类型相同:
0: 字符串类型的RoomId
1: 32位整型的RoomId(默认)
* @param MixTranscodeParams $MixTranscodeParams 混流的转码参数,录制模式为混流的时候可以设置。
* @param MixLayoutParams $MixLayoutParams 混流的布局参数,录制模式为混流的时候可以设置。
* @param integer $ResourceExpiredHour 接口可以调用的时效性,从成功开启录制并获得任务ID后开始计算,超时后无法调用查询、更新和停止等接口,但是录制任务不会停止。 参数的单位是小时,默认72小时(3天),最大可设置720小时(30天),最小设置6小时。举例说明:如果不设置该参数,那么开始录制成功后,查询、更新和停止录制的调用时效为72个小时。
* @param string $PrivateMapKey TRTC房间权限加密串,只有在TRTC控制台启用了高级权限控制的时候需要携带,在TRTC控制台如果开启高级权限控制后,TRTC 的后台服务系统会校验一个叫做 [PrivateMapKey] 的“权限票据”,权限票据中包含了一个加密后的 RoomId 和一个加密后的“权限位列表”。由于 PrivateMapKey 中包含 RoomId,所以只提供了 UserSig 没有提供 PrivateMapKey 时,并不能进入指定的房间。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
if (array_key_exists("UserId",$param) and $param["UserId"] !== null) {
$this->UserId = $param["UserId"];
}
if (array_key_exists("UserSig",$param) and $param["UserSig"] !== null) {
$this->UserSig = $param["UserSig"];
}
if (array_key_exists("RecordParams",$param) and $param["RecordParams"] !== null) {
$this->RecordParams = new RecordParams();
$this->RecordParams->deserialize($param["RecordParams"]);
}
if (array_key_exists("StorageParams",$param) and $param["StorageParams"] !== null) {
$this->StorageParams = new StorageParams();
$this->StorageParams->deserialize($param["StorageParams"]);
}
if (array_key_exists("RoomIdType",$param) and $param["RoomIdType"] !== null) {
$this->RoomIdType = $param["RoomIdType"];
}
if (array_key_exists("MixTranscodeParams",$param) and $param["MixTranscodeParams"] !== null) {
$this->MixTranscodeParams = new MixTranscodeParams();
$this->MixTranscodeParams->deserialize($param["MixTranscodeParams"]);
}
if (array_key_exists("MixLayoutParams",$param) and $param["MixLayoutParams"] !== null) {
$this->MixLayoutParams = new MixLayoutParams();
$this->MixLayoutParams->deserialize($param["MixLayoutParams"]);
}
if (array_key_exists("ResourceExpiredHour",$param) and $param["ResourceExpiredHour"] !== null) {
$this->ResourceExpiredHour = $param["ResourceExpiredHour"];
}
if (array_key_exists("PrivateMapKey",$param) and $param["PrivateMapKey"] !== null) {
$this->PrivateMapKey = $param["PrivateMapKey"];
}
}
}
@@ -0,0 +1,65 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* CreateCloudRecording返回参数结构体
*
* @method string getTaskId() 获取云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。任务 ID需要业务保存下来,作为下次针对这个录制任务操作的参数。
* @method void setTaskId(string $TaskId) 设置云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。任务 ID需要业务保存下来,作为下次针对这个录制任务操作的参数。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class CreateCloudRecordingResponse extends AbstractModel
{
/**
* @var string 云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。任务 ID需要业务保存下来,作为下次针对这个录制任务操作的参数。
*/
public $TaskId;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param string $TaskId 云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。任务 ID需要业务保存下来,作为下次针对这个录制任务操作的参数。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("TaskId",$param) and $param["TaskId"] !== null) {
$this->TaskId = $param["TaskId"];
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,125 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* CreatePicture请求参数结构体
*
* @method integer getSdkAppId() 获取应用id
* @method void setSdkAppId(integer $SdkAppId) 设置应用id
* @method string getContent() 获取图片内容经base64编码后的string格式,最大长度为2M
* @method void setContent(string $Content) 设置图片内容经base64编码后的string格式,最大长度为2M
* @method string getSuffix() 获取图片后缀名
* @method void setSuffix(string $Suffix) 设置图片后缀名
* @method integer getHeight() 获取图片长度
* @method void setHeight(integer $Height) 设置图片长度
* @method integer getWidth() 获取图片宽度
* @method void setWidth(integer $Width) 设置图片宽度
* @method integer getXPosition() 获取显示位置x轴方向
* @method void setXPosition(integer $XPosition) 设置显示位置x轴方向
* @method integer getYPosition() 获取显示位置y轴方向
* @method void setYPosition(integer $YPosition) 设置显示位置y轴方向
*/
class CreatePictureRequest extends AbstractModel
{
/**
* @var integer 应用id
*/
public $SdkAppId;
/**
* @var string 图片内容经base64编码后的string格式,最大长度为2M
*/
public $Content;
/**
* @var string 图片后缀名
*/
public $Suffix;
/**
* @var integer 图片长度
*/
public $Height;
/**
* @var integer 图片宽度
*/
public $Width;
/**
* @var integer 显示位置x轴方向
*/
public $XPosition;
/**
* @var integer 显示位置y轴方向
*/
public $YPosition;
/**
* @param integer $SdkAppId 应用id
* @param string $Content 图片内容经base64编码后的string格式,最大长度为2M
* @param string $Suffix 图片后缀名
* @param integer $Height 图片长度
* @param integer $Width 图片宽度
* @param integer $XPosition 显示位置x轴方向
* @param integer $YPosition 显示位置y轴方向
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("Content",$param) and $param["Content"] !== null) {
$this->Content = $param["Content"];
}
if (array_key_exists("Suffix",$param) and $param["Suffix"] !== null) {
$this->Suffix = $param["Suffix"];
}
if (array_key_exists("Height",$param) and $param["Height"] !== null) {
$this->Height = $param["Height"];
}
if (array_key_exists("Width",$param) and $param["Width"] !== null) {
$this->Width = $param["Width"];
}
if (array_key_exists("XPosition",$param) and $param["XPosition"] !== null) {
$this->XPosition = $param["XPosition"];
}
if (array_key_exists("YPosition",$param) and $param["YPosition"] !== null) {
$this->YPosition = $param["YPosition"];
}
}
}
@@ -0,0 +1,65 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* CreatePicture返回参数结构体
*
* @method integer getPictureId() 获取图片id
* @method void setPictureId(integer $PictureId) 设置图片id
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class CreatePictureResponse extends AbstractModel
{
/**
* @var integer 图片id
*/
public $PictureId;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param integer $PictureId 图片id
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("PictureId",$param) and $param["PictureId"] !== null) {
$this->PictureId = $param["PictureId"];
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,65 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DeleteCloudRecording请求参数结构体
*
* @method integer getSdkAppId() 获取TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
* @method void setSdkAppId(integer $SdkAppId) 设置TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
* @method string getTaskId() 获取录制任务的唯一Id,在启动录制成功后会返回。
* @method void setTaskId(string $TaskId) 设置录制任务的唯一Id,在启动录制成功后会返回。
*/
class DeleteCloudRecordingRequest extends AbstractModel
{
/**
* @var integer TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
*/
public $SdkAppId;
/**
* @var string 录制任务的唯一Id,在启动录制成功后会返回。
*/
public $TaskId;
/**
* @param integer $SdkAppId TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
* @param string $TaskId 录制任务的唯一Id,在启动录制成功后会返回。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("TaskId",$param) and $param["TaskId"] !== null) {
$this->TaskId = $param["TaskId"];
}
}
}
@@ -0,0 +1,65 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DeleteCloudRecording返回参数结构体
*
* @method string getTaskId() 获取云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。
* @method void setTaskId(string $TaskId) 设置云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DeleteCloudRecordingResponse extends AbstractModel
{
/**
* @var string 云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。
*/
public $TaskId;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param string $TaskId 云录制服务分配的任务 ID。任务 ID 是对一次录制生命周期过程的唯一标识,结束录制时会失去意义。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("TaskId",$param) and $param["TaskId"] !== null) {
$this->TaskId = $param["TaskId"];
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,65 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DeletePicture请求参数结构体
*
* @method integer getPictureId() 获取图片id
* @method void setPictureId(integer $PictureId) 设置图片id
* @method integer getSdkAppId() 获取应用id
* @method void setSdkAppId(integer $SdkAppId) 设置应用id
*/
class DeletePictureRequest extends AbstractModel
{
/**
* @var integer 图片id
*/
public $PictureId;
/**
* @var integer 应用id
*/
public $SdkAppId;
/**
* @param integer $PictureId 图片id
* @param integer $SdkAppId 应用id
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("PictureId",$param) and $param["PictureId"] !== null) {
$this->PictureId = $param["PictureId"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,53 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DeletePicture返回参数结构体
*
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DeletePictureResponse extends AbstractModel
{
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,213 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeCallDetailInfo请求参数结构体
*
* @method string getCommId() 获取通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @method void setCommId(string $CommId) 设置通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @method integer getStartTime() 获取查询开始时间,本地unix时间戳,单位为秒(如:1590065777),
注意:支持查询14天内的数据。
* @method void setStartTime(integer $StartTime) 设置查询开始时间,本地unix时间戳,单位为秒(如:1590065777),
注意:支持查询14天内的数据。
* @method integer getEndTime() 获取查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:DataType 不为null ,与StartTime间隔时间不超过1小时;DataType 为null,与StartTime间隔时间不超过4小时。
* @method void setEndTime(integer $EndTime) 设置查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:DataType 不为null ,与StartTime间隔时间不超过1小时;DataType 为null,与StartTime间隔时间不超过4小时。
* @method integer getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx)。
* @method void setSdkAppId(integer $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx)。
* @method array getUserIds() 获取需查询的用户数组,默认不填返回6个用户。
* @method void setUserIds(array $UserIds) 设置需查询的用户数组,默认不填返回6个用户。
* @method array getDataType() 获取需查询的指标,不填则只返回用户列表,填all则返回所有指标。
appCpuAPP CPU使用率;
sysCpu:系统 CPU使用率;
aBit:上/下行音频码率;单位:bps
aBlock:音频卡顿时长;单位:ms
bigvBit:上/下行视频码率;单位:bps
bigvCapFps:视频采集帧率;
bigvEncFps:视频发送帧率;
bigvDecFps:渲染帧率;
bigvBlock:视频卡顿时长;单位:ms
aLoss:上/下行音频丢包率;
bigvLoss:上/下行视频丢包率;
bigvWidth:上/下行分辨率宽;
bigvHeight:上/下行分辨率高
* @method void setDataType(array $DataType) 设置需查询的指标,不填则只返回用户列表,填all则返回所有指标。
appCpuAPP CPU使用率;
sysCpu:系统 CPU使用率;
aBit:上/下行音频码率;单位:bps
aBlock:音频卡顿时长;单位:ms
bigvBit:上/下行视频码率;单位:bps
bigvCapFps:视频采集帧率;
bigvEncFps:视频发送帧率;
bigvDecFps:渲染帧率;
bigvBlock:视频卡顿时长;单位:ms
aLoss:上/下行音频丢包率;
bigvLoss:上/下行视频丢包率;
bigvWidth:上/下行分辨率宽;
bigvHeight:上/下行分辨率高
* @method integer getPageNumber() 获取当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
* @method void setPageNumber(integer $PageNumber) 设置当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
* @method integer getPageSize() 获取每页个数,默认为6
范围:[1100]
注意:DataType不为nullUserIds长度不能超过6PageSize最大值不超过6;
DataType 为nullUserIds长度不超过100PageSize最大不超过100。
* @method void setPageSize(integer $PageSize) 设置每页个数,默认为6
范围:[1100]
注意:DataType不为nullUserIds长度不能超过6PageSize最大值不超过6;
DataType 为nullUserIds长度不超过100PageSize最大不超过100。
*/
class DescribeCallDetailInfoRequest extends AbstractModel
{
/**
* @var string 通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
*/
public $CommId;
/**
* @var integer 查询开始时间,本地unix时间戳,单位为秒(如:1590065777),
注意:支持查询14天内的数据。
*/
public $StartTime;
/**
* @var integer 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:DataType 不为null ,与StartTime间隔时间不超过1小时;DataType 为null,与StartTime间隔时间不超过4小时。
*/
public $EndTime;
/**
* @var integer 用户SdkAppId(如:1400xxxxxx)。
*/
public $SdkAppId;
/**
* @var array 需查询的用户数组,默认不填返回6个用户。
*/
public $UserIds;
/**
* @var array 需查询的指标,不填则只返回用户列表,填all则返回所有指标。
appCpuAPP CPU使用率;
sysCpu:系统 CPU使用率;
aBit:上/下行音频码率;单位:bps
aBlock:音频卡顿时长;单位:ms
bigvBit:上/下行视频码率;单位:bps
bigvCapFps:视频采集帧率;
bigvEncFps:视频发送帧率;
bigvDecFps:渲染帧率;
bigvBlock:视频卡顿时长;单位:ms
aLoss:上/下行音频丢包率;
bigvLoss:上/下行视频丢包率;
bigvWidth:上/下行分辨率宽;
bigvHeight:上/下行分辨率高
*/
public $DataType;
/**
* @var integer 当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
*/
public $PageNumber;
/**
* @var integer 每页个数,默认为6
范围:[1100]
注意:DataType不为nullUserIds长度不能超过6PageSize最大值不超过6;
DataType 为nullUserIds长度不超过100PageSize最大不超过100。
*/
public $PageSize;
/**
* @param string $CommId 通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @param integer $StartTime 查询开始时间,本地unix时间戳,单位为秒(如:1590065777),
注意:支持查询14天内的数据。
* @param integer $EndTime 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:DataType 不为null ,与StartTime间隔时间不超过1小时;DataType 为null,与StartTime间隔时间不超过4小时。
* @param integer $SdkAppId 用户SdkAppId(如:1400xxxxxx)。
* @param array $UserIds 需查询的用户数组,默认不填返回6个用户。
* @param array $DataType 需查询的指标,不填则只返回用户列表,填all则返回所有指标。
appCpuAPP CPU使用率;
sysCpu:系统 CPU使用率;
aBit:上/下行音频码率;单位:bps
aBlock:音频卡顿时长;单位:ms
bigvBit:上/下行视频码率;单位:bps
bigvCapFps:视频采集帧率;
bigvEncFps:视频发送帧率;
bigvDecFps:渲染帧率;
bigvBlock:视频卡顿时长;单位:ms
aLoss:上/下行音频丢包率;
bigvLoss:上/下行视频丢包率;
bigvWidth:上/下行分辨率宽;
bigvHeight:上/下行分辨率高
* @param integer $PageNumber 当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
* @param integer $PageSize 每页个数,默认为6
范围:[1100]
注意:DataType不为nullUserIds长度不能超过6PageSize最大值不超过6;
DataType 为nullUserIds长度不超过100PageSize最大不超过100。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("CommId",$param) and $param["CommId"] !== null) {
$this->CommId = $param["CommId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("UserIds",$param) and $param["UserIds"] !== null) {
$this->UserIds = $param["UserIds"];
}
if (array_key_exists("DataType",$param) and $param["DataType"] !== null) {
$this->DataType = $param["DataType"];
}
if (array_key_exists("PageNumber",$param) and $param["PageNumber"] !== null) {
$this->PageNumber = $param["PageNumber"];
}
if (array_key_exists("PageSize",$param) and $param["PageSize"] !== null) {
$this->PageSize = $param["PageSize"];
}
}
}
@@ -0,0 +1,107 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeCallDetailInfo返回参数结构体
*
* @method integer getTotal() 获取返回的用户总条数
* @method void setTotal(integer $Total) 设置返回的用户总条数
* @method array getUserList() 获取用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
* @method void setUserList(array $UserList) 设置用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
* @method array getData() 获取质量数据
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(array $Data) 设置质量数据
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeCallDetailInfoResponse extends AbstractModel
{
/**
* @var integer 返回的用户总条数
*/
public $Total;
/**
* @var array 用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
*/
public $UserList;
/**
* @var array 质量数据
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param integer $Total 返回的用户总条数
* @param array $UserList 用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
* @param array $Data 质量数据
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Total",$param) and $param["Total"] !== null) {
$this->Total = $param["Total"];
}
if (array_key_exists("UserList",$param) and $param["UserList"] !== null) {
$this->UserList = [];
foreach ($param["UserList"] as $key => $value){
$obj = new UserInformation();
$obj->deserialize($value);
array_push($this->UserList, $obj);
}
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = [];
foreach ($param["Data"] as $key => $value){
$obj = new QualityData();
$obj->deserialize($value);
array_push($this->Data, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,65 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeCloudRecording请求参数结构体
*
* @method integer getSdkAppId() 获取TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
* @method void setSdkAppId(integer $SdkAppId) 设置TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
* @method string getTaskId() 获取录制任务的唯一Id,在启动录制成功后会返回。
* @method void setTaskId(string $TaskId) 设置录制任务的唯一Id,在启动录制成功后会返回。
*/
class DescribeCloudRecordingRequest extends AbstractModel
{
/**
* @var integer TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
*/
public $SdkAppId;
/**
* @var string 录制任务的唯一Id,在启动录制成功后会返回。
*/
public $TaskId;
/**
* @param integer $SdkAppId TRTC的SDKAppId,和录制的房间所对应的SDKAppId相同。
* @param string $TaskId 录制任务的唯一Id,在启动录制成功后会返回。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("TaskId",$param) and $param["TaskId"] !== null) {
$this->TaskId = $param["TaskId"];
}
}
}
@@ -0,0 +1,110 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeCloudRecording返回参数结构体
*
* @method string getTaskId() 获取录制任务的唯一Id。
* @method void setTaskId(string $TaskId) 设置录制任务的唯一Id。
* @method string getStatus() 获取云端录制任务的状态信息。
Idle:表示当前录制任务空闲中
InProgress:表示当前录制任务正在进行中。
Exited:表示当前录制任务正在退出的过程中。
* @method void setStatus(string $Status) 设置云端录制任务的状态信息。
Idle:表示当前录制任务空闲中
InProgress:表示当前录制任务正在进行中。
Exited:表示当前录制任务正在退出的过程中。
* @method array getStorageFileList() 获取录制文件信息。
注意:此字段可能返回 null,表示取不到有效值。
* @method void setStorageFileList(array $StorageFileList) 设置录制文件信息。
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeCloudRecordingResponse extends AbstractModel
{
/**
* @var string 录制任务的唯一Id。
*/
public $TaskId;
/**
* @var string 云端录制任务的状态信息。
Idle:表示当前录制任务空闲中
InProgress:表示当前录制任务正在进行中。
Exited:表示当前录制任务正在退出的过程中。
*/
public $Status;
/**
* @var array 录制文件信息。
注意:此字段可能返回 null,表示取不到有效值。
*/
public $StorageFileList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param string $TaskId 录制任务的唯一Id。
* @param string $Status 云端录制任务的状态信息。
Idle:表示当前录制任务空闲中
InProgress:表示当前录制任务正在进行中。
Exited:表示当前录制任务正在退出的过程中。
* @param array $StorageFileList 录制文件信息。
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("TaskId",$param) and $param["TaskId"] !== null) {
$this->TaskId = $param["TaskId"];
}
if (array_key_exists("Status",$param) and $param["Status"] !== null) {
$this->Status = $param["Status"];
}
if (array_key_exists("StorageFileList",$param) and $param["StorageFileList"] !== null) {
$this->StorageFileList = [];
foreach ($param["StorageFileList"] as $key => $value){
$obj = new StorageFile();
$obj->deserialize($value);
array_push($this->StorageFileList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,81 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeMixTranscodingUsage请求参数结构体
*
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method integer getSdkAppId() 获取TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
* @method void setSdkAppId(integer $SdkAppId) 设置TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
class DescribeMixTranscodingUsageRequest extends AbstractModel
{
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
*/
public $EndTime;
/**
* @var integer TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
public $SdkAppId;
/**
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @param integer $SdkAppId TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,82 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeMixTranscodingUsage返回参数结构体
*
* @method array getUsageKey() 获取用量类型,与UsageValue中各个位置的值对应。
* @method void setUsageKey(array $UsageKey) 设置用量类型,与UsageValue中各个位置的值对应。
* @method array getUsageList() 获取各个时间点用量明细。
* @method void setUsageList(array $UsageList) 设置各个时间点用量明细。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeMixTranscodingUsageResponse extends AbstractModel
{
/**
* @var array 用量类型,与UsageValue中各个位置的值对应。
*/
public $UsageKey;
/**
* @var array 各个时间点用量明细。
*/
public $UsageList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param array $UsageKey 用量类型,与UsageValue中各个位置的值对应。
* @param array $UsageList 各个时间点用量明细。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("UsageKey",$param) and $param["UsageKey"] !== null) {
$this->UsageKey = $param["UsageKey"];
}
if (array_key_exists("UsageList",$param) and $param["UsageList"] !== null) {
$this->UsageList = [];
foreach ($param["UsageList"] as $key => $value){
$obj = new TrtcUsage();
$obj->deserialize($value);
array_push($this->UsageList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,89 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribePicture请求参数结构体
*
* @method integer getSdkAppId() 获取应用ID
* @method void setSdkAppId(integer $SdkAppId) 设置应用ID
* @method integer getPictureId() 获取图片ID,不填时返回该应用下所有图片
* @method void setPictureId(integer $PictureId) 设置图片ID,不填时返回该应用下所有图片
* @method integer getPageSize() 获取每页数量,不填时默认为10
* @method void setPageSize(integer $PageSize) 设置每页数量,不填时默认为10
* @method integer getPageNo() 获取页码,不填时默认为1
* @method void setPageNo(integer $PageNo) 设置页码,不填时默认为1
*/
class DescribePictureRequest extends AbstractModel
{
/**
* @var integer 应用ID
*/
public $SdkAppId;
/**
* @var integer 图片ID,不填时返回该应用下所有图片
*/
public $PictureId;
/**
* @var integer 每页数量,不填时默认为10
*/
public $PageSize;
/**
* @var integer 页码,不填时默认为1
*/
public $PageNo;
/**
* @param integer $SdkAppId 应用ID
* @param integer $PictureId 图片ID,不填时返回该应用下所有图片
* @param integer $PageSize 每页数量,不填时默认为10
* @param integer $PageNo 页码,不填时默认为1
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("PictureId",$param) and $param["PictureId"] !== null) {
$this->PictureId = $param["PictureId"];
}
if (array_key_exists("PageSize",$param) and $param["PageSize"] !== null) {
$this->PageSize = $param["PageSize"];
}
if (array_key_exists("PageNo",$param) and $param["PageNo"] !== null) {
$this->PageNo = $param["PageNo"];
}
}
}
@@ -0,0 +1,82 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribePicture返回参数结构体
*
* @method integer getTotal() 获取返回的图片记录数
* @method void setTotal(integer $Total) 设置返回的图片记录数
* @method array getPictureInfo() 获取图片信息列表
* @method void setPictureInfo(array $PictureInfo) 设置图片信息列表
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribePictureResponse extends AbstractModel
{
/**
* @var integer 返回的图片记录数
*/
public $Total;
/**
* @var array 图片信息列表
*/
public $PictureInfo;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param integer $Total 返回的图片记录数
* @param array $PictureInfo 图片信息列表
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Total",$param) and $param["Total"] !== null) {
$this->Total = $param["Total"];
}
if (array_key_exists("PictureInfo",$param) and $param["PictureInfo"] !== null) {
$this->PictureInfo = [];
foreach ($param["PictureInfo"] as $key => $value){
$obj = new PictureInfo();
$obj->deserialize($value);
array_push($this->PictureInfo, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,81 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRecordStatistic请求参数结构体
*
* @method string getStartTime() 获取查询开始日期,格式为YYYY-MM-DD。
* @method void setStartTime(string $StartTime) 设置查询开始日期,格式为YYYY-MM-DD。
* @method string getEndTime() 获取查询结束日期,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method void setEndTime(string $EndTime) 设置查询结束日期,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method integer getSdkAppId() 获取应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
* @method void setSdkAppId(integer $SdkAppId) 设置应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
*/
class DescribeRecordStatisticRequest extends AbstractModel
{
/**
* @var string 查询开始日期,格式为YYYY-MM-DD。
*/
public $StartTime;
/**
* @var string 查询结束日期,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
*/
public $EndTime;
/**
* @var integer 应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
*/
public $SdkAppId;
/**
* @param string $StartTime 查询开始日期,格式为YYYY-MM-DD。
* @param string $EndTime 查询结束日期,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @param integer $SdkAppId 应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRecordStatistic返回参数结构体
*
* @method array getSdkAppIdUsages() 获取应用的用量信息数组。
* @method void setSdkAppIdUsages(array $SdkAppIdUsages) 设置应用的用量信息数组。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeRecordStatisticResponse extends AbstractModel
{
/**
* @var array 应用的用量信息数组。
*/
public $SdkAppIdUsages;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param array $SdkAppIdUsages 应用的用量信息数组。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppIdUsages",$param) and $param["SdkAppIdUsages"] !== null) {
$this->SdkAppIdUsages = [];
foreach ($param["SdkAppIdUsages"] as $key => $value){
$obj = new SdkAppIdRecordUsage();
$obj->deserialize($value);
array_push($this->SdkAppIdUsages, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,93 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRecordingUsage请求参数结构体
*
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method string getMixType() 获取查询单流录制或合流录制,值为"single""multi"
* @method void setMixType(string $MixType) 设置查询单流录制或合流录制,值为"single""multi"
* @method integer getSdkAppId() 获取TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
* @method void setSdkAppId(integer $SdkAppId) 设置TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
class DescribeRecordingUsageRequest extends AbstractModel
{
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
*/
public $EndTime;
/**
* @var string 查询单流录制或合流录制,值为"single""multi"
*/
public $MixType;
/**
* @var integer TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
public $SdkAppId;
/**
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @param string $MixType 查询单流录制或合流录制,值为"single""multi"
* @param integer $SdkAppId TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("MixType",$param) and $param["MixType"] !== null) {
$this->MixType = $param["MixType"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,82 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRecordingUsage返回参数结构体
*
* @method array getUsageKey() 获取用量类型,与UsageValue中各个位置的值对应。
* @method void setUsageKey(array $UsageKey) 设置用量类型,与UsageValue中各个位置的值对应。
* @method array getUsageList() 获取各个时间点用量明细。
* @method void setUsageList(array $UsageList) 设置各个时间点用量明细。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeRecordingUsageResponse extends AbstractModel
{
/**
* @var array 用量类型,与UsageValue中各个位置的值对应。
*/
public $UsageKey;
/**
* @var array 各个时间点用量明细。
*/
public $UsageList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param array $UsageKey 用量类型,与UsageValue中各个位置的值对应。
* @param array $UsageList 各个时间点用量明细。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("UsageKey",$param) and $param["UsageKey"] !== null) {
$this->UsageKey = $param["UsageKey"];
}
if (array_key_exists("UsageList",$param) and $param["UsageList"] !== null) {
$this->UsageList = [];
foreach ($param["UsageList"] as $key => $value){
$obj = new TrtcUsage();
$obj->deserialize($value);
array_push($this->UsageList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,81 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRelayUsage请求参数结构体
*
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method integer getSdkAppId() 获取TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
* @method void setSdkAppId(integer $SdkAppId) 设置TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
class DescribeRelayUsageRequest extends AbstractModel
{
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
*/
public $EndTime;
/**
* @var integer TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
public $SdkAppId;
/**
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @param integer $SdkAppId TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,82 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRelayUsage返回参数结构体
*
* @method array getUsageKey() 获取用量类型,与UsageValue中各个位置的值对应。
* @method void setUsageKey(array $UsageKey) 设置用量类型,与UsageValue中各个位置的值对应。
* @method array getUsageList() 获取各个时间点用量明细。
* @method void setUsageList(array $UsageList) 设置各个时间点用量明细。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeRelayUsageResponse extends AbstractModel
{
/**
* @var array 用量类型,与UsageValue中各个位置的值对应。
*/
public $UsageKey;
/**
* @var array 各个时间点用量明细。
*/
public $UsageList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param array $UsageKey 用量类型,与UsageValue中各个位置的值对应。
* @param array $UsageList 各个时间点用量明细。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("UsageKey",$param) and $param["UsageKey"] !== null) {
$this->UsageKey = $param["UsageKey"];
}
if (array_key_exists("UsageList",$param) and $param["UsageList"] !== null) {
$this->UsageList = [];
foreach ($param["UsageList"] as $key => $value){
$obj = new TrtcUsage();
$obj->deserialize($value);
array_push($this->UsageList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,129 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRoomInfo请求参数结构体
*
* @method integer getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(integer $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method integer getStartTime() 获取查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method void setStartTime(integer $StartTime) 设置查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method integer getEndTime() 获取查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过24小时。
* @method void setEndTime(integer $EndTime) 设置查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过24小时。
* @method string getRoomId() 获取房间号(如:223)
* @method void setRoomId(string $RoomId) 设置房间号(如:223)
* @method integer getPageNumber() 获取当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回10条数据。
* @method void setPageNumber(integer $PageNumber) 设置当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回10条数据。
* @method integer getPageSize() 获取每页个数,默认为10
范围:[1100]
* @method void setPageSize(integer $PageSize) 设置每页个数,默认为10
范围:[1100]
*/
class DescribeRoomInfoRequest extends AbstractModel
{
/**
* @var integer 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var integer 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
*/
public $StartTime;
/**
* @var integer 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过24小时。
*/
public $EndTime;
/**
* @var string 房间号(如:223)
*/
public $RoomId;
/**
* @var integer 当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回10条数据。
*/
public $PageNumber;
/**
* @var integer 每页个数,默认为10
范围:[1100]
*/
public $PageSize;
/**
* @param integer $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param integer $StartTime 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @param integer $EndTime 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过24小时。
* @param string $RoomId 房间号(如:223)
* @param integer $PageNumber 当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回10条数据。
* @param integer $PageSize 每页个数,默认为10
范围:[1100]
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
if (array_key_exists("PageNumber",$param) and $param["PageNumber"] !== null) {
$this->PageNumber = $param["PageNumber"];
}
if (array_key_exists("PageSize",$param) and $param["PageSize"] !== null) {
$this->PageSize = $param["PageSize"];
}
}
}
@@ -0,0 +1,82 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeRoomInfo返回参数结构体
*
* @method integer getTotal() 获取返回当页数据总数
* @method void setTotal(integer $Total) 设置返回当页数据总数
* @method array getRoomList() 获取房间信息列表
* @method void setRoomList(array $RoomList) 设置房间信息列表
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeRoomInfoResponse extends AbstractModel
{
/**
* @var integer 返回当页数据总数
*/
public $Total;
/**
* @var array 房间信息列表
*/
public $RoomList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param integer $Total 返回当页数据总数
* @param array $RoomList 房间信息列表
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Total",$param) and $param["Total"] !== null) {
$this->Total = $param["Total"];
}
if (array_key_exists("RoomList",$param) and $param["RoomList"] !== null) {
$this->RoomList = [];
foreach ($param["RoomList"] as $key => $value){
$obj = new RoomState();
$obj->deserialize($value);
array_push($this->RoomList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,85 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeScaleInfo请求参数结构体
*
* @method integer getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(integer $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method integer getStartTime() 获取查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据。
* @method void setStartTime(integer $StartTime) 设置查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据。
* @method integer getEndTime() 获取查询结束时间,本地unix时间戳,单位为秒(如:1590065877),建议与StartTime间隔时间超过24小时。
注意:按天统计,结束时间大于前一天,否则查询数据为空(如:需查询20号数据,结束时间需晚于20号0点)。
* @method void setEndTime(integer $EndTime) 设置查询结束时间,本地unix时间戳,单位为秒(如:1590065877),建议与StartTime间隔时间超过24小时。
注意:按天统计,结束时间大于前一天,否则查询数据为空(如:需查询20号数据,结束时间需晚于20号0点)。
*/
class DescribeScaleInfoRequest extends AbstractModel
{
/**
* @var integer 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var integer 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据。
*/
public $StartTime;
/**
* @var integer 查询结束时间,本地unix时间戳,单位为秒(如:1590065877),建议与StartTime间隔时间超过24小时。
注意:按天统计,结束时间大于前一天,否则查询数据为空(如:需查询20号数据,结束时间需晚于20号0点)。
*/
public $EndTime;
/**
* @param integer $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param integer $StartTime 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据。
* @param integer $EndTime 查询结束时间,本地unix时间戳,单位为秒(如:1590065877),建议与StartTime间隔时间超过24小时。
注意:按天统计,结束时间大于前一天,否则查询数据为空(如:需查询20号数据,结束时间需晚于20号0点)。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
}
}
@@ -0,0 +1,86 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeScaleInfo返回参数结构体
*
* @method integer getTotal() 获取返回的数据条数
* @method void setTotal(integer $Total) 设置返回的数据条数
* @method array getScaleList() 获取返回的数据
注意:此字段可能返回 null,表示取不到有效值。
* @method void setScaleList(array $ScaleList) 设置返回的数据
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeScaleInfoResponse extends AbstractModel
{
/**
* @var integer 返回的数据条数
*/
public $Total;
/**
* @var array 返回的数据
注意:此字段可能返回 null,表示取不到有效值。
*/
public $ScaleList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param integer $Total 返回的数据条数
* @param array $ScaleList 返回的数据
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Total",$param) and $param["Total"] !== null) {
$this->Total = $param["Total"];
}
if (array_key_exists("ScaleList",$param) and $param["ScaleList"] !== null) {
$this->ScaleList = [];
foreach ($param["ScaleList"] as $key => $value){
$obj = new ScaleInfomation();
$obj->deserialize($value);
array_push($this->ScaleList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,97 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketQualityData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
* @method string getPeriod() 获取返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
* @method void setPeriod(string $Period) 设置返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
class DescribeTRTCMarketQualityDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
*/
public $EndTime;
/**
* @var string 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
public $Period;
/**
* @param string $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
* @param string $Period 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("Period",$param) and $param["Period"] !== null) {
$this->Period = $param["Period"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketQualityData返回参数结构体
*
* @method TRTCDataResult getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResult $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCMarketQualityDataResponse extends AbstractModel
{
/**
* @var TRTCDataResult TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResult $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResult();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,97 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketQualityMetricData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
* @method string getPeriod() 获取返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
* @method void setPeriod(string $Period) 设置返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
class DescribeTRTCMarketQualityMetricDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
*/
public $EndTime;
/**
* @var string 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
public $Period;
/**
* @param string $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
* @param string $Period 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("Period",$param) and $param["Period"] !== null) {
$this->Period = $param["Period"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketQualityMetricData返回参数结构体
*
* @method TRTCDataResp getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResp $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCMarketQualityMetricDataResponse extends AbstractModel
{
/**
* @var TRTCDataResp TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResp $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResp();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,97 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketScaleData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
* @method string getPeriod() 获取返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
* @method void setPeriod(string $Period) 设置返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
class DescribeTRTCMarketScaleDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId
*/
public $SdkAppId;
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
*/
public $EndTime;
/**
* @var string 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
public $Period;
/**
* @param string $SdkAppId 用户SdkAppId
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
* @param string $Period 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("Period",$param) and $param["Period"] !== null) {
$this->Period = $param["Period"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketScaleData返回参数结构体
*
* @method TRTCDataResult getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResult $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCMarketScaleDataResponse extends AbstractModel
{
/**
* @var TRTCDataResult TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResult $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResult();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,97 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketScaleMetricData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
* @method string getPeriod() 获取返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
* @method void setPeriod(string $Period) 设置返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
class DescribeTRTCMarketScaleMetricDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId
*/
public $SdkAppId;
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
*/
public $EndTime;
/**
* @var string 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
public $Period;
/**
* @param string $SdkAppId 用户SdkAppId
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。(查询时间范围根据监控仪表盘功能版本而定,【基础版】可查近30天,【进阶版】可查近60天)
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
* @param string $Period 返回数据的粒度,支持设为以下值:
d:按天。此时返回查询时间范围内 UTC 时间为零点的数据。
h:按小时。此时返回查询时间范围内 UTC 时间为整小时的数据。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("Period",$param) and $param["Period"] !== null) {
$this->Period = $param["Period"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCMarketScaleMetricData返回参数结构体
*
* @method TRTCDataResp getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResp $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCMarketScaleMetricDataResponse extends AbstractModel
{
/**
* @var TRTCDataResp TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResp $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResp();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,89 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeQualityData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method integer getStartTime() 获取开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method void setStartTime(integer $StartTime) 设置开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method integer getEndTime() 获取结束时间,unix时间戳,单位:秒
* @method void setEndTime(integer $EndTime) 设置结束时间,unix时间戳,单位:秒
* @method string getRoomId() 获取房间ID
* @method void setRoomId(string $RoomId) 设置房间ID
*/
class DescribeTRTCRealTimeQualityDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var integer 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
*/
public $StartTime;
/**
* @var integer 结束时间,unix时间戳,单位:秒
*/
public $EndTime;
/**
* @var string 房间ID
*/
public $RoomId;
/**
* @param string $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param integer $StartTime 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @param integer $EndTime 结束时间,unix时间戳,单位:秒
* @param string $RoomId 房间ID
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeQualityData返回参数结构体
*
* @method TRTCDataResult getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResult $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCRealTimeQualityDataResponse extends AbstractModel
{
/**
* @var TRTCDataResult TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResult $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResult();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,89 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeQualityMetricData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method integer getStartTime() 获取开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method void setStartTime(integer $StartTime) 设置开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method integer getEndTime() 获取结束时间,unix时间戳,单位:秒
* @method void setEndTime(integer $EndTime) 设置结束时间,unix时间戳,单位:秒
* @method string getRoomId() 获取房间ID
* @method void setRoomId(string $RoomId) 设置房间ID
*/
class DescribeTRTCRealTimeQualityMetricDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var integer 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
*/
public $StartTime;
/**
* @var integer 结束时间,unix时间戳,单位:秒
*/
public $EndTime;
/**
* @var string 房间ID
*/
public $RoomId;
/**
* @param string $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param integer $StartTime 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @param integer $EndTime 结束时间,unix时间戳,单位:秒
* @param string $RoomId 房间ID
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeQualityMetricData返回参数结构体
*
* @method TRTCDataResp getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResp $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCRealTimeQualityMetricDataResponse extends AbstractModel
{
/**
* @var TRTCDataResp TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResp $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResp();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,89 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeScaleData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method integer getStartTime() 获取开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method void setStartTime(integer $StartTime) 设置开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method integer getEndTime() 获取结束时间,unix时间戳,单位:秒
* @method void setEndTime(integer $EndTime) 设置结束时间,unix时间戳,单位:秒
* @method string getRoomId() 获取房间ID
* @method void setRoomId(string $RoomId) 设置房间ID
*/
class DescribeTRTCRealTimeScaleDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var integer 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
*/
public $StartTime;
/**
* @var integer 结束时间,unix时间戳,单位:秒
*/
public $EndTime;
/**
* @var string 房间ID
*/
public $RoomId;
/**
* @param string $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param integer $StartTime 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @param integer $EndTime 结束时间,unix时间戳,单位:秒
* @param string $RoomId 房间ID
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeScaleData返回参数结构体
*
* @method TRTCDataResult getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResult $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCRealTimeScaleDataResponse extends AbstractModel
{
/**
* @var TRTCDataResult TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResult $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResult();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,89 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeScaleMetricData请求参数结构体
*
* @method string getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(string $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method integer getStartTime() 获取开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method void setStartTime(integer $StartTime) 设置开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @method integer getEndTime() 获取结束时间,unix时间戳,单位:秒
* @method void setEndTime(integer $EndTime) 设置结束时间,unix时间戳,单位:秒
* @method string getRoomId() 获取房间ID
* @method void setRoomId(string $RoomId) 设置房间ID
*/
class DescribeTRTCRealTimeScaleMetricDataRequest extends AbstractModel
{
/**
* @var string 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var integer 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
*/
public $StartTime;
/**
* @var integer 结束时间,unix时间戳,单位:秒
*/
public $EndTime;
/**
* @var string 房间ID
*/
public $RoomId;
/**
* @param string $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param integer $StartTime 开始时间,unix时间戳,单位:秒(查询时间范围根据监控仪表盘功能版本而定,基础版可查近3小时,进阶版可查近12小时)
* @param integer $EndTime 结束时间,unix时间戳,单位:秒
* @param string $RoomId 房间ID
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTRTCRealTimeScaleMetricData返回参数结构体
*
* @method TRTCDataResp getData() 获取TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method void setData(TRTCDataResp $Data) 设置TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTRTCRealTimeScaleMetricDataResponse extends AbstractModel
{
/**
* @var TRTCDataResp TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param TRTCDataResp $Data TRTC监控数据出参
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = new TRTCDataResp();
$this->Data->deserialize($param["Data"]);
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,81 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTrtcMcuTranscodeTime请求参数结构体
*
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method integer getSdkAppId() 获取应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
* @method void setSdkAppId(integer $SdkAppId) 设置应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
*/
class DescribeTrtcMcuTranscodeTimeRequest extends AbstractModel
{
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
*/
public $EndTime;
/**
* @var integer 应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
*/
public $SdkAppId;
/**
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @param integer $SdkAppId 应用ID,可不传。传应用ID时返回的是该应用的用量,不传时返回多个应用的合计值。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTrtcMcuTranscodeTime返回参数结构体
*
* @method array getUsages() 获取应用的用量信息数组。
* @method void setUsages(array $Usages) 设置应用的用量信息数组。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTrtcMcuTranscodeTimeResponse extends AbstractModel
{
/**
* @var array 应用的用量信息数组。
*/
public $Usages;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param array $Usages 应用的用量信息数组。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Usages",$param) and $param["Usages"] !== null) {
$this->Usages = [];
foreach ($param["Usages"] as $key => $value){
$obj = new OneSdkAppIdTranscodeTimeUsagesInfo();
$obj->deserialize($value);
array_push($this->Usages, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,77 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTrtcRoomUsage请求参数结构体
*
* @method integer getSdkAppid() 获取TRTC的SdkAppId,和房间所对应的SdkAppId相同。
* @method void setSdkAppid(integer $SdkAppid) 设置TRTC的SdkAppId,和房间所对应的SdkAppId相同。
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD HH:MM,精确到分钟级。
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD HH:MM,精确到分钟级。
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD HH:MM,单次查询不超过24h。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD HH:MM,单次查询不超过24h。
*/
class DescribeTrtcRoomUsageRequest extends AbstractModel
{
/**
* @var integer TRTC的SdkAppId,和房间所对应的SdkAppId相同。
*/
public $SdkAppid;
/**
* @var string 查询开始时间,格式为YYYY-MM-DD HH:MM,精确到分钟级。
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD HH:MM,单次查询不超过24h。
*/
public $EndTime;
/**
* @param integer $SdkAppid TRTC的SdkAppId,和房间所对应的SdkAppId相同。
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD HH:MM,精确到分钟级。
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD HH:MM,单次查询不超过24h。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppid",$param) and $param["SdkAppid"] !== null) {
$this->SdkAppid = $param["SdkAppid"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
}
}
@@ -0,0 +1,65 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTrtcRoomUsage返回参数结构体
*
* @method string getData() 获取房间维度用量数据,csv文件格式,单位:秒。
* @method void setData(string $Data) 设置房间维度用量数据,csv文件格式,单位:秒。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTrtcRoomUsageResponse extends AbstractModel
{
/**
* @var string 房间维度用量数据,csv文件格式,单位:秒。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param string $Data 房间维度用量数据,csv文件格式,单位:秒。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = $param["Data"];
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,81 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTrtcUsage请求参数结构体
*
* @method string getStartTime() 获取查询开始时间,格式为YYYY-MM-DD。
* @method void setStartTime(string $StartTime) 设置查询开始时间,格式为YYYY-MM-DD。
* @method string getEndTime() 获取查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method void setEndTime(string $EndTime) 设置查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @method integer getSdkAppId() 获取TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
* @method void setSdkAppId(integer $SdkAppId) 设置TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
class DescribeTrtcUsageRequest extends AbstractModel
{
/**
* @var string 查询开始时间,格式为YYYY-MM-DD。
*/
public $StartTime;
/**
* @var string 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
*/
public $EndTime;
/**
* @var integer TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
public $SdkAppId;
/**
* @param string $StartTime 查询开始时间,格式为YYYY-MM-DD。
* @param string $EndTime 查询结束时间,格式为YYYY-MM-DD。
单次查询统计区间最多不能超过31天。
* @param integer $SdkAppId TRTC的SdkAppId,和房间所对应的SdkAppId相同。如果没有这个参数,返回用户下全部实时音视频应用的汇总。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,82 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeTrtcUsage返回参数结构体
*
* @method array getUsageKey() 获取用量类型,与UsageValue中各个位置的值对应。
* @method void setUsageKey(array $UsageKey) 设置用量类型,与UsageValue中各个位置的值对应。
* @method array getUsageList() 获取各个时间点用量明细。
* @method void setUsageList(array $UsageList) 设置各个时间点用量明细。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeTrtcUsageResponse extends AbstractModel
{
/**
* @var array 用量类型,与UsageValue中各个位置的值对应。
*/
public $UsageKey;
/**
* @var array 各个时间点用量明细。
*/
public $UsageList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param array $UsageKey 用量类型,与UsageValue中各个位置的值对应。
* @param array $UsageList 各个时间点用量明细。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("UsageKey",$param) and $param["UsageKey"] !== null) {
$this->UsageKey = $param["UsageKey"];
}
if (array_key_exists("UsageList",$param) and $param["UsageList"] !== null) {
$this->UsageList = [];
foreach ($param["UsageList"] as $key => $value){
$obj = new TrtcUsage();
$obj->deserialize($value);
array_push($this->UsageList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,93 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeUnusualEvent请求参数结构体
*
* @method integer getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(integer $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method integer getStartTime() 获取查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method void setStartTime(integer $StartTime) 设置查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method integer getEndTime() 获取查询结束时间,本地unix时间戳,单位为秒(如:1590065877)注意:与StartTime间隔时间不超过1小时。
* @method void setEndTime(integer $EndTime) 设置查询结束时间,本地unix时间戳,单位为秒(如:1590065877)注意:与StartTime间隔时间不超过1小时。
* @method string getRoomId() 获取房间号,查询房间内任意20条以内异常体验事件
* @method void setRoomId(string $RoomId) 设置房间号,查询房间内任意20条以内异常体验事件
*/
class DescribeUnusualEventRequest extends AbstractModel
{
/**
* @var integer 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var integer 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
*/
public $StartTime;
/**
* @var integer 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)注意:与StartTime间隔时间不超过1小时。
*/
public $EndTime;
/**
* @var string 房间号,查询房间内任意20条以内异常体验事件
*/
public $RoomId;
/**
* @param integer $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param integer $StartTime 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @param integer $EndTime 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)注意:与StartTime间隔时间不超过1小时。
* @param string $RoomId 房间号,查询房间内任意20条以内异常体验事件
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
}
}
@@ -0,0 +1,86 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeUnusualEvent返回参数结构体
*
* @method integer getTotal() 获取返回的数据总条数
范围:[020]
* @method void setTotal(integer $Total) 设置返回的数据总条数
范围:[020]
* @method array getAbnormalExperienceList() 获取异常体验列表
* @method void setAbnormalExperienceList(array $AbnormalExperienceList) 设置异常体验列表
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeUnusualEventResponse extends AbstractModel
{
/**
* @var integer 返回的数据总条数
范围:[020]
*/
public $Total;
/**
* @var array 异常体验列表
*/
public $AbnormalExperienceList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param integer $Total 返回的数据总条数
范围:[020]
* @param array $AbnormalExperienceList 异常体验列表
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Total",$param) and $param["Total"] !== null) {
$this->Total = $param["Total"];
}
if (array_key_exists("AbnormalExperienceList",$param) and $param["AbnormalExperienceList"] !== null) {
$this->AbnormalExperienceList = [];
foreach ($param["AbnormalExperienceList"] as $key => $value){
$obj = new AbnormalExperience();
$obj->deserialize($value);
array_push($this->AbnormalExperienceList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,121 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeUserEvent请求参数结构体
*
* @method string getCommId() 获取通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @method void setCommId(string $CommId) 设置通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @method integer getStartTime() 获取查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method void setStartTime(integer $StartTime) 设置查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method integer getEndTime() 获取查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:查询时间大于房间结束时间,以房间结束时间为准。
* @method void setEndTime(integer $EndTime) 设置查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:查询时间大于房间结束时间,以房间结束时间为准。
* @method string getUserId() 获取用户UserId
* @method void setUserId(string $UserId) 设置用户UserId
* @method string getRoomId() 获取房间号(如:223
* @method void setRoomId(string $RoomId) 设置房间号(如:223
* @method integer getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(integer $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
*/
class DescribeUserEventRequest extends AbstractModel
{
/**
* @var string 通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
*/
public $CommId;
/**
* @var integer 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
*/
public $StartTime;
/**
* @var integer 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:查询时间大于房间结束时间,以房间结束时间为准。
*/
public $EndTime;
/**
* @var string 用户UserId
*/
public $UserId;
/**
* @var string 房间号(如:223
*/
public $RoomId;
/**
* @var integer 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @param string $CommId 通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @param integer $StartTime 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @param integer $EndTime 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:查询时间大于房间结束时间,以房间结束时间为准。
* @param string $UserId 用户UserId
* @param string $RoomId 房间号(如:223
* @param integer $SdkAppId 用户SdkAppId(如:1400xxxxxx
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("CommId",$param) and $param["CommId"] !== null) {
$this->CommId = $param["CommId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("UserId",$param) and $param["UserId"] !== null) {
$this->UserId = $param["UserId"];
}
if (array_key_exists("RoomId",$param) and $param["RoomId"] !== null) {
$this->RoomId = $param["RoomId"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
}
}
@@ -0,0 +1,70 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeUserEvent返回参数结构体
*
* @method array getData() 获取返回的事件列表,若没有数据,会返回空数组。
* @method void setData(array $Data) 设置返回的事件列表,若没有数据,会返回空数组。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeUserEventResponse extends AbstractModel
{
/**
* @var array 返回的事件列表,若没有数据,会返回空数组。
*/
public $Data;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param array $Data 返回的事件列表,若没有数据,会返回空数组。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Data",$param) and $param["Data"] !== null) {
$this->Data = [];
foreach ($param["Data"] as $key => $value){
$obj = new EventList();
$obj->deserialize($value);
array_push($this->Data, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}
@@ -0,0 +1,145 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeUserInfo请求参数结构体
*
* @method string getCommId() 获取通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @method void setCommId(string $CommId) 设置通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @method integer getStartTime() 获取查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method void setStartTime(integer $StartTime) 设置查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @method integer getEndTime() 获取查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过4小时。
* @method void setEndTime(integer $EndTime) 设置查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过4小时。
* @method integer getSdkAppId() 获取用户SdkAppId(如:1400xxxxxx
* @method void setSdkAppId(integer $SdkAppId) 设置用户SdkAppId(如:1400xxxxxx
* @method array getUserIds() 获取需查询的用户数组,不填默认返回6个用户
范围:[1100]
* @method void setUserIds(array $UserIds) 设置需查询的用户数组,不填默认返回6个用户
范围:[1100]
* @method integer getPageNumber() 获取当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
* @method void setPageNumber(integer $PageNumber) 设置当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
* @method integer getPageSize() 获取每页个数,默认为6
范围:[1100]
* @method void setPageSize(integer $PageSize) 设置每页个数,默认为6
范围:[1100]
*/
class DescribeUserInfoRequest extends AbstractModel
{
/**
* @var string 通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
*/
public $CommId;
/**
* @var integer 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
*/
public $StartTime;
/**
* @var integer 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过4小时。
*/
public $EndTime;
/**
* @var integer 用户SdkAppId(如:1400xxxxxx
*/
public $SdkAppId;
/**
* @var array 需查询的用户数组,不填默认返回6个用户
范围:[1100]
*/
public $UserIds;
/**
* @var integer 当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
*/
public $PageNumber;
/**
* @var integer 每页个数,默认为6
范围:[1100]
*/
public $PageSize;
/**
* @param string $CommId 通话 ID(唯一标识一次通话): SdkAppId_RoomId(房间号)_ CreateTime(房间创建时间,unix时间戳,单位为s)例:1400xxxxxx_218695_1590065777。通过 DescribeRoomInfo(查询历史房间列表)接口获取([查询历史房间列表](https://cloud.tencent.com/document/product/647/44050))。
* @param integer $StartTime 查询开始时间,本地unix时间戳,单位为秒(如:1590065777)
注意:支持查询14天内的数据
* @param integer $EndTime 查询结束时间,本地unix时间戳,单位为秒(如:1590065877)
注意:与StartTime间隔时间不超过4小时。
* @param integer $SdkAppId 用户SdkAppId(如:1400xxxxxx
* @param array $UserIds 需查询的用户数组,不填默认返回6个用户
范围:[1100]
* @param integer $PageNumber 当前页数,默认为0
注意:PageNumber和PageSize 其中一个不填均默认返回6条数据。
* @param integer $PageSize 每页个数,默认为6
范围:[1100]
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("CommId",$param) and $param["CommId"] !== null) {
$this->CommId = $param["CommId"];
}
if (array_key_exists("StartTime",$param) and $param["StartTime"] !== null) {
$this->StartTime = $param["StartTime"];
}
if (array_key_exists("EndTime",$param) and $param["EndTime"] !== null) {
$this->EndTime = $param["EndTime"];
}
if (array_key_exists("SdkAppId",$param) and $param["SdkAppId"] !== null) {
$this->SdkAppId = $param["SdkAppId"];
}
if (array_key_exists("UserIds",$param) and $param["UserIds"] !== null) {
$this->UserIds = $param["UserIds"];
}
if (array_key_exists("PageNumber",$param) and $param["PageNumber"] !== null) {
$this->PageNumber = $param["PageNumber"];
}
if (array_key_exists("PageSize",$param) and $param["PageSize"] !== null) {
$this->PageSize = $param["PageSize"];
}
}
}
@@ -0,0 +1,86 @@
<?php
/*
* Copyright (c) 2017-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\Trtc\V20190722\Models;
use TencentCloud\Common\AbstractModel;
/**
* DescribeUserInfo返回参数结构体
*
* @method integer getTotal() 获取返回的用户总条数
* @method void setTotal(integer $Total) 设置返回的用户总条数
* @method array getUserList() 获取用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
* @method void setUserList(array $UserList) 设置用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
* @method string getRequestId() 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @method void setRequestId(string $RequestId) 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
class DescribeUserInfoResponse extends AbstractModel
{
/**
* @var integer 返回的用户总条数
*/
public $Total;
/**
* @var array 用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
*/
public $UserList;
/**
* @var string 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public $RequestId;
/**
* @param integer $Total 返回的用户总条数
* @param array $UserList 用户信息列表
注意:此字段可能返回 null,表示取不到有效值。
* @param string $RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
function __construct()
{
}
/**
* For internal only. DO NOT USE IT.
*/
public function deserialize($param)
{
if ($param === null) {
return;
}
if (array_key_exists("Total",$param) and $param["Total"] !== null) {
$this->Total = $param["Total"];
}
if (array_key_exists("UserList",$param) and $param["UserList"] !== null) {
$this->UserList = [];
foreach ($param["UserList"] as $key => $value){
$obj = new UserInformation();
$obj->deserialize($value);
array_push($this->UserList, $obj);
}
}
if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
$this->RequestId = $param["RequestId"];
}
}
}

Some files were not shown because too many files have changed in this diff Show More