// SetPassword sets the password for the machine's agent.
541244
func (m *Machine) SetPassword(password string) error {
	if len(password) < utils.MinAgentPasswordLength {
		return errors.Errorf("password is only %d bytes long, and is not a valid Agent password", len(password))
	}
	passwordHash := utils.AgentPasswordHash(password)
	op := m.UpdateOperation()
	op.PasswordHash = &passwordHash
	if err := m.st.ApplyOperation(op); err != nil {
		return errors.Trace(err)
	}
	m.doc.PasswordHash = passwordHash
	return nil
}
1283260
func (s *Secret) SetPassword(pw string) {
	s.Lock()
	defer s.Unlock()

	s.password = pw
}
24727
func (s *PasswordPolicy) SetExpirePasswords(v bool) *PasswordPolicy {
	s.ExpirePasswords = &v
	return s
}
444688
func (s *OutputDestinationSettings) SetPasswordParam(v string) *OutputDestinationSettings {
	s.PasswordParam = &v
	return s
}
112567
func (s *UpdateLoginProfileInput) SetPassword(v string) *UpdateLoginProfileInput {
	s.Password = &v
	return s
}
1346161
func (s *InputSource) SetPasswordParam(v string) *InputSource {
	s.PasswordParam = &v
	return s
}
159936
func (s *UpdateRdsDbInstanceInput) SetDbPassword(v string) *UpdateRdsDbInstanceInput {
	s.DbPassword = &v
	return s
}
303350
func (c *Client) SetPassword(ctx context.Context, name string, password string) error {
	return c.db.Update(func(tx *bolt.Tx) error {
		return c.setPassword(ctx, tx, name, password)
	})
}
105061
func (s *Service) SetPassword(ctx context.Context, name string, password string) error {
	return s.kv.Update(ctx, func(tx Tx) error {
		return s.setPassword(ctx, tx, name, password)
	})
}
146193
func (s *RedshiftDestinationUpdate) SetPassword(v string) *RedshiftDestinationUpdate {
	s.Password = &v
	return s
}
273847
func (s *SignUpInput) SetPassword(v string) *SignUpInput {
	s.Password = &v
	return s
}
358285
func (c *Client) SetPasswords(appPasswords []ApplicationPassword) (params.ErrorResults, error) {
	var result params.ErrorResults
	args := params.EntityPasswords{Changes: make([]params.EntityPassword, len(appPasswords))}
	for i, p := range appPasswords {
		args.Changes[i] = params.EntityPassword{
			Tag: names.NewApplicationTag(p.Name).String(), Password: p.Password,
		}
	}
	err := c.facade.FacadeCall("SetPasswords", args, &result)
	if err != nil {
		return params.ErrorResults{}, err
	}
	if len(result.Results) != len(args.Changes) {
		return params.ErrorResults{}, errors.Errorf("expected %d result(s), got %d", len(args.Changes), len(result.Results))
	}
	return result, nil
}
292115
func (d *Domain) SetUserPassword(user string, password string, flags DomainSetUserPasswordFlags) error {
	if C.LIBVIR_VERSION_NUMBER < 1002015 {
		return makeNotImplementedError("virDomainSetUserPassword")
	}
	cuser := C.CString(user)
	cpassword := C.CString(password)

	defer C.free(unsafe.Pointer(cuser))
	defer C.free(unsafe.Pointer(cpassword))

	var err C.virError
	ret := C.virDomainSetUserPasswordWrapper(d.ptr, cuser, cpassword, C.uint(flags), &err)
	if ret == -1 {
		return makeError(&err)
	}

	return nil
}
682995
func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetMasterUserPassword(v string) *GetRelationalDatabaseMasterUserPasswordOutput {
	s.MasterUserPassword = &v
	return s
}
1298003
func (s *RdsDbInstance) SetDbPassword(v string) *RdsDbInstance {
	s.DbPassword = &v
	return s
}
511283
func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput {
	s.MasterUserPassword = &v
	return s
}
168641
func (s *JoinDomainInput) SetPassword(v string) *JoinDomainInput {
	s.Password = &v
	return s
}