// GetMap tries to read a MarshalMap from a PluginConfig.
// If that value is not found defaultValue is returned.
970238
func (reader *PluginConfigReader) GetMap(key string, defaultValue tcontainer.MarshalMap) tcontainer.MarshalMap {
	value, err := reader.WithError.GetMap(key, defaultValue)
	reader.Errors.Push(err)
	return value
}
28312
func (reader PluginConfigReaderWithError) GetURL(key string, defaultValue string) (*url.URL, error) {
	value, err := reader.GetString(key, defaultValue)
	if err != nil {
		return nil, err
	}
	if value == "" {
		return nil, nil
	}
	urlValue, err := url.Parse(value)
	if err != nil {
		return nil, err
	}
	return urlValue, nil
}
1299794
func (a *Client) GetMapName(params *GetMapNameParams) (*GetMapNameOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetMapNameParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "GetMapName",
		Method:             "GET",
		PathPattern:        "/map/{name}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &GetMapNameReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetMapNameOK), nil

}
1035817
func (c *Context) GetQueryMap(key string) (map[string]string, bool) {
	return c.get(c.Request.URL.Query(), key)
}
454070
func (reader *PluginConfigReader) GetURL(key string, defaultValue string) *url.URL {
	value, err := reader.WithError.GetURL(key, defaultValue)
	reader.Errors.Push(err)
	return value
}
258122
func (f *File) GetMapFlat() map[string]string {
	ret := make(map[string]string)

	for _, section := range f.sections {
		name := section.Name()
		if section.name != "" {
			name = fmt.Sprintf("%s%s", name, DefaultNameKeySeparator)
		}

		for _, key := range section.keys {
			ret[fmt.Sprintf("%s%s", name, key)] = f.ValueManipFunc(section.GetRaw(key))
		}
	}

	return ret
}
428926
func GetMap(builder interface{}) map[string]interface{} {
	m := getBuilderMap(builder)
	structType := getBuilderStructType(reflect.TypeOf(builder))

	ret := make(map[string]interface{}, m.Size())

	m.ForEach(func(name string, val ps.Any) {
		list, isList := val.(ps.List)
		if isList {
			arrayType := anyArrayType

			if structType != nil {
				field, ok := (*structType).FieldByName(name)
				if ok {
					arrayType = field.Type
				}
			}

			val = listToSlice(list, arrayType).Interface()
		}

		ret[name] = val
	})

	return ret
}
520776
func (reader PluginConfigReaderWithError) GetStreamMap(key string, defaultValue string) (map[MessageStreamID]string, error) {
	key = reader.config.registerKey(key)
	streamMap := make(map[MessageStreamID]string)
	if defaultValue != "" {
		streamMap[WildcardStreamID] = defaultValue
	}

	if reader.HasValue(key) {
		value, err := reader.config.Settings.StringMap(key)
		if err != nil {
			return nil, err
		}

		for streamName, target := range value {
			streamMap[GetStreamID(streamName)] = target
		}
	}

	return streamMap, nil
}
1365222
func (mmap MarshalMap) Map(key string) (map[interface{}]interface{}, error) {
	val, exists := mmap.Value(key)
	if !exists {
		return nil, fmt.Errorf(`"%s" is not set`, key)
	}

	mapValue, isMap := val.(map[interface{}]interface{})
	if !isMap {
		return nil, fmt.Errorf(`"%s" is expected to be a map`, key)
	}
	return mapValue, nil
}
1092567
func Float64ValueMap(src map[string]*float64) map[string]float64 {
	dst := make(map[string]float64)
	for k, val := range src {
		if val != nil {
			dst[k] = *val
		}
	}
	return dst
}
240686
func (m *ContextManager) GetValue(key interface{}) (
	value interface{}, ok bool) {
	gid, ok := GetGoroutineId()
	if !ok {
		return nil, false
	}

	m.mtx.Lock()
	state, found := m.values[gid]
	m.mtx.Unlock()

	if !found {
		return nil, false
	}
	value, ok = state[key]
	return value, ok
}
613279
func (l *Language) GetStringMapString(key string) map[string]string {
	return cast.ToStringMapString(l.Get(key))
}
614720
func (opts *ListOpts) GetMap() map[string]struct{} {
	ret := make(map[string]struct{})
	for _, k := range *opts.values {
		ret[k] = struct{}{}
	}
	return ret
}
41445
func (v *GuessProtocolStruct) GetMapField() (o map[string]string) {
	if v != nil && v.MapField != nil {
		return v.MapField
	}

	return
}
198165
func (m *MultiMap) Get(key interface{}) (values []interface{}, found bool) {
	values, found = m.m[key]
	return
}
223957
func GetQueryFromMap(params map[string]interface{}) string {
	query := ""
	for k, v := range params {
		query += "&" + k + "="
		switch v.(type) {
		case string:
			query += v.(string)
		case int:
			query += strconv.Itoa(v.(int))
		default:

		}
	}
	if len(query) > 0 {
		query = query[1:]
	}
	return query
}
160859
func (s *regenerationStatistics) GetMap() map[string]*spanstat.SpanStat {
	result := map[string]*spanstat.SpanStat{
		"waitingForLock":         &s.waitingForLock,
		"waitingForCTClean":      &s.waitingForCTClean,
		"policyCalculation":      &s.policyCalculation,
		"proxyConfiguration":     &s.proxyConfiguration,
		"proxyPolicyCalculation": &s.proxyPolicyCalculation,
		"proxyWaitForAck":        &s.proxyWaitForAck,
		"mapSync":                &s.mapSync,
		"prepareBuild":           &s.prepareBuild,
		logfields.BuildDuration:  &s.totalTime,
	}
	for k, v := range s.datapathRealization.GetMap() {
		result[k] = v
	}
	return result
}