func (m *policyTransportsMap) UnmarshalJSON(data []byte) error {
	// We can't unmarshal directly into map values because it is not possible to take an address of a map value.
	// So, use a temporary map of pointers-to-slices and convert.
	tmpMap := map[string]*PolicyTransportScopes{}
	if err := paranoidUnmarshalJSONObject(data, func(key string) interface{} {
		// transport can be nil
		transport := transports.Get(key)
		// paranoidUnmarshalJSONObject detects key duplication for us, check just to be safe.
		if _, ok := tmpMap[key]; ok {
			return nil
		}
		ptsWithTransport := policyTransportScopesWithTransport{
			transport: transport,
			dest:      &PolicyTransportScopes{}, // This allocates a new instance on each call.
		}
		tmpMap[key] = ptsWithTransport.dest
		return &ptsWithTransport
	}); err != nil {
		return err
	}
	for key, ptr := range tmpMap {
		(*m)[key] = *ptr
	}
	return nil
}
func (m *policyTransportsMap) UnmarshalJSON(data []byte) error {
	// We can't unmarshal directly into map values because it is not possible to take an address of a map value.
	// So, use a temporary map of pointers-to-slices and convert.
	tmpMap := map[string]*PolicyTransportScopes{}
	if err := paranoidUnmarshalJSONObject(data, func(key string) interface{} {
		// transport can be nil
		transport := transports.Get(key)
		// paranoidUnmarshalJSONObject detects key duplication for us, check just to be safe.
		if _, ok := tmpMap[key]; ok {
			return nil
		}
		ptsWithTransport := policyTransportScopesWithTransport{
			transport: transport,
			dest:      &PolicyTransportScopes{}, // This allocates a new instance on each call.
		}
		tmpMap[key] = ptsWithTransport.dest
		return &ptsWithTransport
	}); err != nil {
		return err
	}
	for key, ptr := range tmpMap {
		(*m)[key] = *ptr
	}
	return nil
}
// UnmarshalJSON implements the json.Unmarshaler interface.