/*
InventoryGet returns pet inventories by status
*/
519971
func (a *Client) InventoryGet(ctx context.Context, params *InventoryGetParams) (*InventoryGetOK, error) {

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "InventoryGet",
		Method:             "GET",
		PathPattern:        "/store/inventory",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &InventoryGetReader{formats: a.formats},
		AuthInfo:           a.authInfo,
		Context:            ctx,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*InventoryGetOK), nil

}
1279062
func (s *redisStorage) Get(key string) (interface{}, error) {
	v := s.c.Get(key)

	item := &cachedItem{}
	err := decodeGob([]byte(v.Val()), item)

	if err == nil {
		return item.Val, nil
	}

	if err.Error() == "EOF" {
		return nil, ErrCacheItemNotFound
	}

	if err != nil {
		return nil, err
	}

	return item.Val, nil
}
110410
func (s *Session) MustGet(key string) interface{} {
	if value, exists := s.Get(key); exists {
		return value
	}

	panic("Key \"" + key + "\" does not exist")
}
636801
func (h *Heap) Get(obj interface{}) (interface{}, bool, error) {
	key, err := h.data.keyFunc(obj)
	if err != nil {
		return nil, false, KeyError{obj, err}
	}
	return h.GetByKey(key)
}
164870
func (s *iniSection) get(key string, flag bool) *string {
	if item := s.getItem(key, flag); item != nil {
		return &item.Value
	}
	return nil
}
68505
func (a *Client) PetGet(ctx context.Context, params *PetGetParams) (*PetGetOK, error) {

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "PetGet",
		Method:             "GET",
		PathPattern:        "/pet/{petId}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PetGetReader{formats: a.formats},
		AuthInfo:           a.authInfo,
		Context:            ctx,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*PetGetOK), nil

}
974770
func (s *PostgresStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
9827
func (s *Store) TxGet(tx *bolt.Tx, key, result interface{}) error {
	storer := newStorer(result)

	gk, err := encode(key)

	if err != nil {
		return err
	}

	bkt := tx.Bucket([]byte(storer.Type()))
	if bkt == nil {
		return ErrNotFound
	}

	value := bkt.Get(gk)
	if value == nil {
		return ErrNotFound
	}

	return decode(value, result)
}
1118547
func (client *MyInventoryClient) GetInventoryItems() (result []InventoryItem, err error) {
  if !client.Enabled {
    return
  }
  effectiveURL := fmt.Sprint(client.ServiceBaseURL, "/inventory")
  responseMessage, err := getRawResponseFromURL(effectiveURL)

  if err != nil {
    log.Println(err)
    return
  }

  var inventoryItems []inventoryServiceItem
  err = json.Unmarshal(responseMessage.Data, &inventoryItems)
  result = make([]InventoryItem, len(inventoryItems))
  if strings.ToUpper(responseMessage.Status) != "SUCCESS" {
    err = errors.New(responseMessage.Message)
    return
  }
  for idx, element := range inventoryItems {
    result[idx] = InventoryItem{SKU: element.SKU, Size: element.Size, Tier: element.Tier, OfferingType: element.OfferingType, Status: element.Status, ID: element.ID.Hex()}
    if len(element.LeaseID) > 0 {
      theLease, theError := client.GetLease(element.LeaseID)
      if theError != nil {
        log.Println(theError)
      }
      result[idx].CurrentLease = theLease
    }
  }
  return
}
811773
func (c *CMap) Get(key interface{}) (val interface{}) {
	c.mutex.RLock()
	val = c.items[key]
	c.mutex.RUnlock()
	return
}
729545
func (a *Client) OrderGet(ctx context.Context, params *OrderGetParams) (*OrderGetOK, error) {

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "OrderGet",
		Method:             "GET",
		PathPattern:        "/store/order/{orderId}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &OrderGetReader{formats: a.formats},
		AuthInfo:           a.authInfo,
		Context:            ctx,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*OrderGetOK), nil

}
1162869
func (b *Bucket) Get(key string, valuePtr interface{}) (Cas, error) {
	return b.get(key, valuePtr)
}
280332
func (h *charmsHandler) processGet(r *http.Request, st *state.State) (
	archivePath string,
	fileArg string,
	serveIcon bool,
	err error,
) {
	errRet := func(err error) (string, string, bool, error) {
		return "", "", false, err
	}

	query := r.URL.Query()

	// Retrieve and validate query parameters.
	curlString := query.Get("url")
	if curlString == "" {
		return errRet(errors.Errorf("expected url=CharmURL query argument"))
	}
	curl, err := charm.ParseURL(curlString)
	if err != nil {
		return errRet(errors.Trace(err))
	}
	fileArg = query.Get("file")
	if fileArg != "" {
		fileArg = path.Clean(fileArg)
	} else if query.Get("icon") == "1" {
		serveIcon = true
		fileArg = "icon.svg"
	}

	store := storage.NewStorage(st.ModelUUID(), st.MongoSession())
	// Use the storage to retrieve and save the charm archive.
	ch, err := st.Charm(curl)
	if err != nil {
		return errRet(errors.Annotate(err, "cannot get charm from state"))
	}
	charmFileName, err := common.ReadCharmFromStorage(store, h.dataDir, ch.StoragePath())
	if err != nil {
		return errRet(errors.Annotatef(err, "cannot read charm %q from storage", curl))
	}
	return charmFileName, fileArg, serveIcon, nil
}
757741
func (s *NodbStore) Get(key interface{}) interface{} {
	s.lock.RLock()
	defer s.lock.RUnlock()

	return s.data[key]
}
293527
func Get() (stat *CPUStats, err error) {
	stdMu.Lock()
	defer stdMu.Unlock()
	if std == nil {
		std, err = NewProfiler()
		if err != nil {
			return nil, err
		}
	}
	return std.Get()
}
987157
func (multi *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error) {
	var err error
	for _, store := range multi.Stores {
		var k chronograf.Server
		k, err = store.Get(ctx, id)
		if err == nil {
			return k, nil
		}
	}
	return chronograf.Server{}, nil
}
551086
func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) {
	deploymentConfig, err := r.store.Get(ctx, name, options)
	if err != nil {
		return nil, err
	}

	return scaleFromConfig(deploymentConfig.(*appsapi.DeploymentConfig)), nil
}