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

definitions:
  VnfIndicatorValueChangeNotification:
    description: >
      This type represents a VNF indicator value change notification.
      *   NOTE:	ETSI GS NFV-SOL 001 specifies the structure and
                format of the VNFD based on TOSCA specifications.
    type: object
    required:
      - id
      - notificationType
      - subscriptionId
      - timeStamp
      - vnfIndicatorId
      - value
      - vnfInstanceId
      - _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: '../../General_Definitions/SOL002_def.yaml#/definitions/Identifier'
      notificationType:
        description: >
          Discriminator for the different notification types.
          Shall be set to "VnfIndicatorValueChangeNotification" for this notification type.
        type: string
      subscriptionId:
        description: >
          Identifier of the subscription that this notification relates to. 
        $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/Identifier'
      timeStamp:
        description: >
          Date-time of the generation of the notification.
        $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/DateTime'
      vnfIndicatorId:
        description: >
          Identifier of the VNF indicator whose value has changed. 
        $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IdentifierInVnfd'
      name:
        description: >
          Human readable name of the VNF indicator. Shall be present if defined in the VNFD.
        type: string
      value:
        description: >
          Provides the value of the VNF indicator. The value format is defined in the VNFD.
          See note.
        type: object
      vnfInstanceId:
        description: >
          Identifier of the VNF instance which provides the indicator value.                 
        $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/Identifier'
      _links:
        description: >
          Links to resources related to this resource.
        type: object
        required:
          - vnfInstance
          - subscription
        properties:
          # LEH this must be reported as strong candidate for removal.
          vnfInstance:
            description: >
              Link to the related "Individual VNF instance" resource.
            $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/Link'
          subscription:
            description: >
              Link to the related subscription.
            $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/Link'

  SupportedIndicatorsChangeNotification:
    description: |
      This type represents a notification to inform the receiver that the set of indicators
      supported by a VNF instance has changed.
      *   NOTE:	ETSI GS NFV-SOL 001 specifies the structure and
                format of the VNFD based on TOSCA specifications.
    type: object
    required:
      - id
      - notificationType
      - subscriptionId
      - timeStamp
      - vnfInstanceId
    properties:
      id:
        descriptions: |
          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: '../../General_Definitions/SOL002_def.yaml#/definitions/Identifier'
      notificationType:
        description: |
          Discriminator for the different notification types. Shall be set to "SupportedIndicatorsChangeNotification"
          for this notification type.
        type: string
      subscriptionId:
        description: |
          Identifier of the subscription that this notification relates to.
        $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/Identifier'
      timeStamp:
        description: |
          Date-time of the generation of the notification.
        $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/DateTime'
      vnfInstanceId:
        description: |
          Identifier of the VNF instance which provides the indicator value.
        $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/Identifier'
      supportedIndicators:
        description: |
          Set of VNF indicators supported by the VNF instance.
        type: array
        items:
          type: object
          required:
            - vnfIndicatorId
          properties:
            vnfIndicatorId:
              description: |
                Identifier of the VNF indicator whose value has changed.
              $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/IdentifierInVnf'
            name:
              description: |
                Human readable name of the VNF indicator. Shall be present if defined in the VNFD.
                See note.
              type: string
      _links:
        description: |
          Links for this resource.
        type: object
        required:
          - subscription
        properties:
          vnfInstance:
            description: |
              Link to the related "Individual VNF instance" resource. Shall be present if the VNF instance information
              is accessible as a resource.
            $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/NotificationLink'
          subscription:
            description: |
              Link to the related subscription.
            $ref: '../../General_Definitions/SOL002_def.yaml#/definitions/NotificationLink'