// Retrieve populates dst as property.Collector.Retrieve does, for all entities in the view of types specified by kind.
338158
func (v ContainerView) Retrieve(ctx context.Context, kind []string, ps []string, dst interface{}) error {
	pc := property.DefaultCollector(v.Client())

	ospec := types.ObjectSpec{
		Obj:  v.Reference(),
		Skip: types.NewBool(true),
		SelectSet: []types.BaseSelectionSpec{
			&types.TraversalSpec{
				Type: v.Reference().Type,
				Path: "view",
			},
		},
	}

	var pspec []types.PropertySpec

	if len(kind) == 0 {
		kind = []string{"ManagedEntity"}
	}

	for _, t := range kind {
		spec := types.PropertySpec{
			Type: t,
		}

		if len(ps) == 0 {
			spec.All = types.NewBool(true)
		} else {
			spec.PathSet = ps
		}

		pspec = append(pspec, spec)
	}

	req := types.RetrieveProperties{
		SpecSet: []types.PropertyFilterSpec{
			{
				ObjectSet: []types.ObjectSpec{ospec},
				PropSet:   pspec,
			},
		},
	}

	res, err := pc.RetrieveProperties(ctx, req)
	if err != nil {
		return err
	}

	if d, ok := dst.(*[]types.ObjectContent); ok {
		*d = res.Returnval
		return nil
	}

	return mo.LoadRetrievePropertiesResponse(res, dst)
}
319991
func Get(typ, format string) ([]byte, error) {
	switch typ {
	case "date-only":
		return get("date_only.go")
	case "time-only":
		return get("time_only.go")
	case "datetime-only":
		return get("datetime_only.go")
	case "datetime":
		if format == "" || strings.ToUpper(format) == "RFC3339" {
			return get("datetime.go")
		} else if strings.ToUpper(format) == "RFC2616" {
			return get("datetime_rfc2616.go")
		}
	}
	return []byte{}, fmt.Errorf("unrecognized combination of type :%v format : %v", typ, format)
}
451216
func (e *EnvAWS) Retrieve() (Value, error) {
	e.retrieved = false

	id := os.Getenv("AWS_ACCESS_KEY_ID")
	if id == "" {
		id = os.Getenv("AWS_ACCESS_KEY")
	}

	secret := os.Getenv("AWS_SECRET_ACCESS_KEY")
	if secret == "" {
		secret = os.Getenv("AWS_SECRET_KEY")
	}

	signerType := SignatureV4
	if id == "" || secret == "" {
		signerType = SignatureAnonymous
	}

	e.retrieved = true
	return Value{
		AccessKeyID:     id,
		SecretAccessKey: secret,
		SessionToken:    os.Getenv("AWS_SESSION_TOKEN"),
		SignerType:      signerType,
	}, nil
}
1277729
func (s *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
	_, _, _, _, mapping, err := s.getRelatedObjects(ctx, name, options)
	return mapping, err
}
867096
func (self *InvoiceItemClient) Retrieve(id string) (*InvoiceItem, error) {
	item := InvoiceItem{}
	path := "/v1/invoiceitems/" + url.QueryEscape(id)
	err := query("GET", path, nil, &item)
	return &item, err
}
1107228
func (s *storeImpl) Get(ctx datastore.Context) (*StoredProperties, error) {
	val := &StoredProperties{}
	if err := s.ds.Get(ctx, Key(propsID), val); err != nil {
		return nil, err
	}
	return val, nil
}
676513
func (s Schema) RetrieveColumn(col *Column) *Column {
	index := s.GetColumnIndex(col)
	if index != -1 {
		return s.Columns[index]
	}
	return nil
}
864860
func (db *DB) RetrieveDiff(timestamp int64) (float64, error) {
	var diff float64
	err := db.QueryRow(db.getDifficulty, timestamp).Scan(&diff)
	return diff, err
}
998750
func (r *GenResult) RetrieveAsValue() (reflect.Value, bool) {
	if r.Result != nil && (r.Sieve == nil || r.Sieve(r.Result)) {
		return reflect.ValueOf(r.Result), true
	} else if r.Result == nil && r.Sieve != nil && r.Sieve(r.Result) {
		return reflect.Zero(r.ResultType), true
	}
	return reflect.Zero(r.ResultType), false
}
1232941
func (p Provider) Retrieve() (credentials.Value, error) {
	creds := credentials.Value{
		ProviderName: ProviderName,
	}

	k, s, t, err := p.RetrieveFn()
	if err != nil {
		return creds, awserr.New(ErrCodePluginProviderRetrieve,
			"failed to retrieve credentials with plugin provider", err)
	}

	creds.AccessKeyID = k
	creds.SecretAccessKey = s
	creds.SessionToken = t

	return creds, nil
}
988485
func (self *PlanClient) Retrieve(id string) (*Plan, error) {
	plan := Plan{}
	path := "/v1/plans/" + url.QueryEscape(id)
	err := query("GET", path, nil, &plan)
	return &plan, err
}
1051388
func (r *PrevRevisions) Get(key string) (found bool, value datasync.KeyVal) {
	r.mu.RLock()
	prev, found := r.revisions[key]
	r.mu.RUnlock()

	return found, prev
}
307299
func (s *service) Retrieve(publicId string) (resDTO rest.ResponseDTO, error *servicehelper.Error) {
	entity, err := s.repo.FindByPublicId(publicId)
	if err != nil {
		return rest.ResponseDTO{}, &servicehelper.Error{Detail: errors.New("no result found"), Code: servicehelper.NotFound}
	}
	return createDTOFromEntity(entity)
}
668135
func retrieveTxPerDay(ctx context.Context, db *sql.DB, timeArr []dbtypes.TimeDef,
	txCountArr []uint64) ([]dbtypes.TimeDef, []uint64, error) {
	var since time.Time

	if c := len(timeArr); c > 0 {
		since = timeArr[c-1].T

		// delete the last entry to avoid duplicates
		timeArr = timeArr[:c-1]
		txCountArr = txCountArr[:c-1]
	}

	rows, err := db.QueryContext(ctx, internal.SelectTxsPerDay, since)
	if err != nil {
		return timeArr, txCountArr, err
	}

	defer closeRows(rows)

	for rows.Next() {
		var blockTime time.Time
		var count uint64
		if err = rows.Scan(&blockTime, &count); err != nil {
			return timeArr, txCountArr, err
		}

		timeArr = append(timeArr, dbtypes.NewTimeDef(blockTime))
		txCountArr = append(txCountArr, count)
	}
	return timeArr, txCountArr, nil
}
432206
func (s *FTLStorage) Get(mctx libkb.MetaContext, teamID keybase1.TeamID, public bool) *keybase1.FastTeamData {
	vp := s.storageGeneric.get(mctx, teamID, public)
	if vp == nil {
		return nil
	}
	ret, ok := vp.(*keybase1.FastTeamData)
	if !ok {
		mctx.Debug("teams.FTLStorage#Get cast error: %T is wrong type", vp)
	}
	return ret
}
1021878
func (om *OrdMap) Get(key interface{}) interface{} {
	rkey := ty.AssertType(key, om.ktype)
	rval := om.m.MapIndex(rkey)
	if !rval.IsValid() {
		return om.zeroValue().Interface()
	}
	return rval.Interface()
}
728446
func (p *ApplicationCredentialsProvider) Retrieve() (Value, error) {
	p.retrieved = false

	filename, err := p.filename()
	if err != nil {
		return Value{}, err
	}

	f, err := os.Open(filename)
	if err != nil {
		return Value{}, err
	}
	defer f.Close()

	creds := Value{}
	if err := json.NewDecoder(f).Decode(&creds); err != nil {
		return Value{}, err
	}

	p.retrieved = true
	return creds, nil
}