parent
cca1d3dbeb
commit
efdd144a9d
@ -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> |
@ -1 +1 @@ |
|||||||
9507dfc0a37d26527ff8a017baf676b0978328b84732d3d8c3414000823f6541 |
5126def6e9de093e395a81cb6734960c1beb6da52ca97e5c8f3ee4bc426bbb27 |
@ -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) |
@ -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
@ -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)); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
@ -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)); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
@ -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'); |
||||||
|
} |
||||||
|
} |
@ -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…
Reference in new issue