-
-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathapi_apaas_application_environment_variable_query.go
More file actions
110 lines (96 loc) · 6.72 KB
/
api_apaas_application_environment_variable_query.go
File metadata and controls
110 lines (96 loc) · 6.72 KB
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
// 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"
)
// QueryAPaaSApplicationEnvironmentVariable 查询基于飞书 aPaaS 开发的应用的环境变量列表
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/apaas-v1/application-environment_variable/query
// new doc: https://open.feishu.cn/document/apaas-v1/application-environment_variable/query
func (r *APaaSService) QueryAPaaSApplicationEnvironmentVariable(ctx context.Context, request *QueryAPaaSApplicationEnvironmentVariableReq, options ...MethodOptionFunc) (*QueryAPaaSApplicationEnvironmentVariableResp, *Response, error) {
if r.cli.mock.mockAPaaSQueryAPaaSApplicationEnvironmentVariable != nil {
r.cli.Log(ctx, LogLevelDebug, "[lark] APaaS#QueryAPaaSApplicationEnvironmentVariable mock enable")
return r.cli.mock.mockAPaaSQueryAPaaSApplicationEnvironmentVariable(ctx, request, options...)
}
req := &RawRequestReq{
Scope: "APaaS",
API: "QueryAPaaSApplicationEnvironmentVariable",
Method: "POST",
URL: r.cli.openBaseURL + "/open-apis/apaas/v1/applications/:namespace/environment_variables/query",
Body: request,
MethodOption: newMethodOption(options),
NeedTenantAccessToken: true,
}
resp := new(queryAPaaSApplicationEnvironmentVariableResp)
response, err := r.cli.RawRequest(ctx, req, resp)
return resp.Data, response, err
}
// MockAPaaSQueryAPaaSApplicationEnvironmentVariable mock APaaSQueryAPaaSApplicationEnvironmentVariable method
func (r *Mock) MockAPaaSQueryAPaaSApplicationEnvironmentVariable(f func(ctx context.Context, request *QueryAPaaSApplicationEnvironmentVariableReq, options ...MethodOptionFunc) (*QueryAPaaSApplicationEnvironmentVariableResp, *Response, error)) {
r.mockAPaaSQueryAPaaSApplicationEnvironmentVariable = f
}
// UnMockAPaaSQueryAPaaSApplicationEnvironmentVariable un-mock APaaSQueryAPaaSApplicationEnvironmentVariable method
func (r *Mock) UnMockAPaaSQueryAPaaSApplicationEnvironmentVariable() {
r.mockAPaaSQueryAPaaSApplicationEnvironmentVariable = nil
}
// QueryAPaaSApplicationEnvironmentVariableReq ...
type QueryAPaaSApplicationEnvironmentVariableReq struct {
Namespace string `path:"namespace" json:"-"` // 应用命名空间示例值: "package_test__c"
Filter *QueryAPaaSApplicationEnvironmentVariableReqFilter `json:"filter,omitempty"` // 过滤条件
Limit *int64 `json:"limit,omitempty"` // 限制的条数, 默认为 500, 不可超过 500示例值: 10 取值范围: `0` ~ `500`
Offset *int64 `json:"offset,omitempty"` // 返回记录的偏移量, 默认为 0, 即从查询到的第一个记录开始返回示例值: 0 取值范围: `0` ~ `9223372036854775807`
}
// QueryAPaaSApplicationEnvironmentVariableReqFilter ...
type QueryAPaaSApplicationEnvironmentVariableReqFilter struct {
QuickQuery *string `json:"quick_query,omitempty"` // 模糊查询关键词示例值: "Sample Text"
}
// QueryAPaaSApplicationEnvironmentVariableResp ...
type QueryAPaaSApplicationEnvironmentVariableResp struct {
Items []*QueryAPaaSApplicationEnvironmentVariableRespItem `json:"items,omitempty"` // 环境变量列表
Total int64 `json:"total,omitempty"` // 符合查询条件的环境变量的总数
}
// QueryAPaaSApplicationEnvironmentVariableRespItem ...
type QueryAPaaSApplicationEnvironmentVariableRespItem struct {
ApiName string `json:"api_name,omitempty"` // 环境变量 API 名称
Label *QueryAPaaSApplicationEnvironmentVariableRespItemLabel `json:"label,omitempty"` // 环境变量的名称
Description string `json:"description,omitempty"` // 描述
Value string `json:"value,omitempty"` // 返回 json marshal 后的字符串。 is_encrypted 为 「true」时, 依然可以获取返回值
IsEncrypted bool `json:"is_encrypted,omitempty"` // 是否加密, 「type」取值为 text, float 时才有效
ObjectApiName string `json:"object_api_name,omitempty"` // 对象的 API 名称, 「type」取值为 lookup, lookup_multi 时才有效
ObjectLabel *QueryAPaaSApplicationEnvironmentVariableRespItemObjectLabel `json:"object_label,omitempty"` // 对象的名称, 「type」取值为 lookup, lookup_multi 时才有效
CreatedAt int64 `json:"created_at,omitempty"` // 「创建时间」, 日期时间字段。 使用 Unix 时间戳, 单位为毫秒
UpdatedAt int64 `json:"updated_at,omitempty"` // 「更新时间」, 日期时间字段。 使用 Unix 时间戳, 单位为毫秒
Type string `json:"type,omitempty"` // 环境变量的类型, 可取值范围有: lookup, lookup_multi, text, float 等
}
// QueryAPaaSApplicationEnvironmentVariableRespItemLabel ...
type QueryAPaaSApplicationEnvironmentVariableRespItemLabel struct {
ZhCn string `json:"zh_cn,omitempty"` // 中文内容
EnUs string `json:"en_us,omitempty"` // 英文内容
}
// QueryAPaaSApplicationEnvironmentVariableRespItemObjectLabel ...
type QueryAPaaSApplicationEnvironmentVariableRespItemObjectLabel struct {
ZhCn string `json:"zh_cn,omitempty"` // 中文内容
EnUs string `json:"en_us,omitempty"` // 英文内容
}
// queryAPaaSApplicationEnvironmentVariableResp ...
type queryAPaaSApplicationEnvironmentVariableResp struct {
Code int64 `json:"code,omitempty"` // 错误码, 非 0 表示失败
Msg string `json:"msg,omitempty"` // 错误描述
Data *QueryAPaaSApplicationEnvironmentVariableResp `json:"data,omitempty"`
Error *ErrorDetail `json:"error,omitempty"`
}