@Test(expected = IllegalArgumentException.class) public void createWorkspaceVariable() throws Exception { WorkspaceVariableImpl.createWorkspaceVariable(getTerraformWorkspaceVariableInputs); }
@NotNull public static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs(); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); setCommonHttpInputs(httpClientInputs, commonInputs); httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); if (commonInputs.getRequestBody().isEmpty() & terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs)); } else if (!terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody()); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet()); return new HttpClientService().execute(httpClientInputs); }
WorkspaceVariableImpl { @NotNull public static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs(); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); setCommonHttpInputs(httpClientInputs, commonInputs); httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); if (commonInputs.getRequestBody().isEmpty() & terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs)); } else if (!terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody()); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet()); return new HttpClientService().execute(httpClientInputs); } }
WorkspaceVariableImpl { @NotNull public static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs(); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); setCommonHttpInputs(httpClientInputs, commonInputs); httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); if (commonInputs.getRequestBody().isEmpty() & terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs)); } else if (!terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody()); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet()); return new HttpClientService().execute(httpClientInputs); }  }
WorkspaceVariableImpl { @NotNull public static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs(); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); setCommonHttpInputs(httpClientInputs, commonInputs); httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); if (commonInputs.getRequestBody().isEmpty() & terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs)); } else if (!terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody()); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet()); return new HttpClientService().execute(httpClientInputs); }  @NotNull static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static Map<String, Map<String, String>> createWorkspaceVariables(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static Map<String, Map<String, String>> updateWorkspaceVariables(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static Map<String, String> getWorkspaceVariablesOperationOutput(String workspaceVariablesJson, String sensitiveWorkspaceVariablesJson, Map<String, Map<String, String>> result); @NotNull static Map<String, String> listWorkspaceVariables(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static String listWorkspaceVariablesUrl(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static String getWorkspaceVariablePath(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); static Map<String, String> updateWorkspaceVariable(@NotNull final TerraformWorkspaceVariableInputs updateWorkspaceVariableInputs); @NotNull static Map<String, String> deleteWorkspaceVariable(@NotNull final TerraformWorkspaceVariableInputs deleteWorkspaceVariableInputs); @NotNull static String getWorkspaceVariablesPath(@NotNull final TerraformWorkspaceVariableInputs updateWorkspaceVariableInputs); @NotNull static String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static String updateWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); }
WorkspaceVariableImpl { @NotNull public static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) throws Exception { final HttpClientInputs httpClientInputs = new HttpClientInputs(); final TerraformCommonInputs commonInputs = terraformWorkspaceVariableInputs.getCommonInputs(); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); setCommonHttpInputs(httpClientInputs, commonInputs); httpClientInputs.setAuthType(ANONYMOUS); httpClientInputs.setMethod(POST); httpClientInputs.setContentType(APPLICATION_VND_API_JSON); httpClientInputs.setHeaders(getAuthHeaders(commonInputs.getAuthToken())); if (commonInputs.getRequestBody().isEmpty() & terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs)); } else if (!terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody().isEmpty()) { httpClientInputs.setBody(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableRequestBody()); httpClientInputs.setUrl(createWorkspaceVariableUrl(terraformWorkspaceVariableInputs)); } else { httpClientInputs.setBody(commonInputs.getRequestBody()); } httpClientInputs.setResponseCharacterSet(commonInputs.getResponseCharacterSet()); return new HttpClientService().execute(httpClientInputs); }  @NotNull static Map<String, String> createWorkspaceVariable(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static Map<String, Map<String, String>> createWorkspaceVariables(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static Map<String, Map<String, String>> updateWorkspaceVariables(@NotNull TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static Map<String, String> getWorkspaceVariablesOperationOutput(String workspaceVariablesJson, String sensitiveWorkspaceVariablesJson, Map<String, Map<String, String>> result); @NotNull static Map<String, String> listWorkspaceVariables(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static String listWorkspaceVariablesUrl(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static String getWorkspaceVariablePath(@NotNull final TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); static Map<String, String> updateWorkspaceVariable(@NotNull final TerraformWorkspaceVariableInputs updateWorkspaceVariableInputs); @NotNull static Map<String, String> deleteWorkspaceVariable(@NotNull final TerraformWorkspaceVariableInputs deleteWorkspaceVariableInputs); @NotNull static String getWorkspaceVariablesPath(@NotNull final TerraformWorkspaceVariableInputs updateWorkspaceVariableInputs); @NotNull static String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs); @NotNull static String updateWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs);  }