static void validateDeployInput()

in java/com/google/cloud/deploymentmanager/autogen/SpecValidations.java [614:643]


  static void validateDeployInput(DeployInputSpec spec) {
    Set<String> runningSectionNames = new HashSet<>();
    Set<String> runningFieldNames = new HashSet<>();
    Set<String> runningDisplayGroups = new HashSet<>();
    for (DeployInputSection section : spec.getSectionsList()) {
      checkArgument(
          section.getPlacement() != Placement.PLACEMENT_UNSPECIFIED,
          "Deploy input section must have a valid placement");
      switch (section.getPlacement()) {
        case MAIN:
          break;
        case TIER:
          checkArgument(
              section.getTier().length() > 0, "Tier input section must have a valid tier name");
          break;
        default:
          checkArgument(
              !section.getName().isEmpty(), "Custom deploy input section must have valid name");
          if (!runningSectionNames.add(section.getName())) {
            throw new IllegalArgumentException(
                "Deploy input sections with the same name: " + section.getName());
          }
          checkArgument(
              !section.getTitle().isEmpty(), "Custom deploy input section must have a valid title");
      }
      checkArgument(
          section.getFieldsCount() > 0, "Deploy input section must have at least 1 field");
      validateDeployInputFields(section.getFieldsList(), runningFieldNames, runningDisplayGroups);
    }
  }