CreateBackupSynchronicity.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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 CreateBackupSynchronicityRequest struct {
  21. core.JDCloudRequest
  22. /* 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) */
  23. RegionId string `json:"regionId"`
  24. /* 源实例ID */
  25. InstanceId string `json:"instanceId"`
  26. /* 备份同步的目标地域 */
  27. DestRegion string `json:"destRegion"`
  28. }
  29. /*
  30. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  31. * param instanceId: 源实例ID (Required)
  32. * param destRegion: 备份同步的目标地域 (Required)
  33. *
  34. * @Deprecated, not compatible when mandatory parameters changed
  35. */
  36. func NewCreateBackupSynchronicityRequest(
  37. regionId string,
  38. instanceId string,
  39. destRegion string,
  40. ) *CreateBackupSynchronicityRequest {
  41. return &CreateBackupSynchronicityRequest{
  42. JDCloudRequest: core.JDCloudRequest{
  43. URL: "/regions/{regionId}/backupSynchronicities",
  44. Method: "POST",
  45. Header: nil,
  46. Version: "v1",
  47. },
  48. RegionId: regionId,
  49. InstanceId: instanceId,
  50. DestRegion: destRegion,
  51. }
  52. }
  53. /*
  54. * param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md) (Required)
  55. * param instanceId: 源实例ID (Required)
  56. * param destRegion: 备份同步的目标地域 (Required)
  57. */
  58. func NewCreateBackupSynchronicityRequestWithAllParams(
  59. regionId string,
  60. instanceId string,
  61. destRegion string,
  62. ) *CreateBackupSynchronicityRequest {
  63. return &CreateBackupSynchronicityRequest{
  64. JDCloudRequest: core.JDCloudRequest{
  65. URL: "/regions/{regionId}/backupSynchronicities",
  66. Method: "POST",
  67. Header: nil,
  68. Version: "v1",
  69. },
  70. RegionId: regionId,
  71. InstanceId: instanceId,
  72. DestRegion: destRegion,
  73. }
  74. }
  75. /* This constructor has better compatible ability when API parameters changed */
  76. func NewCreateBackupSynchronicityRequestWithoutParam() *CreateBackupSynchronicityRequest {
  77. return &CreateBackupSynchronicityRequest{
  78. JDCloudRequest: core.JDCloudRequest{
  79. URL: "/regions/{regionId}/backupSynchronicities",
  80. Method: "POST",
  81. Header: nil,
  82. Version: "v1",
  83. },
  84. }
  85. }
  86. /* param regionId: 地域代码,取值范围参见[《各地域及可用区对照表》](../Enum-Definitions/Regions-AZ.md)(Required) */
  87. func (r *CreateBackupSynchronicityRequest) SetRegionId(regionId string) {
  88. r.RegionId = regionId
  89. }
  90. /* param instanceId: 源实例ID(Required) */
  91. func (r *CreateBackupSynchronicityRequest) SetInstanceId(instanceId string) {
  92. r.InstanceId = instanceId
  93. }
  94. /* param destRegion: 备份同步的目标地域(Required) */
  95. func (r *CreateBackupSynchronicityRequest) SetDestRegion(destRegion string) {
  96. r.DestRegion = destRegion
  97. }
  98. // GetRegionId returns path parameter 'regionId' if exist,
  99. // otherwise return empty string
  100. func (r CreateBackupSynchronicityRequest) GetRegionId() string {
  101. return r.RegionId
  102. }
  103. type CreateBackupSynchronicityResponse struct {
  104. RequestID string `json:"requestId"`
  105. Error core.ErrorResponse `json:"error"`
  106. Result CreateBackupSynchronicityResult `json:"result"`
  107. }
  108. type CreateBackupSynchronicityResult struct {
  109. ServiceId string `json:"serviceId"`
  110. }