-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathapi_hire_talent_object_query.go
184 lines (158 loc) · 9.25 KB
/
api_hire_talent_object_query.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// 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"`
}