src.main.kotlin.com.gabrielfeo.develocity.api.model.BuildModelName.kt Maven / Gradle / Ivy
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/
@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
)
package com.gabrielfeo.develocity.api.model
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
/**
* Build model names that can be requested when fetching builds.
*
* Values: gradleArtifactTransformExecutions,gradleAttributes,gradleBuildCachePerformance,gradleBuildProfileOverview,gradleConfigurationCache,gradleDeprecations,gradleDependencies,gradleNetworkActivity,gradlePlugins,gradleProjects,gradleResourceUsage,gradleTestPerformance,mavenAttributes,mavenBuildCachePerformance,mavenBuildProfileOverview,mavenDependencies,mavenDependencyResolution,mavenModules,mavenPlugins,mavenResourceUsage,mavenTestPerformance,bazelAttributes,bazelCriticalPath,npmAttributes,pythonAttributes
*/
@JsonClass(generateAdapter = false)
enum class BuildModelName(val value: kotlin.String) {
@Json(name = "gradle-artifact-transform-executions")
gradleArtifactTransformExecutions("gradle-artifact-transform-executions"),
@Json(name = "gradle-attributes")
gradleAttributes("gradle-attributes"),
@Json(name = "gradle-build-cache-performance")
gradleBuildCachePerformance("gradle-build-cache-performance"),
@Json(name = "gradle-build-profile-overview")
gradleBuildProfileOverview("gradle-build-profile-overview"),
@Json(name = "gradle-configuration-cache")
gradleConfigurationCache("gradle-configuration-cache"),
@Json(name = "gradle-deprecations")
gradleDeprecations("gradle-deprecations"),
@Json(name = "gradle-dependencies")
gradleDependencies("gradle-dependencies"),
@Json(name = "gradle-network-activity")
gradleNetworkActivity("gradle-network-activity"),
@Json(name = "gradle-plugins")
gradlePlugins("gradle-plugins"),
@Json(name = "gradle-projects")
gradleProjects("gradle-projects"),
@Json(name = "gradle-resource-usage")
gradleResourceUsage("gradle-resource-usage"),
@Json(name = "gradle-test-performance")
gradleTestPerformance("gradle-test-performance"),
@Json(name = "maven-attributes")
mavenAttributes("maven-attributes"),
@Json(name = "maven-build-cache-performance")
mavenBuildCachePerformance("maven-build-cache-performance"),
@Json(name = "maven-build-profile-overview")
mavenBuildProfileOverview("maven-build-profile-overview"),
@Json(name = "maven-dependencies")
mavenDependencies("maven-dependencies"),
@Json(name = "maven-dependency-resolution")
mavenDependencyResolution("maven-dependency-resolution"),
@Json(name = "maven-modules")
mavenModules("maven-modules"),
@Json(name = "maven-plugins")
mavenPlugins("maven-plugins"),
@Json(name = "maven-resource-usage")
mavenResourceUsage("maven-resource-usage"),
@Json(name = "maven-test-performance")
mavenTestPerformance("maven-test-performance"),
@Json(name = "bazel-attributes")
bazelAttributes("bazel-attributes"),
@Json(name = "bazel-critical-path")
bazelCriticalPath("bazel-critical-path"),
@Json(name = "npm-attributes")
npmAttributes("npm-attributes"),
@Json(name = "python-attributes")
pythonAttributes("python-attributes");
/**
* Override [toString()] to avoid using the enum variable name as the value, and instead use
* the actual value defined in the API spec file.
*
* This solves a problem when the variable name and its value are different, and ensures that
* the client sends the correct enum values to the server always.
*/
override fun toString(): kotlin.String = value
companion object {
/**
* Converts the provided [data] to a [String] on success, null otherwise.
*/
fun encode(data: kotlin.Any?): kotlin.String? = if (data is BuildModelName) "$data" else null
/**
* Returns a valid [BuildModelName] for [data], null otherwise.
*/
fun decode(data: kotlin.Any?): BuildModelName? = data?.let {
val normalizedData = "$it".lowercase()
values().firstOrNull { value ->
it == value || normalizedData == "$value".lowercase()
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy