class PgVectorProjectGenerationConfiguration {

	private static final String TESTCONTAINERS_CLASS_NAME = "org.testcontainers.containers.PostgreSQLContainer";

	private static final VersionRange TESTCONTAINERS_1_19_7_OR_LATER = VersionParser.DEFAULT.parseRange("1.19.7");

	private final MavenVersionResolver versionResolver;

	private final ProjectDescription description;

	PgVectorProjectGenerationConfiguration(MavenVersionResolver versionResolver, ProjectDescription description) {
		this.versionResolver = versionResolver;
		this.description = description;
	}

	@Bean
	@ConditionalOnRequestedDependency("testcontainers")
	ServiceConnectionsCustomizer pgvectorServiceConnectionsCustomizer(DockerServiceResolver serviceResolver) {
		Map<String, String> resolve = this.versionResolver.resolveDependencies("org.springframework.boot",
				"spring-boot-dependencies", this.description.getPlatformVersion().toString());
		String testcontainersVersion = resolve.get("org.testcontainers:testcontainers");
		return (serviceConnections) -> {
			if (TESTCONTAINERS_1_19_7_OR_LATER.match(Version.parse(testcontainersVersion))) {
				serviceResolver.doWith("pgvector", (service) -> serviceConnections.addServiceConnection(
						ServiceConnection.ofContainer("pgvector", service, TESTCONTAINERS_CLASS_NAME)));
			}
		};
	}

	@Bean
	@ConditionalOnRequestedDependency("docker-compose")
	ComposeFileCustomizer pgvectorComposeFileCustomizer(DockerServiceResolver serviceResolver) {<FILL_FUNCTION_BODY>}

}

		return (composeFile) -> serviceResolver.doWith("pgvector",
				(service) -> composeFile.services()
					.add("pgvector",
							service.andThen((builder) -> builder.environment("POSTGRES_USER", "myuser")
								.environment("POSTGRES_DB", "mydatabase")
								.environment("POSTGRES_PASSWORD", "secret")
								.label("org.springframework.boot.service-connection", "postgres"))));
	
<no_super_class>