public PipeParameterValidator validateSynonymAttributes(
      final List<String> lhsAttributes,
      final List<String> rhsAttributes,
      final boolean isRequired) {
    final boolean lhsExistence = lhsAttributes.stream().anyMatch(parameters::hasAttribute);
    final boolean rhsExistence = rhsAttributes.stream().anyMatch(parameters::hasAttribute);
    if (lhsExistence && rhsExistence) {
      throw new PipeParameterNotValidException(
          String.format(
              "Cannot specify both %s and %s at the same time", lhsAttributes, rhsAttributes));
    }
    if (isRequired && !lhsExistence && !rhsExistence) {
      throw new PipeAttributeNotProvidedException(
          Stream.concat(lhsAttributes.stream(), rhsAttributes.stream())
              .collect(
                  Collectors.collectingAndThen(Collectors.toList(), Collections::unmodifiableList))
              .toString());
    }
    return this;
  }
Validates whether the attributes entered by the user contain at least one attribute from
lhsAttributes or rhsAttributes (if required), but not both.

@param lhsAttributes list of left-hand side synonym attributes
@param rhsAttributes list of right-hand side synonym attributes
@param isRequired specifies whether at least one attribute from lhsAttributes or rhsAttributes
    must be provided
@throws PipeParameterNotValidException if both lhsAttributes and rhsAttributes are provided
@throws PipeAttributeNotProvidedException if isRequired is true and neither lhsAttributes nor
    rhsAttributes are provided
@return the instance of PipeParameterValidator for method chaining
iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/customizer/parameter/PipeParameterValidator.java