DescribeBinlogDownloadURL.go 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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 DescribeBinlogDownloadURLRequest struct {
  21. core.JDCloudRequest
  22. /* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
  23. RegionId string `json:"regionId"`
  24. /* RDS 实例ID,唯一标识一个RDS实例 */
  25. InstanceId string `json:"instanceId"`
  26. /* binlog的备份ID,可以通过describeBinlogs获得 */
  27. BinlogBackupId string `json:"binlogBackupId"`
  28. /* 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒 (Optional) */
  29. Seconds *int `json:"seconds"`
  30. }
  31. /*
  32. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  33. * param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
  34. * param binlogBackupId: binlog的备份ID,可以通过describeBinlogs获得 (Required)
  35. *
  36. * @Deprecated, not compatible when mandatory parameters changed
  37. */
  38. func NewDescribeBinlogDownloadURLRequest(
  39. regionId string,
  40. instanceId string,
  41. binlogBackupId string,
  42. ) *DescribeBinlogDownloadURLRequest {
  43. return &DescribeBinlogDownloadURLRequest{
  44. JDCloudRequest: core.JDCloudRequest{
  45. URL: "/regions/{regionId}/instances/{instanceId}/binlogs/{binlogBackupId}:describeBinlogDownloadURL",
  46. Method: "GET",
  47. Header: nil,
  48. Version: "v1",
  49. },
  50. RegionId: regionId,
  51. InstanceId: instanceId,
  52. BinlogBackupId: binlogBackupId,
  53. }
  54. }
  55. /*
  56. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  57. * param instanceId: RDS 实例ID,唯一标识一个RDS实例 (Required)
  58. * param binlogBackupId: binlog的备份ID,可以通过describeBinlogs获得 (Required)
  59. * param seconds: 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒 (Optional)
  60. */
  61. func NewDescribeBinlogDownloadURLRequestWithAllParams(
  62. regionId string,
  63. instanceId string,
  64. binlogBackupId string,
  65. seconds *int,
  66. ) *DescribeBinlogDownloadURLRequest {
  67. return &DescribeBinlogDownloadURLRequest{
  68. JDCloudRequest: core.JDCloudRequest{
  69. URL: "/regions/{regionId}/instances/{instanceId}/binlogs/{binlogBackupId}:describeBinlogDownloadURL",
  70. Method: "GET",
  71. Header: nil,
  72. Version: "v1",
  73. },
  74. RegionId: regionId,
  75. InstanceId: instanceId,
  76. BinlogBackupId: binlogBackupId,
  77. Seconds: seconds,
  78. }
  79. }
  80. /* This constructor has better compatible ability when API parameters changed */
  81. func NewDescribeBinlogDownloadURLRequestWithoutParam() *DescribeBinlogDownloadURLRequest {
  82. return &DescribeBinlogDownloadURLRequest{
  83. JDCloudRequest: core.JDCloudRequest{
  84. URL: "/regions/{regionId}/instances/{instanceId}/binlogs/{binlogBackupId}:describeBinlogDownloadURL",
  85. Method: "GET",
  86. Header: nil,
  87. Version: "v1",
  88. },
  89. }
  90. }
  91. /* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
  92. func (r *DescribeBinlogDownloadURLRequest) SetRegionId(regionId string) {
  93. r.RegionId = regionId
  94. }
  95. /* param instanceId: RDS 实例ID,唯一标识一个RDS实例(Required) */
  96. func (r *DescribeBinlogDownloadURLRequest) SetInstanceId(instanceId string) {
  97. r.InstanceId = instanceId
  98. }
  99. /* param binlogBackupId: binlog的备份ID,可以通过describeBinlogs获得(Required) */
  100. func (r *DescribeBinlogDownloadURLRequest) SetBinlogBackupId(binlogBackupId string) {
  101. r.BinlogBackupId = binlogBackupId
  102. }
  103. /* param seconds: 设置链接地址的过期时间,单位是秒,默认值是 300 秒,最长不能超过取值范围为 1 ~ 86400 秒(Optional) */
  104. func (r *DescribeBinlogDownloadURLRequest) SetSeconds(seconds int) {
  105. r.Seconds = &seconds
  106. }
  107. // GetRegionId returns path parameter 'regionId' if exist,
  108. // otherwise return empty string
  109. func (r DescribeBinlogDownloadURLRequest) GetRegionId() string {
  110. return r.RegionId
  111. }
  112. type DescribeBinlogDownloadURLResponse struct {
  113. RequestID string `json:"requestId"`
  114. Error core.ErrorResponse `json:"error"`
  115. Result DescribeBinlogDownloadURLResult `json:"result"`
  116. }
  117. type DescribeBinlogDownloadURLResult struct {
  118. PublicURL string `json:"publicURL"`
  119. InternalURL string `json:"internalURL"`
  120. }