MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / ToMap

Method ToMap

admin/client/model_model_function.go:249–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247}
248
249func (o ModelFunction) ToMap() (map[string]interface{}, error) {
250 toSerialize := map[string]interface{}{}
251 if !IsNil(o.Config) {
252 toSerialize["config"] = o.Config
253 }
254 toSerialize["name"] = o.Name
255 if !IsNil(o.Namespace) {
256 toSerialize["namespace"] = o.Namespace
257 }
258 toSerialize["replicas"] = o.Replicas
259 toSerialize["runtime"] = o.Runtime
260 toSerialize["sink"] = o.Sink
261 toSerialize["source"] = o.Source
262 return toSerialize, nil
263}
264
265func (o *ModelFunction) UnmarshalJSON(data []byte) (err error) {
266 // This validates that all required properties are included in the JSON object

Callers 1

MarshalJSONMethod · 0.95

Calls 1

IsNilFunction · 0.85

Tested by

no test coverage detected