// SassContextGetSourceMapString retrieves the contents of a
// source map
773137
func SassContextGetSourceMapString(goctx SassContext) string {
	s := C.sass_context_get_source_map_string(goctx)
	return C.GoString(s)
}
75239
func (l *Language) GetStringMap(key string) map[string]interface{} {
	return cast.ToStringMap(l.Get(key))
}
1278548
func (self *Otto) CompileWithSourceMap(filename string, src, sm interface{}) (*Script, error) {
	program, err := self.runtime.parse(filename, src, sm)
	if err != nil {
		return nil, err
	}

	cmpl_program := cmpl_parse(program)

	script := &Script{
		version:  scriptVersion,
		program:  cmpl_program,
		filename: filename,
		src:      program.File.Source(),
	}

	return script, nil
}
209287
func MapToResource(resourceMap interface{}, asPointer bool) interface{} {
	b, _ := json.Marshal(&resourceMap)
	m := resourceMap.(map[string]interface{})
	t := m["resourceType"]
	switch t {
	case "Account":
		x := Account{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "AllergyIntolerance":
		x := AllergyIntolerance{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Appointment":
		x := Appointment{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "AppointmentResponse":
		x := AppointmentResponse{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "AuditEvent":
		x := AuditEvent{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Basic":
		x := Basic{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Binary":
		x := Binary{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "BodySite":
		x := BodySite{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Bundle":
		x := Bundle{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "CarePlan":
		x := CarePlan{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Claim":
		x := Claim{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ClaimResponse":
		x := ClaimResponse{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ClinicalImpression":
		x := ClinicalImpression{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Communication":
		x := Communication{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "CommunicationRequest":
		x := CommunicationRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Composition":
		x := Composition{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ConceptMap":
		x := ConceptMap{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Condition":
		x := Condition{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Conformance":
		x := Conformance{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Contract":
		x := Contract{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Coverage":
		x := Coverage{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DataElement":
		x := DataElement{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DetectedIssue":
		x := DetectedIssue{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Device":
		x := Device{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DeviceComponent":
		x := DeviceComponent{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DeviceMetric":
		x := DeviceMetric{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DeviceUseRequest":
		x := DeviceUseRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DeviceUseStatement":
		x := DeviceUseStatement{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DiagnosticOrder":
		x := DiagnosticOrder{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DiagnosticReport":
		x := DiagnosticReport{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DocumentManifest":
		x := DocumentManifest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "DocumentReference":
		x := DocumentReference{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "EligibilityRequest":
		x := EligibilityRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "EligibilityResponse":
		x := EligibilityResponse{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Encounter":
		x := Encounter{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "EnrollmentRequest":
		x := EnrollmentRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "EnrollmentResponse":
		x := EnrollmentResponse{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "EpisodeOfCare":
		x := EpisodeOfCare{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ExplanationOfBenefit":
		x := ExplanationOfBenefit{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "FamilyMemberHistory":
		x := FamilyMemberHistory{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Flag":
		x := Flag{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Goal":
		x := Goal{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Group":
		x := Group{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "HealthcareService":
		x := HealthcareService{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ImagingObjectSelection":
		x := ImagingObjectSelection{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ImagingStudy":
		x := ImagingStudy{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Immunization":
		x := Immunization{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ImmunizationRecommendation":
		x := ImmunizationRecommendation{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ImplementationGuide":
		x := ImplementationGuide{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "List":
		x := List{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Location":
		x := Location{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Media":
		x := Media{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Medication":
		x := Medication{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "MedicationAdministration":
		x := MedicationAdministration{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "MedicationDispense":
		x := MedicationDispense{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "MedicationOrder":
		x := MedicationOrder{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "MedicationStatement":
		x := MedicationStatement{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "MessageHeader":
		x := MessageHeader{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "NamingSystem":
		x := NamingSystem{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "NutritionOrder":
		x := NutritionOrder{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Observation":
		x := Observation{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "OperationDefinition":
		x := OperationDefinition{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "OperationOutcome":
		x := OperationOutcome{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Order":
		x := Order{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "OrderResponse":
		x := OrderResponse{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Organization":
		x := Organization{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Parameters":
		x := Parameters{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Patient":
		x := Patient{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "PaymentNotice":
		x := PaymentNotice{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "PaymentReconciliation":
		x := PaymentReconciliation{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Person":
		x := Person{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Practitioner":
		x := Practitioner{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Procedure":
		x := Procedure{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ProcedureRequest":
		x := ProcedureRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ProcessRequest":
		x := ProcessRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ProcessResponse":
		x := ProcessResponse{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Provenance":
		x := Provenance{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Questionnaire":
		x := Questionnaire{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "QuestionnaireResponse":
		x := QuestionnaireResponse{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ReferralRequest":
		x := ReferralRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "RelatedPerson":
		x := RelatedPerson{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "RiskAssessment":
		x := RiskAssessment{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Schedule":
		x := Schedule{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "SearchParameter":
		x := SearchParameter{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Slot":
		x := Slot{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Specimen":
		x := Specimen{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "StructureDefinition":
		x := StructureDefinition{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Subscription":
		x := Subscription{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "Substance":
		x := Substance{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "SupplyDelivery":
		x := SupplyDelivery{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "SupplyRequest":
		x := SupplyRequest{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "TestScript":
		x := TestScript{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "ValueSet":
		x := ValueSet{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}
	case "VisionPrescription":
		x := VisionPrescription{}
		json.Unmarshal(b, &x)
		if asPointer {
			return &x
		} else {
			return x
		}

	}
	return nil
}
135924
func (m *Debuggee) GetExtSourceContexts() []*v1.ExtendedSourceContext {
	if m != nil {
		return m.ExtSourceContexts
	}
	return nil
}
127876
func (c *Consumer) SourceContent(source string) string {
	for i := range c.sections {
		s := &c.sections[i]
		for i, src := range s.Map.Sources {
			if src == source {
				if i < len(s.Map.SourcesContent) {
					return s.Map.SourcesContent[i]
				}
				break
			}
		}
	}
	return ""
}
1121197
func (r *ReindexSource) Source() (interface{}, error) {
	src, err := r.request.sourceAsMap()
	if err != nil {
		return nil, err
	}
	source, ok := src.(map[string]interface{})
	if !ok {
		return nil, errors.New("unable to use SearchRequest as map[string]interface{}")
	}

	switch len(r.request.indices) {
	case 1:
		source["index"] = r.request.indices[0]
	default:
		source["index"] = r.request.indices
	}
	switch len(r.request.types) {
	case 0:
	case 1:
		source["type"] = r.request.types[0]
	default:
		source["type"] = r.request.types
	}
	if r.remoteInfo != nil {
		src, err := r.remoteInfo.Source()
		if err != nil {
			return nil, err
		}
		source["remote"] = src
	}
	return source, nil
}
613279
func (l *Language) GetStringMapString(key string) map[string]string {
	return cast.ToStringMapString(l.Get(key))
}
20235
func getSourceStreamFromURL(urlStr string, encKeyDB map[string][]prefixSSEPair) (reader io.ReadCloser, err *probe.Error) {
	alias, urlStrFull, _, err := expandAlias(urlStr)
	if err != nil {
		return nil, err.Trace(urlStr)
	}
	sse := getSSE(urlStr, encKeyDB[alias])
	reader, _, err = getSourceStream(alias, urlStrFull, false, sse)
	return reader, err
}
701675
func SassContextGetOutputString(goctx SassContext) string {
	cstr := C.sass_context_get_output_string(goctx)
	defer C.free(unsafe.Pointer(cstr))
	return C.GoString(cstr)
}
393294
func (item *MoreLikeThisQueryItem) FetchSourceContext(fsc *FetchSourceContext) *MoreLikeThisQueryItem {
	item.fsc = fsc
	return item
}
453677
func (r *SearchRequest) sourceAsMap() (interface{}, error) {
	if r.source == nil {
		// Default: No custom source specified
		return r.searchSource.Source()
	}
	switch t := r.source.(type) {
	default:
		body, err := json.Marshal(r.source)
		if err != nil {
			return "", err
		}
		return RawStringQuery(body), nil
	case *SearchSource:
		return t.Source()
	case json.RawMessage:
		return RawStringQuery(string(t)), nil
	case *json.RawMessage:
		return RawStringQuery(string(*t)), nil
	case string:
		return RawStringQuery(t), nil
	case *string:
		if t != nil {
			return RawStringQuery(*t), nil
		}
		return RawStringQuery("{}"), nil
	}
}
1199743
func (t *Template) GetAllAWSSSMPatchBaselineResources() map[string]*resources.AWSSSMPatchBaseline {
	results := map[string]*resources.AWSSSMPatchBaseline{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSSSMPatchBaseline:
			results[name] = resource
		}
	}
	return results
}
303574
func (p *GRPCProvider) getDatasourceSchema(name string) providers.Schema {
	schema := p.getSchema()
	dataSchema, ok := schema.DataSources[name]
	if !ok {
		panic("unknown data source " + name)
	}
	return dataSchema
}
335828
func Convert_v1_StringSourceSpec_To_config_StringSourceSpec(in *v1.StringSourceSpec, out *config.StringSourceSpec, s conversion.Scope) error {
	return autoConvert_v1_StringSourceSpec_To_config_StringSourceSpec(in, out, s)
}
411910
func getSourceStream(alias string, urlStr string, fetchStat bool, sse encrypt.ServerSide) (reader io.ReadCloser, metadata map[string]string, err *probe.Error) {
	sourceClnt, err := newClientFromAlias(alias, urlStr)
	if err != nil {
		return nil, nil, err.Trace(alias, urlStr)
	}
	reader, err = sourceClnt.Get(sse)
	if err != nil {
		return nil, nil, err.Trace(alias, urlStr)
	}
	metadata = make(map[string]string)
	if fetchStat {
		st, err := sourceClnt.Stat(false, true, sse)
		if err != nil {
			return nil, nil, err.Trace(alias, urlStr)
		}
		for k, v := range st.Metadata {
			if httpguts.ValidHeaderFieldName(k) &&
				httpguts.ValidHeaderFieldValue(v) {
				metadata[k] = v
			}
		}
		// If our reader is a seeker try to detect content-type further.
		if s, ok := reader.(io.ReadSeeker); ok {
			// All unrecognized files have `application/octet-stream`
			// So we continue our detection process.
			if ctype := metadata["Content-Type"]; ctype == "application/octet-stream" {
				// Read a chunk to decide between utf-8 text and binary
				var buf [512]byte
				n, _ := io.ReadFull(reader, buf[:])
				if n > 0 {
					kind, e := filetype.Match(buf[:n])
					if e != nil {
						return nil, nil, probe.NewError(e)
					}
					// rewind to output whole file
					if _, e := s.Seek(0, io.SeekStart); e != nil {
						return nil, nil, probe.NewError(e)
					}
					ctype = kind.MIME.Value
					if ctype == "" {
						ctype = "application/octet-stream"
					}
					metadata["Content-Type"] = ctype
				}
			}
		}
	}
	return reader, metadata, nil
}
1173072
func (r Resource_Metadata) GetServiceResource(serviceName *string, index *int) (resp string, err error) {
	params := []interface{}{
		serviceName,
		index,
	}
	err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getServiceResource", params, &r.Options, &resp)
	return
}