forked from huaweicloud/huaweicloud-sdk-go-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_create_api_group_v2_response.go
117 lines (88 loc) · 3.15 KB
/
model_create_api_group_v2_response.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
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"
)
// CreateApiGroupV2Response Response Object
type CreateApiGroupV2Response struct {
// 编号
Id string `json:"id"`
// API分组名称
Name string `json:"name"`
// 状态 - 1: 有效
Status CreateApiGroupV2ResponseStatus `json:"status"`
// 系统默认分配的子域名
SlDomain string `json:"sl_domain"`
// 创建时间
RegisterTime *sdktime.SdkTime `json:"register_time"`
// 最近修改时间
UpdateTime *sdktime.SdkTime `json:"update_time"`
// 是否已上架云商店: - 1:已上架 - 2:未上架 - 3:审核中 [暂不支持](tag:cmcc,ctc,DT,g42,hk_g42,hk_sbc,hk_tm,hws_eu,hws_ocb,OCB,sbc,tm,hws_hk)
OnSellStatus int32 `json:"on_sell_status"`
// 分组上绑定的独立域名列表
UrlDomains *[]UrlDomain `json:"url_domains,omitempty"`
// 系统默认分配的子域名列表
SlDomains *[]string `json:"sl_domains,omitempty"`
// 描述
Remark *string `json:"remark,omitempty"`
// 流控时长内分组下的API的总访问次数限制,默认不限,请根据服务的负载能力自行设置 暂不支持
CallLimits *int32 `json:"call_limits,omitempty"`
// 流控时长 暂不支持
TimeInterval *int32 `json:"time_interval,omitempty"`
// 流控的时间单位 暂不支持
TimeUnit *string `json:"time_unit,omitempty"`
// 是否为默认分组
IsDefault *int32 `json:"is_default,omitempty"`
// 分组版本 - V1:全局分组 - V2:应用级分组 暂不支持,默认为V1
Version *string `json:"version,omitempty"`
// 分组归属的集成应用编号。 分组版本V2时必填。 暂不支持
RomaAppId *string `json:"roma_app_id,omitempty"`
// 分组归属的集成应用名称 暂不支持
RomaAppName *string `json:"roma_app_name,omitempty"`
HttpStatusCode int `json:"-"`
}
func (o CreateApiGroupV2Response) String() string {
data, err := utils.Marshal(o)
if err != nil {
return "CreateApiGroupV2Response struct{}"
}
return strings.Join([]string{"CreateApiGroupV2Response", string(data)}, " ")
}
type CreateApiGroupV2ResponseStatus struct {
value int32
}
type CreateApiGroupV2ResponseStatusEnum struct {
E_1 CreateApiGroupV2ResponseStatus
}
func GetCreateApiGroupV2ResponseStatusEnum() CreateApiGroupV2ResponseStatusEnum {
return CreateApiGroupV2ResponseStatusEnum{
E_1: CreateApiGroupV2ResponseStatus{
value: 1,
},
}
}
func (c CreateApiGroupV2ResponseStatus) Value() int32 {
return c.value
}
func (c CreateApiGroupV2ResponseStatus) MarshalJSON() ([]byte, error) {
return utils.Marshal(c.value)
}
func (c *CreateApiGroupV2ResponseStatus) UnmarshalJSON(b []byte) error {
myConverter := converter.StringConverterFactory("int32")
if myConverter == nil {
return errors.New("unsupported StringConverter type: int32")
}
interf, err := myConverter.CovertStringToInterface(strings.Trim(string(b[:]), "\""))
if err != nil {
return err
}
if val, ok := interf.(int32); ok {
c.value = val
return nil
} else {
return errors.New("convert enum data to int32 error")
}
}