title: Availability
x-tags:
  - Catalog
type: object
description: Controls the availability of an associated catalog model.
required:
  - available
  - validity
  - permitted_services
  - permitted_touch_points
  - schedule
  - outlet_unavailability_entries
properties:
  available:
    type: boolean
    description: |-
      Indicates if the associated catalog model is available.

      A value of `false` essentially acts as a "kill-switch".
  validity:
    allOf:
      - $ref: ./Validity.yaml
      - type: object
        required:
          - start
          - end
  permitted_services:
    type: array
    description: The service types that the associated catalog model is available with.
    items:
      $ref: ./ServiceType.yaml
  permitted_touch_points:
    type: array
    description: The touch points that the associated catalog model is available with.
    items:
      $ref: ./TouchPoint.yaml
  schedule:
    type:
      - string
      - 'null'
    format: uuid
    description: 'The uuid of the schedule associated with the availability, if any.'
  outlet_unavailability_entries:
    type: array
    description: |-
      The outlet-specific unavailability, regardless of whether `available` is true.

      Expired entries are omitted. Perpetual entries and entries whose `until` value is in the future are returned.
    items:
      $ref: ./OutletUnavailability.yaml
