AssociateRouteTable.go 4.3 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 AssociateRouteTableRequest struct {
  21. core.JDCloudRequest
  22. /* Region ID */
  23. RegionId string `json:"regionId"`
  24. /* RouteTable ID */
  25. RouteTableId string `json:"routeTableId"`
  26. /* 路由表要绑定的子网ID列表, subnet已被其他路由表绑定时,自动解绑。路由表绑定的子网属性要相同,或者都是标准子网,或者都是相同边缘可用区的边缘子网。 */
  27. SubnetIds []string `json:"subnetIds"`
  28. }
  29. /*
  30. * param regionId: Region ID (Required)
  31. * param routeTableId: RouteTable ID (Required)
  32. * param subnetIds: 路由表要绑定的子网ID列表, subnet已被其他路由表绑定时,自动解绑。路由表绑定的子网属性要相同,或者都是标准子网,或者都是相同边缘可用区的边缘子网。 (Required)
  33. *
  34. * @Deprecated, not compatible when mandatory parameters changed
  35. */
  36. func NewAssociateRouteTableRequest(
  37. regionId string,
  38. routeTableId string,
  39. subnetIds []string,
  40. ) *AssociateRouteTableRequest {
  41. return &AssociateRouteTableRequest{
  42. JDCloudRequest: core.JDCloudRequest{
  43. URL: "/regions/{regionId}/routeTables/{routeTableId}:associateRouteTable",
  44. Method: "POST",
  45. Header: nil,
  46. Version: "v1",
  47. },
  48. RegionId: regionId,
  49. RouteTableId: routeTableId,
  50. SubnetIds: subnetIds,
  51. }
  52. }
  53. /*
  54. * param regionId: Region ID (Required)
  55. * param routeTableId: RouteTable ID (Required)
  56. * param subnetIds: 路由表要绑定的子网ID列表, subnet已被其他路由表绑定时,自动解绑。路由表绑定的子网属性要相同,或者都是标准子网,或者都是相同边缘可用区的边缘子网。 (Required)
  57. */
  58. func NewAssociateRouteTableRequestWithAllParams(
  59. regionId string,
  60. routeTableId string,
  61. subnetIds []string,
  62. ) *AssociateRouteTableRequest {
  63. return &AssociateRouteTableRequest{
  64. JDCloudRequest: core.JDCloudRequest{
  65. URL: "/regions/{regionId}/routeTables/{routeTableId}:associateRouteTable",
  66. Method: "POST",
  67. Header: nil,
  68. Version: "v1",
  69. },
  70. RegionId: regionId,
  71. RouteTableId: routeTableId,
  72. SubnetIds: subnetIds,
  73. }
  74. }
  75. /* This constructor has better compatible ability when API parameters changed */
  76. func NewAssociateRouteTableRequestWithoutParam() *AssociateRouteTableRequest {
  77. return &AssociateRouteTableRequest{
  78. JDCloudRequest: core.JDCloudRequest{
  79. URL: "/regions/{regionId}/routeTables/{routeTableId}:associateRouteTable",
  80. Method: "POST",
  81. Header: nil,
  82. Version: "v1",
  83. },
  84. }
  85. }
  86. /* param regionId: Region ID(Required) */
  87. func (r *AssociateRouteTableRequest) SetRegionId(regionId string) {
  88. r.RegionId = regionId
  89. }
  90. /* param routeTableId: RouteTable ID(Required) */
  91. func (r *AssociateRouteTableRequest) SetRouteTableId(routeTableId string) {
  92. r.RouteTableId = routeTableId
  93. }
  94. /* param subnetIds: 路由表要绑定的子网ID列表, subnet已被其他路由表绑定时,自动解绑。路由表绑定的子网属性要相同,或者都是标准子网,或者都是相同边缘可用区的边缘子网。(Required) */
  95. func (r *AssociateRouteTableRequest) SetSubnetIds(subnetIds []string) {
  96. r.SubnetIds = subnetIds
  97. }
  98. // GetRegionId returns path parameter 'regionId' if exist,
  99. // otherwise return empty string
  100. func (r AssociateRouteTableRequest) GetRegionId() string {
  101. return r.RegionId
  102. }
  103. type AssociateRouteTableResponse struct {
  104. RequestID string `json:"requestId"`
  105. Error core.ErrorResponse `json:"error"`
  106. Result AssociateRouteTableResult `json:"result"`
  107. }
  108. type AssociateRouteTableResult struct {
  109. }