title: How to return if Google Calendar Time or Calendar Event is Busy?
body: <p>I am trying to determine if a calendar has availability during a specific time. Specifically, when a calendar event is manually created, there's a checkbox for <strong>busy</strong> or <strong>free</strong>:</p>
  
  <p><img src="https://i.stack.imgur.com/929Fm.png" alt="Image of Setting"></p>
  
  <p>I would like to test if the calendar is free or not. I assumed this would have been a property in the calendar itself, but I do not see one in the <a href="https://developers.google.com/apps-script/reference/calendar/calendar" rel="nofollow noreferrer">google calendar classes</a>. (I was looking for some property along the lines of 'isBusy').</p>
  
  <p>My next step would be to test if there are events at the requested time, and if there are, I again don't see a method to test if an event's setting is busy or not. Does anyone know how to do this?</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>function getAvailability(startTime,EndTime){
    var myCalendar = CalendarApp.getDefaultCalendar();
  
    //sample date to test availability 
    var aDate = new Date(2020,3,19);
    var dayEvents = myCalendar.getEventsForDay(aDate);
  
    //specific event captured:
    var myEvent = dayEvents[0];
    Logger.log(myEvent.getDescription());
   //here is where I don't know what to do. 
   //How can I return if during this event's time if calendar is free?
  
  }
  </code></pre>