{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectsgrid.com/.well-known/objects-catalog/ProgramMembership/v1/schema.json",
  "title": "ProgramMembership",
  "description": "Objects Grid ProgramMembership Object. A member's membership of a program: a gym, a club, a subscription with a member card. A private record: it has no JSON-LD document. Modeled in compliance with https://schema.org/ProgramMembership; validFrom, validThrough and memberTier are ObjectsGrid's own fields.",
  "x-objectsgrid-jsonLd": false,
  "type": "object",
  "properties": {
    "at_context": {
      "description": "Schema context",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "https://schema.org"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_type": {
      "description": "The object type",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "ProgramMembership"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "at_id": {
      "description": "This ProgramMembership's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>: its JSON-LD @id, which References point to. Set by the service.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "description": "The unique identifier for ProgramMembership. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "identifier": {
      "description": "The unique identifier for ProgramMembership. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 50,
      "readOnly": true
    },
    "url": {
      "description": "This ProgramMembership URL. Assigned by the server.",
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "minLength": 1,
      "readOnly": true
    },
    "member": {
      "x-objectsgrid-erasure": "keep",
      "description": "The member: a Person or Organization",
      "x-objectsgrid-rangeIncludes": [
        "Person",
        "Organization"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "hostingOrganization": {
      "description": "Who runs the program: an Organization, or a local business (Place)",
      "x-objectsgrid-rangeIncludes": [
        "Organization",
        "Place"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "program": {
      "description": "The program, when it is a MemberProgram",
      "x-objectsgrid-rangeIncludes": [
        "MemberProgram"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "programName": {
      "description": "The program's name, when it has no MemberProgram",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/LanguageTaggedString/v1/schema.json"
      }
    },
    "memberTier": {
      "description": "The member's tier. ObjectsGrid's own field.",
      "x-objectsgrid-rangeIncludes": [
        "MemberProgramTier"
      ],
      "anyOf": [
        {
          "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Reference/v1/schema.json"
        },
        {
          "type": "null"
        }
      ]
    },
    "membershipNumber": {
      "description": "The member's number, e.g. on the member card",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100
    },
    "membershipPointsEarned": {
      "description": "The points the member has earned",
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "validFrom": {
      "description": "When the membership starts. ObjectsGrid's own field.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "validThrough": {
      "description": "When the membership ends. ObjectsGrid's own field.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "tags": {
      "description": "Tags an ABAC policy can decide on. A name may repeat; the same name and value appear once. Every stored object has them: created empty when not sent, kept by a replacement (PUT) that does not mention them, unchanged by a patch that does not mention them, cleared by null or [].",
      "type": "array",
      "default": [],
      "uniqueItems": true,
      "maxItems": 50,
      "items": {
        "$ref": "https://objectsgrid.com/.well-known/objects-catalog/Tag/v1/schema.json"
      }
    },
    "meta": {
      "description": "System-managed metadata for the object (version, audit fields). Assigned by the server.",
      "$ref": "https://objectsgrid.com/.well-known/objects-catalog/ObjectMeta/v1/schema.json",
      "readOnly": true
    },
    "checkIns": {
      "description": "Its check-ins. Computed, read-only: the objects whose CheckInAction.object points to this object, listed from that type; never stored or written. ObjectsGrid's, beyond Schema.org: attendance as a list; left out of JSON-LD documents.",
      "x-objectsgrid-inverseOf": "CheckInAction.object",
      "readOnly": true,
      "x-objectsgrid-extension": true
    }
  },
  "required": [
    "member"
  ],
  "unevaluatedProperties": false
}
