{
  "description": "ArtifactGenerator is the Schema for the artifactgenerators API.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "ArtifactGeneratorSpec defines the desired state of ArtifactGenerator.",
      "properties": {
        "artifacts": {
          "description": "OutputArtifacts is a list of output artifacts to be generated.",
          "items": {
            "additionalProperties": false,
            "description": "OutputArtifact defines the desired state of an ExternalArtifact\ngenerated by the ArtifactGenerator.",
            "properties": {
              "copy": {
                "description": "Copy defines a list of copy operations to perform from the sources to the generated artifact.\nThe copy operations are performed in the order they are listed with existing files\nbeing overwritten by later copy operations.",
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "exclude": {
                      "description": "Exclude specifies a list of glob patterns to exclude\nfiles and dirs matched by the 'From' field.",
                      "items": {
                        "type": "string"
                      },
                      "maxItems": 100,
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "from": {
                      "description": "From specifies the source (by alias) and the glob pattern to match files.\nThe format is \"@\u003calias\u003e/\u003cglob-pattern\u003e\".",
                      "maxLength": 1024,
                      "pattern": "^@([a-z0-9]([a-z0-9_-]*[a-z0-9])?)/(.*)$",
                      "type": "string"
                    },
                    "strategy": {
                      "description": "Strategy specifies the copy strategy to use.\n'Overwrite' will overwrite existing files in the destination.\n'Merge' is for merging YAML files using Helm values merge strategy.\n'Extract' is for extracting the contents of tarball archives (.tar.gz, .tgz)\nWhen using glob patterns, non-tarball files are silently skipped. For single file sources,\nthe file must be a tarball or an error is returned. Directories are not supported.\nIf not specified, defaults to 'Overwrite'.",
                      "enum": [
                        "Overwrite",
                        "Merge",
                        "Extract"
                      ],
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "to": {
                      "description": "To specifies the destination path within the artifact.\nThe format is \"@artifact/path\", the alias \"artifact\"\nrefers to the root path of the generated artifact.",
                      "maxLength": 1024,
                      "pattern": "^@(artifact)/(.*)$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "from",
                    "to"
                  ],
                  "type": "object"
                },
                "minItems": 1,
                "type": "array"
              },
              "name": {
                "description": "Name is the name of the generated artifact.",
                "maxLength": 253,
                "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
                "type": "string"
              },
              "originRevision": {
                "description": "OriginRevision is used to set the 'org.opencontainers.image.revision'\nannotation on the generated artifact metadata.\nIf specified, it must point to an existing source alias in the format \"@\u003calias\u003e\".\nIf the referenced source has an origin revision (e.g. a Git commit SHA),\nit will be used to set the annotation on the generated artifact.\nIf the referenced source does not have an origin revision, the field is ignored.",
                "maxLength": 64,
                "pattern": "^@([a-z0-9]([a-z0-9_-]*[a-z0-9])?)$",
                "type": [
                  "string",
                  "null"
                ]
              },
              "revision": {
                "description": "Revision is the revision of the generated artifact.\nIf specified, it must point to an existing source alias in the format \"@\u003calias\u003e\".\nIf not specified, the revision is automatically set to the digest of the artifact content.",
                "maxLength": 64,
                "pattern": "^@([a-z0-9]([a-z0-9_-]*[a-z0-9])?)$",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "copy",
              "name"
            ],
            "type": "object"
          },
          "maxItems": 1000,
          "minItems": 1,
          "type": "array"
        },
        "sources": {
          "description": "Sources is a list of references to the Flux source-controller\nresources that will be used to generate the artifact.",
          "items": {
            "additionalProperties": false,
            "description": "SourceReference contains the reference to a Flux source-controller resource.",
            "properties": {
              "alias": {
                "description": "Alias of the source within the ArtifactGenerator context.\nThe alias must be unique per ArtifactGenerator, and must consist\nof lower case alphanumeric characters, underscores, and hyphens.\nIt must start and end with an alphanumeric character.",
                "maxLength": 63,
                "pattern": "^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$",
                "type": "string"
              },
              "kind": {
                "description": "Kind of the source.",
                "enum": [
                  "Bucket",
                  "GitRepository",
                  "OCIRepository",
                  "HelmChart",
                  "ExternalArtifact"
                ],
                "type": "string"
              },
              "name": {
                "description": "Name of the source.",
                "maxLength": 253,
                "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the source.\nIf not provided, defaults to the same namespace as the ArtifactGenerator.",
                "maxLength": 63,
                "minLength": 1,
                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "alias",
              "kind",
              "name"
            ],
            "type": "object"
          },
          "maxItems": 1000,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "artifacts",
        "sources"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "ArtifactGeneratorStatus defines the observed state of ArtifactGenerator.",
      "properties": {
        "conditions": {
          "description": "Conditions holds the conditions for the ArtifactGenerator.",
          "items": {
            "additionalProperties": false,
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "inventory": {
          "description": "Inventory contains the list of generated ExternalArtifact references.",
          "items": {
            "additionalProperties": false,
            "description": "ExternalArtifactReference contains the reference to a\ngenerated ExternalArtifact along with its digest.",
            "properties": {
              "digest": {
                "description": "Digest of the referent artifact.",
                "type": "string"
              },
              "filename": {
                "description": "Filename is the name of the artifact file.",
                "type": "string"
              },
              "name": {
                "description": "Name of the referent artifact.",
                "type": "string"
              },
              "namespace": {
                "description": "Namespace of the referent artifact.",
                "type": "string"
              }
            },
            "required": [
              "digest",
              "filename",
              "name",
              "namespace"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "lastHandledReconcileAt": {
          "description": "LastHandledReconcileAt holds the value of the most recent\nreconcile request value, so a change of the annotation value\ncan be detected.",
          "type": [
            "string",
            "null"
          ]
        },
        "observedSourcesDigest": {
          "description": "ObservedSourcesDigest is a hash representing the current state of\nall the sources referenced by the ArtifactGenerator.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}