DescribeBinlogs.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. rds "github.com/jdcloud-api/jdcloud-sdk-go/services/rds/models"
  20. )
  21. type DescribeBinlogsRequest struct {
  22. core.JDCloudRequest
  23. /* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
  24. RegionId string `json:"regionId"`
  25. /* RDS 实例ID,唯一标识一个RDS实例 */
  26. InstanceId string `json:"instanceId"`
  27. /* 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional) */
  28. PageNumber *int `json:"pageNumber"`
  29. /* 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional) */
  30. PageSize *int `json:"pageSize"`
  31. /* 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional) */
  32. StartTime *string `json:"startTime"`
  33. /* 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional) */
  34. EndTime *string `json:"endTime"`
  35. }
  36. /*
  37. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  38. * param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
  39. *
  40. * @Deprecated, not compatible when mandatory parameters changed
  41. */
  42. func NewDescribeBinlogsRequest(
  43. regionId string,
  44. instanceId string,
  45. ) *DescribeBinlogsRequest {
  46. return &DescribeBinlogsRequest{
  47. JDCloudRequest: core.JDCloudRequest{
  48. URL: "/regions/{regionId}/instances/{instanceId}/binlogs",
  49. Method: "GET",
  50. Header: nil,
  51. Version: "v1",
  52. },
  53. RegionId: regionId,
  54. InstanceId: instanceId,
  55. }
  56. }
  57. /*
  58. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  59. * param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
  60. * param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。 (Optional)
  61. * param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100 (Optional)
  62. * param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional)
  63. * param endTime: 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天 (Optional)
  64. */
  65. func NewDescribeBinlogsRequestWithAllParams(
  66. regionId string,
  67. instanceId string,
  68. pageNumber *int,
  69. pageSize *int,
  70. startTime *string,
  71. endTime *string,
  72. ) *DescribeBinlogsRequest {
  73. return &DescribeBinlogsRequest{
  74. JDCloudRequest: core.JDCloudRequest{
  75. URL: "/regions/{regionId}/instances/{instanceId}/binlogs",
  76. Method: "GET",
  77. Header: nil,
  78. Version: "v1",
  79. },
  80. RegionId: regionId,
  81. InstanceId: instanceId,
  82. PageNumber: pageNumber,
  83. PageSize: pageSize,
  84. StartTime: startTime,
  85. EndTime: endTime,
  86. }
  87. }
  88. /* This constructor has better compatible ability when API parameters changed */
  89. func NewDescribeBinlogsRequestWithoutParam() *DescribeBinlogsRequest {
  90. return &DescribeBinlogsRequest{
  91. JDCloudRequest: core.JDCloudRequest{
  92. URL: "/regions/{regionId}/instances/{instanceId}/binlogs",
  93. Method: "GET",
  94. Header: nil,
  95. Version: "v1",
  96. },
  97. }
  98. }
  99. /* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
  100. func (r *DescribeBinlogsRequest) SetRegionId(regionId string) {
  101. r.RegionId = regionId
  102. }
  103. /* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
  104. func (r *DescribeBinlogsRequest) SetInstanceId(instanceId string) {
  105. r.InstanceId = instanceId
  106. }
  107. /* param pageNumber: 显示数据的页码,默认为1,取值范围:[-1,∞)。pageNumber为-1时,返回所有数据页码;超过总页数时,显示最后一页。(Optional) */
  108. func (r *DescribeBinlogsRequest) SetPageNumber(pageNumber int) {
  109. r.PageNumber = &pageNumber
  110. }
  111. /* param pageSize: 每页显示的数据条数,默认为10,取值范围:10、20、30、50、100(Optional) */
  112. func (r *DescribeBinlogsRequest) SetPageSize(pageSize int) {
  113. r.PageSize = &pageSize
  114. }
  115. /* param startTime: 查询开始时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天(Optional) */
  116. func (r *DescribeBinlogsRequest) SetStartTime(startTime string) {
  117. r.StartTime = &startTime
  118. }
  119. /* param endTime: 查询结束时间,格式为:YYYY-MM-DD HH:mm:ss,开始时间到结束时间不超过三天(Optional) */
  120. func (r *DescribeBinlogsRequest) SetEndTime(endTime string) {
  121. r.EndTime = &endTime
  122. }
  123. // GetRegionId returns path parameter 'regionId' if exist,
  124. // otherwise return empty string
  125. func (r DescribeBinlogsRequest) GetRegionId() string {
  126. return r.RegionId
  127. }
  128. type DescribeBinlogsResponse struct {
  129. RequestID string `json:"requestId"`
  130. Error core.ErrorResponse `json:"error"`
  131. Result DescribeBinlogsResult `json:"result"`
  132. }
  133. type DescribeBinlogsResult struct {
  134. TotalCount int `json:"totalCount"`
  135. Binlogs []rds.Binlog `json:"binlogs"`
  136. }