// RemoveItem removes an item associated with an access token.
// See https://plaid.com/docs/api/#remove-an-item.
354190
func (c *Client) RemoveItem(accessToken string) (resp RemoveItemResponse, err error) {
	if accessToken == "" {
		return resp, errors.New("/item/remove - access token must be specified")
	}

	jsonBody, err := json.Marshal(removeItemRequest{
		ClientID:    c.clientID,
		Secret:      c.secret,
		AccessToken: accessToken,
	})

	if err != nil {
		return resp, err
	}

	err = c.Call("/item/remove", jsonBody, &resp)
	return resp, err
}
826019
func (cs *CoinSet) removeElement(e *list.Element) Coin {
	c := e.Value.(Coin)
	cs.coinList.Remove(e)
	cs.totalValue -= c.Value()
	cs.totalValueAge -= c.ValueAge()
	return c
}
485036
func (s *shard) Remove(key uint32) {
	s.Lock()
	delete(s.items, key)
	s.Unlock()
}
54921
func (s *PutItemInput) SetItem(v map[string]*AttributeValue) *PutItemInput {
	s.Item = v
	return s
}
750405
func (s *SegmentsResponse) SetItem(v []*SegmentResponse) *SegmentsResponse {
	s.Item = v
	return s
}
1087167
func extractToDeleteItems(l []interface{}) ([]interface{}, []interface{}, error) {
	var nonDelete, toDelete []interface{}
	for _, v := range l {
		m, ok := v.(map[string]interface{})
		if !ok {
			return nil, nil, mergepatch.ErrBadArgType(m, v)
		}

		directive, foundDirective := m[directiveMarker]
		if foundDirective && directive == deleteDirective {
			toDelete = append(toDelete, v)
		} else {
			nonDelete = append(nonDelete, v)
		}
	}
	return nonDelete, toDelete, nil
}
1158390
func (s *ApplicationsResponse) SetItem(v []*ApplicationResponse) *ApplicationsResponse {
	s.Item = v
	return s
}
1006245
func (q *graceTerminateRSList) remove(rs *listItem) bool {
	q.lock.Lock()
	defer q.lock.Unlock()

	uniqueRS := rs.String()
	if _, ok := q.list[uniqueRS]; ok {
		delete(q.list, uniqueRS)
		return true
	}
	return false
}
1072757
func (v *ElementBuildingVisitor) getItem(s proto.Schema, name string, data apply.RawElementData) (Item, error) {
	kind, err := getType(data.GetRecorded(), data.GetLocal(), data.GetRemote())
	if err != nil {
		return nil, err
	}
	if kind == nil {
		// All of the items values are nil.
		return &emptyItem{Name: name}, nil
	}

	// Create an item matching the type
	switch kind.Kind() {
	case reflect.Bool, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint,
		reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64,
		reflect.String:
		p, err := getPrimitive(s)
		if err != nil {
			return nil, fmt.Errorf("expected openapi Primitive, was %T for %v (%v)", s, kind, err)
		}
		return &primitiveItem{name, p, data}, nil
	case reflect.Array, reflect.Slice:
		a, err := getArray(s)
		if err != nil {
			return nil, fmt.Errorf("expected openapi Array, was %T for %v (%v)", s, kind, err)
		}
		return &listItem{
			Name:  name,
			Array: a,
			ListElementData: apply.ListElementData{
				RawElementData: data,
			},
		}, nil
	case reflect.Map:
		if k, err := getKind(s); err == nil {
			return &typeItem{
				Name: name,
				Type: k,
				MapElementData: apply.MapElementData{
					RawElementData: data,
				},
			}, nil
		}
		// If it looks like a map, and no openapi type is found, default to mapItem
		m, err := getMap(s)
		if err != nil {
			return nil, fmt.Errorf("expected openapi Kind or Map, was %T for %v (%v)", s, kind, err)
		}
		return &mapItem{
			Name: name,
			Map:  m,
			MapElementData: apply.MapElementData{
				RawElementData: data,
			},
		}, nil
	}
	return nil, fmt.Errorf("unsupported type %v", kind)
}
950399
func (d *DataBagService) DeleteItem(databagName, databagItem string) (err error) {
	path := fmt.Sprintf("data/%s/%s", databagName, databagItem)
	err = d.client.magicRequestDecoder("DELETE", path, nil, nil)
	return
}
763183
func (s *Store) RemoveCollection(name string) {
	for {
		orig := atomic.LoadPointer(&s.coll)
		coll := copyColl(*(*map[string]*Collection)(orig))
		cold := coll[name]
		delete(coll, name)
		if atomic.CompareAndSwapPointer(&s.coll, orig, unsafe.Pointer(&coll)) {
			cold.closeCollection()
			return
		}
	}
}
1109523
func (mc *metricCatalog) Remove(ns core.Namespace) {
	mc.mutex.Lock()
	defer mc.mutex.Unlock()

	mc.tree.Remove(ns.Strings())
}
1240256
func (c *LRU) removeElement(e *list.Element) {
	c.evictList.Remove(e)
	kv := e.Value.(*entry)
	delete(c.items, kv.key)
	if c.onEvict != nil {
		c.onEvict(kv.key, kv.value)
	}
}
245001
func AddItem(item Item) error {
	cfDict, err := ConvertMapToCFDictionary(item.attr)
	if err != nil {
		return err
	}
	defer Release(C.CFTypeRef(cfDict))

	errCode := C.SecItemAdd(cfDict, nil)
	err = checkError(errCode)
	return err
}
544068
func (i *Item) addItem(property string, value *Item) {
	i.Properties[property] = append(i.Properties[property], value)
}
254670
func (c *Connector) Remove(_ context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue) error {
	c.lock.Lock()
	defer c.lock.Unlock()
	if c.data[ei.Def.Name] == nil {
		return nil
	}
	removedValues := c.removeItem(ei.Def.Name, ei.Def.Key, values)
	if removedValues != nil {
		for iName, iDef := range ei.Def.Indexes {
			c.removeItem(iName, ei.Def.UniqueKey(iDef.Key), removedValues)
		}
	}
	return nil
}
1034872
func (l *List) RemoveItems() {
	l.items = []string{}
	l.pos = 0
	l.selected = -1
	if l.onSelectionChanged != nil {
		l.onSelectionChanged(l)
	}
}