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