|
| 1 | +<?php |
| 2 | + |
| 3 | +// This file is auto-generated, don't edit it. Thanks. |
| 4 | + |
| 5 | +namespace AlibabaCloud\SDK\Cloudauthintl\V20220809\Models; |
| 6 | + |
| 7 | +use AlibabaCloud\Dara\Model; |
| 8 | + |
| 9 | +class KeepaliveIntlResponse extends Model |
| 10 | +{ |
| 11 | + /** |
| 12 | + * @var string[] |
| 13 | + */ |
| 14 | + public $headers; |
| 15 | + |
| 16 | + /** |
| 17 | + * @var int |
| 18 | + */ |
| 19 | + public $statusCode; |
| 20 | + |
| 21 | + /** |
| 22 | + * @var KeepaliveIntlResponseBody |
| 23 | + */ |
| 24 | + public $body; |
| 25 | + protected $_name = [ |
| 26 | + 'headers' => 'headers', |
| 27 | + 'statusCode' => 'statusCode', |
| 28 | + 'body' => 'body', |
| 29 | + ]; |
| 30 | + |
| 31 | + public function validate() |
| 32 | + { |
| 33 | + if (\is_array($this->headers)) { |
| 34 | + Model::validateArray($this->headers); |
| 35 | + } |
| 36 | + if (null !== $this->body) { |
| 37 | + $this->body->validate(); |
| 38 | + } |
| 39 | + parent::validate(); |
| 40 | + } |
| 41 | + |
| 42 | + public function toArray($noStream = false) |
| 43 | + { |
| 44 | + $res = []; |
| 45 | + if (null !== $this->headers) { |
| 46 | + if (\is_array($this->headers)) { |
| 47 | + $res['headers'] = []; |
| 48 | + foreach ($this->headers as $key1 => $value1) { |
| 49 | + $res['headers'][$key1] = $value1; |
| 50 | + } |
| 51 | + } |
| 52 | + } |
| 53 | + |
| 54 | + if (null !== $this->statusCode) { |
| 55 | + $res['statusCode'] = $this->statusCode; |
| 56 | + } |
| 57 | + |
| 58 | + if (null !== $this->body) { |
| 59 | + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; |
| 60 | + } |
| 61 | + |
| 62 | + return $res; |
| 63 | + } |
| 64 | + |
| 65 | + public function toMap($noStream = false) |
| 66 | + { |
| 67 | + return $this->toArray($noStream); |
| 68 | + } |
| 69 | + |
| 70 | + public static function fromMap($map = []) |
| 71 | + { |
| 72 | + $model = new self(); |
| 73 | + if (isset($map['headers'])) { |
| 74 | + if (!empty($map['headers'])) { |
| 75 | + $model->headers = []; |
| 76 | + foreach ($map['headers'] as $key1 => $value1) { |
| 77 | + $model->headers[$key1] = $value1; |
| 78 | + } |
| 79 | + } |
| 80 | + } |
| 81 | + |
| 82 | + if (isset($map['statusCode'])) { |
| 83 | + $model->statusCode = $map['statusCode']; |
| 84 | + } |
| 85 | + |
| 86 | + if (isset($map['body'])) { |
| 87 | + $model->body = KeepaliveIntlResponseBody::fromMap($map['body']); |
| 88 | + } |
| 89 | + |
| 90 | + return $model; |
| 91 | + } |
| 92 | +} |
0 commit comments