# Copyright (c) ETSI 2017.
# https://forge.etsi.org/etsi-forge-copyright-notice.txt

definitions:
  VrQuotaAvailNotification:
    description: >
      This type represents a notification which indicates the availability of
      a quota applicable to the consumer.
      Support of this notification is mandatory if the
      Virtualised Resources Quota Available Notification interface is
      supported.
      The notification shall be triggered by the NFVO when a virtualised
      resource quota applicable to the consumer has been set.
    type: object
    required:
      - id
      - notificationType
      - subscriptionId
      - timeStamp
      - resourceGroupId
      - _links
    properties:
      id:
        description: >
          Identifier of this notification. If a notification is sent multiple
          times due to multiple subscriptions, the "id" attribute of all these
          notifications shall have the same value.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
      notificationType:
        description: >
          Discriminator for the different notification types. 
          Shall be set to "VrQuotaAvailNotification" for this notification type.
        type: string
        enum:
          - VrQuotaAvailNotification
      subscriptionId:
        description: >
          Identifier of the subscription that this notification relates to.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
      timeStamp:
        description: >
          Date-time of the generation of the notification.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/DateTime"
      resourceGroupId:
        description: >
          Identifier of the "infrastructure resource group", logical grouping
          of virtual resources assigned to a tenant within an Infrastructure
          Domain.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/IdentifierInVim"
      vimConnectionInfo:
        description: >
          Information about the VIM connection to manage the virtualised
          resources quota. 
          This attribute shall only be supported and present when VNF-related
          Resource Management in direct mode is applicable.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/VimConnectionInfo"
      resourceProviderId:
        description: >
          Identifies the entity responsible for the management of the
          virtualised resources quota.
          This attribute shall only be supported and present when
          VNF-related Resource Management in indirect mode is applicable. The
          identification scheme is outside the scope of the present document.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/Identifier"
      _links:
        description: >
          Links to resources related to this notification.
        $ref: "#/definitions/QuotaAvailLinks"

  QuotaAvailLinks:
    description: >
      This type represents the links to resources that a notification of type
      "VrQuotaAvailNotification" can contain.
    type: object
    required:
      - subscription
    properties:
      subscription:
        description: >
          Link to the related subscription.
        $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/NotificationLink"




