openapi: '3.0.3'

servers:
  - url: http:/simulation-hub-test.fva-service.de/

info:
  title: 'FVA Simulation Hub'
  description: The FVA Simulation Hub is a web service that provides the functions of the FVA Workbench in a network.
  version: '1.0.0-SNAPSHOT'

paths:

  /actuator/health:
    get:
      summary: Returns the current execution status of the application.
      operationId: actuatorHealth
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/HealthResponse'
        '401':
          description: Unauthorized

  /actuator/info:
    get:
      summary: Provides various information about the application.
      operationId: actuatorInfo
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/InfoResponse'
        '401':
          description: Unauthorized

  /api/1.0/auth/login:
    post:
      summary: Enables authentication towards the application.
      operationId: login
      requestBody:
        content:
          'application/json':
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/simulate-work/create:
    post:
      summary: Simulates work by blocking a workbench for a certain period of time.
      operationId: workbenchTaskSimulateWorkCreate
      requestBody:
        content:
          'application/json':
            schema:
              $ref: '#/components/schemas/SimulateWorkRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/SimulateWorkResponse'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '423':
          description: 'Locked: The requested resource is currently locked.'
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/simulate-work/{taskId}/result:
    get:
      summary: Query of results for a previous simulate work request.
      operationId: workbenchTaskSimulateWorkResult
      parameters:
        - $ref: '#/components/parameters/taskId'
        - $ref: '#/components/parameters/timeout'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/SimulateWorkResponse'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/execute-batch-job/create:
    post:
      summary: Executes a batch job with a workbench.
      operationId: workbenchTaskExecuteBatchJobCreate
      requestBody:
        content:
          'application/json':
            schema:
              $ref: '#/components/schemas/ExecuteBatchJobRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/ExecuteBatchJobResponse'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '423':
          description: 'Locked: The requested resource is currently locked.'
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/execute-batch-job/{taskId}/result:
    get:
      summary: Query of results for a previous execute batch job request.
      operationId: workbenchTaskExecuteBatchJobResult
      parameters:
        - $ref: '#/components/parameters/taskId'
        - $ref: '#/components/parameters/timeout'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/ExecuteBatchJobResponse'
        '201':
          description: Created
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/list:
    get:
      summary: Returns a paged list of information about all tasks.
      operationId: workbenchTaskList
      parameters:
        - $ref: '#/components/parameters/paging-page'
        - $ref: '#/components/parameters/paging-size'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchTaskPage'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/list/running:
    get:
      summary: Provides a paged list of information about all tasks currently running.
      operationId: workbenchTaskListRunning
      parameters:
        - $ref: '#/components/parameters/paging-page'
        - $ref: '#/components/parameters/paging-size'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchTaskPage'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/list/waiting:
    get:
      summary: Returns a paged list of information about all tasks that are in the queue.
      operationId: workbenchTaskListWaiting
      parameters:
        - $ref: '#/components/parameters/paging-page'
        - $ref: '#/components/parameters/paging-size'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchTaskPage'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/{taskId}:
    get:
      summary: Provides information about a task.
      operationId: workbenchTask
      parameters:
        - $ref: '#/components/parameters/taskId'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchTask'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/task/{taskId}/cancel:
    delete:
      summary: Cancels the execution of a task and deletes it from the queue.
      operationId: workbenchTaskCancel
      parameters:
        - $ref: '#/components/parameters/taskId'
      responses:
        '204':
          description: 'No Content: OK'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '409':
          description: 'Conflict: Task could not be canceled.'
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/node/instance/list:
    get:
      summary: Returns a paged list of information about all FVA Workbench instances.
      operationId: workbenchNodeInstanceList
      parameters:
        - $ref: '#/components/parameters/paging-page'
        - $ref: '#/components/parameters/paging-size'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchInstancePage'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/node/instance/{nodeId}:
    get:
      summary: Provides information about an FVA Workbench instance.
      operationId: workbenchInstance
      parameters:
        - $ref: '#/components/parameters/nodeId'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchInstance'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/node/instance/{nodeId}/start:
    patch:
      summary: Starts running an FVA Workbench instance.
      operationId: workbenchInstanceStart
      parameters:
        - $ref: '#/components/parameters/nodeId'
      responses:
        '202':
          description: Accepted
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: 'Internal Server Error: Unexpected processing error'
        '502':
          description: Bad Gateway

  /api/1.0/workbench/node/instance/{nodeId}/stop:
    patch:
      summary: Stops running a running FVA Workbench instance.
      operationId: workbenchInstanceStop
      parameters:
        - $ref: '#/components/parameters/nodeId'
      responses:
        '202':
          description: Accepted
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: 'Internal Server Error: Unexpected processing error'
        '502':
          description: Bad Gateway

  /api/1.0/workbench/node/server/list:
    get:
      summary: Returns a paged list of information about all connected FVA Simulation Hub instances.
      operationId: workbenchNodeServerList
      parameters:
        - $ref: '#/components/parameters/paging-page'
        - $ref: '#/components/parameters/paging-size'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchServerPage'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: 'Internal Server Error: Unexpected processing error'

  /api/1.0/workbench/node/server/{nodeId}:
    get:
      summary: Provides information about a connected FVA Simulation Hub instance.
      operationId: workbenchServer
      parameters:
        - $ref: '#/components/parameters/nodeId'
      responses:
        '200':
          description: OK
          content:
            'application/json':
              schema:
                $ref: '#/components/schemas/WorkbenchServer'
        '400':
          description: 'Bad Request: The parameters passed are not valid.'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '500':
          description: 'Internal Server Error: Unexpected processing error'

components:

  parameters:

    taskId:
      name: taskId
      in: path
      required: true
      description: The id of the task to retrieve.
      schema:
        type: string

    timeout:
      name: timeout
      in: query
      required: false
      description: The maximum time to wait for the task to finish in seconds (use the value 0 to get an immediate response)
      schema:
        type: integer

    nodeId:
      name: nodeId
      in: path
      required: true
      description: The id of the node to retrieve.
      schema:
          type: string

    paging-page:
      name: page
      in: query
      required: false
      description: The page to be returned.
      schema:
        type: integer

    paging-size:
      name: size
      in: query
      required: false
      description: The number of items to be returned.
      schema:
        type: integer

  schemas:

    HealthResponse:
      description: Model with the properties for the response of the health endpoint.
      type: object
      properties:
        status:
          description: The cumulative status of all components.
          type: string
          enum:
          - UP
          - DOWN
        components:
          description: A listing of all components that are included in the health status.
          $ref: '#/components/schemas/HealthComponents'

    HealthComponents:
      description: Model with the properties of all Health components.
      type: object
      properties:
        diskSpace:
          description: Information on checking for low disk space.
          $ref: '#/components/schemas/HealthDiskSpaceResponse'
        nodes:
          description: Information on checking for available FVA Workbench instances.
          $ref: '#/components/schemas/HealthNodesResponse'
        ping:
          description: Information about the availability of the application.
          $ref: '#/components/schemas/HealthPingResponse'

    HealthDiskSpaceResponse:
      description: Model with disk space check properties.
      type: object
      properties:
        status:
          description: The status of this component.
          type: string
          enum:
          - UP
          - DOWN
        details:
          description: Details about this component.
          $ref: '#/components/schemas/HealthDiskSpaceDetails'

    HealthDiskSpaceDetails:
      description: Model with the detailed properties to check for low disk space.
      type: object
      properties:
        total:
          description: Total available disk space in bytes.
          type: integer
          format: int64
        free:
          description: The free space on the disk in bytes.
          type: integer
          format: int64
        threshold:
          description: The difference between available and free disk space in bytes. With more than 10 megabytes of free hard disk space, the Statue UP.
          type: integer
          format: int64
        exists:
          description: Indicates whether the checked directory exists. By default, the installation directory is checked.
          type: boolean

    HealthNodesResponse:
      description: Model with the properties to check for available FVA Workbench instances.
      type: object
      properties:
        status:
          description: The status of this component.
          type: string
          enum:
          - UP
          - DOWN
        details:
          description: Details about this component.
          $ref: '#/components/schemas/HealthNodesDetails'

    HealthNodesDetails:
      description: Model with the detail properties to check for available FVA Workbench instances.
      type: object
      properties:
        totalInstances:
          description: The number of total instances.
          type: integer
          format: int64
        runningInstances:
          description: The number of running instances.
          type: integer
          format: int64

    HealthPingResponse:
      description: Model with the properties for checking the availability of the application.
      type: object
      properties:
        status:
          description: The status of this component.
          type: string
          enum:
          - UP
          - DOWN

    InfoResponse:
      description: Model with the properties for the response of the info endpoint.
      type: object
      properties:
        application:
          description: Information about the application.
          $ref: '#/components/schemas/InfoApplication'

    InfoApplication:
      description: Information about the application.
      type: object
      properties:
        name:
          description: The name of the application.
          type: string
          example: FVA Simulation Hub
        version:
          description: The version of the application.
          type: string
          example: 1.0.0
        revision:
          description: The revision number of the application.
          type: string
          example: 57685
        buildDate:
          description: The build date of the application.
          type: string
          example: 2022-05-27T13:50:08.523+0100
        vendor:
          description: The vendor of the application.
          type: string
          example: FVA GmbH

    LoginRequest:
      description: Model with the properties for the login.
      type: object
      required:
      - username
      - password
      properties:
        username:
          description: The username of the user.
          example: user1
          type: string
          minLength: 1
          maxLength: 2147483647
        password:
          description: The password of the user.
          example: password1
          type: string
          minLength: 1
          maxLength: 2147483647

    LoginResponse:
      description: Model with the properties for the response of the login.
      type: object
      required:
      - accessToken
      properties:
        accessToken:
          description: The access token for further requests.
          example: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyMiIsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9hcGkvMS4wL2F1d'
          type: string
          minLength: 1
          maxLength: 2147483647

    ExecuteBatchJobRequest:
      description: Model with the properties for the execution of a batch job.
      type: object
      required:
      - inputScripts
      properties:
        name:
          description: Name assigned to the request (to display in overviews).
          type: string
          minLength: 1
          maxLength: 2147483647
        classifiers:
          description: A list of classifiers for the request.
          $ref: '#/components/schemas/RequestClassifiers'
        additionalFiles:
          description: Additional files that can be referenced in the script files
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchBatchAdditionalFile'
        inputModel:
          description: The model file for the batch job
          $ref: '#/components/schemas/WorkbenchModelFile'
        inputModelReference:
          description: The model file for the batch job as a reference
          $ref: '#/components/schemas/WorkbenchModelReference'
        inputScripts:
          description: The script files to be executed in the batch job
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchScriptFile'
        variablesToInject:
          description: Freely definable variables that are provided in the script to be executed
          type: array
          items:
            $ref: '#/components/schemas/VariableToInject'

    ExecuteBatchJobResponse:
      description: Model with the properties for the response of a executed batch job.
      type: object
      properties:
        status:
          description: The execution status of the request.
          type: string
          enum:
          - WAITING
          - RUNNING
          - CANCELED
          - FINISHED
          - FAILED
        id:
          description: The identifier for later retrieval of the results
          type: string
          minLength: 1
          maxLength: 2147483647
        outputFiles:
          description: The files that were generated when the Workbench Batch job was executed.
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchBatchOutputFile'
        batchExecutionStatus:
          description: The result status of the batch execution.
          type: string
          enum:
          - OK
          - FAILED

    RequestClassifiers:
      description: A list of classifiers for the request.
      type: array
      items:
       $ref: '#/components/schemas/RequestClassifier'

    RequestClassifier:
      description: Request classifier
      type: object
      required:
      - type
      - value
      properties:
        type:
          description: The type of the classifier
          type: string
          enum:
          - VERSION
          - PRIORITY
          - LABELS
        value:
          description: The value of the classifier
          type: string
          minLength: 1
          maxLength: 2147483647

    SimulateWorkRequest:
      description: Model with the properties for the execution of a simulated job.
      type: object
      required:
      - duration
      properties:
        name:
          description: Name assigned to the request (to display in overviews).
          type: string
          minLength: 1
          maxLength: 2147483647
        classifiers:
          description: A list of classifiers for the request.
          $ref: '#/components/schemas/RequestClassifiers'
        duration:
          description: Duration of the simulated job in seconds
          type: integer
          format: int64
          minimum: 1
          maximum: 1000
          exclusiveMinimum: false
          exclusiveMaximum: false

    SimulateWorkResponse:
      description: Model with the properties for the response after running a simulated job.
      type: object
      properties:
        status:
          description: The execution status of the request.
          type: string
          enum:
          - WAITING
          - RUNNING
          - CANCELED
          - FINISHED
          - FAILED
        id:
          description: The identifier for later retrieval of the results
          type: string
          minLength: 1
          maxLength: 2147483647
        message:
          description: Information about the execution of the simulated job
          type: string

    VariableToInject:
      description: Freely definable variables that are provided in the script to be executed for the execution of a batch job.
      type: object
      required:
      - key
      - value
      properties:
        key:
          description: The name of the variable.
          type: string
          minLength: 1
          maxLength: 2147483647
        value:
          description: The value of the variable.
          type: string
          minLength: 1
          maxLength: 2147483647

    WorkbenchBatchAdditionalFile:
      description: Additional file for batch jobs of various types
      type: object
      required:
      - content
      - filename
      properties:
        content:
          description: The content of the file encoded with Base64
          type: string
          minLength: 1
          maxLength: 2147483647
        filename:
          description: The name of the file for referencing in the script files
          type: string
          minLength: 1
          maxLength: 255

    WorkbenchBatchOutputFile:
      description: A file that was generated during a workbench batch job.
      type: object
      required:
      - content
      - filename
      properties:
        content:
          description: The content of the file encoded with Base64
          type: string
        directory:
          description: The relative path to the directory of the file
          type: string
        filename:
          description: The name of the file
          type: string

    WorkbenchModelFile:
      description: Workbench model file
      type: object
      required:
      - content
      - type
      properties:
        content:
          description: The content of the file encoded with Base64
          example: 'UEsDBAoAAAAAAOCItFQAAAAAAAAAAAAAAAAPACQAcmVzdWxGCKBLABJSlo773Se4TzZ8QhcIhIIZFJikOmJmrHpbvH+fR4eHu4eHu6//I/Py0S7JnkRZ+mvPxiP...'
          type: string
          minLength: 1
          maxLength: 2147483647
        type:
          description: The file type of the Workbench model
          type: string
          enum:
          - WBPZ
          - WBPX
          - WBPS
          - REXS

    WorkbenchModelReference:
      description: Workbench model reference
      type: object
      required:
      - type
      properties:
        type:
          description: The file type of the Workbench model reference
          type: string
          enum:
          - LOCAL_FILESYSTEM
        parameters:
          description: Parameters for the workbench model reference
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchModelReferenceParameter'

    WorkbenchModelReferenceParameter:
      description: Workbench model reference parameter.
      type: object
      required:
      - key
      - value
      properties:
        key:
          description: The name of the variable.
          type: string
          minLength: 1
          maxLength: 2147483647
        value:
          description: The value of the variable.
          type: string
          minLength: 1
          maxLength: 2147483647

    WorkbenchScriptFile:
      description: Workbench script file
      type: object
      required:
      - content
      properties:
        content:
          description: The content of the file encoded with Base64
          type: string
          minLength: 1
          maxLength: 2147483647

    WorkbenchTask:
      description: Model containing the properties for the response to the task endpoint.
      type: object
      required:
      - id
      - type
      - priority
      - requestedDatetime
      - status
      properties:
        id:
          description: The identifier of the task.
          type: string
          minLength: 1
          maxLength: 2147483647
        type:
          description: The type of the task.
          type: string
          enum:
          - SIMULATE_WORK
          - EXECUTE_BATCH_JOB
        name:
          description: The name of the task (only if it was specified with the request).
          type: string
          minLength: 1
          maxLength: 2147483647
        priority:
          description: The priority of the task.
          type: string
          enum:
          - HIGHEST
          - HIGH
          - NORMAL
          - LOW
          - LOWEST
        creator:
          description: The name of the creator of the task (only if security was enabled).
          type: string
          minLength: 1
          maxLength: 2147483647
        requestedDatetime:
          description: The time the request was received.
          type: string
          minLength: 1
          maxLength: 2147483647
        startedDatetime:
          description: The time at which processing of the task started.
          type: string
          minLength: 1
          maxLength: 2147483647
        endedDatetime:
          description: The time at which the processing of the task was completed.
          type: string
          minLength: 1
          maxLength: 2147483647
        status:
          description: The status of the task.
          type: string
          enum:
          - WAITING
          - RUNNING
          - CANCELED
          - FINISHED
          - FAILED

    WorkbenchTaskPage:
      description: Model containing the properties for a page to respond to the task list endpoint.
      type: object
      required:
      - content
      - pageSize
      - pageNumber
      - totalElements
      - totalPages
      - size
      - first
      - last
      properties:
        content:
          description: A list of the tasks on this page.
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchTask'
        pageSize:
          description: The number of maximum items on the page.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        pageNumber:
          description: The current page number.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        totalElements:
          description: The count of all elements.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        totalPages:
          description: The number of all pages considering all elements and the page size.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        size:
          description: The number of items in this page.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        first:
          description: Indicates whether this is the first page of all items.
          type: boolean
        last:
          description: Indicates whether this is the last page of all items.
          type: boolean

    WorkbenchInstance:
      description: Model with the properties for Response to the node instance endpoint.
      type: object
      required:
      - id
      - version
      - status
      - working
      properties:
        id:
          description: The identifier of the instance.
          type: string
          minLength: 1
          maxLength: 2147483647
        version:
          description: The version of the instance.
          type: string
          minLength: 1
          maxLength: 2147483647
        labels:
          description: A list of associated labels.
          type: array
          items:
            type: string
        serverId:
          description: The identifier of the FVA simulation hub, in case the FVA workbench instance is connected via load balancing.
          type: string
          minLength: 1
          maxLength: 2147483647
        status:
          description: The status of the instance.
          type: string
          enum:
          - PENDING
          - ANALYSING
          - STARTING
          - STOPPING
          - UP
          - DOWN
          - CORRUPT
        working:
          description: Indicates whether the FVA Workbench instance is currently processing a task.
          type: boolean

    WorkbenchInstancePage:
      description: Model containing the properties for a page to respond to the Node-Instance-List endpoint.
      type: object
      required:
      - content
      - pageSize
      - pageNumber
      - totalElements
      - totalPages
      - size
      - first
      - last
      properties:
        content:
          description: A list of the FVA Workbench instances of this page.
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchInstance'
        pageSize:
          description: The number of maximum items on the page.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        pageNumber:
          description: The current page number.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        totalElements:
          description: The count of all elements.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        totalPages:
          description: The number of all pages considering all elements and the page size.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        size:
          description: The number of items in this page.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        first:
          description: Indicates whether this is the first page of all items.
          type: boolean
        last:
          description: Indicates whether this is the last page of all items.
          type: boolean

    WorkbenchServer:
      description: Model with the properties for Response to the node server endpoint.
      type: object
      required:
      - id
      - version
      - baseUrl
      - status
      properties:
        id:
          description: The identifier of the FVA Simulation Hub.
          type: string
          minLength: 1
          maxLength: 2147483647
        version:
          description: The version of the FVA Simulation Hub.
          type: string
          minLength: 1
          maxLength: 2147483647
        baseUrl:
          description: The URL to access the FVA simulation hubs.
          type: string
          minLength: 1
          maxLength: 2147483647
        instances:
          description: A list of related FVA workbench instances.
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchInstance'
        status:
          description: The status of the FVA Simulation Hub.
          type: string
          enum:
          - PENDING
          - UP
          - DOWN
          - OFFLINE

    WorkbenchServerPage:
      description: Model with the properties for a page to respond to the node server list endpoint.
      type: object
      required:
      - content
      - pageSize
      - pageNumber
      - totalElements
      - totalPages
      - size
      - first
      - last
      properties:
        content:
          description: A list of the FVA Simulation Hub instances on this page.
          type: array
          items:
            $ref: '#/components/schemas/WorkbenchServer'
        pageSize:
          description: The number of maximum items on the page.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        pageNumber:
          description: The current page number.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        totalElements:
          description: The count of all elements.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        totalPages:
          description: The number of all pages considering all elements and the page size.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        size:
          description: The number of items in this page.
          type: integer
          format: int64
          minimum: 0
          maximum: 2147483647
          exclusiveMinimum: false
          exclusiveMaximum: false
        first:
          description: Indicates whether this is the first page of all items.
          type: boolean
        last:
          description: Indicates whether this is the last page of all items.
          type: boolean
