// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lark

import (
	"context"
)

// GetVCResourceReservationList 查询会议室预定数据, 具体权限要求请参考「资源介绍」。
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/resource_reservation_list/get
// new doc: https://open.feishu.cn/document/server-docs/vc-v1/meeting-room-data/get-4
func (r *VCService) GetVCResourceReservationList(ctx context.Context, request *GetVCResourceReservationListReq, options ...MethodOptionFunc) (*GetVCResourceReservationListResp, *Response, error) {
	if r.cli.mock.mockVCGetVCResourceReservationList != nil {
		r.cli.Log(ctx, LogLevelDebug, "[lark] VC#GetVCResourceReservationList mock enable")
		return r.cli.mock.mockVCGetVCResourceReservationList(ctx, request, options...)
	}

	req := &RawRequestReq{
		Scope:                 "VC",
		API:                   "GetVCResourceReservationList",
		Method:                "GET",
		URL:                   r.cli.openBaseURL + "/open-apis/vc/v1/resource_reservation_list",
		Body:                  request,
		MethodOption:          newMethodOption(options),
		NeedTenantAccessToken: true,
		NeedUserAccessToken:   true,
	}
	resp := new(getVCResourceReservationListResp)

	response, err := r.cli.RawRequest(ctx, req, resp)
	return resp.Data, response, err
}

// MockVCGetVCResourceReservationList mock VCGetVCResourceReservationList method
func (r *Mock) MockVCGetVCResourceReservationList(f func(ctx context.Context, request *GetVCResourceReservationListReq, options ...MethodOptionFunc) (*GetVCResourceReservationListResp, *Response, error)) {
	r.mockVCGetVCResourceReservationList = f
}

// UnMockVCGetVCResourceReservationList un-mock VCGetVCResourceReservationList method
func (r *Mock) UnMockVCGetVCResourceReservationList() {
	r.mockVCGetVCResourceReservationList = nil
}

// GetVCResourceReservationListReq ...
type GetVCResourceReservationListReq struct {
	RoomLevelID string   `query:"room_level_id" json:"-"` // 层级ID, 如传递非omb前缀的异常ID时, 会默认使用租户层级进行兜底, 示例值: omb_57c9cc7d9a81e27e54c8fabfd02759e7
	NeedTopic   *bool    `query:"need_topic" json:"-"`    // 是否展示会议主题, 示例值: true
	StartTime   string   `query:"start_time" json:"-"`    // 查询开始时间（unix时间, 单位sec）, 示例值: 1655276858
	EndTime     string   `query:"end_time" json:"-"`      // 查询结束时间（unix时间, 单位sec）, 示例值: 1655276858
	RoomIDs     []string `query:"room_ids" json:"-"`      // 待筛选的会议室id列表, 示例值: omm_eada1d61a550955240c28757e7dec3af
	IsExclude   *bool    `query:"is_exclude" json:"-"`    // 默认为false；若为false, 则获取room_ids字段传入的会议室列表预定数据；若为true, 则根据room_level_id字段获取层级下的会议室列表, 并过滤掉room_ids范围的会议室, 获取剩余会议室的预定数据, 示例值: false
	PageSize    *int64   `query:"page_size" json:"-"`     // 分页尺寸大小, 示例值: 20, 默认值: `20`, 取值范围: `20` ～ `100`
	PageToken   *string  `query:"page_token" json:"-"`    // 分页标记, 第一次请求不填, 表示从头开始遍历；分页查询结果还有更多项时会同时返回新的 page_token, 下次遍历可采用该 page_token 获取查询结果, 示例值: 20
}

// GetVCResourceReservationListResp ...
type GetVCResourceReservationListResp struct {
	RoomReservationList []*GetVCResourceReservationListRespRoomReservation `json:"room_reservation_list,omitempty"` // 会议室预定列表
	PageToken           string                                             `json:"page_token,omitempty"`            // 分页标记, 当 has_more 为 true 时, 会同时返回新的 page_token, 否则不返回 page_token
	HasMore             bool                                               `json:"has_more,omitempty"`              // 是否还有更多项
}

// GetVCResourceReservationListRespRoomReservation ...
type GetVCResourceReservationListRespRoomReservation struct {
	RoomID               string `json:"room_id,omitempty"`                // 会议室ID
	RoomName             string `json:"room_name,omitempty"`              // 会议室名称
	EventTitle           string `json:"event_title,omitempty"`            // 会议标题
	Reserver             string `json:"reserver,omitempty"`               // 预定人
	ReserverUserID       string `json:"reserver_user_id,omitempty"`       // 预定人ID
	DepartmentOfReserver string `json:"department_of_reserver,omitempty"` // 预定人所属部门
	GuestsNumber         string `json:"guests_number,omitempty"`          // 邀约人数
	AcceptedNumber       string `json:"accepted_number,omitempty"`        // 接受人数
	EventStartTime       string `json:"event_start_time,omitempty"`       // 会议开始时间
	EventEndTime         string `json:"event_end_time,omitempty"`         // 会议结束时间
	EventDuration        string `json:"event_duration,omitempty"`         // 会议时长
	ReservationStatus    string `json:"reservation_status,omitempty"`     // 会议室预定状态
	CheckInDevice        string `json:"check_in_device,omitempty"`        // 签到设备
	RoomCheckInStatus    string `json:"room_check_in_status,omitempty"`   // 会议室签到状态
	CheckInTime          string `json:"check_in_time,omitempty"`          // 会议室签到时间
	IsReleaseEarly       string `json:"is_release_early,omitempty"`       // 是否提前释放
	ReleasingPerson      string `json:"releasing_person,omitempty"`       // 释放人
	ReleasingTime        string `json:"releasing_time,omitempty"`         // 释放时间
}

// getVCResourceReservationListResp ...
type getVCResourceReservationListResp struct {
	Code  int64                             `json:"code,omitempty"` // 错误码, 非 0 表示失败
	Msg   string                            `json:"msg,omitempty"`  // 错误描述
	Data  *GetVCResourceReservationListResp `json:"data,omitempty"`
	Error *ErrorDetail                      `json:"error,omitempty"`
}
