class RunImpl {

    @NotNull
    public static String createRunBody(TerraformRunInputs createRunInputs) throws JsonProcessingException {
        ObjectMapper mapper = new ObjectMapper();
        CreateRunBody createBody = new CreateRunBody();
        CreateRunBody.CreateRunData createRundata = createBody.new CreateRunData();
        CreateRunBody.Attributes attributes = createBody.new Attributes();
        CreateRunBody.Relationships relationships = createBody.new Relationships();
        CreateRunBody.Workspace workspace = createBody.new Workspace();
        CreateRunBody.WorkspaceData workspaceData = createBody.new WorkspaceData();

        String requestBody = EMPTY;

        workspaceData.setId(createRunInputs.getWorkspaceId());
        workspaceData.setType(WORKSPACE_TYPE);

        attributes.setDestroy(Boolean.valueOf(createRunInputs.getIsDestroy()));
        attributes.setRunMessage(createRunInputs.getRunMessage());
        relationships.setWorkspace(workspace);
        workspace.setData(workspaceData);
        createRundata.setRelationships(relationships);
        createRundata.setAttributes(attributes);
        createRundata.setType(RUN_TYPE);

        createBody.setData(createRundata);

        requestBody = mapper.writeValueAsString(createBody);

        return requestBody;
    }

}