DescribeBackupCharge.go 3.5 KB

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