// Set the value of the Firebase reference.
543322
func (fb *Firebase) Set(v interface{}) error {
	bytes, err := json.Marshal(v)
	if err != nil {
		return err
	}
	_, _, err = fb.doRequest("PUT", bytes)
	return err
}
1250826
func (c *APIContext) Set(key string, value interface{}) {
	if c.keys == nil {
		c.keys = make(map[string]interface{})
	}
	c.keys[key] = value
}
103984
func (r *Reference) refreshValue() {
	if value, err := r.initializer(nil); err != nil {
		logger.Warnf("Error - initializer returned error: %s. Will retry again later", err)
	} else {
		r.set(value)
	}
}
1179937
func (v *TreeStore) Set(iter *TreeIter, a ...interface{}) {
	for r := range a {
		v.SetValue(iter, r, a[r])
	}
}
1191133
func (ref *Reference) Set(value interface{}) error {
	buf := bytes.NewBuffer([]byte{})
	err := json.NewEncoder(buf).Encode(value)
	if err != nil {
		return err
	}
	_, err = ref.invokeRequest(http.MethodPut, buf)
	if err != nil {
		return err
	}
	return nil
}
171395
func (r *Reference) resetValue() {
	if r.finalizer != nil {
		value, _ := r.get()
		r.finalizer(value)
	}
	atomic.StorePointer(&r.ref, nil)
}
688917
func (bf *SyncFlag) Set() {
	bf.Lock()
	atomic.StoreInt32(&bf.flag, 1)
	bf.Unlock()
}
136600
func (r *Reference) Write(v interface{}) error {

	// JSON encode the data.
	jsonData, err := json.Marshal(v)
	if err != nil {
		return err
	}

	// PUT the data to Firebase.
	_, err = r.executeRequest("PUT", jsonData)
	if err != nil {
		return err
	}

	return nil
}
595261
func (s *SeverityFlag) Set(value string) error {
	sev, err := log.ParseLevel(strings.ToLower(value))
	if err != nil {
		return err
	}
	s.S = sev
	return nil
}
1056457
func (m *SyncMap) Set(key string, value interface{}) {
	shard := m.locate(key)
	shard.Lock()
	shard.items[key] = value
	shard.Unlock()
}
463847
func (s *InvalidationBatch) SetCallerReference(v string) *InvalidationBatch {
	s.CallerReference = &v
	return s
}
848978
func (s *ListIndexInput) SetIndexReference(v *ObjectReference) *ListIndexInput {
	s.IndexReference = v
	return s
}
633294
func (k *Store) Set(key string, value interface{}) {
	k.mu.Lock()
	defer k.mu.Unlock()

	k.db[key] = value
	k.logChange(setOperation, key, value)
}
1064353
func (s *MovSettings) SetReference(v string) *MovSettings {
	s.Reference = &v
	return s
}
1173160
func (s *DistributionConfig) SetCallerReference(v string) *DistributionConfig {
	s.CallerReference = &v
	return s
}
704237
func (t *Tree) Set(key string, value interface{}) {
	t.SetWithComment(key, "", false, value)
}
251846
func (c *Context) Set(key string, value interface{}) {
	c.store.set(key, value)
}