DescribeInstancePrivateIpAddress.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. vm "github.com/jdcloud-api/jdcloud-sdk-go/services/vm/models"
  20. common "github.com/jdcloud-api/jdcloud-sdk-go/services/common/models"
  21. )
  22. type DescribeInstancePrivateIpAddressRequest struct {
  23. core.JDCloudRequest
  24. /* 地域ID */
  25. RegionId string `json:"regionId"`
  26. /* 页码;默认为1 (Optional) */
  27. PageNumber *int `json:"pageNumber"`
  28. /* 分页大小;默认为20;取值范围[10, 100] (Optional) */
  29. PageSize *int `json:"pageSize"`
  30. /* instanceId - 云主机ID,精确匹配,支持多个
  31. privateIpAddress - 主网卡内网主IP地址,模糊匹配,支持多个
  32. vpcId - 私有网络ID,精确匹配,支持多个
  33. status - 云主机状态,精确匹配,支持多个,<a href="http://docs.jdcloud.com/virtual-machines/api/vm_status">参考云主机状态</a>
  34. name - 云主机名称,模糊匹配,支持单个
  35. imageId - 镜像ID,精确匹配,支持多个
  36. networkInterfaceId - 弹性网卡ID,精确匹配,支持多个
  37. subnetId - 子网ID,精确匹配,支持多个
  38. chargeOnStopped - 停机不计费标志,keepCharging、stopCharging 或者 notApplicable
  39. (Optional) */
  40. Filters []common.Filter `json:"filters"`
  41. }
  42. /*
  43. * param regionId: 地域ID (Required)
  44. *
  45. * @Deprecated, not compatible when mandatory parameters changed
  46. */
  47. func NewDescribeInstancePrivateIpAddressRequest(
  48. regionId string,
  49. ) *DescribeInstancePrivateIpAddressRequest {
  50. return &DescribeInstancePrivateIpAddressRequest{
  51. JDCloudRequest: core.JDCloudRequest{
  52. URL: "/regions/{regionId}/instancePrivateIpAddress",
  53. Method: "GET",
  54. Header: nil,
  55. Version: "v1",
  56. },
  57. RegionId: regionId,
  58. }
  59. }
  60. /*
  61. * param regionId: 地域ID (Required)
  62. * param pageNumber: 页码;默认为1 (Optional)
  63. * param pageSize: 分页大小;默认为20;取值范围[10, 100] (Optional)
  64. * param filters: instanceId - 云主机ID,精确匹配,支持多个
  65. privateIpAddress - 主网卡内网主IP地址,模糊匹配,支持多个
  66. vpcId - 私有网络ID,精确匹配,支持多个
  67. status - 云主机状态,精确匹配,支持多个,<a href="http://docs.jdcloud.com/virtual-machines/api/vm_status">参考云主机状态</a>
  68. name - 云主机名称,模糊匹配,支持单个
  69. imageId - 镜像ID,精确匹配,支持多个
  70. networkInterfaceId - 弹性网卡ID,精确匹配,支持多个
  71. subnetId - 子网ID,精确匹配,支持多个
  72. chargeOnStopped - 停机不计费标志,keepCharging、stopCharging 或者 notApplicable
  73. (Optional)
  74. */
  75. func NewDescribeInstancePrivateIpAddressRequestWithAllParams(
  76. regionId string,
  77. pageNumber *int,
  78. pageSize *int,
  79. filters []common.Filter,
  80. ) *DescribeInstancePrivateIpAddressRequest {
  81. return &DescribeInstancePrivateIpAddressRequest{
  82. JDCloudRequest: core.JDCloudRequest{
  83. URL: "/regions/{regionId}/instancePrivateIpAddress",
  84. Method: "GET",
  85. Header: nil,
  86. Version: "v1",
  87. },
  88. RegionId: regionId,
  89. PageNumber: pageNumber,
  90. PageSize: pageSize,
  91. Filters: filters,
  92. }
  93. }
  94. /* This constructor has better compatible ability when API parameters changed */
  95. func NewDescribeInstancePrivateIpAddressRequestWithoutParam() *DescribeInstancePrivateIpAddressRequest {
  96. return &DescribeInstancePrivateIpAddressRequest{
  97. JDCloudRequest: core.JDCloudRequest{
  98. URL: "/regions/{regionId}/instancePrivateIpAddress",
  99. Method: "GET",
  100. Header: nil,
  101. Version: "v1",
  102. },
  103. }
  104. }
  105. /* param regionId: 地域ID(Required) */
  106. func (r *DescribeInstancePrivateIpAddressRequest) SetRegionId(regionId string) {
  107. r.RegionId = regionId
  108. }
  109. /* param pageNumber: 页码;默认为1(Optional) */
  110. func (r *DescribeInstancePrivateIpAddressRequest) SetPageNumber(pageNumber int) {
  111. r.PageNumber = &pageNumber
  112. }
  113. /* param pageSize: 分页大小;默认为20;取值范围[10, 100](Optional) */
  114. func (r *DescribeInstancePrivateIpAddressRequest) SetPageSize(pageSize int) {
  115. r.PageSize = &pageSize
  116. }
  117. /* param filters: instanceId - 云主机ID,精确匹配,支持多个
  118. privateIpAddress - 主网卡内网主IP地址,模糊匹配,支持多个
  119. vpcId - 私有网络ID,精确匹配,支持多个
  120. status - 云主机状态,精确匹配,支持多个,<a href="http://docs.jdcloud.com/virtual-machines/api/vm_status">参考云主机状态</a>
  121. name - 云主机名称,模糊匹配,支持单个
  122. imageId - 镜像ID,精确匹配,支持多个
  123. networkInterfaceId - 弹性网卡ID,精确匹配,支持多个
  124. subnetId - 子网ID,精确匹配,支持多个
  125. chargeOnStopped - 停机不计费标志,keepCharging、stopCharging 或者 notApplicable
  126. (Optional) */
  127. func (r *DescribeInstancePrivateIpAddressRequest) SetFilters(filters []common.Filter) {
  128. r.Filters = filters
  129. }
  130. // GetRegionId returns path parameter 'regionId' if exist,
  131. // otherwise return empty string
  132. func (r DescribeInstancePrivateIpAddressRequest) GetRegionId() string {
  133. return r.RegionId
  134. }
  135. type DescribeInstancePrivateIpAddressResponse struct {
  136. RequestID string `json:"requestId"`
  137. Error core.ErrorResponse `json:"error"`
  138. Result DescribeInstancePrivateIpAddressResult `json:"result"`
  139. }
  140. type DescribeInstancePrivateIpAddressResult struct {
  141. InstancePrivateIpAddress []vm.InstancePrivateIpAddress `json:"instancePrivateIpAddress"`
  142. TotalCount int `json:"totalCount"`
  143. }