@Test(expected = IllegalArgumentException.class) public void getRunInputsThrows() throws Exception { RunImpl.createRunClient(invalidCreateRunInputs); }
@NotNull public static Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = createRunInputs.getCommonInputs(); httpClientInputs.setUrl(createRunClientUrl()); if (commonInputs.getRequestBody().isEmpty()) { try { httpClientInputs.setBody(createRunBody(createRunInputs)); } catch (JsonProcessingException e) { return getFailureResultsMap(e); } } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); setCommonHttpInputs(httpClientInputs, commonInputs); return new HttpClientService().execute(httpClientInputs); }
RunImpl { @NotNull public static Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = createRunInputs.getCommonInputs(); httpClientInputs.setUrl(createRunClientUrl()); if (commonInputs.getRequestBody().isEmpty()) { try { httpClientInputs.setBody(createRunBody(createRunInputs)); } catch (JsonProcessingException e) { return getFailureResultsMap(e); } } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); setCommonHttpInputs(httpClientInputs, commonInputs); return new HttpClientService().execute(httpClientInputs); } }
RunImpl { @NotNull public static Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = createRunInputs.getCommonInputs(); httpClientInputs.setUrl(createRunClientUrl()); if (commonInputs.getRequestBody().isEmpty()) { try { httpClientInputs.setBody(createRunBody(createRunInputs)); } catch (JsonProcessingException e) { return getFailureResultsMap(e); } } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); setCommonHttpInputs(httpClientInputs, commonInputs); return new HttpClientService().execute(httpClientInputs); }  }
RunImpl { @NotNull public static Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = createRunInputs.getCommonInputs(); httpClientInputs.setUrl(createRunClientUrl()); if (commonInputs.getRequestBody().isEmpty()) { try { httpClientInputs.setBody(createRunBody(createRunInputs)); } catch (JsonProcessingException e) { return getFailureResultsMap(e); } } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); setCommonHttpInputs(httpClientInputs, commonInputs); return new HttpClientService().execute(httpClientInputs); }  @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 Map<String, String> createRunClient(@NotNull final TerraformRunInputs createRunInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = createRunInputs.getCommonInputs(); httpClientInputs.setUrl(createRunClientUrl()); if (commonInputs.getRequestBody().isEmpty()) { try { httpClientInputs.setBody(createRunBody(createRunInputs)); } catch (JsonProcessingException e) { return getFailureResultsMap(e); } } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); setCommonHttpInputs(httpClientInputs, commonInputs); return new HttpClientService().execute(httpClientInputs); }  @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);  }