Package com.independentsoft.graph.calendars

# Class Event

java.lang.Object
com.independentsoft.graph.calendars.Event

All Implemented Interfaces:
  `ICreatable`, `IUpdatable`

public class Event extends Object implements ICreatable, IUpdatable
Represents a calendar event in Microsoft Graph.

The Event resource represents a calendar event that can be scheduled, attended, and managed through Microsoft 365 calendars. Events can include meetings with attendees, all-day events, recurring events, and online meetings.

Key features of events include:

- Single instance and recurring events
- Multiple attendees with response status tracking
- Online meeting integration (Teams, Skype)
- Location information including physical and virtual locations
- Reminders and time zone support
- Attachments and extended properties
- Free/busy status (free, tentative, busy, out of office)

Example usage:

     GraphClient client = new GraphClient();
     // ... configure authentication ...

     // Create a new event
     Event event = new Event();
     event.setSubject("Team Meeting");

     DateTimeTimeZone start = new DateTimeTimeZone(
         new Date(),
         "America/New_York"
     );
     event.setStart(start);

     DateTimeTimeZone end = new DateTimeTimeZone(
         new Date(start.getTime().getTime() + 3600000),
         "America/New_York"
     );
     event.setEnd(end);

     // Add attendees
     Attendee attendee = new Attendee();
     EmailAddress email = new EmailAddress("user@example.com", "John Doe");
     attendee.setEmailAddress(email);
     event.getAttendees().add(attendee);

     // Create the event
     Event createdEvent = client.createEvent(event);

Since:
  1.0
See Also:
  event resource type, Create event, Update event

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Event()`
  `Event​(JsonObject jsonObject)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `allowNewTimeProposals​(boolean allowNewTimeProposals)`
  `List<Attendee>`
  `getAttendees()`
  `ItemBody`
  `getBody()`
  `String`
  `getBodyPreview()`
  `List<String>`
  `getCategories()`
  `String`
  `getChangeKey()`
  `Date`
  `getCreatedTime()`
  `DateTimeTimeZone`
  `getEnd()`
  `List<ExtendedProperty>`
  `getExtendedProperties()`
  `String`
  `getId()`
  `Importance`
  `getImportance()`
  `Date`
  `getLastModifiedTime()`
  `Location`
  `getLocation()`
  `List<Location>`
  `getLocations()`
  `String`
  `getOcurrenceId()`
  `String`
  `getOnlineMeetingUrl()`
  `EmailAddress`
  `getOrganizer()`
  `String`
  `getOriginalEndTimeZone()`
  `Date`
  `getOriginalStartTime()`
  `String`
  `getOriginalStartTimeZone()`
  `Recurrence`
  `getRecurrence()`
  `int`
  `getReminderMinutesBeforeStart()`
  `ResponseStatus`
  `getResponseStatus()`
  `Sensitivity`
  `getSensitivity()`
  `String`
  `getSeriesMasterId()`
  `ShowAs`
  `getShowAs()`
  `DateTimeTimeZone`
  `getStart()`
  `String`
  `getSubject()`
  `EventType`
  `getType()`
  `String`
  `getUid()`
  `String`
  `getWebLink()`
  `boolean`
  `hasAttachments()`
  `boolean`
  `hideAttendees()`
  `boolean`
  `isAllDay()`
  `boolean`
  `isAllowNewTimeProposals()`
  `boolean`
  `isCancelled()`
  `boolean`
  `isDraft()`
  `boolean`
  `isOnlineMeeting()`
  `boolean`
  `isOrganizer()`
  `boolean`
  `isReminderOn()`
  `boolean`
  `isResponseRequested()`
  `void`
  `setAsAllDay​(boolean isAllDay)`
  `void`
  `setAsCancelled​(boolean isCancelled)`
  `void`
  `setAsDraft​(boolean isDraft)`
  `void`
  `setAsOnlineMeeting​(boolean isOnlineMeeting)`
  `void`
  `setAsOrganizer​(boolean isOrganizer)`
  `void`
  `setBody​(ItemBody body)`
  `void`
  `setEnd​(DateTimeTimeZone end)`
  `void`
  `setHasAttachments​(boolean hasAttachments)`
  `void`
  `setHideAttendees​(boolean hideAttendees)`
  `void`
  `setId​(String id)`
  `void`
  `setImportance​(Importance importance)`
  `void`
  `setLocation​(Location location)`
  `void`
  `setRecurrence​(Recurrence recurrence)`
  `void`
  `setReminderMinutesBeforeStart​(int reminderMinutesBeforeStart)`
  `void`
  `setReminderOn​(boolean isReminderOn)`
  `void`
  `setResponseRequested​(boolean responseRequested)`
  `void`
  `setSensitivity​(Sensitivity sensitivity)`
  `void`
  `setShowAs​(ShowAs showAs)`
  `void`
  `setStart​(DateTimeTimeZone start)`
  `void`
  `setSubject​(String subject)`
  `String`
  `toCreateJson()`
  Converts this object to its JSON representation for creation.
  `String`
  `toString()`
  `String`
  `toUpdateJson()`
  Converts this object to its JSON representation for update.
  `String`
  `toUpdateJson​(List<String> propertyNames)`
  Converts this object to JSON for update with specific properties.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Event

    public Event()

  - ### Event

    public Event​(JsonObject jsonObject)

- ## Method Details

  - ### toCreateJson

    public String toCreateJson()
    Description copied from interface: `ICreatable`
    Converts this object to its JSON representation for creation.

    This method generates a JSON string containing all properties needed to create a new instance of this resource in Microsoft Graph. Only properties appropriate for creation should be included (e.g., excluding read-only properties like ID, createdTime, etc.).

    Specified by:
      `toCreateJson` in interface `ICreatable`
    Returns:
      JSON string representation for creating this resource

  - ### toUpdateJson

    public String toUpdateJson()
    Description copied from interface: `IUpdatable`
    Converts this object to its JSON representation for update.

    This method generates a JSON string containing all modified properties that should be updated in Microsoft Graph. Only writeable properties with non-null values are typically included.

    Specified by:
      `toUpdateJson` in interface `IUpdatable`
    Returns:
      JSON string representation for updating this resource

  - ### toUpdateJson

    public String toUpdateJson​(List<String> propertyNames)
    Description copied from interface: `IUpdatable`
    Converts this object to JSON for update with specific properties.

    This method generates a JSON string containing only the specified properties. This enables partial updates where only certain fields need to be modified, reducing payload size and avoiding unintended changes to other properties.

    Specified by:
      `toUpdateJson` in interface `IUpdatable`
    Parameters:
      `propertyNames` - List of property names to include in the JSON. If null or empty, all modified properties are included.
    Returns:
      JSON string representation for updating specific properties

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getId

    public String getId()

  - ### setId

    public void setId​(String id)

  - ### getChangeKey

    public String getChangeKey()

  - ### isAllowNewTimeProposals

    public boolean isAllowNewTimeProposals()

  - ### allowNewTimeProposals

    public void allowNewTimeProposals​(boolean allowNewTimeProposals)

  - ### getAttendees

    public List<Attendee> getAttendees()

  - ### getBody

    public ItemBody getBody()

  - ### setBody

    public void setBody​(ItemBody body)

  - ### getBodyPreview

    public String getBodyPreview()

  - ### getCategories

    public List<String> getCategories()

  - ### getCreatedTime

    public Date getCreatedTime()

  - ### getEnd

    public DateTimeTimeZone getEnd()

  - ### setEnd

    public void setEnd​(DateTimeTimeZone end)

  - ### hasAttachments

    public boolean hasAttachments()

  - ### setHasAttachments

    public void setHasAttachments​(boolean hasAttachments)

  - ### hideAttendees

    public boolean hideAttendees()

  - ### setHideAttendees

    public void setHideAttendees​(boolean hideAttendees)

  - ### getImportance

    public Importance getImportance()

  - ### setImportance

    public void setImportance​(Importance importance)

  - ### isAllDay

    public boolean isAllDay()

  - ### setAsAllDay

    public void setAsAllDay​(boolean isAllDay)

  - ### isCancelled

    public boolean isCancelled()

  - ### setAsCancelled

    public void setAsCancelled​(boolean isCancelled)

  - ### isDraft

    public boolean isDraft()

  - ### setAsDraft

    public void setAsDraft​(boolean isDraft)

  - ### isOnlineMeeting

    public boolean isOnlineMeeting()

  - ### setAsOnlineMeeting

    public void setAsOnlineMeeting​(boolean isOnlineMeeting)

  - ### isOrganizer

    public boolean isOrganizer()

  - ### setAsOrganizer

    public void setAsOrganizer​(boolean isOrganizer)

  - ### isReminderOn

    public boolean isReminderOn()

  - ### setReminderOn

    public void setReminderOn​(boolean isReminderOn)

  - ### getLastModifiedTime

    public Date getLastModifiedTime()

  - ### getLocation

    public Location getLocation()

  - ### setLocation

    public void setLocation​(Location location)

  - ### getOcurrenceId

    public String getOcurrenceId()

  - ### getLocations

    public List<Location> getLocations()

  - ### getOnlineMeetingUrl

    public String getOnlineMeetingUrl()

  - ### getOrganizer

    public EmailAddress getOrganizer()

  - ### getOriginalEndTimeZone

    public String getOriginalEndTimeZone()

  - ### getOriginalStartTime

    public Date getOriginalStartTime()

  - ### getOriginalStartTimeZone

    public String getOriginalStartTimeZone()

  - ### getRecurrence

    public Recurrence getRecurrence()

  - ### setRecurrence

    public void setRecurrence​(Recurrence recurrence)

  - ### getReminderMinutesBeforeStart

    public int getReminderMinutesBeforeStart()

  - ### setReminderMinutesBeforeStart

    public void setReminderMinutesBeforeStart​(int reminderMinutesBeforeStart)

  - ### isResponseRequested

    public boolean isResponseRequested()

  - ### setResponseRequested

    public void setResponseRequested​(boolean responseRequested)

  - ### getResponseStatus

    public ResponseStatus getResponseStatus()

  - ### getSensitivity

    public Sensitivity getSensitivity()

  - ### setSensitivity

    public void setSensitivity​(Sensitivity sensitivity)

  - ### getSeriesMasterId

    public String getSeriesMasterId()

  - ### getShowAs

    public ShowAs getShowAs()

  - ### setShowAs

    public void setShowAs​(ShowAs showAs)

  - ### getStart

    public DateTimeTimeZone getStart()

  - ### setStart

    public void setStart​(DateTimeTimeZone start)

  - ### getSubject

    public String getSubject()

  - ### setSubject

    public void setSubject​(String subject)

  - ### getType

    public EventType getType()

  - ### getUid

    public String getUid()

  - ### getWebLink

    public String getWebLink()

  - ### getExtendedProperties

    public List<ExtendedProperty> getExtendedProperties()