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