// Edit set name and description
// This method requires authentication with 'write' permission.
498321
func EditMeta(client *flickr.FlickrClient, photosetId, title, description string) (*flickr.BasicResponse, error) {
	client.Init()
	client.HTTPVerb = "POST"
	client.Args.Set("method", "flickr.photosets.editMeta")
	client.Args.Set("photoset_id", photosetId)
	client.Args.Set("title", title)
	if description != "" {
		client.Args.Set("description", description)
	}

	client.OAuthSign()

	response := &flickr.BasicResponse{}
	err := flickr.DoPost(client, response)
	return response, err
}
562387
func Set(service, username, password string) error {
	p, err := setupProvider()
	if err != nil {
		return err
	}

	return p.Set(service, username, password)
}
1340316
func (s *OutputUpdate) SetNameUpdate(v string) *OutputUpdate {
	s.NameUpdate = &v
	return s
}
315708
func (d *RoleDescriber) Describe(namespace, name string, settings describe.DescriberSettings) (string, error) {
	c := d.c.Roles(namespace)
	role, err := c.Get(name, metav1.GetOptions{})
	if err != nil {
		return "", err
	}

	return DescribeRole(role)
}
1292709
func (f *FilesystemStore) Set(name string, meta []byte) error {
	fp, err := f.getPath(name)
	if err != nil {
		return err
	}

	// Ensures the parent directories of the file we are about to write exist
	err = os.MkdirAll(filepath.Dir(fp), notary.PrivExecPerms)
	if err != nil {
		return err
	}

	// if something already exists, just delete it and re-write it
	os.RemoveAll(fp)

	// Write the file to disk
	return ioutil.WriteFile(fp, meta, notary.PrivNoExecPerms)
}
1316413
func (r *Role) Set(v string) error {
	val := Role(strings.Title(v))
	if err := val.Check(); err != nil {
		return trace.Wrap(err)
	}
	*r = val
	return nil
}
276764
func (r *Router) Set(name string, value interface{}) {
	r.Lock()
	r.params[name] = value
	r.Unlock()
}
200316
func (o *ScanRefsOptions) SetName(sha, name string) {
	o.Mutex.Lock()
	defer o.Mutex.Unlock()

	o.Names[sha] = name
}
813885
func (gr *GenericRecord) Set(name string, value interface{}) {
	gr.fields[name] = value
}
918892
func editNICCmd(params *Parameters) *subcommands.Command {
	return &subcommands.Command{
		UsageLine: "edit-nic -name <name> -machine <machine> [-mac <mac address>] [-switch <switch>] [-port <switch port>]",
		ShortDesc: "edit a NIC",
		LongDesc:  "Edits a network interface in the database.\n\nExample to edit a NIC's MAC address:\ncrimson edit-nic -name eth0 -machine xx1-01-720 -mac 00:00:00:00:00:bc",
		CommandRun: func() subcommands.CommandRun {
			cmd := &EditNICCmd{}
			cmd.Initialize(params)
			cmd.Flags.StringVar(&cmd.nic.Name, "name", "", "The name of the NIC. Required and must be the name of a NIC returned by get-nics.")
			cmd.Flags.StringVar(&cmd.nic.Machine, "machine", "", "The machine this NIC belongs to. Required and must be the name of a machine returned by get-machines.")
			cmd.Flags.StringVar(&cmd.nic.MacAddress, "mac", "", "The MAC address of this NIC. Must be a valid MAC-48 address.")
			cmd.Flags.StringVar(&cmd.nic.Switch, "switch", "", "The switch this NIC is connected to. Must be the name of a switch returned by get-switches.")
			cmd.Flags.Var(flag.Int32(&cmd.nic.Switchport), "port", "The switchport this NIC is connected to.")
			return cmd
		},
	}
}
487801
func (n *nessusImpl) EditUser(userID int, permissions, name, email string) (*User, error) {
	if n.verbose {
		log.Println("Editing user...")
	}
	data := editUserRequest{}

	if permissions != "" {
		data.Permissions = permissions
	}
	if name != "" {
		data.Name = name
	}
	if email != "" {
		data.Email = email
	}

	resp, err := n.doRequest("PUT", fmt.Sprintf("/users/%d", userID), data, []int{http.StatusOK})
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	reply := &User{}
	if err = json.NewDecoder(resp.Body).Decode(&reply); err != nil {
		return nil, err
	}
	return reply, nil
}
646785
func (a *Annotations) Set(name ACIdentifier, value string) {
	for i, anno := range *a {
		if anno.Name.Equals(name) {
			(*a)[i] = Annotation{
				Name:  name,
				Value: value,
			}
			return
		}
	}
	anno := Annotation{
		Name:  name,
		Value: value,
	}
	*a = append(*a, anno)
}
1006487
func (edit *TextEditor) Edit(win *Window) EditEvents {
	edit.init(win)
	if edit.Maxlen > 0 {
		if len(edit.Buffer) > edit.Maxlen {
			edit.Buffer = edit.Buffer[:edit.Maxlen]
		}
	}

	if edit.Flags&EditNoCursor != 0 {
		edit.Cursor = len(edit.Buffer)
	}
	if edit.Flags&EditSelectable == 0 {
		edit.SelectStart = edit.Cursor
		edit.SelectEnd = edit.Cursor
	}

	var bounds rect.Rect

	style := &edit.win.ctx.Style
	widget_state, bounds, _ := edit.win.widget()
	if !widget_state {
		return 0
	}
	in := edit.win.inputMaybe(widget_state)

	var cut, copy, paste bool

	if w := win.ContextualOpen(0, image.Point{}, bounds, nil); w != nil {
		w.Row(20).Dynamic(1)
		visible := false
		if edit.Flags&EditClipboard != 0 {
			visible = true
			if w.MenuItem(label.TA("Cut", "LC")) {
				cut = true
			}
			if w.MenuItem(label.TA("Copy", "LC")) {
				copy = true
			}
			if w.MenuItem(label.TA("Paste", "LC")) {
				paste = true
			}
		}
		if edit.Flags&EditMultiline != 0 {
			visible = true
			if w.MenuItem(label.TA("Find...", "LC")) {
				edit.popupFind()
			}
		}
		if !visible {
			w.Close()
		}
	}

	ev := edit.doEdit(bounds, &style.Edit, in, cut, copy, paste)
	return ev
}
326757
func (z *Zone) Set(domainName string, zoneInfo Info) (status *Status, err error) {
	if zoneInfo.UUID == nil {
		return nil, fmt.Errorf("can not attach a domain %s to a zone %s without an id", domainName, zoneInfo.Name)
	}
	if debug {
		fmt.Printf("DEBUG: Set WILL SET SharingID=%v domain=%s dn=%v\n", zoneInfo.SharingID, domainName, zoneInfo.Name)
	}
	_, err = z.Post(fmt.Sprintf("/zones/%s/domains/%s", zoneInfo.UUID, domainName), nil, &status)
	return
}
1026136
func (self *Nameservers) Set(domainName string, nameservers []string) (*operation.OperationInfo, error) {
	var res map[string]interface{}
	params := []interface{}{self.Key, domainName, nameservers}
	if err := self.Call("domain.nameservers.set", params, &res); err != nil {
		return nil, err
	}
	return operation.ToOperationInfo(res), nil
}
1189033
func (a Attrs) Set(name string, expr bzl.Expr) {
	a[name] = expr
}
659642
func (v *StringMap) Set(name, value string) {
	v.mu.Lock()
	v.values[name] = value
	v.mu.Unlock()
}