DeleteDomain.go raw

   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/go-acme/jdcloud-sdk-go/core"
  21  )
  22  
  23  type DeleteDomainRequest struct {
  24  	core.JDCloudRequest
  25  
  26  	/* 实例所属的地域ID  */
  27  	RegionId string `json:"regionId"`
  28  
  29  	/* 域名ID,请使用describeDomains接口获取。  */
  30  	DomainId string `json:"domainId"`
  31  }
  32  
  33  /*
  34   * param regionId: 实例所属的地域ID (Required)
  35   * param domainId: 域名ID,请使用describeDomains接口获取。 (Required)
  36   *
  37   * @Deprecated, not compatible when mandatory parameters changed
  38   */
  39  func NewDeleteDomainRequest(
  40  	regionId string,
  41  	domainId string,
  42  ) *DeleteDomainRequest {
  43  
  44  	return &DeleteDomainRequest{
  45  		JDCloudRequest: core.JDCloudRequest{
  46  			URL:     "/regions/{regionId}/domain/{domainId}",
  47  			Method:  "DELETE",
  48  			Header:  nil,
  49  			Version: "v2",
  50  		},
  51  		RegionId: regionId,
  52  		DomainId: domainId,
  53  	}
  54  }
  55  
  56  /*
  57   * param regionId: 实例所属的地域ID (Required)
  58   * param domainId: 域名ID,请使用describeDomains接口获取。 (Required)
  59   */
  60  func NewDeleteDomainRequestWithAllParams(
  61  	regionId string,
  62  	domainId string,
  63  ) *DeleteDomainRequest {
  64  
  65  	return &DeleteDomainRequest{
  66  		JDCloudRequest: core.JDCloudRequest{
  67  			URL:     "/regions/{regionId}/domain/{domainId}",
  68  			Method:  "DELETE",
  69  			Header:  nil,
  70  			Version: "v2",
  71  		},
  72  		RegionId: regionId,
  73  		DomainId: domainId,
  74  	}
  75  }
  76  
  77  /* This constructor has better compatible ability when API parameters changed */
  78  func NewDeleteDomainRequestWithoutParam() *DeleteDomainRequest {
  79  
  80  	return &DeleteDomainRequest{
  81  		JDCloudRequest: core.JDCloudRequest{
  82  			URL:     "/regions/{regionId}/domain/{domainId}",
  83  			Method:  "DELETE",
  84  			Header:  nil,
  85  			Version: "v2",
  86  		},
  87  	}
  88  }
  89  
  90  /* param regionId: 实例所属的地域ID(Required) */
  91  func (r *DeleteDomainRequest) SetRegionId(regionId string) {
  92  	r.RegionId = regionId
  93  }
  94  
  95  /* param domainId: 域名ID,请使用describeDomains接口获取。(Required) */
  96  func (r *DeleteDomainRequest) SetDomainId(domainId string) {
  97  	r.DomainId = domainId
  98  }
  99  
 100  // GetRegionId returns path parameter 'regionId' if exist,
 101  // otherwise return empty string
 102  func (r DeleteDomainRequest) GetRegionId() string {
 103  	return r.RegionId
 104  }
 105  
 106  type DeleteDomainResponse struct {
 107  	RequestID string             `json:"requestId"`
 108  	Error     core.ErrorResponse `json:"error"`
 109  	Result    DeleteDomainResult `json:"result"`
 110  }
 111  
 112  type DeleteDomainResult struct {
 113  }
 114