// GetObject reads a record for specified key and puts the result into the provided object.
// The policy can be used to specify timeouts.
// If the policy is nil, the default relevant policy will be used.
196023
func (clnt *Client) GetObject(policy *BasePolicy, key *Key, obj interface{}) error {
	policy = clnt.getUsablePolicy(policy)

	rval := reflect.ValueOf(obj)
	binNames := objectMappings.getFields(rval.Type())

	command := newReadCommand(clnt.cluster, policy, key, binNames)
	command.object = &rval
	return command.Execute()
}
265479
func (r *Record) Get(key string) (value interface{}, err error) {
	value, ok := r.Data[key]
	if !ok {
		value = ""
	}
	return
}
499879
func (rdb *RethinkDBKeyStore) GetKey(keyID string) data.PublicKey {
	dbPrivateKey, _, err := rdb.getKey(keyID)
	if err != nil {
		return nil
	}

	return data.NewPublicKey(dbPrivateKey.Algorithm, dbPrivateKey.Public)
}
485087
func (clnt *Client) GetHeader(policy *BasePolicy, key *Key) (*Record, error) {
	policy = clnt.getUsablePolicy(policy)

	command := newReadHeaderCommand(clnt.cluster, policy, key)
	if err := command.Execute(); err != nil {
		return nil, err
	}
	return command.GetRecord(), nil
}
1153740
func (_class BlobClass) GetRecord(sessionID SessionRef, self BlobRef) (_retval BlobRecord, _err error) {
	_method := "blob.get_record"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertBlobRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertBlobRecordToGo(_method + " -> ", _result.Value)
	return
}
337566
func GetTemplateMetaObject(obj runtime.Object) (metav1.Object, bool) {
	switch r := obj.(type) {
	case *kapiv1.PodTemplate:
		return &r.Template.ObjectMeta, true
	case *kapiv1.ReplicationController:
		if r.Spec.Template != nil {
			return &r.Spec.Template.ObjectMeta, true
		}
	case *extensionsv1beta1.DaemonSet:
		return &r.Spec.Template.ObjectMeta, true
	case *extensionsv1beta1.Deployment:
		return &r.Spec.Template.ObjectMeta, true
	case *extensionsv1beta1.ReplicaSet:
		return &r.Spec.Template.ObjectMeta, true
	case *batchv1.Job:
		return &r.Spec.Template.ObjectMeta, true
	case *batchv2alpha1.CronJob:
		return &r.Spec.JobTemplate.Spec.Template.ObjectMeta, true
	case *batchv2alpha1.JobTemplate:
		return &r.Template.Spec.Template.ObjectMeta, true
	case *appsv1beta1.StatefulSet:
		return &r.Spec.Template.ObjectMeta, true
	case *appsv1beta1.Deployment:
		return &r.Spec.Template.ObjectMeta, true
	case *securityapiv1.PodSecurityPolicySubjectReview:
		return &r.Spec.Template.ObjectMeta, true
	case *securityapiv1.PodSecurityPolicySelfSubjectReview:
		return &r.Spec.Template.ObjectMeta, true
	case *securityapiv1.PodSecurityPolicyReview:
		return &r.Spec.Template.ObjectMeta, true
	case *appsapiv1.DeploymentConfig:
		if r.Spec.Template != nil {
			return &r.Spec.Template.ObjectMeta, true
		}
	case *kapi.PodTemplate:
		return &r.Template.ObjectMeta, true
	case *kapi.ReplicationController:
		if r.Spec.Template != nil {
			return &r.Spec.Template.ObjectMeta, true
		}
	case *apps.DaemonSet:
		return &r.Spec.Template.ObjectMeta, true
	case *apps.Deployment:
		return &r.Spec.Template.ObjectMeta, true
	case *apps.ReplicaSet:
		return &r.Spec.Template.ObjectMeta, true
	case *batch.Job:
		return &r.Spec.Template.ObjectMeta, true
	case *batch.CronJob:
		return &r.Spec.JobTemplate.Spec.Template.ObjectMeta, true
	case *batch.JobTemplate:
		return &r.Template.Spec.Template.ObjectMeta, true
	case *apps.StatefulSet:
		return &r.Spec.Template.ObjectMeta, true
	case *securityapi.PodSecurityPolicySubjectReview:
		return &r.Spec.Template.ObjectMeta, true
	case *securityapi.PodSecurityPolicySelfSubjectReview:
		return &r.Spec.Template.ObjectMeta, true
	case *securityapi.PodSecurityPolicyReview:
		return &r.Spec.Template.ObjectMeta, true
	case *appsapi.DeploymentConfig:
		if r.Spec.Template != nil {
			return &r.Spec.Template.ObjectMeta, true
		}
	}
	return nil, false
}
129085
func (s *storeImpl) Get(key string) (interface{}, bool) {
	s.mutex.RLock()
	defer s.mutex.RUnlock()

	object, ok := s.objects[key]
	if !ok {
		return nil, false
	}

	return object.contents, true
}
982792
func (client *GCSBlobstore) getObjectHandle(gcs *storage.Client, src string) *storage.ObjectHandle {
	handle := gcs.Bucket(client.config.BucketName).Object(src)
	if client.config.EncryptionKey != nil {
		handle = handle.Key(client.config.EncryptionKey)
	}
	return handle
}
808994
func (c *ExpirationCache) Get(obj interface{}) (interface{}, bool, error) {
	key, err := c.keyFunc(obj)
	if err != nil {
		return nil, false, KeyError{obj, err}
	}
	obj, exists := c.getOrExpire(key)
	return obj, exists, nil
}
1127792
func (m *lockingMap) Get(key string) (interface{}, bool) {
	m.keyLocker.RLock(key)
	defer m.keyLocker.RUnlock(key)

	m.lock.RLock()
	defer m.lock.RUnlock()

	val, ok := m.data[key]
	if ok && (m.checkFunc == nil || m.checkFunc(key, val)) {
		return val, true
	} else {
		// No value or it failed to check
		return nil, false
	}
}
1006004
func (svc *DynamoAccessor) Get(ctx context.Context,
	keyPath string,
	destObject interface{}) error {
	getItemInput := &dynamodb.GetItemInput{
		TableName: aws.String(svc.dynamoTableName()),
		Key:       dynamoKeyValueAttrMap(keyPath),
	}

	getItemResult, getItemResultErr := svc.dynamoSvc(ctx).GetItemWithContext(ctx, getItemInput)
	if getItemResultErr != nil {
		return getItemResultErr
	}
	return dynamodbattribute.UnmarshalMap(getItemResult.Item, destObject)
}
919937
func (i *Index) GetObjects(objectIDs []string, objects interface{}, opts ...interface{}) error {
	var (
		attributesToRetrieve = iopt.ExtractAttributesToRetrieve(opts...)
		requests             = make([]getObjectsReq, len(objectIDs))
		body                 = map[string]interface{}{"requests": requests}
		res                  = getObjectsRes{objects}
	)

	for j, objectID := range objectIDs {
		requests[j] = getObjectsReq{
			IndexName:            i.name,
			ObjectID:             objectID,
			AttributesToRetrieve: attributesToRetrieve,
		}
	}

	path := "/1/indexes/*/objects"
	return i.transport.Request(&res, http.MethodPost, path, body, call.Read, opts...)
}
872597
func getObjectDatabase() (*gitobj.ObjectDatabase, error) {
	dir, err := git.GitCommonDir()
	if err != nil {
		return nil, errors.Wrap(err, "cannot open root")
	}
	return gitobj.FromFilesystem(filepath.Join(dir, "objects"), cfg.TempDir())
}
375850
func getObjectJson(cmd *Command, resp []byte, isJobResult bool) (objJson []byte, err error) {

	var respBody []byte

	if isJobResult {
		respBody = resp
	} else {
		respBody, err = getResponseContent(cmd, resp)
		if err != nil {
			return nil, err
		}
		if cmd.IsAsync {
			// return jobid
			return respBody, nil
		}
	}

	switch cmd.ObjectType {
	case "result":
		return respBody, nil
	default:
		respBodyMap, err := convertJsonToMap(respBody)
		if err != nil {
			return nil, err
		}

		objJson, ok := respBodyMap[cmd.ObjectType]
		if !ok {
			if errortext := getErrorText(respBodyMap); errortext != "" {
				return nil, errors.New(errortext)
			}
			// respBodyMap can be empty. For example, list api returns nothing.
			if len(respBodyMap) == 0 {
				return nil, nil
			}
			// Type can be null. For example, destroyvirtualmachine is executed with expunge=true
			if objJson, ok := respBodyMap["null"]; ok {
				return objJson, nil
			}
			return nil, fmt.Errorf(
				"Unexpected format: response doesn't contain %s or errortext",
				cmd.ObjectType)
		}
		return objJson, nil
	}
}
1306889
func (rp RawProfile) GetProfileObject() (interface{}, error) {
	c := rp.Context()
	switch c {
	case DirPoolSchema:
		return rp.DirPoolProfile()
	case RDPoolSchema:
		return rp.RDPoolProfile()
	case SBPoolSchema:
		return rp.SBPoolProfile()
	case TCPoolSchema:
		return rp.TCPoolProfile()
	default:
		return nil, fmt.Errorf("fallthrough on GetProfileObject type %s", c)
	}
}
709204
func (r *Registry) Get(ref types.ManagedObjectReference) mo.Reference {
	r.m.Lock()
	defer r.m.Unlock()

	return r.objects[ref]
}
748973
func (b *Bucket) GetObject(key string, opts ...option.GetObjectInput) (*s3.GetObjectOutput, error) {
	req := &s3.GetObjectInput{
		Bucket: b.Name,
		Key:    aws.String(key),
	}

	for _, f := range opts {
		f(req)
	}

	return b.S3.GetObject(req)
}