| 7025 | } |
| 7026 | |
| 7027 | func (ec *executionContext) unmarshalInputAddStorageInput(ctx context.Context, obj interface{}) (model.AddStorageInput, error) { |
| 7028 | var it model.AddStorageInput |
| 7029 | asMap := map[string]interface{}{} |
| 7030 | for k, v := range obj.(map[string]interface{}) { |
| 7031 | asMap[k] = v |
| 7032 | } |
| 7033 | |
| 7034 | fieldsInOrder := [...]string{"type", "name", "postgres"} |
| 7035 | for _, k := range fieldsInOrder { |
| 7036 | v, ok := asMap[k] |
| 7037 | if !ok { |
| 7038 | continue |
| 7039 | } |
| 7040 | switch k { |
| 7041 | case "type": |
| 7042 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) |
| 7043 | data, err := ec.unmarshalNStorageType2githubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐStorageType(ctx, v) |
| 7044 | if err != nil { |
| 7045 | return it, err |
| 7046 | } |
| 7047 | it.Type = data |
| 7048 | case "name": |
| 7049 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) |
| 7050 | data, err := ec.unmarshalNString2string(ctx, v) |
| 7051 | if err != nil { |
| 7052 | return it, err |
| 7053 | } |
| 7054 | it.Name = data |
| 7055 | case "postgres": |
| 7056 | ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("postgres")) |
| 7057 | data, err := ec.unmarshalOPostgresInput2ᚖgithubᚗcomᚋencoderᚑrunᚋoperatorᚋpkgᚋgraphᚋmodelᚐPostgresInput(ctx, v) |
| 7058 | if err != nil { |
| 7059 | return it, err |
| 7060 | } |
| 7061 | it.Postgres = data |
| 7062 | } |
| 7063 | } |
| 7064 | |
| 7065 | return it, nil |
| 7066 | } |
| 7067 | |
| 7068 | func (ec *executionContext) unmarshalInputHuggingFaceInput(ctx context.Context, obj interface{}) (model.HuggingFaceInput, error) { |
| 7069 | var it model.HuggingFaceInput |