// 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"
)

// QueryHireTalentObject 获取人才字段。
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query
// new doc: https://open.feishu.cn/document/server-docs/hire-v1/candidate-management/talent/query
func (r *HireService) QueryHireTalentObject(ctx context.Context, request *QueryHireTalentObjectReq, options ...MethodOptionFunc) (*QueryHireTalentObjectResp, *Response, error) {
	if r.cli.mock.mockHireQueryHireTalentObject != nil {
		r.cli.Log(ctx, LogLevelDebug, "[lark] Hire#QueryHireTalentObject mock enable")
		return r.cli.mock.mockHireQueryHireTalentObject(ctx, request, options...)
	}

	req := &RawRequestReq{
		Scope:                 "Hire",
		API:                   "QueryHireTalentObject",
		Method:                "GET",
		URL:                   r.cli.openBaseURL + "/open-apis/hire/v1/talent_objects/query",
		Body:                  request,
		MethodOption:          newMethodOption(options),
		NeedTenantAccessToken: true,
	}
	resp := new(queryHireTalentObjectResp)

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

// MockHireQueryHireTalentObject mock HireQueryHireTalentObject method
func (r *Mock) MockHireQueryHireTalentObject(f func(ctx context.Context, request *QueryHireTalentObjectReq, options ...MethodOptionFunc) (*QueryHireTalentObjectResp, *Response, error)) {
	r.mockHireQueryHireTalentObject = f
}

// UnMockHireQueryHireTalentObject un-mock HireQueryHireTalentObject method
func (r *Mock) UnMockHireQueryHireTalentObject() {
	r.mockHireQueryHireTalentObject = nil
}

// QueryHireTalentObjectReq ...
type QueryHireTalentObjectReq struct {
}

// QueryHireTalentObjectResp ...
type QueryHireTalentObjectResp struct {
	Items []*QueryHireTalentObjectRespItem `json:"items,omitempty"` // 数据列表
}

// QueryHireTalentObjectRespItem ...
type QueryHireTalentObjectRespItem struct {
	ID           string                                    `json:"id,omitempty"`            // 模块 ID
	Name         *QueryHireTalentObjectRespItemName        `json:"name,omitempty"`          // 模块名称
	Description  *QueryHireTalentObjectRespItemDescription `json:"description,omitempty"`   // 模块描述
	Setting      *QueryHireTalentObjectRespItemSetting     `json:"setting,omitempty"`       // 模块信息
	IsCustomized bool                                      `json:"is_customized,omitempty"` // 是否是自定义模块
	IsRequired   bool                                      `json:"is_required,omitempty"`   // 是否必填
	ActiveStatus int64                                     `json:"active_status,omitempty"` // 是否启用, 可选值有: 1: 已启用, 2: 已停用
	ChildrenList []*QueryHireTalentObjectRespItemChildren  `json:"children_list,omitempty"` // 字段列表
}

// QueryHireTalentObjectRespItemChildren ...
type QueryHireTalentObjectRespItemChildren struct {
	ID           string                                            `json:"id,omitempty"`            // 字段 ID
	Name         *QueryHireTalentObjectRespItemChildrenName        `json:"name,omitempty"`          // 字段名称
	Description  *QueryHireTalentObjectRespItemChildrenDescription `json:"description,omitempty"`   // 字段描述
	Setting      *QueryHireTalentObjectRespItemChildrenSetting     `json:"setting,omitempty"`       // 字段信息
	ParentID     string                                            `json:"parent_id,omitempty"`     // 所属模块 ID
	IsCustomized bool                                              `json:"is_customized,omitempty"` // 是否是自定义字段
	IsRequired   bool                                              `json:"is_required,omitempty"`   // 是否必填
	ActiveStatus int64                                             `json:"active_status,omitempty"` // 是否启用, 可选值有: 1: 已启用, 2: 已停用
}

// QueryHireTalentObjectRespItemChildrenDescription ...
type QueryHireTalentObjectRespItemChildrenDescription struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

// QueryHireTalentObjectRespItemChildrenName ...
type QueryHireTalentObjectRespItemChildrenName struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

// QueryHireTalentObjectRespItemChildrenSetting ...
type QueryHireTalentObjectRespItemChildrenSetting struct {
	ObjectType int64                                               `json:"object_type,omitempty"` // 字段类型, 可选值有: 1: 单行文本, 2: 多行文本, 3: 单选, 4: 多选, 5: 日期, 6: 月份选择, 7: 年份选择, 8: 时间段, 9: 数字, 10: 默认字段, 11: 模块, 13: 附件
	Config     *QueryHireTalentObjectRespItemChildrenSettingConfig `json:"config,omitempty"`      // 配置信息
}

// QueryHireTalentObjectRespItemChildrenSettingConfig ...
type QueryHireTalentObjectRespItemChildrenSettingConfig struct {
	Options []*QueryHireTalentObjectRespItemChildrenSettingConfigOption `json:"options,omitempty"` // 选项信息
}

// QueryHireTalentObjectRespItemChildrenSettingConfigOption ...
type QueryHireTalentObjectRespItemChildrenSettingConfigOption struct {
	Key          string                                                               `json:"key,omitempty"`           // 选项 ID
	Name         *QueryHireTalentObjectRespItemChildrenSettingConfigOptionName        `json:"name,omitempty"`          // 选项名称
	Description  *QueryHireTalentObjectRespItemChildrenSettingConfigOptionDescription `json:"description,omitempty"`   // 选项描述
	ActiveStatus int64                                                                `json:"active_status,omitempty"` // 是否启用, 可选值有: 1: 已启用, 2: 已停用
}

// QueryHireTalentObjectRespItemChildrenSettingConfigOptionDescription ...
type QueryHireTalentObjectRespItemChildrenSettingConfigOptionDescription struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

// QueryHireTalentObjectRespItemChildrenSettingConfigOptionName ...
type QueryHireTalentObjectRespItemChildrenSettingConfigOptionName struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

// QueryHireTalentObjectRespItemDescription ...
type QueryHireTalentObjectRespItemDescription struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

// QueryHireTalentObjectRespItemName ...
type QueryHireTalentObjectRespItemName struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

// QueryHireTalentObjectRespItemSetting ...
type QueryHireTalentObjectRespItemSetting struct {
	ObjectType int64                                       `json:"object_type,omitempty"` // 字段类型, 可选值有: 1: 单行文本, 2: 多行文本, 3: 单选, 4: 多选, 5: 日期, 6: 月份选择, 7: 年份选择, 8: 时间段, 9: 数字, 10: 默认字段, 11: 模块, 13: 附件
	Config     *QueryHireTalentObjectRespItemSettingConfig `json:"config,omitempty"`      // 配置信息
}

// QueryHireTalentObjectRespItemSettingConfig ...
type QueryHireTalentObjectRespItemSettingConfig struct {
	Options []*QueryHireTalentObjectRespItemSettingConfigOption `json:"options,omitempty"` // 选项信息
}

// QueryHireTalentObjectRespItemSettingConfigOption ...
type QueryHireTalentObjectRespItemSettingConfigOption struct {
	Key          string                                                       `json:"key,omitempty"`           // 选项 ID
	Name         *QueryHireTalentObjectRespItemSettingConfigOptionName        `json:"name,omitempty"`          // 选项名称
	Description  *QueryHireTalentObjectRespItemSettingConfigOptionDescription `json:"description,omitempty"`   // 选项描述
	ActiveStatus int64                                                        `json:"active_status,omitempty"` // 是否启用, 可选值有: 1: 已启用, 2: 已停用
}

// QueryHireTalentObjectRespItemSettingConfigOptionDescription ...
type QueryHireTalentObjectRespItemSettingConfigOptionDescription struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

// QueryHireTalentObjectRespItemSettingConfigOptionName ...
type QueryHireTalentObjectRespItemSettingConfigOptionName struct {
	ZhCn string `json:"zh_cn,omitempty"` // 中文
	EnUs string `json:"en_us,omitempty"` // 英文
}

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