func()

in sdk/resourcemanager/storage/armstorage/models_serde.go [578:715]


func (a *AccountProperties) 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", a, err)
	}
	for key, val := range rawMsg {
		var err error
		switch key {
		case "accessTier":
			err = unpopulate(val, "AccessTier", &a.AccessTier)
			delete(rawMsg, key)
		case "accountMigrationInProgress":
			err = unpopulate(val, "AccountMigrationInProgress", &a.AccountMigrationInProgress)
			delete(rawMsg, key)
		case "allowBlobPublicAccess":
			err = unpopulate(val, "AllowBlobPublicAccess", &a.AllowBlobPublicAccess)
			delete(rawMsg, key)
		case "allowCrossTenantReplication":
			err = unpopulate(val, "AllowCrossTenantReplication", &a.AllowCrossTenantReplication)
			delete(rawMsg, key)
		case "allowSharedKeyAccess":
			err = unpopulate(val, "AllowSharedKeyAccess", &a.AllowSharedKeyAccess)
			delete(rawMsg, key)
		case "allowedCopyScope":
			err = unpopulate(val, "AllowedCopyScope", &a.AllowedCopyScope)
			delete(rawMsg, key)
		case "azureFilesIdentityBasedAuthentication":
			err = unpopulate(val, "AzureFilesIdentityBasedAuthentication", &a.AzureFilesIdentityBasedAuthentication)
			delete(rawMsg, key)
		case "blobRestoreStatus":
			err = unpopulate(val, "BlobRestoreStatus", &a.BlobRestoreStatus)
			delete(rawMsg, key)
		case "creationTime":
			err = unpopulateDateTimeRFC3339(val, "CreationTime", &a.CreationTime)
			delete(rawMsg, key)
		case "customDomain":
			err = unpopulate(val, "CustomDomain", &a.CustomDomain)
			delete(rawMsg, key)
		case "dnsEndpointType":
			err = unpopulate(val, "DNSEndpointType", &a.DNSEndpointType)
			delete(rawMsg, key)
		case "defaultToOAuthAuthentication":
			err = unpopulate(val, "DefaultToOAuthAuthentication", &a.DefaultToOAuthAuthentication)
			delete(rawMsg, key)
		case "enableExtendedGroups":
			err = unpopulate(val, "EnableExtendedGroups", &a.EnableExtendedGroups)
			delete(rawMsg, key)
		case "supportsHttpsTrafficOnly":
			err = unpopulate(val, "EnableHTTPSTrafficOnly", &a.EnableHTTPSTrafficOnly)
			delete(rawMsg, key)
		case "isNfsV3Enabled":
			err = unpopulate(val, "EnableNfsV3", &a.EnableNfsV3)
			delete(rawMsg, key)
		case "encryption":
			err = unpopulate(val, "Encryption", &a.Encryption)
			delete(rawMsg, key)
		case "failoverInProgress":
			err = unpopulate(val, "FailoverInProgress", &a.FailoverInProgress)
			delete(rawMsg, key)
		case "geoReplicationStats":
			err = unpopulate(val, "GeoReplicationStats", &a.GeoReplicationStats)
			delete(rawMsg, key)
		case "immutableStorageWithVersioning":
			err = unpopulate(val, "ImmutableStorageWithVersioning", &a.ImmutableStorageWithVersioning)
			delete(rawMsg, key)
		case "isHnsEnabled":
			err = unpopulate(val, "IsHnsEnabled", &a.IsHnsEnabled)
			delete(rawMsg, key)
		case "isLocalUserEnabled":
			err = unpopulate(val, "IsLocalUserEnabled", &a.IsLocalUserEnabled)
			delete(rawMsg, key)
		case "isSkuConversionBlocked":
			err = unpopulate(val, "IsSKUConversionBlocked", &a.IsSKUConversionBlocked)
			delete(rawMsg, key)
		case "isSftpEnabled":
			err = unpopulate(val, "IsSftpEnabled", &a.IsSftpEnabled)
			delete(rawMsg, key)
		case "keyCreationTime":
			err = unpopulate(val, "KeyCreationTime", &a.KeyCreationTime)
			delete(rawMsg, key)
		case "keyPolicy":
			err = unpopulate(val, "KeyPolicy", &a.KeyPolicy)
			delete(rawMsg, key)
		case "largeFileSharesState":
			err = unpopulate(val, "LargeFileSharesState", &a.LargeFileSharesState)
			delete(rawMsg, key)
		case "lastGeoFailoverTime":
			err = unpopulateDateTimeRFC3339(val, "LastGeoFailoverTime", &a.LastGeoFailoverTime)
			delete(rawMsg, key)
		case "minimumTlsVersion":
			err = unpopulate(val, "MinimumTLSVersion", &a.MinimumTLSVersion)
			delete(rawMsg, key)
		case "networkAcls":
			err = unpopulate(val, "NetworkRuleSet", &a.NetworkRuleSet)
			delete(rawMsg, key)
		case "primaryEndpoints":
			err = unpopulate(val, "PrimaryEndpoints", &a.PrimaryEndpoints)
			delete(rawMsg, key)
		case "primaryLocation":
			err = unpopulate(val, "PrimaryLocation", &a.PrimaryLocation)
			delete(rawMsg, key)
		case "privateEndpointConnections":
			err = unpopulate(val, "PrivateEndpointConnections", &a.PrivateEndpointConnections)
			delete(rawMsg, key)
		case "provisioningState":
			err = unpopulate(val, "ProvisioningState", &a.ProvisioningState)
			delete(rawMsg, key)
		case "publicNetworkAccess":
			err = unpopulate(val, "PublicNetworkAccess", &a.PublicNetworkAccess)
			delete(rawMsg, key)
		case "routingPreference":
			err = unpopulate(val, "RoutingPreference", &a.RoutingPreference)
			delete(rawMsg, key)
		case "sasPolicy":
			err = unpopulate(val, "SasPolicy", &a.SasPolicy)
			delete(rawMsg, key)
		case "secondaryEndpoints":
			err = unpopulate(val, "SecondaryEndpoints", &a.SecondaryEndpoints)
			delete(rawMsg, key)
		case "secondaryLocation":
			err = unpopulate(val, "SecondaryLocation", &a.SecondaryLocation)
			delete(rawMsg, key)
		case "statusOfPrimary":
			err = unpopulate(val, "StatusOfPrimary", &a.StatusOfPrimary)
			delete(rawMsg, key)
		case "statusOfSecondary":
			err = unpopulate(val, "StatusOfSecondary", &a.StatusOfSecondary)
			delete(rawMsg, key)
		case "storageAccountSkuConversionStatus":
			err = unpopulate(val, "StorageAccountSKUConversionStatus", &a.StorageAccountSKUConversionStatus)
			delete(rawMsg, key)
		}
		if err != nil {
			return fmt.Errorf("unmarshalling type %T: %v", a, err)
		}
	}
	return nil
}