private Event CreateGoogleCalendarEvent(Appointment calendarAppointment, bool addDescription, bool addReminder,
                                                bool addAttendees, bool attendeesToDescription)
        {
            //Create Event
            var googleEvent = new Event
            {
                Start        = new EventDateTime(),
                End          = new EventDateTime(),
                Summary      = calendarAppointment.Subject,
                Description  = calendarAppointment.GetDescriptionData(addDescription, attendeesToDescription),
                Location     = calendarAppointment.Location,
                Visibility   = AppointmentHelper.GetVisibility(calendarAppointment.Privacy),
                Transparency = (calendarAppointment.BusyStatus == BusyStatusEnum.Free) ? "transparent" : "opaque",
                //Need to make recurring appointment IDs unique - append the item's date
                ExtendedProperties =
                    new Event.ExtendedPropertiesData
                {
                    Private__ =
                        new Dictionary <string, string>
                    {
                        { calendarAppointment.GetSourceEntryKey(), calendarAppointment.AppointmentId }
                    }
                }
            };

            if (EventCategory != null && !string.IsNullOrEmpty(EventCategory.ColorNumber))
            {
                googleEvent.ColorId = EventCategory.ColorNumber;
            }
            //Add Start/End Time
            if (calendarAppointment.AllDayEvent)
            {
                if (calendarAppointment.StartTime.HasValue)
                {
                    googleEvent.Start.Date = calendarAppointment.StartTime.Value.ToString("yyyy-MM-dd");
                }
                if (calendarAppointment.EndTime.HasValue)
                {
                    googleEvent.End.Date = calendarAppointment.EndTime.Value.ToString("yyyy-MM-dd");
                }
            }
            else
            {
                googleEvent.Start.DateTimeRaw = calendarAppointment.Rfc339FormatStartTime;
                googleEvent.End.DateTimeRaw   = calendarAppointment.Rfc339FormatEndTime;
            }

            //Add Reminder
            if (addReminder && calendarAppointment.ReminderSet)
            {
                googleEvent.Reminders = new Event.RemindersData
                {
                    UseDefault = false,
                    Overrides  = new List <EventReminder>
                    {
                        new EventReminder
                        {
                            Method  = "popup",
                            Minutes = calendarAppointment.ReminderMinutesBeforeStart
                        }
                    }
                };
            }

            if (googleEvent.Attendees == null)
            {
                googleEvent.Attendees = new List <EventAttendee>();
            }

            if (addAttendees && !attendeesToDescription)
            {
                //Add Required Attendees
                AddEventAttendees(calendarAppointment.RequiredAttendees, googleEvent, false);

                //Add optional Attendees
                AddEventAttendees(calendarAppointment.OptionalAttendees, googleEvent, true);
            }
            //Add Organizer
            if (calendarAppointment.Organizer != null && calendarAppointment.Organizer.Email.IsValidEmailAddress())
            {
                googleEvent.Organizer = new Event.OrganizerData
                {
                    DisplayName = calendarAppointment.Organizer.Name,
                    Email       = calendarAppointment.Organizer.Email
                };
            }

            return(googleEvent);
        }