in ecs-20140526/src/Models/RunInstancesRequest.php [902:1256]
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['CpuOptions'])) {
$model->cpuOptions = cpuOptions::fromMap($map['CpuOptions']);
}
if (isset($map['HibernationOptions'])) {
$model->hibernationOptions = hibernationOptions::fromMap($map['HibernationOptions']);
}
if (isset($map['PrivatePoolOptions'])) {
$model->privatePoolOptions = privatePoolOptions::fromMap($map['PrivatePoolOptions']);
}
if (isset($map['SchedulerOptions'])) {
$model->schedulerOptions = schedulerOptions::fromMap($map['SchedulerOptions']);
}
if (isset($map['SecurityOptions'])) {
$model->securityOptions = securityOptions::fromMap($map['SecurityOptions']);
}
if (isset($map['SystemDisk'])) {
$model->systemDisk = systemDisk::fromMap($map['SystemDisk']);
}
if (isset($map['Affinity'])) {
$model->affinity = $map['Affinity'];
}
if (isset($map['Amount'])) {
$model->amount = $map['Amount'];
}
if (isset($map['Arn'])) {
if (!empty($map['Arn'])) {
$model->arn = [];
$n1 = 0;
foreach ($map['Arn'] as $item1) {
$model->arn[$n1++] = arn::fromMap($item1);
}
}
}
if (isset($map['AutoPay'])) {
$model->autoPay = $map['AutoPay'];
}
if (isset($map['AutoReleaseTime'])) {
$model->autoReleaseTime = $map['AutoReleaseTime'];
}
if (isset($map['AutoRenew'])) {
$model->autoRenew = $map['AutoRenew'];
}
if (isset($map['AutoRenewPeriod'])) {
$model->autoRenewPeriod = $map['AutoRenewPeriod'];
}
if (isset($map['ClientToken'])) {
$model->clientToken = $map['ClientToken'];
}
if (isset($map['CreditSpecification'])) {
$model->creditSpecification = $map['CreditSpecification'];
}
if (isset($map['DataDisk'])) {
if (!empty($map['DataDisk'])) {
$model->dataDisk = [];
$n1 = 0;
foreach ($map['DataDisk'] as $item1) {
$model->dataDisk[$n1++] = dataDisk::fromMap($item1);
}
}
}
if (isset($map['DedicatedHostId'])) {
$model->dedicatedHostId = $map['DedicatedHostId'];
}
if (isset($map['DeletionProtection'])) {
$model->deletionProtection = $map['DeletionProtection'];
}
if (isset($map['DeploymentSetGroupNo'])) {
$model->deploymentSetGroupNo = $map['DeploymentSetGroupNo'];
}
if (isset($map['DeploymentSetId'])) {
$model->deploymentSetId = $map['DeploymentSetId'];
}
if (isset($map['Description'])) {
$model->description = $map['Description'];
}
if (isset($map['DryRun'])) {
$model->dryRun = $map['DryRun'];
}
if (isset($map['HostName'])) {
$model->hostName = $map['HostName'];
}
if (isset($map['HostNames'])) {
if (!empty($map['HostNames'])) {
$model->hostNames = [];
$n1 = 0;
foreach ($map['HostNames'] as $item1) {
$model->hostNames[$n1++] = $item1;
}
}
}
if (isset($map['HpcClusterId'])) {
$model->hpcClusterId = $map['HpcClusterId'];
}
if (isset($map['HttpEndpoint'])) {
$model->httpEndpoint = $map['HttpEndpoint'];
}
if (isset($map['HttpPutResponseHopLimit'])) {
$model->httpPutResponseHopLimit = $map['HttpPutResponseHopLimit'];
}
if (isset($map['HttpTokens'])) {
$model->httpTokens = $map['HttpTokens'];
}
if (isset($map['ImageFamily'])) {
$model->imageFamily = $map['ImageFamily'];
}
if (isset($map['ImageId'])) {
$model->imageId = $map['ImageId'];
}
if (isset($map['ImageOptions'])) {
$model->imageOptions = imageOptions::fromMap($map['ImageOptions']);
}
if (isset($map['InstanceChargeType'])) {
$model->instanceChargeType = $map['InstanceChargeType'];
}
if (isset($map['InstanceName'])) {
$model->instanceName = $map['InstanceName'];
}
if (isset($map['InstanceType'])) {
$model->instanceType = $map['InstanceType'];
}
if (isset($map['InternetChargeType'])) {
$model->internetChargeType = $map['InternetChargeType'];
}
if (isset($map['InternetMaxBandwidthIn'])) {
$model->internetMaxBandwidthIn = $map['InternetMaxBandwidthIn'];
}
if (isset($map['InternetMaxBandwidthOut'])) {
$model->internetMaxBandwidthOut = $map['InternetMaxBandwidthOut'];
}
if (isset($map['IoOptimized'])) {
$model->ioOptimized = $map['IoOptimized'];
}
if (isset($map['Ipv6Address'])) {
if (!empty($map['Ipv6Address'])) {
$model->ipv6Address = [];
$n1 = 0;
foreach ($map['Ipv6Address'] as $item1) {
$model->ipv6Address[$n1++] = $item1;
}
}
}
if (isset($map['Ipv6AddressCount'])) {
$model->ipv6AddressCount = $map['Ipv6AddressCount'];
}
if (isset($map['Isp'])) {
$model->isp = $map['Isp'];
}
if (isset($map['KeyPairName'])) {
$model->keyPairName = $map['KeyPairName'];
}
if (isset($map['LaunchTemplateId'])) {
$model->launchTemplateId = $map['LaunchTemplateId'];
}
if (isset($map['LaunchTemplateName'])) {
$model->launchTemplateName = $map['LaunchTemplateName'];
}
if (isset($map['LaunchTemplateVersion'])) {
$model->launchTemplateVersion = $map['LaunchTemplateVersion'];
}
if (isset($map['MinAmount'])) {
$model->minAmount = $map['MinAmount'];
}
if (isset($map['NetworkInterface'])) {
if (!empty($map['NetworkInterface'])) {
$model->networkInterface = [];
$n1 = 0;
foreach ($map['NetworkInterface'] as $item1) {
$model->networkInterface[$n1++] = networkInterface::fromMap($item1);
}
}
}
if (isset($map['NetworkInterfaceQueueNumber'])) {
$model->networkInterfaceQueueNumber = $map['NetworkInterfaceQueueNumber'];
}
if (isset($map['NetworkOptions'])) {
$model->networkOptions = networkOptions::fromMap($map['NetworkOptions']);
}
if (isset($map['OwnerAccount'])) {
$model->ownerAccount = $map['OwnerAccount'];
}
if (isset($map['OwnerId'])) {
$model->ownerId = $map['OwnerId'];
}
if (isset($map['Password'])) {
$model->password = $map['Password'];
}
if (isset($map['PasswordInherit'])) {
$model->passwordInherit = $map['PasswordInherit'];
}
if (isset($map['Period'])) {
$model->period = $map['Period'];
}
if (isset($map['PeriodUnit'])) {
$model->periodUnit = $map['PeriodUnit'];
}
if (isset($map['PrivateDnsNameOptions'])) {
$model->privateDnsNameOptions = privateDnsNameOptions::fromMap($map['PrivateDnsNameOptions']);
}
if (isset($map['PrivateIpAddress'])) {
$model->privateIpAddress = $map['PrivateIpAddress'];
}
if (isset($map['RamRoleName'])) {
$model->ramRoleName = $map['RamRoleName'];
}
if (isset($map['RegionId'])) {
$model->regionId = $map['RegionId'];
}
if (isset($map['ResourceGroupId'])) {
$model->resourceGroupId = $map['ResourceGroupId'];
}
if (isset($map['ResourceOwnerAccount'])) {
$model->resourceOwnerAccount = $map['ResourceOwnerAccount'];
}
if (isset($map['ResourceOwnerId'])) {
$model->resourceOwnerId = $map['ResourceOwnerId'];
}
if (isset($map['SecurityEnhancementStrategy'])) {
$model->securityEnhancementStrategy = $map['SecurityEnhancementStrategy'];
}
if (isset($map['SecurityGroupId'])) {
$model->securityGroupId = $map['SecurityGroupId'];
}
if (isset($map['SecurityGroupIds'])) {
if (!empty($map['SecurityGroupIds'])) {
$model->securityGroupIds = [];
$n1 = 0;
foreach ($map['SecurityGroupIds'] as $item1) {
$model->securityGroupIds[$n1++] = $item1;
}
}
}
if (isset($map['SpotDuration'])) {
$model->spotDuration = $map['SpotDuration'];
}
if (isset($map['SpotInterruptionBehavior'])) {
$model->spotInterruptionBehavior = $map['SpotInterruptionBehavior'];
}
if (isset($map['SpotPriceLimit'])) {
$model->spotPriceLimit = $map['SpotPriceLimit'];
}
if (isset($map['SpotStrategy'])) {
$model->spotStrategy = $map['SpotStrategy'];
}
if (isset($map['StorageSetId'])) {
$model->storageSetId = $map['StorageSetId'];
}
if (isset($map['StorageSetPartitionNumber'])) {
$model->storageSetPartitionNumber = $map['StorageSetPartitionNumber'];
}
if (isset($map['Tag'])) {
if (!empty($map['Tag'])) {
$model->tag = [];
$n1 = 0;
foreach ($map['Tag'] as $item1) {
$model->tag[$n1++] = tag::fromMap($item1);
}
}
}
if (isset($map['Tenancy'])) {
$model->tenancy = $map['Tenancy'];
}
if (isset($map['UniqueSuffix'])) {
$model->uniqueSuffix = $map['UniqueSuffix'];
}
if (isset($map['UserData'])) {
$model->userData = $map['UserData'];
}
if (isset($map['VSwitchId'])) {
$model->vSwitchId = $map['VSwitchId'];
}
if (isset($map['ZoneId'])) {
$model->zoneId = $map['ZoneId'];
}
return $model;
}