|
| 1 | +// This file was generated using action-binding-generator. Don't change it by hand, otherwise your |
| 2 | +// changes will be overwritten with the next binding code regeneration. |
| 3 | +// See https://github.com/typesafegithub/github-workflows-kt for more info. |
| 4 | +@file:Suppress( |
| 5 | + "DataClassPrivateConstructor", |
| 6 | + "UNUSED_PARAMETER", |
| 7 | +) |
| 8 | + |
| 9 | +package io.github.typesafegithub.workflows.actions.googlegithubactions |
| 10 | + |
| 11 | +import io.github.typesafegithub.workflows.domain.actions.Action |
| 12 | +import io.github.typesafegithub.workflows.domain.actions.RegularAction |
| 13 | +import java.util.LinkedHashMap |
| 14 | +import kotlin.Boolean |
| 15 | +import kotlin.String |
| 16 | +import kotlin.Suppress |
| 17 | +import kotlin.Unit |
| 18 | +import kotlin.collections.List |
| 19 | +import kotlin.collections.Map |
| 20 | +import kotlin.collections.toList |
| 21 | +import kotlin.collections.toTypedArray |
| 22 | + |
| 23 | +/** |
| 24 | + * Action: Set up gcloud Cloud SDK environment |
| 25 | + * |
| 26 | + * Downloads, installs, and configures a Google Cloud SDK environment. |
| 27 | + * Adds the `gcloud` CLI command to the $PATH. |
| 28 | + * |
| 29 | + * [Action on GitHub](https://github.com/google-github-actions/setup-gcloud) |
| 30 | + */ |
| 31 | +public data class SetupGcloudV2 private constructor( |
| 32 | + /** |
| 33 | + * Skip installation of the gcloud SDK and use the system-supplied version |
| 34 | + * instead. The "version" input will be ignored. |
| 35 | + */ |
| 36 | + public val skipInstall: Boolean? = null, |
| 37 | + /** |
| 38 | + * Version or version constraint of the gcloud SDK to install. If |
| 39 | + * unspecified, it will accept any installed version of the gcloud SDK. If |
| 40 | + * set to "latest", it will download the latest available SDK. If set to a |
| 41 | + * version constraint, it will download the latest available version that |
| 42 | + * matches the constraint. Examples: "290.0.1" or ">= 197.0.1". |
| 43 | + */ |
| 44 | + public val version: String? = null, |
| 45 | + /** |
| 46 | + * ID of the Google Cloud project. If provided, this will configure gcloud to |
| 47 | + * use this project ID by default for commands. Individual commands can still |
| 48 | + * override the project using the --project flag which takes precedence. |
| 49 | + */ |
| 50 | + public val projectId: String? = null, |
| 51 | + /** |
| 52 | + * List of Cloud SDK components to install |
| 53 | + */ |
| 54 | + public val installComponents: List<SetupGcloudV2.Component>? = null, |
| 55 | + /** |
| 56 | + * Type-unsafe map where you can put any inputs that are not yet supported by the binding |
| 57 | + */ |
| 58 | + public val _customInputs: Map<String, String> = mapOf(), |
| 59 | + /** |
| 60 | + * Allows overriding action's version, for example to use a specific minor version, or a newer |
| 61 | + * version that the binding doesn't yet know about |
| 62 | + */ |
| 63 | + public val _customVersion: String? = null, |
| 64 | +) : RegularAction<Action.Outputs>("google-github-actions", "setup-gcloud", _customVersion ?: "v2") { |
| 65 | + public constructor( |
| 66 | + vararg pleaseUseNamedArguments: Unit, |
| 67 | + skipInstall: Boolean? = null, |
| 68 | + version: String? = null, |
| 69 | + projectId: String? = null, |
| 70 | + installComponents: List<SetupGcloudV2.Component>? = null, |
| 71 | + _customInputs: Map<String, String> = mapOf(), |
| 72 | + _customVersion: String? = null, |
| 73 | + ) : this(skipInstall=skipInstall, version=version, projectId=projectId, |
| 74 | + installComponents=installComponents, _customInputs=_customInputs, |
| 75 | + _customVersion=_customVersion) |
| 76 | + |
| 77 | + @Suppress("SpreadOperator") |
| 78 | + override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf( |
| 79 | + *listOfNotNull( |
| 80 | + skipInstall?.let { "skip_install" to it.toString() }, |
| 81 | + version?.let { "version" to it }, |
| 82 | + projectId?.let { "project_id" to it }, |
| 83 | + installComponents?.let { "install_components" to it.joinToString(",") { it.stringValue } |
| 84 | + }, |
| 85 | + *_customInputs.toList().toTypedArray(), |
| 86 | + ).toTypedArray() |
| 87 | + ) |
| 88 | + |
| 89 | + override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId) |
| 90 | + |
| 91 | + public sealed class Component( |
| 92 | + public val stringValue: String, |
| 93 | + ) { |
| 94 | + public object Alpha : SetupGcloudV2.Component("alpha") |
| 95 | + |
| 96 | + public object AnthosAuth : SetupGcloudV2.Component("anthos-auth") |
| 97 | + |
| 98 | + public object Appctl : SetupGcloudV2.Component("appctl") |
| 99 | + |
| 100 | + public object AppEngineGo : SetupGcloudV2.Component("app-engine-go") |
| 101 | + |
| 102 | + public object AppEngineJava : SetupGcloudV2.Component("app-engine-java") |
| 103 | + |
| 104 | + public object AppEnginePython : SetupGcloudV2.Component("app-engine-python") |
| 105 | + |
| 106 | + public object AppEnginePythonExtras : SetupGcloudV2.Component("app-engine-python-extras") |
| 107 | + |
| 108 | + public object Beta : SetupGcloudV2.Component("beta") |
| 109 | + |
| 110 | + public object Bigtable : SetupGcloudV2.Component("bigtable") |
| 111 | + |
| 112 | + public object Bq : SetupGcloudV2.Component("bq") |
| 113 | + |
| 114 | + public object BundledPython3Unix : SetupGcloudV2.Component("bundled-python3-unix") |
| 115 | + |
| 116 | + public object Cbt : SetupGcloudV2.Component("cbt") |
| 117 | + |
| 118 | + public object CloudBuildLocal : SetupGcloudV2.Component("cloud-build-local") |
| 119 | + |
| 120 | + public object CloudDatastoreEmulator : SetupGcloudV2.Component("cloud-datastore-emulator") |
| 121 | + |
| 122 | + public object CloudFirestoreEmulator : SetupGcloudV2.Component("cloud-firestore-emulator") |
| 123 | + |
| 124 | + public object CloudSpannerEmulator : SetupGcloudV2.Component("cloud-spanner-emulator") |
| 125 | + |
| 126 | + public object CloudSqlProxy : SetupGcloudV2.Component("cloud_sql_proxy") |
| 127 | + |
| 128 | + public object ConfigConnector : SetupGcloudV2.Component("config-connector") |
| 129 | + |
| 130 | + public object Core : SetupGcloudV2.Component("core") |
| 131 | + |
| 132 | + public object Datalab : SetupGcloudV2.Component("datalab") |
| 133 | + |
| 134 | + public object DockerCredentialGcr : SetupGcloudV2.Component("docker-credential-gcr") |
| 135 | + |
| 136 | + public object Gsutil : SetupGcloudV2.Component("gsutil") |
| 137 | + |
| 138 | + public object Kpt : SetupGcloudV2.Component("kpt") |
| 139 | + |
| 140 | + public object Kubectl : SetupGcloudV2.Component("kubectl") |
| 141 | + |
| 142 | + public object KubectlOidc : SetupGcloudV2.Component("kubectl-oidc") |
| 143 | + |
| 144 | + public object Kustomize : SetupGcloudV2.Component("kustomize") |
| 145 | + |
| 146 | + public object LocalExtract : SetupGcloudV2.Component("local-extract") |
| 147 | + |
| 148 | + public object Minikube : SetupGcloudV2.Component("minikube") |
| 149 | + |
| 150 | + public object Nomos : SetupGcloudV2.Component("nomos") |
| 151 | + |
| 152 | + public object Pkg : SetupGcloudV2.Component("pkg") |
| 153 | + |
| 154 | + public object PubsubEmulator : SetupGcloudV2.Component("pubsub-emulator") |
| 155 | + |
| 156 | + public object Skaffold : SetupGcloudV2.Component("skaffold") |
| 157 | + |
| 158 | + public class Custom( |
| 159 | + customStringValue: String, |
| 160 | + ) : SetupGcloudV2.Component(customStringValue) |
| 161 | + } |
| 162 | +} |
0 commit comments