public static ConceptMethod<Void> setRegex(Optional<String> regex) { return ConceptMethod.builder(ConceptResponseType.UNIT) .requestSetter(builder -> builder.setSetRegex(GrpcUtil.convertRegex(regex))) .functionVoid(concept -> concept.asAttributeType().setRegex(regex.orElse(null))) .build(); }