提取文件内容修改、语音克隆预发布

master 1.1.4
yangbowen 1 year ago
parent cca1d3dbeb
commit efdd144a9d
  1. 2
      .idea/php.xml
  2. 11
      .idea/phpunit.xml
  3. 6
      .idea/workspace.xml
  4. 48
      .openapi-generator/FILES
  5. 2
      .openapi-generator/api-doc-php-sdk.sha256
  6. 16
      README.md
  7. 2
      composer.json
  8. 119
      docs/Api/AiApi.md
  9. 2
      docs/Model/ExtraContentParam.md
  10. 4
      docs/Model/ExtractContentResult.md
  11. 20
      docs/Model/ResponseOpenAPIExtractContentResult.md
  12. 4
      docs/Model/ResponseOpenAPISpeakerListResult.md
  13. 20
      docs/Model/ResponseOpenAPIVoiceCloneResult.md
  14. 12
      docs/Model/Speaker.md
  15. 9
      docs/Model/SpeakerListResult.md
  16. 15
      docs/Model/VoiceCloneParam.md
  17. 10
      docs/Model/VoiceCloneResult.md
  18. 803
      lib/Api/AiApi.php
  19. 8
      lib/Model/ExtraContentParam.php
  20. 14
      lib/Model/ExtractContentResult.php
  21. 784
      lib/Model/ResponseOpenAPIExtractContentResult.php
  22. 14
      lib/Model/ResponseOpenAPISpeakerListResult.php
  23. 784
      lib/Model/ResponseOpenAPIVoiceCloneResult.php
  24. 512
      lib/Model/Speaker.php
  25. 410
      lib/Model/SpeakerListResult.php
  26. 620
      lib/Model/VoiceCloneParam.php
  27. 444
      lib/Model/VoiceCloneResult.php
  28. 28
      test/Api/AiApiTest.php
  29. 10
      test/Model/ExtraContentParamTest.php
  30. 10
      test/Model/ExtractContentResultTest.php
  31. 189
      test/Model/ResponseOpenAPIExtractContentResultTest.php
  32. 10
      test/Model/ResponseOpenAPISpeakerListResultTest.php
  33. 189
      test/Model/ResponseOpenAPIVoiceCloneResultTest.php
  34. 90
      test/Model/SpeakerListResultTest.php
  35. 117
      test/Model/SpeakerTest.php
  36. 144
      test/Model/VoiceCloneParamTest.php
  37. 99
      test/Model/VoiceCloneResultTest.php

@ -10,7 +10,7 @@
<option name="highlightLevel" value="WARNING" /> <option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" /> <option name="transferred" value="true" />
</component> </component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.4"> <component name="PhpProjectSharedConfiguration" php_language_level="8.0">
<option name="suggestChangeDefaultLanguageLevel" value="false" /> <option name="suggestChangeDefaultLanguageLevel" value="false" />
</component> </component>
<component name="PhpStanOptionsConfiguration"> <component name="PhpStanOptionsConfiguration">

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PHPUnit">
<option name="directories">
<list>
<option value="$PROJECT_DIR$/test/Api" />
<option value="$PROJECT_DIR$/test/Model" />
</list>
</option>
</component>
</project>

@ -5,4 +5,10 @@
&quot;settings.editor.selected.configurable&quot;: &quot;configurable.group.appearance&quot; &quot;settings.editor.selected.configurable&quot;: &quot;configurable.group.appearance&quot;
} }
}</component> }</component>
<component name="RunManager">
<configuration default="true" type="ComposerRunConfigurationType" factoryName="Composer Script">
<option name="pathToComposerJson" value="$PROJECT_DIR$/composer.json" />
<method v="2" />
</configuration>
</component>
</project> </project>

@ -12,18 +12,26 @@ docs/Model/ChatParam.md
docs/Model/ChatParam.md docs/Model/ChatParam.md
docs/Model/ChatResult.md docs/Model/ChatResult.md
docs/Model/ChatResult.md docs/Model/ChatResult.md
docs/Model/ExtractTextParam.md docs/Model/ExtraContentParam.md
docs/Model/ExtractTextParam.md docs/Model/ExtraContentParam.md
docs/Model/ExtractTextResult.md docs/Model/ExtractContentResult.md
docs/Model/ExtractTextResult.md docs/Model/ExtractContentResult.md
docs/Model/PictureInfo.md docs/Model/PictureInfo.md
docs/Model/PictureInfo.md docs/Model/PictureInfo.md
docs/Model/ResponseOpenAPIChatResult.md docs/Model/ResponseOpenAPIChatResult.md
docs/Model/ResponseOpenAPIChatResult.md docs/Model/ResponseOpenAPIChatResult.md
docs/Model/ResponseOpenAPIExtractTextResult.md docs/Model/ResponseOpenAPIExtractContentResult.md
docs/Model/ResponseOpenAPIExtractTextResult.md docs/Model/ResponseOpenAPIExtractContentResult.md
docs/Model/ResponseOpenAPISpeakerListResult.md
docs/Model/ResponseOpenAPISpeakerListResult.md
docs/Model/ResponseOpenAPITokensCountResult.md docs/Model/ResponseOpenAPITokensCountResult.md
docs/Model/ResponseOpenAPITokensCountResult.md docs/Model/ResponseOpenAPITokensCountResult.md
docs/Model/ResponseOpenAPIVoiceCloneResult.md
docs/Model/ResponseOpenAPIVoiceCloneResult.md
docs/Model/Speaker.md
docs/Model/Speaker.md
docs/Model/SpeakerListResult.md
docs/Model/SpeakerListResult.md
docs/Model/SpeechResult.md docs/Model/SpeechResult.md
docs/Model/SpeechResult.md docs/Model/SpeechResult.md
docs/Model/StreamModule.md docs/Model/StreamModule.md
@ -34,6 +42,10 @@ docs/Model/TokenCountParam.md
docs/Model/TokenCountParam.md docs/Model/TokenCountParam.md
docs/Model/TokensCountResult.md docs/Model/TokensCountResult.md
docs/Model/TokensCountResult.md docs/Model/TokensCountResult.md
docs/Model/VoiceCloneParam.md
docs/Model/VoiceCloneParam.md
docs/Model/VoiceCloneResult.md
docs/Model/VoiceCloneResult.md
git_push.sh git_push.sh
lib/ApiClient.php lib/ApiClient.php
lib/ApiException.php lib/ApiException.php
@ -44,18 +56,24 @@ lib/Configuration.php
lib/HeaderSelector.php lib/HeaderSelector.php
lib/Model/ChatParam.php lib/Model/ChatParam.php
lib/Model/ChatResult.php lib/Model/ChatResult.php
lib/Model/ExtractTextParam.php lib/Model/ExtraContentParam.php
lib/Model/ExtractTextResult.php lib/Model/ExtractContentResult.php
lib/Model/ModelInterface.php lib/Model/ModelInterface.php
lib/Model/PictureInfo.php lib/Model/PictureInfo.php
lib/Model/ResponseOpenAPIChatResult.php lib/Model/ResponseOpenAPIChatResult.php
lib/Model/ResponseOpenAPIExtractTextResult.php lib/Model/ResponseOpenAPIExtractContentResult.php
lib/Model/ResponseOpenAPISpeakerListResult.php
lib/Model/ResponseOpenAPITokensCountResult.php lib/Model/ResponseOpenAPITokensCountResult.php
lib/Model/ResponseOpenAPIVoiceCloneResult.php
lib/Model/Speaker.php
lib/Model/SpeakerListResult.php
lib/Model/SpeechResult.php lib/Model/SpeechResult.php
lib/Model/StreamModule.php lib/Model/StreamModule.php
lib/Model/SynthesizerParam.php lib/Model/SynthesizerParam.php
lib/Model/TokenCountParam.php lib/Model/TokenCountParam.php
lib/Model/TokensCountResult.php lib/Model/TokensCountResult.php
lib/Model/VoiceCloneParam.php
lib/Model/VoiceCloneResult.php
lib/NotifyHandler.php lib/NotifyHandler.php
lib/ObjectSerializer.php lib/ObjectSerializer.php
lib/StreamApiClient.php lib/StreamApiClient.php
@ -64,14 +82,20 @@ phpunit.xml.dist
test/Api/AiApiTest.php test/Api/AiApiTest.php
test/Model/ChatParamTest.php test/Model/ChatParamTest.php
test/Model/ChatResultTest.php test/Model/ChatResultTest.php
test/Model/ExtractTextParamTest.php test/Model/ExtraContentParamTest.php
test/Model/ExtractTextResultTest.php test/Model/ExtractContentResultTest.php
test/Model/PictureInfoTest.php test/Model/PictureInfoTest.php
test/Model/ResponseOpenAPIChatResultTest.php test/Model/ResponseOpenAPIChatResultTest.php
test/Model/ResponseOpenAPIExtractTextResultTest.php test/Model/ResponseOpenAPIExtractContentResultTest.php
test/Model/ResponseOpenAPISpeakerListResultTest.php
test/Model/ResponseOpenAPITokensCountResultTest.php test/Model/ResponseOpenAPITokensCountResultTest.php
test/Model/ResponseOpenAPIVoiceCloneResultTest.php
test/Model/SpeakerListResultTest.php
test/Model/SpeakerTest.php
test/Model/SpeechResultTest.php test/Model/SpeechResultTest.php
test/Model/StreamModuleTest.php test/Model/StreamModuleTest.php
test/Model/SynthesizerParamTest.php test/Model/SynthesizerParamTest.php
test/Model/TokenCountParamTest.php test/Model/TokenCountParamTest.php
test/Model/TokensCountResultTest.php test/Model/TokensCountResultTest.php
test/Model/VoiceCloneParamTest.php
test/Model/VoiceCloneResultTest.php

@ -1 +1 @@
9507dfc0a37d26527ff8a017baf676b0978328b84732d3d8c3414000823f6541 5126def6e9de093e395a81cb6734960c1beb6da52ca97e5c8f3ee4bc426bbb27

@ -154,24 +154,32 @@ function example()
Class | Method | HTTP request | Description Class | Method | HTTP request | Description
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
*AiApi* | [**chat**](docs/Api/AiApi.md#chat) | **POST** /v1/ai/chat | 元梦ai-对话 *AiApi* | [**chat**](docs/Api/AiApi.md#chat) | **POST** /v1/ai/chat | 元梦ai-对话
*AiApi* | [**extractText**](docs/Api/AiApi.md#extracttext) | **POST** /v1/ai/extractText | 元梦ai-提取上传文件的内容 *AiApi* | [**extractContent**](docs/Api/AiApi.md#extractcontent) | **POST** /v1/ai/extractContent | 元梦ai-提取上传文件的内容
*AiApi* | [**speakerList**](docs/Api/AiApi.md#speakerlist) | **POST** /v1/ai/speakerList | 元梦ai-获取发音人列表
*AiApi* | [**tokenCount**](docs/Api/AiApi.md#tokencount) | **POST** /v1/ai/tokenCount | 元梦ai-token统计 *AiApi* | [**tokenCount**](docs/Api/AiApi.md#tokencount) | **POST** /v1/ai/tokenCount | 元梦ai-token统计
*AiApi* | [**voiceClone**](docs/Api/AiApi.md#voiceclone) | **POST** /v1/ai/voiceClone | 元梦ai-语音克隆
## 模型文档 ## 模型文档
- [ChatParam](docs/Model/ChatParam.md) - [ChatParam](docs/Model/ChatParam.md)
- [ChatResult](docs/Model/ChatResult.md) - [ChatResult](docs/Model/ChatResult.md)
- [ExtractTextParam](docs/Model/ExtractTextParam.md) - [ExtraContentParam](docs/Model/ExtraContentParam.md)
- [ExtractTextResult](docs/Model/ExtractTextResult.md) - [ExtractContentResult](docs/Model/ExtractContentResult.md)
- [PictureInfo](docs/Model/PictureInfo.md) - [PictureInfo](docs/Model/PictureInfo.md)
- [ResponseOpenAPIChatResult](docs/Model/ResponseOpenAPIChatResult.md) - [ResponseOpenAPIChatResult](docs/Model/ResponseOpenAPIChatResult.md)
- [ResponseOpenAPIExtractTextResult](docs/Model/ResponseOpenAPIExtractTextResult.md) - [ResponseOpenAPIExtractContentResult](docs/Model/ResponseOpenAPIExtractContentResult.md)
- [ResponseOpenAPISpeakerListResult](docs/Model/ResponseOpenAPISpeakerListResult.md)
- [ResponseOpenAPITokensCountResult](docs/Model/ResponseOpenAPITokensCountResult.md) - [ResponseOpenAPITokensCountResult](docs/Model/ResponseOpenAPITokensCountResult.md)
- [ResponseOpenAPIVoiceCloneResult](docs/Model/ResponseOpenAPIVoiceCloneResult.md)
- [Speaker](docs/Model/Speaker.md)
- [SpeakerListResult](docs/Model/SpeakerListResult.md)
- [SpeechResult](docs/Model/SpeechResult.md) - [SpeechResult](docs/Model/SpeechResult.md)
- [StreamModule](docs/Model/StreamModule.md) - [StreamModule](docs/Model/StreamModule.md)
- [SynthesizerParam](docs/Model/SynthesizerParam.md) - [SynthesizerParam](docs/Model/SynthesizerParam.md)
- [TokenCountParam](docs/Model/TokenCountParam.md) - [TokenCountParam](docs/Model/TokenCountParam.md)
- [TokensCountResult](docs/Model/TokensCountResult.md) - [TokensCountResult](docs/Model/TokensCountResult.md)
- [VoiceCloneParam](docs/Model/VoiceCloneParam.md)
- [VoiceCloneResult](docs/Model/VoiceCloneResult.md)
## 测试 ## 测试

@ -1,6 +1,6 @@
{ {
"name": "tsl3060/low-carbon-platform", "name": "tsl3060/low-carbon-platform",
"version": "1.1.3", "version": "1.1.4",
"description": "碳丝路数据开放平台", "description": "碳丝路数据开放平台",
"keywords": [ "keywords": [
"openapitools", "openapitools",

@ -3,8 +3,10 @@
| Method | HTTP request | Description | | Method | HTTP request | Description |
| ------------- | ------------- | ------------- | | ------------- | ------------- | ------------- |
| [**chat()**](AiApi.md#chat) | **POST** /v1/ai/chat | 元梦ai-对话 | | [**chat()**](AiApi.md#chat) | **POST** /v1/ai/chat | 元梦ai-对话 |
| [**extractText()**](AiApi.md#extractText) | **POST** /v1/ai/extractText | 元梦ai-提取上传文件的内容 | | [**extractContent()**](AiApi.md#extractContent) | **POST** /v1/ai/extractContent | 元梦ai-提取上传文件的内容 |
| [**speakerList()**](AiApi.md#speakerList) | **POST** /v1/ai/speakerList | 元梦ai-获取发音人列表 |
| [**tokenCount()**](AiApi.md#tokenCount) | **POST** /v1/ai/tokenCount | 元梦ai-token统计 | | [**tokenCount()**](AiApi.md#tokenCount) | **POST** /v1/ai/tokenCount | 元梦ai-token统计 |
| [**voiceClone()**](AiApi.md#voiceClone) | **POST** /v1/ai/voiceClone | 元梦ai-语音克隆 |
## `chat()` ## `chat()`
@ -59,10 +61,10 @@ try {
[[返回模型列表]](../../README.md#模型文档) [[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md) [[返回README]](../../README.md)
## `extractText()` ## `extractContent()`
```php ```php
extractText($file, $param): \OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult extractContent($file, $param): \OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult
``` ```
元梦ai-提取上传文件的内容 元梦ai-提取上传文件的内容
@ -83,13 +85,13 @@ $apiInstance = new OpenAPI\Client\Api\AiApi(
new GuzzleHttp\Client() new GuzzleHttp\Client()
); );
$file = "/path/to/file.txt"; // \SplFileObject $file = "/path/to/file.txt"; // \SplFileObject
$param = new \OpenAPI\Client\Model\ExtractTextParam(); // \OpenAPI\Client\Model\ExtractTextParam $param = new \OpenAPI\Client\Model\ExtraContentParam(); // \OpenAPI\Client\Model\ExtraContentParam
try { try {
$result = $apiInstance->extractText($file, $param); $result = $apiInstance->extractContent($file, $param);
print_r($result); print_r($result);
} catch (Exception $e) { } catch (Exception $e) {
echo 'Exception when calling AiApi->extractText: ', $e->getMessage(), PHP_EOL; echo 'Exception when calling AiApi->extractContent: ', $e->getMessage(), PHP_EOL;
} }
``` ```
@ -98,11 +100,11 @@ try {
| Name | Type | Description | Notes | | Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- | | ------------- | ------------- | ------------- | ------------- |
| **file** | **\SplFileObject****\SplFileObject**| | [optional] | | **file** | **\SplFileObject****\SplFileObject**| | [optional] |
| **param** | [**\OpenAPI\Client\Model\ExtractTextParam**](../Model/ExtractTextParam.md)| | [optional] | | **param** | [**\OpenAPI\Client\Model\ExtraContentParam**](../Model/ExtraContentParam.md)| | [optional] |
### 返回类型 ### 返回类型
[**\OpenAPI\Client\Model\ResponseOpenAPIExtractTextResult**](../Model/ResponseOpenAPIExtractTextResult.md) [**\OpenAPI\Client\Model\ResponseOpenAPIExtractContentResult**](../Model/ResponseOpenAPIExtractContentResult.md)
### HTTP请求头 ### HTTP请求头
@ -113,6 +115,55 @@ try {
[[返回模型列表]](../../README.md#模型文档) [[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md) [[返回README]](../../README.md)
## `speakerList()`
```php
speakerList(): \OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult
```
元梦ai-获取发音人列表
获取发音人列表
### 示例
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\AiApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
try {
$result = $apiInstance->speakerList();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AiApi->speakerList: ', $e->getMessage(), PHP_EOL;
}
```
### 参数
该端点不需要任何参数.
### 返回类型
[**\OpenAPI\Client\Model\ResponseOpenAPISpeakerListResult**](../Model/ResponseOpenAPISpeakerListResult.md)
### HTTP请求头
- **Content-Type**: Not defined
- **Accept**: `*/*`
[[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档)
[[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md)
## `tokenCount()` ## `tokenCount()`
```php ```php
@ -164,3 +215,55 @@ try {
[[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档) [[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档)
[[返回模型列表]](../../README.md#模型文档) [[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md) [[返回README]](../../README.md)
## `voiceClone()`
```php
voiceClone($voice_clone_param): \OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult
```
元梦ai-语音克隆
语音克隆
### 示例
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new OpenAPI\Client\Api\AiApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$voice_clone_param = new \OpenAPI\Client\Model\VoiceCloneParam(); // \OpenAPI\Client\Model\VoiceCloneParam
try {
$result = $apiInstance->voiceClone($voice_clone_param);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AiApi->voiceClone: ', $e->getMessage(), PHP_EOL;
}
```
### 参数
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **voice_clone_param** | [**\OpenAPI\Client\Model\VoiceCloneParam**](../Model/VoiceCloneParam.md)| | [optional] |
### 返回类型
[**\OpenAPI\Client\Model\ResponseOpenAPIVoiceCloneResult**](../Model/ResponseOpenAPIVoiceCloneResult.md)
### HTTP请求头
- **Content-Type**: `application/json`
- **Accept**: `*/*`
[[回到顶部]](#) [[返回API列表]](../../README.md#api端点文档)
[[返回模型列表]](../../README.md#模型文档)
[[返回README]](../../README.md)

@ -1,4 +1,4 @@
# # ExtractTextParam # # ExtraContentParam
## 属性 ## 属性

@ -1,10 +1,10 @@
# # ExtractTextResult # # ExtractContentResult
## 属性 ## 属性
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**text** | **string** | 文本内容 | [optional] **text** | **string[]** | 文本内容 | [optional]
**pictures** | [**\OpenAPI\Client\Model\PictureInfo[]**](PictureInfo.md) | 图片信息 | [optional] **pictures** | [**\OpenAPI\Client\Model\PictureInfo[]**](PictureInfo.md) | 图片信息 | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md) [[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)

@ -0,0 +1,20 @@
# # ResponseOpenAPIExtractContentResult
## 属性
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time** | **string** | 该消息发生的时间 | [optional]
**openid** | **string** | | [optional]
**payload** | [**\OpenAPI\Client\Model\ExtractContentResult**](ExtractContentResult.md) | | [optional]
**sign** | **string** | | [optional]
**charset** | **string** | | [optional]
**description** | **string** | | [optional]
**response_id** | **string** | 消息的唯一ID | [optional]
**err_code** | **int** | 该消息的错误码 | [optional]
**err_msg** | **string** | 错误消息描述 | [optional]
**sub_err** | **int** | 子错误的具体的代号 | [optional]
**sub_msg** | **string** | 子错误对应的提示消息 | [optional]
**sign_type** | **string** | | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)

@ -1,4 +1,4 @@
# # ResponseOpenAPIExtractTextResult # # ResponseOpenAPISpeakerListResult
## 属性 ## 属性
@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**time** | **string** | 该消息发生的时间 | [optional] **time** | **string** | 该消息发生的时间 | [optional]
**openid** | **string** | | [optional] **openid** | **string** | | [optional]
**payload** | [**\OpenAPI\Client\Model\ExtractTextResult**](ExtractTextResult.md) | | [optional] **payload** | [**\OpenAPI\Client\Model\SpeakerListResult**](SpeakerListResult.md) | | [optional]
**sign** | **string** | | [optional] **sign** | **string** | | [optional]
**charset** | **string** | | [optional] **charset** | **string** | | [optional]
**description** | **string** | | [optional] **description** | **string** | | [optional]

@ -0,0 +1,20 @@
# # ResponseOpenAPIVoiceCloneResult
## 属性
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time** | **string** | 该消息发生的时间 | [optional]
**openid** | **string** | | [optional]
**payload** | [**\OpenAPI\Client\Model\VoiceCloneResult**](VoiceCloneResult.md) | | [optional]
**sign** | **string** | | [optional]
**charset** | **string** | | [optional]
**description** | **string** | | [optional]
**response_id** | **string** | 消息的唯一ID | [optional]
**err_code** | **int** | 该消息的错误码 | [optional]
**err_msg** | **string** | 错误消息描述 | [optional]
**sub_err** | **int** | 子错误的具体的代号 | [optional]
**sub_msg** | **string** | 子错误对应的提示消息 | [optional]
**sign_type** | **string** | | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)

@ -0,0 +1,12 @@
# # Speaker
## 属性
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | 发音人ID | [optional]
**sex** | **string** | 性别[male(男性),female(女性)] | [optional]
**year** | **string** | 年龄等级[A(小于14岁),B(14~25岁),C(26~40岁),D(大于41岁)] | [optional]
**accent** | **string** | 口音[north(北方),south(南方)] | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)

@ -0,0 +1,9 @@
# # SpeakerListResult
## 属性
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**speaker_list** | [**\OpenAPI\Client\Model\Speaker[]**](Speaker.md) | 发音人列表 | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)

@ -0,0 +1,15 @@
# # VoiceCloneParam
## 属性
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**text** | **string** | 需要合成音频的文本 |
**wav** | **string** | 要克隆的音频文件URL地址,当type为custom该字段有效 | [optional]
**type** | **string** | 克隆类型,可选值[sys(系统预设), custom(用户自定义)] |
**speaker** | **string** | 发音人,当type为sys该字段有效 | [optional]
**volume** | **int** | 音量,可选值[0 ~ 100] 默认50 | [optional]
**speed** | **float** | 语速,倍速,可选值[0.5, 1, 1.5, 2, 2.5] 默认1 | [optional]
**tone** | **float** | 音调,可选值[-1 ~ 1] 默认0 | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)

@ -0,0 +1,10 @@
# # VoiceCloneResult
## 属性
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**wav** | **string** | 生成的音频文件地址 | [optional]
**speaker** | **string** | 是否成功 success/fail | [optional]
[[返回模型列表]](../../README.md#模型文档) [[返回API列表]](../../README.md#api端点文档) [[返回README]](../../README.md)

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
<?php <?php
/** /**
* ExtractTextParam * ExtraContentParam
* *
* PHP version 7.4 * PHP version 7.4
* *
@ -32,7 +32,7 @@ use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer; use \OpenAPI\Client\ObjectSerializer;
/** /**
* ExtractTextParam Class Doc Comment * ExtraContentParam Class Doc Comment
* *
* @category Class * @category Class
* @description 提取文件内容所需参数 * @description 提取文件内容所需参数
@ -41,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed> * @implements \ArrayAccess<string, mixed>
*/ */
class ExtractTextParam implements ModelInterface, ArrayAccess, \JsonSerializable class ExtraContentParam implements ModelInterface, ArrayAccess, \JsonSerializable
{ {
public const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
@ -50,7 +50,7 @@ class ExtractTextParam implements ModelInterface, ArrayAccess, \JsonSerializable
* *
* @var string * @var string
*/ */
protected static $openAPIModelName = 'ExtractTextParam'; protected static $openAPIModelName = 'ExtraContentParam';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization

@ -1,6 +1,6 @@
<?php <?php
/** /**
* ExtractTextResult * ExtractContentResult
* *
* PHP version 7.4 * PHP version 7.4
* *
@ -32,7 +32,7 @@ use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer; use \OpenAPI\Client\ObjectSerializer;
/** /**
* ExtractTextResult Class Doc Comment * ExtractContentResult Class Doc Comment
* *
* @category Class * @category Class
* @description 提取结果 * @description 提取结果
@ -41,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed> * @implements \ArrayAccess<string, mixed>
*/ */
class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializable class ExtractContentResult implements ModelInterface, ArrayAccess, \JsonSerializable
{ {
public const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
@ -50,7 +50,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
* *
* @var string * @var string
*/ */
protected static $openAPIModelName = 'ExtractTextResult'; protected static $openAPIModelName = 'ExtractContentResult';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
@ -58,7 +58,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
* @var string[] * @var string[]
*/ */
protected static $openAPITypes = [ protected static $openAPITypes = [
'text' => 'string', 'text' => 'string[]',
'pictures' => '\OpenAPI\Client\Model\PictureInfo[]' 'pictures' => '\OpenAPI\Client\Model\PictureInfo[]'
]; ];
@ -300,7 +300,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
/** /**
* Gets text * Gets text
* *
* @return string|null * @return string[]|null
*/ */
public function getText() public function getText()
{ {
@ -310,7 +310,7 @@ class ExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializabl
/** /**
* Sets text * Sets text
* *
* @param string|null $text 文本内容 * @param string[]|null $text 文本内容
* *
* @return self * @return self
*/ */

@ -0,0 +1,784 @@
<?php
/**
* ResponseOpenAPIExtractContentResult
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* ResponseOpenAPIExtractContentResult Class Doc Comment
*
* @category Class
* @description 消息载体对象
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class ResponseOpenAPIExtractContentResult implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'ResponseOpenAPIExtractContentResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time' => 'string',
'openid' => 'string',
'payload' => '\OpenAPI\Client\Model\ExtractContentResult',
'sign' => 'string',
'charset' => 'string',
'description' => 'string',
'response_id' => 'string',
'err_code' => 'int',
'err_msg' => 'string',
'sub_err' => 'int',
'sub_msg' => 'string',
'sign_type' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'time' => null,
'openid' => null,
'payload' => null,
'sign' => null,
'charset' => null,
'description' => null,
'response_id' => null,
'err_code' => 'int32',
'err_msg' => null,
'sub_err' => 'int32',
'sub_msg' => null,
'sign_type' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time' => false,
'openid' => false,
'payload' => false,
'sign' => false,
'charset' => false,
'description' => false,
'response_id' => false,
'err_code' => false,
'err_msg' => false,
'sub_err' => false,
'sub_msg' => false,
'sign_type' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'time' => 'time',
'openid' => 'openid',
'payload' => 'payload',
'sign' => 'sign',
'charset' => 'charset',
'description' => 'description',
'response_id' => 'response_id',
'err_code' => 'err_code',
'err_msg' => 'err_msg',
'sub_err' => 'sub_err',
'sub_msg' => 'sub_msg',
'sign_type' => 'sign_type'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time' => 'setTime',
'openid' => 'setOpenid',
'payload' => 'setPayload',
'sign' => 'setSign',
'charset' => 'setCharset',
'description' => 'setDescription',
'response_id' => 'setResponseId',
'err_code' => 'setErrCode',
'err_msg' => 'setErrMsg',
'sub_err' => 'setSubErr',
'sub_msg' => 'setSubMsg',
'sign_type' => 'setSignType'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time' => 'getTime',
'openid' => 'getOpenid',
'payload' => 'getPayload',
'sign' => 'getSign',
'charset' => 'getCharset',
'description' => 'getDescription',
'response_id' => 'getResponseId',
'err_code' => 'getErrCode',
'err_msg' => 'getErrMsg',
'sub_err' => 'getSubErr',
'sub_msg' => 'getSubMsg',
'sign_type' => 'getSignType'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->setIfExists('time', $data ?? [], null);
$this->setIfExists('openid', $data ?? [], null);
$this->setIfExists('payload', $data ?? [], null);
$this->setIfExists('sign', $data ?? [], null);
$this->setIfExists('charset', $data ?? [], null);
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('response_id', $data ?? [], null);
$this->setIfExists('err_code', $data ?? [], null);
$this->setIfExists('err_msg', $data ?? [], null);
$this->setIfExists('sub_err', $data ?? [], null);
$this->setIfExists('sub_msg', $data ?? [], null);
$this->setIfExists('sign_type', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets time
*
* @return string|null
*/
public function getTime()
{
return $this->container['time'];
}
/**
* Sets time
*
* @param string|null $time 该消息发生的时间
*
* @return self
*/
public function setTime($time)
{
if (is_null($time)) {
throw new \InvalidArgumentException('non-nullable time cannot be null');
}
$this->container['time'] = $time;
return $this;
}
/**
* Gets openid
*
* @return string|null
*/
public function getOpenid()
{
return $this->container['openid'];
}
/**
* Sets openid
*
* @param string|null $openid openid
*
* @return self
*/
public function setOpenid($openid)
{
if (is_null($openid)) {
throw new \InvalidArgumentException('non-nullable openid cannot be null');
}
$this->container['openid'] = $openid;
return $this;
}
/**
* Gets payload
*
* @return \OpenAPI\Client\Model\ExtractContentResult|null
*/
public function getPayload()
{
return $this->container['payload'];
}
/**
* Sets payload
*
* @param \OpenAPI\Client\Model\ExtractContentResult|null $payload payload
*
* @return self
*/
public function setPayload($payload)
{
if (is_null($payload)) {
throw new \InvalidArgumentException('non-nullable payload cannot be null');
}
$this->container['payload'] = $payload;
return $this;
}
/**
* Gets sign
*
* @return string|null
*/
public function getSign()
{
return $this->container['sign'];
}
/**
* Sets sign
*
* @param string|null $sign sign
*
* @return self
*/
public function setSign($sign)
{
if (is_null($sign)) {
throw new \InvalidArgumentException('non-nullable sign cannot be null');
}
$this->container['sign'] = $sign;
return $this;
}
/**
* Gets charset
*
* @return string|null
*/
public function getCharset()
{
return $this->container['charset'];
}
/**
* Sets charset
*
* @param string|null $charset charset
*
* @return self
*/
public function setCharset($charset)
{
if (is_null($charset)) {
throw new \InvalidArgumentException('non-nullable charset cannot be null');
}
$this->container['charset'] = $charset;
return $this;
}
/**
* Gets description
*
* @return string|null
*/
public function getDescription()
{
return $this->container['description'];
}
/**
* Sets description
*
* @param string|null $description description
*
* @return self
*/
public function setDescription($description)
{
if (is_null($description)) {
throw new \InvalidArgumentException('non-nullable description cannot be null');
}
$this->container['description'] = $description;
return $this;
}
/**
* Gets response_id
*
* @return string|null
*/
public function getResponseId()
{
return $this->container['response_id'];
}
/**
* Sets response_id
*
* @param string|null $response_id 消息的唯一ID
*
* @return self
*/
public function setResponseId($response_id)
{
if (is_null($response_id)) {
throw new \InvalidArgumentException('non-nullable response_id cannot be null');
}
$this->container['response_id'] = $response_id;
return $this;
}
/**
* Gets err_code
*
* @return int|null
*/
public function getErrCode()
{
return $this->container['err_code'];
}
/**
* Sets err_code
*
* @param int|null $err_code 该消息的错误码
*
* @return self
*/
public function setErrCode($err_code)
{
if (is_null($err_code)) {
throw new \InvalidArgumentException('non-nullable err_code cannot be null');
}
$this->container['err_code'] = $err_code;
return $this;
}
/**
* Gets err_msg
*
* @return string|null
*/
public function getErrMsg()
{
return $this->container['err_msg'];
}
/**
* Sets err_msg
*
* @param string|null $err_msg 错误消息描述
*
* @return self
*/
public function setErrMsg($err_msg)
{
if (is_null($err_msg)) {
throw new \InvalidArgumentException('non-nullable err_msg cannot be null');
}
$this->container['err_msg'] = $err_msg;
return $this;
}
/**
* Gets sub_err
*
* @return int|null
*/
public function getSubErr()
{
return $this->container['sub_err'];
}
/**
* Sets sub_err
*
* @param int|null $sub_err 子错误的具体的代号
*
* @return self
*/
public function setSubErr($sub_err)
{
if (is_null($sub_err)) {
throw new \InvalidArgumentException('non-nullable sub_err cannot be null');
}
$this->container['sub_err'] = $sub_err;
return $this;
}
/**
* Gets sub_msg
*
* @return string|null
*/
public function getSubMsg()
{
return $this->container['sub_msg'];
}
/**
* Sets sub_msg
*
* @param string|null $sub_msg 子错误对应的提示消息
*
* @return self
*/
public function setSubMsg($sub_msg)
{
if (is_null($sub_msg)) {
throw new \InvalidArgumentException('non-nullable sub_msg cannot be null');
}
$this->container['sub_msg'] = $sub_msg;
return $this;
}
/**
* Gets sign_type
*
* @return string|null
*/
public function getSignType()
{
return $this->container['sign_type'];
}
/**
* Sets sign_type
*
* @param string|null $sign_type sign_type
*
* @return self
*/
public function setSignType($sign_type)
{
if (is_null($sign_type)) {
throw new \InvalidArgumentException('non-nullable sign_type cannot be null');
}
$this->container['sign_type'] = $sign_type;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

@ -1,6 +1,6 @@
<?php <?php
/** /**
* ResponseOpenAPIExtractTextResult * ResponseOpenAPISpeakerListResult
* *
* PHP version 7.4 * PHP version 7.4
* *
@ -32,7 +32,7 @@ use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer; use \OpenAPI\Client\ObjectSerializer;
/** /**
* ResponseOpenAPIExtractTextResult Class Doc Comment * ResponseOpenAPISpeakerListResult Class Doc Comment
* *
* @category Class * @category Class
* @description 消息载体对象 * @description 消息载体对象
@ -41,7 +41,7 @@ use \OpenAPI\Client\ObjectSerializer;
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed> * @implements \ArrayAccess<string, mixed>
*/ */
class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \JsonSerializable class ResponseOpenAPISpeakerListResult implements ModelInterface, ArrayAccess, \JsonSerializable
{ {
public const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
@ -50,7 +50,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
* *
* @var string * @var string
*/ */
protected static $openAPIModelName = 'ResponseOpenAPIExtractTextResult'; protected static $openAPIModelName = 'ResponseOpenAPISpeakerListResult';
/** /**
* Array of property to type mappings. Used for (de)serialization * Array of property to type mappings. Used for (de)serialization
@ -60,7 +60,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
protected static $openAPITypes = [ protected static $openAPITypes = [
'time' => 'string', 'time' => 'string',
'openid' => 'string', 'openid' => 'string',
'payload' => '\OpenAPI\Client\Model\ExtractTextResult', 'payload' => '\OpenAPI\Client\Model\SpeakerListResult',
'sign' => 'string', 'sign' => 'string',
'charset' => 'string', 'charset' => 'string',
'description' => 'string', 'description' => 'string',
@ -424,7 +424,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
/** /**
* Gets payload * Gets payload
* *
* @return \OpenAPI\Client\Model\ExtractTextResult|null * @return \OpenAPI\Client\Model\SpeakerListResult|null
*/ */
public function getPayload() public function getPayload()
{ {
@ -434,7 +434,7 @@ class ResponseOpenAPIExtractTextResult implements ModelInterface, ArrayAccess, \
/** /**
* Sets payload * Sets payload
* *
* @param \OpenAPI\Client\Model\ExtractTextResult|null $payload payload * @param \OpenAPI\Client\Model\SpeakerListResult|null $payload payload
* *
* @return self * @return self
*/ */

@ -0,0 +1,784 @@
<?php
/**
* ResponseOpenAPIVoiceCloneResult
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* ResponseOpenAPIVoiceCloneResult Class Doc Comment
*
* @category Class
* @description 消息载体对象
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class ResponseOpenAPIVoiceCloneResult implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'ResponseOpenAPIVoiceCloneResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time' => 'string',
'openid' => 'string',
'payload' => '\OpenAPI\Client\Model\VoiceCloneResult',
'sign' => 'string',
'charset' => 'string',
'description' => 'string',
'response_id' => 'string',
'err_code' => 'int',
'err_msg' => 'string',
'sub_err' => 'int',
'sub_msg' => 'string',
'sign_type' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'time' => null,
'openid' => null,
'payload' => null,
'sign' => null,
'charset' => null,
'description' => null,
'response_id' => null,
'err_code' => 'int32',
'err_msg' => null,
'sub_err' => 'int32',
'sub_msg' => null,
'sign_type' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time' => false,
'openid' => false,
'payload' => false,
'sign' => false,
'charset' => false,
'description' => false,
'response_id' => false,
'err_code' => false,
'err_msg' => false,
'sub_err' => false,
'sub_msg' => false,
'sign_type' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'time' => 'time',
'openid' => 'openid',
'payload' => 'payload',
'sign' => 'sign',
'charset' => 'charset',
'description' => 'description',
'response_id' => 'response_id',
'err_code' => 'err_code',
'err_msg' => 'err_msg',
'sub_err' => 'sub_err',
'sub_msg' => 'sub_msg',
'sign_type' => 'sign_type'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time' => 'setTime',
'openid' => 'setOpenid',
'payload' => 'setPayload',
'sign' => 'setSign',
'charset' => 'setCharset',
'description' => 'setDescription',
'response_id' => 'setResponseId',
'err_code' => 'setErrCode',
'err_msg' => 'setErrMsg',
'sub_err' => 'setSubErr',
'sub_msg' => 'setSubMsg',
'sign_type' => 'setSignType'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time' => 'getTime',
'openid' => 'getOpenid',
'payload' => 'getPayload',
'sign' => 'getSign',
'charset' => 'getCharset',
'description' => 'getDescription',
'response_id' => 'getResponseId',
'err_code' => 'getErrCode',
'err_msg' => 'getErrMsg',
'sub_err' => 'getSubErr',
'sub_msg' => 'getSubMsg',
'sign_type' => 'getSignType'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->setIfExists('time', $data ?? [], null);
$this->setIfExists('openid', $data ?? [], null);
$this->setIfExists('payload', $data ?? [], null);
$this->setIfExists('sign', $data ?? [], null);
$this->setIfExists('charset', $data ?? [], null);
$this->setIfExists('description', $data ?? [], null);
$this->setIfExists('response_id', $data ?? [], null);
$this->setIfExists('err_code', $data ?? [], null);
$this->setIfExists('err_msg', $data ?? [], null);
$this->setIfExists('sub_err', $data ?? [], null);
$this->setIfExists('sub_msg', $data ?? [], null);
$this->setIfExists('sign_type', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets time
*
* @return string|null
*/
public function getTime()
{
return $this->container['time'];
}
/**
* Sets time
*
* @param string|null $time 该消息发生的时间
*
* @return self
*/
public function setTime($time)
{
if (is_null($time)) {
throw new \InvalidArgumentException('non-nullable time cannot be null');
}
$this->container['time'] = $time;
return $this;
}
/**
* Gets openid
*
* @return string|null
*/
public function getOpenid()
{
return $this->container['openid'];
}
/**
* Sets openid
*
* @param string|null $openid openid
*
* @return self
*/
public function setOpenid($openid)
{
if (is_null($openid)) {
throw new \InvalidArgumentException('non-nullable openid cannot be null');
}
$this->container['openid'] = $openid;
return $this;
}
/**
* Gets payload
*
* @return \OpenAPI\Client\Model\VoiceCloneResult|null
*/
public function getPayload()
{
return $this->container['payload'];
}
/**
* Sets payload
*
* @param \OpenAPI\Client\Model\VoiceCloneResult|null $payload payload
*
* @return self
*/
public function setPayload($payload)
{
if (is_null($payload)) {
throw new \InvalidArgumentException('non-nullable payload cannot be null');
}
$this->container['payload'] = $payload;
return $this;
}
/**
* Gets sign
*
* @return string|null
*/
public function getSign()
{
return $this->container['sign'];
}
/**
* Sets sign
*
* @param string|null $sign sign
*
* @return self
*/
public function setSign($sign)
{
if (is_null($sign)) {
throw new \InvalidArgumentException('non-nullable sign cannot be null');
}
$this->container['sign'] = $sign;
return $this;
}
/**
* Gets charset
*
* @return string|null
*/
public function getCharset()
{
return $this->container['charset'];
}
/**
* Sets charset
*
* @param string|null $charset charset
*
* @return self
*/
public function setCharset($charset)
{
if (is_null($charset)) {
throw new \InvalidArgumentException('non-nullable charset cannot be null');
}
$this->container['charset'] = $charset;
return $this;
}
/**
* Gets description
*
* @return string|null
*/
public function getDescription()
{
return $this->container['description'];
}
/**
* Sets description
*
* @param string|null $description description
*
* @return self
*/
public function setDescription($description)
{
if (is_null($description)) {
throw new \InvalidArgumentException('non-nullable description cannot be null');
}
$this->container['description'] = $description;
return $this;
}
/**
* Gets response_id
*
* @return string|null
*/
public function getResponseId()
{
return $this->container['response_id'];
}
/**
* Sets response_id
*
* @param string|null $response_id 消息的唯一ID
*
* @return self
*/
public function setResponseId($response_id)
{
if (is_null($response_id)) {
throw new \InvalidArgumentException('non-nullable response_id cannot be null');
}
$this->container['response_id'] = $response_id;
return $this;
}
/**
* Gets err_code
*
* @return int|null
*/
public function getErrCode()
{
return $this->container['err_code'];
}
/**
* Sets err_code
*
* @param int|null $err_code 该消息的错误码
*
* @return self
*/
public function setErrCode($err_code)
{
if (is_null($err_code)) {
throw new \InvalidArgumentException('non-nullable err_code cannot be null');
}
$this->container['err_code'] = $err_code;
return $this;
}
/**
* Gets err_msg
*
* @return string|null
*/
public function getErrMsg()
{
return $this->container['err_msg'];
}
/**
* Sets err_msg
*
* @param string|null $err_msg 错误消息描述
*
* @return self
*/
public function setErrMsg($err_msg)
{
if (is_null($err_msg)) {
throw new \InvalidArgumentException('non-nullable err_msg cannot be null');
}
$this->container['err_msg'] = $err_msg;
return $this;
}
/**
* Gets sub_err
*
* @return int|null
*/
public function getSubErr()
{
return $this->container['sub_err'];
}
/**
* Sets sub_err
*
* @param int|null $sub_err 子错误的具体的代号
*
* @return self
*/
public function setSubErr($sub_err)
{
if (is_null($sub_err)) {
throw new \InvalidArgumentException('non-nullable sub_err cannot be null');
}
$this->container['sub_err'] = $sub_err;
return $this;
}
/**
* Gets sub_msg
*
* @return string|null
*/
public function getSubMsg()
{
return $this->container['sub_msg'];
}
/**
* Sets sub_msg
*
* @param string|null $sub_msg 子错误对应的提示消息
*
* @return self
*/
public function setSubMsg($sub_msg)
{
if (is_null($sub_msg)) {
throw new \InvalidArgumentException('non-nullable sub_msg cannot be null');
}
$this->container['sub_msg'] = $sub_msg;
return $this;
}
/**
* Gets sign_type
*
* @return string|null
*/
public function getSignType()
{
return $this->container['sign_type'];
}
/**
* Sets sign_type
*
* @param string|null $sign_type sign_type
*
* @return self
*/
public function setSignType($sign_type)
{
if (is_null($sign_type)) {
throw new \InvalidArgumentException('non-nullable sign_type cannot be null');
}
$this->container['sign_type'] = $sign_type;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

@ -0,0 +1,512 @@
<?php
/**
* Speaker
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Speaker Class Doc Comment
*
* @category Class
* @description 发音人
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Speaker implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'Speaker';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'name' => 'string',
'sex' => 'string',
'year' => 'string',
'accent' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'name' => null,
'sex' => null,
'year' => null,
'accent' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'name' => false,
'sex' => false,
'year' => false,
'accent' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'name' => 'name',
'sex' => 'sex',
'year' => 'year',
'accent' => 'accent'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'name' => 'setName',
'sex' => 'setSex',
'year' => 'setYear',
'accent' => 'setAccent'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'name' => 'getName',
'sex' => 'getSex',
'year' => 'getYear',
'accent' => 'getAccent'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->setIfExists('name', $data ?? [], null);
$this->setIfExists('sex', $data ?? [], null);
$this->setIfExists('year', $data ?? [], null);
$this->setIfExists('accent', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets name
*
* @return string|null
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string|null $name 发音人ID
*
* @return self
*/
public function setName($name)
{
if (is_null($name)) {
throw new \InvalidArgumentException('non-nullable name cannot be null');
}
$this->container['name'] = $name;
return $this;
}
/**
* Gets sex
*
* @return string|null
*/
public function getSex()
{
return $this->container['sex'];
}
/**
* Sets sex
*
* @param string|null $sex 性别[male(男性),female(女性)]
*
* @return self
*/
public function setSex($sex)
{
if (is_null($sex)) {
throw new \InvalidArgumentException('non-nullable sex cannot be null');
}
$this->container['sex'] = $sex;
return $this;
}
/**
* Gets year
*
* @return string|null
*/
public function getYear()
{
return $this->container['year'];
}
/**
* Sets year
*
* @param string|null $year 年龄等级[A(小于14岁),B(14~25岁),C(26~40岁),D(大于41岁)]
*
* @return self
*/
public function setYear($year)
{
if (is_null($year)) {
throw new \InvalidArgumentException('non-nullable year cannot be null');
}
$this->container['year'] = $year;
return $this;
}
/**
* Gets accent
*
* @return string|null
*/
public function getAccent()
{
return $this->container['accent'];
}
/**
* Sets accent
*
* @param string|null $accent 口音[north(北方),south(南方)]
*
* @return self
*/
public function setAccent($accent)
{
if (is_null($accent)) {
throw new \InvalidArgumentException('non-nullable accent cannot be null');
}
$this->container['accent'] = $accent;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

@ -0,0 +1,410 @@
<?php
/**
* SpeakerListResult
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* SpeakerListResult Class Doc Comment
*
* @category Class
* @description 发音人列表
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class SpeakerListResult implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'SpeakerListResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'speaker_list' => '\OpenAPI\Client\Model\Speaker[]'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'speaker_list' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'speaker_list' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'speaker_list' => 'speakerList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'speaker_list' => 'setSpeakerList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'speaker_list' => 'getSpeakerList'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->setIfExists('speaker_list', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets speaker_list
*
* @return \OpenAPI\Client\Model\Speaker[]|null
*/
public function getSpeakerList()
{
return $this->container['speaker_list'];
}
/**
* Sets speaker_list
*
* @param \OpenAPI\Client\Model\Speaker[]|null $speaker_list 发音人列表
*
* @return self
*/
public function setSpeakerList($speaker_list)
{
if (is_null($speaker_list)) {
throw new \InvalidArgumentException('non-nullable speaker_list cannot be null');
}
$this->container['speaker_list'] = $speaker_list;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

@ -0,0 +1,620 @@
<?php
/**
* VoiceCloneParam
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* VoiceCloneParam Class Doc Comment
*
* @category Class
* @description 语音克隆参数
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class VoiceCloneParam implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'VoiceCloneParam';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'text' => 'string',
'wav' => 'string',
'type' => 'string',
'speaker' => 'string',
'volume' => 'int',
'speed' => 'float',
'tone' => 'float'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'text' => null,
'wav' => null,
'type' => null,
'speaker' => null,
'volume' => 'int32',
'speed' => 'float',
'tone' => 'float'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'text' => false,
'wav' => false,
'type' => false,
'speaker' => false,
'volume' => false,
'speed' => false,
'tone' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'text' => 'text',
'wav' => 'wav',
'type' => 'type',
'speaker' => 'speaker',
'volume' => 'volume',
'speed' => 'speed',
'tone' => 'tone'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'text' => 'setText',
'wav' => 'setWav',
'type' => 'setType',
'speaker' => 'setSpeaker',
'volume' => 'setVolume',
'speed' => 'setSpeed',
'tone' => 'setTone'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'text' => 'getText',
'wav' => 'getWav',
'type' => 'getType',
'speaker' => 'getSpeaker',
'volume' => 'getVolume',
'speed' => 'getSpeed',
'tone' => 'getTone'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->setIfExists('text', $data ?? [], null);
$this->setIfExists('wav', $data ?? [], null);
$this->setIfExists('type', $data ?? [], null);
$this->setIfExists('speaker', $data ?? [], null);
$this->setIfExists('volume', $data ?? [], null);
$this->setIfExists('speed', $data ?? [], null);
$this->setIfExists('tone', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['text'] === null) {
$invalidProperties[] = "'text' can't be null";
}
if ($this->container['type'] === null) {
$invalidProperties[] = "'type' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets text
*
* @return string
*/
public function getText()
{
return $this->container['text'];
}
/**
* Sets text
*
* @param string $text 需要合成音频的文本
*
* @return self
*/
public function setText($text)
{
if (is_null($text)) {
throw new \InvalidArgumentException('non-nullable text cannot be null');
}
$this->container['text'] = $text;
return $this;
}
/**
* Gets wav
*
* @return string|null
*/
public function getWav()
{
return $this->container['wav'];
}
/**
* Sets wav
*
* @param string|null $wav 要克隆的音频文件URL地址,当type为custom该字段有效
*
* @return self
*/
public function setWav($wav)
{
if (is_null($wav)) {
throw new \InvalidArgumentException('non-nullable wav cannot be null');
}
$this->container['wav'] = $wav;
return $this;
}
/**
* Gets type
*
* @return string
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string $type 克隆类型,可选值[sys(系统预设), custom(用户自定义)]
*
* @return self
*/
public function setType($type)
{
if (is_null($type)) {
throw new \InvalidArgumentException('non-nullable type cannot be null');
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets speaker
*
* @return string|null
*/
public function getSpeaker()
{
return $this->container['speaker'];
}
/**
* Sets speaker
*
* @param string|null $speaker 发音人,当type为sys该字段有效
*
* @return self
*/
public function setSpeaker($speaker)
{
if (is_null($speaker)) {
throw new \InvalidArgumentException('non-nullable speaker cannot be null');
}
$this->container['speaker'] = $speaker;
return $this;
}
/**
* Gets volume
*
* @return int|null
*/
public function getVolume()
{
return $this->container['volume'];
}
/**
* Sets volume
*
* @param int|null $volume 音量,可选值[0 ~ 100] 默认50
*
* @return self
*/
public function setVolume($volume)
{
if (is_null($volume)) {
throw new \InvalidArgumentException('non-nullable volume cannot be null');
}
$this->container['volume'] = $volume;
return $this;
}
/**
* Gets speed
*
* @return float|null
*/
public function getSpeed()
{
return $this->container['speed'];
}
/**
* Sets speed
*
* @param float|null $speed 语速,倍速,可选值[0.5, 1, 1.5, 2, 2.5] 默认1
*
* @return self
*/
public function setSpeed($speed)
{
if (is_null($speed)) {
throw new \InvalidArgumentException('non-nullable speed cannot be null');
}
$this->container['speed'] = $speed;
return $this;
}
/**
* Gets tone
*
* @return float|null
*/
public function getTone()
{
return $this->container['tone'];
}
/**
* Sets tone
*
* @param float|null $tone 音调,可选值[-1 ~ 1] 默认0
*
* @return self
*/
public function setTone($tone)
{
if (is_null($tone)) {
throw new \InvalidArgumentException('non-nullable tone cannot be null');
}
$this->container['tone'] = $tone;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

@ -0,0 +1,444 @@
<?php
/**
* VoiceCloneResult
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* VoiceCloneResult Class Doc Comment
*
* @category Class
* @description 语音克隆结果
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class VoiceCloneResult implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'VoiceCloneResult';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'wav' => 'string',
'speaker' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'wav' => null,
'speaker' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'wav' => false,
'speaker' => false
];
/**
* If a nullable field gets set to null, insert it here
*
* @var boolean[]
*/
protected array $openAPINullablesSetToNull = [];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of nullable properties
*
* @return array
*/
protected static function openAPINullables(): array
{
return self::$openAPINullables;
}
/**
* Array of nullable field names deliberately set to null
*
* @return boolean[]
*/
private function getOpenAPINullablesSetToNull(): array
{
return $this->openAPINullablesSetToNull;
}
/**
* Setter - Array of nullable field names deliberately set to null
*
* @param boolean[] $openAPINullablesSetToNull
*/
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
{
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
}
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool
{
return self::openAPINullables()[$property] ?? false;
}
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool
{
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'wav' => 'wav',
'speaker' => 'speaker'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'wav' => 'setWav',
'speaker' => 'setSpeaker'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'wav' => 'getWav',
'speaker' => 'getSpeaker'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->setIfExists('wav', $data ?? [], null);
$this->setIfExists('speaker', $data ?? [], null);
}
/**
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
* $this->openAPINullablesSetToNull array
*
* @param string $variableName
* @param array $fields
* @param mixed $defaultValue
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
$this->openAPINullablesSetToNull[] = $variableName;
}
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets wav
*
* @return string|null
*/
public function getWav()
{
return $this->container['wav'];
}
/**
* Sets wav
*
* @param string|null $wav 生成的音频文件地址
*
* @return self
*/
public function setWav($wav)
{
if (is_null($wav)) {
throw new \InvalidArgumentException('non-nullable wav cannot be null');
}
$this->container['wav'] = $wav;
return $this;
}
/**
* Gets speaker
*
* @return string|null
*/
public function getSpeaker()
{
return $this->container['speaker'];
}
/**
* Sets speaker
*
* @param string|null $speaker 是否成功 success/fail
*
* @return self
*/
public function setSpeaker($speaker)
{
if (is_null($speaker)) {
throw new \InvalidArgumentException('non-nullable speaker cannot be null');
}
$this->container['speaker'] = $speaker;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset): bool
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->container[$offset] ?? null;
}
/**
* Sets value based on offset.
*
* @param int|null $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value): void
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset): void
{
unset($this->container[$offset]);
}
/**
* Serializes the object to a value that can be serialized natively by json_encode().
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
*
* @return mixed Returns data which can be serialized by json_encode(), which is a value
* of any type other than a resource.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ObjectSerializer::sanitizeForSerialization($this);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
/**
* Gets a header-safe presentation of the object
*
* @return string
*/
public function toHeaderValue()
{
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}

@ -84,12 +84,24 @@ class AiApiTest extends TestCase
} }
/** /**
* Test case for extractText * Test case for extractContent
* *
* 元梦ai-提取上传文件的内容. * 元梦ai-提取上传文件的内容.
* *
*/ */
public function testExtractText() public function testExtractContent()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test case for speakerList
*
* 元梦ai-获取发音人列表.
*
*/
public function testSpeakerList()
{ {
// TODO: implement // TODO: implement
$this->markTestIncomplete('Not implemented'); $this->markTestIncomplete('Not implemented');
@ -106,4 +118,16 @@ class AiApiTest extends TestCase
// TODO: implement // TODO: implement
$this->markTestIncomplete('Not implemented'); $this->markTestIncomplete('Not implemented');
} }
/**
* Test case for voiceClone
*
* 元梦ai-语音克隆.
*
*/
public function testVoiceClone()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
} }

@ -1,6 +1,6 @@
<?php <?php
/** /**
* ExtractTextParamTest * ExtraContentParamTest
* *
* PHP version 7.4 * PHP version 7.4
* *
@ -31,7 +31,7 @@ namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
/** /**
* ExtractTextParamTest Class Doc Comment * ExtraContentParamTest Class Doc Comment
* *
* @category Class * @category Class
* @description 提取文件内容所需参数 * @description 提取文件内容所需参数
@ -39,7 +39,7 @@ use PHPUnit\Framework\TestCase;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
*/ */
class ExtractTextParamTest extends TestCase class ExtraContentParamTest extends TestCase
{ {
/** /**
@ -71,9 +71,9 @@ class ExtractTextParamTest extends TestCase
} }
/** /**
* Test "ExtractTextParam" * Test "ExtraContentParam"
*/ */
public function testExtractTextParam() public function testExtraContentParam()
{ {
// TODO: implement // TODO: implement
$this->markTestIncomplete('Not implemented'); $this->markTestIncomplete('Not implemented');

@ -1,6 +1,6 @@
<?php <?php
/** /**
* ExtractTextResultTest * ExtractContentResultTest
* *
* PHP version 7.4 * PHP version 7.4
* *
@ -31,7 +31,7 @@ namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
/** /**
* ExtractTextResultTest Class Doc Comment * ExtractContentResultTest Class Doc Comment
* *
* @category Class * @category Class
* @description 提取结果 * @description 提取结果
@ -39,7 +39,7 @@ use PHPUnit\Framework\TestCase;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
*/ */
class ExtractTextResultTest extends TestCase class ExtractContentResultTest extends TestCase
{ {
/** /**
@ -71,9 +71,9 @@ class ExtractTextResultTest extends TestCase
} }
/** /**
* Test "ExtractTextResult" * Test "ExtractContentResult"
*/ */
public function testExtractTextResult() public function testExtractContentResult()
{ {
// TODO: implement // TODO: implement
$this->markTestIncomplete('Not implemented'); $this->markTestIncomplete('Not implemented');

@ -0,0 +1,189 @@
<?php
/**
* ResponseOpenAPIExtractContentResultTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* ResponseOpenAPIExtractContentResultTest Class Doc Comment
*
* @category Class
* @description 消息载体对象
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ResponseOpenAPIExtractContentResultTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "ResponseOpenAPIExtractContentResult"
*/
public function testResponseOpenAPIExtractContentResult()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "time"
*/
public function testPropertyTime()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "openid"
*/
public function testPropertyOpenid()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "payload"
*/
public function testPropertyPayload()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sign"
*/
public function testPropertySign()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "charset"
*/
public function testPropertyCharset()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "description"
*/
public function testPropertyDescription()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "response_id"
*/
public function testPropertyResponseId()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "err_code"
*/
public function testPropertyErrCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "err_msg"
*/
public function testPropertyErrMsg()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sub_err"
*/
public function testPropertySubErr()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sub_msg"
*/
public function testPropertySubMsg()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sign_type"
*/
public function testPropertySignType()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
}

@ -1,6 +1,6 @@
<?php <?php
/** /**
* ResponseOpenAPIExtractTextResultTest * ResponseOpenAPISpeakerListResultTest
* *
* PHP version 7.4 * PHP version 7.4
* *
@ -31,7 +31,7 @@ namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
/** /**
* ResponseOpenAPIExtractTextResultTest Class Doc Comment * ResponseOpenAPISpeakerListResultTest Class Doc Comment
* *
* @category Class * @category Class
* @description 消息载体对象 * @description 消息载体对象
@ -39,7 +39,7 @@ use PHPUnit\Framework\TestCase;
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
*/ */
class ResponseOpenAPIExtractTextResultTest extends TestCase class ResponseOpenAPISpeakerListResultTest extends TestCase
{ {
/** /**
@ -71,9 +71,9 @@ class ResponseOpenAPIExtractTextResultTest extends TestCase
} }
/** /**
* Test "ResponseOpenAPIExtractTextResult" * Test "ResponseOpenAPISpeakerListResult"
*/ */
public function testResponseOpenAPIExtractTextResult() public function testResponseOpenAPISpeakerListResult()
{ {
// TODO: implement // TODO: implement
$this->markTestIncomplete('Not implemented'); $this->markTestIncomplete('Not implemented');

@ -0,0 +1,189 @@
<?php
/**
* ResponseOpenAPIVoiceCloneResultTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* ResponseOpenAPIVoiceCloneResultTest Class Doc Comment
*
* @category Class
* @description 消息载体对象
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ResponseOpenAPIVoiceCloneResultTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "ResponseOpenAPIVoiceCloneResult"
*/
public function testResponseOpenAPIVoiceCloneResult()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "time"
*/
public function testPropertyTime()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "openid"
*/
public function testPropertyOpenid()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "payload"
*/
public function testPropertyPayload()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sign"
*/
public function testPropertySign()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "charset"
*/
public function testPropertyCharset()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "description"
*/
public function testPropertyDescription()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "response_id"
*/
public function testPropertyResponseId()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "err_code"
*/
public function testPropertyErrCode()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "err_msg"
*/
public function testPropertyErrMsg()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sub_err"
*/
public function testPropertySubErr()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sub_msg"
*/
public function testPropertySubMsg()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sign_type"
*/
public function testPropertySignType()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
}

@ -0,0 +1,90 @@
<?php
/**
* SpeakerListResultTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* SpeakerListResultTest Class Doc Comment
*
* @category Class
* @description 发音人列表
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class SpeakerListResultTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "SpeakerListResult"
*/
public function testSpeakerListResult()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "speaker_list"
*/
public function testPropertySpeakerList()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
}

@ -0,0 +1,117 @@
<?php
/**
* SpeakerTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* SpeakerTest Class Doc Comment
*
* @category Class
* @description 发音人
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class SpeakerTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "Speaker"
*/
public function testSpeaker()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "name"
*/
public function testPropertyName()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "sex"
*/
public function testPropertySex()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "year"
*/
public function testPropertyYear()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "accent"
*/
public function testPropertyAccent()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
}

@ -0,0 +1,144 @@
<?php
/**
* VoiceCloneParamTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* VoiceCloneParamTest Class Doc Comment
*
* @category Class
* @description 语音克隆参数
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class VoiceCloneParamTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "VoiceCloneParam"
*/
public function testVoiceCloneParam()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "text"
*/
public function testPropertyText()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "wav"
*/
public function testPropertyWav()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "type"
*/
public function testPropertyType()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "speaker"
*/
public function testPropertySpeaker()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "volume"
*/
public function testPropertyVolume()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "speed"
*/
public function testPropertySpeed()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "tone"
*/
public function testPropertyTone()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
}

@ -0,0 +1,99 @@
<?php
/**
* VoiceCloneResultTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* 碳丝路数据开放平台API
*
* 碳丝路数据开放平台
*
* The version of the OpenAPI document: 0.4.8
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 7.0.1
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* VoiceCloneResultTest Class Doc Comment
*
* @category Class
* @description 语音克隆结果
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class VoiceCloneResultTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "VoiceCloneResult"
*/
public function testVoiceCloneResult()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "wav"
*/
public function testPropertyWav()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
/**
* Test attribute "speaker"
*/
public function testPropertySpeaker()
{
// TODO: implement
$this->markTestIncomplete('Not implemented');
}
}
Loading…
Cancel
Save