-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
226 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
|
||
// This file is auto-generated, don't edit it. Thanks. | ||
|
||
namespace Dara\PHP\Tests\Model\Models; | ||
use AlibabaCloud\Dara\Model; | ||
use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions; | ||
class Info extends Model { | ||
/** | ||
* @var string | ||
*/ | ||
public $name; | ||
/** | ||
* @var int | ||
*/ | ||
public $age; | ||
/** | ||
* @var RuntimeOptions | ||
*/ | ||
public $runtime; | ||
protected $_name = [ | ||
'name' => 'name', | ||
'age' => 'age', | ||
'runtime' => 'runtime', | ||
]; | ||
|
||
public function validate() | ||
{ | ||
Model::validateRequired('name', $this->name, true); | ||
Model::validateRequired('age', $this->age, true); | ||
if(null !== $this->runtime) { | ||
$this->runtime->validate(); | ||
} | ||
Model::validateRequired('runtime', $this->runtime, true); | ||
parent::validate(); | ||
} | ||
|
||
public function toArray($noStream = false) | ||
{ | ||
$res = []; | ||
if (null !== $this->name) { | ||
$res['name'] = $this->name; | ||
} | ||
|
||
if (null !== $this->age) { | ||
$res['age'] = $this->age; | ||
} | ||
|
||
if (null !== $this->runtime) { | ||
$res['runtime'] = null !== $this->runtime ? $this->runtime->toArray($noStream) : $this->runtime; | ||
} | ||
|
||
return $res; | ||
} | ||
|
||
public function toMap($noStream = false) | ||
{ | ||
return $this->toArray($noStream); | ||
} | ||
|
||
public static function fromMap($map = []) | ||
{ | ||
$model = new self(); | ||
if (isset($map['name'])) { | ||
$model->name = $map['name']; | ||
} | ||
|
||
if (isset($map['age'])) { | ||
$model->age = $map['age']; | ||
} | ||
|
||
if (isset($map['runtime'])) { | ||
$model->runtime = RuntimeOptions::fromMap($map['runtime']); | ||
} | ||
|
||
return $model; | ||
} | ||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"darabonba:Util:*": "libraries/darabonba_Util_0.2.11" | ||
"darabonba:Util:*": "libraries/darabonba_Util_0.2.11", | ||
"darabonba:Console:*": "libraries/darabonba_Console_0.1.3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
tests/fixtures/multi/libraries/darabonba_Console_0.1.3/Teafile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"scope": "darabonba", | ||
"name": "Console", | ||
"version": "0.1.3", | ||
"main": "./main.tea", | ||
"releases": { | ||
"go": "github.com/alibabacloud-go/tea-console/client:v1.0.0", | ||
"ts": "@alicloud/tea-console:^1.0.0", | ||
"csharp": "AlibabaCloud.TeaConsole:0.1.0", | ||
"java": "com.aliyun:tea-console:0.0.1", | ||
"php": "alibabacloud/tea-console:^0.1.0", | ||
"python": "alibabacloud_tea_console:0.0.1", | ||
"python2": "alibabacloud_tea_console_py2:0.0.1", | ||
"swift": "alibabacloud-sdk-swift/darabonba-console:1.0.0" | ||
}, | ||
"java": { | ||
"package": "com.aliyun.teaconsole", | ||
"packageInfo": { | ||
"description": "Alibaba Cloud Tea Console Output Library for for Java", | ||
"url": "https://github.com/aliyun/alibabacloud-sdk", | ||
"licenseNmae": "The Apache License, Version 2.0", | ||
"licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0.txt", | ||
"developerId": "aliyunproducts", | ||
"developerName": "Aliyun SDK", | ||
"developerEmail": "aliyunsdk@aliyun.com" | ||
} | ||
}, | ||
"csharp": { | ||
"namespace": "AlibabaCloud.TeaConsole", | ||
"className": "Client", | ||
"packageInfo": { | ||
"name": "console", | ||
"title": "alibabacloud-console", | ||
"description": "Alibaba Cloud Tea Console Output Library for .NET", | ||
"company": "Alibaba Cloud, Inc" | ||
} | ||
}, | ||
"php": { | ||
"package": "AlibabaCloud.Tea.Console", | ||
"clientName": "Client", | ||
"packageInfo": { | ||
"name": "alibabacloud/tea-console", | ||
"desc": "Alibaba Cloud Tea Console Output Library for PHP", | ||
"github": "https://github.com/aliyun/tea-console" | ||
} | ||
}, | ||
"python": { | ||
"package": "alibabacloud_tea_console", | ||
"clientName": "client", | ||
"packageInfo": { | ||
"name": "alibabacloud_tea_console", | ||
"desc": "Alibaba Cloud Tea Console Output Library for Python", | ||
"github": "https://github.com/aliyun/alibabacloud-sdk", | ||
"author": "Alibaba Cloud SDK", | ||
"email": "sdk-team@alibabacloud.com" | ||
} | ||
}, | ||
"python2": { | ||
"package": "alibabacloud_tea_console", | ||
"clientName": "client", | ||
"packageInfo": { | ||
"name": "alibabacloud_tea_console", | ||
"desc": "Alibaba Cloud Tea Console Output Library for Python", | ||
"github": "https://github.com/aliyun/alibabacloud-sdk", | ||
"author": "Alibaba Cloud SDK", | ||
"email": "sdk-team@alibabacloud.com" | ||
} | ||
}, | ||
"swift": { | ||
"clientName": "Client", | ||
"packageInfo": { | ||
"name": "AlibabacloudTeaConsole", | ||
"desc": "Alibaba Cloud Tea Console Output Library for Swift(5.6)", | ||
"github": "https://github.com/alibabacloud-sdk-swift/darabonba-console", | ||
"author": "Alibaba Cloud SDK", | ||
"email": "sdk-team@alibabacloud.com" | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
tests/fixtures/multi/libraries/darabonba_Console_0.1.3/main.tea
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* This is a console module | ||
*/ | ||
|
||
/** | ||
* Console val with log level into stdout | ||
* @param val the printing string | ||
* @return void | ||
* @example \[LOG\] tea console example | ||
*/ | ||
static function log(val: string): void; | ||
|
||
/** | ||
* Console val with info level into stdout | ||
* @param val the printing string | ||
* @return void | ||
* @example \[INFO\] tea console example | ||
*/ | ||
static function info(val: string): void; | ||
|
||
/** | ||
* Console val with warning level into stdout | ||
* @param val the printing string | ||
* @return void | ||
* @example \[WARNING\] tea console example | ||
*/ | ||
static function warning(val: string): void; | ||
|
||
/** | ||
* Console val with debug level into stdout | ||
* @param val the printing string | ||
* @return void | ||
* @example \[DEBUG\] tea console example | ||
*/ | ||
static function debug(val: string): void; | ||
|
||
/** | ||
* Console val with error level into stderr | ||
* @param val the printing string | ||
* @return void | ||
* @example \[ERROR\] tea console example | ||
*/ | ||
static function error(val: string): void; |