@Test public void getCreateWorkspaceVariableBody() { String createWorkspaceVariableBody = WorkspaceVariableImpl.createWorkspaceVariableRequestBody(terraformWorkspaceVariableInputs); assertEquals(EXPECTED_CREATE_WORKSPACE_VARIABLE_BODY, createWorkspaceVariableBody); }
@NotNull public static String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) { String requestBody = EMPTY; ObjectMapper createWorkspaceVariableMapper = new ObjectMapper(); CreateWorkspaceVariableRequestBody createWorkspaceVariableRequestBody = new CreateWorkspaceVariableRequestBody(); CreateWorkspaceVariableRequestBody.CreateWorkspaceVariableData createWorkspaceVariableData = createWorkspaceVariableRequestBody.new CreateWorkspaceVariableData(); createWorkspaceVariableData.setType(WORKSPACE_VARIABLE_TYPE); CreateWorkspaceVariableRequestBody.Attributes attributes = createWorkspaceVariableRequestBody.new Attributes(); attributes.setKey(terraformWorkspaceVariableInputs.getWorkspaceVariableName()); if (terraformWorkspaceVariableInputs.getWorkspaceVariableValue().isEmpty()) { attributes.setValue(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableValue()); } else { attributes.setValue(terraformWorkspaceVariableInputs.getWorkspaceVariableValue()); } attributes.setCategory(terraformWorkspaceVariableInputs.getWorkspaceVariableCategory()); attributes.setHcl(terraformWorkspaceVariableInputs.getHcl()); attributes.setSensitive(terraformWorkspaceVariableInputs.getSensitive()); createWorkspaceVariableData.setAttributes(attributes); createWorkspaceVariableRequestBody.setData(createWorkspaceVariableData); try { requestBody = createWorkspaceVariableMapper.writeValueAsString(createWorkspaceVariableRequestBody); } catch (JsonProcessingException e) { e.printStackTrace(); } return requestBody; }
WorkspaceVariableImpl { @NotNull public static String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) { String requestBody = EMPTY; ObjectMapper createWorkspaceVariableMapper = new ObjectMapper(); CreateWorkspaceVariableRequestBody createWorkspaceVariableRequestBody = new CreateWorkspaceVariableRequestBody(); CreateWorkspaceVariableRequestBody.CreateWorkspaceVariableData createWorkspaceVariableData = createWorkspaceVariableRequestBody.new CreateWorkspaceVariableData(); createWorkspaceVariableData.setType(WORKSPACE_VARIABLE_TYPE); CreateWorkspaceVariableRequestBody.Attributes attributes = createWorkspaceVariableRequestBody.new Attributes(); attributes.setKey(terraformWorkspaceVariableInputs.getWorkspaceVariableName()); if (terraformWorkspaceVariableInputs.getWorkspaceVariableValue().isEmpty()) { attributes.setValue(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableValue()); } else { attributes.setValue(terraformWorkspaceVariableInputs.getWorkspaceVariableValue()); } attributes.setCategory(terraformWorkspaceVariableInputs.getWorkspaceVariableCategory()); attributes.setHcl(terraformWorkspaceVariableInputs.getHcl()); attributes.setSensitive(terraformWorkspaceVariableInputs.getSensitive()); createWorkspaceVariableData.setAttributes(attributes); createWorkspaceVariableRequestBody.setData(createWorkspaceVariableData); try { requestBody = createWorkspaceVariableMapper.writeValueAsString(createWorkspaceVariableRequestBody); } catch (JsonProcessingException e) { e.printStackTrace(); } return requestBody; } }
WorkspaceVariableImpl { @NotNull public static String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) { String requestBody = EMPTY; ObjectMapper createWorkspaceVariableMapper = new ObjectMapper(); CreateWorkspaceVariableRequestBody createWorkspaceVariableRequestBody = new CreateWorkspaceVariableRequestBody(); CreateWorkspaceVariableRequestBody.CreateWorkspaceVariableData createWorkspaceVariableData = createWorkspaceVariableRequestBody.new CreateWorkspaceVariableData(); createWorkspaceVariableData.setType(WORKSPACE_VARIABLE_TYPE); CreateWorkspaceVariableRequestBody.Attributes attributes = createWorkspaceVariableRequestBody.new Attributes(); attributes.setKey(terraformWorkspaceVariableInputs.getWorkspaceVariableName()); if (terraformWorkspaceVariableInputs.getWorkspaceVariableValue().isEmpty()) { attributes.setValue(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableValue()); } else { attributes.setValue(terraformWorkspaceVariableInputs.getWorkspaceVariableValue()); } attributes.setCategory(terraformWorkspaceVariableInputs.getWorkspaceVariableCategory()); attributes.setHcl(terraformWorkspaceVariableInputs.getHcl()); attributes.setSensitive(terraformWorkspaceVariableInputs.getSensitive()); createWorkspaceVariableData.setAttributes(attributes); createWorkspaceVariableRequestBody.setData(createWorkspaceVariableData); try { requestBody = createWorkspaceVariableMapper.writeValueAsString(createWorkspaceVariableRequestBody); } catch (JsonProcessingException e) { e.printStackTrace(); } return requestBody; }  }
WorkspaceVariableImpl { @NotNull public static String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) { String requestBody = EMPTY; ObjectMapper createWorkspaceVariableMapper = new ObjectMapper(); CreateWorkspaceVariableRequestBody createWorkspaceVariableRequestBody = new CreateWorkspaceVariableRequestBody(); CreateWorkspaceVariableRequestBody.CreateWorkspaceVariableData createWorkspaceVariableData = createWorkspaceVariableRequestBody.new CreateWorkspaceVariableData(); createWorkspaceVariableData.setType(WORKSPACE_VARIABLE_TYPE); CreateWorkspaceVariableRequestBody.Attributes attributes = createWorkspaceVariableRequestBody.new Attributes(); attributes.setKey(terraformWorkspaceVariableInputs.getWorkspaceVariableName()); if (terraformWorkspaceVariableInputs.getWorkspaceVariableValue().isEmpty()) { attributes.setValue(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableValue()); } else { attributes.setValue(terraformWorkspaceVariableInputs.getWorkspaceVariableValue()); } attributes.setCategory(terraformWorkspaceVariableInputs.getWorkspaceVariableCategory()); attributes.setHcl(terraformWorkspaceVariableInputs.getHcl()); attributes.setSensitive(terraformWorkspaceVariableInputs.getSensitive()); createWorkspaceVariableData.setAttributes(attributes); createWorkspaceVariableRequestBody.setData(createWorkspaceVariableData); try { requestBody = createWorkspaceVariableMapper.writeValueAsString(createWorkspaceVariableRequestBody); } catch (JsonProcessingException e) { e.printStackTrace(); } return requestBody; }  @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 String createWorkspaceVariableRequestBody(TerraformWorkspaceVariableInputs terraformWorkspaceVariableInputs) { String requestBody = EMPTY; ObjectMapper createWorkspaceVariableMapper = new ObjectMapper(); CreateWorkspaceVariableRequestBody createWorkspaceVariableRequestBody = new CreateWorkspaceVariableRequestBody(); CreateWorkspaceVariableRequestBody.CreateWorkspaceVariableData createWorkspaceVariableData = createWorkspaceVariableRequestBody.new CreateWorkspaceVariableData(); createWorkspaceVariableData.setType(WORKSPACE_VARIABLE_TYPE); CreateWorkspaceVariableRequestBody.Attributes attributes = createWorkspaceVariableRequestBody.new Attributes(); attributes.setKey(terraformWorkspaceVariableInputs.getWorkspaceVariableName()); if (terraformWorkspaceVariableInputs.getWorkspaceVariableValue().isEmpty()) { attributes.setValue(terraformWorkspaceVariableInputs.getSensitiveWorkspaceVariableValue()); } else { attributes.setValue(terraformWorkspaceVariableInputs.getWorkspaceVariableValue()); } attributes.setCategory(terraformWorkspaceVariableInputs.getWorkspaceVariableCategory()); attributes.setHcl(terraformWorkspaceVariableInputs.getHcl()); attributes.setSensitive(terraformWorkspaceVariableInputs.getSensitive()); createWorkspaceVariableData.setAttributes(attributes); createWorkspaceVariableRequestBody.setData(createWorkspaceVariableData); try { requestBody = createWorkspaceVariableMapper.writeValueAsString(createWorkspaceVariableRequestBody); } catch (JsonProcessingException e) { e.printStackTrace(); } return requestBody; }  @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);  }