putStep.dhall 714 B

12345678910111213141516171819202122
  1. let Types = ../types/package.dhall
  2. let nameResource = ./helpers/name-resource.dhall
  3. let RenderOptional = ./optionals/package.dhall
  4. let render
  5. : Types.PutStep → Types.JSONObject
  6. = λ(p : Types.PutStep)
  7. → toMap
  8. { put = nameResource.getName p.put p.resource
  9. , resource = nameResource.getResource p.put p.resource
  10. , inputs = RenderOptional.lists.text p.inputs
  11. , params = RenderOptional.jsonObject p.params
  12. , get_params = RenderOptional.jsonObject p.get_params
  13. , tags = RenderOptional.lists.text p.tags
  14. , timeout = RenderOptional.text p.timeout
  15. , attempts = RenderOptional.natural p.attempts
  16. }
  17. in render