in ess-20220222/src/Models/DescribeScalingGroupsResponseBody/scalingGroups.php [446:780]
public function toArray($noStream = false)
{
$res = [];
if (null !== $this->activeCapacity) {
$res['ActiveCapacity'] = $this->activeCapacity;
}
if (null !== $this->activeScalingConfigurationId) {
$res['ActiveScalingConfigurationId'] = $this->activeScalingConfigurationId;
}
if (null !== $this->albServerGroups) {
if (\is_array($this->albServerGroups)) {
$res['AlbServerGroups'] = [];
$n1 = 0;
foreach ($this->albServerGroups as $item1) {
$res['AlbServerGroups'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->allocationStrategy) {
$res['AllocationStrategy'] = $this->allocationStrategy;
}
if (null !== $this->azBalance) {
$res['AzBalance'] = $this->azBalance;
}
if (null !== $this->capacityOptions) {
$res['CapacityOptions'] = null !== $this->capacityOptions ? $this->capacityOptions->toArray($noStream) : $this->capacityOptions;
}
if (null !== $this->compensateWithOnDemand) {
$res['CompensateWithOnDemand'] = $this->compensateWithOnDemand;
}
if (null !== $this->creationTime) {
$res['CreationTime'] = $this->creationTime;
}
if (null !== $this->currentHostName) {
$res['CurrentHostName'] = $this->currentHostName;
}
if (null !== $this->customPolicyARN) {
$res['CustomPolicyARN'] = $this->customPolicyARN;
}
if (null !== $this->DBInstanceIds) {
if (\is_array($this->DBInstanceIds)) {
$res['DBInstanceIds'] = [];
$n1 = 0;
foreach ($this->DBInstanceIds as $item1) {
$res['DBInstanceIds'][$n1++] = $item1;
}
}
}
if (null !== $this->DBInstances) {
if (\is_array($this->DBInstances)) {
$res['DBInstances'] = [];
$n1 = 0;
foreach ($this->DBInstances as $item1) {
$res['DBInstances'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->defaultCooldown) {
$res['DefaultCooldown'] = $this->defaultCooldown;
}
if (null !== $this->desiredCapacity) {
$res['DesiredCapacity'] = $this->desiredCapacity;
}
if (null !== $this->enableDesiredCapacity) {
$res['EnableDesiredCapacity'] = $this->enableDesiredCapacity;
}
if (null !== $this->groupDeletionProtection) {
$res['GroupDeletionProtection'] = $this->groupDeletionProtection;
}
if (null !== $this->groupType) {
$res['GroupType'] = $this->groupType;
}
if (null !== $this->healthCheckType) {
$res['HealthCheckType'] = $this->healthCheckType;
}
if (null !== $this->healthCheckTypes) {
if (\is_array($this->healthCheckTypes)) {
$res['HealthCheckTypes'] = [];
$n1 = 0;
foreach ($this->healthCheckTypes as $item1) {
$res['HealthCheckTypes'][$n1++] = $item1;
}
}
}
if (null !== $this->initCapacity) {
$res['InitCapacity'] = $this->initCapacity;
}
if (null !== $this->isElasticStrengthInAlarm) {
$res['IsElasticStrengthInAlarm'] = $this->isElasticStrengthInAlarm;
}
if (null !== $this->launchTemplateId) {
$res['LaunchTemplateId'] = $this->launchTemplateId;
}
if (null !== $this->launchTemplateOverrides) {
if (\is_array($this->launchTemplateOverrides)) {
$res['LaunchTemplateOverrides'] = [];
$n1 = 0;
foreach ($this->launchTemplateOverrides as $item1) {
$res['LaunchTemplateOverrides'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->launchTemplateVersion) {
$res['LaunchTemplateVersion'] = $this->launchTemplateVersion;
}
if (null !== $this->lifecycleState) {
$res['LifecycleState'] = $this->lifecycleState;
}
if (null !== $this->loadBalancerConfigs) {
if (\is_array($this->loadBalancerConfigs)) {
$res['LoadBalancerConfigs'] = [];
$n1 = 0;
foreach ($this->loadBalancerConfigs as $item1) {
$res['LoadBalancerConfigs'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->loadBalancerIds) {
if (\is_array($this->loadBalancerIds)) {
$res['LoadBalancerIds'] = [];
$n1 = 0;
foreach ($this->loadBalancerIds as $item1) {
$res['LoadBalancerIds'][$n1++] = $item1;
}
}
}
if (null !== $this->maxInstanceLifetime) {
$res['MaxInstanceLifetime'] = $this->maxInstanceLifetime;
}
if (null !== $this->maxSize) {
$res['MaxSize'] = $this->maxSize;
}
if (null !== $this->minSize) {
$res['MinSize'] = $this->minSize;
}
if (null !== $this->modificationTime) {
$res['ModificationTime'] = $this->modificationTime;
}
if (null !== $this->monitorGroupId) {
$res['MonitorGroupId'] = $this->monitorGroupId;
}
if (null !== $this->multiAZPolicy) {
$res['MultiAZPolicy'] = $this->multiAZPolicy;
}
if (null !== $this->onDemandBaseCapacity) {
$res['OnDemandBaseCapacity'] = $this->onDemandBaseCapacity;
}
if (null !== $this->onDemandPercentageAboveBaseCapacity) {
$res['OnDemandPercentageAboveBaseCapacity'] = $this->onDemandPercentageAboveBaseCapacity;
}
if (null !== $this->pendingCapacity) {
$res['PendingCapacity'] = $this->pendingCapacity;
}
if (null !== $this->pendingWaitCapacity) {
$res['PendingWaitCapacity'] = $this->pendingWaitCapacity;
}
if (null !== $this->protectedCapacity) {
$res['ProtectedCapacity'] = $this->protectedCapacity;
}
if (null !== $this->regionId) {
$res['RegionId'] = $this->regionId;
}
if (null !== $this->removalPolicies) {
if (\is_array($this->removalPolicies)) {
$res['RemovalPolicies'] = [];
$n1 = 0;
foreach ($this->removalPolicies as $item1) {
$res['RemovalPolicies'][$n1++] = $item1;
}
}
}
if (null !== $this->removingCapacity) {
$res['RemovingCapacity'] = $this->removingCapacity;
}
if (null !== $this->removingWaitCapacity) {
$res['RemovingWaitCapacity'] = $this->removingWaitCapacity;
}
if (null !== $this->resourceGroupId) {
$res['ResourceGroupId'] = $this->resourceGroupId;
}
if (null !== $this->scalingGroupId) {
$res['ScalingGroupId'] = $this->scalingGroupId;
}
if (null !== $this->scalingGroupName) {
$res['ScalingGroupName'] = $this->scalingGroupName;
}
if (null !== $this->scalingPolicy) {
$res['ScalingPolicy'] = $this->scalingPolicy;
}
if (null !== $this->serverGroups) {
if (\is_array($this->serverGroups)) {
$res['ServerGroups'] = [];
$n1 = 0;
foreach ($this->serverGroups as $item1) {
$res['ServerGroups'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->spotAllocationStrategy) {
$res['SpotAllocationStrategy'] = $this->spotAllocationStrategy;
}
if (null !== $this->spotCapacity) {
$res['SpotCapacity'] = $this->spotCapacity;
}
if (null !== $this->spotInstancePools) {
$res['SpotInstancePools'] = $this->spotInstancePools;
}
if (null !== $this->spotInstanceRemedy) {
$res['SpotInstanceRemedy'] = $this->spotInstanceRemedy;
}
if (null !== $this->standbyCapacity) {
$res['StandbyCapacity'] = $this->standbyCapacity;
}
if (null !== $this->stopInstanceTimeout) {
$res['StopInstanceTimeout'] = $this->stopInstanceTimeout;
}
if (null !== $this->stoppedCapacity) {
$res['StoppedCapacity'] = $this->stoppedCapacity;
}
if (null !== $this->suspendedProcesses) {
if (\is_array($this->suspendedProcesses)) {
$res['SuspendedProcesses'] = [];
$n1 = 0;
foreach ($this->suspendedProcesses as $item1) {
$res['SuspendedProcesses'][$n1++] = $item1;
}
}
}
if (null !== $this->systemSuspended) {
$res['SystemSuspended'] = $this->systemSuspended;
}
if (null !== $this->tags) {
if (\is_array($this->tags)) {
$res['Tags'] = [];
$n1 = 0;
foreach ($this->tags as $item1) {
$res['Tags'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->totalCapacity) {
$res['TotalCapacity'] = $this->totalCapacity;
}
if (null !== $this->totalInstanceCount) {
$res['TotalInstanceCount'] = $this->totalInstanceCount;
}
if (null !== $this->VServerGroups) {
if (\is_array($this->VServerGroups)) {
$res['VServerGroups'] = [];
$n1 = 0;
foreach ($this->VServerGroups as $item1) {
$res['VServerGroups'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->vSwitchId) {
$res['VSwitchId'] = $this->vSwitchId;
}
if (null !== $this->vSwitchIds) {
if (\is_array($this->vSwitchIds)) {
$res['VSwitchIds'] = [];
$n1 = 0;
foreach ($this->vSwitchIds as $item1) {
$res['VSwitchIds'][$n1++] = $item1;
}
}
}
if (null !== $this->vpcId) {
$res['VpcId'] = $this->vpcId;
}
return $res;
}