// You should always use this function to get a new UpdateAccountParams instance,
// as then you are sure you have configured all required params
967766
func (s *AccountService) NewUpdateAccountParams(newname string) *UpdateAccountParams {
	p := &UpdateAccountParams{}
	p.p = make(map[string]interface{})
	p.p["newname"] = newname
	return p
}
110953
func (qs *queryServer) GetAccount(ctx context.Context, param *GetAccountParam) (*acm.Account, error) {
	acc, err := qs.accounts.GetAccount(param.Address)
	if acc == nil {
		acc = &acm.Account{}
	}
	return acc, err
}
1021069
func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) {
	acc, err := fetchKeystore(s.am).NewAccount(password)
	if err == nil {
		return acc.Address, nil
	}
	return common.Address{}, err
}
266108
func (s *Service) AccountUpdate(ctx context.Context, o AccountUpdateOpts) (*Account, error) {
	var account Account
	return &account, s.Patch(ctx, &account, fmt.Sprintf("/account"), o)
}
583687
func NewGetAccountArg(AccountId string) *GetAccountArg {
	s := new(GetAccountArg)
	s.AccountId = AccountId
	return s
}
189083
func (s *AutoScaleService) NewCreateCounterParams(name string, source string, value string) *CreateCounterParams {
	p := &CreateCounterParams{}
	p.p = make(map[string]interface{})
	p.p["name"] = name
	p.p["source"] = source
	p.p["value"] = value
	return p
}
829901
func (s *GetCallerIdentityOutput) SetAccount(v string) *GetCallerIdentityOutput {
	s.Account = &v
	return s
}
341219
func (c *Connection) AccountUpdate(h Headers) error {
	_, _, err := c.storage(RequestOpts{
		Operation:  "POST",
		ErrorMap:   ContainerErrorMap,
		NoResponse: true,
		Headers:    h,
	})
	return err
}
935913
func (v *version) ServiceAccounts() ServiceAccountInformer {
	return &serviceAccountInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
213426
func (s *NetworkACLService) NewUpdateNetworkACLItemParams(id string) *UpdateNetworkACLItemParams {
	p := &UpdateNetworkACLItemParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}
302342
func (c *Client) DeleteAccount(p *DeleteAccountParameter) (*Result, error) {
	obj, err := c.Request("deleteAccount", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Result), err
}
32077
func (ks *KeyStore) UpdateAccount(account *Account, passphrase, newPassphrase string) error {
	return ks.keystore.Update(account.account, passphrase, newPassphrase)
}
202926
func (c *UsersController) UpdateUserAsServiceAccount(ctx *app.UpdateUserAsServiceAccountUsersContext) error {

	isSvcAccount, err := isServiceAccount(ctx, serviceNameAuth)
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"err":         err,
			"identity_id": ctx.ID,
		}, "failed to determine if account is a service account")
		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err))
	}
	if !isSvcAccount {
		log.Error(ctx, map[string]interface{}{
			"identity_id": ctx.ID,
		}, "failed to determine if account is a service account")
		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(errs.New("a non-service account tried to updated a user.")))
	}

	idString := ctx.ID
	id, err := uuid.FromString(idString)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrBadRequest(errs.New("incorrect identity")))
	}
	return c.updateUserInDB(&id, ctx)
}
1085345
func ValidateServiceAccountUpdate(newServiceAccount, oldServiceAccount *api.ServiceAccount) validation.ErrorList {
	allErrs := validation.ErrorList{}
	allErrs = append(allErrs, ValidateObjectMetaUpdate(&newServiceAccount.ObjectMeta, &oldServiceAccount.ObjectMeta, validation.NewFieldPath("metadata"))...)
	allErrs = append(allErrs, ValidateServiceAccount(newServiceAccount)...)
	return allErrs
}
501672
func (c *Client) CreateAccount(p *CreateAccountParameter) (*Account, error) {
	obj, err := c.Request("createAccount", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Account), err
}
430096
func (c *Client) EnableAccount(p *EnableAccountParameter) (*Account, error) {
	obj, err := c.Request("enableAccount", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Account), err
}
1297649
func (s *VPCService) NewUpdateVPCOfferingParams(id string) *UpdateVPCOfferingParams {
	p := &UpdateVPCOfferingParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}