{
  "description": "A CompositionRevision represents a revision of a Composition. Crossplane\ncreates new revisions when there are changes to the Composition.\n\nCrossplane creates and manages CompositionRevisions. Don't directly edit\nCompositionRevisions.",
  "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"
    },
    "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"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "CompositionRevisionSpec specifies the desired state of the composition\nrevision.",
      "properties": {
        "compositeTypeRef": {
          "description": "CompositeTypeRef specifies the type of composite resource that this\ncomposition is compatible with.",
          "properties": {
            "apiVersion": {
              "description": "APIVersion of the type.",
              "type": "string"
            },
            "kind": {
              "description": "Kind of the type.",
              "type": "string"
            }
          },
          "required": [
            "apiVersion",
            "kind"
          ],
          "type": "object",
          "x-kubernetes-validations": [
            {
              "message": "Value is immutable",
              "rule": "self == oldSelf"
            }
          ],
          "additionalProperties": false
        },
        "mode": {
          "default": "Pipeline",
          "description": "Mode controls what type or \"mode\" of Composition will be used.\n\n\"Pipeline\" indicates that a Composition specifies a pipeline of\nfunctions, each of which is responsible for producing composed\nresources that Crossplane should create or update.",
          "enum": [
            "Pipeline"
          ],
          "type": "string"
        },
        "pipeline": {
          "description": "Pipeline is a list of function steps that will be used when a\ncomposite resource referring to this composition is created.\n\nThe Pipeline is only used by the \"Pipeline\" mode of Composition. It is\nignored by other modes.",
          "items": {
            "description": "A PipelineStep in a function pipeline.",
            "properties": {
              "credentials": {
                "description": "Credentials are optional credentials that the function needs.",
                "items": {
                  "description": "FunctionCredentials are optional credentials that a function\nneeds to run.",
                  "properties": {
                    "name": {
                      "description": "Name of this set of credentials.",
                      "type": "string"
                    },
                    "secretRef": {
                      "description": "A SecretRef is a reference to a secret containing credentials that should\nbe supplied to the function.",
                      "properties": {
                        "name": {
                          "description": "Name of the secret.",
                          "type": "string"
                        },
                        "namespace": {
                          "description": "Namespace of the secret.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "namespace"
                      ],
                      "type": "object",
                      "additionalProperties": false
                    },
                    "source": {
                      "description": "Source of the function credentials.",
                      "enum": [
                        "None",
                        "Secret"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "source"
                  ],
                  "type": "object",
                  "x-kubernetes-validations": [
                    {
                      "message": "the Secret source requires a secretRef",
                      "rule": "self.source == 'Secret' && has(self.secretRef)"
                    }
                  ],
                  "additionalProperties": false
                },
                "type": "array",
                "x-kubernetes-list-map-keys": [
                  "name"
                ],
                "x-kubernetes-list-type": "map"
              },
              "functionRef": {
                "description": "FunctionRef is a reference to the function this step should\nexecute.",
                "properties": {
                  "name": {
                    "description": "Name of the referenced Function.",
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "input": {
                "description": "Input is an optional, arbitrary Kubernetes resource (i.e. a resource\nwith an apiVersion and kind) that will be passed to the function as\nthe 'input' of its RunFunctionRequest.",
                "type": "object",
                "x-kubernetes-embedded-resource": true,
                "x-kubernetes-preserve-unknown-fields": true
              },
              "requirements": {
                "description": "Requirements are resource requirements that will be satisfied before\nthis pipeline step is called for the first time. This allows\npre-populating required resources without requiring a function to\nrequest them first.",
                "properties": {
                  "requiredResources": {
                    "description": "RequiredResources is a list of resources that must be fetched before\nthis function is called.",
                    "items": {
                      "description": "RequiredResourceSelector selects a required resource.",
                      "properties": {
                        "apiVersion": {
                          "description": "APIVersion of the required resource.",
                          "type": "string"
                        },
                        "kind": {
                          "description": "Kind of the required resource.",
                          "type": "string"
                        },
                        "matchLabels": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "MatchLabels specifies the set of labels to match for finding the\nrequired resource. When specified, Name is ignored.",
                          "type": "object"
                        },
                        "name": {
                          "description": "Name of the required resource.",
                          "type": "string"
                        },
                        "namespace": {
                          "description": "Namespace of the required resource if it is namespaced.",
                          "type": "string"
                        },
                        "requirementName": {
                          "description": "RequirementName is the unique name to identify this required resource\nin the Required Resources map in the function request.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "apiVersion",
                        "kind",
                        "requirementName"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "Either name or matchLabels must be specified, but not both",
                          "rule": "(has(self.name) && !has(self.matchLabels)) || (!has(self.name) && has(self.matchLabels))"
                        }
                      ],
                      "additionalProperties": false
                    },
                    "type": "array",
                    "x-kubernetes-list-map-keys": [
                      "requirementName"
                    ],
                    "x-kubernetes-list-type": "map"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "step": {
                "description": "Step name. Must be unique within its Pipeline.",
                "type": "string"
              }
            },
            "required": [
              "functionRef",
              "step"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "step"
          ],
          "x-kubernetes-list-type": "map"
        },
        "revision": {
          "description": "Revision number. Newer revisions have larger numbers.\n\nThis number can change. When a Composition transitions from state A\n-> B -> A there will be only two CompositionRevisions. Crossplane will\nedit the original CompositionRevision to change its revision number from\n0 to 2.",
          "format": "int64",
          "type": "integer"
        },
        "writeConnectionSecretsToNamespace": {
          "description": "WriteConnectionSecretsToNamespace specifies the namespace in which the\nconnection secrets of composite resource dynamically provisioned using\nthis composition will be created.",
          "type": "string"
        }
      },
      "required": [
        "compositeTypeRef",
        "revision"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "CompositionRevisionStatus shows the observed state of the composition\nrevision.",
      "properties": {
        "conditions": {
          "description": "Conditions of the resource.",
          "items": {
            "description": "A Condition that may apply to a resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "LastTransitionTime is the last time this condition transitioned from one\nstatus to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A Message containing details about this condition's last transition from\none status to another, if any.",
                "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",
                "type": "integer"
              },
              "reason": {
                "description": "A Reason for this condition's last transition from one status to another.",
                "type": "string"
              },
              "status": {
                "description": "Status of this condition; is it currently True, False, or Unknown?",
                "type": "string"
              },
              "type": {
                "description": "Type of this condition. At most one of each condition type may apply to\na resource at any point in time.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
