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 18namespace Google\Service\Compute; 19 20class AutoscalingPolicy extends \Google\Collection 21{ 22 protected $collection_key = 'customMetricUtilizations'; 23 /** 24 * @var int 25 */ 26 public $coolDownPeriodSec; 27 protected $cpuUtilizationType = AutoscalingPolicyCpuUtilization::class; 28 protected $cpuUtilizationDataType = ''; 29 protected $customMetricUtilizationsType = AutoscalingPolicyCustomMetricUtilization::class; 30 protected $customMetricUtilizationsDataType = 'array'; 31 protected $loadBalancingUtilizationType = AutoscalingPolicyLoadBalancingUtilization::class; 32 protected $loadBalancingUtilizationDataType = ''; 33 /** 34 * @var int 35 */ 36 public $maxNumReplicas; 37 /** 38 * @var int 39 */ 40 public $minNumReplicas; 41 /** 42 * @var string 43 */ 44 public $mode; 45 protected $scaleInControlType = AutoscalingPolicyScaleInControl::class; 46 protected $scaleInControlDataType = ''; 47 protected $scalingSchedulesType = AutoscalingPolicyScalingSchedule::class; 48 protected $scalingSchedulesDataType = 'map'; 49 50 /** 51 * @param int 52 */ 53 public function setCoolDownPeriodSec($coolDownPeriodSec) 54 { 55 $this->coolDownPeriodSec = $coolDownPeriodSec; 56 } 57 /** 58 * @return int 59 */ 60 public function getCoolDownPeriodSec() 61 { 62 return $this->coolDownPeriodSec; 63 } 64 /** 65 * @param AutoscalingPolicyCpuUtilization 66 */ 67 public function setCpuUtilization(AutoscalingPolicyCpuUtilization $cpuUtilization) 68 { 69 $this->cpuUtilization = $cpuUtilization; 70 } 71 /** 72 * @return AutoscalingPolicyCpuUtilization 73 */ 74 public function getCpuUtilization() 75 { 76 return $this->cpuUtilization; 77 } 78 /** 79 * @param AutoscalingPolicyCustomMetricUtilization[] 80 */ 81 public function setCustomMetricUtilizations($customMetricUtilizations) 82 { 83 $this->customMetricUtilizations = $customMetricUtilizations; 84 } 85 /** 86 * @return AutoscalingPolicyCustomMetricUtilization[] 87 */ 88 public function getCustomMetricUtilizations() 89 { 90 return $this->customMetricUtilizations; 91 } 92 /** 93 * @param AutoscalingPolicyLoadBalancingUtilization 94 */ 95 public function setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization $loadBalancingUtilization) 96 { 97 $this->loadBalancingUtilization = $loadBalancingUtilization; 98 } 99 /** 100 * @return AutoscalingPolicyLoadBalancingUtilization 101 */ 102 public function getLoadBalancingUtilization() 103 { 104 return $this->loadBalancingUtilization; 105 } 106 /** 107 * @param int 108 */ 109 public function setMaxNumReplicas($maxNumReplicas) 110 { 111 $this->maxNumReplicas = $maxNumReplicas; 112 } 113 /** 114 * @return int 115 */ 116 public function getMaxNumReplicas() 117 { 118 return $this->maxNumReplicas; 119 } 120 /** 121 * @param int 122 */ 123 public function setMinNumReplicas($minNumReplicas) 124 { 125 $this->minNumReplicas = $minNumReplicas; 126 } 127 /** 128 * @return int 129 */ 130 public function getMinNumReplicas() 131 { 132 return $this->minNumReplicas; 133 } 134 /** 135 * @param string 136 */ 137 public function setMode($mode) 138 { 139 $this->mode = $mode; 140 } 141 /** 142 * @return string 143 */ 144 public function getMode() 145 { 146 return $this->mode; 147 } 148 /** 149 * @param AutoscalingPolicyScaleInControl 150 */ 151 public function setScaleInControl(AutoscalingPolicyScaleInControl $scaleInControl) 152 { 153 $this->scaleInControl = $scaleInControl; 154 } 155 /** 156 * @return AutoscalingPolicyScaleInControl 157 */ 158 public function getScaleInControl() 159 { 160 return $this->scaleInControl; 161 } 162 /** 163 * @param AutoscalingPolicyScalingSchedule[] 164 */ 165 public function setScalingSchedules($scalingSchedules) 166 { 167 $this->scalingSchedules = $scalingSchedules; 168 } 169 /** 170 * @return AutoscalingPolicyScalingSchedule[] 171 */ 172 public function getScalingSchedules() 173 { 174 return $this->scalingSchedules; 175 } 176} 177 178// Adding a class alias for backwards compatibility with the previous class name. 179class_alias(AutoscalingPolicy::class, 'Google_Service_Compute_AutoscalingPolicy'); 180