//SendOrganizationInviteSms Sends an organization invite SMS
500955
func (service *IYOPhonenumberValidationService) SendOrganizationInviteSms(request *http.Request, invite *invitations.JoinOrganizationInvitation) (err error) {
	link := fmt.Sprintf(invitations.InviteURL, request.Host, url.QueryEscape(invite.Code))
	// todo: perhaps this should be shorter but that might be confusing for the end user
	message := fmt.Sprintf("You have been invited to the %s organization on It's You Online. Click the following link to accept it. %s", invite.Organization, link)
	go service.SMSService.Send(invite.PhoneNumber, message)
	return
}
961290
func (s *Service) OrganizationInvitationCreate(ctx context.Context, organizationIdentity string, o OrganizationInvitationCreateOpts) (*OrganizationInvitation, error) {
	var organizationInvitation OrganizationInvitation
	return &organizationInvitation, s.Put(ctx, &organizationInvitation, fmt.Sprintf("/organizations/%v/invitations", organizationIdentity), o)
}
975249
func (s *ListMailboxPermissionsInput) SetOrganizationId(v string) *ListMailboxPermissionsInput {
	s.OrganizationId = &v
	return s
}
682219
func (s *Service) RemoveOrganization(w http.ResponseWriter, r *http.Request) {
	ctx := r.Context()
	id := httprouter.GetParamFromContext(ctx, "oid")

	org, err := s.Store.Organizations(ctx).Get(ctx, chronograf.OrganizationQuery{ID: &id})
	if err != nil {
		Error(w, http.StatusNotFound, err.Error(), s.Logger)
		return
	}
	if err := s.Store.Organizations(ctx).Delete(ctx, org); err != nil {
		Error(w, http.StatusBadRequest, err.Error(), s.Logger)
		return
	}
	w.WriteHeader(http.StatusNoContent)
}
1046683
func (s *ListOrganizationalUnitsForParentOutput) SetOrganizationalUnits(v []*OrganizationalUnit) *ListOrganizationalUnitsForParentOutput {
	s.OrganizationalUnits = v
	return s
}
647238
func (s *OrgService) UpdateOrganization(ctx context.Context, id influxdb.ID, upd influxdb.OrganizationUpdate) (*influxdb.Organization, error) {
	if err := authorizeWriteOrg(ctx, id); err != nil {
		return nil, err
	}

	return s.s.UpdateOrganization(ctx, id, upd)
}
1172802
func (p *ProjectOptions) GetOrganizationPermission() string {
	if p == nil || p.OrganizationPermission == nil {
		return ""
	}
	return *p.OrganizationPermission
}
912840
func (s *AddLayerVersionPermissionInput) SetOrganizationId(v string) *AddLayerVersionPermissionInput {
	s.OrganizationId = &v
	return s
}
511592
func (s *Service) OrganizationInvitationRevoke(ctx context.Context, organizationIdentity string, organizationInvitationIdentity string) (*OrganizationInvitation, error) {
	var organizationInvitation OrganizationInvitation
	return &organizationInvitation, s.Delete(ctx, &organizationInvitation, fmt.Sprintf("/organizations/%v/invitations/%v", organizationIdentity, organizationInvitationIdentity))
}
246081
func (s *RemoteIpDetails) SetOrganization(v *Organization) *RemoteIpDetails {
	s.Organization = v
	return s
}
273884
func (s *Activity) SetOrganizationId(v string) *Activity {
	s.OrganizationId = &v
	return s
}
724081
func NewOrganizationService(context servicecontext.ServiceContext) service.OrganizationService {
	return &organizationServiceImpl{base.NewBaseService(context)}
}
275087
func (m *Manager) RemoveOrganization(globalID string, organization string) error {
	qry := bson.M{"globalid": globalID}
	update := bson.M{"$pull": bson.M{"orgowners": organization, "orgmembers": organization}}
	return m.collection.Update(qry, update)
}
1251170
func (s *Service) OrganizationInvitationAccept(ctx context.Context, organizationInvitationToken string) (*OrganizationInvitationAcceptResult, error) {
	var organizationInvitation OrganizationInvitationAcceptResult
	return &organizationInvitation, s.Post(ctx, &organizationInvitation, fmt.Sprintf("/organizations/invitations/%v/accept", organizationInvitationToken), nil)
}
802684
func (s *DeleteMailboxPermissionsInput) SetOrganizationId(v string) *DeleteMailboxPermissionsInput {
	s.OrganizationId = &v
	return s
}
833343
func (s *UpdateDirectoryConfigInput) SetOrganizationalUnitDistinguishedNames(v []*string) *UpdateDirectoryConfigInput {
	s.OrganizationalUnitDistinguishedNames = v
	return s
}
482212
func (s *DescribeUserInput) SetOrganizationId(v string) *DescribeUserInput {
	s.OrganizationId = &v
	return s
}