UpdateLogDownloadURLInternal.go 4.9 KB

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