DescribeViewTree.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  	domainservice "github.com/go-acme/jdcloud-sdk-go/services/domainservice/models"
  22  )
  23  
  24  type DescribeViewTreeRequest struct {
  25  	core.JDCloudRequest
  26  
  27  	/* 实例所属的地域ID  */
  28  	RegionId string `json:"regionId"`
  29  
  30  	/* 域名ID,请使用describeDomains接口获取。  */
  31  	DomainId string `json:"domainId"`
  32  
  33  	/* 展示方式,暂时不使用 (Optional) */
  34  	LoadMode *int `json:"loadMode"`
  35  
  36  	/* 套餐ID,0->免费版 1->企业版 2->企业高级版  */
  37  	PackId int `json:"packId"`
  38  
  39  	/* view ID,默认为-1  */
  40  	ViewId int `json:"viewId"`
  41  }
  42  
  43  /*
  44   * param regionId: 实例所属的地域ID (Required)
  45   * param domainId: 域名ID,请使用describeDomains接口获取。 (Required)
  46   * param packId: 套餐ID,0->免费版 1->企业版 2->企业高级版 (Required)
  47   * param viewId: view ID,默认为-1 (Required)
  48   *
  49   * @Deprecated, not compatible when mandatory parameters changed
  50   */
  51  func NewDescribeViewTreeRequest(
  52  	regionId string,
  53  	domainId string,
  54  	packId int,
  55  	viewId int,
  56  ) *DescribeViewTreeRequest {
  57  
  58  	return &DescribeViewTreeRequest{
  59  		JDCloudRequest: core.JDCloudRequest{
  60  			URL:     "/regions/{regionId}/domain/{domainId}/viewTree",
  61  			Method:  "GET",
  62  			Header:  nil,
  63  			Version: "v2",
  64  		},
  65  		RegionId: regionId,
  66  		DomainId: domainId,
  67  		PackId:   packId,
  68  		ViewId:   viewId,
  69  	}
  70  }
  71  
  72  /*
  73   * param regionId: 实例所属的地域ID (Required)
  74   * param domainId: 域名ID,请使用describeDomains接口获取。 (Required)
  75   * param loadMode: 展示方式,暂时不使用 (Optional)
  76   * param packId: 套餐ID,0->免费版 1->企业版 2->企业高级版 (Required)
  77   * param viewId: view ID,默认为-1 (Required)
  78   */
  79  func NewDescribeViewTreeRequestWithAllParams(
  80  	regionId string,
  81  	domainId string,
  82  	loadMode *int,
  83  	packId int,
  84  	viewId int,
  85  ) *DescribeViewTreeRequest {
  86  
  87  	return &DescribeViewTreeRequest{
  88  		JDCloudRequest: core.JDCloudRequest{
  89  			URL:     "/regions/{regionId}/domain/{domainId}/viewTree",
  90  			Method:  "GET",
  91  			Header:  nil,
  92  			Version: "v2",
  93  		},
  94  		RegionId: regionId,
  95  		DomainId: domainId,
  96  		LoadMode: loadMode,
  97  		PackId:   packId,
  98  		ViewId:   viewId,
  99  	}
 100  }
 101  
 102  /* This constructor has better compatible ability when API parameters changed */
 103  func NewDescribeViewTreeRequestWithoutParam() *DescribeViewTreeRequest {
 104  
 105  	return &DescribeViewTreeRequest{
 106  		JDCloudRequest: core.JDCloudRequest{
 107  			URL:     "/regions/{regionId}/domain/{domainId}/viewTree",
 108  			Method:  "GET",
 109  			Header:  nil,
 110  			Version: "v2",
 111  		},
 112  	}
 113  }
 114  
 115  /* param regionId: 实例所属的地域ID(Required) */
 116  func (r *DescribeViewTreeRequest) SetRegionId(regionId string) {
 117  	r.RegionId = regionId
 118  }
 119  
 120  /* param domainId: 域名ID,请使用describeDomains接口获取。(Required) */
 121  func (r *DescribeViewTreeRequest) SetDomainId(domainId string) {
 122  	r.DomainId = domainId
 123  }
 124  
 125  /* param loadMode: 展示方式,暂时不使用(Optional) */
 126  func (r *DescribeViewTreeRequest) SetLoadMode(loadMode int) {
 127  	r.LoadMode = &loadMode
 128  }
 129  
 130  /* param packId: 套餐ID,0->免费版 1->企业版 2->企业高级版(Required) */
 131  func (r *DescribeViewTreeRequest) SetPackId(packId int) {
 132  	r.PackId = packId
 133  }
 134  
 135  /* param viewId: view ID,默认为-1(Required) */
 136  func (r *DescribeViewTreeRequest) SetViewId(viewId int) {
 137  	r.ViewId = viewId
 138  }
 139  
 140  // GetRegionId returns path parameter 'regionId' if exist,
 141  // otherwise return empty string
 142  func (r DescribeViewTreeRequest) GetRegionId() string {
 143  	return r.RegionId
 144  }
 145  
 146  type DescribeViewTreeResponse struct {
 147  	RequestID string                 `json:"requestId"`
 148  	Error     core.ErrorResponse     `json:"error"`
 149  	Result    DescribeViewTreeResult `json:"result"`
 150  }
 151  
 152  type DescribeViewTreeResult struct {
 153  	Data []domainservice.ViewTree `json:"data"`
 154  }
 155