Ejemplo n.º 1
0
 /**
  * Aliyun_Log_Models_ListTopicsResponse constructor
  *
  * @param array $resp
  *            ListTopics HTTP response body
  * @param array $header
  *            ListTopics HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->count = $header['x-log-count'];
     $this->topics = $resp;
     $this->nextToken = isset($header['x-log-nexttoken']) ? $header['x-log-nexttoken'] : NULL;
 }
Ejemplo n.º 2
0
 /**
  * Aliyun_Log_Models_GetMachineResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     //echo json_encode($resp);
     $this->machine = new Aliyun_Log_Models_Machine();
     $this->machine->setFromArray($resp);
 }
Ejemplo n.º 3
0
 /**
  * Aliyun_Log_Models_ListShardsResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     foreach ($resp as $key => $value) {
         $this->shardIds[] = $value['shardID'];
     }
 }
Ejemplo n.º 4
0
 /**
  * Aliyun_Log_Models_ListMachineGroupsResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->offset = $resp['offset'];
     $this->size = $resp['size'];
     $this->machineGroups = $resp['machinegroups'];
 }
Ejemplo n.º 5
0
 /**
  * Aliyun_Log_Models_GetACLResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->acl = null;
     if ($resp !== null) {
         $this->acl = new Aliyun_Log_Models_ACL();
         $this->acl->setFromArray($resp);
     }
 }
Ejemplo n.º 6
0
 /**
  * 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']);
     }
 }
Ejemplo n.º 7
0
 /**
  * Aliyun_Log_Models_ListACLsResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $aclArr = array();
     if (isset($resp['acls'])) {
         foreach ($resp['acls'] as $value) {
             $aclObj = new Aliyun_Log_Models_ACL();
             $aclObj->setFromArray($value);
             $aclArr[] = $aclObj;
         }
     }
     $this->acls = $aclArr;
 }
Ejemplo n.º 8
0
 /**
  * Aliyun_Log_Models_GetLogsResponse 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 = $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);
     }
 }
Ejemplo n.º 9
0
 /**
  * Aliyun_Log_Models_PutLogsResponse constructor
  *
  * @param array $header
  *            PutLogs HTTP response header
  */
 public function __construct($headers)
 {
     parent::__construct($headers);
 }
Ejemplo n.º 10
0
 /**
  * Aliyun_Log_Models_ListLogstoresResponse constructor
  *
  * @param array $resp
  *            ListLogstores HTTP response body
  * @param array $header
  *            ListLogstores HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->count = $resp['total'];
     $this->logstores = $resp['logstores'];
 }
Ejemplo n.º 11
0
 /**
  * Aliyun_Log_Models_GetCursorResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->cursor = $resp['cursor'];
 }
Ejemplo n.º 12
0
 /**
  * Aliyun_Log_Models_DeleteLogstoreResponse constructor
  *
  * @param array $resp
  *            DeleteLogstore HTTP response body
  * @param array $header
  *            DeleteLogstore HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
 }
Ejemplo n.º 13
0
 /**
  * Aliyun_Log_Models_Response constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->aclId = $resp['aclId'];
 }
Ejemplo n.º 14
0
 /**
  * Aliyun_Log_Models_BatchGetLogsResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->logPackageList = $resp->getLogGroupListArray();
     $this->nextCursor = isset($header['x-log-cursor']) ? $header['x-log-cursor'] : null;
 }
Ejemplo n.º 15
0
 /**
  * Aliyun_Log_Models_GetConfigResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->config = new Aliyun_Log_Models_Config();
     $this->config->setFromArray($resp);
 }
Ejemplo n.º 16
0
 /**
  * Aliyun_Log_Models_GetMachineGroupResponse constructor
  *
  * @param array $resp
  *            GetLogs HTTP response body
  * @param array $header
  *            GetLogs HTTP response header
  */
 public function __construct($resp, $header)
 {
     parent::__construct($header);
     $this->machineGroup = new Aliyun_Log_Models_MachineGroup();
     $this->machineGroup->setFromArray($resp);
 }