in eci-20180808/src/Models/CreateContainerGroupRequest.php [1021:1285]
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['DnsConfig'])) {
$model->dnsConfig = dnsConfig::fromMap($map['DnsConfig']);
}
if (isset($map['HostSecurityContext'])) {
$model->hostSecurityContext = hostSecurityContext::fromMap($map['HostSecurityContext']);
}
if (isset($map['SecurityContext'])) {
$model->securityContext = securityContext::fromMap($map['SecurityContext']);
}
if (isset($map['AcrRegistryInfo'])) {
if (!empty($map['AcrRegistryInfo'])) {
$model->acrRegistryInfo = [];
$n = 0;
foreach ($map['AcrRegistryInfo'] as $item) {
$model->acrRegistryInfo[$n++] = null !== $item ? acrRegistryInfo::fromMap($item) : $item;
}
}
}
if (isset($map['ActiveDeadlineSeconds'])) {
$model->activeDeadlineSeconds = $map['ActiveDeadlineSeconds'];
}
if (isset($map['AutoCreateEip'])) {
$model->autoCreateEip = $map['AutoCreateEip'];
}
if (isset($map['AutoMatchImageCache'])) {
$model->autoMatchImageCache = $map['AutoMatchImageCache'];
}
if (isset($map['ClientToken'])) {
$model->clientToken = $map['ClientToken'];
}
if (isset($map['ComputeCategory'])) {
if (!empty($map['ComputeCategory'])) {
$model->computeCategory = $map['ComputeCategory'];
}
}
if (isset($map['Container'])) {
if (!empty($map['Container'])) {
$model->container = [];
$n = 0;
foreach ($map['Container'] as $item) {
$model->container[$n++] = null !== $item ? container::fromMap($item) : $item;
}
}
}
if (isset($map['ContainerGroupName'])) {
$model->containerGroupName = $map['ContainerGroupName'];
}
if (isset($map['ContainerResourceView'])) {
$model->containerResourceView = $map['ContainerResourceView'];
}
if (isset($map['CorePattern'])) {
$model->corePattern = $map['CorePattern'];
}
if (isset($map['Cpu'])) {
$model->cpu = $map['Cpu'];
}
if (isset($map['CpuArchitecture'])) {
$model->cpuArchitecture = $map['CpuArchitecture'];
}
if (isset($map['CpuOptionsCore'])) {
$model->cpuOptionsCore = $map['CpuOptionsCore'];
}
if (isset($map['CpuOptionsNuma'])) {
$model->cpuOptionsNuma = $map['CpuOptionsNuma'];
}
if (isset($map['CpuOptionsThreadsPerCore'])) {
$model->cpuOptionsThreadsPerCore = $map['CpuOptionsThreadsPerCore'];
}
if (isset($map['DataCacheBucket'])) {
$model->dataCacheBucket = $map['DataCacheBucket'];
}
if (isset($map['DataCacheBurstingEnabled'])) {
$model->dataCacheBurstingEnabled = $map['DataCacheBurstingEnabled'];
}
if (isset($map['DataCachePL'])) {
$model->dataCachePL = $map['DataCachePL'];
}
if (isset($map['DataCacheProvisionedIops'])) {
$model->dataCacheProvisionedIops = $map['DataCacheProvisionedIops'];
}
if (isset($map['DnsPolicy'])) {
$model->dnsPolicy = $map['DnsPolicy'];
}
if (isset($map['DryRun'])) {
$model->dryRun = $map['DryRun'];
}
if (isset($map['EgressBandwidth'])) {
$model->egressBandwidth = $map['EgressBandwidth'];
}
if (isset($map['EipBandwidth'])) {
$model->eipBandwidth = $map['EipBandwidth'];
}
if (isset($map['EipCommonBandwidthPackage'])) {
$model->eipCommonBandwidthPackage = $map['EipCommonBandwidthPackage'];
}
if (isset($map['EipISP'])) {
$model->eipISP = $map['EipISP'];
}
if (isset($map['EipInstanceId'])) {
$model->eipInstanceId = $map['EipInstanceId'];
}
if (isset($map['EphemeralStorage'])) {
$model->ephemeralStorage = $map['EphemeralStorage'];
}
if (isset($map['FixedIp'])) {
$model->fixedIp = $map['FixedIp'];
}
if (isset($map['FixedIpRetainHour'])) {
$model->fixedIpRetainHour = $map['FixedIpRetainHour'];
}
if (isset($map['GpuDriverVersion'])) {
$model->gpuDriverVersion = $map['GpuDriverVersion'];
}
if (isset($map['HostAliase'])) {
if (!empty($map['HostAliase'])) {
$model->hostAliase = [];
$n = 0;
foreach ($map['HostAliase'] as $item) {
$model->hostAliase[$n++] = null !== $item ? hostAliase::fromMap($item) : $item;
}
}
}
if (isset($map['HostName'])) {
$model->hostName = $map['HostName'];
}
if (isset($map['ImageAccelerateMode'])) {
$model->imageAccelerateMode = $map['ImageAccelerateMode'];
}
if (isset($map['ImageRegistryCredential'])) {
if (!empty($map['ImageRegistryCredential'])) {
$model->imageRegistryCredential = [];
$n = 0;
foreach ($map['ImageRegistryCredential'] as $item) {
$model->imageRegistryCredential[$n++] = null !== $item ? imageRegistryCredential::fromMap($item) : $item;
}
}
}
if (isset($map['ImageSnapshotId'])) {
$model->imageSnapshotId = $map['ImageSnapshotId'];
}
if (isset($map['IngressBandwidth'])) {
$model->ingressBandwidth = $map['IngressBandwidth'];
}
if (isset($map['InitContainer'])) {
if (!empty($map['InitContainer'])) {
$model->initContainer = [];
$n = 0;
foreach ($map['InitContainer'] as $item) {
$model->initContainer[$n++] = null !== $item ? initContainer::fromMap($item) : $item;
}
}
}
if (isset($map['InsecureRegistry'])) {
$model->insecureRegistry = $map['InsecureRegistry'];
}
if (isset($map['InstanceType'])) {
$model->instanceType = $map['InstanceType'];
}
if (isset($map['Ipv6AddressCount'])) {
$model->ipv6AddressCount = $map['Ipv6AddressCount'];
}
if (isset($map['Ipv6GatewayBandwidth'])) {
$model->ipv6GatewayBandwidth = $map['Ipv6GatewayBandwidth'];
}
if (isset($map['Ipv6GatewayBandwidthEnable'])) {
$model->ipv6GatewayBandwidthEnable = $map['Ipv6GatewayBandwidthEnable'];
}
if (isset($map['Memory'])) {
$model->memory = $map['Memory'];
}
if (isset($map['NtpServer'])) {
if (!empty($map['NtpServer'])) {
$model->ntpServer = $map['NtpServer'];
}
}
if (isset($map['OsType'])) {
$model->osType = $map['OsType'];
}
if (isset($map['OverheadReservationOption'])) {
$model->overheadReservationOption = overheadReservationOption::fromMap($map['OverheadReservationOption']);
}
if (isset($map['OwnerAccount'])) {
$model->ownerAccount = $map['OwnerAccount'];
}
if (isset($map['OwnerId'])) {
$model->ownerId = $map['OwnerId'];
}
if (isset($map['PlainHttpRegistry'])) {
$model->plainHttpRegistry = $map['PlainHttpRegistry'];
}
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['RestartPolicy'])) {
$model->restartPolicy = $map['RestartPolicy'];
}
if (isset($map['ScheduleStrategy'])) {
$model->scheduleStrategy = $map['ScheduleStrategy'];
}
if (isset($map['SecurityGroupId'])) {
$model->securityGroupId = $map['SecurityGroupId'];
}
if (isset($map['ShareProcessNamespace'])) {
$model->shareProcessNamespace = $map['ShareProcessNamespace'];
}
if (isset($map['SpotDuration'])) {
$model->spotDuration = $map['SpotDuration'];
}
if (isset($map['SpotPriceLimit'])) {
$model->spotPriceLimit = $map['SpotPriceLimit'];
}
if (isset($map['SpotStrategy'])) {
$model->spotStrategy = $map['SpotStrategy'];
}
if (isset($map['StrictSpot'])) {
$model->strictSpot = $map['StrictSpot'];
}
if (isset($map['Tag'])) {
if (!empty($map['Tag'])) {
$model->tag = [];
$n = 0;
foreach ($map['Tag'] as $item) {
$model->tag[$n++] = null !== $item ? tag::fromMap($item) : $item;
}
}
}
if (isset($map['TerminationGracePeriodSeconds'])) {
$model->terminationGracePeriodSeconds = $map['TerminationGracePeriodSeconds'];
}
if (isset($map['VSwitchId'])) {
$model->vSwitchId = $map['VSwitchId'];
}
if (isset($map['Volume'])) {
if (!empty($map['Volume'])) {
$model->volume = [];
$n = 0;
foreach ($map['Volume'] as $item) {
$model->volume[$n++] = null !== $item ? volume::fromMap($item) : $item;
}
}
}
if (isset($map['ZoneId'])) {
$model->zoneId = $map['ZoneId'];
}
return $model;
}