DescribeAzs.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. package apis
  17. import (
  18. "github.com/jdcloud-api/jdcloud-sdk-go/core"
  19. )
  20. type DescribeAzsRequest struct {
  21. core.JDCloudRequest
  22. /* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
  23. RegionId string `json:"regionId"`
  24. /* RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) */
  25. Engine string `json:"engine"`
  26. }
  27. /*
  28. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  29. * param engine: RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
  30. *
  31. * @Deprecated, not compatible when mandatory parameters changed
  32. */
  33. func NewDescribeAzsRequest(
  34. regionId string,
  35. engine string,
  36. ) *DescribeAzsRequest {
  37. return &DescribeAzsRequest{
  38. JDCloudRequest: core.JDCloudRequest{
  39. URL: "/regions/{regionId}/azs",
  40. Method: "GET",
  41. Header: nil,
  42. Version: "v1",
  43. },
  44. RegionId: regionId,
  45. Engine: engine,
  46. }
  47. }
  48. /*
  49. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  50. * param engine: RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md) (Required)
  51. */
  52. func NewDescribeAzsRequestWithAllParams(
  53. regionId string,
  54. engine string,
  55. ) *DescribeAzsRequest {
  56. return &DescribeAzsRequest{
  57. JDCloudRequest: core.JDCloudRequest{
  58. URL: "/regions/{regionId}/azs",
  59. Method: "GET",
  60. Header: nil,
  61. Version: "v1",
  62. },
  63. RegionId: regionId,
  64. Engine: engine,
  65. }
  66. }
  67. /* This constructor has better compatible ability when API parameters changed */
  68. func NewDescribeAzsRequestWithoutParam() *DescribeAzsRequest {
  69. return &DescribeAzsRequest{
  70. JDCloudRequest: core.JDCloudRequest{
  71. URL: "/regions/{regionId}/azs",
  72. Method: "GET",
  73. Header: nil,
  74. Version: "v1",
  75. },
  76. }
  77. }
  78. /* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
  79. func (r *DescribeAzsRequest) SetRegionId(regionId string) {
  80. r.RegionId = regionId
  81. }
  82. /* param engine: RDS引擎类型,参见[枚举参数定义](../Enum-Definitions/Enum-Definitions.md)(Required) */
  83. func (r *DescribeAzsRequest) SetEngine(engine string) {
  84. r.Engine = engine
  85. }
  86. // GetRegionId returns path parameter 'regionId' if exist,
  87. // otherwise return empty string
  88. func (r DescribeAzsRequest) GetRegionId() string {
  89. return r.RegionId
  90. }
  91. type DescribeAzsResponse struct {
  92. RequestID string `json:"requestId"`
  93. Error core.ErrorResponse `json:"error"`
  94. Result DescribeAzsResult `json:"result"`
  95. }
  96. type DescribeAzsResult struct {
  97. Azs []string `json:"azs"`
  98. }