UnShareImage.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 UnShareImageRequest struct {
  21. core.JDCloudRequest
  22. /* 地域ID */
  23. RegionId string `json:"regionId"`
  24. /* 镜像ID */
  25. ImageId string `json:"imageId"`
  26. /* 需要取消的帐户 */
  27. Pins []string `json:"pins"`
  28. }
  29. /*
  30. * param regionId: 地域ID (Required)
  31. * param imageId: 镜像ID (Required)
  32. * param pins: 需要取消的帐户 (Required)
  33. *
  34. * @Deprecated, not compatible when mandatory parameters changed
  35. */
  36. func NewUnShareImageRequest(
  37. regionId string,
  38. imageId string,
  39. pins []string,
  40. ) *UnShareImageRequest {
  41. return &UnShareImageRequest{
  42. JDCloudRequest: core.JDCloudRequest{
  43. URL: "/regions/{regionId}/images/{imageId}:unshare",
  44. Method: "POST",
  45. Header: nil,
  46. Version: "v1",
  47. },
  48. RegionId: regionId,
  49. ImageId: imageId,
  50. Pins: pins,
  51. }
  52. }
  53. /*
  54. * param regionId: 地域ID (Required)
  55. * param imageId: 镜像ID (Required)
  56. * param pins: 需要取消的帐户 (Required)
  57. */
  58. func NewUnShareImageRequestWithAllParams(
  59. regionId string,
  60. imageId string,
  61. pins []string,
  62. ) *UnShareImageRequest {
  63. return &UnShareImageRequest{
  64. JDCloudRequest: core.JDCloudRequest{
  65. URL: "/regions/{regionId}/images/{imageId}:unshare",
  66. Method: "POST",
  67. Header: nil,
  68. Version: "v1",
  69. },
  70. RegionId: regionId,
  71. ImageId: imageId,
  72. Pins: pins,
  73. }
  74. }
  75. /* This constructor has better compatible ability when API parameters changed */
  76. func NewUnShareImageRequestWithoutParam() *UnShareImageRequest {
  77. return &UnShareImageRequest{
  78. JDCloudRequest: core.JDCloudRequest{
  79. URL: "/regions/{regionId}/images/{imageId}:unshare",
  80. Method: "POST",
  81. Header: nil,
  82. Version: "v1",
  83. },
  84. }
  85. }
  86. /* param regionId: 地域ID(Required) */
  87. func (r *UnShareImageRequest) SetRegionId(regionId string) {
  88. r.RegionId = regionId
  89. }
  90. /* param imageId: 镜像ID(Required) */
  91. func (r *UnShareImageRequest) SetImageId(imageId string) {
  92. r.ImageId = imageId
  93. }
  94. /* param pins: 需要取消的帐户(Required) */
  95. func (r *UnShareImageRequest) SetPins(pins []string) {
  96. r.Pins = pins
  97. }
  98. // GetRegionId returns path parameter 'regionId' if exist,
  99. // otherwise return empty string
  100. func (r UnShareImageRequest) GetRegionId() string {
  101. return r.RegionId
  102. }
  103. type UnShareImageResponse struct {
  104. RequestID string `json:"requestId"`
  105. Error core.ErrorResponse `json:"error"`
  106. Result UnShareImageResult `json:"result"`
  107. }
  108. type UnShareImageResult struct {
  109. }