{
  "$ref": "#/definitions/Component",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "Component": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "anyOf": [
            {
              "$ref": "#/definitions/ITPrivacy"
            },
            {
              "$ref": "#/definitions/CookieContent"
            }
          ],
          "description": "JSON string or object; when a string, parsed in an effect to select a template by `id`."
        },
        "i18nlang": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "CookieContent": {
      "additionalProperties": false,
      "properties": {
        "company": {
          "additionalProperties": false,
          "properties": {
            "address": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "address"
          ],
          "type": "object"
        },
        "cookies": {
          "items": {
            "$ref": "#/definitions/CookieRow"
          },
          "type": "array"
        },
        "date": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "enum": [
            "cookie-doc-italian",
            "cookie-doc-english",
            "cookie-doc"
          ],
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "site": {
          "additionalProperties": false,
          "properties": {
            "cookiePolicyUri": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "privacyPolicyUri": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "url",
            "privacyPolicyUri",
            "cookiePolicyUri"
          ],
          "type": "object"
        }
      },
      "required": [
        "id",
        "site",
        "company",
        "cookies"
      ],
      "type": "object"
    },
    "CookieRow": {
      "additionalProperties": false,
      "properties": {
        "durate": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "purpose": {
          "type": "string"
        },
        "service": {
          "type": "string"
        },
        "storage": {
          "enum": [
            "persistent",
            "session"
          ],
          "type": "string"
        },
        "third": {
          "additionalProperties": false,
          "properties": {
            "company": {
              "type": "string"
            },
            "termUri": {
              "type": "string"
            }
          },
          "required": [
            "company"
          ],
          "type": "object"
        },
        "type": {
          "enum": [
            "technical",
            "authentication",
            "preferences",
            "statistics",
            "advertising",
            "analytics",
            "third-party"
          ],
          "type": "string"
        }
      },
      "required": [
        "name",
        "purpose",
        "service",
        "storage",
        "durate",
        "type"
      ],
      "type": "object"
    },
    "ITPrivacy": {
      "additionalProperties": false,
      "properties": {
        "analytics": {
          "additionalProperties": false,
          "properties": {
            "companies": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "company": {
                    "type": "string"
                  }
                },
                "required": [
                  "company"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "companies"
          ],
          "type": "object"
        },
        "collectedData": {
          "additionalProperties": false,
          "properties": {
            "contactModule": {
              "additionalProperties": false,
              "properties": {
                "data": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "label": {
                        "const": "string",
                        "type": "string"
                      }
                    },
                    "required": [
                      "label"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "data"
              ],
              "type": "object"
            },
            "dataTypes": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "const": "string",
                    "type": "string"
                  }
                },
                "required": [
                  "label"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "scopes": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "const": "string",
                    "type": "string"
                  }
                },
                "required": [
                  "label"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "scopes",
            "dataTypes"
          ],
          "type": "object"
        },
        "company": {
          "additionalProperties": false,
          "properties": {
            "address": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "address"
          ],
          "type": "object"
        },
        "date": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "const": "privacy-doc-italian",
          "type": "string"
        },
        "payments": {
          "additionalProperties": false,
          "properties": {
            "companies": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "company": {
                    "type": "string"
                  }
                },
                "required": [
                  "company"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "companies"
          ],
          "type": "object"
        },
        "privacyAdmin": {
          "additionalProperties": false,
          "properties": {
            "email": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "email"
          ],
          "type": "object"
        },
        "site": {
          "additionalProperties": false,
          "properties": {
            "cookiePolicyUri": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "privacyPolicyUri": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "url",
            "privacyPolicyUri",
            "cookiePolicyUri"
          ],
          "type": "object"
        },
        "socialNetworks": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "company": {
                "type": "string"
              }
            },
            "required": [
              "company"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "storage": {
          "additionalProperties": false,
          "properties": {
            "durate": {
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "required": [
        "id",
        "site",
        "company",
        "privacyAdmin",
        "collectedData"
      ],
      "type": "object"
    }
  }
}
