// Code generated by quicktype. DO NOT EDIT.

package builtin

type CommonDefs interface{}

type ComposeOutput map[string]interface{}

type ArgoCDUpdateConfig struct {
	Apps []ArgoCDAppUpdate `json:"apps"`
}

type ArgoCDAppUpdate struct {
	// Specifies the name of an Argo CD Application resource to be updated.
	Name string `json:"name"`
	// Specifies the namespace of an Argo CD Application resource to be updated. If left
	// unspecified, the namespace will be the controller's configured default.
	Namespace string `json:"namespace,omitempty"`
	// Describes updates to be applied to various sources of an Argo CD Application resource.
	Sources []ArgoCDAppSourceUpdate `json:"sources,omitempty"`
}

type ArgoCDAppSourceUpdate struct {
	// If applicable, identifies a specific chart within the Helm chart repository specified by
	// the 'repoURL' field. When the source to be updated references a Helm chart repository,
	// the values of the 'repoURL' and 'chart' fields should exactly match the values of the
	// same fields in the source. i.e. Do not match the values of these two fields to your
	// Warehouse; match them to the Application source you wish to update.
	Chart string `json:"chart,omitempty"`
	// Specifies the desired revision for the source. If left undefined, the desired revision
	// will be determined by Freight (if possible). Note that the source's 'targetRevision' will
	// not be updated to this commit unless 'updateTargetRevision=true' is set. The utility of
	// this field, on its own, is to specify the revision that the source should be observably
	// synced to during a health check.
	DesiredRevision string                       `json:"desiredRevision,omitempty"`
	Helm            *ArgoCDHelmParameterUpdates  `json:"helm,omitempty"`
	Kustomize       *ArgoCDKustomizeImageUpdates `json:"kustomize,omitempty"`
	// With possible help from the 'chart' field, identifies which of an Argo CD Application's
	// sources is to be updated. When the source to be updated references a Helm chart
	// repository, the values of the 'repoURL' and 'chart' fields should exactly match the
	// values of the same fields in the source. i.e. Do not match the values of these two fields
	// to your Warehouse; match them to the Application source you wish to update.
	RepoURL string `json:"repoURL"`
	// Indicates whether the source should be updated such that its 'targetRevision' field
	// points directly at the desired revision. If set to true, 'desiredRevision' must be
	// specified.
	UpdateTargetRevision bool `json:"updateTargetRevision,omitempty"`
}

// Describes updates to an Argo CD Application source's Helm parameters.
type ArgoCDHelmParameterUpdates struct {
	Images []ArgoCDHelmImageUpdate `json:"images"`
}

// Describes how to update a Helm parameter to reference a specific version of a container
// image.
type ArgoCDHelmImageUpdate struct {
	// Specifies a key within an Argo CD Application source's Helm parameters that is to be
	// updated.
	Key string `json:"key"`
	// Specifies a new value for the setting within an Argo CD Application source's Helm
	// parameters identified by the 'key' field.
	Value string `json:"value"`
}

// Describes updates to an Argo CD Application source's Kustomize images.
type ArgoCDKustomizeImageUpdates struct {
	Images []ArgoCDKustomizeImageUpdate `json:"images,omitempty"`
}

// Describes how to update a Kustomize image to reference a specific version of a container
// image.
type ArgoCDKustomizeImageUpdate struct {
	// Digest of the image to set. Mutually exclusive with 'tag'.
	Digest string `json:"digest,omitempty"`
	// Specifies a container image name override.
	NewName string `json:"newName,omitempty"`
	// The URL of a container image repository.
	RepoURL string `json:"repoURL"`
	// Tag of the image to set. Mutually exclusive with 'digest'.
	Tag string `json:"tag,omitempty"`
}

type CopyConfig struct {
	// Ignore is a (multiline) string of glob patterns to ignore when copying files. It accepts
	// the same syntax as .gitignore files.
	Ignore string `json:"ignore,omitempty"`
	// InPath is the path to the file or directory to copy.
	InPath string `json:"inPath"`
	// OutPath is the path to the destination file or directory.
	OutPath string `json:"outPath"`
}

type DeleteConfig struct {
	// Path is the path to the file or directory to delete.
	Path string `json:"path"`
	// Strict will cause the directive to fail if the path does not exist.
	Strict bool `json:"strict,omitempty"`
}

type GitClearConfig struct {
	// Path to a working directory of a local repository from which to remove all files,
	// excluding the .git/ directory.
	Path string `json:"path"`
}

type GitCloneConfig struct {
	// Default authorship information for any commits made to the cloned repository. If
	// provided, this overrides any system-level defaults. Note: Configuration of the
	// `git-commit` step can override this information.
	Author *GitCloneConfigAuthor `json:"author,omitempty"`
	// The commits, branches, or tags to check out from the repository and the paths where they
	// should be checked out. At least one must be specified.
	Checkout []Checkout `json:"checkout"`
	// Indicates whether to skip TLS verification when cloning the repository. Default is false.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// The URL of a remote Git repository to clone. Required.
	RepoURL string `json:"repoURL"`
}

// Default authorship information for any commits made to the cloned repository. If
// provided, this overrides any system-level defaults. Note: Configuration of the
// `git-commit` step can override this information.
type GitCloneConfigAuthor struct {
	// The email of the author.
	Email string `json:"email"`
	// The name of the author.
	Name string `json:"name"`
	// The GPG signing key for the author.
	SigningKey string `json:"signingKey,omitempty"`
}

type Checkout struct {
	// Optional alias for this checkout. If provided, it will be used as the key in the
	// 'commits' output map.
	As string `json:"as,omitempty"`
	// The branch to checkout. Mutually exclusive with 'commit' and 'tag'. If none of these are
	// specified, the default branch is checked out.
	Branch string `json:"branch,omitempty"`
	// The commit to checkout. Mutually exclusive with 'branch' and 'tag''. If none of these are
	// specified, the default branch is checked out.
	Commit string `json:"commit,omitempty"`
	// Indicates whether a new, empty orphan branch should be created if the branch does not
	// already exist. Default is false.
	Create bool `json:"create,omitempty"`
	// The path where the repository should be checked out.
	Path string `json:"path"`
	// The tag to checkout. Mutually exclusive with 'branch' and 'commit'. If none of these are
	// specified, the default branch is checked out.
	Tag string `json:"tag,omitempty"`
}

type GitCommitConfig struct {
	// Optional authorship information for the commit. If provided, this takes precedence over
	// both system-level defaults and any optional, default authorship information configured in
	// the `git-clone` step.
	Author *GitCommitConfigAuthor `json:"author,omitempty"`
	// The commit message.
	Message string `json:"message"`
	// The path to a working directory of a local repository.
	Path string `json:"path"`
}

// Optional authorship information for the commit. If provided, this takes precedence over
// both system-level defaults and any optional, default authorship information configured in
// the `git-clone` step.
type GitCommitConfigAuthor struct {
	// The email of the author.
	Email string `json:"email"`
	// The name of the author.
	Name string `json:"name"`
	// The GPG signing key for the author.
	SigningKey string `json:"signingKey,omitempty"`
}

type GitMergePRConfig struct {
	// Skip TLS verification when interacting with the Git provider. Default is false.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// The number of the pull request to merge.
	PRNumber int64 `json:"prNumber"`
	// The name of the Git provider to use. Currently 'azure', 'bitbucket', 'gitea', 'github',
	// and 'gitlab' are supported. Kargo will try to infer the provider if it is not explicitly
	// specified.
	Provider *Provider `json:"provider,omitempty"`
	// The URL of the remote Git repository containing the pull request.
	RepoURL string `json:"repoURL"`
	// If true, the step will return RUNNING instead of FAILED when the PR is not yet mergeable.
	// The merge will be retried on the next reconciliation until it succeeds or times out.
	// Default is false.
	Wait bool `json:"wait,omitempty"`
}

type GitOpenPRConfig struct {
	// Indicates whether a new, empty orphan branch should be created and pushed to the remote
	// if the target branch does not already exist there. Default is false.
	CreateTargetBranch bool `json:"createTargetBranch,omitempty"`
	// The description of the pull request. Kargo generates a description based on the commit
	// messages if it is not explicitly specified.
	Description string `json:"description,omitempty"`
	// Indicates whether to skip TLS verification when cloning the repository. Default is false.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// Labels to add to the pull request.
	Labels []string `json:"labels,omitempty"`
	// The name of the Git provider to use. Currently 'azure', 'bitbucket', 'gitea', 'github',
	// and 'gitlab' are supported. Kargo will try to infer the provider if it is not explicitly
	// specified.
	Provider *Provider `json:"provider,omitempty"`
	// The URL of a remote Git repository to clone.
	RepoURL string `json:"repoURL"`
	// The branch containing the changes to be merged. This branch must already exist and be up
	// to date on the remote.
	SourceBranch string `json:"sourceBranch"`
	// The branch to which the changes should be merged. This branch must already exist and be
	// up to date on the remote.
	TargetBranch string `json:"targetBranch"`
	// The title for the pull request. Kargo generates a title based on the commit messages if
	// it is not explicitly specified.
	Title string `json:"title,omitempty"`
}

type GitPushConfig struct {
	// Indicates whether to push to a new remote branch. A value of 'true' is mutually exclusive
	// with 'targetBranch'. If neither of these is provided, the target branch will be the
	// currently checked out branch.
	GenerateTargetBranch bool `json:"generateTargetBranch,omitempty"`
	// This step implements its own internal retry logic for cases where a push is determined to
	// have failed due to the remote branch having commits that that are not present locally.
	// Each attempt, including the first, rebases prior to pushing. This field configures the
	// maximum number of attempts to push to the remote repository. If not specified, the
	// default is 50.
	MaxAttempts *int64 `json:"maxAttempts,omitempty"`
	// The path to a working directory of a local repository.
	Path string `json:"path"`
	// The name of the Git provider to use. Currently 'azure', 'bitbucket', 'gitea', 'github',
	// and 'gitlab' are supported. Kargo will try to infer the provider if it is not explicitly
	// specified.
	Provider *Provider `json:"provider,omitempty"`
	// The target branch to push to. Mutually exclusive with 'generateTargetBranch=true'. If
	// neither of these is provided, the target branch will be the currently checked out branch.
	TargetBranch string `json:"targetBranch,omitempty"`
}

type GitWaitForPRConfig struct {
	// Indicates whether to skip TLS verification when cloning the repository. Default is false.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// The number of the pull request to wait for.
	PRNumber int64 `json:"prNumber"`
	// The name of the Git provider to use. Currently 'azure', 'bitbucket', 'gitea', 'github',
	// and 'gitlab' are supported. Kargo will try to infer the provider if it is not explicitly
	// specified.
	Provider *Provider `json:"provider,omitempty"`
	// The URL of a remote Git repository to clone.
	RepoURL string `json:"repoURL"`
}

type HelmTemplateConfig struct {
	// APIVersions allows a manual set of supported API Versions to be passed when rendering the
	// manifests.
	APIVersions []string `json:"apiVersions,omitempty"`
	// Whether to build dependencies before rendering the manifests. If no Chart.lock file is
	// present, the dependencies will be built from the Chart.yaml file (and may be updated).
	BuildDependencies bool `json:"buildDependencies,omitempty"`
	// Whether to disable hooks in the rendered manifests.
	DisableHooks bool `json:"disableHooks,omitempty"`
	// Whether to include CRDs in the rendered manifests.
	IncludeCRDs bool `json:"includeCRDs,omitempty"`
	// KubeVersion allows for passing a specific Kubernetes version to use when rendering the
	// manifests.
	KubeVersion string `json:"kubeVersion,omitempty"`
	// Namespace to use for the rendered manifests.
	Namespace string `json:"namespace,omitempty"`
	// OutLayout to use for the rendered manifest. This can be either 'helm' or 'flat'. The
	// 'helm' layout will create a directory with the chart name and place the rendered
	// manifests in that directory. The 'flat' layout will place all rendered manifests in the
	// outPath directory without any subdirectories.
	OutLayout *OutLayout `json:"outLayout,omitempty"`
	// OutPath to write the rendered manifests to. If it points to a .yaml or .yml file, the
	// rendered manifests will be written to that file. If it points to a directory, the
	// rendered manifests will be written to this directory joined with the chart name.
	OutPath string `json:"outPath"`
	// Path at which the Helm chart can be found.
	Path string `json:"path"`
	// ReleaseName to use for the rendered manifests.
	ReleaseName string `json:"releaseName"`
	// Allows for amending chart configuration inline as one would with the `helm template`
	// command's `--set` flag.
	SetValues []SetValues `json:"setValues,omitempty"`
	// Whether to skip tests when rendering the manifests.
	SkipTests bool `json:"skipTests,omitempty"`
	// Whether to use the release name in the output path (instead of the chart name). This only
	// has an effect if outPath is set to a directory.
	UseReleaseName bool `json:"useReleaseName,omitempty"`
	// ValuesFiles to use for rendering the Helm chart.
	ValuesFiles []string `json:"valuesFiles,omitempty"`
}

type SetValues struct {
	// The key whose value should be set. For nested values, use dots to delimit key parts. e.g.
	// `image.tag`.
	Key string `json:"key"`
	// The new value for the key.
	Value string `json:"value"`
}

type HelmUpdateChartConfig struct {
	// A list of chart dependencies which should receive updates.
	Charts []Chart `json:"charts,omitempty"`
	// The path at which the umbrella chart with the dependency can be found.
	Path string `json:"path"`
}

type Chart struct {
	// The name of the subchart, as defined in `Chart.yaml`.
	Name string `json:"name"`
	// The repository of the subchart, as defined in `Chart.yaml`. It also supports OCI charts
	// using `oci://`.
	Repository string `json:"repository"`
	// The version of the subchart to update to.
	Version string `json:"version"`
}

type HTTPConfig struct {
	// The body of the HTTP request.
	Body string `json:"body,omitempty"`
	// An expression to evaluate to determine if the request failed.
	FailureExpression string `json:"failureExpression,omitempty"`
	// Headers to include in the HTTP request.
	Headers []HTTPConfigHeader `json:"headers,omitempty"`
	// Whether to skip TLS verification when making the request. (Not recommended.)
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// The HTTP method to use for the request.
	Method string `json:"method,omitempty"`
	// Outputs to extract from the HTTP response.
	Outputs []HTTPOutput `json:"outputs,omitempty"`
	// Query parameters to include in the HTTP request.
	QueryParams []HTTPConfigQueryParam `json:"queryParams,omitempty"`
	// An expression to evaluate to determine if the request was successful.
	SuccessExpression string `json:"successExpression,omitempty"`
	// The maximum time to wait for the request to complete. If not specified, the default is 10
	// seconds.
	Timeout string `json:"timeout,omitempty"`
	// The URL to send the HTTP request to.
	URL string `json:"url"`
}

type HTTPConfigHeader struct {
	// The name of the header.
	Name string `json:"name"`
	// The value of the header.
	Value string `json:"value"`
}

type HTTPOutput struct {
	// An expression to evaluate to extract the output from the HTTP response.
	FromExpression string `json:"fromExpression"`
	// The name of the output.
	Name string `json:"name"`
}

type HTTPConfigQueryParam struct {
	// The name of the query parameter.
	Name string `json:"name"`
	// The value of the query parameter.
	Value string `json:"value"`
}

type HTTPDownloadConfig struct {
	// Whether to allow overwriting an existing file at the specified path. If false and the
	// file exists, the download will fail.
	AllowOverwrite bool `json:"allowOverwrite,omitempty"`
	// Headers to include in the HTTP request.
	Headers []HTTPDownloadConfigHeader `json:"headers,omitempty"`
	// Whether to skip TLS verification when making the request. (Not recommended.)
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// The path where the downloaded file will be saved.
	OutPath string `json:"outPath"`
	// Query parameters to include in the HTTP request.
	QueryParams []HTTPDownloadConfigQueryParam `json:"queryParams,omitempty"`
	// The maximum time to wait for the download to complete. If not specified, the default is 5
	// minutes.
	Timeout string `json:"timeout,omitempty"`
	// The URL to download from.
	URL string `json:"url"`
}

type HTTPDownloadConfigHeader struct {
	// The name of the header.
	Name string `json:"name"`
	// The value of the header.
	Value string `json:"value"`
}

type HTTPDownloadConfigQueryParam struct {
	// The name of the query parameter.
	Name string `json:"name"`
	// The value of the query parameter.
	Value string `json:"value"`
}

type JSONParseConfig struct {
	// An array of outputs to extract from the JSON file.
	Outputs []JSONParse `json:"outputs"`
	// The path to the JSON file to be parsed.
	Path string `json:"path"`
}

type JSONParse struct {
	// The expression used to extract data from the JSON file.
	FromExpression string `json:"fromExpression"`
	// The name of the output variable to store the result.
	Name string `json:"name"`
}

type JSONUpdateConfig struct {
	// The path to a JSON file.
	Path string `json:"path"`
	// A list of updates to apply to the JSON file.
	Updates []JSONUpdate `json:"updates"`
}

type JSONUpdate struct {
	// The key whose value needs to be updated. For nested values, use a JSON dot notation path.
	Key string `json:"key"`
	// The new value for the specified key.
	Value interface{} `json:"value"`
}

type KustomizeBuildConfig struct {
	// OutPath is the file path to write the built manifests to.
	OutPath string `json:"outPath"`
	// Path to the directory containing the Kustomization file.
	Path string `json:"path"`
	// Plugin contains configuration for customizing the behavior of builtin Kustomize plugins.
	Plugin *Plugin `json:"plugin,omitempty"`
}

// Plugin contains configuration for customizing the behavior of builtin Kustomize plugins.
type Plugin struct {
	// Helm contains configuration for inflating a Helm chart.
	Helm *HelmClass `json:"helm,omitempty"`
}

// Helm contains configuration for inflating a Helm chart.
type HelmClass struct {
	// APIVersions allows a manual set of supported API versions to be passed when inflating a
	// Helm chart.
	APIVersions []string `json:"apiVersions,omitempty"`
	// KubeVersion allows for passing a specific Kubernetes version to use when inflating a Helm
	// chart.
	KubeVersion string `json:"kubeVersion,omitempty"`
}

type KustomizeSetImageConfig struct {
	// Images is a list of container images to set or update in the Kustomization file. When
	// left unspecified, all images from the Freight collection will be set in the Kustomization
	// file. Unless there is an ambiguous image name (for example, due to two Warehouses
	// subscribing to the same repository), which requires manual configuration.
	Images []Image `json:"images"`
	// Path to the directory containing the Kustomization file.
	Path string `json:"path"`
}

type Image struct {
	// Digest of the image to set in the Kustomization file. Mutually exclusive with 'tag'.
	Digest string `json:"digest,omitempty"`
	// Image name of the repository from which to pick the version. This is the image name Kargo
	// is subscribed to, and produces Freight for.
	Image string `json:"image"`
	// Name of the image (as defined in the Kustomization file).
	Name string `json:"name,omitempty"`
	// NewName for the image. This can be used to rename the container image name in the
	// manifests.
	NewName string `json:"newName,omitempty"`
	// Tag of the image to set in the Kustomization file. Mutually exclusive with 'digest'.
	Tag string `json:"tag,omitempty"`
}

type OCIDownloadConfig struct {
	// Whether to allow overwriting an existing file at the specified path. If false and the
	// file exists, the download will fail.
	AllowOverwrite bool `json:"allowOverwrite,omitempty"`
	// ImageRef is the reference to the OCI artifact to pull. Supports both tag format
	// 'registry/repository:tag' and digest format 'registry/repository@sha256:digest'.
	ImageRef string `json:"imageRef"`
	// Whether to skip TLS verification when pulling the artifact. Defaults to false.
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	// MediaType of the layer to pull. Selects the first layer matching this type. If not
	// specified, it selects the first layer available.
	MediaType string `json:"mediaType,omitempty"`
	// OutPath is the path to the destination file where the extracted artifact will be saved.
	OutPath string `json:"outPath"`
}

type SetMetadataConfig struct {
	// List of metadata updates to apply to various resources
	Updates []Update `json:"updates"`
}

type Update struct {
	// Kind of resource to update metadata for
	Kind Kind `json:"kind"`
	// Name of the resource to update metadata for
	Name string `json:"name"`
	// Key/value pairs to set as metadata on the resource
	Values map[string]interface{} `json:"values"`
}

type UntarConfig struct {
	// Ignore is a (multiline) string of glob patterns to ignore when extracting files. It
	// accepts the same syntax as .gitignore files.
	Ignore string `json:"ignore,omitempty"`
	// InPath is the path to the tar file to extract.
	InPath string `json:"inPath"`
	// OutPath is the path to the destination directory where contents will be extracted. The
	// outPath content will be overriden if it already exists.
	OutPath string `json:"outPath"`
	// StripComponents is the number of leading components to strip from file names in the
	// archive.
	StripComponents *int64 `json:"stripComponents,omitempty"`
}

type YAMLParseConfig struct {
	// An array of outputs to extract from the YAML file.
	Outputs []YAMLParse `json:"outputs"`
	// The path to the YAML file to be parsed.
	Path string `json:"path"`
}

type YAMLParse struct {
	// The expression used to extract data from the YAML file.
	FromExpression string `json:"fromExpression"`
	// The name of the output variable to store the result.
	Name string `json:"name"`
}

type YAMLUpdateConfig struct {
	// The path to a YAML file.
	Path string `json:"path"`
	// A list of updates to apply to the YAML file.
	Updates []YAMLUpdate `json:"updates"`
}

type YAMLUpdate struct {
	// The key whose value needs to be updated. For nested values, use a YAML dot notation path.
	Key string `json:"key"`
	// The new value for the specified key.
	Value interface{} `json:"value"`
}

// The name of the Git provider to use. Currently 'azure', 'bitbucket', 'gitea', 'github',
// and 'gitlab' are supported. Kargo will try to infer the provider if it is not explicitly
// specified.
type Provider string

const (
	Azure     Provider = "azure"
	Bitbucket Provider = "bitbucket"
	Gitea     Provider = "gitea"
	Github    Provider = "github"
	Gitlab    Provider = "gitlab"
)

// OutLayout to use for the rendered manifest. This can be either 'helm' or 'flat'. The
// 'helm' layout will create a directory with the chart name and place the rendered
// manifests in that directory. The 'flat' layout will place all rendered manifests in the
// outPath directory without any subdirectories.
type OutLayout string

const (
	Flat OutLayout = "flat"
	Helm OutLayout = "helm"
)

// Kind of resource to update metadata for
type Kind string

const (
	Freight Kind = "Freight"
	Stage   Kind = "Stage"
)
