{
  "$id": "https://niklasrosenstein.github.io/gitopsctr/schemas/apis/unit.gitopsctr.io/v1/FrontendS3Cloudfront/desired.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string"
    },
    "apiVersion": {
      "const": "unit.gitopsctr.io/v1"
    },
    "kind": {
      "const": "FrontendS3Cloudfront"
    },
    "metadata": {
      "additionalProperties": false,
      "not": {
        "properties": {
          "labels": {
            "required": [
              "gitopsctr.io/partition"
            ]
          }
        },
        "required": [
          "ownerReferences",
          "labels"
        ]
      },
      "properties": {
        "deletion": {
          "additionalProperties": false,
          "properties": {
            "generation": {
              "minimum": 1,
              "type": "integer"
            },
            "resourceDigest": {
              "pattern": "^sha256:[0-9a-f]{64}$",
              "type": "string"
            }
          },
          "required": [
            "generation",
            "resourceDigest"
          ],
          "title": "DeletionMetadata",
          "type": "object"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "properties": {
            "gitopsctr.io/partition": {
              "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
              "type": "string"
            }
          },
          "propertyNames": {
            "type": "string"
          },
          "type": "object"
        },
        "name": {
          "minLength": 1,
          "type": "string"
        },
        "ownerReferences": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "apiVersion": {
                "minLength": 1,
                "type": "string"
              },
              "kind": {
                "minLength": 1,
                "type": "string"
              },
              "name": {
                "minLength": 1,
                "type": "string"
              },
              "uid": {
                "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
                "type": "string"
              }
            },
            "required": [
              "apiVersion",
              "kind",
              "name",
              "uid"
            ],
            "title": "DesiredOwnerReference",
            "type": "object"
          },
          "maxItems": 1,
          "minItems": 1,
          "type": "array"
        },
        "uid": {
          "pattern": "^[a-z0-9][a-z0-9-]{0,62}$",
          "type": "string"
        }
      },
      "required": [
        "name",
        "uid"
      ],
      "type": "object"
    },
    "spec": {
      "additionalProperties": false,
      "properties": {
        "inputs": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "bucket": {
                  "type": "string"
                },
                "bundle": {
                  "type": "string"
                },
                "distributionId": {
                  "type": "string"
                },
                "runtimeConfig": {
                  "additionalProperties": false,
                  "properties": {
                    "apiBase": {
                      "type": "string"
                    },
                    "auth": {
                      "additionalProperties": false,
                      "properties": {
                        "clientId": {
                          "type": "string"
                        },
                        "issuer": {
                          "type": "string"
                        },
                        "mode": {
                          "const": "cognito"
                        }
                      },
                      "required": [
                        "mode",
                        "issuer",
                        "clientId"
                      ],
                      "title": "RuntimeAuthModel",
                      "type": "object"
                    },
                    "schema": {
                      "const": 1
                    }
                  },
                  "required": [
                    "schema",
                    "apiBase",
                    "auth"
                  ],
                  "title": "RuntimeConfigurationModel",
                  "type": "object"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "bundle",
                "bucket",
                "distributionId",
                "url",
                "runtimeConfig"
              ],
              "title": "FrontendDesiredInputs",
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "pull": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "credentialProvider": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "type": {
                          "const": "aws-ecr"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "title": "AwsEcrCredentialProvider",
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "title": "FrontendPull",
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "resolvedInputs": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "artifacts": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "importedArtifactEvidence": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "object"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "importedArtifacts": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "promotions": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "receipts": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "title": "ResolvedInputs",
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "source": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "driverVersion": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "inputHash": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "inputs": {
                  "anyOf": [
                    {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null,
                  "description": "Input paths or glob patterns resolved relative to source.path."
                },
                "path": {
                  "description": "Repository-relative path resolved from the root of the selected source revision.",
                  "type": "string"
                },
                "revision": {
                  "pattern": "^[0-9a-f]{40}$",
                  "type": "string"
                }
              },
              "required": [
                "path",
                "revision"
              ],
              "title": "DesiredSource",
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [],
      "type": "object"
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "metadata",
    "spec"
  ],
  "title": "FrontendS3Cloudfront (unit.gitopsctr.io/v1)",
  "type": "object"
}
