CopyParameterGroup.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 CopyParameterGroupRequest struct {
  21. core.JDCloudRequest
  22. /* Region ID */
  23. RegionId string `json:"regionId"`
  24. /* 参数组ID */
  25. ParameterGroupId string `json:"parameterGroupId"`
  26. /* 参数组的名字 */
  27. ParameterGroupName string `json:"parameterGroupName"`
  28. /* 参数组的描述 (Optional) */
  29. Description *string `json:"description"`
  30. }
  31. /*
  32. * param regionId: Region ID (Required)
  33. * param parameterGroupId: 参数组ID (Required)
  34. * param parameterGroupName: 参数组的名字 (Required)
  35. *
  36. * @Deprecated, not compatible when mandatory parameters changed
  37. */
  38. func NewCopyParameterGroupRequest(
  39. regionId string,
  40. parameterGroupId string,
  41. parameterGroupName string,
  42. ) *CopyParameterGroupRequest {
  43. return &CopyParameterGroupRequest{
  44. JDCloudRequest: core.JDCloudRequest{
  45. URL: "/regions/{regionId}/parameterGroups:copyParameterGroup",
  46. Method: "POST",
  47. Header: nil,
  48. Version: "v1",
  49. },
  50. RegionId: regionId,
  51. ParameterGroupId: parameterGroupId,
  52. ParameterGroupName: parameterGroupName,
  53. }
  54. }
  55. /*
  56. * param regionId: Region ID (Required)
  57. * param parameterGroupId: 参数组ID (Required)
  58. * param parameterGroupName: 参数组的名字 (Required)
  59. * param description: 参数组的描述 (Optional)
  60. */
  61. func NewCopyParameterGroupRequestWithAllParams(
  62. regionId string,
  63. parameterGroupId string,
  64. parameterGroupName string,
  65. description *string,
  66. ) *CopyParameterGroupRequest {
  67. return &CopyParameterGroupRequest{
  68. JDCloudRequest: core.JDCloudRequest{
  69. URL: "/regions/{regionId}/parameterGroups:copyParameterGroup",
  70. Method: "POST",
  71. Header: nil,
  72. Version: "v1",
  73. },
  74. RegionId: regionId,
  75. ParameterGroupId: parameterGroupId,
  76. ParameterGroupName: parameterGroupName,
  77. Description: description,
  78. }
  79. }
  80. /* This constructor has better compatible ability when API parameters changed */
  81. func NewCopyParameterGroupRequestWithoutParam() *CopyParameterGroupRequest {
  82. return &CopyParameterGroupRequest{
  83. JDCloudRequest: core.JDCloudRequest{
  84. URL: "/regions/{regionId}/parameterGroups:copyParameterGroup",
  85. Method: "POST",
  86. Header: nil,
  87. Version: "v1",
  88. },
  89. }
  90. }
  91. /* param regionId: Region ID(Required) */
  92. func (r *CopyParameterGroupRequest) SetRegionId(regionId string) {
  93. r.RegionId = regionId
  94. }
  95. /* param parameterGroupId: 参数组ID(Required) */
  96. func (r *CopyParameterGroupRequest) SetParameterGroupId(parameterGroupId string) {
  97. r.ParameterGroupId = parameterGroupId
  98. }
  99. /* param parameterGroupName: 参数组的名字(Required) */
  100. func (r *CopyParameterGroupRequest) SetParameterGroupName(parameterGroupName string) {
  101. r.ParameterGroupName = parameterGroupName
  102. }
  103. /* param description: 参数组的描述(Optional) */
  104. func (r *CopyParameterGroupRequest) SetDescription(description string) {
  105. r.Description = &description
  106. }
  107. // GetRegionId returns path parameter 'regionId' if exist,
  108. // otherwise return empty string
  109. func (r CopyParameterGroupRequest) GetRegionId() string {
  110. return r.RegionId
  111. }
  112. type CopyParameterGroupResponse struct {
  113. RequestID string `json:"requestId"`
  114. Error core.ErrorResponse `json:"error"`
  115. Result CopyParameterGroupResult `json:"result"`
  116. }
  117. type CopyParameterGroupResult struct {
  118. ParameterGroupId string `json:"parameterGroupId"`
  119. }