in cs-20151215/src/Models/CreateClusterRequest.php [672:1170]
public function toArray($noStream = false)
{
$res = [];
if (null !== $this->accessControlList) {
if (\is_array($this->accessControlList)) {
$res['access_control_list'] = [];
$n1 = 0;
foreach ($this->accessControlList as $item1) {
$res['access_control_list'][$n1++] = $item1;
}
}
}
if (null !== $this->addons) {
if (\is_array($this->addons)) {
$res['addons'] = [];
$n1 = 0;
foreach ($this->addons as $item1) {
$res['addons'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->apiAudiences) {
$res['api_audiences'] = $this->apiAudiences;
}
if (null !== $this->autoRenew) {
$res['auto_renew'] = $this->autoRenew;
}
if (null !== $this->autoRenewPeriod) {
$res['auto_renew_period'] = $this->autoRenewPeriod;
}
if (null !== $this->chargeType) {
$res['charge_type'] = $this->chargeType;
}
if (null !== $this->cisEnabled) {
$res['cis_enabled'] = $this->cisEnabled;
}
if (null !== $this->cloudMonitorFlags) {
$res['cloud_monitor_flags'] = $this->cloudMonitorFlags;
}
if (null !== $this->clusterDomain) {
$res['cluster_domain'] = $this->clusterDomain;
}
if (null !== $this->clusterSpec) {
$res['cluster_spec'] = $this->clusterSpec;
}
if (null !== $this->clusterType) {
$res['cluster_type'] = $this->clusterType;
}
if (null !== $this->containerCidr) {
$res['container_cidr'] = $this->containerCidr;
}
if (null !== $this->controlPlaneConfig) {
$res['control_plane_config'] = null !== $this->controlPlaneConfig ? $this->controlPlaneConfig->toArray($noStream) : $this->controlPlaneConfig;
}
if (null !== $this->controlplaneLogComponents) {
if (\is_array($this->controlplaneLogComponents)) {
$res['controlplane_log_components'] = [];
$n1 = 0;
foreach ($this->controlplaneLogComponents as $item1) {
$res['controlplane_log_components'][$n1++] = $item1;
}
}
}
if (null !== $this->controlplaneLogProject) {
$res['controlplane_log_project'] = $this->controlplaneLogProject;
}
if (null !== $this->controlplaneLogTtl) {
$res['controlplane_log_ttl'] = $this->controlplaneLogTtl;
}
if (null !== $this->cpuPolicy) {
$res['cpu_policy'] = $this->cpuPolicy;
}
if (null !== $this->customSan) {
$res['custom_san'] = $this->customSan;
}
if (null !== $this->deletionProtection) {
$res['deletion_protection'] = $this->deletionProtection;
}
if (null !== $this->disableRollback) {
$res['disable_rollback'] = $this->disableRollback;
}
if (null !== $this->enableRrsa) {
$res['enable_rrsa'] = $this->enableRrsa;
}
if (null !== $this->encryptionProviderKey) {
$res['encryption_provider_key'] = $this->encryptionProviderKey;
}
if (null !== $this->endpointPublicAccess) {
$res['endpoint_public_access'] = $this->endpointPublicAccess;
}
if (null !== $this->formatDisk) {
$res['format_disk'] = $this->formatDisk;
}
if (null !== $this->imageId) {
$res['image_id'] = $this->imageId;
}
if (null !== $this->imageType) {
$res['image_type'] = $this->imageType;
}
if (null !== $this->instances) {
if (\is_array($this->instances)) {
$res['instances'] = [];
$n1 = 0;
foreach ($this->instances as $item1) {
$res['instances'][$n1++] = $item1;
}
}
}
if (null !== $this->ipStack) {
$res['ip_stack'] = $this->ipStack;
}
if (null !== $this->isEnterpriseSecurityGroup) {
$res['is_enterprise_security_group'] = $this->isEnterpriseSecurityGroup;
}
if (null !== $this->keepInstanceName) {
$res['keep_instance_name'] = $this->keepInstanceName;
}
if (null !== $this->keyPair) {
$res['key_pair'] = $this->keyPair;
}
if (null !== $this->kubernetesVersion) {
$res['kubernetes_version'] = $this->kubernetesVersion;
}
if (null !== $this->loadBalancerId) {
$res['load_balancer_id'] = $this->loadBalancerId;
}
if (null !== $this->loadBalancerSpec) {
$res['load_balancer_spec'] = $this->loadBalancerSpec;
}
if (null !== $this->loggingType) {
$res['logging_type'] = $this->loggingType;
}
if (null !== $this->loginPassword) {
$res['login_password'] = $this->loginPassword;
}
if (null !== $this->maintenanceWindow) {
$res['maintenance_window'] = null !== $this->maintenanceWindow ? $this->maintenanceWindow->toArray($noStream) : $this->maintenanceWindow;
}
if (null !== $this->masterAutoRenew) {
$res['master_auto_renew'] = $this->masterAutoRenew;
}
if (null !== $this->masterAutoRenewPeriod) {
$res['master_auto_renew_period'] = $this->masterAutoRenewPeriod;
}
if (null !== $this->masterCount) {
$res['master_count'] = $this->masterCount;
}
if (null !== $this->masterInstanceChargeType) {
$res['master_instance_charge_type'] = $this->masterInstanceChargeType;
}
if (null !== $this->masterInstanceTypes) {
if (\is_array($this->masterInstanceTypes)) {
$res['master_instance_types'] = [];
$n1 = 0;
foreach ($this->masterInstanceTypes as $item1) {
$res['master_instance_types'][$n1++] = $item1;
}
}
}
if (null !== $this->masterPeriod) {
$res['master_period'] = $this->masterPeriod;
}
if (null !== $this->masterPeriodUnit) {
$res['master_period_unit'] = $this->masterPeriodUnit;
}
if (null !== $this->masterSystemDiskCategory) {
$res['master_system_disk_category'] = $this->masterSystemDiskCategory;
}
if (null !== $this->masterSystemDiskPerformanceLevel) {
$res['master_system_disk_performance_level'] = $this->masterSystemDiskPerformanceLevel;
}
if (null !== $this->masterSystemDiskSize) {
$res['master_system_disk_size'] = $this->masterSystemDiskSize;
}
if (null !== $this->masterSystemDiskSnapshotPolicyId) {
$res['master_system_disk_snapshot_policy_id'] = $this->masterSystemDiskSnapshotPolicyId;
}
if (null !== $this->masterVswitchIds) {
if (\is_array($this->masterVswitchIds)) {
$res['master_vswitch_ids'] = [];
$n1 = 0;
foreach ($this->masterVswitchIds as $item1) {
$res['master_vswitch_ids'][$n1++] = $item1;
}
}
}
if (null !== $this->name) {
$res['name'] = $this->name;
}
if (null !== $this->natGateway) {
$res['nat_gateway'] = $this->natGateway;
}
if (null !== $this->nodeCidrMask) {
$res['node_cidr_mask'] = $this->nodeCidrMask;
}
if (null !== $this->nodeNameMode) {
$res['node_name_mode'] = $this->nodeNameMode;
}
if (null !== $this->nodePortRange) {
$res['node_port_range'] = $this->nodePortRange;
}
if (null !== $this->nodepools) {
if (\is_array($this->nodepools)) {
$res['nodepools'] = [];
$n1 = 0;
foreach ($this->nodepools as $item1) {
$res['nodepools'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->numOfNodes) {
$res['num_of_nodes'] = $this->numOfNodes;
}
if (null !== $this->operationPolicy) {
$res['operation_policy'] = null !== $this->operationPolicy ? $this->operationPolicy->toArray($noStream) : $this->operationPolicy;
}
if (null !== $this->osType) {
$res['os_type'] = $this->osType;
}
if (null !== $this->period) {
$res['period'] = $this->period;
}
if (null !== $this->periodUnit) {
$res['period_unit'] = $this->periodUnit;
}
if (null !== $this->platform) {
$res['platform'] = $this->platform;
}
if (null !== $this->podVswitchIds) {
if (\is_array($this->podVswitchIds)) {
$res['pod_vswitch_ids'] = [];
$n1 = 0;
foreach ($this->podVswitchIds as $item1) {
$res['pod_vswitch_ids'][$n1++] = $item1;
}
}
}
if (null !== $this->profile) {
$res['profile'] = $this->profile;
}
if (null !== $this->proxyMode) {
$res['proxy_mode'] = $this->proxyMode;
}
if (null !== $this->rdsInstances) {
if (\is_array($this->rdsInstances)) {
$res['rds_instances'] = [];
$n1 = 0;
foreach ($this->rdsInstances as $item1) {
$res['rds_instances'][$n1++] = $item1;
}
}
}
if (null !== $this->regionId) {
$res['region_id'] = $this->regionId;
}
if (null !== $this->resourceGroupId) {
$res['resource_group_id'] = $this->resourceGroupId;
}
if (null !== $this->runtime) {
$res['runtime'] = null !== $this->runtime ? $this->runtime->toArray($noStream) : $this->runtime;
}
if (null !== $this->securityGroupId) {
$res['security_group_id'] = $this->securityGroupId;
}
if (null !== $this->securityHardeningOs) {
$res['security_hardening_os'] = $this->securityHardeningOs;
}
if (null !== $this->serviceAccountIssuer) {
$res['service_account_issuer'] = $this->serviceAccountIssuer;
}
if (null !== $this->serviceCidr) {
$res['service_cidr'] = $this->serviceCidr;
}
if (null !== $this->serviceDiscoveryTypes) {
if (\is_array($this->serviceDiscoveryTypes)) {
$res['service_discovery_types'] = [];
$n1 = 0;
foreach ($this->serviceDiscoveryTypes as $item1) {
$res['service_discovery_types'][$n1++] = $item1;
}
}
}
if (null !== $this->snatEntry) {
$res['snat_entry'] = $this->snatEntry;
}
if (null !== $this->socEnabled) {
$res['soc_enabled'] = $this->socEnabled;
}
if (null !== $this->sshFlags) {
$res['ssh_flags'] = $this->sshFlags;
}
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->taints) {
if (\is_array($this->taints)) {
$res['taints'] = [];
$n1 = 0;
foreach ($this->taints as $item1) {
$res['taints'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->timeoutMins) {
$res['timeout_mins'] = $this->timeoutMins;
}
if (null !== $this->timezone) {
$res['timezone'] = $this->timezone;
}
if (null !== $this->userCa) {
$res['user_ca'] = $this->userCa;
}
if (null !== $this->userData) {
$res['user_data'] = $this->userData;
}
if (null !== $this->vpcid) {
$res['vpcid'] = $this->vpcid;
}
if (null !== $this->vswitchIds) {
if (\is_array($this->vswitchIds)) {
$res['vswitch_ids'] = [];
$n1 = 0;
foreach ($this->vswitchIds as $item1) {
$res['vswitch_ids'][$n1++] = $item1;
}
}
}
if (null !== $this->workerAutoRenew) {
$res['worker_auto_renew'] = $this->workerAutoRenew;
}
if (null !== $this->workerAutoRenewPeriod) {
$res['worker_auto_renew_period'] = $this->workerAutoRenewPeriod;
}
if (null !== $this->workerDataDisks) {
if (\is_array($this->workerDataDisks)) {
$res['worker_data_disks'] = [];
$n1 = 0;
foreach ($this->workerDataDisks as $item1) {
$res['worker_data_disks'][$n1++] = null !== $item1 ? $item1->toArray($noStream) : $item1;
}
}
}
if (null !== $this->workerInstanceChargeType) {
$res['worker_instance_charge_type'] = $this->workerInstanceChargeType;
}
if (null !== $this->workerInstanceTypes) {
if (\is_array($this->workerInstanceTypes)) {
$res['worker_instance_types'] = [];
$n1 = 0;
foreach ($this->workerInstanceTypes as $item1) {
$res['worker_instance_types'][$n1++] = $item1;
}
}
}
if (null !== $this->workerPeriod) {
$res['worker_period'] = $this->workerPeriod;
}
if (null !== $this->workerPeriodUnit) {
$res['worker_period_unit'] = $this->workerPeriodUnit;
}
if (null !== $this->workerSystemDiskCategory) {
$res['worker_system_disk_category'] = $this->workerSystemDiskCategory;
}
if (null !== $this->workerSystemDiskPerformanceLevel) {
$res['worker_system_disk_performance_level'] = $this->workerSystemDiskPerformanceLevel;
}
if (null !== $this->workerSystemDiskSize) {
$res['worker_system_disk_size'] = $this->workerSystemDiskSize;
}
if (null !== $this->workerSystemDiskSnapshotPolicyId) {
$res['worker_system_disk_snapshot_policy_id'] = $this->workerSystemDiskSnapshotPolicyId;
}
if (null !== $this->workerVswitchIds) {
if (\is_array($this->workerVswitchIds)) {
$res['worker_vswitch_ids'] = [];
$n1 = 0;
foreach ($this->workerVswitchIds as $item1) {
$res['worker_vswitch_ids'][$n1++] = $item1;
}
}
}
if (null !== $this->zoneId) {
$res['zone_id'] = $this->zoneId;
}
if (null !== $this->zoneIds) {
if (\is_array($this->zoneIds)) {
$res['zone_ids'] = [];
$n1 = 0;
foreach ($this->zoneIds as $item1) {
$res['zone_ids'][$n1++] = $item1;
}
}
}
return $res;
}