forked from huaweicloud/huaweicloud-sdk-go-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_extension_version_snake.go
321 lines (264 loc) · 8.95 KB
/
model_extension_version_snake.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
package model
import (
"errors"
"github.com/dysodeng/huaweicloud-sdk-go-v3/core/converter"
"github.com/dysodeng/huaweicloud-sdk-go-v3/core/sdktime"
"github.com/dysodeng/huaweicloud-sdk-go-v3/core/utils"
"strings"
)
type ExtensionVersionSnake struct {
// 插件版本id
Id *string `json:"id,omitempty"`
// 插件版本号
Version *string `json:"version,omitempty"`
// 版本排序
VersionRanking *int64 `json:"version_ranking,omitempty"`
// 插件版本状态 - INIT 待发布 - VALIDATING 审核中 - REJECTED 审核拒绝 - PUBLISHED 插件上架 - OFFLINE 插件下线 - ABANDONED 废弃 - GRAY_INIT 灰度审核 - GRAYED 灰度发布 - GRAY_REJECTED 灰度拒绝
Status *ExtensionVersionSnakeStatus `json:"status,omitempty"`
// 插件状态 - INIT 待发布 - VALIDATING 审核中 - REJECTED 审核拒绝 - PUBLISHED 插件上架 - OFFLINE 插件下线 - ABANDONED 废弃 - GRAY_INIT 灰度审核 - GRAYED 灰度发布 - GRAY_REJECTED 灰度拒绝
VersionStatus *ExtensionVersionSnakeVersionStatus `json:"version_status,omitempty"`
// 资源文件url
AssetUri *string `json:"asset_uri,omitempty"`
// 更新时间
LastUpdated *sdktime.SdkTime `json:"last_updated,omitempty"`
// 插件文件集合
Files *[]ExtensionFileSnake `json:"files,omitempty"`
// 插件审核信息
ValidateMessage *string `json:"validate_message,omitempty"`
// 插件审核状态 - NONE 无 - UPLOADING 上传中 - VALIDATING 系统审核 - OFFLINING 用户申请下线 - ONLINING 用户申请上线 - UMS_VALIDATING 发布商审核中
VersionValidateStatus *ExtensionVersionSnakeVersionValidateStatus `json:"version_validate_status,omitempty"`
// 插件展示名称
DisplayName *string `json:"display_name,omitempty"`
// 插件描述
Description *string `json:"description,omitempty"`
// 插件支持ide版本
MinIdeVersion *string `json:"min_ide_version,omitempty"`
// 支持的最大版本
MaxIdeVersion *string `json:"max_ide_version,omitempty"`
// 发布时间
VersionDate *sdktime.SdkTime `json:"version_date,omitempty"`
// 是否预览
Preview *bool `json:"preview,omitempty"`
// 包含插件列表
ExtensionPack *string `json:"extension_pack,omitempty"`
// 依赖插件列表
ExtensionDependencies *string `json:"extension_dependencies,omitempty"`
// 创建时间
CreatedAt *sdktime.SdkTime `json:"created_at,omitempty"`
// 支持的ide编码
SupportIde *int32 `json:"support_ide,omitempty"`
// 插件包源码仓
RepoUrl *string `json:"repo_url,omitempty"`
// 帮助页面
HelpPage *string `json:"help_page,omitempty"`
// 产品首页
Website *string `json:"website,omitempty"`
// 问题链接
IssueLink *string `json:"issue_link,omitempty"`
// 插件大小
AssetSize *int64 `json:"asset_size,omitempty"`
// 依赖插件
Depends *[]string `json:"depends,omitempty"`
// CodeArtsIDEOnline插件版本参数
PropertyList *[]CodeArtsIdeOnlineExtensionVersionProperty `json:"property_list,omitempty"`
// 版本发布者
Uploader *string `json:"uploader,omitempty"`
// 插件id
ExtensionId *string `json:"extension_id,omitempty"`
}
func (o ExtensionVersionSnake) String() string {
data, err := utils.Marshal(o)
if err != nil {
return "ExtensionVersionSnake struct{}"
}
return strings.Join([]string{"ExtensionVersionSnake", string(data)}, " ")
}
type ExtensionVersionSnakeStatus struct {
value string
}
type ExtensionVersionSnakeStatusEnum struct {
INIT ExtensionVersionSnakeStatus
VALIDATING ExtensionVersionSnakeStatus
REJECTED ExtensionVersionSnakeStatus
PUBLISHED ExtensionVersionSnakeStatus
OFFLINE ExtensionVersionSnakeStatus
ABANDONED ExtensionVersionSnakeStatus
GRAY_INIT ExtensionVersionSnakeStatus
GRAYED ExtensionVersionSnakeStatus
GRAY_REJECTED ExtensionVersionSnakeStatus
}
func GetExtensionVersionSnakeStatusEnum() ExtensionVersionSnakeStatusEnum {
return ExtensionVersionSnakeStatusEnum{
INIT: ExtensionVersionSnakeStatus{
value: "INIT",
},
VALIDATING: ExtensionVersionSnakeStatus{
value: "VALIDATING",
},
REJECTED: ExtensionVersionSnakeStatus{
value: "REJECTED",
},
PUBLISHED: ExtensionVersionSnakeStatus{
value: "PUBLISHED",
},
OFFLINE: ExtensionVersionSnakeStatus{
value: "OFFLINE",
},
ABANDONED: ExtensionVersionSnakeStatus{
value: "ABANDONED",
},
GRAY_INIT: ExtensionVersionSnakeStatus{
value: "GRAY_INIT",
},
GRAYED: ExtensionVersionSnakeStatus{
value: "GRAYED",
},
GRAY_REJECTED: ExtensionVersionSnakeStatus{
value: "GRAY_REJECTED",
},
}
}
func (c ExtensionVersionSnakeStatus) Value() string {
return c.value
}
func (c ExtensionVersionSnakeStatus) MarshalJSON() ([]byte, error) {
return utils.Marshal(c.value)
}
func (c *ExtensionVersionSnakeStatus) UnmarshalJSON(b []byte) error {
myConverter := converter.StringConverterFactory("string")
if myConverter == nil {
return errors.New("unsupported StringConverter type: string")
}
interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\""))
if err != nil {
return err
}
if val, ok := interf.(string); ok {
c.value = val
return nil
} else {
return errors.New("convert enum data to string error")
}
}
type ExtensionVersionSnakeVersionStatus struct {
value string
}
type ExtensionVersionSnakeVersionStatusEnum struct {
INIT ExtensionVersionSnakeVersionStatus
VALIDATING ExtensionVersionSnakeVersionStatus
REJECTED ExtensionVersionSnakeVersionStatus
PUBLISHED ExtensionVersionSnakeVersionStatus
OFFLINE ExtensionVersionSnakeVersionStatus
ABANDONED ExtensionVersionSnakeVersionStatus
GRAY_INIT ExtensionVersionSnakeVersionStatus
GRAYED ExtensionVersionSnakeVersionStatus
GRAY_REJECTED ExtensionVersionSnakeVersionStatus
}
func GetExtensionVersionSnakeVersionStatusEnum() ExtensionVersionSnakeVersionStatusEnum {
return ExtensionVersionSnakeVersionStatusEnum{
INIT: ExtensionVersionSnakeVersionStatus{
value: "INIT",
},
VALIDATING: ExtensionVersionSnakeVersionStatus{
value: "VALIDATING",
},
REJECTED: ExtensionVersionSnakeVersionStatus{
value: "REJECTED",
},
PUBLISHED: ExtensionVersionSnakeVersionStatus{
value: "PUBLISHED",
},
OFFLINE: ExtensionVersionSnakeVersionStatus{
value: "OFFLINE",
},
ABANDONED: ExtensionVersionSnakeVersionStatus{
value: "ABANDONED",
},
GRAY_INIT: ExtensionVersionSnakeVersionStatus{
value: "GRAY_INIT",
},
GRAYED: ExtensionVersionSnakeVersionStatus{
value: "GRAYED",
},
GRAY_REJECTED: ExtensionVersionSnakeVersionStatus{
value: "GRAY_REJECTED",
},
}
}
func (c ExtensionVersionSnakeVersionStatus) Value() string {
return c.value
}
func (c ExtensionVersionSnakeVersionStatus) MarshalJSON() ([]byte, error) {
return utils.Marshal(c.value)
}
func (c *ExtensionVersionSnakeVersionStatus) UnmarshalJSON(b []byte) error {
myConverter := converter.StringConverterFactory("string")
if myConverter == nil {
return errors.New("unsupported StringConverter type: string")
}
interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\""))
if err != nil {
return err
}
if val, ok := interf.(string); ok {
c.value = val
return nil
} else {
return errors.New("convert enum data to string error")
}
}
type ExtensionVersionSnakeVersionValidateStatus struct {
value string
}
type ExtensionVersionSnakeVersionValidateStatusEnum struct {
NONE ExtensionVersionSnakeVersionValidateStatus
UPLOADING ExtensionVersionSnakeVersionValidateStatus
VALIDATING ExtensionVersionSnakeVersionValidateStatus
OFFLINING ExtensionVersionSnakeVersionValidateStatus
ONLINING ExtensionVersionSnakeVersionValidateStatus
UMS_VALIDATING ExtensionVersionSnakeVersionValidateStatus
}
func GetExtensionVersionSnakeVersionValidateStatusEnum() ExtensionVersionSnakeVersionValidateStatusEnum {
return ExtensionVersionSnakeVersionValidateStatusEnum{
NONE: ExtensionVersionSnakeVersionValidateStatus{
value: "NONE",
},
UPLOADING: ExtensionVersionSnakeVersionValidateStatus{
value: "UPLOADING",
},
VALIDATING: ExtensionVersionSnakeVersionValidateStatus{
value: "VALIDATING",
},
OFFLINING: ExtensionVersionSnakeVersionValidateStatus{
value: "OFFLINING",
},
ONLINING: ExtensionVersionSnakeVersionValidateStatus{
value: "ONLINING",
},
UMS_VALIDATING: ExtensionVersionSnakeVersionValidateStatus{
value: "UMS_VALIDATING",
},
}
}
func (c ExtensionVersionSnakeVersionValidateStatus) Value() string {
return c.value
}
func (c ExtensionVersionSnakeVersionValidateStatus) MarshalJSON() ([]byte, error) {
return utils.Marshal(c.value)
}
func (c *ExtensionVersionSnakeVersionValidateStatus) UnmarshalJSON(b []byte) error {
myConverter := converter.StringConverterFactory("string")
if myConverter == nil {
return errors.New("unsupported StringConverter type: string")
}
interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\""))
if err != nil {
return err
}
if val, ok := interf.(string); ok {
c.value = val
return nil
} else {
return errors.New("convert enum data to string error")
}
}