signature/policy_config.go
func (m *policyTransportScopesWithTransport) 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]*PolicyRequirements{}
	if err := paranoidUnmarshalJSONObject(data, func(key string) interface{} {
		// paranoidUnmarshalJSONObject detects key duplication for us, check just to be safe.
		if _, ok := tmpMap[key]; ok {
			return nil
		}
		if key != "" && m.transport != nil {
			if err := m.transport.ValidatePolicyConfigurationScope(key); err != nil {
				return nil
			}
		}
		ptr := &PolicyRequirements{} // This allocates a new instance on each call.
		tmpMap[key] = ptr
		return ptr
	}); err != nil {
		return err
	}
	for key, ptr := range tmpMap {
		(*m.dest)[key] = *ptr
	}
	return nil
}
func (m *policyTransportScopesWithTransport) 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]*PolicyRequirements{}
	if err := paranoidUnmarshalJSONObject(data, func(key string) interface{} {
		// paranoidUnmarshalJSONObject detects key duplication for us, check just to be safe.
		if _, ok := tmpMap[key]; ok {
			return nil
		}
		if key != "" && m.transport != nil {
			if err := m.transport.ValidatePolicyConfigurationScope(key); err != nil {
				return nil
			}
		}
		ptr := &PolicyRequirements{} // This allocates a new instance on each call.
		tmpMap[key] = ptr
		return ptr
	}); err != nil {
		return err
	}
	for key, ptr := range tmpMap {
		(*m.dest)[key] = *ptr
	}
	return nil
}
// UnmarshalJSON implements the json.Unmarshaler interface.