This commit is contained in:
gaofeng
2026-06-17 09:23:18 +08:00
commit 81ade70944
1638 changed files with 213697 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
class BaiscTypeLackAnnotationXml extends Model
{
#[XmlElement(rename:'StrValue', type: 'string')]
public ?string $strValue;
#[XmlElement(rename:'IntValue', type: 'int')]
public ?int $intValue;
public ?bool $boolValue;
public ?float $floatValue;
public function __construct(
?string $strValue = null,
?int $intValue = null,
?bool $boolValue = null,
?float $floatValue = null
) {
$this->strValue = $strValue;
$this->intValue = $intValue;
$this->boolValue = $boolValue;
$this->floatValue = $floatValue;
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
#[XmlRoot(name:'BasicTypeList')]
class BaiscTypeListXml extends Model
{
#[XmlElement(rename:'StrValue', type: 'string')]
public ?array $strValues;
#[XmlElement(rename:'IntValue', type: 'int')]
public ?array $intValues;
#[XmlElement(rename:'BoolValue', type: 'bool')]
public ?array $boolValues;
#[XmlElement(rename:'FloatValue', type: 'float')]
public ?array $floatValues;
public function __construct(
?array $strValues = null,
?array $intValues = null,
?array $boolValues = null,
?array $floatValues = null
) {
$this->strValues = $strValues;
$this->intValues = $intValues;
$this->boolValues = $boolValues;
$this->floatValues = $floatValues;
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
#[XmlRoot(name:'BasicType')]
class BaiscTypeXml extends Model
{
#[XmlElement(rename:'StrValue', type: 'string')]
public ?string $strValue;
#[XmlElement(rename:'IntValue', type: 'int')]
public ?int $intValue;
#[XmlElement(rename:'BoolValue', type: 'bool')]
public ?bool $boolValue;
#[XmlElement(rename:'FloatValue', type: 'float')]
public ?float $floatValue;
public function __construct(
?string $strValue = null,
?int $intValue = null,
?bool $boolValue = null,
?float $floatValue = null
) {
$this->strValue = $strValue;
$this->intValue = $intValue;
$this->boolValue = $boolValue;
$this->floatValue = $floatValue;
}
}

View File

@@ -0,0 +1,36 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
#[XmlRoot(name:'DatetimeType')]
class DatetimeTypeXml extends Model
{
#[XmlElement(rename:'DateTimeValue', type: 'DateTime')]
public ?\DateTime $isotimeValue;
#[XmlElement(rename:'DateTimeImmutableValue', type: 'DateTimeImmutable')]
public ?\DateTimeImmutable $dateTimeImmutableValue;
#[XmlElement(rename:'UnixtimeValue', type: 'DateTime', format: 'unixtime')]
public ?\DateTime $unixtimeValue;
#[XmlElement(rename:'HttptimeValue', type: 'DateTime', format: 'httptime')]
public ?\DateTime $httptimeValue;
public function __construct(
?\DateTime $isotimeValue = null,
?\DateTimeImmutable $dateTimeImmutableValue = null,
?\DateTime $unixtimeValue = null,
?\DateTime $httptimeValue = null
) {
$this->isotimeValue = $isotimeValue;
$this->dateTimeImmutableValue = $dateTimeImmutableValue;
$this->unixtimeValue = $unixtimeValue;
$this->httptimeValue = $httptimeValue;
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
#[XmlRoot(name:'MixedTypeList')]
class MixedTypeListXml extends Model
{
#[XmlElement(rename:'StrValue', type: 'string')]
public ?string $strValue;
#[XmlElement(rename:'IntValue', type: 'int')]
public ?int $intValue;
#[XmlElement(rename:'BasicTypeFiled', type: BaiscTypeXml::class)]
public ?array $xmlValues;
public function __construct(
?string $strValue = null,
?int $intValue = null,
?array $xmlValues = null
) {
$this->strValue = $strValue;
$this->intValue = $intValue;
$this->xmlValues = $xmlValues;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
use UnitTests\Fixtures\BaiscTypeXml;
use UnitTests\Fixtures\BaiscTypeListXml;
#[XmlRoot(name:'MixedType')]
class MixedTypeXml extends Model
{
#[XmlElement(rename:'StrValue', type: 'string')]
public ?string $strValue;
#[XmlElement(rename:'IntValue', type: 'int')]
public ?int $intValue;
#[XmlElement(rename:'BasicTypeFiled', type: BaiscTypeXml::class)]
public ?BaiscTypeXml $xmlValue;
#[XmlElement(rename:'BasicTypeListFiled', type: BaiscTypeListXml::class)]
public ?BaiscTypeListXml $xmlListValue;
public function __construct(
?string $strValue = null,
?int $intValue = null,
?BaiscTypeXml $xmlValue = null,
?BaiscTypeListXml $xmlListValue = null
) {
$this->strValue = $strValue;
$this->intValue = $intValue;
$this->xmlValue = $xmlValue;
$this->xmlListValue = $xmlListValue;
}
}

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace UnitTests\Fixtures;
use GuzzleHttp;
/**
* Stream decorator that prevents a stream from rewind.
*/
final class NoRewindStream implements \Psr\Http\Message\StreamInterface
{
use GuzzleHttp\Psr7\StreamDecoratorTrait;
/** @var \Psr\Http\Message\StreamInterface */
private $stream;
public function rewind(): void
{
throw new \RuntimeException('Cannot rewind a NoRewindStream');
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\ModelTrait;
use AlibabaCloud\Oss\V2\Types\RequestModel;
use AlibabaCloud\Oss\V2\Annotation\TagProperty;
use AlibabaCloud\Oss\V2\Annotation\RequiredProperty;
class PutApiARequest extends RequestModel
{
use ModelTrait;
#[RequiredProperty()]
#[TagProperty(tag: 'input', position: 'host', rename: '', type: 'string')]
private ?string $bucket;
#[RequiredProperty()]
#[TagProperty(tag: 'input', position: 'path', rename: '', type: 'string')]
private ?string $key;
#[TagProperty(tag: 'input', position: 'header', rename: 'x-oss-str', type: 'string')]
private ?string $strHeader;
#[TagProperty(tag: 'input', position: 'query', rename: 'param-str', type: 'string')]
private ?string $strParam;
#[TagProperty(tag: 'input', position: 'body', rename: '', type: 'string')]
private ?string $configuration;
public function __construct(
?string $bucket = null,
?string $key = null,
?string $strHeader = null,
?string $strParam = null,
?string $configuration = null
) {
$this->bucket = $bucket;
$this->key = $key;
$this->strHeader = $strHeader;
$this->strParam = $strParam;
$this->configuration = $configuration;
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\ModelTrait;
use AlibabaCloud\Oss\V2\Types\RequestModel;
use AlibabaCloud\Oss\V2\Annotation\TagProperty;
use AlibabaCloud\Oss\V2\Annotation\RequiredProperty;
class PutApiBRequest extends RequestModel
{
use ModelTrait;
#[RequiredProperty()]
#[TagProperty(tag: 'input', position: 'host', rename: '', type: 'string')]
private ?string $bucket;
#[RequiredProperty()]
#[TagProperty(tag: 'input', position: 'path', rename: '', type: 'string')]
private ?string $key;
#[TagProperty(tag: 'input', position: 'header', rename: 'x-oss-str', type: 'string')]
private ?string $strHeader;
#[TagProperty(tag: 'input', position: 'query', rename: 'param-str', type: 'string')]
private ?string $strParam;
#[TagProperty(tag: 'input', position: 'header', rename: 'x-oss-prefix-', type: 'string', format: 'usermeta')]
private ?array $arrayHeader;
public function __construct(
?string $bucket = null,
?string $key = null,
?string $strHeader = null,
?string $strParam = null,
?array $arrayHeader = null
) {
$this->bucket = $bucket;
$this->key = $key;
$this->strHeader = $strHeader;
$this->strParam = $strParam;
$this->arrayHeader = $arrayHeader;
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\ModelTrait;
use AlibabaCloud\Oss\V2\Types\ResultModel;
use AlibabaCloud\Oss\V2\Annotation\TagHeader;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
class PutApiBResult extends ResultModel
{
use ModelTrait;
#[TagHeader(rename: 'x-oss-str', type: 'string')]
private ?string $strHeader;
#[TagHeader(rename: 'x-oss-int', type: 'int')]
private ?int $intHeader;
#[TagHeader(rename: 'x-oss-bool', type: 'bool')]
private ?bool $boolHeader;
#[TagHeader(rename: 'x-oss-float', type: 'float')]
private ?float $floatHeader;
#[XmlElement(rename: 'Id', type: 'string')]
private ?string $id;
#[XmlElement(rename: 'Text', type: 'string')]
private ?string $text;
#[XmlElement(rename: 'SubConfiguration', type: SubConfiguration::class)]
private ?array $subConfiguration;
public function __construct(
?string $strHeader = null,
?int $intHeader = null,
?bool $boolHeader = null,
?float $floatHeader = null,
?string $id = null,
?string $text = null,
?array $subConfiguration = null
) {
$this->strHeader = $strHeader;
$this->intHeader = $intHeader;
$this->boolHeader = $boolHeader;
$this->floatHeader = $floatHeader;
$this->id = $id;
$this->text = $text;
$this->subConfiguration = $subConfiguration;
}
}

View File

@@ -0,0 +1,107 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\ModelTrait;
use AlibabaCloud\Oss\V2\Types\RequestModel;
use AlibabaCloud\Oss\V2\Annotation\TagProperty;
use AlibabaCloud\Oss\V2\Annotation\RequiredProperty;
use AlibabaCloud\Oss\V2\Annotation\TagHeader;
use AlibabaCloud\Oss\V2\Annotation\TagQuery;
use AlibabaCloud\Oss\V2\Annotation\TagBody;
class PutApiRequest extends RequestModel
{
use ModelTrait;
#[RequiredProperty()]
#[TagProperty(tag: '', position: 'host', rename: '', type: 'string')]
private ?string $bucket;
#[RequiredProperty()]
#[TagProperty(tag: '', position: 'path', rename: '', type: 'string')]
private ?string $key;
#[TagHeader(rename: 'x-oss-str', type: 'string')]
private ?string $strHeader;
#[TagHeader(rename: 'x-oss-int', type: 'int')]
private ?int $intHeader;
#[TagHeader(rename: 'x-oss-bool', type: 'bool')]
private ?bool $boolHeader;
#[TagHeader(rename: 'x-oss-float', type: 'float')]
private ?float $floatHeader;
#[TagHeader(rename: 'x-oss-isotime', type: 'Datetime')]
private ?\Datetime $isotimeHeader;
#[TagHeader(rename: 'x-oss-httptime', type: 'Datetime', format:'httptime')]
private ?\Datetime $httptimeHeader;
#[TagHeader(rename: 'x-oss-unixtime', type: 'Datetime', format:'unixtime')]
private ?\Datetime $unixtimeHeader;
#[TagQuery(rename: 'param-str', type: 'string')]
private ?string $strParam;
#[TagQuery(rename: 'param-int', type: 'int')]
private ?int $intParam;
#[TagQuery(rename: 'param-bool', type: 'bool')]
private ?bool $boolParam;
#[TagQuery(rename: 'param-float', type: 'float')]
private ?float $floatParam;
#[TagQuery(rename: 'param-isotime', type: 'Datetime')]
private ?\Datetime $isotimeParam;
#[TagQuery(rename: 'param-httptime', type: 'Datetime', format:'httptime')]
private ?\Datetime $httptimeParam;
#[TagQuery(rename: 'param-unixtime', type: 'Datetime', format:'unixtime')]
private ?\Datetime $unixtimeParam;
#[TagBody(rename: 'Configuration', type: 'xml')]
private ?RootConfiguration $configuration;
public function __construct(
?string $bucket = null,
?string $key = null,
?string $strHeader = null,
?int $intHeader = null,
?bool $boolHeader = null,
?float $floatHeader = null,
?\Datetime $isotimeHeader = null,
?\Datetime $httptimeHeader = null,
?\Datetime $unixtimeHeader = null,
?string $strParam = null,
?int $intParam = null,
?bool $boolParam = null,
?float $floatParam = null,
?\Datetime $isotimeParam = null,
?\Datetime $httptimeParam = null,
?\Datetime $unixtimeParam = null,
?RootConfiguration $configuration = null
) {
$this->bucket = $bucket;
$this->key = $key;
$this->strHeader = $strHeader;
$this->intHeader = $intHeader;
$this->boolHeader = $boolHeader;
$this->floatHeader = $floatHeader;
$this->isotimeHeader = $isotimeHeader;
$this->httptimeHeader = $httptimeHeader;
$this->unixtimeHeader = $unixtimeHeader;
$this->strParam = $strParam;
$this->intParam = $intParam;
$this->boolParam = $boolParam;
$this->floatParam = $floatParam;
$this->isotimeParam = $isotimeParam;
$this->httptimeParam = $httptimeParam;
$this->unixtimeParam = $unixtimeParam;
$this->configuration = $configuration;
}
}

View File

@@ -0,0 +1,62 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\ModelTrait;
use AlibabaCloud\Oss\V2\Types\ResultModel;
use AlibabaCloud\Oss\V2\Annotation\TagHeader;
use AlibabaCloud\Oss\V2\Annotation\TagBody;
class PutApiResult extends ResultModel
{
use ModelTrait;
#[TagHeader(rename: 'x-oss-str', type: 'string')]
private ?string $strHeader;
#[TagHeader(rename: 'x-oss-int', type: 'int')]
private ?int $intHeader;
#[TagHeader(rename: 'x-oss-bool', type: 'bool')]
private ?bool $boolHeader;
#[TagHeader(rename: 'x-oss-float', type: 'float')]
private ?float $floatHeader;
#[TagHeader(rename: 'x-oss-isotime', type: 'DateTime')]
private ?\Datetime $isotimeHeader;
#[TagHeader(rename: 'x-oss-httptime', type: 'DateTime', format: 'httptime')]
private ?\Datetime $httptimeHeader;
#[TagHeader(rename: 'x-oss-unixtime', type: 'DateTime', format: 'unixtime')]
private ?\Datetime $unixtimeHeader;
#[TagHeader(rename: 'x-oss-prefix-', type: 'string', format: 'usermeta')]
private ?array $arrayHeader;
#[TagBody(rename: 'Configuration', type: RootConfiguration::class, format: 'xml')]
private ?RootConfiguration $configuration;
public function __construct(
?string $strHeader = null,
?int $intHeader = null,
?bool $boolHeader = null,
?float $floatHeader = null,
?\Datetime $isotimeHeader = null,
?\Datetime $httptimeHeader = null,
?\Datetime $unixtimeHeader = null,
?array $arrayHeader = null,
?RootConfiguration $configuration = null
) {
$this->strHeader = $strHeader;
$this->intHeader = $intHeader;
$this->boolHeader = $boolHeader;
$this->floatHeader = $floatHeader;
$this->isotimeHeader = $isotimeHeader;
$this->httptimeHeader = $httptimeHeader;
$this->unixtimeHeader = $unixtimeHeader;
$this->arrayHeader = $arrayHeader;
$this->configuration = $configuration;
}
}

View File

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace UnitTests\Fixtures;
use GuzzleHttp;
/**
* Stream decorator that prevents a stream from rewind.
*/
final class RewindStatStream implements \Psr\Http\Message\StreamInterface
{
use GuzzleHttp\Psr7\StreamDecoratorTrait;
/** @var \Psr\Http\Message\StreamInterface */
private $stream;
private int $rewindCount = 0;
public function rewind(): void
{
$this->rewindCount++;
$this->stream->rewind();
}
/**
* Get the value of rewindCount
*/
public function getRewindCount()
{
return $this->rewindCount;
}
}

View File

@@ -0,0 +1,34 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Types\ModelTrait;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
#[XmlRoot(name: 'RootConfiguration')]
class RootConfiguration extends Model
{
use ModelTrait;
#[XmlElement(rename: 'Id', type: 'string')]
private ?string $id;
#[XmlElement(rename: 'Text', type: 'string')]
private ?string $text;
#[XmlElement(rename: 'SubConfiguration', type: SubConfiguration::class)]
private ?array $subConfiguration;
public function __construct(
?string $id = null,
?string $text = null,
?array $subConfiguration = null
) {
$this->id = $id;
$this->text = $text;
$this->subConfiguration = $subConfiguration;
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace UnitTests\Fixtures;
use AlibabaCloud\Oss\V2\Types\Model;
use AlibabaCloud\Oss\V2\Types\ModelTrait;
use AlibabaCloud\Oss\V2\Annotation\XmlElement;
use AlibabaCloud\Oss\V2\Annotation\XmlRoot;
#[XmlRoot(name: 'SubConfiguration')]
class SubConfiguration extends Model
{
use ModelTrait;
#[XmlElement(rename: 'StrField', type: 'string')]
private ?string $strField;
#[XmlElement(rename: 'IntField', type: 'int')]
private ?int $intField;
public function __construct(
?string $strField = null,
?int $intField = null
) {
$this->strField = $strField;
$this->intField = $intField;
}
}