{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nexus/json-schema/nexus-google-cloud-blobstore-api-model-schema.json",
  "title": "GoogleCloudBlobstoreApiModel",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nexus-blob-store-api-openapi.yml#/components/schemas/GoogleCloudBlobstoreApiModel",
  "required": [
    "bucketConfiguration",
    "name"
  ],
  "type": "object",
  "properties": {
    "name": {
      "pattern": "^[a-zA-Z0-9\\-]{1}[a-zA-Z0-9_\\-\\.]*$",
      "type": "string",
      "description": "The name of the GC Storage blob store."
    },
    "softQuota": {
      "$ref": "#/$defs/BlobStoreApiSoftQuota"
    },
    "bucketConfiguration": {
      "$ref": "#/$defs/GoogleCloudBlobStoreApiBucketConfiguration"
    },
    "type": {
      "type": "string",
      "description": "The blob store type."
    }
  },
  "$defs": {
    "BlobStoreApiSoftQuota": {
      "required": [
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "minLength": 1,
          "type": "string",
          "description": "The type to use such as spaceRemainingQuota, or spaceUsedQuotaspaceUsedQuota"
        },
        "limit": {
          "minimum": 0,
          "type": "integer",
          "description": "The limit in MB.",
          "format": "int64"
        }
      },
      "description": "Settings to control the soft quota"
    },
    "GoogleCloudBlobStoreApiBucket": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the GC Storage bucket"
        },
        "projectId": {
          "type": "string",
          "description": "GCP Project ID"
        },
        "region": {
          "type": "string",
          "description": "The GCP region to create a new GC Storage bucket in or an existing GC Storage bucket's region. Should be the same as Nexus deployment region."
        },
        "prefix": {
          "type": "string",
          "description": "The GC Storage blob store (i.e GC Storage object) key prefix"
        }
      },
      "description": "Details of the GC Storage bucket such as name and region"
    },
    "GoogleCloudBlobStoreApiBucketAuthentication": {
      "required": [
        "authenticationMethod"
      ],
      "type": "object",
      "properties": {
        "method": {
          "type": "string",
          "writeOnly": true
        },
        "accountKey": {
          "type": "string",
          "description": "The credentials JSON file."
        },
        "authenticationMethod": {
          "type": "string",
          "description": "The type of Google Cloud authentication to use.",
          "enum": [
            "applicationDefault",
            "accountKey"
          ]
        }
      },
      "description": "Security details for granting access the GC Storage API"
    },
    "GoogleCloudBlobStoreApiBucketConfiguration": {
      "required": [
        "bucket"
      ],
      "type": "object",
      "properties": {
        "bucket": {
          "$ref": "#/$defs/GoogleCloudBlobStoreApiBucket"
        },
        "security": {
          "$ref": "#/$defs/GoogleCloudBlobStoreApiBucketAuthentication"
        },
        "encryption": {
          "$ref": "#/$defs/GoogleCloudBlobStoreApiEncryption"
        },
        "bucketSecurity": {
          "$ref": "#/$defs/GoogleCloudBlobStoreApiBucketAuthentication"
        }
      },
      "description": "The GC Storage specific configuration details for the GC Storage object that'll contain the blob store."
    },
    "GoogleCloudBlobStoreApiEncryption": {
      "type": "object",
      "properties": {
        "encryptionType": {
          "type": "string",
          "description": "The type of GCP server side encryption to use.",
          "enum": [
            "default",
            "kmsManagedEncryption"
          ]
        },
        "encryptionKey": {
          "type": "string",
          "description": "CryptoKey ID for KMS encryption."
        }
      },
      "description": "The type of encryption to use"
    }
  }
}