func()

in sdk/resourcemanager/oracledatabase/armoracledatabase/models_serde.go [2458:2616]


func (c *CloudVMClusterProperties) UnmarshalJSON(data []byte) error {
	var rawMsg map[string]json.RawMessage
	if err := json.Unmarshal(data, &rawMsg); err != nil {
		return fmt.Errorf("unmarshalling type %T: %v", c, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "backupSubnetCidr":
			err = unpopulate(val, "BackupSubnetCidr", &c.BackupSubnetCidr)
			delete(rawMsg, key)
		case "cpuCoreCount":
			err = unpopulate(val, "CPUCoreCount", &c.CPUCoreCount)
			delete(rawMsg, key)
		case "cloudExadataInfrastructureId":
			err = unpopulate(val, "CloudExadataInfrastructureID", &c.CloudExadataInfrastructureID)
			delete(rawMsg, key)
		case "clusterName":
			err = unpopulate(val, "ClusterName", &c.ClusterName)
			delete(rawMsg, key)
		case "compartmentId":
			err = unpopulate(val, "CompartmentID", &c.CompartmentID)
			delete(rawMsg, key)
		case "computeNodes":
			err = unpopulate(val, "ComputeNodes", &c.ComputeNodes)
			delete(rawMsg, key)
		case "dataCollectionOptions":
			err = unpopulate(val, "DataCollectionOptions", &c.DataCollectionOptions)
			delete(rawMsg, key)
		case "dataStoragePercentage":
			err = unpopulate(val, "DataStoragePercentage", &c.DataStoragePercentage)
			delete(rawMsg, key)
		case "dataStorageSizeInTbs":
			err = unpopulate(val, "DataStorageSizeInTbs", &c.DataStorageSizeInTbs)
			delete(rawMsg, key)
		case "dbNodeStorageSizeInGbs":
			err = unpopulate(val, "DbNodeStorageSizeInGbs", &c.DbNodeStorageSizeInGbs)
			delete(rawMsg, key)
		case "dbServers":
			err = unpopulate(val, "DbServers", &c.DbServers)
			delete(rawMsg, key)
		case "diskRedundancy":
			err = unpopulate(val, "DiskRedundancy", &c.DiskRedundancy)
			delete(rawMsg, key)
		case "displayName":
			err = unpopulate(val, "DisplayName", &c.DisplayName)
			delete(rawMsg, key)
		case "domain":
			err = unpopulate(val, "Domain", &c.Domain)
			delete(rawMsg, key)
		case "giVersion":
			err = unpopulate(val, "GiVersion", &c.GiVersion)
			delete(rawMsg, key)
		case "hostname":
			err = unpopulate(val, "Hostname", &c.Hostname)
			delete(rawMsg, key)
		case "iormConfigCache":
			err = unpopulate(val, "IormConfigCache", &c.IormConfigCache)
			delete(rawMsg, key)
		case "isLocalBackupEnabled":
			err = unpopulate(val, "IsLocalBackupEnabled", &c.IsLocalBackupEnabled)
			delete(rawMsg, key)
		case "isSparseDiskgroupEnabled":
			err = unpopulate(val, "IsSparseDiskgroupEnabled", &c.IsSparseDiskgroupEnabled)
			delete(rawMsg, key)
		case "lastUpdateHistoryEntryId":
			err = unpopulate(val, "LastUpdateHistoryEntryID", &c.LastUpdateHistoryEntryID)
			delete(rawMsg, key)
		case "licenseModel":
			err = unpopulate(val, "LicenseModel", &c.LicenseModel)
			delete(rawMsg, key)
		case "lifecycleDetails":
			err = unpopulate(val, "LifecycleDetails", &c.LifecycleDetails)
			delete(rawMsg, key)
		case "lifecycleState":
			err = unpopulate(val, "LifecycleState", &c.LifecycleState)
			delete(rawMsg, key)
		case "listenerPort":
			err = unpopulate(val, "ListenerPort", &c.ListenerPort)
			delete(rawMsg, key)
		case "memorySizeInGbs":
			err = unpopulate(val, "MemorySizeInGbs", &c.MemorySizeInGbs)
			delete(rawMsg, key)
		case "nodeCount":
			err = unpopulate(val, "NodeCount", &c.NodeCount)
			delete(rawMsg, key)
		case "nsgCidrs":
			err = unpopulate(val, "NsgCidrs", &c.NsgCidrs)
			delete(rawMsg, key)
		case "nsgUrl":
			err = unpopulate(val, "NsgURL", &c.NsgURL)
			delete(rawMsg, key)
		case "ociUrl":
			err = unpopulate(val, "OciURL", &c.OciURL)
			delete(rawMsg, key)
		case "ocid":
			err = unpopulate(val, "Ocid", &c.Ocid)
			delete(rawMsg, key)
		case "ocpuCount":
			err = unpopulate(val, "OcpuCount", &c.OcpuCount)
			delete(rawMsg, key)
		case "provisioningState":
			err = unpopulate(val, "ProvisioningState", &c.ProvisioningState)
			delete(rawMsg, key)
		case "sshPublicKeys":
			err = unpopulate(val, "SSHPublicKeys", &c.SSHPublicKeys)
			delete(rawMsg, key)
		case "scanDnsName":
			err = unpopulate(val, "ScanDNSName", &c.ScanDNSName)
			delete(rawMsg, key)
		case "scanDnsRecordId":
			err = unpopulate(val, "ScanDNSRecordID", &c.ScanDNSRecordID)
			delete(rawMsg, key)
		case "scanIpIds":
			err = unpopulate(val, "ScanIPIDs", &c.ScanIPIDs)
			delete(rawMsg, key)
		case "scanListenerPortTcp":
			err = unpopulate(val, "ScanListenerPortTCP", &c.ScanListenerPortTCP)
			delete(rawMsg, key)
		case "scanListenerPortTcpSsl":
			err = unpopulate(val, "ScanListenerPortTCPSSL", &c.ScanListenerPortTCPSSL)
			delete(rawMsg, key)
		case "shape":
			err = unpopulate(val, "Shape", &c.Shape)
			delete(rawMsg, key)
		case "storageSizeInGbs":
			err = unpopulate(val, "StorageSizeInGbs", &c.StorageSizeInGbs)
			delete(rawMsg, key)
		case "subnetId":
			err = unpopulate(val, "SubnetID", &c.SubnetID)
			delete(rawMsg, key)
		case "subnetOcid":
			err = unpopulate(val, "SubnetOcid", &c.SubnetOcid)
			delete(rawMsg, key)
		case "systemVersion":
			err = unpopulate(val, "SystemVersion", &c.SystemVersion)
			delete(rawMsg, key)
		case "timeCreated":
			err = unpopulateDateTimeRFC3339(val, "TimeCreated", &c.TimeCreated)
			delete(rawMsg, key)
		case "timeZone":
			err = unpopulate(val, "TimeZone", &c.TimeZone)
			delete(rawMsg, key)
		case "vipIds":
			err = unpopulate(val, "VipIDs", &c.VipIDs)
			delete(rawMsg, key)
		case "vnetId":
			err = unpopulate(val, "VnetID", &c.VnetID)
			delete(rawMsg, key)
		case "zoneId":
			err = unpopulate(val, "ZoneID", &c.ZoneID)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", c, err)
		}
	}
	return nil
}