// SetEmail sets the Email field's value.
336462
func (s *UpdateUserInput) SetEmail(v string) *UpdateUserInput {
	s.Email = &v
	return s
}
42688
func (s *RegisterUserInput) SetEmail(v string) *RegisterUserInput {
	s.Email = &v
	return s
}
294313
func (s *UpdateUserPoolInput) SetEmailConfiguration(v *EmailConfigurationType) *UpdateUserPoolInput {
	s.EmailConfiguration = v
	return s
}
933641
func (s *CreateUserPoolInput) SetEmailVerificationMessage(v string) *CreateUserPoolInput {
	s.EmailVerificationMessage = &v
	return s
}
1147928
func (s *UpdateUserProfileInput) SetEmailAddress(v string) *UpdateUserProfileInput {
	s.EmailAddress = &v
	return s
}
415963
func (s *UpdateEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *UpdateEmailChannelOutput {
	s.EmailChannelResponse = v
	return s
}
880698
func (s *User) SetEmail(v string) *User {
	s.Email = &v
	return s
}
603611
func (s *VerificationMessageTemplateType) SetEmailSubject(v string) *VerificationMessageTemplateType {
	s.EmailSubject = &v
	return s
}
1208481
func (s *PutEmailIdentityFeedbackAttributesInput) SetEmailIdentity(v string) *PutEmailIdentityFeedbackAttributesInput {
	s.EmailIdentity = &v
	return s
}
141289
func (s *GetEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *GetEmailChannelOutput {
	s.EmailChannelResponse = v
	return s
}
1057287
func (s *AccountDetails) SetEmail(v string) *AccountDetails {
	s.Email = &v
	return s
}
841939
func (s *CreateUserInput) SetEmailAddress(v string) *CreateUserInput {
	s.EmailAddress = &v
	return s
}
153818
func (s *User) SetEmailAddress(v string) *User {
	s.EmailAddress = &v
	return s
}
507944
func AddEmail(c *context.APIContext, form api.CreateEmailOption) {
	if len(form.Emails) == 0 {
		c.Status(422)
		return
	}

	emails := make([]*models.EmailAddress, len(form.Emails))
	for i := range form.Emails {
		emails[i] = &models.EmailAddress{
			UID:         c.User.ID,
			Email:       form.Emails[i],
			IsActivated: !setting.Service.RegisterEmailConfirm,
		}
	}

	if err := models.AddEmailAddresses(emails); err != nil {
		if models.IsErrEmailAlreadyUsed(err) {
			c.Error(422, "", "Email address has been used: "+err.(models.ErrEmailAlreadyUsed).Email)
		} else {
			c.Error(500, "AddEmailAddresses", err)
		}
		return
	}

	apiEmails := make([]*api.Email, len(emails))
	for i := range emails {
		apiEmails[i] = convert.ToEmail(emails[i])
	}
	c.JSON(201, &apiEmails)
}
139527
func (s *ProductViewSummary) SetSupportEmail(v string) *ProductViewSummary {
	s.SupportEmail = &v
	return s
}
1225820
func (s *DescribeResourceOutput) SetEmail(v string) *DescribeResourceOutput {
	s.Email = &v
	return s
}
508243
func (s *DescribeUserProfileOutput) SetEmailAddress(v string) *DescribeUserProfileOutput {
	s.EmailAddress = &v
	return s
}