// SetVerifiedEmailAddresses sets the VerifiedEmailAddresses field's value.
977612
func (s *ListVerifiedEmailAddressesOutput) SetVerifiedEmailAddresses(v []*string) *ListVerifiedEmailAddressesOutput {
	s.VerifiedEmailAddresses = v
	return s
}
599969
func (s *CreateCaseInput) SetCcEmailAddresses(v []*string) *CreateCaseInput {
	s.CcEmailAddresses = v
	return s
}
880614
func GetEmailAddresses(uid int64) ([]*EmailAddress, error) {
	emails := make([]*EmailAddress, 0, 5)
	if err := x.Where("uid=?", uid).Find(&emails); err != nil {
		return nil, err
	}

	u, err := GetUserByID(uid)
	if err != nil {
		return nil, err
	}

	isPrimaryFound := false
	for _, email := range emails {
		if email.Email == u.Email {
			isPrimaryFound = true
			email.IsPrimary = true
		} else {
			email.IsPrimary = false
		}
	}

	// We alway want the primary email address displayed, even if it's not in
	// the emailaddress table (yet).
	if !isPrimaryFound {
		emails = append(emails, &EmailAddress{
			Email:       u.Email,
			IsActivated: true,
			IsPrimary:   true,
		})
	}
	return emails, nil
}
153818
func (s *User) SetEmailAddress(v string) *User {
	s.EmailAddress = &v
	return s
}
350589
func (s *GetIdentityVerificationAttributesOutput) SetVerificationAttributes(v map[string]*IdentityVerificationAttributes) *GetIdentityVerificationAttributesOutput {
	s.VerificationAttributes = v
	return s
}
500364
func (s *Options) SetVerifyMode(v string) *Options {
	s.VerifyMode = &v
	return s
}
88430
func (s *SendBulkTemplatedEmailInput) SetReplyToAddresses(v []*string) *SendBulkTemplatedEmailInput {
	s.ReplyToAddresses = v
	return s
}
740704
func FilterValidatedEmails(authorizedMails []user.AuthorizationMap, verifiedMails []user.EmailAddress) []user.AuthorizationMap {
	var e []user.AuthorizationMap
	for _, authorizedMail := range authorizedMails {
		for _, verifiedMail := range verifiedMails {
			if authorizedMail.RealLabel == verifiedMail.Label {
				e = append(e, authorizedMail)
				break
			}
		}
	}
	return e
}
1041275
func (s *AwsEc2InstanceDetails) SetIpV4Addresses(v []*string) *AwsEc2InstanceDetails {
	s.IpV4Addresses = v
	return s
}
714925
func (s *CreateUserProfileOutput) SetEmailAddress(v string) *CreateUserProfileOutput {
	s.EmailAddress = &v
	return s
}
1106982
func (s *VerifyEmailIdentityInput) SetEmailAddress(v string) *VerifyEmailIdentityInput {
	s.EmailAddress = &v
	return s
}
449593
func (s *CustomVerificationEmailTemplate) SetFromEmailAddress(v string) *CustomVerificationEmailTemplate {
	s.FromEmailAddress = &v
	return s
}
1339777
func (s *SendEmailInput) SetFromEmailAddress(v string) *SendEmailInput {
	s.FromEmailAddress = &v
	return s
}
10787
func (s *EmailChannelRequest) SetFromAddress(v string) *EmailChannelRequest {
	s.FromAddress = &v
	return s
}
210804
func (s *CreateEmailIdentityInput) SetEmailIdentity(v string) *CreateEmailIdentityInput {
	s.EmailIdentity = &v
	return s
}
364322
func (s *ResendContactReachabilityEmailOutput) SetIsAlreadyVerified(v bool) *ResendContactReachabilityEmailOutput {
	s.IsAlreadyVerified = &v
	return s
}
785727
func (s *AwsEc2InstanceDetails) SetIpV6Addresses(v []*string) *AwsEc2InstanceDetails {
	s.IpV6Addresses = v
	return s
}