diff --git a/Aliyun/Log/Client.php b/Aliyun/Log/Client.php
index 0cb8b0f..895eb7d 100644
--- a/Aliyun/Log/Client.php
+++ b/Aliyun/Log/Client.php
@@ -255,7 +255,7 @@ public function putLogs(Aliyun_Log_Models_PutLogsRequest $request) {
$logGroup->addLogs ( $log );
}
- $body = Aliyun_Log_Util::toBytes ( $logGroup );
+ $body = Aliyun_Log_Util::toBytes( $logGroup );
unset ( $logGroup );
$bodySize = strlen ( $body );
@@ -280,6 +280,159 @@ public function putLogs(Aliyun_Log_Models_PutLogsRequest $request) {
return new Aliyun_Log_Models_PutLogsResponse ( $header );
}
+ /**
+ * create shipper service
+ * @param Aliyun_Log_Models_CreateShipperRequest $request
+ * return Aliyun_Log_Models_CreateShipperResponse
+ */
+ public function createShipper(Aliyun_Log_Models_CreateShipperRequest $request){
+ $headers = array();
+ $params = array();
+ $resource = "/logstores/".$request->getLogStore()."/shipper";
+ $project = $request->getProject () !== null ? $request->getProject () : '';
+ $headers["Content-Type"] = "application/json";
+
+ $body = array(
+ "shipperName" => $request->getShipperName(),
+ "targetType" => $request->getTargetType(),
+ "targetConfiguration" => $request->getTargetConfigration()
+ );
+ $body_str = json_encode($body);
+ $headers["x-log-bodyrawsize"] = strlen($body_str);
+ list($resp, $header) = $this->send("POST", $project,$body_str,$resource,$params,$headers);
+ $requestId = isset($header['x-log-requestid']) ? $header ['x-log-requestid'] : '';
+ $resp = $this->parseToJson($resp, $requestId);
+ return new Aliyun_Log_Models_CreateShipperResponse($resp, $header);
+ }
+
+ /**
+ * create shipper service
+ * @param Aliyun_Log_Models_UpdateShipperRequest $request
+ * return Aliyun_Log_Models_UpdateShipperResponse
+ */
+ public function updateShipper(Aliyun_Log_Models_UpdateShipperRequest $request){
+ $headers = array();
+ $params = array();
+ $resource = "/logstores/".$request->getLogStore()."/shipper/".$request->getShipperName();
+ $project = $request->getProject () !== null ? $request->getProject () : '';
+ $headers["Content-Type"] = "application/json";
+
+ $body = array(
+ "shipperName" => $request->getShipperName(),
+ "targetType" => $request->getTargetType(),
+ "targetConfiguration" => $request->getTargetConfigration()
+ );
+ $body_str = json_encode($body);
+ $headers["x-log-bodyrawsize"] = strlen($body_str);
+ list($resp, $header) = $this->send("PUT", $project,$body_str,$resource,$params,$headers);
+ $requestId = isset($header['x-log-requestid']) ? $header ['x-log-requestid'] : '';
+ $resp = $this->parseToJson($resp, $requestId);
+ return new Aliyun_Log_Models_UpdateShipperResponse($resp, $header);
+ }
+
+ /**
+ * get shipper tasks list, max 48 hours duration supported
+ * @param Aliyun_Log_Models_GetShipperTasksRequest $request
+ * return Aliyun_Log_Models_GetShipperTasksResponse
+ */
+ public function getShipperTasks(Aliyun_Log_Models_GetShipperTasksRequest $request){
+ $headers = array();
+ $params = array(
+ 'from' => $request->getStartTime(),
+ 'to' => $request->getEndTime(),
+ 'status' => $request->getStatusType(),
+ 'offset' => $request->getOffset(),
+ 'size' => $request->getSize()
+ );
+ $resource = "/logstores/".$request->getLogStore()."/shipper/".$request->getShipperName()."/tasks";
+ $project = $request->getProject () !== null ? $request->getProject () : '';
+ $headers["x-log-bodyrawsize"] = 0;
+ $headers["Content-Type"] = "application/json";
+
+ list($resp, $header) = $this->send("GET", $project,null,$resource,$params,$headers);
+ $requestId = isset($header['x-log-requestid']) ? $header ['x-log-requestid'] : '';
+ $resp = $this->parseToJson($resp, $requestId);
+ return new Aliyun_Log_Models_GetShipperTasksResponse($resp, $header);
+ }
+
+ /**
+ * retry shipper tasks list by task ids
+ * @param Aliyun_Log_Models_RetryShipperTasksRequest $request
+ * return Aliyun_Log_Models_RetryShipperTasksResponse
+ */
+ public function retryShipperTasks(Aliyun_Log_Models_RetryShipperTasksRequest $request){
+ $headers = array();
+ $params = array();
+ $resource = "/logstores/".$request->getLogStore()."/shipper/".$request->getShipperName()."/tasks";
+ $project = $request->getProject () !== null ? $request->getProject () : '';
+
+ $headers["Content-Type"] = "application/json";
+ $body = $request->getTaskLists();
+ $body_str = json_encode($body);
+ $headers["x-log-bodyrawsize"] = strlen($body_str);
+ list($resp, $header) = $this->send("PUT", $project,$body_str,$resource,$params,$headers);
+ $requestId = isset($header['x-log-requestid']) ? $header ['x-log-requestid'] : '';
+ $resp = $this->parseToJson($resp, $requestId);
+ return new Aliyun_Log_Models_RetryShipperTasksResponse($resp, $header);
+ }
+
+ /**
+ * delete shipper service
+ * @param Aliyun_Log_Models_DeleteShipperRequest $request
+ * return Aliyun_Log_Models_DeleteShipperResponse
+ */
+ public function deleteShipper(Aliyun_Log_Models_DeleteShipperRequest $request){
+ $headers = array();
+ $params = array();
+ $resource = "/logstores/".$request->getLogStore()."/shipper/".$request->getShipperName();
+ $project = $request->getProject () !== null ? $request->getProject () : '';
+ $headers["x-log-bodyrawsize"] = 0;
+ $headers["Content-Type"] = "application/json";
+
+ list($resp, $header) = $this->send("DELETE", $project,null,$resource,$params,$headers);
+ $requestId = isset($header['x-log-requestid']) ? $header ['x-log-requestid'] : '';
+ $resp = $this->parseToJson($resp, $requestId);
+ return new Aliyun_Log_Models_DeleteShipperResponse($resp, $header);
+ }
+
+ /**
+ * get shipper config service
+ * @param Aliyun_Log_Models_GetShipperConfigRequest $request
+ * return Aliyun_Log_Models_GetShipperConfigResponse
+ */
+ public function getShipperConfig(Aliyun_Log_Models_GetShipperConfigRequest $request){
+ $headers = array();
+ $params = array();
+ $resource = "/logstores/".$request->getLogStore()."/shipper/".$request->getShipperName();
+ $project = $request->getProject () !== null ? $request->getProject () : '';
+ $headers["x-log-bodyrawsize"] = 0;
+ $headers["Content-Type"] = "application/json";
+
+ list($resp, $header) = $this->send("GET", $project,null,$resource,$params,$headers);
+ $requestId = isset($header['x-log-requestid']) ? $header ['x-log-requestid'] : '';
+ $resp = $this->parseToJson($resp, $requestId);
+ return new Aliyun_Log_Models_GetShipperConfigResponse($resp, $header);
+ }
+
+ /**
+ * list shipper service
+ * @param Aliyun_Log_Models_ListShipperRequest $request
+ * return Aliyun_Log_Models_ListShipperResponse
+ */
+ public function listShipper(Aliyun_Log_Models_ListShipperRequest $request){
+ $headers = array();
+ $params = array();
+ $resource = "/logstores/".$request->getLogStore()."/shipper";
+ $project = $request->getProject () !== null ? $request->getProject () : '';
+ $headers["x-log-bodyrawsize"] = 0;
+ $headers["Content-Type"] = "application/json";
+
+ list($resp, $header) = $this->send("GET", $project,null,$resource,$params,$headers);
+ $requestId = isset($header['x-log-requestid']) ? $header ['x-log-requestid'] : '';
+ $resp = $this->parseToJson($resp, $requestId);
+ return new Aliyun_Log_Models_ListShipperResponse($resp, $header);
+ }
+
/**
* create logstore
* Unsuccessful opertaion will cause an Aliyun_Log_Exception.
@@ -301,6 +454,7 @@ public function createLogstore(Aliyun_Log_Models_CreateLogstoreRequest $request)
"shardCount" => (int)($request -> getShardCount())
);
$body_str = json_encode($body);
+ $headers["x-log-bodyrawsize"] = strlen($body_str);
list($resp,$header) = $this -> send("POST",$project,$body_str,$resource,$params,$headers);
$requestId = isset ( $header ['x-log-requestid'] ) ? $header ['x-log-requestid'] : '';
$resp = $this->parseToJson ( $resp, $requestId );
@@ -318,7 +472,6 @@ public function updateLogstore(Aliyun_Log_Models_UpdateLogstoreRequest $request)
$headers = array ();
$params = array ();
$project = $request->getProject () !== null ? $request->getProject () : '';
- $headers["x-log-bodyrawsize"] = 0;
$headers["Content-Type"] = "application/json";
$body = array(
"logstoreName" => $request -> getLogstore(),
@@ -327,6 +480,7 @@ public function updateLogstore(Aliyun_Log_Models_UpdateLogstoreRequest $request)
);
$resource = '/logstores/'.$request -> getLogstore();
$body_str = json_encode($body);
+ $headers["x-log-bodyrawsize"] = strlen($body_str);
list($resp,$header) = $this -> send("PUT",$project,$body_str,$resource,$params,$headers);
$requestId = isset ( $header ['x-log-requestid'] ) ? $header ['x-log-requestid'] : '';
$resp = $this->parseToJson ( $resp, $requestId );
diff --git a/Aliyun/Log/LoggerFactory.php b/Aliyun/Log/LoggerFactory.php
new file mode 100644
index 0000000..4a918de
--- /dev/null
+++ b/Aliyun/Log/LoggerFactory.php
@@ -0,0 +1,69 @@
+logFlush();
+ }
+ }
+ }
+}
diff --git a/Aliyun/Log/Models/LogLevel/LogLevel.php b/Aliyun/Log/Models/LogLevel/LogLevel.php
new file mode 100644
index 0000000..86dfc04
--- /dev/null
+++ b/Aliyun/Log/Models/LogLevel/LogLevel.php
@@ -0,0 +1,92 @@
+level = $level;
+ }
+
+ /**
+ * Compares two logger levels.
+ *
+ * @param LoggerLevels $other
+ * @return boolean
+ */
+ public function equals($other) {
+ if($other instanceof Aliyun_Log_Models_LogLevel_LogLevel) {
+ if($this->level == $other->level) {
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ public static function getLevelDebug(){
+ if(!isset(self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::debug])){
+ self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::debug] = new Aliyun_Log_Models_LogLevel_LogLevel('debug');
+ }
+ return self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::debug];
+ }
+
+ public static function getLevelInfo(){
+ if(!isset(self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::info])){
+ self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::info] = new Aliyun_Log_Models_LogLevel_LogLevel('info');
+ }
+ return self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::info];
+ }
+
+ public static function getLevelWarn(){
+ if(!isset(self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::warn])){
+ self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::warn] = new Aliyun_Log_Models_LogLevel_LogLevel('warn');
+ }
+ return self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::warn];
+ }
+
+ public static function getLevelError(){
+ if(!isset(self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::error])){
+ self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::error] = new Aliyun_Log_Models_LogLevel_LogLevel('error');
+ }
+ return self::$constCacheArray[Aliyun_Log_Models_LogLevel_LogLevel::error];
+ }
+
+ public static function getLevelStr(Aliyun_Log_Models_LogLevel_LogLevel $logLevel){
+
+ $logLevelStr = '';
+ if(null === $logLevel){
+ $logLevelStr = 'info';
+ }
+ switch ($logLevel->level){
+ case "error":
+ $logLevelStr= 'error';
+ break;
+ case "warn":
+ $logLevelStr= 'warn';
+ break;
+ case "info":
+ $logLevelStr= 'info';
+ break;
+ case "debug":
+ $logLevelStr= 'debug';
+ break;
+ }
+ return $logLevelStr;
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/OssShipperConfig.php b/Aliyun/Log/Models/OssShipperConfig.php
new file mode 100644
index 0000000..916bc7e
--- /dev/null
+++ b/Aliyun/Log/Models/OssShipperConfig.php
@@ -0,0 +1,166 @@
+roleArn;
+ }
+
+ /**
+ * @param mixed $roleArn
+ */
+ public function setRoleArn($roleArn)
+ {
+ $this->roleArn = $roleArn;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getPathFormat()
+ {
+ return $this->pathFormat;
+ }
+
+ /**
+ * @param mixed $pathFormat
+ */
+ public function setPathFormat($pathFormat)
+ {
+ $this->pathFormat = $pathFormat;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getStorage()
+ {
+ return $this->storage;
+ }
+
+ /**
+ * @param mixed $storage
+ */
+ public function setStorage($storage)
+ {
+ $this->storage = $storage;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getOssBucket()
+ {
+ return $this->ossBucket;
+ }
+
+ /**
+ * @param mixed $ossBucket
+ */
+ public function setOssBucket($ossBucket)
+ {
+ $this->ossBucket = $ossBucket;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getOssPrefix()
+ {
+ return $this->ossPrefix;
+ }
+
+ /**
+ * @param mixed $ossPrefix
+ */
+ public function setOssPrefix($ossPrefix)
+ {
+ $this->ossPrefix = $ossPrefix;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getBufferInterval()
+ {
+ return $this->bufferInterval;
+ }
+
+ /**
+ * @param mixed $bufferInterval
+ */
+ public function setBufferInterval($bufferInterval)
+ {
+ $this->bufferInterval = $bufferInterval;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getBufferSize()
+ {
+ return $this->bufferSize;
+ }
+
+ /**
+ * @param mixed $bufferSize
+ */
+ public function setBufferSize($bufferSize)
+ {
+ if($bufferSize > 256 || $bufferSize < 5){
+ throw new Exception("buffSize is not valide, must between 5 and 256");
+ }
+ $this->bufferSize = $bufferSize;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getCompressType()
+ {
+ return $this->compressType;
+ }
+
+ /**
+ * @param mixed $compressType
+ */
+ public function setCompressType($compressType)
+ {
+ $this->compressType = $compressType;
+ }
+
+
+ public function to_json_object() {
+ $json = array(
+ 'ossBucket' => $this->ossBucket,
+ 'ossPrefix' => $this->ossPrefix,
+ 'bufferInterval' => $this->bufferInterval,
+ 'bufferSize' => $this->bufferSize,
+ 'compressType' => $this->compressType,
+ 'roleArn' => $this->roleArn,
+ 'pathFormat' => $this->pathFormat,
+ 'storage' => $this->storage->to_json_object()
+ );
+ if($this->storage->getFormat() == 'json'){
+ unset($json['storage']);
+ }
+ return $json;
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/OssShipperCsvStorage.php b/Aliyun/Log/Models/OssShipperCsvStorage.php
new file mode 100644
index 0000000..1c8af91
--- /dev/null
+++ b/Aliyun/Log/Models/OssShipperCsvStorage.php
@@ -0,0 +1,107 @@
+columns;
+ }
+
+ /**
+ * @param mixed $columns
+ */
+ public function setColumns($columns)
+ {
+ $this->columns = $columns;
+ }
+
+ /**
+ * @return string
+ */
+ public function getDelimiter(): string
+ {
+ return $this->delimiter;
+ }
+
+ /**
+ * @param string $delimiter
+ */
+ public function setDelimiter(string $delimiter)
+ {
+ $this->delimiter = $delimiter;
+ }
+
+ /**
+ * @return string
+ */
+ public function getQuote(): string
+ {
+ return $this->quote;
+ }
+
+ /**
+ * @param string $quote
+ */
+ public function setQuote(string $quote)
+ {
+ $this->quote = $quote;
+ }
+
+ /**
+ * @return string
+ */
+ public function getNullIdentifier(): string
+ {
+ return $this->nullIdentifier;
+ }
+
+ /**
+ * @param string $nullIdentifier
+ */
+ public function setNullIdentifier(string $nullIdentifier)
+ {
+ $this->nullIdentifier = $nullIdentifier;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isHeader(): bool
+ {
+ return $this->header;
+ }
+
+ /**
+ * @param bool $header
+ */
+ public function setHeader(bool $header)
+ {
+ $this->header = $header;
+ }
+
+ public function to_json_object(){
+ $detail = array(
+ 'columns' => $this->columns,
+ 'delimiter' => $this->delimiter,
+ 'quote' => $this->quote,
+ 'nullIdentifier' => $this->nullIdentifier,
+ 'header' => $this->header
+ );
+ return array(
+ 'detail' => $detail,
+ 'format' => parent::getFormat()
+ );
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/OssShipperJsonStorage.php b/Aliyun/Log/Models/OssShipperJsonStorage.php
new file mode 100644
index 0000000..1e2ef8e
--- /dev/null
+++ b/Aliyun/Log/Models/OssShipperJsonStorage.php
@@ -0,0 +1,12 @@
+columns;
+ }
+
+ /**
+ * @param mixed $columns
+ */
+ public function setColumns($columns)
+ {
+ $this->columns = $columns;
+ }
+
+ public function to_json_object(){
+ $detail = array(
+ 'columns' => $this->columns
+ );
+ return array(
+ 'detail' => $detail,
+ 'format' => parent::getFormat()
+ );
+ }
+}
diff --git a/Aliyun/Log/Models/OssShipperStorage.php b/Aliyun/Log/Models/OssShipperStorage.php
new file mode 100644
index 0000000..64f8d24
--- /dev/null
+++ b/Aliyun/Log/Models/OssShipperStorage.php
@@ -0,0 +1,27 @@
+format;
+ }
+
+ /**
+ * @param mixed $format
+ */
+ public function setFormat($format)
+ {
+ $this->format = $format;
+ }
+
+
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/ApplyConfigToMachineGroupRequest.php b/Aliyun/Log/Models/Request/ApplyConfigToMachineGroupRequest.php
similarity index 95%
rename from Aliyun/Log/Models/ApplyConfigToMachineGroupRequest.php
rename to Aliyun/Log/Models/Request/ApplyConfigToMachineGroupRequest.php
index 0788973..28291ca 100644
--- a/Aliyun/Log/Models/ApplyConfigToMachineGroupRequest.php
+++ b/Aliyun/Log/Models/Request/ApplyConfigToMachineGroupRequest.php
@@ -1,39 +1,39 @@
-groupName = $groupName;
- $this->configName = $configName;
- }
- public function getGroupName(){
- return $this->groupName;
- }
- public function setGroupName($groupName){
- $this->groupName = $groupName;
- }
-
- public function getConfigName(){
- return $this->configName;
- }
- public function setConfigName($configName){
- $this->configName = $configName;
- }
-
-}
+groupName = $groupName;
+ $this->configName = $configName;
+ }
+ public function getGroupName(){
+ return $this->groupName;
+ }
+ public function setGroupName($groupName){
+ $this->groupName = $groupName;
+ }
+
+ public function getConfigName(){
+ return $this->configName;
+ }
+ public function setConfigName($configName){
+ $this->configName = $configName;
+ }
+
+}
diff --git a/Aliyun/Log/Models/BatchGetLogsRequest.php b/Aliyun/Log/Models/Request/BatchGetLogsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/BatchGetLogsRequest.php
rename to Aliyun/Log/Models/Request/BatchGetLogsRequest.php
index 0df9582..1ea6234 100644
--- a/Aliyun/Log/Models/BatchGetLogsRequest.php
+++ b/Aliyun/Log/Models/Request/BatchGetLogsRequest.php
@@ -1,134 +1,134 @@
-logstore = $logstore;
- $this->shardId = $shardId;
- $this->count = $count;
- $this->cursor = $cursor;
- }
-
- /**
- * Get logstore name
- *
- * @return string logstore name
- */
- public function getLogstore() {
- return $this->logstore;
- }
-
- /**
- * Set logstore name
- *
- * @param string $logstore
- * logstore name
- */
- public function setLogstore($logstore) {
- $this->logstore = $logstore;
- }
-
- /**
- * Get shard ID
- *
- * @return string shardId
- */
- public function getShardId() {
- return $this->shardId;
- }
-
- /**
- * Set shard ID
- *
- * @param string $shardId
- * shard ID
- */
- public function setShardId($shardId) {
- $this->shardId = $shardId;
- }
-
- /**
- * Get max return loggroup number
- *
- * @return integer count
- */
- public function getCount() {
- return $this->count;
- }
-
- /**
- * Set max return loggroup number
- *
- * @param integer $count
- * max return loggroup number
- */
- public function setCount($count) {
- $this->count = $count;
- }
-
- /**
- * Get start cursor
- *
- * @return string cursor
- */
- public function getCursor() {
- return $this->cursor;
- }
-
- /**
- * Set start cursor
- *
- * @param string $cursor
- * start cursor
- */
- public function setCursor($cursor) {
- $this->cursor = $cursor;
- }
-
-}
+logstore = $logstore;
+ $this->shardId = $shardId;
+ $this->count = $count;
+ $this->cursor = $cursor;
+ }
+
+ /**
+ * Get logstore name
+ *
+ * @return string logstore name
+ */
+ public function getLogstore() {
+ return $this->logstore;
+ }
+
+ /**
+ * Set logstore name
+ *
+ * @param string $logstore
+ * logstore name
+ */
+ public function setLogstore($logstore) {
+ $this->logstore = $logstore;
+ }
+
+ /**
+ * Get shard ID
+ *
+ * @return string shardId
+ */
+ public function getShardId() {
+ return $this->shardId;
+ }
+
+ /**
+ * Set shard ID
+ *
+ * @param string $shardId
+ * shard ID
+ */
+ public function setShardId($shardId) {
+ $this->shardId = $shardId;
+ }
+
+ /**
+ * Get max return loggroup number
+ *
+ * @return integer count
+ */
+ public function getCount() {
+ return $this->count;
+ }
+
+ /**
+ * Set max return loggroup number
+ *
+ * @param integer $count
+ * max return loggroup number
+ */
+ public function setCount($count) {
+ $this->count = $count;
+ }
+
+ /**
+ * Get start cursor
+ *
+ * @return string cursor
+ */
+ public function getCursor() {
+ return $this->cursor;
+ }
+
+ /**
+ * Set start cursor
+ *
+ * @param string $cursor
+ * start cursor
+ */
+ public function setCursor($cursor) {
+ $this->cursor = $cursor;
+ }
+
+}
diff --git a/Aliyun/Log/Models/CreateACLRequest.php b/Aliyun/Log/Models/Request/CreateACLRequest.php
similarity index 94%
rename from Aliyun/Log/Models/CreateACLRequest.php
rename to Aliyun/Log/Models/Request/CreateACLRequest.php
index 01558f5..7b0892c 100644
--- a/Aliyun/Log/Models/CreateACLRequest.php
+++ b/Aliyun/Log/Models/Request/CreateACLRequest.php
@@ -1,32 +1,32 @@
-acl = $acl;
- }
-
- public function getAcl(){
- return $this->acl;
- }
- public function setAcl($acl){
- $this->acl = $acl;
- }
-
-}
+acl = $acl;
+ }
+
+ public function getAcl(){
+ return $this->acl;
+ }
+ public function setAcl($acl){
+ $this->acl = $acl;
+ }
+
+}
diff --git a/Aliyun/Log/Models/CreateConfigRequest.php b/Aliyun/Log/Models/Request/CreateConfigRequest.php
similarity index 94%
rename from Aliyun/Log/Models/CreateConfigRequest.php
rename to Aliyun/Log/Models/Request/CreateConfigRequest.php
index 636188b..5ad80ca 100644
--- a/Aliyun/Log/Models/CreateConfigRequest.php
+++ b/Aliyun/Log/Models/Request/CreateConfigRequest.php
@@ -1,35 +1,35 @@
-config = $config;
- }
-
- public function getConfig(){
- return $this->config;
-
- }
-
- public function setConfig($config){
- $this->config = $config;
- }
-
-}
+config = $config;
+ }
+
+ public function getConfig(){
+ return $this->config;
+
+ }
+
+ public function setConfig($config){
+ $this->config = $config;
+ }
+
+}
diff --git a/Aliyun/Log/Models/CreateLogstoreRequest.php b/Aliyun/Log/Models/Request/CreateLogstoreRequest.php
similarity index 95%
rename from Aliyun/Log/Models/CreateLogstoreRequest.php
rename to Aliyun/Log/Models/Request/CreateLogstoreRequest.php
index ac2e625..0fc6670 100644
--- a/Aliyun/Log/Models/CreateLogstoreRequest.php
+++ b/Aliyun/Log/Models/Request/CreateLogstoreRequest.php
@@ -1,42 +1,42 @@
- logstore = $logstore;
- $this -> ttl = $ttl;
- $this -> shardCount = $shardCount;
- }
- public function getLogstore()
- {
- return $this -> logstore;
- }
- public function getTtl()
- {
- return $this -> ttl;
- }
- public function getShardCount()
- {
- return $this -> shardCount;
- }
-}
+ logstore = $logstore;
+ $this -> ttl = $ttl;
+ $this -> shardCount = $shardCount;
+ }
+ public function getLogstore()
+ {
+ return $this -> logstore;
+ }
+ public function getTtl()
+ {
+ return $this -> ttl;
+ }
+ public function getShardCount()
+ {
+ return $this -> shardCount;
+ }
+}
diff --git a/Aliyun/Log/Models/CreateMachineGroupRequest.php b/Aliyun/Log/Models/Request/CreateMachineGroupRequest.php
similarity index 95%
rename from Aliyun/Log/Models/CreateMachineGroupRequest.php
rename to Aliyun/Log/Models/Request/CreateMachineGroupRequest.php
index 41166c8..6f707c9 100644
--- a/Aliyun/Log/Models/CreateMachineGroupRequest.php
+++ b/Aliyun/Log/Models/Request/CreateMachineGroupRequest.php
@@ -1,31 +1,31 @@
-machineGroup = $machineGroup;
- }
- public function getMachineGroup(){
- return $this->machineGroup;
- }
- public function setMachineGroup($machineGroup){
- $this->machineGroup = $machineGroup;
- }
-
-}
+machineGroup = $machineGroup;
+ }
+ public function getMachineGroup(){
+ return $this->machineGroup;
+ }
+ public function setMachineGroup($machineGroup){
+ $this->machineGroup = $machineGroup;
+ }
+
+}
diff --git a/Aliyun/Log/Models/Request/CreateShipperRequest.php b/Aliyun/Log/Models/Request/CreateShipperRequest.php
new file mode 100644
index 0000000..63af99d
--- /dev/null
+++ b/Aliyun/Log/Models/Request/CreateShipperRequest.php
@@ -0,0 +1,94 @@
+logStore;
+ }
+
+ /**
+ * @param mixed $logStore
+ */
+ public function setLogStore($logStore)
+ {
+ $this->logStore = $logStore;
+ }
+
+ /**
+ * Aliyun_Log_Models_CreateShipperRequest Constructor
+ *
+ */
+ public function __construct($project) {
+ parent::__construct ( $project );
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getShipperName()
+ {
+ return $this->shipperName;
+ }
+
+ /**
+ * @param mixed $shipperName
+ */
+ public function setShipperName($shipperName)
+ {
+ $this->shipperName = $shipperName;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTargetType()
+ {
+ return $this->targetType;
+ }
+
+ /**
+ * @param mixed $targetType
+ */
+ public function setTargetType($targetType)
+ {
+ $this->targetType = $targetType;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTargetConfigration()
+ {
+ return $this->targetConfigration;
+ }
+
+ /**
+ * @param mixed $targetConfigration
+ */
+ public function setTargetConfigration($targetConfigration)
+ {
+ $this->targetConfigration = $targetConfigration;
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/DeleteACLRequest.php b/Aliyun/Log/Models/Request/DeleteACLRequest.php
similarity index 95%
rename from Aliyun/Log/Models/DeleteACLRequest.php
rename to Aliyun/Log/Models/Request/DeleteACLRequest.php
index a6a2ba8..2006c90 100644
--- a/Aliyun/Log/Models/DeleteACLRequest.php
+++ b/Aliyun/Log/Models/Request/DeleteACLRequest.php
@@ -1,31 +1,31 @@
-aclId = $aclId;
- }
- public function getAclId(){
- return $this->aclId;
- }
- public function setAclId($aclId){
- $this->aclId = $aclId;
- }
-
-}
+aclId = $aclId;
+ }
+ public function getAclId(){
+ return $this->aclId;
+ }
+ public function setAclId($aclId){
+ $this->aclId = $aclId;
+ }
+
+}
diff --git a/Aliyun/Log/Models/DeleteConfigRequest.php b/Aliyun/Log/Models/Request/DeleteConfigRequest.php
similarity index 95%
rename from Aliyun/Log/Models/DeleteConfigRequest.php
rename to Aliyun/Log/Models/Request/DeleteConfigRequest.php
index 5d435ae..3afc9ec 100644
--- a/Aliyun/Log/Models/DeleteConfigRequest.php
+++ b/Aliyun/Log/Models/Request/DeleteConfigRequest.php
@@ -1,33 +1,33 @@
-configName = $configName;
- }
-
- public function getConfigName(){
- return $this->configName;
- }
-
- public function setConfigName($configName){
- $this->configName=$configName;
- }
-
-}
+configName = $configName;
+ }
+
+ public function getConfigName(){
+ return $this->configName;
+ }
+
+ public function setConfigName($configName){
+ $this->configName=$configName;
+ }
+
+}
diff --git a/Aliyun/Log/Models/DeleteLogstoreRequest.php b/Aliyun/Log/Models/Request/DeleteLogstoreRequest.php
similarity index 95%
rename from Aliyun/Log/Models/DeleteLogstoreRequest.php
rename to Aliyun/Log/Models/Request/DeleteLogstoreRequest.php
index e587fbb..8c0d39f 100644
--- a/Aliyun/Log/Models/DeleteLogstoreRequest.php
+++ b/Aliyun/Log/Models/Request/DeleteLogstoreRequest.php
@@ -1,30 +1,30 @@
- logstore = $logstore;
- }
- public function getLogstore()
- {
- return $this -> logstore;
- }
-}
+ logstore = $logstore;
+ }
+ public function getLogstore()
+ {
+ return $this -> logstore;
+ }
+}
diff --git a/Aliyun/Log/Models/DeleteMachineGroupRequest.php b/Aliyun/Log/Models/Request/DeleteMachineGroupRequest.php
similarity index 95%
rename from Aliyun/Log/Models/DeleteMachineGroupRequest.php
rename to Aliyun/Log/Models/Request/DeleteMachineGroupRequest.php
index d0ef8c0..a04367b 100644
--- a/Aliyun/Log/Models/DeleteMachineGroupRequest.php
+++ b/Aliyun/Log/Models/Request/DeleteMachineGroupRequest.php
@@ -1,34 +1,34 @@
-groupName = $groupName;
- }
-
- public function getGroupName(){
- return $this->groupName;
- }
-
- public function setGroupName($groupName){
- $this->groupName = $groupName;
- }
-
-}
+groupName = $groupName;
+ }
+
+ public function getGroupName(){
+ return $this->groupName;
+ }
+
+ public function setGroupName($groupName){
+ $this->groupName = $groupName;
+ }
+
+}
diff --git a/Aliyun/Log/Models/DeleteShardRequest.php b/Aliyun/Log/Models/Request/DeleteShardRequest.php
similarity index 95%
rename from Aliyun/Log/Models/DeleteShardRequest.php
rename to Aliyun/Log/Models/Request/DeleteShardRequest.php
index 3b9aeb9..e45a371 100644
--- a/Aliyun/Log/Models/DeleteShardRequest.php
+++ b/Aliyun/Log/Models/Request/DeleteShardRequest.php
@@ -1,39 +1,39 @@
-logstore = $logstore;
- $this->shardId = $shardId;
- }
-
- public function getLogstore(){
- return $this->logstore;
- }
-
- public function setLogstore($logstore){
- $this->logstore = $logstore;
- }
-
- public function getShardId(){
- return $this->shardId;
- }
-}
+logstore = $logstore;
+ $this->shardId = $shardId;
+ }
+
+ public function getLogstore(){
+ return $this->logstore;
+ }
+
+ public function setLogstore($logstore){
+ $this->logstore = $logstore;
+ }
+
+ public function getShardId(){
+ return $this->shardId;
+ }
+}
diff --git a/Aliyun/Log/Models/Request/DeleteShipperRequest.php b/Aliyun/Log/Models/Request/DeleteShipperRequest.php
new file mode 100644
index 0000000..650f9ae
--- /dev/null
+++ b/Aliyun/Log/Models/Request/DeleteShipperRequest.php
@@ -0,0 +1,53 @@
+logStore;
+ }
+
+ /**
+ * @param mixed $logStore
+ */
+ public function setLogStore($logStore)
+ {
+ $this->logStore = $logStore;
+ }
+
+
+ /**
+ * @return mixed
+ */
+ public function getShipperName()
+ {
+ return $this->shipperName;
+ }
+
+ /**
+ * @param mixed $shipperName
+ */
+ public function setShipperName($shipperName)
+ {
+ $this->shipperName = $shipperName;
+ }
+
+ /**
+ * Aliyun_Log_Models_CreateShipperRequest Constructor
+ *
+ */
+ public function __construct($project) {
+ parent::__construct ( $project );
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/GetACLRequest.php b/Aliyun/Log/Models/Request/GetACLRequest.php
similarity index 95%
rename from Aliyun/Log/Models/GetACLRequest.php
rename to Aliyun/Log/Models/Request/GetACLRequest.php
index af16670..ce9690a 100644
--- a/Aliyun/Log/Models/GetACLRequest.php
+++ b/Aliyun/Log/Models/Request/GetACLRequest.php
@@ -1,30 +1,30 @@
-aclId = $aclId;
- }
- public function getAclId(){
- return $this->aclId;
- }
- public function setAclId($aclId){
- $this->aclId = $aclId;
- }
-}
+aclId = $aclId;
+ }
+ public function getAclId(){
+ return $this->aclId;
+ }
+ public function setAclId($aclId){
+ $this->aclId = $aclId;
+ }
+}
diff --git a/Aliyun/Log/Models/GetConfigRequest.php b/Aliyun/Log/Models/Request/GetConfigRequest.php
similarity index 94%
rename from Aliyun/Log/Models/GetConfigRequest.php
rename to Aliyun/Log/Models/Request/GetConfigRequest.php
index 7dc2bf5..78a15d2 100644
--- a/Aliyun/Log/Models/GetConfigRequest.php
+++ b/Aliyun/Log/Models/Request/GetConfigRequest.php
@@ -1,34 +1,34 @@
-configName = $configName;
- }
-
- public function getConfigName(){
- return $this->configName;
- }
-
- public function setConfigName($configName){
- $this->configName = $configName;
- }
-
-}
+configName = $configName;
+ }
+
+ public function getConfigName(){
+ return $this->configName;
+ }
+
+ public function setConfigName($configName){
+ $this->configName = $configName;
+ }
+
+}
diff --git a/Aliyun/Log/Models/GetCursorRequest.php b/Aliyun/Log/Models/Request/GetCursorRequest.php
similarity index 95%
rename from Aliyun/Log/Models/GetCursorRequest.php
rename to Aliyun/Log/Models/Request/GetCursorRequest.php
index 636209a..933b2e8 100644
--- a/Aliyun/Log/Models/GetCursorRequest.php
+++ b/Aliyun/Log/Models/Request/GetCursorRequest.php
@@ -1,138 +1,138 @@
-logstore = $logstore;
- $this->shardId = $shardId;
- $this->mode = $mode;
- $this->fromTime = $fromTime;
- }
-
- /**
- * Get logstore name
- *
- * @return string logstore name
- */
- public function getLogstore(){
- return $this->logstore;
- }
-
- /**
- * Set logstore name
- *
- * @param string $logstore
- * logstore name
- */
- public function setLogstore($logstore){
- $this->logstore = $logstore;
- }
-
- /**
- * Get shard id
- *
- * @return string shard id
- */
- public function getShardId(){
- return $this->shardId;
- }
-
- /**
- * Set shard id
- *
- * @param string $shardId
- * shard id
- */
- public function setShardId($shardId){
- $this->shardId = $shardId;
- }
-
- /**
- * Get mode
- *
- * @return string mode
- */
- public function getMode(){
- return $this->mode;
- }
-
- /**
- * Set mode
- *
- * @param string $mode
- * value must be 'begin' or 'end'
- */
- public function setMode($mode){
- $this->mode = $mode;
- }
-
- /**
- * Get from time
- *
- * @return integer(unix_timestamp) from time
- */
- public function getFromTime(){
- return $this->fromTime;
- }
-
- /**
- * Set from time
- *
- * @param integer $fromTime
- * from time (unix_timestamp)
- */
- public function setFromTime($fromTime){
- $this->fromTime = $fromTime;
- }
-
-}
+logstore = $logstore;
+ $this->shardId = $shardId;
+ $this->mode = $mode;
+ $this->fromTime = $fromTime;
+ }
+
+ /**
+ * Get logstore name
+ *
+ * @return string logstore name
+ */
+ public function getLogstore(){
+ return $this->logstore;
+ }
+
+ /**
+ * Set logstore name
+ *
+ * @param string $logstore
+ * logstore name
+ */
+ public function setLogstore($logstore){
+ $this->logstore = $logstore;
+ }
+
+ /**
+ * Get shard id
+ *
+ * @return string shard id
+ */
+ public function getShardId(){
+ return $this->shardId;
+ }
+
+ /**
+ * Set shard id
+ *
+ * @param string $shardId
+ * shard id
+ */
+ public function setShardId($shardId){
+ $this->shardId = $shardId;
+ }
+
+ /**
+ * Get mode
+ *
+ * @return string mode
+ */
+ public function getMode(){
+ return $this->mode;
+ }
+
+ /**
+ * Set mode
+ *
+ * @param string $mode
+ * value must be 'begin' or 'end'
+ */
+ public function setMode($mode){
+ $this->mode = $mode;
+ }
+
+ /**
+ * Get from time
+ *
+ * @return integer(unix_timestamp) from time
+ */
+ public function getFromTime(){
+ return $this->fromTime;
+ }
+
+ /**
+ * Set from time
+ *
+ * @param integer $fromTime
+ * from time (unix_timestamp)
+ */
+ public function setFromTime($fromTime){
+ $this->fromTime = $fromTime;
+ }
+
+}
diff --git a/Aliyun/Log/Models/GetHistogramsRequest.php b/Aliyun/Log/Models/Request/GetHistogramsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/GetHistogramsRequest.php
rename to Aliyun/Log/Models/Request/GetHistogramsRequest.php
index 9fd2fc7..8df75e6 100644
--- a/Aliyun/Log/Models/GetHistogramsRequest.php
+++ b/Aliyun/Log/Models/Request/GetHistogramsRequest.php
@@ -1,161 +1,161 @@
-logstore = $logstore;
- $this->from = $from;
- $this->to = $to;
- $this->topic = $topic;
- $this->query = $query;
- }
-
- /**
- * Get logstore name
- *
- * @return string logstore name
- */
- public function getLogstore() {
- return $this->logstore;
- }
-
- /**
- * Set logstore name
- *
- * @param string $logstore
- * logstore name
- */
- public function setLogstore($logstore) {
- $this->logstore = $logstore;
- }
-
- /**
- * Get topic name
- *
- * @return string topic name
- */
- public function getTopic() {
- return $this->topic;
- }
-
- /**
- * Set topic name
- *
- * @param string $topic
- * topic name
- */
- public function setTopic($topic) {
- $this->topic = $topic;
- }
-
- /**
- * Get begin time
- *
- * @return integer begin time
- */
- public function getFrom() {
- return $this->from;
- }
-
- /**
- * Set begin time
- *
- * @param integer $from
- * begin time
- */
- public function setFrom($from) {
- $this->from = $from;
- }
-
- /**
- * Get end time
- *
- * @return integer end time
- */
- public function getTo() {
- return $this->to;
- }
-
- /**
- * Set end time
- *
- * @param integer $to
- * end time
- */
- public function setTo($to) {
- $this->to = $to;
- }
-
- /**
- * Get user defined query
- *
- * @return string user defined query
- */
- public function getQuery() {
- return $this->query;
- }
-
- /**
- * Set user defined query
- *
- * @param string $query
- * user defined query
- */
- public function setQuery($query) {
- $this->query = $query;
- }
-}
+logstore = $logstore;
+ $this->from = $from;
+ $this->to = $to;
+ $this->topic = $topic;
+ $this->query = $query;
+ }
+
+ /**
+ * Get logstore name
+ *
+ * @return string logstore name
+ */
+ public function getLogstore() {
+ return $this->logstore;
+ }
+
+ /**
+ * Set logstore name
+ *
+ * @param string $logstore
+ * logstore name
+ */
+ public function setLogstore($logstore) {
+ $this->logstore = $logstore;
+ }
+
+ /**
+ * Get topic name
+ *
+ * @return string topic name
+ */
+ public function getTopic() {
+ return $this->topic;
+ }
+
+ /**
+ * Set topic name
+ *
+ * @param string $topic
+ * topic name
+ */
+ public function setTopic($topic) {
+ $this->topic = $topic;
+ }
+
+ /**
+ * Get begin time
+ *
+ * @return integer begin time
+ */
+ public function getFrom() {
+ return $this->from;
+ }
+
+ /**
+ * Set begin time
+ *
+ * @param integer $from
+ * begin time
+ */
+ public function setFrom($from) {
+ $this->from = $from;
+ }
+
+ /**
+ * Get end time
+ *
+ * @return integer end time
+ */
+ public function getTo() {
+ return $this->to;
+ }
+
+ /**
+ * Set end time
+ *
+ * @param integer $to
+ * end time
+ */
+ public function setTo($to) {
+ $this->to = $to;
+ }
+
+ /**
+ * Get user defined query
+ *
+ * @return string user defined query
+ */
+ public function getQuery() {
+ return $this->query;
+ }
+
+ /**
+ * Set user defined query
+ *
+ * @param string $query
+ * user defined query
+ */
+ public function setQuery($query) {
+ $this->query = $query;
+ }
+}
diff --git a/Aliyun/Log/Models/GetLogsRequest.php b/Aliyun/Log/Models/Request/GetLogsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/GetLogsRequest.php
rename to Aliyun/Log/Models/Request/GetLogsRequest.php
index c987259..32ef467 100644
--- a/Aliyun/Log/Models/GetLogsRequest.php
+++ b/Aliyun/Log/Models/Request/GetLogsRequest.php
@@ -1,242 +1,242 @@
-logstore = $logstore;
- $this->from = $from;
- $this->to = $to;
- $this->topic = $topic;
- $this->query = $query;
- $this->line = $line;
- $this->offset = $offset;
- $this->reverse = $reverse;
- }
-
- /**
- * Get logstore name
- *
- * @return string logstore name
- */
- public function getLogstore() {
- return $this->logstore;
- }
-
- /**
- * Set logstore name
- *
- * @param string $logstore
- * logstore name
- */
- public function setLogstore($logstore) {
- $this->logstore = $logstore;
- }
-
- /**
- * Get topic name
- *
- * @return string topic name
- */
- public function getTopic() {
- return $this->topic;
- }
-
- /**
- * Set topic name
- *
- * @param string $topic
- * topic name
- */
- public function setTopic($topic) {
- $this->topic = $topic;
- }
-
- /**
- * Get begin time
- *
- * @return integer begin time
- */
- public function getFrom() {
- return $this->from;
- }
-
- /**
- * Set begin time
- *
- * @param integer $from
- * begin time
- */
- public function setFrom($from) {
- $this->from = $from;
- }
-
- /**
- * Get end time
- *
- * @return integer end time
- */
- public function getTo() {
- return $this->to;
- }
-
- /**
- * Set end time
- *
- * @param integer $to
- * end time
- */
- public function setTo($to) {
- $this->to = $to;
- }
-
- /**
- * Get user defined query
- *
- * @return string user defined query
- */
- public function getQuery() {
- return $this->query;
- }
-
- /**
- * Set user defined query
- *
- * @param string $query
- * user defined query
- */
- public function setQuery($query) {
- $this->query = $query;
- }
-
- /**
- * Get max line number of return logs
- *
- * @return integer max line number of return logs
- */
- public function getLine() {
- return $this->line;
- }
-
- /**
- * Set max line number of return logs
- *
- * @param integer $line
- * max line number of return logs
- */
- public function setLine($line) {
- $this->line = $line;
- }
-
- /**
- * Get line offset of return logs
- *
- * @return integer line offset of return logs
- */
- public function getOffset() {
- return $this->offset;
- }
-
- /**
- * Set request line offset of return logs
- *
- * @param integer $offset
- * line offset of return logs
- */
- public function setOffset($offset) {
- $this->offset = $offset;
- }
-
- /**
- * Get request reverse flag
- *
- * @return bool reverse flag
- */
- public function getReverse() {
- return $this->reverse;
- }
-
- /**
- * Set request reverse flag
- *
- * @param bool $reverse
- * reverse flag
- */
- public function setReverse($reverse) {
- $this->reverse = $reverse;
- }
-}
+logstore = $logstore;
+ $this->from = $from;
+ $this->to = $to;
+ $this->topic = $topic;
+ $this->query = $query;
+ $this->line = $line;
+ $this->offset = $offset;
+ $this->reverse = $reverse;
+ }
+
+ /**
+ * Get logstore name
+ *
+ * @return string logstore name
+ */
+ public function getLogstore() {
+ return $this->logstore;
+ }
+
+ /**
+ * Set logstore name
+ *
+ * @param string $logstore
+ * logstore name
+ */
+ public function setLogstore($logstore) {
+ $this->logstore = $logstore;
+ }
+
+ /**
+ * Get topic name
+ *
+ * @return string topic name
+ */
+ public function getTopic() {
+ return $this->topic;
+ }
+
+ /**
+ * Set topic name
+ *
+ * @param string $topic
+ * topic name
+ */
+ public function setTopic($topic) {
+ $this->topic = $topic;
+ }
+
+ /**
+ * Get begin time
+ *
+ * @return integer begin time
+ */
+ public function getFrom() {
+ return $this->from;
+ }
+
+ /**
+ * Set begin time
+ *
+ * @param integer $from
+ * begin time
+ */
+ public function setFrom($from) {
+ $this->from = $from;
+ }
+
+ /**
+ * Get end time
+ *
+ * @return integer end time
+ */
+ public function getTo() {
+ return $this->to;
+ }
+
+ /**
+ * Set end time
+ *
+ * @param integer $to
+ * end time
+ */
+ public function setTo($to) {
+ $this->to = $to;
+ }
+
+ /**
+ * Get user defined query
+ *
+ * @return string user defined query
+ */
+ public function getQuery() {
+ return $this->query;
+ }
+
+ /**
+ * Set user defined query
+ *
+ * @param string $query
+ * user defined query
+ */
+ public function setQuery($query) {
+ $this->query = $query;
+ }
+
+ /**
+ * Get max line number of return logs
+ *
+ * @return integer max line number of return logs
+ */
+ public function getLine() {
+ return $this->line;
+ }
+
+ /**
+ * Set max line number of return logs
+ *
+ * @param integer $line
+ * max line number of return logs
+ */
+ public function setLine($line) {
+ $this->line = $line;
+ }
+
+ /**
+ * Get line offset of return logs
+ *
+ * @return integer line offset of return logs
+ */
+ public function getOffset() {
+ return $this->offset;
+ }
+
+ /**
+ * Set request line offset of return logs
+ *
+ * @param integer $offset
+ * line offset of return logs
+ */
+ public function setOffset($offset) {
+ $this->offset = $offset;
+ }
+
+ /**
+ * Get request reverse flag
+ *
+ * @return bool reverse flag
+ */
+ public function getReverse() {
+ return $this->reverse;
+ }
+
+ /**
+ * Set request reverse flag
+ *
+ * @param bool $reverse
+ * reverse flag
+ */
+ public function setReverse($reverse) {
+ $this->reverse = $reverse;
+ }
+}
diff --git a/Aliyun/Log/Models/GetMachineGroupRequest.php b/Aliyun/Log/Models/Request/GetMachineGroupRequest.php
similarity index 95%
rename from Aliyun/Log/Models/GetMachineGroupRequest.php
rename to Aliyun/Log/Models/Request/GetMachineGroupRequest.php
index 23aa3a8..8df5b03 100644
--- a/Aliyun/Log/Models/GetMachineGroupRequest.php
+++ b/Aliyun/Log/Models/Request/GetMachineGroupRequest.php
@@ -1,31 +1,31 @@
-groupName = $groupName;
- }
- public function getGroupName(){
- return $this->groupName;
- }
- public function setGroupName($groupName){
- $this->groupName = $groupName;
- }
-
-}
+groupName = $groupName;
+ }
+ public function getGroupName(){
+ return $this->groupName;
+ }
+ public function setGroupName($groupName){
+ $this->groupName = $groupName;
+ }
+
+}
diff --git a/Aliyun/Log/Models/GetMachineRequest.php b/Aliyun/Log/Models/Request/GetMachineRequest.php
similarity index 94%
rename from Aliyun/Log/Models/GetMachineRequest.php
rename to Aliyun/Log/Models/Request/GetMachineRequest.php
index a21cb49..5100c22 100644
--- a/Aliyun/Log/Models/GetMachineRequest.php
+++ b/Aliyun/Log/Models/Request/GetMachineRequest.php
@@ -1,34 +1,34 @@
-uuid = $uuid;
- }
-
- public function getUuid(){
- return $this->uuid;
- }
-
- public function setUuid($uuid){
- $this->uuid = $uuid;
- }
-
-}
+uuid = $uuid;
+ }
+
+ public function getUuid(){
+ return $this->uuid;
+ }
+
+ public function setUuid($uuid){
+ $this->uuid = $uuid;
+ }
+
+}
diff --git a/Aliyun/Log/Models/Request/GetShipperConfigRequest.php b/Aliyun/Log/Models/Request/GetShipperConfigRequest.php
new file mode 100644
index 0000000..eafc01d
--- /dev/null
+++ b/Aliyun/Log/Models/Request/GetShipperConfigRequest.php
@@ -0,0 +1,53 @@
+logStore;
+ }
+
+ /**
+ * @param mixed $logStore
+ */
+ public function setLogStore($logStore)
+ {
+ $this->logStore = $logStore;
+ }
+
+
+ /**
+ * @return mixed
+ */
+ public function getShipperName()
+ {
+ return $this->shipperName;
+ }
+
+ /**
+ * @param mixed $shipperName
+ */
+ public function setShipperName($shipperName)
+ {
+ $this->shipperName = $shipperName;
+ }
+
+ /**
+ * Aliyun_Log_Models_CreateShipperRequest Constructor
+ *
+ */
+ public function __construct($project) {
+ parent::__construct ( $project );
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/Request/GetShipperTasksRequest.php b/Aliyun/Log/Models/Request/GetShipperTasksRequest.php
new file mode 100644
index 0000000..b31f618
--- /dev/null
+++ b/Aliyun/Log/Models/Request/GetShipperTasksRequest.php
@@ -0,0 +1,146 @@
+startTime;
+ }
+
+ /**
+ * @param mixed $startTime
+ */
+ public function setStartTime($startTime)
+ {
+ $this->startTime = $startTime;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getEndTime()
+ {
+ return $this->endTime;
+ }
+
+ /**
+ * @param mixed $endTime
+ */
+ public function setEndTime($endTime)
+ {
+ $this->endTime = $endTime;
+ }
+
+ /**
+ * @return
+ */
+ public function getStatusType()
+ {
+ return $this->statusType;
+ }
+
+ /**
+ * @param $statusType
+ */
+ public function setStatusType($statusType)
+ {
+ $this->statusType = $statusType;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getOffset()
+ {
+ return $this->offset;
+ }
+
+ /**
+ * @param mixed $offset
+ */
+ public function setOffset($offset)
+ {
+ $this->offset = $offset;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getSize()
+ {
+ return $this->size;
+ }
+
+ /**
+ * @param mixed $size
+ */
+ public function setSize($size)
+ {
+ $this->size = $size;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getLogStore()
+ {
+ return $this->logStore;
+ }
+
+ /**
+ * @param mixed $logStore
+ */
+ public function setLogStore($logStore)
+ {
+ $this->logStore = $logStore;
+ }
+
+
+ /**
+ * @return mixed
+ */
+ public function getShipperName()
+ {
+ return $this->shipperName;
+ }
+
+ /**
+ * @param mixed $shipperName
+ */
+ public function setShipperName($shipperName)
+ {
+ $this->shipperName = $shipperName;
+ }
+
+ /**
+ * Aliyun_Log_Models_CreateShipperRequest Constructor
+ *
+ */
+ public function __construct($project) {
+ parent::__construct ( $project );
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/ListACLsRequest.php b/Aliyun/Log/Models/Request/ListACLsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/ListACLsRequest.php
rename to Aliyun/Log/Models/Request/ListACLsRequest.php
index 801b512..d6311e1 100644
--- a/Aliyun/Log/Models/ListACLsRequest.php
+++ b/Aliyun/Log/Models/Request/ListACLsRequest.php
@@ -1,51 +1,51 @@
-offset = $offset;
- $this->size = $size;
- $this->principleId = $principleId;
- }
-
- public function getOffset(){
- return $this->offset;
- }
- public function setOffset($offset){
- $this->offset = $offset;
- }
-
- public function getSize(){
- return $this->size;
- }
- public function setSize($size){
- $this->size = $size;
- }
-
- public function getPrincipleId(){
- return $this->principleId;
- }
- public function setPrincipleId($principleId){
- $this->principleId = $principleId;
- }
-
-}
+offset = $offset;
+ $this->size = $size;
+ $this->principleId = $principleId;
+ }
+
+ public function getOffset(){
+ return $this->offset;
+ }
+ public function setOffset($offset){
+ $this->offset = $offset;
+ }
+
+ public function getSize(){
+ return $this->size;
+ }
+ public function setSize($size){
+ $this->size = $size;
+ }
+
+ public function getPrincipleId(){
+ return $this->principleId;
+ }
+ public function setPrincipleId($principleId){
+ $this->principleId = $principleId;
+ }
+
+}
diff --git a/Aliyun/Log/Models/ListConfigsRequest.php b/Aliyun/Log/Models/Request/ListConfigsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/ListConfigsRequest.php
rename to Aliyun/Log/Models/Request/ListConfigsRequest.php
index 76f5ef3..82049a2 100644
--- a/Aliyun/Log/Models/ListConfigsRequest.php
+++ b/Aliyun/Log/Models/Request/ListConfigsRequest.php
@@ -1,54 +1,54 @@
-configName = $configName;
- $this->offset = $offset;
- $this->size = $size;
- }
-
- public function getConfigName(){
- return $this->configName;
- }
-
- public function setConfigName($configName){
- $this->configName = $configName;
- }
-
- public function getOffset(){
- return $this->offset;
- }
-
- public function setOffset($offset){
- $this->offset = $offset;
- }
-
- public function getSize(){
- return $this->size;
- }
-
- public function setSize($size){
- $this->size = $size;
- }
-}
+configName = $configName;
+ $this->offset = $offset;
+ $this->size = $size;
+ }
+
+ public function getConfigName(){
+ return $this->configName;
+ }
+
+ public function setConfigName($configName){
+ $this->configName = $configName;
+ }
+
+ public function getOffset(){
+ return $this->offset;
+ }
+
+ public function setOffset($offset){
+ $this->offset = $offset;
+ }
+
+ public function getSize(){
+ return $this->size;
+ }
+
+ public function setSize($size){
+ $this->size = $size;
+ }
+}
diff --git a/Aliyun/Log/Models/ListLogstoresRequest.php b/Aliyun/Log/Models/Request/ListLogstoresRequest.php
similarity index 95%
rename from Aliyun/Log/Models/ListLogstoresRequest.php
rename to Aliyun/Log/Models/Request/ListLogstoresRequest.php
index 215d35f..497afd7 100644
--- a/Aliyun/Log/Models/ListLogstoresRequest.php
+++ b/Aliyun/Log/Models/Request/ListLogstoresRequest.php
@@ -1,24 +1,24 @@
-groupName = $groupName;
- $this->offset = $offset;
- $this->size = $size;
- }
-
- public function getGroupName(){
- return $this->groupName;
- }
-
- public function setGroupName($groupName){
- $this->groupName = $groupName;
- }
-
- public function getOffset(){
- return $this->offset;
- }
-
- public function setOffset($offset){
- $this->offset = $offset;
- }
-
- public function getSize(){
- return $this->size;
- }
-
- public function setSize($size){
- $this->size = $size;
- }
-}
+groupName = $groupName;
+ $this->offset = $offset;
+ $this->size = $size;
+ }
+
+ public function getGroupName(){
+ return $this->groupName;
+ }
+
+ public function setGroupName($groupName){
+ $this->groupName = $groupName;
+ }
+
+ public function getOffset(){
+ return $this->offset;
+ }
+
+ public function setOffset($offset){
+ $this->offset = $offset;
+ }
+
+ public function getSize(){
+ return $this->size;
+ }
+
+ public function setSize($size){
+ $this->size = $size;
+ }
+}
diff --git a/Aliyun/Log/Models/ListShardsRequest.php b/Aliyun/Log/Models/Request/ListShardsRequest.php
similarity index 94%
rename from Aliyun/Log/Models/ListShardsRequest.php
rename to Aliyun/Log/Models/Request/ListShardsRequest.php
index a837fd5..2bbf718 100644
--- a/Aliyun/Log/Models/ListShardsRequest.php
+++ b/Aliyun/Log/Models/Request/ListShardsRequest.php
@@ -1,36 +1,36 @@
-logstore = $logstore;
- }
-
- public function getLogstore(){
- return $this->logstore;
- }
-
- public function setLogstore($logstore){
- $this->logstore = $logstore;
- }
-
-
-}
+logstore = $logstore;
+ }
+
+ public function getLogstore(){
+ return $this->logstore;
+ }
+
+ public function setLogstore($logstore){
+ $this->logstore = $logstore;
+ }
+
+
+}
diff --git a/Aliyun/Log/Models/Request/ListShipperRequest.php b/Aliyun/Log/Models/Request/ListShipperRequest.php
new file mode 100644
index 0000000..03aa8be
--- /dev/null
+++ b/Aliyun/Log/Models/Request/ListShipperRequest.php
@@ -0,0 +1,37 @@
+logStore;
+ }
+
+ /**
+ * @param mixed $logStore
+ */
+ public function setLogStore($logStore)
+ {
+ $this->logStore = $logStore;
+ }
+
+
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/ListTopicsRequest.php b/Aliyun/Log/Models/Request/ListTopicsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/ListTopicsRequest.php
rename to Aliyun/Log/Models/Request/ListTopicsRequest.php
index 935ede7..60882c1 100644
--- a/Aliyun/Log/Models/ListTopicsRequest.php
+++ b/Aliyun/Log/Models/Request/ListTopicsRequest.php
@@ -1,102 +1,102 @@
-logstore = $logstore;
- $this->token = $token;
- $this->line = $line;
- }
-
- /**
- * Get logstroe name
- *
- * @return string logstore name
- */
- public function getLogstore() {
- return $this->logstore;
- }
-
- /**
- * Set logstore name
- *
- * @param string $logstore
- * logstore name
- */
- public function setLogstore($logstore) {
- $this->logstore = $logstore;
- }
-
-
- /**
- * Get start token to list topics
- *
- * @return string start token to list topics
- */
- public function getToken() {
- return $this->token;
- }
-
- /**
- * Set start token to list topics
- *
- * @param string $token start token to list topics
- */
- public function setToken($token) {
- $this->token = $token;
- }
-
-
- /**
- * Get max topic counts to return
- *
- * @return integer max topic counts to return
- */
- public function getLine() {
- return $this->line;
- }
-
- /**
- * Set max topic counts to return
- *
- * @param integer $line max topic counts to return
- */
- public function setLine($line) {
- $this->line = $line;
- }
-}
+logstore = $logstore;
+ $this->token = $token;
+ $this->line = $line;
+ }
+
+ /**
+ * Get logstroe name
+ *
+ * @return string logstore name
+ */
+ public function getLogstore() {
+ return $this->logstore;
+ }
+
+ /**
+ * Set logstore name
+ *
+ * @param string $logstore
+ * logstore name
+ */
+ public function setLogstore($logstore) {
+ $this->logstore = $logstore;
+ }
+
+
+ /**
+ * Get start token to list topics
+ *
+ * @return string start token to list topics
+ */
+ public function getToken() {
+ return $this->token;
+ }
+
+ /**
+ * Set start token to list topics
+ *
+ * @param string $token start token to list topics
+ */
+ public function setToken($token) {
+ $this->token = $token;
+ }
+
+
+ /**
+ * Get max topic counts to return
+ *
+ * @return integer max topic counts to return
+ */
+ public function getLine() {
+ return $this->line;
+ }
+
+ /**
+ * Set max topic counts to return
+ *
+ * @param integer $line max topic counts to return
+ */
+ public function setLine($line) {
+ $this->line = $line;
+ }
+}
diff --git a/Aliyun/Log/Models/MergeShardsRequest.php b/Aliyun/Log/Models/Request/MergeShardsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/MergeShardsRequest.php
rename to Aliyun/Log/Models/Request/MergeShardsRequest.php
index 4924173..31512a6 100644
--- a/Aliyun/Log/Models/MergeShardsRequest.php
+++ b/Aliyun/Log/Models/Request/MergeShardsRequest.php
@@ -1,39 +1,39 @@
-logstore = $logstore;
- $this->shardId = $shardId;
- }
-
- public function getLogstore(){
- return $this->logstore;
- }
-
- public function setLogstore($logstore){
- $this->logstore = $logstore;
- }
-
- public function getShardId(){
- return $this->shardId;
- }
-}
+logstore = $logstore;
+ $this->shardId = $shardId;
+ }
+
+ public function getLogstore(){
+ return $this->logstore;
+ }
+
+ public function setLogstore($logstore){
+ $this->logstore = $logstore;
+ }
+
+ public function getShardId(){
+ return $this->shardId;
+ }
+}
diff --git a/Aliyun/Log/Models/PutLogsRequest.php b/Aliyun/Log/Models/Request/PutLogsRequest.php
similarity index 95%
rename from Aliyun/Log/Models/PutLogsRequest.php
rename to Aliyun/Log/Models/Request/PutLogsRequest.php
index 7d3a1a2..f72ab4e 100644
--- a/Aliyun/Log/Models/PutLogsRequest.php
+++ b/Aliyun/Log/Models/Request/PutLogsRequest.php
@@ -1,156 +1,156 @@
-logstore = $logstore;
- $this->topic = $topic;
- $this->source = $source;
- $this->logitems = $logitems;
- $this->shardKey = $shardKey;
- }
-
- /**
- * Get logstroe name
- *
- * @return string logstore name
- */
- public function getLogstore() {
- return $this->logstore;
- }
-
- /**
- * Set logstore name
- *
- * @param string $logstore
- * logstore name
- */
- public function setLogstore($logstore) {
- $this->logstore = $logstore;
- }
-
- /**
- * Get topic name
- *
- * @return string topic name
- */
- public function getTopic() {
- return $this->topic;
- }
-
- /**
- * Set topic name
- *
- * @param string $topic
- * topic name
- */
- public function setTopic($topic) {
- $this->topic = $topic;
- }
-
- /**
- * Get all the log data
- *
- * @return array LogItem array, log data
- */
- public function getLogItems() {
- return $this->logitems;
- }
-
- /**
- * Set the log data
- *
- * @param array $logitems
- * LogItem array, log data
- */
- public function setLogItems($logitems) {
- $this->logitems = $logitems;
- }
-
- /**
- * Get log source
- *
- * @return string log source
- */
- public function getSource() {
- return $this->source;
- }
-
- /**
- * set log source
- *
- * @param string $source
- * log source
- */
- public function setSource($source) {
- $this->source = $source;
- }
- /**
- * set shard key
- *
- * @param string shardkey
- */
- public function setShardKey($key){
- $this -> shardKey=$key;
- }
- /**
- * get shard key
- *
- * @return string shardKey
- */
- public function getShardKey(){
- return $this ->shardKey;
- }
-}
+logstore = $logstore;
+ $this->topic = $topic;
+ $this->source = $source;
+ $this->logitems = $logitems;
+ $this->shardKey = $shardKey;
+ }
+
+ /**
+ * Get logstroe name
+ *
+ * @return string logstore name
+ */
+ public function getLogstore() {
+ return $this->logstore;
+ }
+
+ /**
+ * Set logstore name
+ *
+ * @param string $logstore
+ * logstore name
+ */
+ public function setLogstore($logstore) {
+ $this->logstore = $logstore;
+ }
+
+ /**
+ * Get topic name
+ *
+ * @return string topic name
+ */
+ public function getTopic() {
+ return $this->topic;
+ }
+
+ /**
+ * Set topic name
+ *
+ * @param string $topic
+ * topic name
+ */
+ public function setTopic($topic) {
+ $this->topic = $topic;
+ }
+
+ /**
+ * Get all the log data
+ *
+ * @return array LogItem array, log data
+ */
+ public function getLogItems() {
+ return $this->logitems;
+ }
+
+ /**
+ * Set the log data
+ *
+ * @param array $logitems
+ * LogItem array, log data
+ */
+ public function setLogItems($logitems) {
+ $this->logitems = $logitems;
+ }
+
+ /**
+ * Get log source
+ *
+ * @return string log source
+ */
+ public function getSource() {
+ return $this->source;
+ }
+
+ /**
+ * set log source
+ *
+ * @param string $source
+ * log source
+ */
+ public function setSource($source) {
+ $this->source = $source;
+ }
+ /**
+ * set shard key
+ *
+ * @param string shardkey
+ */
+ public function setShardKey($key){
+ $this -> shardKey=$key;
+ }
+ /**
+ * get shard key
+ *
+ * @return string shardKey
+ */
+ public function getShardKey(){
+ return $this ->shardKey;
+ }
+}
diff --git a/Aliyun/Log/Models/RemoveConfigFromMachineGroupRequest.php b/Aliyun/Log/Models/Request/RemoveConfigFromMachineGroupRequest.php
similarity index 95%
rename from Aliyun/Log/Models/RemoveConfigFromMachineGroupRequest.php
rename to Aliyun/Log/Models/Request/RemoveConfigFromMachineGroupRequest.php
index cdd8ce9..193c2f8 100644
--- a/Aliyun/Log/Models/RemoveConfigFromMachineGroupRequest.php
+++ b/Aliyun/Log/Models/Request/RemoveConfigFromMachineGroupRequest.php
@@ -1,40 +1,40 @@
-groupName = $groupName;
- $this->configName = $configName;
- }
- public function getGroupName(){
- return $this->groupName;
- }
- public function setGroupName($groupName){
- $this->groupName = $groupName;
- }
-
- public function getConfigName(){
- return $this->configName;
- }
- public function setConfigName($configName){
- $this->configName = $configName;
- }
-
-}
+groupName = $groupName;
+ $this->configName = $configName;
+ }
+ public function getGroupName(){
+ return $this->groupName;
+ }
+ public function setGroupName($groupName){
+ $this->groupName = $groupName;
+ }
+
+ public function getConfigName(){
+ return $this->configName;
+ }
+ public function setConfigName($configName){
+ $this->configName = $configName;
+ }
+
+}
diff --git a/Aliyun/Log/Models/Request.php b/Aliyun/Log/Models/Request/Request.php
similarity index 94%
rename from Aliyun/Log/Models/Request.php
rename to Aliyun/Log/Models/Request/Request.php
index 05df3f0..43efbc2 100644
--- a/Aliyun/Log/Models/Request.php
+++ b/Aliyun/Log/Models/Request/Request.php
@@ -1,47 +1,47 @@
-project = $project;
- }
-
- /**
- * Get project name
- *
- * @return string project name
- */
- public function getProject() {
- return $this->project;
- }
-
- /**
- * Set project name
- *
- * @param string $project
- * project name
- */
- public function setProject($project) {
- $this->project = $project;
- }
-}
+project = $project;
+ }
+
+ /**
+ * Get project name
+ *
+ * @return string project name
+ */
+ public function getProject() {
+ return $this->project;
+ }
+
+ /**
+ * Set project name
+ *
+ * @param string $project
+ * project name
+ */
+ public function setProject($project) {
+ $this->project = $project;
+ }
+}
diff --git a/Aliyun/Log/Models/Request/RetryShipperTasksRequest.php b/Aliyun/Log/Models/Request/RetryShipperTasksRequest.php
new file mode 100644
index 0000000..36343a9
--- /dev/null
+++ b/Aliyun/Log/Models/Request/RetryShipperTasksRequest.php
@@ -0,0 +1,70 @@
+taskLists;
+ }
+
+ /**
+ * @param mixed $taskLists
+ */
+ public function setTaskLists($taskLists)
+ {
+ $this->taskLists = $taskLists;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getLogStore()
+ {
+ return $this->logStore;
+ }
+
+ /**
+ * @param mixed $logStore
+ */
+ public function setLogStore($logStore)
+ {
+ $this->logStore = $logStore;
+ }
+
+
+ /**
+ * @return mixed
+ */
+ public function getShipperName()
+ {
+ return $this->shipperName;
+ }
+
+ /**
+ * @param mixed $shipperName
+ */
+ public function setShipperName($shipperName)
+ {
+ $this->shipperName = $shipperName;
+ }
+
+ /**
+ * Aliyun_Log_Models_CreateShipperRequest Constructor
+ *
+ */
+ public function __construct($project) {
+ parent::__construct ( $project );
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/SplitShardRequest.php b/Aliyun/Log/Models/Request/SplitShardRequest.php
similarity index 95%
rename from Aliyun/Log/Models/SplitShardRequest.php
rename to Aliyun/Log/Models/Request/SplitShardRequest.php
index b628433..129b87e 100644
--- a/Aliyun/Log/Models/SplitShardRequest.php
+++ b/Aliyun/Log/Models/Request/SplitShardRequest.php
@@ -1,44 +1,44 @@
-logstore = $logstore;
- $this->shardId = $shardId;
- $this->midHash = $midHash;
- }
-
- public function getLogstore(){
- return $this->logstore;
- }
-
- public function setLogstore($logstore){
- $this->logstore = $logstore;
- }
-
- public function getShardId(){
- return $this->shardId;
- }
- public function getMidHash(){
- return $this->midHash;
- }
-
-}
+logstore = $logstore;
+ $this->shardId = $shardId;
+ $this->midHash = $midHash;
+ }
+
+ public function getLogstore(){
+ return $this->logstore;
+ }
+
+ public function setLogstore($logstore){
+ $this->logstore = $logstore;
+ }
+
+ public function getShardId(){
+ return $this->shardId;
+ }
+ public function getMidHash(){
+ return $this->midHash;
+ }
+
+}
diff --git a/Aliyun/Log/Models/UpdateACLRequest.php b/Aliyun/Log/Models/Request/UpdateACLRequest.php
similarity index 94%
rename from Aliyun/Log/Models/UpdateACLRequest.php
rename to Aliyun/Log/Models/Request/UpdateACLRequest.php
index a8f21b8..f9cc97d 100644
--- a/Aliyun/Log/Models/UpdateACLRequest.php
+++ b/Aliyun/Log/Models/Request/UpdateACLRequest.php
@@ -1,31 +1,31 @@
-acl = $acl;
- }
-
- public function getAcl(){
- return $this->acl;
- }
- public function setAcl($acl){
- $this->acl = $acl;
- }
-}
+acl = $acl;
+ }
+
+ public function getAcl(){
+ return $this->acl;
+ }
+ public function setAcl($acl){
+ $this->acl = $acl;
+ }
+}
diff --git a/Aliyun/Log/Models/UpdateConfigRequest.php b/Aliyun/Log/Models/Request/UpdateConfigRequest.php
similarity index 94%
rename from Aliyun/Log/Models/UpdateConfigRequest.php
rename to Aliyun/Log/Models/Request/UpdateConfigRequest.php
index 327040a..6549594 100644
--- a/Aliyun/Log/Models/UpdateConfigRequest.php
+++ b/Aliyun/Log/Models/Request/UpdateConfigRequest.php
@@ -1,33 +1,33 @@
-config = $config;
- }
-
- public function getConfig(){
- return $this->config;
- }
-
- public function setConfig($config){
- $this->config = $config;
- }
-
-}
+config = $config;
+ }
+
+ public function getConfig(){
+ return $this->config;
+ }
+
+ public function setConfig($config){
+ $this->config = $config;
+ }
+
+}
diff --git a/Aliyun/Log/Models/UpdateLogstoreRequest.php b/Aliyun/Log/Models/Request/UpdateLogstoreRequest.php
similarity index 95%
rename from Aliyun/Log/Models/UpdateLogstoreRequest.php
rename to Aliyun/Log/Models/Request/UpdateLogstoreRequest.php
index be1a19b..874a70a 100644
--- a/Aliyun/Log/Models/UpdateLogstoreRequest.php
+++ b/Aliyun/Log/Models/Request/UpdateLogstoreRequest.php
@@ -1,42 +1,42 @@
- logstore = $logstore;
- $this -> ttl = $ttl;
- $this -> shardCount = $shardCount;
- }
- public function getLogstore()
- {
- return $this -> logstore;
- }
- public function getTtl()
- {
- return $this -> ttl;
- }
- public function getShardCount()
- {
- return $this -> shardCount;
- }
-}
+ logstore = $logstore;
+ $this -> ttl = $ttl;
+ $this -> shardCount = $shardCount;
+ }
+ public function getLogstore()
+ {
+ return $this -> logstore;
+ }
+ public function getTtl()
+ {
+ return $this -> ttl;
+ }
+ public function getShardCount()
+ {
+ return $this -> shardCount;
+ }
+}
diff --git a/Aliyun/Log/Models/UpdateMachineGroupRequest.php b/Aliyun/Log/Models/Request/UpdateMachineGroupRequest.php
similarity index 95%
rename from Aliyun/Log/Models/UpdateMachineGroupRequest.php
rename to Aliyun/Log/Models/Request/UpdateMachineGroupRequest.php
index 4de8518..719ef6e 100644
--- a/Aliyun/Log/Models/UpdateMachineGroupRequest.php
+++ b/Aliyun/Log/Models/Request/UpdateMachineGroupRequest.php
@@ -1,34 +1,34 @@
-machineGroup = $machineGroup;
- }
-
- public function getMachineGroup(){
- return $this->machineGroup;
- }
-
- public function setMachineGroup($machineGroup){
- $this->machineGroup = $machineGroup;
- }
-
-
-}
+machineGroup = $machineGroup;
+ }
+
+ public function getMachineGroup(){
+ return $this->machineGroup;
+ }
+
+ public function setMachineGroup($machineGroup){
+ $this->machineGroup = $machineGroup;
+ }
+
+
+}
diff --git a/Aliyun/Log/Models/Request/UpdateShipperRequest.php b/Aliyun/Log/Models/Request/UpdateShipperRequest.php
new file mode 100644
index 0000000..fe687ed
--- /dev/null
+++ b/Aliyun/Log/Models/Request/UpdateShipperRequest.php
@@ -0,0 +1,89 @@
+logStore;
+ }
+
+ /**
+ * @param mixed $logStore
+ */
+ public function setLogStore($logStore)
+ {
+ $this->logStore = $logStore;
+ }
+
+ /**
+ * Aliyun_Log_Models_CreateShipperRequest Constructor
+ *
+ */
+ public function __construct($project) {
+ parent::__construct ( $project );
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getShipperName()
+ {
+ return $this->shipperName;
+ }
+
+ /**
+ * @param mixed $shipperName
+ */
+ public function setShipperName($shipperName)
+ {
+ $this->shipperName = $shipperName;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTargetType()
+ {
+ return $this->targetType;
+ }
+
+ /**
+ * @param mixed $targetType
+ */
+ public function setTargetType($targetType)
+ {
+ $this->targetType = $targetType;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTargetConfigration()
+ {
+ return $this->targetConfigration;
+ }
+
+ /**
+ * @param mixed $targetConfigration
+ */
+ public function setTargetConfigration($targetConfigration)
+ {
+ $this->targetConfigration = $targetConfigration;
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/ApplyConfigToMachineGroupResponse.php b/Aliyun/Log/Models/Response/ApplyConfigToMachineGroupResponse.php
similarity index 95%
rename from Aliyun/Log/Models/ApplyConfigToMachineGroupResponse.php
rename to Aliyun/Log/Models/Response/ApplyConfigToMachineGroupResponse.php
index 29777b6..253e1ac 100644
--- a/Aliyun/Log/Models/ApplyConfigToMachineGroupResponse.php
+++ b/Aliyun/Log/Models/Response/ApplyConfigToMachineGroupResponse.php
@@ -1,29 +1,29 @@
-logPackageList = $resp->getLogGroupListArray();
- $this->nextCursor = (isset($header['x-log-cursor']))?$header['x-log-cursor']:null;
-
- }
-
- public function getLogPackageList(){
- return $this->logPackageList;
- }
-
- public function getNextCursor(){
- return $this->nextCursor;
- }
-
- public function getCount() {
- return count($this->logPackageList);
- }
-
- public function getLogPackage($index){
- if($index<$this->getCount()){
- return $this->logPackageList[$index];
- }
- else{
- throw new OutOfBoundsException('Index must less than size of logPackageList');
- }
- }
-
- public function getLogGroupList(){
- return $this->logPackageList;
- }
-
- public function getLogGroup($index){
- if($index<$this->getCount()){
- return $this->logPackageList[$index];
- }
- else{
- throw new OutOfBoundsException('Index must less than size of logPackageList');
- }
- }
-
-
-}
+logPackageList = $resp->getLogGroupListArray();
+ $this->nextCursor = (isset($header['x-log-cursor']))?$header['x-log-cursor']:null;
+
+ }
+
+ public function getLogPackageList(){
+ return $this->logPackageList;
+ }
+
+ public function getNextCursor(){
+ return $this->nextCursor;
+ }
+
+ public function getCount() {
+ return count($this->logPackageList);
+ }
+
+ public function getLogPackage($index){
+ if($index<$this->getCount()){
+ return $this->logPackageList[$index];
+ }
+ else{
+ throw new OutOfBoundsException('Index must less than size of logPackageList');
+ }
+ }
+
+ public function getLogGroupList(){
+ return $this->logPackageList;
+ }
+
+ public function getLogGroup($index){
+ if($index<$this->getCount()){
+ return $this->logPackageList[$index];
+ }
+ else{
+ throw new OutOfBoundsException('Index must less than size of logPackageList');
+ }
+ }
+
+
+}
diff --git a/Aliyun/Log/Models/CreateACLResponse.php b/Aliyun/Log/Models/Response/CreateACLResponse.php
similarity index 95%
rename from Aliyun/Log/Models/CreateACLResponse.php
rename to Aliyun/Log/Models/Response/CreateACLResponse.php
index 3637cea..c075b60 100644
--- a/Aliyun/Log/Models/CreateACLResponse.php
+++ b/Aliyun/Log/Models/Response/CreateACLResponse.php
@@ -1,33 +1,33 @@
-aclId = $resp['aclId'];
- }
- public function getAclId(){
- return $this->aclId;
- }
-
-}
+aclId = $resp['aclId'];
+ }
+ public function getAclId(){
+ return $this->aclId;
+ }
+
+}
diff --git a/Aliyun/Log/Models/CreateConfigResponse.php b/Aliyun/Log/Models/Response/CreateConfigResponse.php
similarity index 95%
rename from Aliyun/Log/Models/CreateConfigResponse.php
rename to Aliyun/Log/Models/Response/CreateConfigResponse.php
index 4f53f63..99e2263 100644
--- a/Aliyun/Log/Models/CreateConfigResponse.php
+++ b/Aliyun/Log/Models/Response/CreateConfigResponse.php
@@ -1,29 +1,29 @@
-acl = null;
- if($resp!==null){
- $this->acl = new Aliyun_Log_Models_ACL();
- $this->acl->setFromArray($resp);
- }
- }
-
- public function getAcl(){
- return $this->acl;
- }
-
-
-}
+acl = null;
+ if($resp!==null){
+ $this->acl = new Aliyun_Log_Models_ACL();
+ $this->acl->setFromArray($resp);
+ }
+ }
+
+ public function getAcl(){
+ return $this->acl;
+ }
+
+
+}
diff --git a/Aliyun/Log/Models/GetConfigResponse.php b/Aliyun/Log/Models/Response/GetConfigResponse.php
similarity index 95%
rename from Aliyun/Log/Models/GetConfigResponse.php
rename to Aliyun/Log/Models/Response/GetConfigResponse.php
index 7c5c8bb..a4619a2 100644
--- a/Aliyun/Log/Models/GetConfigResponse.php
+++ b/Aliyun/Log/Models/Response/GetConfigResponse.php
@@ -1,37 +1,37 @@
-config = new Aliyun_Log_Models_Config();
- $this->config->setFromArray($resp);
- }
-
- public function getConfig(){
- return $this->config;
- }
-
-}
+config = new Aliyun_Log_Models_Config();
+ $this->config->setFromArray($resp);
+ }
+
+ public function getConfig(){
+ return $this->config;
+ }
+
+}
diff --git a/Aliyun/Log/Models/GetCursorResponse.php b/Aliyun/Log/Models/Response/GetCursorResponse.php
similarity index 95%
rename from Aliyun/Log/Models/GetCursorResponse.php
rename to Aliyun/Log/Models/Response/GetCursorResponse.php
index d09f6d9..320c0e9 100644
--- a/Aliyun/Log/Models/GetCursorResponse.php
+++ b/Aliyun/Log/Models/Response/GetCursorResponse.php
@@ -1,41 +1,41 @@
-cursor = $resp['cursor'];
- }
-
- /**
- * Get cursor from the response
- *
- * @return string cursor
- */
- public function getCursor(){
- return $this->cursor;
- }
-}
+cursor = $resp['cursor'];
+ }
+
+ /**
+ * Get cursor from the response
+ *
+ * @return string cursor
+ */
+ public function getCursor(){
+ return $this->cursor;
+ }
+}
diff --git a/Aliyun/Log/Models/GetHistogramsResponse.php b/Aliyun/Log/Models/Response/GetHistogramsResponse.php
similarity index 96%
rename from Aliyun/Log/Models/GetHistogramsResponse.php
rename to Aliyun/Log/Models/Response/GetHistogramsResponse.php
index d7acd59..b5514f5 100644
--- a/Aliyun/Log/Models/GetHistogramsResponse.php
+++ b/Aliyun/Log/Models/Response/GetHistogramsResponse.php
@@ -1,77 +1,77 @@
-
-
- /**
- * Aliyun_Log_Models_GetHistogramsResponse constructor
- *
- * @param array $resp
- * GetHistogramsResponse HTTP response body
- * @param array $header
- * GetHistogramsResponse HTTP response header
- */
- public function __construct($resp, $header) {
- parent::__construct ( $header );
- $this->progress = $header ['x-log-progress'];
- $this->count = $header ['x-log-count'];
- $this->histograms = array ();
- foreach ( $resp as $data )
- $this->histograms [] = new Aliyun_Log_Models_Histogram ( $data ['from'], $data ['to'], $data ['count'], $data ['progress'] );
- }
-
- /**
- * Check if the histogram is completed
- *
- * @return bool true if this histogram is completed
- */
- public function isCompleted() {
- return $this->progress == 'Complete';
- }
-
- /**
- * Get total logs' count that current query hits
- *
- * @return integer total logs' count that current query hits
- */
- public function getTotalCount() {
- return $this->count;
- }
-
- /**
- * Get histograms on the requested time range: [from, to)
- *
- * @return array Aliyun_Log_Models_Histogram array, histograms on the requested time range
- */
- public function getHistograms() {
- return $this->histograms;
- }
-}
+
+
+ /**
+ * Aliyun_Log_Models_GetHistogramsResponse constructor
+ *
+ * @param array $resp
+ * GetHistogramsResponse HTTP response body
+ * @param array $header
+ * GetHistogramsResponse HTTP response header
+ */
+ public function __construct($resp, $header) {
+ parent::__construct ( $header );
+ $this->progress = $header ['x-log-progress'];
+ $this->count = $header ['x-log-count'];
+ $this->histograms = array ();
+ foreach ( $resp as $data )
+ $this->histograms [] = new Aliyun_Log_Models_Histogram ( $data ['from'], $data ['to'], $data ['count'], $data ['progress'] );
+ }
+
+ /**
+ * Check if the histogram is completed
+ *
+ * @return bool true if this histogram is completed
+ */
+ public function isCompleted() {
+ return $this->progress == 'Complete';
+ }
+
+ /**
+ * Get total logs' count that current query hits
+ *
+ * @return integer total logs' count that current query hits
+ */
+ public function getTotalCount() {
+ return $this->count;
+ }
+
+ /**
+ * Get histograms on the requested time range: [from, to)
+ *
+ * @return array Aliyun_Log_Models_Histogram array, histograms on the requested time range
+ */
+ public function getHistograms() {
+ return $this->histograms;
+ }
+}
diff --git a/Aliyun/Log/Models/GetLogsResponse.php b/Aliyun/Log/Models/Response/GetLogsResponse.php
similarity index 96%
rename from Aliyun/Log/Models/GetLogsResponse.php
rename to Aliyun/Log/Models/Response/GetLogsResponse.php
index 4531931..d56dc0c 100644
--- a/Aliyun/Log/Models/GetLogsResponse.php
+++ b/Aliyun/Log/Models/Response/GetLogsResponse.php
@@ -1,81 +1,81 @@
-count = $header['x-log-count'];
- $this->progress = $header ['x-log-progress'];
- $this->logs = array ();
- foreach ( $resp as $data ) {
- $contents = $data;
- $time = $data ['__time__'];
- $source = $data ['__source__'];
- unset ( $contents ['__time__'] );
- unset ( $contents ['__source__'] );
- $this->logs [] = new Aliyun_Log_Models_QueriedLog ( $time, $source, $contents );
- }
- }
-
- /**
- * Get log number from the response
- *
- * @return integer log number
- */
- public function getCount() {
- return $this->count;
- }
-
- /**
- * Check if the get logs query is completed
- *
- * @return bool true if this logs query is completed
- */
- public function isCompleted() {
- return $this->progress == 'Complete';
- }
-
- /**
- * Get all logs from the response
- *
- * @return array Aliyun_Log_Models_QueriedLog array, all log data
- */
- public function getLogs() {
- return $this->logs;
- }
-}
+count = $header['x-log-count'];
+ $this->progress = $header ['x-log-progress'];
+ $this->logs = array ();
+ foreach ( $resp as $data ) {
+ $contents = $data;
+ $time = $data ['__time__'];
+ $source = $data ['__source__'];
+ unset ( $contents ['__time__'] );
+ unset ( $contents ['__source__'] );
+ $this->logs [] = new Aliyun_Log_Models_QueriedLog ( $time, $source, $contents );
+ }
+ }
+
+ /**
+ * Get log number from the response
+ *
+ * @return integer log number
+ */
+ public function getCount() {
+ return $this->count;
+ }
+
+ /**
+ * Check if the get logs query is completed
+ *
+ * @return bool true if this logs query is completed
+ */
+ public function isCompleted() {
+ return $this->progress == 'Complete';
+ }
+
+ /**
+ * Get all logs from the response
+ *
+ * @return array Aliyun_Log_Models_QueriedLog array, all log data
+ */
+ public function getLogs() {
+ return $this->logs;
+ }
+}
diff --git a/Aliyun/Log/Models/GetMachineGroupResponse.php b/Aliyun/Log/Models/Response/GetMachineGroupResponse.php
similarity index 96%
rename from Aliyun/Log/Models/GetMachineGroupResponse.php
rename to Aliyun/Log/Models/Response/GetMachineGroupResponse.php
index 2d47636..3bb8b3c 100644
--- a/Aliyun/Log/Models/GetMachineGroupResponse.php
+++ b/Aliyun/Log/Models/Response/GetMachineGroupResponse.php
@@ -1,36 +1,36 @@
-machineGroup = new Aliyun_Log_Models_MachineGroup();
- $this->machineGroup->setFromArray($resp);
- }
-
- public function getMachineGroup(){
- return $this->machineGroup;
- }
-
-}
+machineGroup = new Aliyun_Log_Models_MachineGroup();
+ $this->machineGroup->setFromArray($resp);
+ }
+
+ public function getMachineGroup(){
+ return $this->machineGroup;
+ }
+
+}
diff --git a/Aliyun/Log/Models/GetMachineResponse.php b/Aliyun/Log/Models/Response/GetMachineResponse.php
similarity index 95%
rename from Aliyun/Log/Models/GetMachineResponse.php
rename to Aliyun/Log/Models/Response/GetMachineResponse.php
index 670d2f9..fe98f7f 100644
--- a/Aliyun/Log/Models/GetMachineResponse.php
+++ b/Aliyun/Log/Models/Response/GetMachineResponse.php
@@ -1,38 +1,38 @@
-machine = new Aliyun_Log_Models_Machine();
- $this->machine->setFromArray($resp);
-
- }
-
- public function getMachine(){
- return $this->machine;
- }
-
-}
+machine = new Aliyun_Log_Models_Machine();
+ $this->machine->setFromArray($resp);
+
+ }
+
+ public function getMachine(){
+ return $this->machine;
+ }
+
+}
diff --git a/Aliyun/Log/Models/Response/GetShipperConfigResponse.php b/Aliyun/Log/Models/Response/GetShipperConfigResponse.php
new file mode 100644
index 0000000..15ceb15
--- /dev/null
+++ b/Aliyun/Log/Models/Response/GetShipperConfigResponse.php
@@ -0,0 +1,81 @@
+shipperName;
+ }
+
+ /**
+ * @param mixed $shipperName
+ */
+ public function setShipperName($shipperName)
+ {
+ $this->shipperName = $shipperName;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTargetType()
+ {
+ return $this->targetType;
+ }
+
+ /**
+ * @param mixed $targetType
+ */
+ public function setTargetType($targetType)
+ {
+ $this->targetType = $targetType;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTargetConfigration()
+ {
+ return $this->targetConfigration;
+ }
+
+ /**
+ * @param mixed $targetConfigration
+ */
+ public function setTargetConfigration($targetConfigration)
+ {
+ $this->targetConfigration = $targetConfigration;
+ }
+
+
+
+ /**
+ * Aliyun_Log_Models_GetShipperConfigResponse constructor
+ *
+ * @param array $resp
+ * GetLogs HTTP response body
+ * @param array $header
+ * GetLogs HTTP response header
+ */
+ public function __construct($resp, $header) {
+ parent::__construct ( $header );
+ $this->shipperName = $resp['shipperName'];
+ $this->targetConfigration = $resp['targetConfiguration'];
+ $this->targetType = $resp['targetType'];
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/Response/GetShipperTasksResponse.php b/Aliyun/Log/Models/Response/GetShipperTasksResponse.php
new file mode 100644
index 0000000..bb2f7ba
--- /dev/null
+++ b/Aliyun/Log/Models/Response/GetShipperTasksResponse.php
@@ -0,0 +1,97 @@
+total = $resp['total'];
+ $this->count = $resp['count'];
+ $this->statistics = $resp['statistics'];
+ $this->tasks = $resp['tasks'];
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getCount()
+ {
+ return $this->count;
+ }
+
+ /**
+ * @param mixed $count
+ */
+ public function setCount($count)
+ {
+ $this->count = $count;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTotal()
+ {
+ return $this->total;
+ }
+
+ /**
+ * @param mixed $total
+ */
+ public function setTotal($total)
+ {
+ $this->total = $total;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getStatistics()
+ {
+ return $this->statistics;
+ }
+
+ /**
+ * @param mixed $statistics
+ */
+ public function setStatistics($statistics)
+ {
+ $this->statistics = $statistics;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTasks()
+ {
+ return $this->tasks;
+ }
+
+ /**
+ * @param mixed $tasks
+ */
+ public function setTasks($tasks)
+ {
+ $this->tasks = $tasks;
+ }
+
+
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/ListACLsResponse.php b/Aliyun/Log/Models/Response/ListACLsResponse.php
similarity index 95%
rename from Aliyun/Log/Models/ListACLsResponse.php
rename to Aliyun/Log/Models/Response/ListACLsResponse.php
index ce479ef..ca3bf20 100644
--- a/Aliyun/Log/Models/ListACLsResponse.php
+++ b/Aliyun/Log/Models/Response/ListACLsResponse.php
@@ -1,44 +1,44 @@
-setFromArray($value);
- $aclArr[]=$aclObj;
- }
- }
- $this->acls = $aclArr;
- }
-
- public function getAcls(){
- return $this->acls;
- }
-
-
-}
+setFromArray($value);
+ $aclArr[]=$aclObj;
+ }
+ }
+ $this->acls = $aclArr;
+ }
+
+ public function getAcls(){
+ return $this->acls;
+ }
+
+
+}
diff --git a/Aliyun/Log/Models/ListConfigsResponse.php b/Aliyun/Log/Models/Response/ListConfigsResponse.php
similarity index 95%
rename from Aliyun/Log/Models/ListConfigsResponse.php
rename to Aliyun/Log/Models/Response/ListConfigsResponse.php
index 0a5d231..fcaf0a7 100644
--- a/Aliyun/Log/Models/ListConfigsResponse.php
+++ b/Aliyun/Log/Models/Response/ListConfigsResponse.php
@@ -1,44 +1,44 @@
-size = $resp['total'];
- $this->configs = $resp['configs'];
- }
-
- public function getSize(){
- return count($this->configs);
- }
-
- public function getTotal(){
- return $this ->total;
- }
-
- public function getConfigs(){
- return $this->configs;
- }
-
-
-}
+size = $resp['total'];
+ $this->configs = $resp['configs'];
+ }
+
+ public function getSize(){
+ return count($this->configs);
+ }
+
+ public function getTotal(){
+ return $this ->total;
+ }
+
+ public function getConfigs(){
+ return $this->configs;
+ }
+
+
+}
diff --git a/Aliyun/Log/Models/ListLogstoresResponse.php b/Aliyun/Log/Models/Response/ListLogstoresResponse.php
similarity index 95%
rename from Aliyun/Log/Models/ListLogstoresResponse.php
rename to Aliyun/Log/Models/Response/ListLogstoresResponse.php
index a6ba1f2..b62c72a 100644
--- a/Aliyun/Log/Models/ListLogstoresResponse.php
+++ b/Aliyun/Log/Models/Response/ListLogstoresResponse.php
@@ -1,57 +1,57 @@
-count = $resp ['total'];
- $this->logstores = $resp ['logstores'];
- }
-
- /**
- * Get total count of logstores from the response
- *
- * @return integer the number of total logstores from the response
- */
- public function getCount() {
- return $this->count;
- }
-
- /**
- * Get all the logstores from the response
- *
- * @return array all logstore
- */
- public function getLogstores() {
- return $this->logstores;
- }
-}
+count = $resp ['total'];
+ $this->logstores = $resp ['logstores'];
+ }
+
+ /**
+ * Get total count of logstores from the response
+ *
+ * @return integer the number of total logstores from the response
+ */
+ public function getCount() {
+ return $this->count;
+ }
+
+ /**
+ * Get all the logstores from the response
+ *
+ * @return array all logstore
+ */
+ public function getLogstores() {
+ return $this->logstores;
+ }
+}
diff --git a/Aliyun/Log/Models/ListMachineGroupsResponse.php b/Aliyun/Log/Models/Response/ListMachineGroupsResponse.php
similarity index 95%
rename from Aliyun/Log/Models/ListMachineGroupsResponse.php
rename to Aliyun/Log/Models/Response/ListMachineGroupsResponse.php
index 9ef203f..84b3443 100644
--- a/Aliyun/Log/Models/ListMachineGroupsResponse.php
+++ b/Aliyun/Log/Models/Response/ListMachineGroupsResponse.php
@@ -1,45 +1,45 @@
-offset = $resp['offset'];
- $this->size = $resp['size'];
- $this->machineGroups = $resp['machinegroups'];
- }
-
- public function getOffset(){
- return $this->offset;
- }
-
- public function getSize(){
- return $this->size;
- }
-
- public function getMachineGroups(){
- return $this->machineGroups;
- }
-}
+offset = $resp['offset'];
+ $this->size = $resp['size'];
+ $this->machineGroups = $resp['machinegroups'];
+ }
+
+ public function getOffset(){
+ return $this->offset;
+ }
+
+ public function getSize(){
+ return $this->size;
+ }
+
+ public function getMachineGroups(){
+ return $this->machineGroups;
+ }
+}
diff --git a/Aliyun/Log/Models/ListShardsResponse.php b/Aliyun/Log/Models/Response/ListShardsResponse.php
similarity index 91%
rename from Aliyun/Log/Models/ListShardsResponse.php
rename to Aliyun/Log/Models/Response/ListShardsResponse.php
index 90da484..71eea16 100644
--- a/Aliyun/Log/Models/ListShardsResponse.php
+++ b/Aliyun/Log/Models/Response/ListShardsResponse.php
@@ -1,43 +1,42 @@
-$value){
- var_dump($value);
- $this->shardIds[] = $value['shardID'];
- $this->shards[] = new Aliyun_Log_Models_Shard($value['shardID'],$value["status"],$value["inclusiveBeginKey"],$value["exclusiveEndKey"],$value["createTime"]);
- }
- }
-
- public function getShardIds(){
- return $this->shardIds;
- }
- public function getShards()
- {
- return $this -> shards;
- }
-
-}
+$value){
+ $this->shardIds[] = $value['shardID'];
+ $this->shards[] = new Aliyun_Log_Models_Shard($value['shardID'],$value["status"],$value["inclusiveBeginKey"],$value["exclusiveEndKey"],$value["createTime"]);
+ }
+ }
+
+ public function getShardIds(){
+ return $this-> shardIds;
+ }
+ public function getShards()
+ {
+ return $this -> shards;
+ }
+
+}
diff --git a/Aliyun/Log/Models/Response/ListShipperResponse.php b/Aliyun/Log/Models/Response/ListShipperResponse.php
new file mode 100644
index 0000000..d147161
--- /dev/null
+++ b/Aliyun/Log/Models/Response/ListShipperResponse.php
@@ -0,0 +1,78 @@
+count;
+ }
+
+ /**
+ * @param mixed $count
+ */
+ public function setCount($count)
+ {
+ $this->count = $count;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getTotal()
+ {
+ return $this->total;
+ }
+
+ /**
+ * @param mixed $total
+ */
+ public function setTotal($total)
+ {
+ $this->total = $total;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getShippers()
+ {
+ return $this->shippers;
+ }
+
+ /**
+ * @param mixed $shippers
+ */
+ public function setShippers($shippers)
+ {
+ $this->shippers = $shippers;
+ }
+
+
+ /**
+ * Aliyun_Log_Models_ListShipperResponse constructor
+ *
+ * @param array $resp
+ * GetLogs HTTP response body
+ * @param array $header
+ * GetLogs HTTP response header
+ */
+ public function __construct($resp, $header) {
+ parent::__construct ( $header );
+ $this->count = $resp['count'];
+ $this->total = $resp['total'];
+ $this->shippers = $resp['shipper'];
+ }
+}
\ No newline at end of file
diff --git a/Aliyun/Log/Models/ListTopicsResponse.php b/Aliyun/Log/Models/Response/ListTopicsResponse.php
similarity index 96%
rename from Aliyun/Log/Models/ListTopicsResponse.php
rename to Aliyun/Log/Models/Response/ListTopicsResponse.php
index d28132a..a41a9ed 100644
--- a/Aliyun/Log/Models/ListTopicsResponse.php
+++ b/Aliyun/Log/Models/Response/ListTopicsResponse.php
@@ -1,73 +1,73 @@
-count = $header['x-log-count'];
- $this->topics = $resp ;
- $this->nextToken = isset ( $header['x-log-nexttoken'] ) ? $header['x-log-nexttoken'] : NULL;
- }
-
- /**
- * Get the number of all the topics from the response
- *
- * @return integer the number of all the topics from the response
- */
- public function getCount() {
- return $this->count;
- }
-
- /**
- * Get all the topics from the response
- *
- * @return array topics list
- */
- public function getTopics() {
- return $this->topics;
- }
-
- /**
- * Return the next token from the response. If there is no more topic to list, it will return None
- *
- * @return string/null next token used to list more topics
- */
- public function getNextToken() {
- return $this->nextToken;
- }
-}
+count = $header['x-log-count'];
+ $this->topics = $resp ;
+ $this->nextToken = isset ( $header['x-log-nexttoken'] ) ? $header['x-log-nexttoken'] : NULL;
+ }
+
+ /**
+ * Get the number of all the topics from the response
+ *
+ * @return integer the number of all the topics from the response
+ */
+ public function getCount() {
+ return $this->count;
+ }
+
+ /**
+ * Get all the topics from the response
+ *
+ * @return array topics list
+ */
+ public function getTopics() {
+ return $this->topics;
+ }
+
+ /**
+ * Return the next token from the response. If there is no more topic to list, it will return None
+ *
+ * @return string/null next token used to list more topics
+ */
+ public function getNextToken() {
+ return $this->nextToken;
+ }
+}
diff --git a/Aliyun/Log/Models/PutLogsResponse.php b/Aliyun/Log/Models/Response/PutLogsResponse.php
similarity index 95%
rename from Aliyun/Log/Models/PutLogsResponse.php
rename to Aliyun/Log/Models/Response/PutLogsResponse.php
index f17a797..c68191f 100644
--- a/Aliyun/Log/Models/PutLogsResponse.php
+++ b/Aliyun/Log/Models/Response/PutLogsResponse.php
@@ -1,24 +1,24 @@
-time = $time;
- $this->source = $source;
- $this->contents = $contents; // deep copy
- }
-
- /**
- * Get log source
- *
- * @return string log source
- */
- public function getSource() {
- return $this->source;
- }
-
- /**
- * Get log time
- *
- * @return integer log time
- */
- public function getTime() {
- return $this->time;
- }
-
- /**
- * Get log contents, content many key/value pair.
- *
- * @return array log contents
- */
- public function getContents() {
- return $this->contents;
- }
-}
+time = $time;
+ $this->source = $source;
+ $this->contents = $contents; // deep copy
+ }
+
+ /**
+ * Get log source
+ *
+ * @return string log source
+ */
+ public function getSource() {
+ return $this->source;
+ }
+
+ /**
+ * Get log time
+ *
+ * @return integer log time
+ */
+ public function getTime() {
+ return $this->time;
+ }
+
+ /**
+ * Get log contents, content many key/value pair.
+ *
+ * @return array log contents
+ */
+ public function getContents() {
+ return $this->contents;
+ }
+}
diff --git a/Aliyun/Log/Models/RemoveConfigFromMachineGroupResponse.php b/Aliyun/Log/Models/Response/RemoveConfigFromMachineGroupResponse.php
similarity index 95%
rename from Aliyun/Log/Models/RemoveConfigFromMachineGroupResponse.php
rename to Aliyun/Log/Models/Response/RemoveConfigFromMachineGroupResponse.php
index c776d19..a4737f6 100644
--- a/Aliyun/Log/Models/RemoveConfigFromMachineGroupResponse.php
+++ b/Aliyun/Log/Models/Response/RemoveConfigFromMachineGroupResponse.php
@@ -1,28 +1,28 @@
-headers = $headers;
- }
-
- /**
- * Get all http headers
- *
- * @return array HTTP response header
- */
- public function getAllHeaders() {
- return $this->headers;
- }
-
- /**
- * Get specified http header
- *
- * @param string $key
- * key to get header
- *
- * @return string HTTP response header. '' will be return if not set.
- */
- public function getHeader($key) {
- return isset ($this->headers[$key]) ? $this->headers [$key] : '';
- }
-
- /**
- * Get the request id of the response. '' will be return if not set.
- *
- * @return string request id
- */
- public function getRequestId() {
- return isset ( $this->headers ['x-log-requestid'] ) ? $this->headers ['x-log-requestid'] : '';
- }
-}
+headers = $headers;
+ }
+
+ /**
+ * Get all http headers
+ *
+ * @return array HTTP response header
+ */
+ public function getAllHeaders() {
+ return $this->headers;
+ }
+
+ /**
+ * Get specified http header
+ *
+ * @param string $key
+ * key to get header
+ *
+ * @return string HTTP response header. '' will be return if not set.
+ */
+ public function getHeader($key) {
+ return isset ($this->headers[$key]) ? $this->headers [$key] : '';
+ }
+
+ /**
+ * Get the request id of the response. '' will be return if not set.
+ *
+ * @return string request id
+ */
+ public function getRequestId() {
+ return isset ( $this->headers ['x-log-requestid'] ) ? $this->headers ['x-log-requestid'] : '';
+ }
+}
diff --git a/Aliyun/Log/Models/Response/RetryShipperTasksResponse.php b/Aliyun/Log/Models/Response/RetryShipperTasksResponse.php
new file mode 100644
index 0000000..a666b1a
--- /dev/null
+++ b/Aliyun/Log/Models/Response/RetryShipperTasksResponse.php
@@ -0,0 +1,22 @@
+maxCacheLog = 100;
+ }else{
+ $this->maxCacheLog = $maxCacheLog;
+ }
+
+ if(NULL === $maxCacheBytes || !is_integer($maxCacheBytes)){
+ $this->maxCacheBytes = 256 * 1024;
+ }else{
+ $this->maxCacheBytes = $maxCacheBytes;
+ }
+
+ if(NULL === $maxWaitTime || !is_integer($maxWaitTime)){
+ $this->maxWaitTime = 5;
+ }else{
+ $this->maxWaitTime = $maxWaitTime;
+ }
+ if($client == null || $project == null || $logstore == null){
+ throw new Exception('the input parameter is invalid! create SimpleLogger failed!');
+ }
+ $this->client = $client;
+ $this->project = $project;
+ $this->logstore = $logstore;
+ $this->topic = $topic;
+ $this->previousLogTime = time();
+ $this->cacheBytes = 0;
+ }
+
+ /**
+ * add logItem to cached array, and post the cached messages when cache reach the limitation
+ * @param $cur_time
+ * @param $logItem
+ */
+ private function logItem($cur_time, $logItem){
+ array_push($this->logItems, $logItem);
+ if ($cur_time - $this->previousLogTime >= $this->maxWaitTime || sizeof($this->logItems) >= $this->maxCacheLog
+ || $this->cacheBytes >= $this->maxCacheBytes)
+ {
+ $this->logBatch($this->logItems, $this->topic);
+ $this->logItems = [];
+ $this->previousLogTime = time();
+ $this->cacheBytes = 0;
+ }
+ }
+
+ /**
+ * log single string message
+ * @param Aliyun_Log_Models_LogLevel_LogLevel $logLevel
+ * @param $logMessage
+ * @throws Exception
+ */
+ private function logSingleMessage(Aliyun_Log_Models_LogLevel_LogLevel $logLevel, $logMessage){
+ if(is_array($logMessage)){
+ throw new Exception('array is not supported in this function, please use logArrayMessage!');
+ }
+ $cur_time = time();
+ $contents = array( // key-value pair
+ 'time'=>date('m/d/Y h:i:s a', $cur_time),
+ 'loglevel'=> Aliyun_Log_Models_LogLevel_LogLevel::getLevelStr($logLevel),
+ 'msg'=>$logMessage
+ );
+ $this->cacheBytes += strlen($logMessage) + 32;
+ $logItem = new Aliyun_Log_Models_LogItem();
+ $logItem->setTime($cur_time);
+ $logItem->setContents($contents);
+ $this->logItem($cur_time, $logItem);
+ }
+
+ /**
+ * log array message
+ * @param Aliyun_Log_Models_LogLevel_LogLevel $logLevel
+ * @param $logMessage
+ * @throws Exception
+ */
+ private function logArrayMessage(Aliyun_Log_Models_LogLevel_LogLevel $logLevel, $logMessage){
+ if(!is_array($logMessage)){
+ throw new Exception('input message is not array, please use logSingleMessage!');
+ }
+ $cur_time = time();
+ $contents = array( // key-value pair
+ 'time'=>date('m/d/Y h:i:s a', $cur_time)
+ );
+ $contents['logLevel'] = Aliyun_Log_Models_LogLevel_LogLevel::getLevelStr($logLevel);
+ foreach ($logMessage as $key => $value)
+ {
+ $contents[$key] = $value;
+ $this->cacheBytes += strlen($key) + strlen($value);
+ }
+ $this->cacheBytes += 32;
+ $logItem = new Aliyun_Log_Models_LogItem();
+ $logItem->setTime($cur_time);
+ $logItem->setContents($contents);
+ $this->logItem($cur_time, $logItem);
+ }
+
+ /**
+ * submit string log message with info level
+ * @param $logMessage
+ */
+ public function info( $logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelInfo();
+ $this->logSingleMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * submit string log message with debug level
+ * @param $logMessage
+ */
+ public function debug($logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelDebug();
+ $this->logSingleMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * submit string log message with warn level
+ * @param $logMessage
+ */
+ public function warn($logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelWarn();
+ $this->logSingleMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * submit string log message with error level
+ * @param $logMessage
+ */
+ public function error($logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelError();
+ $this->logSingleMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * submit array log message with info level
+ * @param $logMessage
+ */
+ public function infoArray($logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelInfo();
+ $this->logArrayMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * submit array log message with debug level
+ * @param $logMessage
+ */
+ public function debugArray($logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelDebug();
+ $this->logArrayMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * submit array log message with warn level
+ * @param $logMessage
+ */
+ public function warnArray($logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelWarn();
+ $this->logArrayMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * submit array log message with error level
+ * @param $logMessage
+ */
+ public function errorArray( $logMessage){
+ $logLevel = Aliyun_Log_Models_LogLevel_LogLevel::getLevelError();
+ $this->logArrayMessage($logLevel, $logMessage);
+ }
+
+ /**
+ * get current machine IP
+ * @return string
+ */
+ private function getLocalIp(){
+ $local_ip = getHostByName(php_uname('n'));
+ if(strlen($local_ip) == 0){
+ $local_ip = getHostByName(getHostName());
+ }
+ return $local_ip;
+ }
+
+ /**
+ * submit log messages in bulk
+ * @param $logItems
+ * @param $topic
+ */
+ private function logBatch($logItems, $topic){
+ $ip = $this->getLocalIp();
+ $request = new Aliyun_Log_Models_PutLogsRequest($this->project, $this->logstore,
+ $topic, $ip, $logItems);
+ $error_exception = NULL;
+ for($i = 0 ; $i < 3 ; $i++)
+ {
+ try{
+ $response = $this->client->putLogs($request);
+ return;
+ } catch (Aliyun_Log_Exception $ex) {
+ $error_exception = $ex;
+ } catch (Exception $ex) {
+ var_dump($ex);
+ $error_exception = $ex;
+ }
+ }
+ if ($error_exception != NULL)
+ {
+ var_dump($error_exception);
+ }
+ }
+
+ /**
+ * manually flush all cached log to log server
+ */
+ public function logFlush(){
+ if(sizeof($this->logItems) > 0){
+ $this->logBatch($this->logItems, $this->topic);
+ $this->logItems = [];
+ $this->previousLogTime= time();
+ $this->cacheBytes = 0;
+ }
+ }
+
+ function __destruct() {
+ if(sizeof($this->logItems) > 0){
+ $this->logBatch($this->logItems, $this->topic);
+ }
+ }
+}
diff --git a/Aliyun/Log/protocolbuffers.inc.php b/Aliyun/Log/protocolbuffers.inc.php
index ec4f326..9e363d7 100644
--- a/Aliyun/Log/protocolbuffers.inc.php
+++ b/Aliyun/Log/protocolbuffers.inc.php
@@ -147,14 +147,14 @@ public static function read_varint($fp, &$limit = null) {
return $i;
}
- public static function read_double($fp){throw "I've not coded it yet Exception";}
- public static function read_float ($fp){throw "I've not coded it yet Exception";}
- public static function read_uint64($fp){throw "I've not coded it yet Exception";}
- public static function read_int64 ($fp){throw "I've not coded it yet Exception";}
- public static function read_uint32($fp){throw "I've not coded it yet Exception";}
- public static function read_int32 ($fp){throw "I've not coded it yet Exception";}
- public static function read_zint32($fp){throw "I've not coded it yet Exception";}
- public static function read_zint64($fp){throw "I've not coded it yet Exception";}
+ public static function read_double($fp){throw new Exception("I've not coded it yet Exception");}
+ public static function read_float ($fp){throw new Exception("I've not coded it yet Exception");}
+ public static function read_uint64($fp){throw new Exception("I've not coded it yet Exception");}
+ public static function read_int64 ($fp){throw new Exception("I've not coded it yet Exception");}
+ public static function read_uint32($fp){throw new Exception("I've not coded it yet Exception");}
+ public static function read_int32 ($fp){throw new Exception("I've not coded it yet Exception");}
+ public static function read_zint32($fp){throw new Exception("I've not coded it yet Exception");}
+ public static function read_zint64($fp){throw new Exception("I've not coded it yet Exception");}
/**
* Writes a varint to $fp
@@ -181,14 +181,14 @@ public static function write_varint($fp, $i) {
return $len;
}
- public static function write_double($fp, $d){throw "I've not coded it yet Exception";}
- public static function write_float ($fp, $f){throw "I've not coded it yet Exception";}
- public static function write_uint64($fp, $i){throw "I've not coded it yet Exception";}
- public static function write_int64 ($fp, $i){throw "I've not coded it yet Exception";}
- public static function write_uint32($fp, $i){throw "I've not coded it yet Exception";}
- public static function write_int32 ($fp, $i){throw "I've not coded it yet Exception";}
- public static function write_zint32($fp, $i){throw "I've not coded it yet Exception";}
- public static function write_zint64($fp, $i){throw "I've not coded it yet Exception";}
+ public static function write_double($fp, $d){throw new Exception("I've not coded it yet Exception");}
+ public static function write_float ($fp, $f){throw new Exception("I've not coded it yet Exception");}
+ public static function write_uint64($fp, $i){throw new Exception("I've not coded it yet Exception");}
+ public static function write_int64 ($fp, $i){throw new Exception("I've not coded it yet Exception");}
+ public static function write_uint32($fp, $i){throw new Exception("I've not coded it yet Exception");}
+ public static function write_int32 ($fp, $i){throw new Exception("I've not coded it yet Exception");}
+ public static function write_zint32($fp, $i){throw new Exception("I've not coded it yet Exception");}
+ public static function write_zint64($fp, $i){throw new Exception("I've not coded it yet Exception");}
/**
* Seek past a varint
diff --git a/Log_Autoload.php b/Log_Autoload.php
index 75ffc47..940319d 100644
--- a/Log_Autoload.php
+++ b/Log_Autoload.php
@@ -9,8 +9,20 @@
function Aliyun_Log_PHP_Client_Autoload($className) {
$classPath = explode('_', $className);
if ($classPath[0] == 'Aliyun') {
- if(count($classPath)>4)
- $classPath = array_slice($classPath, 0, 4);
+ if(count($classPath)>5)
+ $classPath = array_slice($classPath, 0, 5);
+ if(strpos($className, 'Request') !== false){
+ $lastPath = end($classPath);
+ array_pop($classPath);
+ array_push($classPath,'Request');
+ array_push($classPath, $lastPath);
+ }
+ if(strpos($className, 'Response') !== false){
+ $lastPath = end($classPath);
+ array_pop($classPath);
+ array_push($classPath,'Response');
+ array_push($classPath, $lastPath);
+ }
$filePath = dirname(__FILE__) . '/' . implode('/', $classPath) . '.php';
if (file_exists($filePath))
require_once($filePath);
diff --git a/sample/loggerSample.php b/sample/loggerSample.php
new file mode 100644
index 0000000..cc1bd56
--- /dev/null
+++ b/sample/loggerSample.php
@@ -0,0 +1,302 @@
+ listShards($request);
+ print("
");
+ foreach ($response ->getShardIds() as $shardId){
+ print($shardId."
");
+ }
+
+ } catch (Exception $ex) {
+ print("exception code: ".$ex -> getErrorCode());
+ }
+}
+
+/**
+ * sumit log by client directly
+ * @param Aliyun_Log_Client $client
+ * @param $project
+ * @param $logstore
+ */
+function putLogs(Aliyun_Log_Client $client, $project, $logstore) {
+ $topic = 'TestTopic';
+
+ $contents = array( // key-value pair
+ 'TestKey'=>'TestContent',
+ 'message'=>'test log from '.' at '.date('m/d/Y h:i:s a', time())
+ );
+ $logItem = new Aliyun_Log_Models_LogItem();
+ $logItem->setTime(time());
+ $logItem->setContents($contents);
+ $logitems = array($logItem);
+ $request = new Aliyun_Log_Models_PutLogsRequest($project, $logstore,
+ $topic, "", $logitems);
+
+ try {
+ $response = $client->putLogs($request);
+ print($response ->getRequestId());
+ } catch (Aliyun_Log_Exception $ex) {
+ logVarDump($ex);
+ } catch (Exception $ex) {
+ logVarDump($ex);
+ }
+}
+
+/**
+ * query log by client directly
+ * @param Aliyun_Log_Client $client
+ * @param $project
+ * @param $logstore
+ */
+function getLogs(Aliyun_Log_Client $client, $project, $logstore) {
+ $topic = 'MainFlow';
+ $from = time()-3600;
+ $to = time();
+ $request = new Aliyun_Log_Models_GetLogsRequest($project, $logstore, $from, $to, $topic, '', 100, 0, False);
+
+ try {
+ $response = $client->getLogs($request);
+ foreach($response -> getLogs() as $log)
+ {
+ print $log -> getTime()."\t";
+ foreach($log -> getContents() as $key => $value){
+ print $key.":".$value."
";
+ }
+ print "\n";
+ }
+
+ } catch (Aliyun_Log_Exception $ex) {
+ logVarDump($ex);
+ } catch (Exception $ex) {
+ logVarDump($ex);
+ }
+}
+
+// please update the configuration according your profile
+$endpoint = '';
+$accessKeyId = '';
+$accessKey = '';
+$project = '';
+$logstore = 'test';
+$token = "";
+
+
+ // create a log client
+$client = new Aliyun_Log_Client($endpoint, $accessKeyId, $accessKey,$token);
+listShard($client,$project,$logstore);
+
+// create a logger instance by calling factory method
+$logger = Aliyun_Log_LoggerFactory::getLogger($client, $project, $logstore);
+$logMap = array(
+ 'message' => 'tet',
+ 'haha' => 'hehe'
+);
+
+// submit single string message by logger
+$logger->logSingleMessage(Aliyun_Log_Models_LogLevel_LogLevel::getLevelInfo(),'test INFO LOG');
+
+//create same logger instance by calling factory method with same parameters
+$logger2 = Aliyun_Log_LoggerFactory::getLogger($client, $project, $logstore);
+
+
+$logger2->logSingleMessage(Aliyun_Log_Models_LogLevel_LogLevel::getLevelInfo(),'test INFO LOG2222222', 'MainFlow');
+
+// submit single array message by logger
+$logger->logArrayMessage(Aliyun_Log_Models_LogLevel_LogLevel::getLevelInfo(),$logMap, 'MainFlow');
+
+//$logger->log('test', 'something wrong with the inner info', 'MainFlow');
+
+//create different logger instance by calling factory method with topic parameter defined
+$batchLogger = Aliyun_Log_LoggerFactory::getLogger($client, $project, $logstore,'helloworld');
+
+// batch submit single string message, with default cache size 100
+for($i = 1; $i <= 129; $i++){
+ $batchLogger->logSingleMessage(Aliyun_Log_Models_LogLevel_LogLevel::getLevelInfo(),'something wrong with the inner info '.$i);
+}
+
+// manually flush log message
+$batchLogger->logFlush();
+
+
+getLogs($client,$project,$logstore);
+
+$logger2->info('test log message 000 info');
+$logger2->warn('test log message 000 warn');
+$logger2->error('test log message 000 error');
+$logger2->debug('test log message 000 debug');
+
+$logMap['level'] = 'info';
+$logger2->infoArray($logMap);
+$logMap['level'] = 'debug';
+$logger2->debugArray($logMap);
+$logMap['level'] = 'warn';
+$logger2->warnArray($logMap);
+$logMap['level'] = 'error';
+$logger2->errorArray($logMap);
+
+$logger2->logFlush();
+
+//try delete the existing shipper
+$deleteShipper = new Aliyun_Log_Models_DeleteShipperRequest($project);
+$deleteShipper->setShipperName('testjsonshipper');
+$deleteShipper->setLogStore($logstore);
+try{
+ $client->deleteShipper($deleteShipper);
+}catch (Exception $ex){}
+
+//create shipper with csv storage
+$shipper = new Aliyun_Log_Models_CreateShipperRequest($project);
+$shipper->setShipperName('testshipper');
+$shipper->setTargetType('oss');
+$shipper->setLogStore($logstore);
+
+$ossCsvStorage = new Aliyun_Log_Models_OssShipperCsvStorage();
+$ossCsvStorage->setColumns(array('__topic__',
+ 'alarm_count',
+ 'alarm_message',
+ 'alarm_type',
+ 'category',
+ 'project_name'));
+$ossCsvStorage->setDelimiter(',');
+$ossCsvStorage->setQuote('"');
+$ossCsvStorage->setHeader(false);
+$ossCsvStorage->setNullIdentifier('');
+$ossCsvStorage->setFormat('csv');
+
+// create a json shipper
+$ossJsonStorage = new Aliyun_Log_Models_OssShipperJsonStorage();
+$ossJsonStorage->setFormat('json');
+
+$ossConfig = new Aliyun_Log_Models_OssShipperConfig();
+$ossConfig->setOssBucket('');// please change it according your own profile
+$ossConfig->setOssPrefix('');// please change it according your own profile
+$ossConfig->setBufferInterval(300);
+$ossConfig->setBufferSize(5);
+$ossConfig->setCompressType('none');
+$ossConfig->setRoleArn('');// please change it according your own profile
+$ossConfig->setStorage($ossCsvStorage);
+$ossConfig->setPathFormat('%Y/%m/%d/%H');
+
+$shipper->setTargetConfigration($ossConfig->to_json_object());
+try{
+ $client->createShipper($shipper);
+}catch (Exception $exception){
+ var_dump($exception);
+}
+
+$getShipperConfig = new Aliyun_Log_Models_GetShipperConfigRequest($project);
+$getShipperConfig->setShipperName($shipper->getShipperName());
+$getShipperConfig->setLogStore($shipper->getLogStore());
+$getconfigResp = $client->getShipperConfig($getShipperConfig);
+var_dump($getconfigResp);
+
+$listShipper = new Aliyun_Log_Models_ListShipperRequest($project);
+$listShipper->setLogStore($shipper->getLogStore());
+$listShpperResp = $client->listShipper($listShipper);
+var_dump($listShpperResp);
+
+$updateShipper = new Aliyun_Log_Models_UpdateShipperRequest($project);
+$updateShipper->setShipperName('testshipper');
+$updateShipper->setTargetType('oss');
+$updateShipper->setLogStore($logstore);
+$ossConfig->setBufferInterval(599);
+$updateShipper->setTargetConfigration($ossConfig->to_json_object());
+
+$updateShipperResp = $client->updateShipper($updateShipper);
+
+$deleteShipper = new Aliyun_Log_Models_DeleteShipperRequest($project);
+$deleteShipper->setShipperName($shipper->getShipperName());
+$deleteShipper->setLogStore($shipper->getLogStore());
+
+$client->deleteShipper($deleteShipper);
+
+//create shipper with json storage
+$shipper->setShipperName('testjsonshipper');
+$ossConfig->setStorage($ossJsonStorage);
+$shipper->setTargetConfigration($ossConfig->to_json_object());
+try{
+ $client->createShipper($shipper);
+}catch (Exception $exception){
+ var_dump($exception);
+}
+
+//create shipper with parquet storage
+$shipper->setShipperName('testparquetshipper');
+$ossParquetStorage = new Aliyun_Log_Models_OssShipperParquetStorage();
+$ossParquetStorage->setFormat('parquet');
+$ossParquetStorage->setColumns(array(
+ array(
+ 'name' => '__topic__',
+ 'type' => 'string'
+ ),
+ array(
+ 'name' => 'alarm_count',
+ 'type' => 'int32'
+ ),
+ array(
+ 'name' => 'alarm_message',
+ 'type' => 'string'
+ ),
+ array(
+ 'name' => 'alarm_type',
+ 'type' => 'string'
+ ),
+ array(
+ 'name' => 'is_active',
+ 'type' => 'boolean'
+ ),
+ array(
+ 'name' => 'project_name',
+ 'type' => 'string'
+ ),
+));
+$ossConfig->setStorage($ossParquetStorage);
+$shipper->setTargetConfigration($ossConfig->to_json_object());
+
+try{
+
+ $client->createShipper($shipper);
+}catch (Exception $exception){
+ var_dump($exception);
+}
+
+$getShipperTasks = new Aliyun_Log_Models_GetShipperTasksRequest($project);
+$getShipperTasks->setShipperName('testjsonshipper');
+$getShipperTasks->setLogStore($logstore);
+$getShipperTasks->setStartTime(time()-10000);
+$getShipperTasks->setEndTime(time());
+$getShipperTasks->setStatusType('');//means all status
+$getShipperTasks->setOffset(0);
+$getShipperTasks->setSize(5);
+
+$tasks = $client->getShipperTasks($getShipperTasks);
+var_dump(json_encode($tasks->getStatistics()));
+var_dump(json_encode($tasks->getTasks()));
+
+$taskIdList = array();
+for($i=0, $size=count($tasks->getTasks());$i<$size;++$i){
+ $taskId = $tasks->getTasks()[$i]['id'];
+ array_push($taskIdList, $taskId);
+}
+
+$retryShipperTask = new Aliyun_Log_Models_RetryShipperTasksRequest($project);
+$retryShipperTask->setShipperName('testjsonshipper');
+$retryShipperTask->setLogStore($logstore);
+$retryShipperTask->setTaskLists($taskIdList);
+$client->retryShipperTasks($retryShipperTask);
+
diff --git a/sample/sample.php b/sample/sample.php
index 1789e48..469931d 100644
--- a/sample/sample.php
+++ b/sample/sample.php
@@ -21,11 +21,11 @@ function putLogs(Aliyun_Log_Client $client, $project, $logstore) {
try {
$response = $client->putLogs($request);
- var_dump($response);
+ logVarDump($response);
} catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
@@ -33,11 +33,11 @@ function listLogstores(Aliyun_Log_Client $client, $project) {
try{
$request = new Aliyun_Log_Models_ListLogstoresRequest($project);
$response = $client->listLogstores($request);
- var_dump($response);
+ logVarDump($response);
} catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
@@ -47,11 +47,11 @@ function listTopics(Aliyun_Log_Client $client, $project, $logstore) {
try {
$response = $client->listTopics($request);
- var_dump($response);
+ logVarDump($response);
} catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
@@ -73,9 +73,9 @@ function getLogs(Aliyun_Log_Client $client, $project, $logstore) {
}
} catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
@@ -87,11 +87,11 @@ function getHistograms(Aliyun_Log_Client $client, $project, $logstore) {
try {
$response = $client->getHistograms($request);
- var_dump($response);
+ logVarDump($response);
} catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
function listShard(Aliyun_Log_Client $client,$project,$logstore){
@@ -99,13 +99,14 @@ function listShard(Aliyun_Log_Client $client,$project,$logstore){
try
{
$response = $client -> listShards($request);
- var_dump($response);
+ logVarDump($response);
} catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
+
function batchGetLogs(Aliyun_Log_Client $client,$project,$logstore)
{
$listShardRequest = new Aliyun_Log_Models_ListShardsRequest($project,$logstore);
@@ -119,7 +120,7 @@ function batchGetLogs(Aliyun_Log_Client $client,$project,$logstore)
while(true)
{
$batchGetDataRequest = new Aliyun_Log_Models_BatchGetLogsRequest($project,$logstore,$shardId,$count,$cursor);
- var_dump($batchGetDataRequest);
+ logVarDump($batchGetDataRequest);
$response = $client -> batchGetLogs($batchGetDataRequest);
if($cursor == $response -> getNextCursor())
{
@@ -149,11 +150,11 @@ function deleteShard(Aliyun_Log_Client $client,$project,$logstore,$shardId)
try
{
$response = $client -> deleteShard($request);
- var_dump($response);
+ logVarDump($response);
}catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
function mergeShard(Aliyun_Log_Client $client,$project,$logstore,$shardId)
@@ -162,11 +163,11 @@ function mergeShard(Aliyun_Log_Client $client,$project,$logstore,$shardId)
try
{
$response = $client -> mergeShards($request);
- var_dump($response);
+ logVarDump($response);
}catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
function splitShard(Aliyun_Log_Client $client,$project,$logstore,$shardId,$midHash)
@@ -175,25 +176,36 @@ function splitShard(Aliyun_Log_Client $client,$project,$logstore,$shardId,$midHa
try
{
$response = $client -> splitShard($request);
- var_dump($response);
+ logVarDump($response);
}catch (Aliyun_Log_Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
} catch (Exception $ex) {
- var_dump($ex);
+ logVarDump($ex);
}
}
-$endpoint = 'loginfo begin = ".get_class($expression)."
";
+ var_dump($expression);
+ print "
loginfo end
";
+}
+
+/*
+ * please refer to aliyun sdk document for detail:
+ * http://help.aliyun-inc.com/internaldoc/detail/29074.html?spm=0.0.0.0.tqUNn5
+ */
+$endpoint = 'http://cn-shanghai-corp.sls.aliyuncs.com';
+$accessKeyId = '';
+$accessKey = '';
+$project = '';
+$logstore = '';
$token = "";
$client = new Aliyun_Log_Client($endpoint, $accessKeyId, $accessKey,$token);
listShard($client,$project,$logstore);
-mergeShard($client,$project,$logstore,82);
-deleteShard($client,$project,$logstore,21);
-splitShard($client,$project,$logstore,84,"0e000000000000000000000000000000");
+mergeShard($client,$project,$logstore,2);
+deleteShard($client,$project,$logstore,2);
+splitShard($client,$project,$logstore,2,"80000000000000000000000000000001");
putLogs($client, $project, $logstore);
listShard($client,$project,$logstore);
batchGetLogs($client,$project,$logstore);