(obj interface{}, key string)
| 140 | } |
| 141 | |
| 142 | func parameterValueToString(obj interface{}, key string) string { |
| 143 | if reflect.TypeOf(obj).Kind() != reflect.Ptr { |
| 144 | if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { |
| 145 | return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) |
| 146 | } |
| 147 | |
| 148 | return fmt.Sprintf("%v", obj) |
| 149 | } |
| 150 | var param, ok = obj.(MappedNullable) |
| 151 | if !ok { |
| 152 | return "" |
| 153 | } |
| 154 | dataMap, err := param.ToMap() |
| 155 | if err != nil { |
| 156 | return "" |
| 157 | } |
| 158 | return fmt.Sprintf("%v", dataMap[key]) |
| 159 | } |
| 160 | |
| 161 | // parameterAddToHeaderOrQuery adds the provided object to the request header or url query |
| 162 | // supporting deep object syntax |
no test coverage detected