For some field, like Status in RulesType, it is marked as case insensitive in doc.
However, when check validation in code, only lower case values will be marked as valid. Here is the code.
// Validate validates the Rules.
func (v *RulesType) Validate() error {
...
if v.Status != nil {
statusValidValues := []string{"enabled", "disabled"}
statusParameterValue := fmt.Sprint(*v.Status)
statusIsValid := false
for _, value := range statusValidValues {
if value == statusParameterValue {
statusIsValid = true
}
}
if !statusIsValid {
return errors.ParameterValueNotAllowedError{
ParameterName: "Status",
ParameterValue: statusParameterValue,
AllowedValues: statusValidValues,
}
}
}
...
}
See https://github.com/qingstor/qingstor-sdk-go/blob/master/service/bucket.go#L814 for more details.
For some field, like
StatusinRulesType, it is marked as case insensitive in doc.However, when check validation in code, only lower case values will be marked as valid. Here is the code.
See https://github.com/qingstor/qingstor-sdk-go/blob/master/service/bucket.go#L814 for more details.