{
  "description": "ArtifactRegistryRepository is the Schema for the ArtifactRegistryRepository API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More 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. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "ArtifactRegistryRepositorySpec defines the desired state of ArtifactRegistryRepository",
      "properties": {
        "cleanupPolicies": {
          "description": "Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length.",
          "items": {
            "properties": {
              "action": {
                "description": "Policy action.",
                "type": "string"
              },
              "condition": {
                "description": "Policy condition for matching versions.",
                "properties": {
                  "newerThan": {
                    "description": "Match versions newer than a duration.",
                    "type": "string"
                  },
                  "olderThan": {
                    "description": "Match versions older than a duration.",
                    "type": "string"
                  },
                  "packageNamePrefixes": {
                    "description": "Match versions by package prefix. Applied on any prefix match.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "tagPrefixes": {
                    "description": "Match versions by tag prefix. Applied on any prefix match.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "tagState": {
                    "description": "Match versions by tag status.",
                    "type": "string"
                  },
                  "versionNamePrefixes": {
                    "description": "Match versions by version name prefix. Applied on any prefix match.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "id": {
                "description": "The user-provided ID of the cleanup policy.",
                "type": "string"
              },
              "mostRecentVersions": {
                "description": "Policy condition for retaining a minimum number of versions. May only be specified with a Keep action.",
                "properties": {
                  "keepCount": {
                    "description": "Minimum number of versions to keep.",
                    "format": "int32",
                    "type": "integer"
                  },
                  "packageNamePrefixes": {
                    "description": "List of package name prefixes that will apply this rule.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "type": "object",
                "additionalProperties": false
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "cleanupPolicyDryRun": {
          "description": "Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository.",
          "type": "boolean"
        },
        "description": {
          "description": "The user-provided description of the repository.",
          "type": "string"
        },
        "dockerConfig": {
          "description": "Docker repository config contains repository level configuration for the repositories of docker type.",
          "properties": {
            "immutableTags": {
              "description": "The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.",
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "format": {
          "description": "Optional. The format of packages that are stored in the repository.",
          "type": "string"
        },
        "kmsKeyRef": {
          "description": "The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. This value may not be changed after the Repository has been created.",
          "oneOf": [
            {
              "not": {
                "required": [
                  "external"
                ]
              },
              "required": [
                "name"
              ]
            },
            {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "name"
                    ]
                  },
                  {
                    "required": [
                      "namespace"
                    ]
                  }
                ]
              },
              "required": [
                "external"
              ]
            }
          ],
          "properties": {
            "external": {
              "description": "A reference to an externally managed KMSCryptoKey. Should be in the format `projects/[kms_project_id]/locations/[region]/keyRings/[key_ring_id]/cryptoKeys/[key]`.",
              "type": "string"
            },
            "name": {
              "description": "The `name` of a `KMSCryptoKey` resource.",
              "type": "string"
            },
            "namespace": {
              "description": "The `namespace` of a `KMSCryptoKey` resource.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "location": {
          "description": "Immutable. The name of the location this repository is located in.",
          "type": "string"
        },
        "mavenConfig": {
          "description": "Maven repository config contains repository level configuration for the repositories of maven type.",
          "properties": {
            "allowSnapshotOverwrites": {
              "description": "The repository with this flag will allow publishing the same snapshot versions.",
              "type": "boolean"
            },
            "versionPolicy": {
              "description": "Version policy defines the versions that the registry will accept.",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "mode": {
          "description": "Optional. The mode of the repository.",
          "type": "string"
        },
        "remoteRepositoryConfig": {
          "description": "Configuration specific for a Remote Repository.",
          "properties": {
            "description": {
              "description": "The description of the remote source.",
              "type": "string"
            },
            "dockerRepository": {
              "description": "Specific settings for a Docker remote repository.",
              "properties": {
                "publicRepository": {
                  "description": "One of the publicly available Docker repositories supported by Artifact Registry.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "mavenRepository": {
              "description": "Specific settings for a Maven remote repository.",
              "properties": {
                "publicRepository": {
                  "description": "One of the publicly available Maven repositories supported by Artifact Registry.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "npmRepository": {
              "description": "Specific settings for an Npm remote repository.",
              "properties": {
                "publicRepository": {
                  "description": "One of the publicly available Npm repositories supported by Artifact Registry.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            },
            "pythonRepository": {
              "description": "Specific settings for a Python remote repository.",
              "properties": {
                "publicRepository": {
                  "description": "One of the publicly available Python repositories supported by Artifact Registry.",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "resourceID": {
          "description": "The ArtifactRegistryRepository name. If not given, the metadata.name will be used.",
          "type": "string"
        },
        "virtualRepositoryConfig": {
          "description": "Configuration specific for a Virtual Repository.",
          "properties": {
            "upstreamPolicies": {
              "description": "Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository.",
              "items": {
                "properties": {
                  "id": {
                    "description": "The user-provided ID of the upstream policy.",
                    "type": "string"
                  },
                  "priority": {
                    "description": "Entries with a greater priority value take precedence in the pull order.",
                    "format": "int32",
                    "type": "integer"
                  },
                  "repositoryRef": {
                    "description": "A reference to the repository resource, for example: `projects/p1/locations/us-central1/repositories/repo1`.",
                    "oneOf": [
                      {
                        "not": {
                          "required": [
                            "external"
                          ]
                        },
                        "required": [
                          "name"
                        ]
                      },
                      {
                        "not": {
                          "anyOf": [
                            {
                              "required": [
                                "name"
                              ]
                            },
                            {
                              "required": [
                                "namespace"
                              ]
                            }
                          ]
                        },
                        "required": [
                          "external"
                        ]
                      }
                    ],
                    "properties": {
                      "external": {
                        "description": "A reference to an externally managed ArtifactRegistryRepository resource. Should be in the format \"projects/{{projectID}}/locations/{{location}}/repositories/{{repositoryID}}\".",
                        "type": "string"
                      },
                      "name": {
                        "description": "The name of a ArtifactRegistryRepository resource.",
                        "type": "string"
                      },
                      "namespace": {
                        "description": "The namespace of a ArtifactRegistryRepository resource.",
                        "type": "string"
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  }
                },
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "location"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "ArtifactRegistryRepositoryStatus defines the config connector machine state of ArtifactRegistryRepository",
      "properties": {
        "conditions": {
          "description": "Conditions represent the latest available observations of the object's current state.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition.",
                "type": "string"
              },
              "reason": {
                "description": "Unique, one-word, CamelCase reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status is the status of the condition. Can be True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type is the type of the condition.",
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "createTime": {
          "description": "Output only. The time when the repository was created.",
          "type": "string"
        },
        "name": {
          "description": "The name of the repository, for example: \"repo1\".",
          "type": "string"
        },
        "observedGeneration": {
          "description": "ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource.",
          "format": "int64",
          "type": "integer"
        },
        "updateTime": {
          "description": "Output only. The time when the repository was last updated.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
