DescribeSnapshotChain.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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 DescribeSnapshotChainRequest struct {
  21. core.JDCloudRequest
  22. /* 地域ID */
  23. RegionId string `json:"regionId"`
  24. /* 云硬盘ID (Optional) */
  25. DiskId *string `json:"diskId"`
  26. /* 快照ID (Optional) */
  27. SnapshotId *string `json:"snapshotId"`
  28. }
  29. /*
  30. * param regionId: 地域ID (Required)
  31. *
  32. * @Deprecated, not compatible when mandatory parameters changed
  33. */
  34. func NewDescribeSnapshotChainRequest(
  35. regionId string,
  36. ) *DescribeSnapshotChainRequest {
  37. return &DescribeSnapshotChainRequest{
  38. JDCloudRequest: core.JDCloudRequest{
  39. URL: "/regions/{regionId}/snapshots:chain",
  40. Method: "GET",
  41. Header: nil,
  42. Version: "v1",
  43. },
  44. RegionId: regionId,
  45. }
  46. }
  47. /*
  48. * param regionId: 地域ID (Required)
  49. * param diskId: 云硬盘ID (Optional)
  50. * param snapshotId: 快照ID (Optional)
  51. */
  52. func NewDescribeSnapshotChainRequestWithAllParams(
  53. regionId string,
  54. diskId *string,
  55. snapshotId *string,
  56. ) *DescribeSnapshotChainRequest {
  57. return &DescribeSnapshotChainRequest{
  58. JDCloudRequest: core.JDCloudRequest{
  59. URL: "/regions/{regionId}/snapshots:chain",
  60. Method: "GET",
  61. Header: nil,
  62. Version: "v1",
  63. },
  64. RegionId: regionId,
  65. DiskId: diskId,
  66. SnapshotId: snapshotId,
  67. }
  68. }
  69. /* This constructor has better compatible ability when API parameters changed */
  70. func NewDescribeSnapshotChainRequestWithoutParam() *DescribeSnapshotChainRequest {
  71. return &DescribeSnapshotChainRequest{
  72. JDCloudRequest: core.JDCloudRequest{
  73. URL: "/regions/{regionId}/snapshots:chain",
  74. Method: "GET",
  75. Header: nil,
  76. Version: "v1",
  77. },
  78. }
  79. }
  80. /* param regionId: 地域ID(Required) */
  81. func (r *DescribeSnapshotChainRequest) SetRegionId(regionId string) {
  82. r.RegionId = regionId
  83. }
  84. /* param diskId: 云硬盘ID(Optional) */
  85. func (r *DescribeSnapshotChainRequest) SetDiskId(diskId string) {
  86. r.DiskId = &diskId
  87. }
  88. /* param snapshotId: 快照ID(Optional) */
  89. func (r *DescribeSnapshotChainRequest) SetSnapshotId(snapshotId string) {
  90. r.SnapshotId = &snapshotId
  91. }
  92. // GetRegionId returns path parameter 'regionId' if exist,
  93. // otherwise return empty string
  94. func (r DescribeSnapshotChainRequest) GetRegionId() string {
  95. return r.RegionId
  96. }
  97. type DescribeSnapshotChainResponse struct {
  98. RequestID string `json:"requestId"`
  99. Error core.ErrorResponse `json:"error"`
  100. Result DescribeSnapshotChainResult `json:"result"`
  101. }
  102. type DescribeSnapshotChainResult struct {
  103. SnapshotChain interface{} `json:"snapshotChain"`
  104. }