// ExtractGetRankingInfo returns the first found GetRankingInfoOption from the
// given variadic arguments or nil otherwise.
195286
func ExtractGetRankingInfo(opts ...interface{}) *opt.GetRankingInfoOption {
	for _, o := range opts {
		if v, ok := o.(*opt.GetRankingInfoOption); ok {
			return v
		}
	}
	return nil
}
328648
func ExtractInsidePolygon(opts ...interface{}) *opt.InsidePolygonOption {
	for _, o := range opts {
		if v, ok := o.(*opt.InsidePolygonOption); ok {
			return v
		}
	}
	return nil
}
232173
func (t *SecondaryTree) Get(k ServiceInfo) (v *FinalizerList, ok bool) {
	q := t.r
	if q == nil {
		return
	}

	for {
		var i int
		if i, ok = t.find(q, k); ok {
			switch x := q.(type) {
			case *x2:
				q = x.x[i+1].ch
				continue
			case *d2:
				return x.d[i].v, true
			}
		}
		switch x := q.(type) {
		case *x2:
			q = x.x[i].ch
		default:
			return
		}
	}
}
405104
func GetAllACIInfos(tx *sql.Tx, sortfields []string, ascending bool) ([]*ACIInfo, error) {
	var aciinfos []*ACIInfo
	query := "SELECT * from aciinfo"
	if len(sortfields) > 0 {
		query += fmt.Sprintf(" ORDER BY %s ", strings.Join(sortfields, ", "))
		if ascending {
			query += "ASC"
		} else {
			query += "DESC"
		}
	}
	rows, err := tx.Query(query)
	if err != nil {
		return nil, err
	}
	defer rows.Close()
	for rows.Next() {
		aciinfo := &ACIInfo{}
		if err := aciinfoRowScan(rows, aciinfo); err != nil {
			return nil, err
		}
		aciinfos = append(aciinfos, aciinfo)
	}
	if err := rows.Err(); err != nil {
		return nil, err
	}
	return aciinfos, err
}
524938
func (s *ServiceOfferingService) GetServiceOfferingID(name string, opts ...OptionFunc) (string, int, error) {
	p := &ListServiceOfferingsParams{}
	p.p = make(map[string]interface{})

	p.p["name"] = name

	for _, fn := range append(s.cs.options, opts...) {
		if err := fn(s.cs, p); err != nil {
			return "", -1, err
		}
	}

	l, err := s.ListServiceOfferings(p)
	if err != nil {
		return "", -1, err
	}

	if l.Count == 0 {
		return "", l.Count, fmt.Errorf("No match found for %s: %+v", name, l)
	}

	if l.Count == 1 {
		return l.ServiceOfferings[0].Id, l.Count, nil
	}

	if l.Count > 1 {
		for _, v := range l.ServiceOfferings {
			if v.Name == name {
				return v.Id, l.Count, nil
			}
		}
	}
	return "", l.Count, fmt.Errorf("Could not find an exact match for %s: %+v", name, l)
}
716403
func GetQuery(req *http.Request, key string) []string {
	if ok, value := extractQueries(req); ok {
		return value[key]
	}
	return nil
}
43339
func ExtractRestrictSearchableAttributes(opts ...interface{}) *opt.RestrictSearchableAttributesOption {
	for _, o := range opts {
		if v, ok := o.(*opt.RestrictSearchableAttributesOption); ok {
			return v
		}
	}
	return nil
}
1062268
func (bridge *Bridge) GetInfo() error {
	_, reader, err := bridge.Get("/description.xml")
	if err != nil {
		return err
	}
	data := BridgeInfo{}
	err = xml.NewDecoder(reader).Decode(&data)
	if err != nil {
		err = errors.New("Error: Unable to decode XML response from bridge. ")
		return err
	}
	bridge.Info = data
	return nil
}
4818
func (s *ObjectsClient) GetInfo(ctx context.Context, input *GetInfoInput) (*GetInfoOutput, error) {
	absPath := absFileInput(s.client.AccountName, input.ObjectPath)

	headers := &http.Header{}
	for key, value := range input.Headers {
		headers.Set(key, value)
	}

	reqInput := client.RequestInput{
		Method:  http.MethodHead,
		Path:    string(absPath),
		Headers: headers,
	}
	_, respHeaders, err := s.client.ExecuteRequestStorage(ctx, reqInput)
	if err != nil {
		return nil, errors.Wrap(err, "unable to get info")
	}

	response := &GetInfoOutput{
		ContentType: respHeaders.Get("Content-Type"),
		ContentMD5:  respHeaders.Get("Content-MD5"),
		ETag:        respHeaders.Get("Etag"),
	}

	lastModified, err := time.Parse(time.RFC1123, respHeaders.Get("Last-Modified"))
	if err == nil {
		response.LastModified = lastModified
	}

	contentLength, err := strconv.ParseUint(respHeaders.Get("Content-Length"), 10, 64)
	if err == nil {
		response.ContentLength = contentLength
	}

	metadata := map[string]string{}
	for key, values := range respHeaders {
		if strings.HasPrefix(key, "m-") {
			metadata[key] = strings.Join(values, ", ")
		}
	}
	response.Metadata = metadata

	return response, nil
}
887697
func (u URI) GetOption(k string) string {
	return u.options.Get(k)
}
1281202
func ExtractAttributeForDistinct(opts ...interface{}) *opt.AttributeForDistinctOption {
	for _, o := range opts {
		if v, ok := o.(*opt.AttributeForDistinctOption); ok {
			return v
		}
	}
	return nil
}
492713
func ExtractNumericAttributesForFiltering(opts ...interface{}) *opt.NumericAttributesForFilteringOption {
	for _, o := range opts {
		if v, ok := o.(*opt.NumericAttributesForFilteringOption); ok {
			return v
		}
	}
	return nil
}
453610
func getInfo(t syscall.Token, class uint32, initSize int) (unsafe.Pointer, error) {
	b := make([]byte, initSize)
	var n uint32
	e := syscall.GetTokenInformation(t, class, &b[0], uint32(len(b)), &n)
	if e != nil {
		if e != syscall.ERROR_INSUFFICIENT_BUFFER {
			return nil, e
		}
		// make receive buffers of requested size and try again
		b = make([]byte, n)
		e = syscall.GetTokenInformation(t, class, &b[0], uint32(len(b)), &n)
		if e != nil {
			return nil, e
		}
	}
	return unsafe.Pointer(&b[0]), nil
}
407484
func MapGetByRankRangeOp(binName string, rank int, returnType mapReturnType) *Operation {
	return newCDTCreateOperationValue1(_CDT_MAP_GET_BY_RANK_RANGE, _MAP_READ, binName, rank, returnType)
}
1272727
func (c *Ctx) GetInfo() (Info, error) {
	var p C.ckInfo
	e := C.GetInfo(c.ctx, &p)
	i := Info{
		CryptokiVersion:    toVersion(p.cryptokiVersion),
		ManufacturerID:     strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&p.manufacturerID[0]), 32)), " "),
		Flags:              uint(p.flags),
		LibraryDescription: strings.TrimRight(string(C.GoBytes(unsafe.Pointer(&p.libraryDescription[0]), 32)), " "),
		LibraryVersion:     toVersion(p.libraryVersion),
	}
	return i, toError(e)
}
478564
func extractRequestInfo(ctx context.Context) (*RequestJSON, *http.Request) {
	if req := getRequestIfPresent(ctx); req != nil {
		return extractRequestInfoFromReq(req), req
	}
	return nil, nil
}
1026688
func GetInfo(path string) (info Info, err error) {
	s := syscall.Statfs_t{}
	err = syscall.Statfs(path, &s)
	if err != nil {
		return Info{}, err
	}
	reservedBlocks := uint64(s.Bfree) - uint64(s.Bavail)
	info = Info{
		Total:  uint64(s.Bsize) * (uint64(s.Blocks) - reservedBlocks),
		Free:   uint64(s.Bsize) * uint64(s.Bavail),
		Files:  uint64(s.Files),
		Ffree:  uint64(s.Ffree),
		FSType: getFSType(s.Fstypename[:]),
	}
	return info, nil
}