// NOTE: This file was generated by the ServiceGenerator.

// ----------------------------------------------------------------------------
// API:
//   Calendar API (calendar/v3)
// Description:
//   Manipulates events and other calendar data.
// Documentation:
//   https://developers.google.com/google-apps/calendar/firstapp

#import "GTLRCalendarQuery.h"

#import "GTLRCalendarObjects.h"

// ----------------------------------------------------------------------------
// Constants

// minAccessRole
NSString * const kGTLRCalendarMinAccessRoleFreeBusyReader = @"freeBusyReader";
NSString * const kGTLRCalendarMinAccessRoleOwner          = @"owner";
NSString * const kGTLRCalendarMinAccessRoleReader         = @"reader";
NSString * const kGTLRCalendarMinAccessRoleWriter         = @"writer";

// orderBy
NSString * const kGTLRCalendarOrderByStartTime = @"startTime";
NSString * const kGTLRCalendarOrderByUpdated   = @"updated";

// ----------------------------------------------------------------------------
// Query Classes
//

@implementation GTLRCalendarQuery

@dynamic fields;

@end

@implementation GTLRCalendarQuery_AclDelete

@dynamic calendarId, ruleId;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId
                             ruleId:(NSString *)ruleId {
  NSArray *pathParams = @[
    @"calendarId", @"ruleId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/acl/{ruleId}";
  GTLRCalendarQuery_AclDelete *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"DELETE"
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.ruleId = ruleId;
  query.loggingName = @"calendar.acl.delete";
  return query;
}

@end

@implementation GTLRCalendarQuery_AclGet

@dynamic calendarId, ruleId;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId
                             ruleId:(NSString *)ruleId {
  NSArray *pathParams = @[
    @"calendarId", @"ruleId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/acl/{ruleId}";
  GTLRCalendarQuery_AclGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.ruleId = ruleId;
  query.expectedObjectClass = [GTLRCalendar_AclRule class];
  query.loggingName = @"calendar.acl.get";
  return query;
}

@end

@implementation GTLRCalendarQuery_AclInsert

@dynamic calendarId, sendNotifications;

+ (instancetype)queryWithObject:(GTLRCalendar_AclRule *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/acl";
  GTLRCalendarQuery_AclInsert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_AclRule class];
  query.loggingName = @"calendar.acl.insert";
  return query;
}

@end

@implementation GTLRCalendarQuery_AclList

@dynamic calendarId, maxResults, pageToken, showDeleted, syncToken;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/acl";
  GTLRCalendarQuery_AclList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Acl class];
  query.loggingName = @"calendar.acl.list";
  return query;
}

@end

@implementation GTLRCalendarQuery_AclPatch

@dynamic calendarId, ruleId, sendNotifications;

+ (instancetype)queryWithObject:(GTLRCalendar_AclRule *)object
                     calendarId:(NSString *)calendarId
                         ruleId:(NSString *)ruleId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[
    @"calendarId", @"ruleId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/acl/{ruleId}";
  GTLRCalendarQuery_AclPatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PATCH"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.ruleId = ruleId;
  query.expectedObjectClass = [GTLRCalendar_AclRule class];
  query.loggingName = @"calendar.acl.patch";
  return query;
}

@end

@implementation GTLRCalendarQuery_AclUpdate

@dynamic calendarId, ruleId, sendNotifications;

+ (instancetype)queryWithObject:(GTLRCalendar_AclRule *)object
                     calendarId:(NSString *)calendarId
                         ruleId:(NSString *)ruleId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[
    @"calendarId", @"ruleId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/acl/{ruleId}";
  GTLRCalendarQuery_AclUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PUT"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.ruleId = ruleId;
  query.expectedObjectClass = [GTLRCalendar_AclRule class];
  query.loggingName = @"calendar.acl.update";
  return query;
}

@end

@implementation GTLRCalendarQuery_AclWatch

@dynamic calendarId, maxResults, pageToken, showDeleted, syncToken;

+ (instancetype)queryWithObject:(GTLRCalendar_Channel *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/acl/watch";
  GTLRCalendarQuery_AclWatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Channel class];
  query.loggingName = @"calendar.acl.watch";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarListDelete

@dynamic calendarId;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"users/me/calendarList/{calendarId}";
  GTLRCalendarQuery_CalendarListDelete *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"DELETE"
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.loggingName = @"calendar.calendarList.delete";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarListGet

@dynamic calendarId;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"users/me/calendarList/{calendarId}";
  GTLRCalendarQuery_CalendarListGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_CalendarListEntry class];
  query.loggingName = @"calendar.calendarList.get";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarListInsert

@dynamic colorRgbFormat;

+ (instancetype)queryWithObject:(GTLRCalendar_CalendarListEntry *)object {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSString *pathURITemplate = @"users/me/calendarList";
  GTLRCalendarQuery_CalendarListInsert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:nil];
  query.bodyObject = object;
  query.expectedObjectClass = [GTLRCalendar_CalendarListEntry class];
  query.loggingName = @"calendar.calendarList.insert";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarListList

@dynamic maxResults, minAccessRole, pageToken, showDeleted, showHidden,
         syncToken;

+ (instancetype)query {
  NSString *pathURITemplate = @"users/me/calendarList";
  GTLRCalendarQuery_CalendarListList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:nil];
  query.expectedObjectClass = [GTLRCalendar_CalendarList class];
  query.loggingName = @"calendar.calendarList.list";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarListPatch

@dynamic calendarId, colorRgbFormat;

+ (instancetype)queryWithObject:(GTLRCalendar_CalendarListEntry *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"users/me/calendarList/{calendarId}";
  GTLRCalendarQuery_CalendarListPatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PATCH"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_CalendarListEntry class];
  query.loggingName = @"calendar.calendarList.patch";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarListUpdate

@dynamic calendarId, colorRgbFormat;

+ (instancetype)queryWithObject:(GTLRCalendar_CalendarListEntry *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"users/me/calendarList/{calendarId}";
  GTLRCalendarQuery_CalendarListUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PUT"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_CalendarListEntry class];
  query.loggingName = @"calendar.calendarList.update";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarListWatch

@dynamic maxResults, minAccessRole, pageToken, showDeleted, showHidden,
         syncToken;

+ (instancetype)queryWithObject:(GTLRCalendar_Channel *)object {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSString *pathURITemplate = @"users/me/calendarList/watch";
  GTLRCalendarQuery_CalendarListWatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:nil];
  query.bodyObject = object;
  query.expectedObjectClass = [GTLRCalendar_Channel class];
  query.loggingName = @"calendar.calendarList.watch";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarsClear

@dynamic calendarId;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/clear";
  GTLRCalendarQuery_CalendarsClear *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.loggingName = @"calendar.calendars.clear";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarsDelete

@dynamic calendarId;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}";
  GTLRCalendarQuery_CalendarsDelete *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"DELETE"
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.loggingName = @"calendar.calendars.delete";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarsGet

@dynamic calendarId;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}";
  GTLRCalendarQuery_CalendarsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Calendar class];
  query.loggingName = @"calendar.calendars.get";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarsInsert

+ (instancetype)queryWithObject:(GTLRCalendar_Calendar *)object {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSString *pathURITemplate = @"calendars";
  GTLRCalendarQuery_CalendarsInsert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:nil];
  query.bodyObject = object;
  query.expectedObjectClass = [GTLRCalendar_Calendar class];
  query.loggingName = @"calendar.calendars.insert";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarsPatch

@dynamic calendarId;

+ (instancetype)queryWithObject:(GTLRCalendar_Calendar *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}";
  GTLRCalendarQuery_CalendarsPatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PATCH"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Calendar class];
  query.loggingName = @"calendar.calendars.patch";
  return query;
}

@end

@implementation GTLRCalendarQuery_CalendarsUpdate

@dynamic calendarId;

+ (instancetype)queryWithObject:(GTLRCalendar_Calendar *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}";
  GTLRCalendarQuery_CalendarsUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PUT"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Calendar class];
  query.loggingName = @"calendar.calendars.update";
  return query;
}

@end

@implementation GTLRCalendarQuery_ChannelsStop

+ (instancetype)queryWithObject:(GTLRCalendar_Channel *)object {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSString *pathURITemplate = @"channels/stop";
  GTLRCalendarQuery_ChannelsStop *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:nil];
  query.bodyObject = object;
  query.loggingName = @"calendar.channels.stop";
  return query;
}

@end

@implementation GTLRCalendarQuery_ColorsGet

+ (instancetype)query {
  NSString *pathURITemplate = @"colors";
  GTLRCalendarQuery_ColorsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:nil];
  query.expectedObjectClass = [GTLRCalendar_Colors class];
  query.loggingName = @"calendar.colors.get";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsDelete

@dynamic calendarId, eventId, sendNotifications;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId
                            eventId:(NSString *)eventId {
  NSArray *pathParams = @[
    @"calendarId", @"eventId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/{eventId}";
  GTLRCalendarQuery_EventsDelete *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"DELETE"
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.eventId = eventId;
  query.loggingName = @"calendar.events.delete";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsGet

@dynamic alwaysIncludeEmail, calendarId, eventId, maxAttendees, timeZone;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId
                            eventId:(NSString *)eventId {
  NSArray *pathParams = @[
    @"calendarId", @"eventId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/{eventId}";
  GTLRCalendarQuery_EventsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.eventId = eventId;
  query.expectedObjectClass = [GTLRCalendar_Event class];
  query.loggingName = @"calendar.events.get";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsImport

@dynamic calendarId, supportsAttachments;

+ (instancetype)queryWithObject:(GTLRCalendar_Event *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/import";
  GTLRCalendarQuery_EventsImport *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Event class];
  query.loggingName = @"calendar.events.import";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsInsert

@dynamic calendarId, maxAttendees, sendNotifications, supportsAttachments;

+ (instancetype)queryWithObject:(GTLRCalendar_Event *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events";
  GTLRCalendarQuery_EventsInsert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Event class];
  query.loggingName = @"calendar.events.insert";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsInstances

@dynamic alwaysIncludeEmail, calendarId, eventId, maxAttendees, maxResults,
         originalStart, pageToken, showDeleted, timeMax, timeMin, timeZone;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId
                            eventId:(NSString *)eventId {
  NSArray *pathParams = @[
    @"calendarId", @"eventId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/{eventId}/instances";
  GTLRCalendarQuery_EventsInstances *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.eventId = eventId;
  query.expectedObjectClass = [GTLRCalendar_Events class];
  query.loggingName = @"calendar.events.instances";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsList

@dynamic alwaysIncludeEmail, calendarId, iCalUID, maxAttendees, maxResults,
         orderBy, pageToken, privateExtendedProperty, q, sharedExtendedProperty,
         showDeleted, showHiddenInvitations, singleEvents, syncToken, timeMax,
         timeMin, timeZone, updatedMin;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"privateExtendedProperty" : [NSString class],
    @"sharedExtendedProperty" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithCalendarId:(NSString *)calendarId {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events";
  GTLRCalendarQuery_EventsList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Events class];
  query.loggingName = @"calendar.events.list";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsMove

@dynamic calendarId, destination, eventId, sendNotifications;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId
                            eventId:(NSString *)eventId
                        destination:(NSString *)destination {
  NSArray *pathParams = @[
    @"calendarId", @"eventId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/{eventId}/move";
  GTLRCalendarQuery_EventsMove *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.eventId = eventId;
  query.destination = destination;
  query.expectedObjectClass = [GTLRCalendar_Event class];
  query.loggingName = @"calendar.events.move";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsPatch

@dynamic alwaysIncludeEmail, calendarId, eventId, maxAttendees,
         sendNotifications, supportsAttachments;

+ (instancetype)queryWithObject:(GTLRCalendar_Event *)object
                     calendarId:(NSString *)calendarId
                        eventId:(NSString *)eventId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[
    @"calendarId", @"eventId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/{eventId}";
  GTLRCalendarQuery_EventsPatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PATCH"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.eventId = eventId;
  query.expectedObjectClass = [GTLRCalendar_Event class];
  query.loggingName = @"calendar.events.patch";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsQuickAdd

@dynamic calendarId, sendNotifications, text;

+ (instancetype)queryWithCalendarId:(NSString *)calendarId
                               text:(NSString *)text {
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/quickAdd";
  GTLRCalendarQuery_EventsQuickAdd *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.calendarId = calendarId;
  query.text = text;
  query.expectedObjectClass = [GTLRCalendar_Event class];
  query.loggingName = @"calendar.events.quickAdd";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsUpdate

@dynamic alwaysIncludeEmail, calendarId, eventId, maxAttendees,
         sendNotifications, supportsAttachments;

+ (instancetype)queryWithObject:(GTLRCalendar_Event *)object
                     calendarId:(NSString *)calendarId
                        eventId:(NSString *)eventId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[
    @"calendarId", @"eventId"
  ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/{eventId}";
  GTLRCalendarQuery_EventsUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PUT"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.eventId = eventId;
  query.expectedObjectClass = [GTLRCalendar_Event class];
  query.loggingName = @"calendar.events.update";
  return query;
}

@end

@implementation GTLRCalendarQuery_EventsWatch

@dynamic alwaysIncludeEmail, calendarId, iCalUID, maxAttendees, maxResults,
         orderBy, pageToken, privateExtendedProperty, q, sharedExtendedProperty,
         showDeleted, showHiddenInvitations, singleEvents, syncToken, timeMax,
         timeMin, timeZone, updatedMin;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"privateExtendedProperty" : [NSString class],
    @"sharedExtendedProperty" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithObject:(GTLRCalendar_Channel *)object
                     calendarId:(NSString *)calendarId {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSArray *pathParams = @[ @"calendarId" ];
  NSString *pathURITemplate = @"calendars/{calendarId}/events/watch";
  GTLRCalendarQuery_EventsWatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.calendarId = calendarId;
  query.expectedObjectClass = [GTLRCalendar_Channel class];
  query.loggingName = @"calendar.events.watch";
  return query;
}

@end

@implementation GTLRCalendarQuery_FreebusyQuery

+ (instancetype)queryWithObject:(GTLRCalendar_FreeBusyRequest *)object {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSString *pathURITemplate = @"freeBusy";
  GTLRCalendarQuery_FreebusyQuery *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:nil];
  query.bodyObject = object;
  query.expectedObjectClass = [GTLRCalendar_FreeBusyResponse class];
  query.loggingName = @"calendar.freebusy.query";
  return query;
}

@end

@implementation GTLRCalendarQuery_SettingsGet

@dynamic setting;

+ (instancetype)queryWithSetting:(NSString *)setting {
  NSArray *pathParams = @[ @"setting" ];
  NSString *pathURITemplate = @"users/me/settings/{setting}";
  GTLRCalendarQuery_SettingsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.setting = setting;
  query.expectedObjectClass = [GTLRCalendar_Setting class];
  query.loggingName = @"calendar.settings.get";
  return query;
}

@end

@implementation GTLRCalendarQuery_SettingsList

@dynamic maxResults, pageToken, syncToken;

+ (instancetype)query {
  NSString *pathURITemplate = @"users/me/settings";
  GTLRCalendarQuery_SettingsList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:nil];
  query.expectedObjectClass = [GTLRCalendar_Settings class];
  query.loggingName = @"calendar.settings.list";
  return query;
}

@end

@implementation GTLRCalendarQuery_SettingsWatch

@dynamic maxResults, pageToken, syncToken;

+ (instancetype)queryWithObject:(GTLRCalendar_Channel *)object {
  if (object == nil) {
    GTLR_DEBUG_ASSERT(object != nil, @"Got a nil object");
    return nil;
  }
  NSString *pathURITemplate = @"users/me/settings/watch";
  GTLRCalendarQuery_SettingsWatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:nil];
  query.bodyObject = object;
  query.expectedObjectClass = [GTLRCalendar_Channel class];
  query.loggingName = @"calendar.settings.watch";
  return query;
}

@end
