// SetMongoPassword sets the password the agent responsible for the machine
// should use to communicate with the controllers.  Previous passwords
// are invalidated.
491291
func (m *Machine) SetMongoPassword(password string) error {
	if !m.IsManager() {
		return errors.NotSupportedf("setting mongo password for non-controller machine %v", m)
	}
	return mongo.SetAdminMongoPassword(m.st.session, m.Tag().String(), password)
}
24727
func (s *PasswordPolicy) SetExpirePasswords(v bool) *PasswordPolicy {
	s.ExpirePasswords = &v
	return s
}
136224
func (hp HashedPasswords) SetPassword(name, password string, hashAlgorithm HashAlgorithm) (err error) {
	if len(password) == 0 {
		return errors.New("passwords must not be empty, if you want to delete a user call RemoveUser")
	}
	hash := ""
	prefix := ""
	switch hashAlgorithm {
	case HashBCrypt:
		hash, err = hashBcrypt(password)
	case HashSHA:
		prefix = "{SHA}"
		hash = hashSha(password)
	}
	if err != nil {
		return err
	}
	hp[name] = prefix + hash
	return nil
}
285400
func (u *modelUserEntity) SetPassword(pass string) error {
	if u.user == nil {
		return errors.New("cannot set password on external user")
	}
	return u.user.SetPassword(pass)
}
853749
func (s *TestIdentityProviderInput) SetUserPassword(v string) *TestIdentityProviderInput {
	s.UserPassword = &v
	return s
}
549827
func (s *CreateMicrosoftADInput) SetPassword(v string) *CreateMicrosoftADInput {
	s.Password = &v
	return s
}
1161801
func (s *GetClusterCredentialsOutput) SetDbPassword(v string) *GetClusterCredentialsOutput {
	s.DbPassword = &v
	return s
}
1309653
func (s *DeviceSecretVerifierConfigType) SetPasswordVerifier(v string) *DeviceSecretVerifierConfigType {
	s.PasswordVerifier = &v
	return s
}
540347
func (s *ChangePasswordInput) SetOldPassword(v string) *ChangePasswordInput {
	s.OldPassword = &v
	return s
}
1094965
func (s *Source) SetPassword(v string) *Source {
	s.Password = &v
	return s
}
385966
func (s *RestoreDBInstanceFromS3Input) SetMasterUserPassword(v string) *RestoreDBInstanceFromS3Input {
	s.MasterUserPassword = &v
	return s
}
1200480
func (us UsersService) SetPassword(id, password, token string) error {
	_, err := newNetworkClient(us.config).MakeRequest(network.Request{
		Method:        "PUT",
		Path:          fmt.Sprintf("/Users/%s/password", id),
		Authorization: network.NewTokenAuthorization(token),
		Body: network.NewJSONRequestBody(documents.SetPasswordRequest{
			Password: password,
		}),
		AcceptableStatusCodes: []int{http.StatusOK},
	})
	if err != nil {
		return translateError(err)
	}

	return nil
}
684664
func (s *UpdateUserRequest) SetPassword(v string) *UpdateUserRequest {
	s.Password = &v
	return s
}
6878
func (s *CreateEndpointInput) SetPassword(v string) *CreateEndpointInput {
	s.Password = &v
	return s
}
682995
func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetMasterUserPassword(v string) *GetRelationalDatabaseMasterUserPasswordOutput {
	s.MasterUserPassword = &v
	return s
}
870438
func (s *InputSourceRequest) SetPasswordParam(v string) *InputSourceRequest {
	s.PasswordParam = &v
	return s
}
159936
func (s *UpdateRdsDbInstanceInput) SetDbPassword(v string) *UpdateRdsDbInstanceInput {
	s.DbPassword = &v
	return s
}