// WithOwner adds the owner to the post IP a m params
332160
func (o *PostIPAMParams) WithOwner(owner *string) *PostIPAMParams {
	o.SetOwner(owner)
	return o
}
393732
func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
	s.Owner = v
	return s
}
1141592
func (i *DocumentIndex) AddDocumentOwner(id influxdb.ID, ownerType string, ownerID influxdb.ID) error {
	if err := i.ownerExists(ownerType, ownerID); err != nil {
		return err
	}

	// TODO(desa): support users owning resources.

	m := &influxdb.UserResourceMapping{
		UserID:   ownerID,
		UserType: influxdb.Owner,
		// In this case UserID refers to an organization rather than a user.
		MappingType:  influxdb.OrgMappingType,
		ResourceType: influxdb.DocumentsResourceType,
		ResourceID:   id,
	}
	return i.service.createUserResourceMapping(i.ctx, i.tx, m)
}
474936
func (s *ScanKeys) KeyOwner(keyID uint64) *libkb.User {
	s.Lock()
	defer s.Unlock()

	return s.keyOwners[keyID]
}
440628
func (s *Subscription) SetOwner(v string) *Subscription {
	s.Owner = &v
	return s
}
379434
func (a *Account) TransferOwnership(gatewayID, username string) error {
	return a.EditGateway(gatewayID, GatewayEdits{
		Owner: username,
	})
}
1226680
func NewOwnerManager(etcdCli *clientv3.Client, prompt, id, key string, cancel context.CancelFunc) Manager {
	logPrefix := fmt.Sprintf("[%s] %s ownerManager %s", prompt, key, id)
	return &ownerManager{
		etcdCli:   etcdCli,
		id:        id,
		key:       key,
		prompt:    prompt,
		cancel:    cancel,
		logPrefix: logPrefix,
		logCtx:    logutil.WithKeyValue(context.Background(), "owner info", logPrefix),
	}
}
462792
func (c *Client) IPAMAllocateIP(ip, owner string) error {
	params := ipam.NewPostIPAMIPParams().WithIP(ip).WithOwner(&owner).WithTimeout(api.ClientTimeout)
	_, err := c.IPAM.PostIPAMIP(params)
	return Hint(err)
}
1233676
func (o *PostIPAMParams) bindOwner(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: false
	// AllowEmptyValue: false
	if raw == "" { // empty values pass all other validations
		return nil
	}

	o.Owner = &raw

	return nil
}
463813
func (s *Server) WithRouter(router *mux.Router) *Server {
	s.router = router
	return s
}
825569
func (o *DeleteIPAMIPParams) WithIP(ip string) *DeleteIPAMIPParams {
	o.SetIP(ip)
	return o
}
965121
func (m *Model) Owner() names.UserTag {
	return names.NewUserTag(m.doc.Owner)
}
727865
func (s *ResourceMetadata) SetOwner(v *UserMetadata) *ResourceMetadata {
	s.Owner = v
	return s
}
507748
func (p *Project) GetOwnerURL() string {
	if p == nil || p.OwnerURL == nil {
		return ""
	}
	return *p.OwnerURL
}
338922
func (s *OrganizationsService) SetOrgOwner(globalid string, body OrganizationsGlobalidOrgownersPostReqBody, headers, queryParams map[string]interface{}) (*http.Response, error) {
	var err error

	resp, err := s.client.doReqWithBody("POST", s.client.BaseURI+"/organizations/"+globalid+"/orgowners", &body, headers, queryParams)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	return resp, err
}
995118
func (m *ownerManager) ResignOwner(ctx context.Context) error {
	elec := (*concurrency.Election)(atomic.LoadPointer(&m.elec))
	if elec == nil {
		return errors.Errorf("This node is not a ddl owner, can't be resigned.")
	}

	childCtx, cancel := context.WithTimeout(ctx, keyOpDefaultTimeout)
	err := elec.Resign(childCtx)
	cancel()
	if err != nil {
		return errors.Trace(err)
	}

	logutil.Logger(m.logCtx).Warn("resign ddl owner success")
	return nil
}
568737
func (s *ProductViewSummary) SetOwner(v string) *ProductViewSummary {
	s.Owner = &v
	return s
}