Browse Source

Fix: Handle the repeatlist parameter correctly

sdk-team 6 years ago
parent
commit
dfac1ef71f

+ 3 - 0
ChangeLog.txt

@@ -1,3 +1,6 @@
+2019-05-30 Version: 1.60.30
+Fix: Handle the repeatlist parameter correctly
+
 2019-05-30 Version: 1.60.29
 1.Fix: Handle the repeatlist parameter correctly
 

+ 9 - 2
services/ess/attach_v_server_groups.go

@@ -85,8 +85,15 @@ type AttachVServerGroupsRequest struct {
 
 // AttachVServerGroupsVServerGroup is a repeated param struct in AttachVServerGroupsRequest
 type AttachVServerGroupsVServerGroup struct {
-	LoadBalancerId        string    `name:"LoadBalancerId"`
-	VServerGroupAttribute *[]string `name:"VServerGroupAttribute" type:"Repeated"`
+	LoadBalancerId        string                                      `name:"LoadBalancerId"`
+	VServerGroupAttribute *[]AttachVServerGroupsVServerGroupAttribute `name:"VServerGroupAttribute" type:"Repeated"`
+}
+
+// AttachVServerGroupsVServerGroupAttribute is a repeated param struct in AttachVServerGroupsRequest
+type AttachVServerGroupsVServerGroupAttribute struct {
+	VServerGroupId string `name:"VServerGroupId"`
+	Port           string `name:"Port"`
+	Weight         string `name:"Weight"`
 }
 
 // AttachVServerGroupsResponse is the response struct for api AttachVServerGroups

+ 9 - 2
services/ess/create_scaling_group.go

@@ -111,8 +111,15 @@ type CreateScalingGroupLifecycleHook struct {
 
 // CreateScalingGroupVServerGroup is a repeated param struct in CreateScalingGroupRequest
 type CreateScalingGroupVServerGroup struct {
-	LoadBalancerId        string    `name:"LoadBalancerId"`
-	VServerGroupAttribute *[]string `name:"VServerGroupAttribute" type:"Repeated"`
+	LoadBalancerId        string                                     `name:"LoadBalancerId"`
+	VServerGroupAttribute *[]CreateScalingGroupVServerGroupAttribute `name:"VServerGroupAttribute" type:"Repeated"`
+}
+
+// CreateScalingGroupVServerGroupAttribute is a repeated param struct in CreateScalingGroupRequest
+type CreateScalingGroupVServerGroupAttribute struct {
+	VServerGroupId string `name:"VServerGroupId"`
+	Port           string `name:"Port"`
+	Weight         string `name:"Weight"`
 }
 
 // CreateScalingGroupResponse is the response struct for api CreateScalingGroup

+ 8 - 2
services/ess/detach_v_server_groups.go

@@ -85,8 +85,14 @@ type DetachVServerGroupsRequest struct {
 
 // DetachVServerGroupsVServerGroup is a repeated param struct in DetachVServerGroupsRequest
 type DetachVServerGroupsVServerGroup struct {
-	LoadBalancerId        string    `name:"LoadBalancerId"`
-	VServerGroupAttribute *[]string `name:"VServerGroupAttribute" type:"Repeated"`
+	LoadBalancerId        string                                      `name:"LoadBalancerId"`
+	VServerGroupAttribute *[]DetachVServerGroupsVServerGroupAttribute `name:"VServerGroupAttribute" type:"Repeated"`
+}
+
+// DetachVServerGroupsVServerGroupAttribute is a repeated param struct in DetachVServerGroupsRequest
+type DetachVServerGroupsVServerGroupAttribute struct {
+	VServerGroupId string `name:"VServerGroupId"`
+	Port           string `name:"Port"`
 }
 
 // DetachVServerGroupsResponse is the response struct for api DetachVServerGroups

+ 16 - 16
services/ess/struct_alarm.go

@@ -17,20 +17,20 @@ package ess
 
 // Alarm is a nested struct in ess response
 type Alarm struct {
-	Name               string                           `json:"Name" xml:"Name"`
-	MetricType         string                           `json:"MetricType" xml:"MetricType"`
-	Period             int                              `json:"Period" xml:"Period"`
-	Threshold          float64                          `json:"Threshold" xml:"Threshold"`
-	AlarmTaskId        string                           `json:"AlarmTaskId" xml:"AlarmTaskId"`
-	ComparisonOperator string                           `json:"ComparisonOperator" xml:"ComparisonOperator"`
-	State              string                           `json:"State" xml:"State"`
-	Enable             bool                             `json:"Enable" xml:"Enable"`
-	MetricName         string                           `json:"MetricName" xml:"MetricName"`
-	Statistics         string                           `json:"Statistics" xml:"Statistics"`
-	ScalingGroupId     string                           `json:"ScalingGroupId" xml:"ScalingGroupId"`
-	AlarmTaskName      string                           `json:"AlarmTaskName" xml:"AlarmTaskName"`
-	Description        string                           `json:"Description" xml:"Description"`
-	EvaluationCount    int                              `json:"EvaluationCount" xml:"EvaluationCount"`
-	AlarmActions       AlarmActions                     `json:"AlarmActions" xml:"AlarmActions"`
-	Dimensions         DimensionsInDescribeScalingRules `json:"Dimensions" xml:"Dimensions"`
+	Name               string                     `json:"Name" xml:"Name"`
+	MetricType         string                     `json:"MetricType" xml:"MetricType"`
+	Period             int                        `json:"Period" xml:"Period"`
+	Threshold          float64                    `json:"Threshold" xml:"Threshold"`
+	AlarmTaskId        string                     `json:"AlarmTaskId" xml:"AlarmTaskId"`
+	ComparisonOperator string                     `json:"ComparisonOperator" xml:"ComparisonOperator"`
+	State              string                     `json:"State" xml:"State"`
+	Enable             bool                       `json:"Enable" xml:"Enable"`
+	MetricName         string                     `json:"MetricName" xml:"MetricName"`
+	Statistics         string                     `json:"Statistics" xml:"Statistics"`
+	ScalingGroupId     string                     `json:"ScalingGroupId" xml:"ScalingGroupId"`
+	Description        string                     `json:"Description" xml:"Description"`
+	AlarmTaskName      string                     `json:"AlarmTaskName" xml:"AlarmTaskName"`
+	EvaluationCount    int                        `json:"EvaluationCount" xml:"EvaluationCount"`
+	AlarmActions       AlarmActions               `json:"AlarmActions" xml:"AlarmActions"`
+	Dimensions         DimensionsInDescribeAlarms `json:"Dimensions" xml:"Dimensions"`
 }