{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Secret",
  "type": "object",
  "description": "A Snowflake secret",
  "properties": {
    "type": {
      "type": "string",
      "description": "Type of the secret"
    },
    "comment": {
      "type": "string",
      "description": "user comment associated to an object in the dictionary"
    },
    "name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "description": "Name of the secret"
    },
    "created_on": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "description": "Date and time when the secret was created."
    },
    "database_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Database in which the secret is stored"
    },
    "schema_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Schema in which the secret is stored"
    },
    "owner": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Role that owns the secret"
    },
    "owner_role_type": {
      "type": "string",
      "readOnly": true,
      "description": "The type of role that owns the secret"
    }
  },
  "required": [
    "type",
    "name"
  ],
  "discriminator": {
    "propertyName": "type",
    "mapping": {
      "PASSWORD": "PasswordSecret",
      "OAUTH2": "Oauth2Secret",
      "GENERIC_STRING": "GenericStringSecret",
      "SYMMETRIC_KEY": "SymmetricKeySecret",
      "CLOUD_PROVIDER_TOKEN": "CloudProviderTokenSecret",
      "JWT_KEY_PAIR": "JwtKeyPairSecret"
    }
  }
}
