提交
This commit is contained in:
32
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/BaiscTypeLackAnnotationXml.php
vendored
Normal file
32
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/BaiscTypeLackAnnotationXml.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
36
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/BaiscTypeListXml.php
vendored
Normal file
36
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/BaiscTypeListXml.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
36
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/BaiscTypeXml.php
vendored
Normal file
36
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/BaiscTypeXml.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
36
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/DatetimeTypeXml.php
vendored
Normal file
36
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/DatetimeTypeXml.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
30
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/MixedTypeListXml.php
vendored
Normal file
30
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/MixedTypeListXml.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
38
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/MixedTypeXml.php
vendored
Normal file
38
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/MixedTypeXml.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
23
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/NoRewindStream.php
vendored
Normal file
23
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/NoRewindStream.php
vendored
Normal 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');
|
||||
}
|
||||
}
|
||||
44
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiARequest.php
vendored
Normal file
44
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiARequest.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
44
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiBRequest.php
vendored
Normal file
44
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiBRequest.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
52
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiBResult.php
vendored
Normal file
52
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiBResult.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
107
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiRequest.php
vendored
Normal file
107
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiRequest.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
62
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiResult.php
vendored
Normal file
62
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/PutApiResult.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
34
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/RewindStatStream.php
vendored
Normal file
34
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/RewindStatStream.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
34
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/RootConfiguration.php
vendored
Normal file
34
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/RootConfiguration.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
29
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/SubConfiguration.php
vendored
Normal file
29
vendor/alibabacloud/oss-v2/tests/UnitTests/Fixtures/SubConfiguration.php
vendored
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user