RuntimeOptions.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <?php
  2. // This file is auto-generated, don't edit it. Thanks.
  3. namespace AlibabaCloud\Tea\Utils\Utils;
  4. use AlibabaCloud\Tea\Model;
  5. /**
  6. * The common runtime options model
  7. */
  8. class RuntimeOptions extends Model {
  9. protected $_name = [
  10. 'autoretry' => 'autoretry',
  11. 'ignoreSSL' => 'ignoreSSL',
  12. 'key' => 'key',
  13. 'cert' => 'cert',
  14. 'ca' => 'ca',
  15. 'maxAttempts' => 'max_attempts',
  16. 'backoffPolicy' => 'backoff_policy',
  17. 'backoffPeriod' => 'backoff_period',
  18. 'readTimeout' => 'readTimeout',
  19. 'connectTimeout' => 'connectTimeout',
  20. 'httpProxy' => 'httpProxy',
  21. 'httpsProxy' => 'httpsProxy',
  22. 'noProxy' => 'noProxy',
  23. 'maxIdleConns' => 'maxIdleConns',
  24. 'localAddr' => 'localAddr',
  25. 'socks5Proxy' => 'socks5Proxy',
  26. 'socks5NetWork' => 'socks5NetWork',
  27. 'keepAlive' => 'keepAlive',
  28. ];
  29. public function validate() {}
  30. public function toMap() {
  31. $res = [];
  32. if (null !== $this->autoretry) {
  33. $res['autoretry'] = $this->autoretry;
  34. }
  35. if (null !== $this->ignoreSSL) {
  36. $res['ignoreSSL'] = $this->ignoreSSL;
  37. }
  38. if (null !== $this->key) {
  39. $res['key'] = $this->key;
  40. }
  41. if (null !== $this->cert) {
  42. $res['cert'] = $this->cert;
  43. }
  44. if (null !== $this->ca) {
  45. $res['ca'] = $this->ca;
  46. }
  47. if (null !== $this->maxAttempts) {
  48. $res['max_attempts'] = $this->maxAttempts;
  49. }
  50. if (null !== $this->backoffPolicy) {
  51. $res['backoff_policy'] = $this->backoffPolicy;
  52. }
  53. if (null !== $this->backoffPeriod) {
  54. $res['backoff_period'] = $this->backoffPeriod;
  55. }
  56. if (null !== $this->readTimeout) {
  57. $res['readTimeout'] = $this->readTimeout;
  58. }
  59. if (null !== $this->connectTimeout) {
  60. $res['connectTimeout'] = $this->connectTimeout;
  61. }
  62. if (null !== $this->httpProxy) {
  63. $res['httpProxy'] = $this->httpProxy;
  64. }
  65. if (null !== $this->httpsProxy) {
  66. $res['httpsProxy'] = $this->httpsProxy;
  67. }
  68. if (null !== $this->noProxy) {
  69. $res['noProxy'] = $this->noProxy;
  70. }
  71. if (null !== $this->maxIdleConns) {
  72. $res['maxIdleConns'] = $this->maxIdleConns;
  73. }
  74. if (null !== $this->localAddr) {
  75. $res['localAddr'] = $this->localAddr;
  76. }
  77. if (null !== $this->socks5Proxy) {
  78. $res['socks5Proxy'] = $this->socks5Proxy;
  79. }
  80. if (null !== $this->socks5NetWork) {
  81. $res['socks5NetWork'] = $this->socks5NetWork;
  82. }
  83. if (null !== $this->keepAlive) {
  84. $res['keepAlive'] = $this->keepAlive;
  85. }
  86. if (null !== $this->extendsParameters) {
  87. $res['extendsParameters'] = null !== $this->extendsParameters ? $this->extendsParameters->toMap() : null;
  88. }
  89. return $res;
  90. }
  91. /**
  92. * @param array $map
  93. * @return RuntimeOptions
  94. */
  95. public static function fromMap($map = []) {
  96. $model = new self();
  97. if(isset($map['autoretry'])){
  98. $model->autoretry = $map['autoretry'];
  99. }
  100. if(isset($map['ignoreSSL'])){
  101. $model->ignoreSSL = $map['ignoreSSL'];
  102. }
  103. if(isset($map['key'])){
  104. $model->key = $map['key'];
  105. }
  106. if(isset($map['cert'])){
  107. $model->cert = $map['cert'];
  108. }
  109. if(isset($map['ca'])){
  110. $model->ca = $map['ca'];
  111. }
  112. if(isset($map['max_attempts'])){
  113. $model->maxAttempts = $map['max_attempts'];
  114. }
  115. if(isset($map['backoff_policy'])){
  116. $model->backoffPolicy = $map['backoff_policy'];
  117. }
  118. if(isset($map['backoff_period'])){
  119. $model->backoffPeriod = $map['backoff_period'];
  120. }
  121. if(isset($map['readTimeout'])){
  122. $model->readTimeout = $map['readTimeout'];
  123. }
  124. if(isset($map['connectTimeout'])){
  125. $model->connectTimeout = $map['connectTimeout'];
  126. }
  127. if(isset($map['httpProxy'])){
  128. $model->httpProxy = $map['httpProxy'];
  129. }
  130. if(isset($map['httpsProxy'])){
  131. $model->httpsProxy = $map['httpsProxy'];
  132. }
  133. if(isset($map['noProxy'])){
  134. $model->noProxy = $map['noProxy'];
  135. }
  136. if(isset($map['maxIdleConns'])){
  137. $model->maxIdleConns = $map['maxIdleConns'];
  138. }
  139. if(isset($map['localAddr'])){
  140. $model->localAddr = $map['localAddr'];
  141. }
  142. if(isset($map['socks5Proxy'])){
  143. $model->socks5Proxy = $map['socks5Proxy'];
  144. }
  145. if(isset($map['socks5NetWork'])){
  146. $model->socks5NetWork = $map['socks5NetWork'];
  147. }
  148. if(isset($map['keepAlive'])){
  149. $model->keepAlive = $map['keepAlive'];
  150. }
  151. if(isset($map['extendsParameters'])){
  152. $model->extendsParameters = ExtendsParameters::fromMap($map['extendsParameters']);
  153. }
  154. return $model;
  155. }
  156. /**
  157. * @description whether to try again
  158. * @var bool
  159. */
  160. public $autoretry;
  161. /**
  162. * @description ignore SSL validation
  163. * @var bool
  164. */
  165. public $ignoreSSL;
  166. /**
  167. * @description privite key for client certificate
  168. * @var string
  169. */
  170. public $key;
  171. /**
  172. * @description client certificate
  173. * @var string
  174. */
  175. public $cert;
  176. /**
  177. * @description server certificate
  178. * @var string
  179. */
  180. public $ca;
  181. /**
  182. * @description maximum number of retries
  183. * @var int
  184. */
  185. public $maxAttempts;
  186. /**
  187. * @description backoff policy
  188. * @var string
  189. */
  190. public $backoffPolicy;
  191. /**
  192. * @description backoff period
  193. * @var int
  194. */
  195. public $backoffPeriod;
  196. /**
  197. * @description read timeout
  198. * @var int
  199. */
  200. public $readTimeout;
  201. /**
  202. * @description connect timeout
  203. * @var int
  204. */
  205. public $connectTimeout;
  206. /**
  207. * @description http proxy url
  208. * @var string
  209. */
  210. public $httpProxy;
  211. /**
  212. * @description https Proxy url
  213. * @var string
  214. */
  215. public $httpsProxy;
  216. /**
  217. * @description agent blacklist
  218. * @var string
  219. */
  220. public $noProxy;
  221. /**
  222. * @description maximum number of connections
  223. * @var int
  224. */
  225. public $maxIdleConns;
  226. /**
  227. * @description local addr
  228. * @var string
  229. */
  230. public $localAddr;
  231. /**
  232. * @description SOCKS5 proxy
  233. * @var string
  234. */
  235. public $socks5Proxy;
  236. /**
  237. * @description SOCKS5 netWork
  238. * @var string
  239. */
  240. public $socks5NetWork;
  241. /**
  242. * @description whether to enable keep-alive
  243. * @var bool
  244. */
  245. public $keepAlive;
  246. /**
  247. * @description Extends Parameters
  248. * @var ExtendsParameters
  249. */
  250. public $extendsParameters;
  251. }