in v2/api/containerservice/v1api20210501/managed_clusters_agent_pool_types_gen.go [1752:2144]
func (pool *ManagedClustersAgentPool_STATUS) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error {
typedInput, ok := armInput.(arm.ManagedClustersAgentPool_STATUS)
if !ok {
return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected arm.ManagedClustersAgentPool_STATUS, got %T", armInput)
}
// Set property "AvailabilityZones":
// copying flattened property:
if typedInput.Properties != nil {
for _, item := range typedInput.Properties.AvailabilityZones {
pool.AvailabilityZones = append(pool.AvailabilityZones, item)
}
}
// no assignment for property "Conditions"
// Set property "Count":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.Count != nil {
count := *typedInput.Properties.Count
pool.Count = &count
}
}
// Set property "EnableAutoScaling":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.EnableAutoScaling != nil {
enableAutoScaling := *typedInput.Properties.EnableAutoScaling
pool.EnableAutoScaling = &enableAutoScaling
}
}
// Set property "EnableEncryptionAtHost":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.EnableEncryptionAtHost != nil {
enableEncryptionAtHost := *typedInput.Properties.EnableEncryptionAtHost
pool.EnableEncryptionAtHost = &enableEncryptionAtHost
}
}
// Set property "EnableFIPS":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.EnableFIPS != nil {
enableFIPS := *typedInput.Properties.EnableFIPS
pool.EnableFIPS = &enableFIPS
}
}
// Set property "EnableNodePublicIP":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.EnableNodePublicIP != nil {
enableNodePublicIP := *typedInput.Properties.EnableNodePublicIP
pool.EnableNodePublicIP = &enableNodePublicIP
}
}
// Set property "EnableUltraSSD":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.EnableUltraSSD != nil {
enableUltraSSD := *typedInput.Properties.EnableUltraSSD
pool.EnableUltraSSD = &enableUltraSSD
}
}
// Set property "GpuInstanceProfile":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.GpuInstanceProfile != nil {
var temp string
temp = string(*typedInput.Properties.GpuInstanceProfile)
gpuInstanceProfile := GPUInstanceProfile_STATUS(temp)
pool.GpuInstanceProfile = &gpuInstanceProfile
}
}
// Set property "Id":
if typedInput.Id != nil {
id := *typedInput.Id
pool.Id = &id
}
// Set property "KubeletConfig":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.KubeletConfig != nil {
var kubeletConfig1 KubeletConfig_STATUS
err := kubeletConfig1.PopulateFromARM(owner, *typedInput.Properties.KubeletConfig)
if err != nil {
return err
}
kubeletConfig := kubeletConfig1
pool.KubeletConfig = &kubeletConfig
}
}
// Set property "KubeletDiskType":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.KubeletDiskType != nil {
var temp string
temp = string(*typedInput.Properties.KubeletDiskType)
kubeletDiskType := KubeletDiskType_STATUS(temp)
pool.KubeletDiskType = &kubeletDiskType
}
}
// Set property "LinuxOSConfig":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.LinuxOSConfig != nil {
var linuxOSConfig1 LinuxOSConfig_STATUS
err := linuxOSConfig1.PopulateFromARM(owner, *typedInput.Properties.LinuxOSConfig)
if err != nil {
return err
}
linuxOSConfig := linuxOSConfig1
pool.LinuxOSConfig = &linuxOSConfig
}
}
// Set property "MaxCount":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.MaxCount != nil {
maxCount := *typedInput.Properties.MaxCount
pool.MaxCount = &maxCount
}
}
// Set property "MaxPods":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.MaxPods != nil {
maxPods := *typedInput.Properties.MaxPods
pool.MaxPods = &maxPods
}
}
// Set property "MinCount":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.MinCount != nil {
minCount := *typedInput.Properties.MinCount
pool.MinCount = &minCount
}
}
// Set property "Mode":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.Mode != nil {
var temp string
temp = string(*typedInput.Properties.Mode)
mode := AgentPoolMode_STATUS(temp)
pool.Mode = &mode
}
}
// Set property "Name":
if typedInput.Name != nil {
name := *typedInput.Name
pool.Name = &name
}
// Set property "NodeImageVersion":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.NodeImageVersion != nil {
nodeImageVersion := *typedInput.Properties.NodeImageVersion
pool.NodeImageVersion = &nodeImageVersion
}
}
// Set property "NodeLabels":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.NodeLabels != nil {
pool.NodeLabels = make(map[string]string, len(typedInput.Properties.NodeLabels))
for key, value := range typedInput.Properties.NodeLabels {
pool.NodeLabels[key] = value
}
}
}
// Set property "NodePublicIPPrefixID":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.NodePublicIPPrefixID != nil {
nodePublicIPPrefixID := *typedInput.Properties.NodePublicIPPrefixID
pool.NodePublicIPPrefixID = &nodePublicIPPrefixID
}
}
// Set property "NodeTaints":
// copying flattened property:
if typedInput.Properties != nil {
for _, item := range typedInput.Properties.NodeTaints {
pool.NodeTaints = append(pool.NodeTaints, item)
}
}
// Set property "OrchestratorVersion":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.OrchestratorVersion != nil {
orchestratorVersion := *typedInput.Properties.OrchestratorVersion
pool.OrchestratorVersion = &orchestratorVersion
}
}
// Set property "OsDiskSizeGB":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.OsDiskSizeGB != nil {
osDiskSizeGB := *typedInput.Properties.OsDiskSizeGB
pool.OsDiskSizeGB = &osDiskSizeGB
}
}
// Set property "OsDiskType":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.OsDiskType != nil {
var temp string
temp = string(*typedInput.Properties.OsDiskType)
osDiskType := OSDiskType_STATUS(temp)
pool.OsDiskType = &osDiskType
}
}
// Set property "OsSKU":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.OsSKU != nil {
var temp string
temp = string(*typedInput.Properties.OsSKU)
osSKU := OSSKU_STATUS(temp)
pool.OsSKU = &osSKU
}
}
// Set property "OsType":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.OsType != nil {
var temp string
temp = string(*typedInput.Properties.OsType)
osType := OSType_STATUS(temp)
pool.OsType = &osType
}
}
// Set property "PodSubnetID":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.PodSubnetID != nil {
podSubnetID := *typedInput.Properties.PodSubnetID
pool.PodSubnetID = &podSubnetID
}
}
// Set property "PowerState":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.PowerState != nil {
var powerState1 PowerState_STATUS
err := powerState1.PopulateFromARM(owner, *typedInput.Properties.PowerState)
if err != nil {
return err
}
powerState := powerState1
pool.PowerState = &powerState
}
}
// Set property "PropertiesType":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.Type != nil {
var temp string
temp = string(*typedInput.Properties.Type)
propertiesType := AgentPoolType_STATUS(temp)
pool.PropertiesType = &propertiesType
}
}
// Set property "ProvisioningState":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.ProvisioningState != nil {
provisioningState := *typedInput.Properties.ProvisioningState
pool.ProvisioningState = &provisioningState
}
}
// Set property "ProximityPlacementGroupID":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.ProximityPlacementGroupID != nil {
proximityPlacementGroupID := *typedInput.Properties.ProximityPlacementGroupID
pool.ProximityPlacementGroupID = &proximityPlacementGroupID
}
}
// Set property "ScaleSetEvictionPolicy":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.ScaleSetEvictionPolicy != nil {
var temp string
temp = string(*typedInput.Properties.ScaleSetEvictionPolicy)
scaleSetEvictionPolicy := ScaleSetEvictionPolicy_STATUS(temp)
pool.ScaleSetEvictionPolicy = &scaleSetEvictionPolicy
}
}
// Set property "ScaleSetPriority":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.ScaleSetPriority != nil {
var temp string
temp = string(*typedInput.Properties.ScaleSetPriority)
scaleSetPriority := ScaleSetPriority_STATUS(temp)
pool.ScaleSetPriority = &scaleSetPriority
}
}
// Set property "SpotMaxPrice":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.SpotMaxPrice != nil {
spotMaxPrice := *typedInput.Properties.SpotMaxPrice
pool.SpotMaxPrice = &spotMaxPrice
}
}
// Set property "Tags":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.Tags != nil {
pool.Tags = make(map[string]string, len(typedInput.Properties.Tags))
for key, value := range typedInput.Properties.Tags {
pool.Tags[key] = value
}
}
}
// Set property "Type":
if typedInput.Type != nil {
typeVar := *typedInput.Type
pool.Type = &typeVar
}
// Set property "UpgradeSettings":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.UpgradeSettings != nil {
var upgradeSettings1 AgentPoolUpgradeSettings_STATUS
err := upgradeSettings1.PopulateFromARM(owner, *typedInput.Properties.UpgradeSettings)
if err != nil {
return err
}
upgradeSettings := upgradeSettings1
pool.UpgradeSettings = &upgradeSettings
}
}
// Set property "VmSize":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.VmSize != nil {
vmSize := *typedInput.Properties.VmSize
pool.VmSize = &vmSize
}
}
// Set property "VnetSubnetID":
// copying flattened property:
if typedInput.Properties != nil {
if typedInput.Properties.VnetSubnetID != nil {
vnetSubnetID := *typedInput.Properties.VnetSubnetID
pool.VnetSubnetID = &vnetSubnetID
}
}
// No error
return nil
}