// PutView sets view with the current ID.
977936
func (s *Service) PutView(ctx context.Context, c *platform.View) error {
	if c.Properties == nil {
		c.Properties = platform.EmptyViewProperties{}
	}
	s.viewKV.Store(c.ID.String(), c)
	return nil
}
81045
func (c *Client) PutVersion(ctx context.Context, datasetID, edition, version string, v Version) error {
	uri := fmt.Sprintf("%s/datasets/%s/editions/%s/versions/%s", c.url, datasetID, edition, version)
	clientlog.Do(ctx, "updating version", service, uri)

	b, err := json.Marshal(v)
	if err != nil {
		return errors.Wrap(err, "error while attempting to marshall version")
	}

	req, err := http.NewRequest(http.MethodPut, uri, bytes.NewBuffer(b))
	if err != nil {
		return errors.Wrap(err, "error while attempting to create http request")
	}

	resp, err := c.cli.Do(ctx, req)
	if err != nil {
		return errors.Wrap(err, "http client returned error while attempting to make request")
	}

	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		return errors.Errorf("incorrect http status, expected: 200, actual: %d, uri: %s", resp.StatusCode, uri)
	}
	return nil
}
422944
func (c *Client) PutLabel(ctx context.Context, l *influxdb.Label) error {
	return c.db.Update(func(tx *bolt.Tx) error {
		var err error
		pe := c.putLabel(ctx, tx, l)
		if pe != nil {
			err = pe
		}
		return err
	})
}
574191
func (vv VectorisedView) ToView() View {
	if len(vv.views) == 1 {
		return vv.views[0]
	}
	u := make([]byte, 0, vv.size)
	for _, v := range vv.views {
		u = append(u, v...)
	}
	return u
}
223365
func (s *SegmentResponse) SetId(v string) *SegmentResponse {
	s.Id = &v
	return s
}
966186
func (s *EmailChannelResponse) SetId(v string) *EmailChannelResponse {
	s.Id = &v
	return s
}
654846
func (s *Association) SetOverview(v *AssociationOverview) *Association {
	s.Overview = v
	return s
}
524406
func (r *PrevRevisions) PutWithRevision(key string, inCurrent datasync.KeyVal) (
	found bool, prev datasync.KeyVal) {

	found, prev = r.Get(key)

	currentRev := inCurrent.GetRevision()
	if currentRev == 0 && prev != nil {
		currentRev = prev.GetRevision() + 1
	}

	r.mu.Lock()
	r.revisions[key] = &valWithRev{
		LazyValue: inCurrent,
		key:       key,
		rev:       currentRev,
	}
	r.mu.Unlock()

	return found, prev
}
724966
func (s *Service) DeleteView(ctx context.Context, id platform.ID) error {
	if _, err := s.FindViewByID(ctx, id); err != nil {
		return &platform.Error{
			Err: err,
			Op:  OpPrefix + platform.OpDeleteView,
		}
	}
	s.viewKV.Delete(id.String())
	return nil
}
802468
func (s *ActionType) SetId(v *ActionTypeId) *ActionType {
	s.Id = v
	return s
}
1079667
func (s *Service) PutCellView(ctx context.Context, cell *platform.Cell) error {
	v := &platform.View{}
	v.ID = cell.ID
	return s.PutView(ctx, v)
}
363720
func (s *Step) SetId(v string) *Step {
	s.Id = &v
	return s
}
1250748
func (s *ChannelResponse) SetId(v string) *ChannelResponse {
	s.Id = &v
	return s
}
367418
func (h *Holder) view(index, field, name string) *view {
	f := h.Field(index, field)
	if f == nil {
		return nil
	}
	return f.view(name)
}
48023
func (f *Form) SetId(id string) *Form {
	f.id = id
	return f
}
423570
func (s *Service) PutDashboard(ctx context.Context, d *platform.Dashboard) error {
	for _, cell := range d.Cells {
		if err := s.PutCellView(ctx, cell); err != nil {
			return err
		}
	}
	s.dashboardKV.Store(d.ID.String(), d)
	return nil
}
301141
func (a *CellView) SetView(view View) {
	port := a.port
	port.SetView(view)
	a.view = view
	if view == nil {
		return
	}
	width, height := view.Size()
	a.port.Resize(0, 0, width, height)
	if a.model != nil {
		w, h := a.model.GetBounds()
		a.port.SetContentSize(w, h, true)
	}
	a.Resize()
}