InstanceGroupManager.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. namespace Google\Service\Compute;
  18. class InstanceGroupManager extends \Google\Collection
  19. {
  20. /**
  21. * (Default) Pagination is disabled for the group'slistManagedInstances API
  22. * method. maxResults and pageToken query parameters are ignored and all
  23. * instances are returned in a single response.
  24. */
  25. public const LIST_MANAGED_INSTANCES_RESULTS_PAGELESS = 'PAGELESS';
  26. /**
  27. * Pagination is enabled for the group's listManagedInstances API method.
  28. * maxResults and pageToken query parameters are respected.
  29. */
  30. public const LIST_MANAGED_INSTANCES_RESULTS_PAGINATED = 'PAGINATED';
  31. protected $collection_key = 'versions';
  32. protected $allInstancesConfigType = InstanceGroupManagerAllInstancesConfig::class;
  33. protected $allInstancesConfigDataType = '';
  34. protected $autoHealingPoliciesType = InstanceGroupManagerAutoHealingPolicy::class;
  35. protected $autoHealingPoliciesDataType = 'array';
  36. /**
  37. * The base instance name is a prefix that you want to attach to the names of
  38. * all VMs in a MIG. The maximum character length is 58 and the name must
  39. * comply with RFC1035 format.
  40. *
  41. * When a VM is created in the group, the MIG appends a hyphen and a random
  42. * four-character string to the base instance name. If you want the MIG to
  43. * assign sequential numbers instead of a random string, then end the base
  44. * instance name with a hyphen followed by one or more hash symbols. The hash
  45. * symbols indicate the number of digits. For example, a base instance name of
  46. * "vm-###" results in "vm-001" as a VM name. @pattern
  47. * [a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\[[0-9]{1,10}\\])?))
  48. *
  49. * @var string
  50. */
  51. public $baseInstanceName;
  52. /**
  53. * Output only. [Output Only] The creation timestamp for this managed instance
  54. * group inRFC3339 text format.
  55. *
  56. * @var string
  57. */
  58. public $creationTimestamp;
  59. protected $currentActionsType = InstanceGroupManagerActionsSummary::class;
  60. protected $currentActionsDataType = '';
  61. /**
  62. * An optional description of this resource.
  63. *
  64. * @var string
  65. */
  66. public $description;
  67. protected $distributionPolicyType = DistributionPolicy::class;
  68. protected $distributionPolicyDataType = '';
  69. /**
  70. * Fingerprint of this resource. This field may be used in optimistic locking.
  71. * It will be ignored when inserting an InstanceGroupManager. An up-to-date
  72. * fingerprint must be provided in order to update the InstanceGroupManager,
  73. * otherwise the request will fail with error412 conditionNotMet.
  74. *
  75. * To see the latest fingerprint, make a get() request to retrieve an
  76. * InstanceGroupManager.
  77. *
  78. * @var string
  79. */
  80. public $fingerprint;
  81. /**
  82. * Output only. [Output Only] A unique identifier for this resource type. The
  83. * server generates this identifier.
  84. *
  85. * @var string
  86. */
  87. public $id;
  88. protected $instanceFlexibilityPolicyType = InstanceGroupManagerInstanceFlexibilityPolicy::class;
  89. protected $instanceFlexibilityPolicyDataType = '';
  90. /**
  91. * Output only. [Output Only] The URL of the Instance Group resource.
  92. *
  93. * @var string
  94. */
  95. public $instanceGroup;
  96. protected $instanceLifecyclePolicyType = InstanceGroupManagerInstanceLifecyclePolicy::class;
  97. protected $instanceLifecyclePolicyDataType = '';
  98. /**
  99. * The URL of the instance template that is specified for this managed
  100. * instance group. The group uses this template to create all new instances in
  101. * the managed instance group. The templates for existing instances in the
  102. * group do not change unless you run recreateInstances,
  103. * runapplyUpdatesToInstances, or set the group'supdatePolicy.type to
  104. * PROACTIVE.
  105. *
  106. * @var string
  107. */
  108. public $instanceTemplate;
  109. /**
  110. * Output only. [Output Only] The resource type, which is
  111. * alwayscompute#instanceGroupManager for managed instance groups.
  112. *
  113. * @var string
  114. */
  115. public $kind;
  116. /**
  117. * Pagination behavior of the listManagedInstances API method for this managed
  118. * instance group.
  119. *
  120. * @var string
  121. */
  122. public $listManagedInstancesResults;
  123. /**
  124. * The name of the managed instance group. The name must be 1-63 characters
  125. * long, and comply withRFC1035.
  126. *
  127. * @var string
  128. */
  129. public $name;
  130. protected $namedPortsType = NamedPort::class;
  131. protected $namedPortsDataType = 'array';
  132. /**
  133. * Output only. [Output Only] The URL of theregion where the managed instance
  134. * group resides (for regional resources).
  135. *
  136. * @var string
  137. */
  138. public $region;
  139. protected $resourcePoliciesType = InstanceGroupManagerResourcePolicies::class;
  140. protected $resourcePoliciesDataType = '';
  141. /**
  142. * Output only. [Output Only] Reserved for future use.
  143. *
  144. * @var bool
  145. */
  146. public $satisfiesPzi;
  147. /**
  148. * Output only. [Output Only] Reserved for future use.
  149. *
  150. * @var bool
  151. */
  152. public $satisfiesPzs;
  153. /**
  154. * Output only. [Output Only] The URL for this managed instance group. The
  155. * server defines this URL.
  156. *
  157. * @var string
  158. */
  159. public $selfLink;
  160. protected $standbyPolicyType = InstanceGroupManagerStandbyPolicy::class;
  161. protected $standbyPolicyDataType = '';
  162. protected $statefulPolicyType = StatefulPolicy::class;
  163. protected $statefulPolicyDataType = '';
  164. protected $statusType = InstanceGroupManagerStatus::class;
  165. protected $statusDataType = '';
  166. /**
  167. * The URLs for all TargetPool resources to which instances in
  168. * theinstanceGroup field are added. The target pools automatically apply to
  169. * all of the instances in the managed instance group.
  170. *
  171. * @var string[]
  172. */
  173. public $targetPools;
  174. /**
  175. * The target number of running instances for this managed instance group. You
  176. * can reduce this number by using the instanceGroupManager deleteInstances or
  177. * abandonInstances methods. Resizing the group also changes this number.
  178. *
  179. * @var int
  180. */
  181. public $targetSize;
  182. /**
  183. * The target number of stopped instances for this managed instance group.
  184. * This number changes when you: - Stop instance using the
  185. * stopInstances method or start instances using the startInstances
  186. * method. - Manually change the targetStoppedSize using the update
  187. * method.
  188. *
  189. * @var int
  190. */
  191. public $targetStoppedSize;
  192. /**
  193. * The target number of suspended instances for this managed instance group.
  194. * This number changes when you: - Suspend instance using the
  195. * suspendInstances method or resume instances using the resumeInstances
  196. * method. - Manually change the targetSuspendedSize using the update
  197. * method.
  198. *
  199. * @var int
  200. */
  201. public $targetSuspendedSize;
  202. protected $updatePolicyType = InstanceGroupManagerUpdatePolicy::class;
  203. protected $updatePolicyDataType = '';
  204. protected $versionsType = InstanceGroupManagerVersion::class;
  205. protected $versionsDataType = 'array';
  206. /**
  207. * Output only. [Output Only] The URL of azone where the managed instance
  208. * group is located (for zonal resources).
  209. *
  210. * @var string
  211. */
  212. public $zone;
  213. /**
  214. * Specifies configuration that overrides the instance template configuration
  215. * for the group.
  216. *
  217. * @param InstanceGroupManagerAllInstancesConfig $allInstancesConfig
  218. */
  219. public function setAllInstancesConfig(InstanceGroupManagerAllInstancesConfig $allInstancesConfig)
  220. {
  221. $this->allInstancesConfig = $allInstancesConfig;
  222. }
  223. /**
  224. * @return InstanceGroupManagerAllInstancesConfig
  225. */
  226. public function getAllInstancesConfig()
  227. {
  228. return $this->allInstancesConfig;
  229. }
  230. /**
  231. * The autohealing policy for this managed instance group. You can specify
  232. * only one value.
  233. *
  234. * @param InstanceGroupManagerAutoHealingPolicy[] $autoHealingPolicies
  235. */
  236. public function setAutoHealingPolicies($autoHealingPolicies)
  237. {
  238. $this->autoHealingPolicies = $autoHealingPolicies;
  239. }
  240. /**
  241. * @return InstanceGroupManagerAutoHealingPolicy[]
  242. */
  243. public function getAutoHealingPolicies()
  244. {
  245. return $this->autoHealingPolicies;
  246. }
  247. /**
  248. * The base instance name is a prefix that you want to attach to the names of
  249. * all VMs in a MIG. The maximum character length is 58 and the name must
  250. * comply with RFC1035 format.
  251. *
  252. * When a VM is created in the group, the MIG appends a hyphen and a random
  253. * four-character string to the base instance name. If you want the MIG to
  254. * assign sequential numbers instead of a random string, then end the base
  255. * instance name with a hyphen followed by one or more hash symbols. The hash
  256. * symbols indicate the number of digits. For example, a base instance name of
  257. * "vm-###" results in "vm-001" as a VM name. @pattern
  258. * [a-z](([-a-z0-9]{0,57})|([-a-z0-9]{0,51}-#{1,10}(\\[[0-9]{1,10}\\])?))
  259. *
  260. * @param string $baseInstanceName
  261. */
  262. public function setBaseInstanceName($baseInstanceName)
  263. {
  264. $this->baseInstanceName = $baseInstanceName;
  265. }
  266. /**
  267. * @return string
  268. */
  269. public function getBaseInstanceName()
  270. {
  271. return $this->baseInstanceName;
  272. }
  273. /**
  274. * Output only. [Output Only] The creation timestamp for this managed instance
  275. * group inRFC3339 text format.
  276. *
  277. * @param string $creationTimestamp
  278. */
  279. public function setCreationTimestamp($creationTimestamp)
  280. {
  281. $this->creationTimestamp = $creationTimestamp;
  282. }
  283. /**
  284. * @return string
  285. */
  286. public function getCreationTimestamp()
  287. {
  288. return $this->creationTimestamp;
  289. }
  290. /**
  291. * Output only. [Output Only] The list of instance actions and the number of
  292. * instances in this managed instance group that are scheduled for each of
  293. * those actions.
  294. *
  295. * @param InstanceGroupManagerActionsSummary $currentActions
  296. */
  297. public function setCurrentActions(InstanceGroupManagerActionsSummary $currentActions)
  298. {
  299. $this->currentActions = $currentActions;
  300. }
  301. /**
  302. * @return InstanceGroupManagerActionsSummary
  303. */
  304. public function getCurrentActions()
  305. {
  306. return $this->currentActions;
  307. }
  308. /**
  309. * An optional description of this resource.
  310. *
  311. * @param string $description
  312. */
  313. public function setDescription($description)
  314. {
  315. $this->description = $description;
  316. }
  317. /**
  318. * @return string
  319. */
  320. public function getDescription()
  321. {
  322. return $this->description;
  323. }
  324. /**
  325. * Policy specifying the intended distribution of managed instances across
  326. * zones in a regional managed instance group.
  327. *
  328. * @param DistributionPolicy $distributionPolicy
  329. */
  330. public function setDistributionPolicy(DistributionPolicy $distributionPolicy)
  331. {
  332. $this->distributionPolicy = $distributionPolicy;
  333. }
  334. /**
  335. * @return DistributionPolicy
  336. */
  337. public function getDistributionPolicy()
  338. {
  339. return $this->distributionPolicy;
  340. }
  341. /**
  342. * Fingerprint of this resource. This field may be used in optimistic locking.
  343. * It will be ignored when inserting an InstanceGroupManager. An up-to-date
  344. * fingerprint must be provided in order to update the InstanceGroupManager,
  345. * otherwise the request will fail with error412 conditionNotMet.
  346. *
  347. * To see the latest fingerprint, make a get() request to retrieve an
  348. * InstanceGroupManager.
  349. *
  350. * @param string $fingerprint
  351. */
  352. public function setFingerprint($fingerprint)
  353. {
  354. $this->fingerprint = $fingerprint;
  355. }
  356. /**
  357. * @return string
  358. */
  359. public function getFingerprint()
  360. {
  361. return $this->fingerprint;
  362. }
  363. /**
  364. * Output only. [Output Only] A unique identifier for this resource type. The
  365. * server generates this identifier.
  366. *
  367. * @param string $id
  368. */
  369. public function setId($id)
  370. {
  371. $this->id = $id;
  372. }
  373. /**
  374. * @return string
  375. */
  376. public function getId()
  377. {
  378. return $this->id;
  379. }
  380. /**
  381. * Instance flexibility allowing MIG to create VMs from multiple types of
  382. * machines. Instance flexibility configuration on MIG overrides instance
  383. * template configuration.
  384. *
  385. * @param InstanceGroupManagerInstanceFlexibilityPolicy $instanceFlexibilityPolicy
  386. */
  387. public function setInstanceFlexibilityPolicy(InstanceGroupManagerInstanceFlexibilityPolicy $instanceFlexibilityPolicy)
  388. {
  389. $this->instanceFlexibilityPolicy = $instanceFlexibilityPolicy;
  390. }
  391. /**
  392. * @return InstanceGroupManagerInstanceFlexibilityPolicy
  393. */
  394. public function getInstanceFlexibilityPolicy()
  395. {
  396. return $this->instanceFlexibilityPolicy;
  397. }
  398. /**
  399. * Output only. [Output Only] The URL of the Instance Group resource.
  400. *
  401. * @param string $instanceGroup
  402. */
  403. public function setInstanceGroup($instanceGroup)
  404. {
  405. $this->instanceGroup = $instanceGroup;
  406. }
  407. /**
  408. * @return string
  409. */
  410. public function getInstanceGroup()
  411. {
  412. return $this->instanceGroup;
  413. }
  414. /**
  415. * The repair policy for this managed instance group.
  416. *
  417. * @param InstanceGroupManagerInstanceLifecyclePolicy $instanceLifecyclePolicy
  418. */
  419. public function setInstanceLifecyclePolicy(InstanceGroupManagerInstanceLifecyclePolicy $instanceLifecyclePolicy)
  420. {
  421. $this->instanceLifecyclePolicy = $instanceLifecyclePolicy;
  422. }
  423. /**
  424. * @return InstanceGroupManagerInstanceLifecyclePolicy
  425. */
  426. public function getInstanceLifecyclePolicy()
  427. {
  428. return $this->instanceLifecyclePolicy;
  429. }
  430. /**
  431. * The URL of the instance template that is specified for this managed
  432. * instance group. The group uses this template to create all new instances in
  433. * the managed instance group. The templates for existing instances in the
  434. * group do not change unless you run recreateInstances,
  435. * runapplyUpdatesToInstances, or set the group'supdatePolicy.type to
  436. * PROACTIVE.
  437. *
  438. * @param string $instanceTemplate
  439. */
  440. public function setInstanceTemplate($instanceTemplate)
  441. {
  442. $this->instanceTemplate = $instanceTemplate;
  443. }
  444. /**
  445. * @return string
  446. */
  447. public function getInstanceTemplate()
  448. {
  449. return $this->instanceTemplate;
  450. }
  451. /**
  452. * Output only. [Output Only] The resource type, which is
  453. * alwayscompute#instanceGroupManager for managed instance groups.
  454. *
  455. * @param string $kind
  456. */
  457. public function setKind($kind)
  458. {
  459. $this->kind = $kind;
  460. }
  461. /**
  462. * @return string
  463. */
  464. public function getKind()
  465. {
  466. return $this->kind;
  467. }
  468. /**
  469. * Pagination behavior of the listManagedInstances API method for this managed
  470. * instance group.
  471. *
  472. * Accepted values: PAGELESS, PAGINATED
  473. *
  474. * @param self::LIST_MANAGED_INSTANCES_RESULTS_* $listManagedInstancesResults
  475. */
  476. public function setListManagedInstancesResults($listManagedInstancesResults)
  477. {
  478. $this->listManagedInstancesResults = $listManagedInstancesResults;
  479. }
  480. /**
  481. * @return self::LIST_MANAGED_INSTANCES_RESULTS_*
  482. */
  483. public function getListManagedInstancesResults()
  484. {
  485. return $this->listManagedInstancesResults;
  486. }
  487. /**
  488. * The name of the managed instance group. The name must be 1-63 characters
  489. * long, and comply withRFC1035.
  490. *
  491. * @param string $name
  492. */
  493. public function setName($name)
  494. {
  495. $this->name = $name;
  496. }
  497. /**
  498. * @return string
  499. */
  500. public function getName()
  501. {
  502. return $this->name;
  503. }
  504. /**
  505. * [Output Only] Named ports configured on the Instance Groups complementary
  506. * to this Instance Group Manager.
  507. *
  508. * @param NamedPort[] $namedPorts
  509. */
  510. public function setNamedPorts($namedPorts)
  511. {
  512. $this->namedPorts = $namedPorts;
  513. }
  514. /**
  515. * @return NamedPort[]
  516. */
  517. public function getNamedPorts()
  518. {
  519. return $this->namedPorts;
  520. }
  521. /**
  522. * Output only. [Output Only] The URL of theregion where the managed instance
  523. * group resides (for regional resources).
  524. *
  525. * @param string $region
  526. */
  527. public function setRegion($region)
  528. {
  529. $this->region = $region;
  530. }
  531. /**
  532. * @return string
  533. */
  534. public function getRegion()
  535. {
  536. return $this->region;
  537. }
  538. /**
  539. * Resource policies for this managed instance group.
  540. *
  541. * @param InstanceGroupManagerResourcePolicies $resourcePolicies
  542. */
  543. public function setResourcePolicies(InstanceGroupManagerResourcePolicies $resourcePolicies)
  544. {
  545. $this->resourcePolicies = $resourcePolicies;
  546. }
  547. /**
  548. * @return InstanceGroupManagerResourcePolicies
  549. */
  550. public function getResourcePolicies()
  551. {
  552. return $this->resourcePolicies;
  553. }
  554. /**
  555. * Output only. [Output Only] Reserved for future use.
  556. *
  557. * @param bool $satisfiesPzi
  558. */
  559. public function setSatisfiesPzi($satisfiesPzi)
  560. {
  561. $this->satisfiesPzi = $satisfiesPzi;
  562. }
  563. /**
  564. * @return bool
  565. */
  566. public function getSatisfiesPzi()
  567. {
  568. return $this->satisfiesPzi;
  569. }
  570. /**
  571. * Output only. [Output Only] Reserved for future use.
  572. *
  573. * @param bool $satisfiesPzs
  574. */
  575. public function setSatisfiesPzs($satisfiesPzs)
  576. {
  577. $this->satisfiesPzs = $satisfiesPzs;
  578. }
  579. /**
  580. * @return bool
  581. */
  582. public function getSatisfiesPzs()
  583. {
  584. return $this->satisfiesPzs;
  585. }
  586. /**
  587. * Output only. [Output Only] The URL for this managed instance group. The
  588. * server defines this URL.
  589. *
  590. * @param string $selfLink
  591. */
  592. public function setSelfLink($selfLink)
  593. {
  594. $this->selfLink = $selfLink;
  595. }
  596. /**
  597. * @return string
  598. */
  599. public function getSelfLink()
  600. {
  601. return $this->selfLink;
  602. }
  603. /**
  604. * Standby policy for stopped and suspended instances.
  605. *
  606. * @param InstanceGroupManagerStandbyPolicy $standbyPolicy
  607. */
  608. public function setStandbyPolicy(InstanceGroupManagerStandbyPolicy $standbyPolicy)
  609. {
  610. $this->standbyPolicy = $standbyPolicy;
  611. }
  612. /**
  613. * @return InstanceGroupManagerStandbyPolicy
  614. */
  615. public function getStandbyPolicy()
  616. {
  617. return $this->standbyPolicy;
  618. }
  619. /**
  620. * Stateful configuration for this Instanced Group Manager
  621. *
  622. * @param StatefulPolicy $statefulPolicy
  623. */
  624. public function setStatefulPolicy(StatefulPolicy $statefulPolicy)
  625. {
  626. $this->statefulPolicy = $statefulPolicy;
  627. }
  628. /**
  629. * @return StatefulPolicy
  630. */
  631. public function getStatefulPolicy()
  632. {
  633. return $this->statefulPolicy;
  634. }
  635. /**
  636. * Output only. [Output Only] The status of this managed instance group.
  637. *
  638. * @param InstanceGroupManagerStatus $status
  639. */
  640. public function setStatus(InstanceGroupManagerStatus $status)
  641. {
  642. $this->status = $status;
  643. }
  644. /**
  645. * @return InstanceGroupManagerStatus
  646. */
  647. public function getStatus()
  648. {
  649. return $this->status;
  650. }
  651. /**
  652. * The URLs for all TargetPool resources to which instances in
  653. * theinstanceGroup field are added. The target pools automatically apply to
  654. * all of the instances in the managed instance group.
  655. *
  656. * @param string[] $targetPools
  657. */
  658. public function setTargetPools($targetPools)
  659. {
  660. $this->targetPools = $targetPools;
  661. }
  662. /**
  663. * @return string[]
  664. */
  665. public function getTargetPools()
  666. {
  667. return $this->targetPools;
  668. }
  669. /**
  670. * The target number of running instances for this managed instance group. You
  671. * can reduce this number by using the instanceGroupManager deleteInstances or
  672. * abandonInstances methods. Resizing the group also changes this number.
  673. *
  674. * @param int $targetSize
  675. */
  676. public function setTargetSize($targetSize)
  677. {
  678. $this->targetSize = $targetSize;
  679. }
  680. /**
  681. * @return int
  682. */
  683. public function getTargetSize()
  684. {
  685. return $this->targetSize;
  686. }
  687. /**
  688. * The target number of stopped instances for this managed instance group.
  689. * This number changes when you: - Stop instance using the
  690. * stopInstances method or start instances using the startInstances
  691. * method. - Manually change the targetStoppedSize using the update
  692. * method.
  693. *
  694. * @param int $targetStoppedSize
  695. */
  696. public function setTargetStoppedSize($targetStoppedSize)
  697. {
  698. $this->targetStoppedSize = $targetStoppedSize;
  699. }
  700. /**
  701. * @return int
  702. */
  703. public function getTargetStoppedSize()
  704. {
  705. return $this->targetStoppedSize;
  706. }
  707. /**
  708. * The target number of suspended instances for this managed instance group.
  709. * This number changes when you: - Suspend instance using the
  710. * suspendInstances method or resume instances using the resumeInstances
  711. * method. - Manually change the targetSuspendedSize using the update
  712. * method.
  713. *
  714. * @param int $targetSuspendedSize
  715. */
  716. public function setTargetSuspendedSize($targetSuspendedSize)
  717. {
  718. $this->targetSuspendedSize = $targetSuspendedSize;
  719. }
  720. /**
  721. * @return int
  722. */
  723. public function getTargetSuspendedSize()
  724. {
  725. return $this->targetSuspendedSize;
  726. }
  727. /**
  728. * The update policy for this managed instance group.
  729. *
  730. * @param InstanceGroupManagerUpdatePolicy $updatePolicy
  731. */
  732. public function setUpdatePolicy(InstanceGroupManagerUpdatePolicy $updatePolicy)
  733. {
  734. $this->updatePolicy = $updatePolicy;
  735. }
  736. /**
  737. * @return InstanceGroupManagerUpdatePolicy
  738. */
  739. public function getUpdatePolicy()
  740. {
  741. return $this->updatePolicy;
  742. }
  743. /**
  744. * Specifies the instance templates used by this managed instance group to
  745. * create instances.
  746. *
  747. * Each version is defined by an instanceTemplate and aname. Every version can
  748. * appear at most once per instance group. This field overrides the top-level
  749. * instanceTemplate field. Read more about therelationships between these
  750. * fields. Exactly one version must leave thetargetSize field unset. That
  751. * version will be applied to all remaining instances. For more information,
  752. * read aboutcanary updates.
  753. *
  754. * @param InstanceGroupManagerVersion[] $versions
  755. */
  756. public function setVersions($versions)
  757. {
  758. $this->versions = $versions;
  759. }
  760. /**
  761. * @return InstanceGroupManagerVersion[]
  762. */
  763. public function getVersions()
  764. {
  765. return $this->versions;
  766. }
  767. /**
  768. * Output only. [Output Only] The URL of azone where the managed instance
  769. * group is located (for zonal resources).
  770. *
  771. * @param string $zone
  772. */
  773. public function setZone($zone)
  774. {
  775. $this->zone = $zone;
  776. }
  777. /**
  778. * @return string
  779. */
  780. public function getZone()
  781. {
  782. return $this->zone;
  783. }
  784. }
  785. // Adding a class alias for backwards compatibility with the previous class name.
  786. class_alias(InstanceGroupManager::class, 'Google_Service_Compute_InstanceGroupManager');