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+ )
22+
23+ type DomainTxtValidateRequest struct {
24+
25+ core.JDCloudRequest
26+
27+ /* 域名 (Optional) */
28+ Domain * string `json:"domain"`
29+
30+ /* 校验类型,dns or file (Optional) */
31+ ValidateType * string `json:"validateType"`
32+
33+ /* 主机记录,dns验证方式时必传.值为_cdnautover (Optional) */
34+ HostRecord * string `json:"hostRecord"`
35+
36+ /* 主机记录值 (Optional) */
37+ Txt * string `json:"txt"`
38+
39+ /* file验证方式时必传 (Optional) */
40+ Url * string `json:"url"`
41+ }
42+
43+ /*
44+ *
45+ * @Deprecated, not compatible when mandatory parameters changed
46+ */
47+ func NewDomainTxtValidateRequest (
48+ ) * DomainTxtValidateRequest {
49+
50+ return & DomainTxtValidateRequest {
51+ JDCloudRequest : core.JDCloudRequest {
52+ URL : "/domainTxtValidate" ,
53+ Method : "POST" ,
54+ Header : nil ,
55+ Version : "v1" ,
56+ },
57+ }
58+ }
59+
60+ /*
61+ * param domain: 域名 (Optional)
62+ * param validateType: 校验类型,dns or file (Optional)
63+ * param hostRecord: 主机记录,dns验证方式时必传.值为_cdnautover (Optional)
64+ * param txt: 主机记录值 (Optional)
65+ * param url: file验证方式时必传 (Optional)
66+ */
67+ func NewDomainTxtValidateRequestWithAllParams (
68+ domain * string ,
69+ validateType * string ,
70+ hostRecord * string ,
71+ txt * string ,
72+ url * string ,
73+ ) * DomainTxtValidateRequest {
74+
75+ return & DomainTxtValidateRequest {
76+ JDCloudRequest : core.JDCloudRequest {
77+ URL : "/domainTxtValidate" ,
78+ Method : "POST" ,
79+ Header : nil ,
80+ Version : "v1" ,
81+ },
82+ Domain : domain ,
83+ ValidateType : validateType ,
84+ HostRecord : hostRecord ,
85+ Txt : txt ,
86+ Url : url ,
87+ }
88+ }
89+
90+ /* This constructor has better compatible ability when API parameters changed */
91+ func NewDomainTxtValidateRequestWithoutParam () * DomainTxtValidateRequest {
92+
93+ return & DomainTxtValidateRequest {
94+ JDCloudRequest : core.JDCloudRequest {
95+ URL : "/domainTxtValidate" ,
96+ Method : "POST" ,
97+ Header : nil ,
98+ Version : "v1" ,
99+ },
100+ }
101+ }
102+
103+ /* param domain: 域名(Optional) */
104+ func (r * DomainTxtValidateRequest ) SetDomain (domain string ) {
105+ r .Domain = & domain
106+ }
107+ /* param validateType: 校验类型,dns or file(Optional) */
108+ func (r * DomainTxtValidateRequest ) SetValidateType (validateType string ) {
109+ r .ValidateType = & validateType
110+ }
111+ /* param hostRecord: 主机记录,dns验证方式时必传.值为_cdnautover(Optional) */
112+ func (r * DomainTxtValidateRequest ) SetHostRecord (hostRecord string ) {
113+ r .HostRecord = & hostRecord
114+ }
115+ /* param txt: 主机记录值(Optional) */
116+ func (r * DomainTxtValidateRequest ) SetTxt (txt string ) {
117+ r .Txt = & txt
118+ }
119+ /* param url: file验证方式时必传(Optional) */
120+ func (r * DomainTxtValidateRequest ) SetUrl (url string ) {
121+ r .Url = & url
122+ }
123+
124+
125+ // GetRegionId returns path parameter 'regionId' if exist,
126+ // otherwise return empty string
127+ func (r DomainTxtValidateRequest ) GetRegionId () string {
128+ return ""
129+ }
130+
131+ type DomainTxtValidateResponse struct {
132+ RequestID string `json:"requestId"`
133+ Error core.ErrorResponse `json:"error"`
134+ Result DomainTxtValidateResult `json:"result"`
135+ }
136+
137+ type DomainTxtValidateResult struct {
138+ Pass bool `json:"pass"`
139+ ErrMsg string `json:"errMsg"`
140+ }
0 commit comments