openapi: 3.0.0

info:
  title: SEALDD Server Data Storage Service
  version: 1.0.0-alpha.3
  description: |
    SEALDD Server Data Storage Service.  
    © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.548 V1.1.0; Service Enabler Architecture Layer for Verticals (SEAL);
    SEAL Data Delivery (SEALDD) Server Services; Stage 3.
  url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.548/

servers:
  - url: '{apiRoot}/sdd-ds/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 6.5 of 3GPP TS 29.549

security:
  - {}
  - oAuth2ClientCredentials: []

paths:
  /storages:
    get:
      summary: Retrieve one or several existing Individual Data Storage resource(s).
      operationId: GetDataStorages
      tags:
        - Data Storages (Collection)
      parameters:
        - name: storage-ids
          in: query
          description: Contains the identifier(s) of the targeted Data Storage resource(s).
          required: false
          schema:
            type: array
            items:
              type: string
            minItems: 1
        - name: supp-feats
          in: query
          description: Contains the list of supported features.
          required: false
          schema:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      responses:
        '200':
          description: >
            OK. The requested Individual Data Storage resource shall be returned.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DataStorage'
                minItems: 0
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    post:
      summary: Request the creation of a Data Storage.
      operationId: CreateDataStorage
      tags:
        - Data Storages (Collection)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataStorageReq'
      responses:
        '201':
          description: >
            Created. The Data Storage is successfully created and a representation of the created
            Individual Data Storage resource shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataStorage'
          headers:
            Location:
              description: >
                Contains the URI of the created Individual Data Storage resource.
              required: true
              schema:
                type: string
        '200':
          description: >
            OK. The Data Storage resource is successfully reserved and Data Storage resource
            reservation related information shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservRespData'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'
      callbacks:
        DataMngtNotif:
          '{$request.body#/notifUri}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/DataMngtNotif'
              responses:
                '204':
                  description: >
                    No Content. The Data Management and or Status Information Notification is
                    successfully received and acknowledged.
                '307':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/307'
                '308':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/308'
                '400':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/400'
                '401':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/401'
                '403':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/403'
                '404':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/404'
                '411':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/411'
                '413':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/413'
                '415':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/415'
                '429':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/429'
                '500':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/500'
                '503':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/503'
                default:
                  $ref: 'TS29122_CommonData.yaml#/components/responses/default'

  /storages/{storageId}:
    parameters:
      - name: storageId
        in: path
        description: >
          Represents the identifier of the Individual Data Storage resource.
        required: true
        schema:
          type: string

    get:
      summary: Retrieve an existing Individual Data Storage resource.
      operationId: GetIndDataStorage
      tags:
        - Individual Data Storage (Document)
      responses:
        '200':
          description: >
            OK. The requested Individual Data Storage resource shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataStorage'
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    put:
      summary: Request the update of an existing Individual Data Storage resource.
      operationId: UpdateIndDataStorage
      tags:
        - Individual Data Storage (Document)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataStorage'
      responses:
        '200':
          description: >
            OK. The Individual Data Storage resource is successfully updated and a representation
            of the updated resource shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataStorage'
        '204':
          description: >
            No Content. The Individual Data Storage resource is successfully updated and no content
            is returned in the response body.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    patch:
      summary: Request the modification of an existing Individual Data Storage resource.
      operationId: ModifyIndDataStorage
      tags:
        - Individual Data Storage (Document)
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/DataStoragePatch'
      responses:
        '200':
          description: >
            OK. The Individual Data Storage resource is successfully modified and a representation
            of the updated resource shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataStorage'
        '204':
          description: >
            No Content. The Individual Data Storage resource is successfully modified and no content
            is returned in the response body.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    delete:
      summary: Request the deletion of an existing Individual Data Storage resource.
      operationId: DeleteIndDataStorage
      tags:
        - Individual Data Storage (Document)
      responses:
        '204':
          description: >
            No Content. The Individual Data Storage resource is successfully deleted.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

  /subscriptions:
    post:
      summary: Request the creation of a Data Storage Delivery Subscription.
      operationId: CreateDataDelSubsc
      tags:
        - Data Storage Delivery Subscriptions (Collection)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataDelSubsc'
      responses:
        '201':
          description: >
            Created. The Data Storage Delivery Subscription is successfully created and a
            representation of the created Individual Data Storage Delivery Subscription resource
            shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataDelSubsc'
          headers:
            Location:
              description: >
                Contains the URI of the created Individual Data Storage Delivery Subscription
                resource.
              required: true
              schema:
                type: string
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'
      callbacks:
        DataDelNotif:
          '{$request.body#/notifUri}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/DataDelNotif'
              responses:
                '204':
                  description: >
                    No Content. The Data Storage Delivery Notification is successfully received
                    and acknowledged.
                '307':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/307'
                '308':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/308'
                '400':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/400'
                '401':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/401'
                '403':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/403'
                '404':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/404'
                '411':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/411'
                '413':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/413'
                '415':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/415'
                '429':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/429'
                '500':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/500'
                '503':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/503'
                default:
                  $ref: 'TS29122_CommonData.yaml#/components/responses/default'

  /subscriptions/{subscriptionId}:
    parameters:
      - name: subscriptionId
        in: path
        description: >
          Represents the identifier of the Individual Data Storage Delivery Subscription resource.
          resource.
        required: true
        schema:
          type: string

    get:
      summary: Retrieve an existing Individual Data Storage Delivery Subscription resource.
      operationId: GetIndDataDelSubsc
      tags:
        - Individual Data Storage Delivery Subscription (Document)
      responses:
        '200':
          description: >
            OK. The requested Individual Data Storage Delivery Subscription resource shall be
            returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataDelSubsc'
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    put:
      summary: Request the update of an existing Individual Data Storage Delivery Subscription resource.
      operationId: UpdateIndDataDelSubsc
      tags:
        - Individual Data Storage Delivery Subscription (Document)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataDelSubsc'
      responses:
        '200':
          description: >
            OK. The Individual Data Storage Delivery Subscription resource is successfully
            updated and a representation of the updated resource shall be returned in the
            response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataDelSubsc'
        '204':
          description: >
            No Content. The Individual Data Storage Delivery Subscription resource is successfully
            updated and no content is returned in the response body.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    patch:
      summary: Request the modification of an existing Individual Data Storage Delivery Subscription resource.
      operationId: ModifyIndDataDelSubsc
      tags:
        - Individual Data Storage Delivery Subscription (Document)
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/DataDelSubscPatch'
      responses:
        '200':
          description: >
            OK. The Individual Data Storage Delivery Subscription resource is successfully modified
            and a representation of the updated resource shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataDelSubsc'
        '204':
          description: >
            No Content. The Individual Data Storage Delivery Subscription resource is successfully
            modified and no content is returned in the response body.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

    delete:
      summary: Request the deletion of an existing Individual Data Storage Delivery Subscription resource.
      operationId: DeleteIndDataDelSubsc
      tags:
        - Individual Data Storage Delivery Subscription (Document)
      responses:
        '204':
          description: >
            No Content. The Individual Data Storage Delivery Subscription resource is successfully
            deleted.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

  /request-del:
    post:
      summary: Enables a service consumer to request SEALDD data storage delivery.
      operationId: DataDeliveryRequest
      tags:
        - SEALDD Data Storage Delivery Request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataDelReq'
      responses:
        '204':
          description: >
            No Content. The SEALDD Data Storage delivery request is successfully received and
            processed.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

  /establish-del-conn:
    post:
      summary: Enables a service consumer to request SEALDD data storage delivery connection establishment.
      operationId: EstablishDelConn
      tags:
        - SEALDD Data Storage Delivery Connection Establishment Request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DelConnEstabReq'
      responses:
        '200':
          description: >
            OK. The SEALDD Data Storage delivery connection establishment request is successfully
            received and processed, and SEALDD Data Storage delivery connection establishment
            related information shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelConnEstabResp'
        '204':
          description: >
            No Content. The SEALDD Data Storage delivery connection establishment request is
            successfully received and processed.
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'


components:
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: '{tokenUrl}'
          scopes: {}

  schemas:

#
# STRUCTURED DATA TYPES
#

    DataStorage:
      description: >
        Represents a SEALDD Data Storage.
      type: object
      properties:
        data:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Bytes'
        ctrlPolicies:
          type: array
          items:
            $ref: '#/components/schemas/AccessCtrlPolicy'
          minItems: 1
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTime'
        mngtSubsc:
          $ref: '#/components/schemas/DataMngtSubsc'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - data

    ReservReqData:
      description: >
        Represents a Data Storage reservation request.
      type: object
      properties:
        valServiceId:
          type: string
        dataLength:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - valServiceId

    ReservRespData:
      description: >
        Represents a Data Storage reservation response.
      type: object
      properties:
        resourceAddr:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
      required:
        - resourceAddr

    DataStoragePatch:
      description: >
        Represents the requested modifications to a SEALDD Data Storage.
      type: object
      properties:
        data:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Bytes'
        ctrlPolicies:
          type: array
          items:
            $ref: '#/components/schemas/AccessCtrlPolicy'
          minItems: 1
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTime'
        mngtSubsc:
          $ref: '#/components/schemas/DataMngtSubsc'

    AccessCtrlPolicy:
      description: >
        Represents the data access control policy.
      type: object
      properties:
        entityName:
          $ref: '#/components/schemas/EntityName'
        entityId:
          type: string
        rights:
          type: array
          items:
            $ref: '#/components/schemas/DataAccessRight'
          minItems: 1
      required:
        - rights
      anyOf:
        - required: [entityName]
        - required: [entityId]

    DataMngtSubsc:
      description: >
        Represents the stored data management and/or status information subscription related
        information.
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/DataMngtEvent'
          minItems: 1
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        repPeriodicity:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DurationSec'
      required:
        - events
        - notifUri

    DataMngtNotif:
      description: >
        Represents a SEALDD Data Management and/or Status Information Notification.
      type: object
      properties:
        storageId:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/DataMngtEvent'
          minItems: 1
        accessStats:
          $ref: '#/components/schemas/DataAccessStats'
        mngtStats:
          $ref: '#/components/schemas/DataMngtStats'
      required:
        - storageId
        - events
      anyOf:
        - required: [accessStats]
        - required: [mngtStats]

    DataAccessStats:
      description: >
        Represents data access statistics.
      type: object
      properties:
        genAccessStats:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        detAccessStats:
          type: object
          additionalProperties:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
          minProperties: 1
          description: >
            Represents the data access statistics of the stored data detailed per consumer SEALDD
            entity. It contains how many times the stored data was accessed (i.e., retrieved or
            updated) per SEALDD entity.
            The key of the map shall be the name of the SEALDD entity, encoded using the EntityName
            data type as specified in clause 6.2.6.3.3, to which the data access statistics provided
            within the map value are
            related.
      anyOf:
        - required: [genAccessStats]
        - required: [detAccessStats]

    DataMngtStats:
      description: >
        Represents data management statistics.
      type: object
      properties:
        genMngtStats:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        detMngtStats:
          type: object
          additionalProperties:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
          minProperties: 1
          description: >
            Represents the data management statistics of the stored data detailed per consumer
            SEALDD entity. It contains how many times the stored data was accessed for management
            purposes (i.e., data update) per SEALDD entity.
            The key of the map shall be the name of the SEALDD entity, encoded using the EntityName
            data type as specified in clause 6.2.6.3.3, to which the data management statistics
            provided within the map value are related.
      anyOf:
        - required: [genMngtStats]
        - required: [detMngtStats]

    DataDelSubsc:
      description: >
        Represents a SEALDD Data Storage Delivery Subscription.
      type: object
      properties:
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTimeRo'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - notifUri

    DataDelSubscPatch:
      description: >
        Represents the requested modification to a SEALDD Data Storage Delivery Subscription.
      type: object
      properties:
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'

    DataDelNotif:
      description: >
        Represents a SEALDD Data Storage Delivery Notification.
      type: object
      properties:
        data:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Bytes'
        storageId:
          type: string
      oneOf:
        - required: [data]
        - required: [storageId]

    DataDelReq:
      description: >
        Represents a SEALDD Data Storage Delivery request.
      type: object
      properties:
        targetId:
          type: string
        sealddServId:
          type: string
        storageId:
          type: string
        data:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Bytes'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - targetId
      oneOf:
        - required: [data]
        - required: [storageId]

    DelConnEstabReq:
      description: >
        Represents a SEALDD Data Storage Delivery connection establishment request.
      type: object
      properties:
        targetId:
          type: string
        ddServerConnInfo:
          $ref: 'TS29548_SDD_Transmission.yaml#/components/schemas/ConnInfo'
        transProtoc:
          $ref: 'TS29558_Eees_EASRegistration.yaml#/components/schemas/TransportProtocol'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - targetId

    DelConnEstabResp:
      description: >
        Represents the response to a SEALDD Data Storage Delivery connection establishment request.
      type: object
      properties:
        ddServerConnInfo:
          $ref: 'TS29548_SDD_Transmission.yaml#/components/schemas/ConnInfo'
        transProtoc:
          $ref: 'TS29558_Eees_EASRegistration.yaml#/components/schemas/TransportProtocol'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'


# SIMPLE DATA TYPES
#

#
# ENUMERATIONS
#

    EntityName:
      anyOf:
        - type: string
          enum:
          - SEALDD_SERVER
          - SEALDD_CLIENT
          - VAL_SERVER
        - type: string
          description: >
            This string provides forward-compatibility with future extensions to the enumeration
            and is not used to encode content defined in the present version of this API.
      description: |
        Represents the name of a SEALDD entity.  
        Possible values are:
        - SEALDD_SERVER: Indicates the SEALDD Server.
        - SEALDD_CLIENT: Indicates the SEALDD Client.
        - VAL_SERVER: Indicates the VAL Server.

    DataAccessRight:
      anyOf:
        - type: string
          enum:
          - RETRIEVE
          - UPDATE
          - DELETE
        - type: string
          description: >
            This string provides forward-compatibility with future extensions to the enumeration
            and is not used to encode content defined in the present version of this API.
      description: |
        Represents the data access rights.  
        Possible values are:
        - RETRIEVE: Indicates that the access right is data storage retrieval.
        - UPDATE: Indicates that the access right is data storage update.
        - DELETE: Indicates that the access right is data storage deletion.

    DataMngtEvent:
      anyOf:
        - type: string
          enum:
          - DATA_ACCESS_STATISTICS
          - DATA_MNGT_STATISTICS
        - type: string
          description: >
            This string provides forward-compatibility with future extensions to the enumeration
            and is not used to encode content defined in the present version of this API.
      description: |
        Represents the Data Management and (or) Status Information events.  
        Possible values are:
        - DATA_ACCESS_STATISTICS: Indicates that the Data Management Event is data access statistics
          (i.e., how often the stored data is accessed).
        - DATA_MNGT_STATISTICS: Indicates that the Data Management Event is data management
          statistics (i.e., how often the stored data is managed).


# Data types describing alternative data types or combinations of data types:
#

    DataStorageReq:
      description: Represents a SEALDD Data Storage creation or reservation request.
      oneOf:
        - $ref: '#/components/schemas/DataStorage'
        - $ref: '#/components/schemas/ReservReqData'
