1+ // Copyright 2018 JDCLOUD.COM
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+ //
15+ // NOTE: This class is auto generated by the jdcloud code generator program.
16+
17+ package apis
18+
19+ import (
20+ "github.com/jdcloud-api/jdcloud-sdk-go/core"
21+ pod "github.com/jdcloud-api/jdcloud-sdk-go/services/pod/models"
22+ )
23+
24+ type CreateConfigFileRequest struct {
25+
26+ core.JDCloudRequest
27+
28+ /* Region ID */
29+ RegionId string `json:"regionId"`
30+
31+ /* configFile名字,不能重复
32+ */
33+ Name string `json:"name"`
34+
35+ /* key 的有效字符包括字母、数字、-、_和.; <br>
36+ value 每个value长度上限为32KB,整个data的长度不能超过1M; <br>
37+ */
38+ Data []pod.FileToPath `json:"data"`
39+ }
40+
41+ /*
42+ * param regionId: Region ID (Required)
43+ * param name: configFile名字,不能重复
44+ (Required)
45+ * param data: key 的有效字符包括字母、数字、-、_和.; <br>
46+ value 每个value长度上限为32KB,整个data的长度不能超过1M; <br>
47+ (Required)
48+ *
49+ * @Deprecated, not compatible when mandatory parameters changed
50+ */
51+ func NewCreateConfigFileRequest (
52+ regionId string ,
53+ name string ,
54+ data []pod.FileToPath ,
55+ ) * CreateConfigFileRequest {
56+
57+ return & CreateConfigFileRequest {
58+ JDCloudRequest : core.JDCloudRequest {
59+ URL : "/regions/{regionId}/configFiles" ,
60+ Method : "POST" ,
61+ Header : nil ,
62+ Version : "v1" ,
63+ },
64+ RegionId : regionId ,
65+ Name : name ,
66+ Data : data ,
67+ }
68+ }
69+
70+ /*
71+ * param regionId: Region ID (Required)
72+ * param name: configFile名字,不能重复
73+ (Required)
74+ * param data: key 的有效字符包括字母、数字、-、_和.; <br>
75+ value 每个value长度上限为32KB,整个data的长度不能超过1M; <br>
76+ (Required)
77+ */
78+ func NewCreateConfigFileRequestWithAllParams (
79+ regionId string ,
80+ name string ,
81+ data []pod.FileToPath ,
82+ ) * CreateConfigFileRequest {
83+
84+ return & CreateConfigFileRequest {
85+ JDCloudRequest : core.JDCloudRequest {
86+ URL : "/regions/{regionId}/configFiles" ,
87+ Method : "POST" ,
88+ Header : nil ,
89+ Version : "v1" ,
90+ },
91+ RegionId : regionId ,
92+ Name : name ,
93+ Data : data ,
94+ }
95+ }
96+
97+ /* This constructor has better compatible ability when API parameters changed */
98+ func NewCreateConfigFileRequestWithoutParam () * CreateConfigFileRequest {
99+
100+ return & CreateConfigFileRequest {
101+ JDCloudRequest : core.JDCloudRequest {
102+ URL : "/regions/{regionId}/configFiles" ,
103+ Method : "POST" ,
104+ Header : nil ,
105+ Version : "v1" ,
106+ },
107+ }
108+ }
109+
110+ /* param regionId: Region ID(Required) */
111+ func (r * CreateConfigFileRequest ) SetRegionId (regionId string ) {
112+ r .RegionId = regionId
113+ }
114+
115+ /* param name: configFile名字,不能重复
116+ (Required) */
117+ func (r * CreateConfigFileRequest ) SetName (name string ) {
118+ r .Name = name
119+ }
120+
121+ /* param data: key 的有效字符包括字母、数字、-、_和.; <br>
122+ value 每个value长度上限为32KB,整个data的长度不能超过1M; <br>
123+ (Required) */
124+ func (r * CreateConfigFileRequest ) SetData (data []pod.FileToPath ) {
125+ r .Data = data
126+ }
127+
128+ // GetRegionId returns path parameter 'regionId' if exist,
129+ // otherwise return empty string
130+ func (r CreateConfigFileRequest ) GetRegionId () string {
131+ return r .RegionId
132+ }
133+
134+ type CreateConfigFileResponse struct {
135+ RequestID string `json:"requestId"`
136+ Error core.ErrorResponse `json:"error"`
137+ Result CreateConfigFileResult `json:"result"`
138+ }
139+
140+ type CreateConfigFileResult struct {
141+ Name string `json:"name"`
142+ }
0 commit comments