package calendar // 基本结构体 type DingParams struct { UserId string } type DingAddScheduleParams struct { DingParams TimeZone string Summary string Description string BeginTime string EndTime string UserIds []string SchType string BeginDate string EndDate string } type DingGetScheduleParams struct { DingParams EventId string } type DingIsUserBusyParams struct { DingParams UserIds []string BeginTime string EndTime string } type EventStart struct { // 日程开始日期,如果是全天日程必须有值,非全天日程必须留空,格式:yyyy-MM-dd Date *string `json:"date,omitempty" xml:"date,omitempty"` // 日程开始时间,非全天日程必须有值,全天日程必须留空,格式为ISO-8601的date-time格式 DateTime *string `json:"dateTime,omitempty" xml:"dateTime,omitempty"` // 日程开始时间所属时区,非全天日程必须有值,全天日程必须留空,tz database name格式,参考:https://en.wikipedia.org/wiki/List_of_tz_database_time_zones TimeZone *string `json:"timeZone,omitempty" xml:"timeZone,omitempty"` } type EventEnd struct { // 日程结束日期,如果是全天日程必须有值,非全天日程必须留空,格式:yyyy-MM-dd Date *string `json:"date,omitempty" xml:"date,omitempty"` // 日程结束时间,非全天日程必须有值,全天日程必须留空,格式为ISO-8601的date-time格式 DateTime *string `json:"dateTime,omitempty" xml:"dateTime,omitempty"` // 日程结束时间所属时区,非全天日程必须有值,全天日程必须留空,tz database name格式,参考:https://en.wikipedia.org/wiki/List_of_tz_database_time_zones TimeZone *string `json:"timeZone,omitempty" xml:"timeZone,omitempty"` } type EventAttendees struct { Id *string `json:"id,omitempty" xml:"id,omitempty"` // 用户名 DisplayName *string `json:"displayName,omitempty" xml:"displayName,omitempty"` // 是否是当前登陆用户 Self *bool `json:"self,omitempty" xml:"self,omitempty"` } type EventOrganizer struct { // 用户名 DisplayName *string `json:"displayName,omitempty" xml:"displayName,omitempty"` Id *string `json:"id,omitempty" xml:"id,omitempty"` // 回复状态 ResponseStatus *string `json:"responseStatus,omitempty" xml:"responseStatus,omitempty"` // 是否是当前登陆用户 Self *bool `json:"self,omitempty" xml:"self,omitempty"` } type ScheduleInformation struct { // 异常描述 Error *string `json:"error,omitempty" xml:"error,omitempty"` ScheduleItems []*ScheduleInformationScheduleItems `json:"scheduleItems,omitempty" xml:"scheduleItems,omitempty" type:"Repeated"` // 用户userId UserId *string `json:"userId,omitempty" xml:"userId,omitempty"` } type ScheduleInformationScheduleItems struct { // 结束时间,表示一个日期,或者一个带时区的时间戳 End *ScheduleInformationScheduleItemsEnd `json:"end,omitempty" xml:"end,omitempty" type:"Struct"` // 开始时间,表示一个日期,或者一个带时区的时间戳 Start *ScheduleInformationScheduleItemsStart `json:"start,omitempty" xml:"start,omitempty" type:"Struct"` // 状态: - BUSY:繁忙, - TENTATIVE:暂定繁忙 Status *string `json:"status,omitempty" xml:"status,omitempty"` } type ScheduleInformationScheduleItemsStart struct { // 开始日期 Date *string `json:"date,omitempty" xml:"date,omitempty"` // 开始时间戳,按照ISO 8601格式 DateTime *string `json:"dateTime,omitempty" xml:"dateTime,omitempty"` // 所属时区 TimeZone *string `json:"timeZone,omitempty" xml:"timeZone,omitempty"` } type ScheduleInformationScheduleItemsEnd struct { // 结束日期 Date *string `json:"date,omitempty" xml:"date,omitempty"` // 结束时间戳,按照ISO 8601格式 DateTime *string `json:"dateTime,omitempty" xml:"dateTime,omitempty"` // 时间戳所属时区 TimeZone *string `json:"timeZone,omitempty" xml:"timeZone,omitempty"` } // 请求结构体 type EventRequest struct { Attendees []*EventAttendees `json:"attendees,omitempty" xml:"attendees,omitempty" type:"Repeated"` // 日程描述 Description *string `json:"description,omitempty" xml:"description,omitempty"` // 日程结束时间 End *EventEnd `json:"end,omitempty" xml:"end,omitempty" type:"Struct"` // 扩展信息 Extra map[string]*string `json:"extra,omitempty" xml:"extra,omitempty"` // 是否为全天日程 IsAllDay *bool `json:"isAllDay,omitempty" xml:"isAllDay,omitempty"` // 日程开始时间 Start *EventStart `json:"start,omitempty" xml:"start,omitempty" type:"Struct"` // 日程标题 Summary *string `json:"summary,omitempty" xml:"summary,omitempty"` } type GetScheduleRequest struct { // 查询结束时间 EndTime *string `json:"endTime,omitempty" xml:"endTime,omitempty"` // 查询开始时间 StartTime *string `json:"startTime,omitempty" xml:"startTime,omitempty"` // 待查询的用户列表 UserIds []*string `json:"userIds,omitempty" xml:"userIds,omitempty" type:"Repeated"` } // 响应结构体 type CreateEventResponse struct { Attendees []*EventAttendees `json:"attendees,omitempty" xml:"attendees,omitempty" type:"Repeated"` // 创建时间 CreateTime *string `json:"createTime,omitempty" xml:"createTime,omitempty"` Description *string `json:"description,omitempty" xml:"description,omitempty"` End *EventEnd `json:"end,omitempty" xml:"end,omitempty" type:"Struct"` Id *string `json:"id,omitempty" xml:"id,omitempty"` // 日程开始时间 Start *EventStart `json:"start,omitempty" xml:"start,omitempty" type:"Struct"` Summary *string `json:"summary,omitempty" xml:"summary,omitempty"` // 更新时间 UpdateTime *string `json:"updateTime,omitempty" xml:"updateTime,omitempty"` } type GetEventResponse struct { Attendees []*EventAttendees `json:"attendees,omitempty" xml:"attendees,omitempty" type:"Repeated"` // 创建时间 CreateTime *string `json:"createTime,omitempty" xml:"createTime,omitempty"` // 日程描述 Description *string `json:"description,omitempty" xml:"description,omitempty"` // 日程结束时间 End *EventEnd `json:"end,omitempty" xml:"end,omitempty" type:"Struct"` Id *string `json:"id,omitempty" xml:"id,omitempty"` Organizer *EventOrganizer `json:"organizer,omitempty" xml:"organizer,omitempty" type:"Struct"` // 重复日程的主日程id,非重复日程为空 SeriesMasterId *string `json:"seriesMasterId,omitempty" xml:"seriesMasterId,omitempty"` // 日程开始时间 Start *EventStart `json:"start,omitempty" xml:"start,omitempty" type:"Struct"` // 日程状态 Status *string `json:"status,omitempty" xml:"status,omitempty"` // 日程标题 Summary *string `json:"summary,omitempty" xml:"summary,omitempty"` // 更新时间 UpdateTime *string `json:"updateTime,omitempty" xml:"updateTime,omitempty"` // 是否是全天日程 IsAllDay *bool `json:"isAllDay,omitempty" xml:"isAllDay,omitempty"` } type GetScheduleResponse struct { // 闲忙信息 ScheduleInformation []*ScheduleInformation `json:"scheduleInformation,omitempty" xml:"scheduleInformation,omitempty" type:"Repeated"` }