{
  "$schema" : "https://json-schema.org/draft/2019-09/schema#",
  "$id" : "https://purl.imsglobal.org/spec/orrostering/v1p2/schema/json/orrostering_v1p2_demographicsset-jsonschema1.json",
  "title" : "JSON Schema for the DemographicsSet class.",
  "description" : "This is the container for a collection of demographics instances for a message payload. This may be empty if no instances are found that sustain the applied query constraints. The order is not significant.",
  "type" : "object",
  "properties" : {
    "demographics" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/Demographics"
      }
    }
  },
  "required" : [ ],
  "additionalProperties" : false,
  "$defs" : {
    "Demographics" : {
      "description" : "Demographics information is taken from the Common Educational Data Standards (CEDS) from the US government (http://ceds.ed.gov). Note that demographics data is held in its own service, and that access to this service is considered privileged. Not all consumer keys will be able to request demographics data. NOTE that the sourcedId used to retrieve the demographics data MUST be the same as the sourcedId of the User i.e. the owner of the demographics data.",
      "type" : "object",
      "properties" : {
        "sourcedId" : {
          "description" : "The sourcedId of the object. All objects MUST be identified by a Source Identifier. This is an interoperability System ID for an object. This is the identifier that SYSTEMS will refer to when making API calls, or when needing to identify an object. It is RECOMMENDED that systems are able to map whichever local ids (e.g. database key fields) they use to SourcedId. The sourcedId of an object is considered an addressable property of an entity and as such will not be treated as Personally Identifiable Information (PII) by certified products. Therefore, as a part of certification, vendors will be required to declare that they will notify customers via documentation or other formal and documented agreement that sourcedIds should never contain PII in general. The sourcedId used to retrieve the demographics data MUST be the same as the sourcedId of the User i.e. the owner of the demographics data.",
          "$comment" : "Origin: SourcedId (DerivedType); The data-type for establishing a Unique Identifier. There is no predefined structure for the identifier and the scope MUST NOT assume globally uniqueness.",
          "type" : "string"
        },
        "status" : {
          "description" : "All objects MUST BE either 'active' or 'tobedeleted'. Something which is flagged 'tobedeleted' is to be considered safe to delete. Systems can delete records that are flagged as such if they wish, but they are not under any compulsion to do so. In v1.1 the enumeration value of 'inactive' was removed and so for backwards compatibility all such marked objects should be interpreted as 'tobedeleted'.",
          "$comment" : "Origin: BaseStatusEnum (Enumeration); The set of permitted values for the type of status of a record. ",
          "type" : "string",
          "enum" : [ "active", "tobedeleted" ]
        },
        "dateLastModified" : {
          "description" : "All objects MUST be annotated with the dateTime upon which they were last modified. This enables requesters to query for just the latest objects. DateTimes MUST be expressed in the format 'YYYY-MM-DDThh:mm:ss.sssZ' [ISO 8601].",
          "$comment" : "Origin: DateTime (PrimitiveType)",
          "type" : "string",
          "format" : "date-time"
        },
        "birthDate" : {
          "description" : "The date of birth. The format is [ISO 8601] of 'YYYY-MM-DD'.",
          "$comment" : "Origin: Date (PrimitiveType)",
          "type" : "string",
          "format" : "date"
        },
        "sex" : {
          "description" : "The sex of the individual. The permitted values are from an enumerated list.",
          "$comment" : "Origin: GenderEnumExt (Union); The data-type for the 'gender' characteristic for a user. This is an extensible enumerated vocabulary. Extending the vocabulary makes use of a naming convention.",
          "oneOf" : [ {
            "type" : "string",
            "enum" : [ "male", "female", "unspecified", "other" ]
          }, {
            "type" : "string",
            "pattern" : "(ext:)[a-zA-Z0-9\\.\\-_]+"
          } ]
        },
        "americanIndianOrAlaskaNative" : {
          "description" : "Identification of whether or not the user is an American Indian or Alaska Native ethnicity.",
          "$comment" : "Origin: TrueFalseEnum (Enumeration); This enumeration is used to limit the permitted tokens for a Boolean data-type to values of 'true' or 'false' ONLY.",
          "type" : "string",
          "enum" : [ "true", "false" ]
        },
        "asian" : {
          "description" : "Identification of whether or not the user is of Asian ethnicity.",
          "$comment" : "Origin: TrueFalseEnum (Enumeration); This enumeration is used to limit the permitted tokens for a Boolean data-type to values of 'true' or 'false' ONLY.",
          "type" : "string",
          "enum" : [ "true", "false" ]
        },
        "blackOrAfricanAmerican" : {
          "description" : "Identification of whether or not the user is black or African American ethnicity.",
          "$comment" : "Origin: TrueFalseEnum (Enumeration); This enumeration is used to limit the permitted tokens for a Boolean data-type to values of 'true' or 'false' ONLY.",
          "type" : "string",
          "enum" : [ "true", "false" ]
        },
        "nativeHawaiianOrOtherPacificIslander" : {
          "description" : "Identification of whether or not the user is Native Hawaiian or Other Pacific Islander ethnicity.",
          "$comment" : "Origin: TrueFalseEnum (Enumeration); This enumeration is used to limit the permitted tokens for a Boolean data-type to values of 'true' or 'false' ONLY.",
          "type" : "string",
          "enum" : [ "true", "false" ]
        },
        "white" : {
          "description" : "Identification of whether or not the user is of white ethnicity.",
          "$comment" : "Origin: TrueFalseEnum (Enumeration); This enumeration is used to limit the permitted tokens for a Boolean data-type to values of 'true' or 'false' ONLY.",
          "type" : "string",
          "enum" : [ "true", "false" ]
        },
        "demographicRaceTwoOrMoreRaces" : {
          "description" : "Identification of whether or not the user has a demographic of two or more race ethnicities.",
          "$comment" : "Origin: TrueFalseEnum (Enumeration); This enumeration is used to limit the permitted tokens for a Boolean data-type to values of 'true' or 'false' ONLY.",
          "type" : "string",
          "enum" : [ "true", "false" ]
        },
        "hispanicOrLatinoEthnicity" : {
          "description" : "Identification of whether or not the user is Hispanic or of Latino ethnicity.",
          "$comment" : "Origin: TrueFalseEnum (Enumeration); This enumeration is used to limit the permitted tokens for a Boolean data-type to values of 'true' or 'false' ONLY.",
          "type" : "string",
          "enum" : [ "true", "false" ]
        },
        "countryOfBirthCode" : {
          "description" : "The country of birth code. The permitted vocabulary should be defined as part of the adoption and deployment process. See the Implementation Guide [OR-IMPL-12] for more details on how to define/use such a vocabulary.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "stateOfBirthAbbreviation" : {
          "description" : "The abbreviation for the name of the state (within the United States) or extra-state jurisdiction in which a person was born. The permitted vocabulary should be defined as part of the adoption and deployment process. See the Implementation Guide [OR-IMPL-12] for more details on how to define/use such a vocabulary.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "cityOfBirth" : {
          "description" : "The name of the city in which the user was born.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "publicSchoolResidenceStatus" : {
          "description" : "An indication of the location of a person's legal residence relative to (within or outside) the boundaries of the public school attended and its administrative unit. The permitted vocabulary should be defined as part of the adoption and deployment process. See the Implementation Guide [OR-IMPL-12] for more details on how to define/use such a vocabulary.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "metadata" : {
          "$ref" : "#/$defs/MetadataGeneral"
        }
      },
      "required" : [ "sourcedId", "status", "dateLastModified" ],
      "additionalProperties" : false
    },
    "MetadataGeneral" : {
      "description" : "The container for the proprietary extensions.",
      "type" : "object",
      "properties" : { },
      "required" : [ ],
      "additionalProperties" : true
    }
  }
}