DisassociateElasticIp.go 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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 DisassociateElasticIpRequest struct {
  21. core.JDCloudRequest
  22. /* Region ID */
  23. RegionId string `json:"regionId"`
  24. /* networkInterface ID */
  25. NetworkInterfaceId string `json:"networkInterfaceId"`
  26. /* 指定解绑的弹性Ip Id (Optional) */
  27. ElasticIpId *string `json:"elasticIpId"`
  28. /* 指定解绑的弹性Ip地址 (Optional) */
  29. ElasticIpAddress *string `json:"elasticIpAddress"`
  30. }
  31. /*
  32. * param regionId: Region ID (Required)
  33. * param networkInterfaceId: networkInterface ID (Required)
  34. *
  35. * @Deprecated, not compatible when mandatory parameters changed
  36. */
  37. func NewDisassociateElasticIpRequest(
  38. regionId string,
  39. networkInterfaceId string,
  40. ) *DisassociateElasticIpRequest {
  41. return &DisassociateElasticIpRequest{
  42. JDCloudRequest: core.JDCloudRequest{
  43. URL: "/regions/{regionId}/networkInterfaces/{networkInterfaceId}:disassociateElasticIp",
  44. Method: "POST",
  45. Header: nil,
  46. Version: "v1",
  47. },
  48. RegionId: regionId,
  49. NetworkInterfaceId: networkInterfaceId,
  50. }
  51. }
  52. /*
  53. * param regionId: Region ID (Required)
  54. * param networkInterfaceId: networkInterface ID (Required)
  55. * param elasticIpId: 指定解绑的弹性Ip Id (Optional)
  56. * param elasticIpAddress: 指定解绑的弹性Ip地址 (Optional)
  57. */
  58. func NewDisassociateElasticIpRequestWithAllParams(
  59. regionId string,
  60. networkInterfaceId string,
  61. elasticIpId *string,
  62. elasticIpAddress *string,
  63. ) *DisassociateElasticIpRequest {
  64. return &DisassociateElasticIpRequest{
  65. JDCloudRequest: core.JDCloudRequest{
  66. URL: "/regions/{regionId}/networkInterfaces/{networkInterfaceId}:disassociateElasticIp",
  67. Method: "POST",
  68. Header: nil,
  69. Version: "v1",
  70. },
  71. RegionId: regionId,
  72. NetworkInterfaceId: networkInterfaceId,
  73. ElasticIpId: elasticIpId,
  74. ElasticIpAddress: elasticIpAddress,
  75. }
  76. }
  77. /* This constructor has better compatible ability when API parameters changed */
  78. func NewDisassociateElasticIpRequestWithoutParam() *DisassociateElasticIpRequest {
  79. return &DisassociateElasticIpRequest{
  80. JDCloudRequest: core.JDCloudRequest{
  81. URL: "/regions/{regionId}/networkInterfaces/{networkInterfaceId}:disassociateElasticIp",
  82. Method: "POST",
  83. Header: nil,
  84. Version: "v1",
  85. },
  86. }
  87. }
  88. /* param regionId: Region ID(Required) */
  89. func (r *DisassociateElasticIpRequest) SetRegionId(regionId string) {
  90. r.RegionId = regionId
  91. }
  92. /* param networkInterfaceId: networkInterface ID(Required) */
  93. func (r *DisassociateElasticIpRequest) SetNetworkInterfaceId(networkInterfaceId string) {
  94. r.NetworkInterfaceId = networkInterfaceId
  95. }
  96. /* param elasticIpId: 指定解绑的弹性Ip Id(Optional) */
  97. func (r *DisassociateElasticIpRequest) SetElasticIpId(elasticIpId string) {
  98. r.ElasticIpId = &elasticIpId
  99. }
  100. /* param elasticIpAddress: 指定解绑的弹性Ip地址(Optional) */
  101. func (r *DisassociateElasticIpRequest) SetElasticIpAddress(elasticIpAddress string) {
  102. r.ElasticIpAddress = &elasticIpAddress
  103. }
  104. // GetRegionId returns path parameter 'regionId' if exist,
  105. // otherwise return empty string
  106. func (r DisassociateElasticIpRequest) GetRegionId() string {
  107. return r.RegionId
  108. }
  109. type DisassociateElasticIpResponse struct {
  110. RequestID string `json:"requestId"`
  111. Error core.ErrorResponse `json:"error"`
  112. Result DisassociateElasticIpResult `json:"result"`
  113. }
  114. type DisassociateElasticIpResult struct {
  115. }