UnassignSecondaryIps.go 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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 UnassignSecondaryIpsRequest struct {
  21. core.JDCloudRequest
  22. /* Region ID */
  23. RegionId string `json:"regionId"`
  24. /* networkInterface ID */
  25. NetworkInterfaceId string `json:"networkInterfaceId"`
  26. /* 指定删除的secondaryIp地址 (Optional) */
  27. SecondaryIps []string `json:"secondaryIps"`
  28. }
  29. /*
  30. * param regionId: Region ID (Required)
  31. * param networkInterfaceId: networkInterface ID (Required)
  32. *
  33. * @Deprecated, not compatible when mandatory parameters changed
  34. */
  35. func NewUnassignSecondaryIpsRequest(
  36. regionId string,
  37. networkInterfaceId string,
  38. ) *UnassignSecondaryIpsRequest {
  39. return &UnassignSecondaryIpsRequest{
  40. JDCloudRequest: core.JDCloudRequest{
  41. URL: "/regions/{regionId}/networkInterfaces/{networkInterfaceId}:unassignSecondaryIps",
  42. Method: "POST",
  43. Header: nil,
  44. Version: "v1",
  45. },
  46. RegionId: regionId,
  47. NetworkInterfaceId: networkInterfaceId,
  48. }
  49. }
  50. /*
  51. * param regionId: Region ID (Required)
  52. * param networkInterfaceId: networkInterface ID (Required)
  53. * param secondaryIps: 指定删除的secondaryIp地址 (Optional)
  54. */
  55. func NewUnassignSecondaryIpsRequestWithAllParams(
  56. regionId string,
  57. networkInterfaceId string,
  58. secondaryIps []string,
  59. ) *UnassignSecondaryIpsRequest {
  60. return &UnassignSecondaryIpsRequest{
  61. JDCloudRequest: core.JDCloudRequest{
  62. URL: "/regions/{regionId}/networkInterfaces/{networkInterfaceId}:unassignSecondaryIps",
  63. Method: "POST",
  64. Header: nil,
  65. Version: "v1",
  66. },
  67. RegionId: regionId,
  68. NetworkInterfaceId: networkInterfaceId,
  69. SecondaryIps: secondaryIps,
  70. }
  71. }
  72. /* This constructor has better compatible ability when API parameters changed */
  73. func NewUnassignSecondaryIpsRequestWithoutParam() *UnassignSecondaryIpsRequest {
  74. return &UnassignSecondaryIpsRequest{
  75. JDCloudRequest: core.JDCloudRequest{
  76. URL: "/regions/{regionId}/networkInterfaces/{networkInterfaceId}:unassignSecondaryIps",
  77. Method: "POST",
  78. Header: nil,
  79. Version: "v1",
  80. },
  81. }
  82. }
  83. /* param regionId: Region ID(Required) */
  84. func (r *UnassignSecondaryIpsRequest) SetRegionId(regionId string) {
  85. r.RegionId = regionId
  86. }
  87. /* param networkInterfaceId: networkInterface ID(Required) */
  88. func (r *UnassignSecondaryIpsRequest) SetNetworkInterfaceId(networkInterfaceId string) {
  89. r.NetworkInterfaceId = networkInterfaceId
  90. }
  91. /* param secondaryIps: 指定删除的secondaryIp地址(Optional) */
  92. func (r *UnassignSecondaryIpsRequest) SetSecondaryIps(secondaryIps []string) {
  93. r.SecondaryIps = secondaryIps
  94. }
  95. // GetRegionId returns path parameter 'regionId' if exist,
  96. // otherwise return empty string
  97. func (r UnassignSecondaryIpsRequest) GetRegionId() string {
  98. return r.RegionId
  99. }
  100. type UnassignSecondaryIpsResponse struct {
  101. RequestID string `json:"requestId"`
  102. Error core.ErrorResponse `json:"error"`
  103. Result UnassignSecondaryIpsResult `json:"result"`
  104. }
  105. type UnassignSecondaryIpsResult struct {
  106. }