class SpringBootVersionRepositoriesBuildCustomizer implements BuildCustomizer<Build> {

	static final MavenRepository SPRING_MILESTONES = MavenRepository
		.withIdAndUrl("spring-milestones", "https://repo.spring.io/milestone")
		.name("Spring Milestones")
		.onlyReleases()
		.build();

	static final MavenRepository SPRING_SNAPSHOTS = MavenRepository
		.withIdAndUrl("spring-snapshots", "https://repo.spring.io/snapshot")
		.name("Spring Snapshots")
		.onlySnapshots()
		.build();

	private final Version springBootVersion;

	SpringBootVersionRepositoriesBuildCustomizer(Version springBootVersion) {
		this.springBootVersion = springBootVersion;
	}

	@Override
	public void customize(Build build) {
		build.repositories().add("maven-central");
		switch (getReleaseType()) {
			case MILESTONE -> addMilestoneRepository(build);
			case SNAPSHOT -> {
				if (isMaintenanceRelease()) {
					addSnapshotRepository(build);
				}
				else {
					addMilestoneRepository(build);
					addSnapshotRepository(build);
				}
			}
		}
	}

	private ReleaseType getReleaseType() {<FILL_FUNCTION_BODY>}

	private boolean isMaintenanceRelease() {
		Integer patch = this.springBootVersion.getPatch();
		return patch != null && patch > 0;
	}

	private void addSnapshotRepository(Build build) {
		build.repositories().add(SPRING_SNAPSHOTS);
		build.pluginRepositories().add(SPRING_SNAPSHOTS);
	}

	private void addMilestoneRepository(Build build) {
		build.repositories().add(SPRING_MILESTONES);
		build.pluginRepositories().add(SPRING_MILESTONES);
	}

	private enum ReleaseType {

		GA, MILESTONE, SNAPSHOT

	}

}

		Version.Qualifier qualifier = this.springBootVersion.getQualifier();
		if (qualifier == null) {
			return ReleaseType.GA;
		}
		String id = qualifier.getId();
		if ("RELEASE".equals(id)) {
			return ReleaseType.GA;
		}
		if (id.contains("SNAPSHOT")) {
			return ReleaseType.SNAPSHOT;
		}
		return ReleaseType.MILESTONE;
	
<no_super_class>