@Test public void getCreateRunBody() throws JsonProcessingException { String createRunRequestBody = RunImpl.createRunBody(createRunBody); assertEquals(EXPECTED_CREATE_RUN_BODY, createRunRequestBody); }
@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; }
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; } }
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; }  }
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; }  @NotNull static Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs); @NotNull static Map<String, String> applyRunClient(@NotNull final TerraformRunInputs applyRunInputs); @NotNull static Map<String, String> listRunsInWorkspaceClient(@NotNull final TerraformRunInputs listRunsInWorkspaceInputs); @NotNull static Map<String, String> getRunDetails(@NotNull final TerraformRunInputs getRunDetailsInputs); @NotNull static Map<String, String> planDetails(@NotNull final TerraformRunInputs planDetailsInputs); static Map<String, String> cancelRun(@NotNull final TerraformRunInputs cancelRunInputs); @NotNull static Map<String, String> getApplyDetails(@NotNull final TerraformRunInputs getApplyDetailsInputs); @NotNull static String createRunClientUrl(); @NotNull static String getRunDetailsUrl(@NotNull final String runId); @NotNull static String planDetailsUrl(@NotNull final String planId); static String cancelRunUrl(@NotNull final String runId); @NotNull static String getApplyDetailsUrl(@NotNull final String applyId); @NotNull static String applyRunClientUrl(@NotNull String runId); @NotNull static String listRunsInWorkspaceClientUrl(@NotNull String workspaceId); @NotNull static String createRunBody(TerraformRunInputs createRunInputs); @NotNull static String applyRunBody(TerraformRunInputs applyRunInputs); }
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; }  @NotNull static Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs); @NotNull static Map<String, String> applyRunClient(@NotNull final TerraformRunInputs applyRunInputs); @NotNull static Map<String, String> listRunsInWorkspaceClient(@NotNull final TerraformRunInputs listRunsInWorkspaceInputs); @NotNull static Map<String, String> getRunDetails(@NotNull final TerraformRunInputs getRunDetailsInputs); @NotNull static Map<String, String> planDetails(@NotNull final TerraformRunInputs planDetailsInputs); static Map<String, String> cancelRun(@NotNull final TerraformRunInputs cancelRunInputs); @NotNull static Map<String, String> getApplyDetails(@NotNull final TerraformRunInputs getApplyDetailsInputs); @NotNull static String createRunClientUrl(); @NotNull static String getRunDetailsUrl(@NotNull final String runId); @NotNull static String planDetailsUrl(@NotNull final String planId); static String cancelRunUrl(@NotNull final String runId); @NotNull static String getApplyDetailsUrl(@NotNull final String applyId); @NotNull static String applyRunClientUrl(@NotNull String runId); @NotNull static String listRunsInWorkspaceClientUrl(@NotNull String workspaceId); @NotNull static String createRunBody(TerraformRunInputs createRunInputs); @NotNull static String applyRunBody(TerraformRunInputs applyRunInputs);  }