openapi: 3.0.3
info:
  title: Opvious API
  version: 0.25.7
  description: >
    An API for formulating and solving optimization models (linear,
    mixed-integer, and quadratic) via the [Opvious
    platform](https://www.opvious.io). SDKs
    ([TypeScript](https://www.npmjs.com/package/opvious),
    [Python](https://pypi.org/project/opvious/)) and a
    [CLI](https://www.npmjs.com/package/opvious-cli) are also available for your
    convenience.
  termsOfService: https://www.opvious.io/terms-of-service
  contact:
    name: Support
    email: support@opvious.io
servers:
  - url: https://api.cloud.opvious.io
externalDocs:
  description: Documentation
  url: https://docs.opvious.io
tags:
  - name: Metadata
    description: General operations
  - name: Schemas
    description: Schema definitions
  - name: Sources
    description: Model formulation
  - name: Solves
    description: Solving
paths:
  /openapi.yaml:
    get:
      operationId: getOpenapiSchema
      description: Fetch OpenAPI schema
      tags:
        - Schemas
      responses:
        "200":
          description: OpenAPI schema
          content:
            text/yaml:
              schema:
                type: string
  /schema.json:
    get:
      operationId: getOpenapiComponentSchema
      description: Fetch OpenAPI named component schema
      tags:
        - Schemas
      parameters:
        - name: name
          in: query
          required: true
          schema:
            type: string
      responses:
        "200":
          description: JSONSchema for the requested component
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        "404":
          description: No component schema for this name
  /schema.graphql:
    get:
      operationId: getGraphqlSchema
      description: Fetch GraphQL schema
      tags:
        - Schemas
      responses:
        "200":
          description: GraphQL schema
          content:
            text/graphql:
              schema:
                type: string
  /graphql:
    post:
      operationId: runQuery
      description: GraphQL endpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              additionalProperties: false
              properties:
                query:
                  type: string
                variables:
                  type: object
                  additionalProperties: true
      responses:
        "200":
          description: Expected response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    nullable: true
                    anyOf:
                      - type: array
                      - type: boolean
                      - type: number
                      - type: object
                        additionalProperties: true
                      - type: string
                  errors:
                    nullable: true
                    type: array
                    items:
                      type: object
                      required:
                        - message
                      additionalProperties: false
                      properties:
                        message:
                          type: string
                        locations:
                          type: array
                          items:
                            type: object
                            additionalProperties: false
                            required:
                              - line
                              - column
                            properties:
                              line:
                                type: number
                              column:
                                type: number
                        path:
                          type: array
                          items:
                            anyOf:
                              - type: number
                              - type: string
                        extensions:
                          type: object
                          additionalProperties: true
                  extensions:
                    type: object
                    additionalProperties: true
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                type: object
                required: &a1
                  - status
                  - error
                additionalProperties: false
                properties:
                  status: &a2
                    type: string
                    enum:
                      - UNKNOWN
                      - INTERNAL
                      - UNIMPLEMENTED
                      - UNAVAILABLE
                      - DEADLINE_EXCEEDED
                      - ABORTED
                      - INVALID_ARGUMENT
                      - UNAUTHENTICATED
                      - PERMISSION_DENIED
                      - NOT_FOUND
                      - ALREADY_EXISTS
                      - FAILED_PRECONDITION
                      - RESOURCE_EXHAUSTED
                      - CANCELLED
                  error: &a3
                    type: object
                    required:
                      - message
                    additionalProperties: false
                    properties:
                      message:
                        type: string
                      code:
                        type: string
                      tags:
                        type: object
                        additionalProperties: true
            text/plain:
              schema:
                type: string
  /outlines/transform:
    post:
      operationId: transformOutline
      description: Applies transformations to an outline
      x-upstream: formulation
      tags:
        - Sources
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                outline:
                  $ref: "#/components/schemas/Outline"
                transformations:
                  type: array
                  minItems: 1
                  items:
                    $ref: "#/components/schemas/Transformation"
              required:
                - outline
                - transformations
      responses:
        "200":
          description: Transformed outline
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  outline:
                    $ref: "#/components/schemas/Outline"
                required:
                  - outline
        default:
          $ref: "#/components/responses/Error1"
  /sources/assemble:
    post:
      operationId: assembleSources
      description: Assembles a model's formulation
      x-upstream: formulation
      tags:
        - Sources
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                sources:
                  type: array
                  minItems: 1
                  items:
                    type: string
                transformations:
                  type: array
                  items:
                    $ref: "#/components/schemas/Transformation"
              required:
                - sources
      responses:
        "200":
          description: Successful assembly output
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        default:
          $ref: "#/components/responses/Error1"
  /sources/parse:
    post:
      operationId: parseSources
      description: Parses and validates a model's formulation
      x-upstream: formulation
      tags:
        - Sources
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                sources:
                  type: array
                  items:
                    type: string
                outline:
                  type: boolean
              required:
                - sources
      responses:
        "200":
          description: Successful parse output
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  slices:
                    type: array
                    items:
                      $ref: "#/components/schemas/DefinitionSourceSlice"
                  errors:
                    type: array
                    items:
                      $ref: "#/components/schemas/ErrorSourceSlice"
                  outline:
                    $ref: "#/components/schemas/Outline"
                required:
                  - slices
                  - errors
        default:
          $ref: "#/components/responses/Error1"
  /solve:
    post:
      operationId: solve
      description: Solve an optimization problem synchronously
      x-upstream: attempt
      tags:
        - Solves
      security:
        - {}
        - token: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - problem
              additionalProperties: false
              properties:
                problem:
                  type: object
                  required:
                    - formulation
                    - inputs
                  additionalProperties: false
                  properties:
                    formulation:
                      anyOf:
                        - $ref: "#/components/schemas/InlineProblemFormulation"
                        - $ref: "#/components/schemas/RemoteProblemFormulation"
                    inputs:
                      type: object
                      required:
                        - parameters
                      additionalProperties: false
                      properties:
                        parameters:
                          type: array
                          items:
                            type: object
                            required:
                              - label
                              - entries
                            additionalProperties: false
                            properties:
                              label:
                                type: string
                              defaultValue:
                                description: >
                                  Value used for entries which are not
                                  explicitly specified in the

                                  array below. Defaults to 0 when unset.
                                anyOf:
                                  - anyOf:
                                      - type: number
                                      - type: string
                                        enum:
                                          - Infinity
                                          - -Infinity
                              entries:
                                type: array
                                items:
                                  type: object
                                  required:
                                    - key
                                  additionalProperties: false
                                  properties:
                                    key:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: integer
                                          - type: string
                                    value:
                                      description: Defaults to 1 when unset
                                      anyOf:
                                        - $ref: "#/components/schemas/ExtendedFloat"
                        dimensions:
                          type: array
                          items:
                            type: object
                            required:
                              - label
                              - items
                            additionalProperties: false
                            properties:
                              label:
                                type: string
                              items:
                                type: array
                                items:
                                  $ref: "#/components/schemas/KeyItem"
                    options:
                      $ref: "#/components/schemas/SolveOptions"
                    strategy:
                      type: object
                      required:
                        - isMaximization
                        - target
                      properties:
                        isMaximization:
                          type: boolean
                        target:
                          $ref: "#/components/schemas/WeightedSumTarget"
                        epsilonConstraints:
                          type: array
                          items:
                            type: object
                            required:
                              - target
                            properties:
                              target:
                                $ref: "#/components/schemas/WeightedSumTarget"
                              absoluteTolerance:
                                type: number
                              relativeTolerance:
                                type: number
                    transformations:
                      type: array
                      items:
                        anyOf:
                          - description: >
                              Adds slack to any constraint. The positive (resp.
                              negative) slack will

                              be available via a variable named `$label_surplus`
                              (resp.

                              `$label_deficit`). Objectives will also be added
                              when applicable, named

                              `$label_minimizeSurplus` and
                              `$label_minimizeDeficit`.
                            type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - relaxConstraint
                              label:
                                type: string
                              penalty:
                                description: >
                                  Strategy for computing the cost of relaxing a
                                  constraint.


                                  + `TOTAL_DEVIATION`: Cost proportional to the
                                  total sum of the
                                    (absolute value of) deviation.
                                  + `MAX_DEVIATION`: Cost proportional to the
                                  maximum deviation.

                                  + `DEVIATION_CARDINALITY`: Cost proportional
                                  to the number of rows with
                                    non-zero deviation. This penalty requires the relaxation to be
                                    bounded with finite values.

                                  The default is `TOTAL_DEVIATION`.
                                type: string
                                enum:
                                  - TOTAL_DEVIATION
                                  - MAX_DEVIATION
                                  - DEVIATION_CARDINALITY
                              isCapped:
                                description: >
                                  When set to `true`, adds deviation bound
                                  parameters

                                  (`$label_deficitCap` and/or
                                  `$label_surplusCap`).
                                type: boolean
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - omitConstraint
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - omitObjective
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - pinVariable
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - densifyVariable
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - constrainObjective
                              label:
                                type: string
                              maxValue:
                                type: number
                              minValue:
                                type: number
            examples:
              setCover:
                description: A small set cover example
                value:
                  problem:
                    sources:
                      - >
                        # Set cover

                        + Vertices $$\S^d_{vertices} : V$$ + Sets $$\S^d_{sets}
                        : S$$ + Coverage $$\S^p_{coverage} : c \in \{0,1\}^{S
                        \times V}$$ + Usage $$\S^v_{usage} : \alpha \in
                        \{0,1\}^S$$

                        Minimize sets used:

                        $$
                          \S^o_{setsUsed}: \min \sum_{s \in S} \alpha_s
                        $$

                        All vertices must be covered:

                        $$
                          \S^c_{allCovered}:
                            \forall v \in V, \sum_{s \in S} \alpha_s c_{s, v} \geq 1
                        $$
                    inputs:
                      parameters:
                        - label: coverage
                          entries:
                            - key:
                                - S1
                                - V1
                            - key:
                                - S2
                                - V1
                            - key:
                                - S2
                                - V2
                            - key:
                                - S2
                                - V3
                            - key:
                                - S3
                                - V1
                            - key:
                                - S3
                                - V4
      responses:
        "200":
          description: >
            Solve response. When possible, consider using the
            `application/json-seq` content-type to receive streamed information
            as the solve progresses.

            * Non-incremental information, via `application/json`. The payload
              is sent after the solve completes.
            * Incremental information about the solve, via
              `application/json-seq`. Messages will be streamed as the solve
              progresses.
          content:
            application/json:
              schema:
                type: object
                required:
                  - summaries
                  - outcome
                additionalProperties: false
                properties:
                  summaries:
                    type: object
                    required:
                      - problem
                    additionalProperties: false
                    properties:
                      problem:
                        type: object
                        required:
                          - dimensions
                          - parameters
                          - constraints
                          - variables
                          - objectives
                        additionalProperties: false
                        properties:
                          dimensions:
                            type: array
                            items:
                              $ref: "#/components/schemas/ProblemDimensionSummary"
                          parameters:
                            type: array
                            items:
                              type: object
                              required:
                                - label
                                - domainMultiplicity
                                - entryProfile
                              additionalProperties: false
                              properties:
                                label:
                                  type: string
                                domainMultiplicity:
                                  type: string
                                entryProfile:
                                  type: object
                                  required:
                                    - count
                                    - buckets
                                  additionalProperties: false
                                  properties:
                                    count:
                                      type: integer
                                    min:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    max:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    mean:
                                      type: number
                                    stddev:
                                      type: number
                                    buckets:
                                      type: array
                                      items:
                                        type: object
                                        required:
                                          - left
                                          - right
                                          - count
                                        additionalProperties: false
                                        properties:
                                          left:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          right:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          count:
                                            type: integer
                          constraints:
                            type: array
                            items:
                              type: object
                              required:
                                - label
                                - reifiedInMillis
                                - domainMultiplicity
                                - coefficientMultiplicity
                                - rowCount
                                - columnCount
                                - weightProfile
                              additionalProperties: false
                              properties:
                                label:
                                  type: string
                                domainMultiplicity:
                                  type: string
                                coefficientMultiplicity:
                                  type: string
                                rowCount:
                                  type: integer
                                columnCount:
                                  type: integer
                                weightProfile:
                                  type: object
                                  required:
                                    - count
                                    - buckets
                                  additionalProperties: false
                                  properties:
                                    count:
                                      type: integer
                                    min:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    max:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    mean:
                                      type: number
                                    stddev:
                                      type: number
                                    buckets:
                                      type: array
                                      items:
                                        type: object
                                        required:
                                          - left
                                          - right
                                          - count
                                        additionalProperties: false
                                        properties:
                                          left:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          right:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          count:
                                            type: integer
                                reifiedInMillis:
                                  type: number
                          variables:
                            type: array
                            items:
                              $ref: "#/components/schemas/ProblemVariableSummary"
                          objectives:
                            type: array
                            items:
                              type: object
                              required:
                                - label
                                - coefficientMultiplicity
                                - weightProfile
                                - reifiedInMillis
                              additionalProperties: false
                              properties:
                                label:
                                  type: string
                                coefficientMultiplicity:
                                  type: string
                                weightProfile:
                                  type: object
                                  required:
                                    - count
                                    - buckets
                                  additionalProperties: false
                                  properties:
                                    count:
                                      type: integer
                                    min:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    max:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    mean:
                                      type: number
                                    stddev:
                                      type: number
                                    buckets:
                                      type: array
                                      items:
                                        type: object
                                        required:
                                          - left
                                          - right
                                          - count
                                        additionalProperties: false
                                        properties:
                                          left:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          right:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          count:
                                            type: integer
                                reifiedInMillis:
                                  type: number
                      solution:
                        type: object
                        required:
                          - variables
                        additionalProperties: false
                        properties:
                          variables:
                            type: array
                            items:
                              type: object
                              required:
                                - label
                                - resultProfile
                              additionalProperties: false
                              properties:
                                label:
                                  type: string
                                resultProfile:
                                  type: object
                                  required:
                                    - count
                                    - buckets
                                  additionalProperties: false
                                  properties:
                                    count:
                                      type: integer
                                    min:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    max:
                                      $ref: "#/components/schemas/ExtendedFloat"
                                    mean:
                                      type: number
                                    stddev:
                                      type: number
                                    buckets:
                                      type: array
                                      items:
                                        type: object
                                        required:
                                          - left
                                          - right
                                          - count
                                        additionalProperties: false
                                        properties:
                                          left:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          right:
                                            $ref: "#/components/schemas/ExtendedFloat"
                                          count:
                                            type: integer
                  outcome:
                    type: object
                    required:
                      - status
                    properties:
                      status:
                        $ref: "#/components/schemas/SolveStatus"
                      objectiveValue:
                        type: number
                      relativeGap:
                        $ref: "#/components/schemas/ExtendedFloat"
                  outputs:
                    type: object
                    required:
                      - constraints
                      - variables
                    additionalProperties: false
                    properties:
                      constraints:
                        description: >
                          All entries where the constraint is active. Unlike for
                          variables,

                          zero-valued entries are included as they represent
                          tight

                          constraints.
                        type: array
                        items:
                          type: object
                          required:
                            - label
                            - entries
                          additionalProperties: false
                          properties:
                            label:
                              type: string
                            entries:
                              type: array
                              items:
                                type: object
                                required:
                                  - key
                                  - value
                                additionalProperties: false
                                properties:
                                  key:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/KeyItem"
                                  value:
                                    type: number
                                  dualValue:
                                    type: number
                      variables:
                        description: >
                          Entries with zero primal value and null dual value are
                          omitted.
                        type: array
                        items:
                          type: object
                          required:
                            - label
                            - entries
                          additionalProperties: false
                          properties:
                            label:
                              type: string
                            entries:
                              type: array
                              items:
                                type: object
                                required:
                                  - key
                                  - value
                                additionalProperties: false
                                properties:
                                  key:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/KeyItem"
                                  value:
                                    type: number
                                  dualValue:
                                    type: number
            application/json-seq:
              schema:
                type: string
                format: stream
                items:
                  anyOf:
                    - type: object
                      required:
                        - kind
                        - progress
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - reifying
                        progress:
                          anyOf:
                            - type: object
                              required:
                                - kind
                                - summary
                              additionalProperties: false
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - constraint
                                summary:
                                  type: object
                                  required:
                                    - label
                                    - reifiedInMillis
                                    - domainMultiplicity
                                    - coefficientMultiplicity
                                    - rowCount
                                    - columnCount
                                    - weightProfile
                                  additionalProperties: false
                                  properties:
                                    label:
                                      type: string
                                    domainMultiplicity:
                                      type: string
                                    coefficientMultiplicity:
                                      type: string
                                    rowCount:
                                      type: integer
                                    columnCount:
                                      type: integer
                                    weightProfile:
                                      type: object
                                      required:
                                        - count
                                        - buckets
                                      additionalProperties: false
                                      properties:
                                        count:
                                          type: integer
                                        min:
                                          $ref: "#/components/schemas/ExtendedFloat"
                                        max:
                                          $ref: "#/components/schemas/ExtendedFloat"
                                        mean:
                                          type: number
                                        stddev:
                                          type: number
                                        buckets:
                                          type: array
                                          items:
                                            type: object
                                            required:
                                              - left
                                              - right
                                              - count
                                            additionalProperties: false
                                            properties:
                                              left:
                                                $ref: "#/components/schemas/ExtendedFloat"
                                              right:
                                                $ref: "#/components/schemas/ExtendedFloat"
                                              count:
                                                type: integer
                                    reifiedInMillis:
                                      type: number
                            - type: object
                              required:
                                - kind
                                - summary
                              additionalProperties: false
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - objective
                                summary:
                                  type: object
                                  required:
                                    - label
                                    - coefficientMultiplicity
                                    - weightProfile
                                    - reifiedInMillis
                                  additionalProperties: false
                                  properties:
                                    label:
                                      type: string
                                    coefficientMultiplicity:
                                      type: string
                                    weightProfile:
                                      type: object
                                      required:
                                        - count
                                        - buckets
                                      additionalProperties: false
                                      properties:
                                        count:
                                          type: integer
                                        min:
                                          $ref: "#/components/schemas/ExtendedFloat"
                                        max:
                                          $ref: "#/components/schemas/ExtendedFloat"
                                        mean:
                                          type: number
                                        stddev:
                                          type: number
                                        buckets:
                                          type: array
                                          items:
                                            type: object
                                            required:
                                              - left
                                              - right
                                              - count
                                            additionalProperties: false
                                            properties:
                                              left:
                                                $ref: "#/components/schemas/ExtendedFloat"
                                              right:
                                                $ref: "#/components/schemas/ExtendedFloat"
                                              count:
                                                type: integer
                                    reifiedInMillis:
                                      type: number
                    - type: object
                      required:
                        - kind
                        - summary
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - reified
                        summary:
                          type: object
                          required:
                            - dimensions
                            - parameters
                            - constraints
                            - variables
                            - objectives
                          additionalProperties: false
                          properties:
                            dimensions:
                              type: array
                              items:
                                $ref: "#/components/schemas/ProblemDimensionSummary"
                            parameters:
                              type: array
                              items:
                                type: object
                                required:
                                  - label
                                  - domainMultiplicity
                                  - entryProfile
                                additionalProperties: false
                                properties:
                                  label:
                                    type: string
                                  domainMultiplicity:
                                    type: string
                                  entryProfile:
                                    type: object
                                    required:
                                      - count
                                      - buckets
                                    additionalProperties: false
                                    properties:
                                      count:
                                        type: integer
                                      min:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      max:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      mean:
                                        type: number
                                      stddev:
                                        type: number
                                      buckets:
                                        type: array
                                        items:
                                          type: object
                                          required:
                                            - left
                                            - right
                                            - count
                                          additionalProperties: false
                                          properties:
                                            left:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            right:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            count:
                                              type: integer
                            constraints:
                              type: array
                              items:
                                type: object
                                required:
                                  - label
                                  - reifiedInMillis
                                  - domainMultiplicity
                                  - coefficientMultiplicity
                                  - rowCount
                                  - columnCount
                                  - weightProfile
                                additionalProperties: false
                                properties:
                                  label:
                                    type: string
                                  domainMultiplicity:
                                    type: string
                                  coefficientMultiplicity:
                                    type: string
                                  rowCount:
                                    type: integer
                                  columnCount:
                                    type: integer
                                  weightProfile:
                                    type: object
                                    required:
                                      - count
                                      - buckets
                                    additionalProperties: false
                                    properties:
                                      count:
                                        type: integer
                                      min:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      max:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      mean:
                                        type: number
                                      stddev:
                                        type: number
                                      buckets:
                                        type: array
                                        items:
                                          type: object
                                          required:
                                            - left
                                            - right
                                            - count
                                          additionalProperties: false
                                          properties:
                                            left:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            right:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            count:
                                              type: integer
                                  reifiedInMillis:
                                    type: number
                            variables:
                              type: array
                              items:
                                $ref: "#/components/schemas/ProblemVariableSummary"
                            objectives:
                              type: array
                              items:
                                type: object
                                required:
                                  - label
                                  - coefficientMultiplicity
                                  - weightProfile
                                  - reifiedInMillis
                                additionalProperties: false
                                properties:
                                  label:
                                    type: string
                                  coefficientMultiplicity:
                                    type: string
                                  weightProfile:
                                    type: object
                                    required:
                                      - count
                                      - buckets
                                    additionalProperties: false
                                    properties:
                                      count:
                                        type: integer
                                      min:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      max:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      mean:
                                        type: number
                                      stddev:
                                        type: number
                                      buckets:
                                        type: array
                                        items:
                                          type: object
                                          required:
                                            - left
                                            - right
                                            - count
                                          additionalProperties: false
                                          properties:
                                            left:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            right:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            count:
                                              type: integer
                                  reifiedInMillis:
                                    type: number
                    - type: object
                      required:
                        - kind
                        - progress
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - solving
                        progress:
                          anyOf:
                            - type: object
                              required:
                                - kind
                              additionalProperties: false
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - activity
                                relativeGap:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                cutCount:
                                  type: integer
                                lpIterationCount:
                                  type: integer
                            - type: object
                              required:
                                - kind
                                - objectiveValue
                              additionalProperties: false
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - epsilonConstraint
                                objectiveValue:
                                  type: number
                    - type: object
                      required:
                        - kind
                        - summary
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - denormalized
                        summary:
                          type: object
                          required:
                            - variables
                          additionalProperties: false
                          properties:
                            variables:
                              type: array
                              items:
                                type: object
                                required:
                                  - label
                                  - resultProfile
                                additionalProperties: false
                                properties:
                                  label:
                                    type: string
                                  resultProfile:
                                    type: object
                                    required:
                                      - count
                                      - buckets
                                    additionalProperties: false
                                    properties:
                                      count:
                                        type: integer
                                      min:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      max:
                                        $ref: "#/components/schemas/ExtendedFloat"
                                      mean:
                                        type: number
                                      stddev:
                                        type: number
                                      buckets:
                                        type: array
                                        items:
                                          type: object
                                          required:
                                            - left
                                            - right
                                            - count
                                          additionalProperties: false
                                          properties:
                                            left:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            right:
                                              $ref: "#/components/schemas/ExtendedFloat"
                                            count:
                                              type: integer
                    - type: object
                      required:
                        - kind
                        - outcome
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - solved
                        outcome:
                          type: object
                          required:
                            - status
                          properties:
                            status:
                              $ref: "#/components/schemas/SolveStatus"
                            objectiveValue:
                              type: number
                            relativeGap:
                              $ref: "#/components/schemas/ExtendedFloat"
                        outputs:
                          type: object
                          required:
                            - constraints
                            - variables
                          additionalProperties: false
                          properties:
                            constraints:
                              description: >
                                All entries where the constraint is active.
                                Unlike for variables,

                                zero-valued entries are included as they
                                represent tight

                                constraints.
                              type: array
                              items:
                                type: object
                                required:
                                  - label
                                  - entries
                                additionalProperties: false
                                properties:
                                  label:
                                    type: string
                                  entries:
                                    type: array
                                    items:
                                      type: object
                                      required:
                                        - key
                                        - value
                                      additionalProperties: false
                                      properties:
                                        key:
                                          type: array
                                          items:
                                            $ref: "#/components/schemas/KeyItem"
                                        value:
                                          type: number
                                        dualValue:
                                          type: number
                            variables:
                              description: >
                                Entries with zero primal value and null dual
                                value are omitted.
                              type: array
                              items:
                                type: object
                                required:
                                  - label
                                  - entries
                                additionalProperties: false
                                properties:
                                  label:
                                    type: string
                                  entries:
                                    type: array
                                    items:
                                      type: object
                                      required:
                                        - key
                                        - value
                                      additionalProperties: false
                                      properties:
                                        key:
                                          type: array
                                          items:
                                            $ref: "#/components/schemas/KeyItem"
                                        value:
                                          type: number
                                        dualValue:
                                          type: number
                    - type: object
                      required:
                        - kind
                        - status
                        - error
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - error
                        status:
                          type: string
                        error:
                          type: object
                          required:
                            - message
                          additionalProperties: false
                          properties:
                            message:
                              type: string
                            code:
                              type: string
                            tags:
                              type: object
                              additionalProperties: true
        default:
          $ref: "#/components/responses/Error2"
  /format-problem:
    post:
      operationId: formatProblem
      description: >
        View a formatted representation of an optimization problem's underlying
        solver instructions
      x-upstream: attempt
      tags:
        - Solves
      security:
        - {}
        - token: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - problem
              properties:
                problem:
                  type: object
                  required:
                    - formulation
                    - inputs
                  additionalProperties: false
                  properties:
                    formulation:
                      anyOf:
                        - $ref: "#/components/schemas/InlineProblemFormulation"
                        - $ref: "#/components/schemas/RemoteProblemFormulation"
                    inputs:
                      type: object
                      required:
                        - parameters
                      additionalProperties: false
                      properties:
                        parameters:
                          type: array
                          items:
                            type: object
                            required:
                              - label
                              - entries
                            additionalProperties: false
                            properties:
                              label:
                                type: string
                              defaultValue:
                                description: >
                                  Value used for entries which are not
                                  explicitly specified in the

                                  array below. Defaults to 0 when unset.
                                anyOf:
                                  - $ref: "#/components/schemas/ExtendedFloat"
                              entries:
                                type: array
                                items:
                                  type: object
                                  required:
                                    - key
                                  additionalProperties: false
                                  properties:
                                    key:
                                      type: array
                                      items:
                                        $ref: "#/components/schemas/KeyItem"
                                    value:
                                      description: Defaults to 1 when unset
                                      anyOf:
                                        - $ref: "#/components/schemas/ExtendedFloat"
                        dimensions:
                          type: array
                          items:
                            type: object
                            required:
                              - label
                              - items
                            additionalProperties: false
                            properties:
                              label:
                                type: string
                              items:
                                type: array
                                items:
                                  $ref: "#/components/schemas/KeyItem"
                    options:
                      $ref: "#/components/schemas/SolveOptions"
                    strategy:
                      type: object
                      required:
                        - isMaximization
                        - target
                      properties:
                        isMaximization:
                          type: boolean
                        target:
                          $ref: "#/components/schemas/WeightedSumTarget"
                        epsilonConstraints:
                          type: array
                          items:
                            type: object
                            required:
                              - target
                            properties:
                              target:
                                $ref: "#/components/schemas/WeightedSumTarget"
                              absoluteTolerance:
                                type: number
                              relativeTolerance:
                                type: number
                    transformations:
                      type: array
                      items:
                        anyOf:
                          - description: >
                              Adds slack to any constraint. The positive (resp.
                              negative) slack will

                              be available via a variable named `$label_surplus`
                              (resp.

                              `$label_deficit`). Objectives will also be added
                              when applicable, named

                              `$label_minimizeSurplus` and
                              `$label_minimizeDeficit`.
                            type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - relaxConstraint
                              label:
                                type: string
                              penalty:
                                description: >
                                  Strategy for computing the cost of relaxing a
                                  constraint.


                                  + `TOTAL_DEVIATION`: Cost proportional to the
                                  total sum of the
                                    (absolute value of) deviation.
                                  + `MAX_DEVIATION`: Cost proportional to the
                                  maximum deviation.

                                  + `DEVIATION_CARDINALITY`: Cost proportional
                                  to the number of rows with
                                    non-zero deviation. This penalty requires the relaxation to be
                                    bounded with finite values.

                                  The default is `TOTAL_DEVIATION`.
                                type: string
                                enum:
                                  - TOTAL_DEVIATION
                                  - MAX_DEVIATION
                                  - DEVIATION_CARDINALITY
                              isCapped:
                                description: >
                                  When set to `true`, adds deviation bound
                                  parameters

                                  (`$label_deficitCap` and/or
                                  `$label_surplusCap`).
                                type: boolean
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - omitConstraint
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - omitObjective
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - pinVariable
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - densifyVariable
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - constrainObjective
                              label:
                                type: string
                              maxValue:
                                type: number
                              minValue:
                                type: number
                priorTargetValues:
                  description: |
                    The values of prior targets, meaningful when using a
                    strategy with epsilon-constraints. The next target will
                    have its instructions returned. Defaults to an empty array
                    (i.e. the first target will be returned).
                  type: array
                  items:
                    type: number
      responses:
        "200":
          description: Formatted solver inputs
          content:
            text/plain:
              schema:
                type: string
        default:
          $ref: "#/components/responses/Error2"
  /summarize-problem:
    post:
      operationId: summarizeProblem
      description: |
        View summary statistics about a solve
      x-upstream: attempt
      tags:
        - Solves
      security:
        - {}
        - token: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - problem
              properties:
                problem:
                  type: object
                  required:
                    - formulation
                    - inputs
                  additionalProperties: false
                  properties:
                    formulation:
                      anyOf:
                        - $ref: "#/components/schemas/InlineProblemFormulation"
                        - $ref: "#/components/schemas/RemoteProblemFormulation"
                    inputs:
                      type: object
                      required:
                        - parameters
                      additionalProperties: false
                      properties:
                        parameters:
                          type: array
                          items:
                            type: object
                            required:
                              - label
                              - entries
                            additionalProperties: false
                            properties:
                              label:
                                type: string
                              defaultValue:
                                description: >
                                  Value used for entries which are not
                                  explicitly specified in the

                                  array below. Defaults to 0 when unset.
                                anyOf:
                                  - $ref: "#/components/schemas/ExtendedFloat"
                              entries:
                                type: array
                                items:
                                  type: object
                                  required:
                                    - key
                                  additionalProperties: false
                                  properties:
                                    key:
                                      type: array
                                      items:
                                        $ref: "#/components/schemas/KeyItem"
                                    value:
                                      description: Defaults to 1 when unset
                                      anyOf:
                                        - $ref: "#/components/schemas/ExtendedFloat"
                        dimensions:
                          type: array
                          items:
                            type: object
                            required:
                              - label
                              - items
                            additionalProperties: false
                            properties:
                              label:
                                type: string
                              items:
                                type: array
                                items:
                                  $ref: "#/components/schemas/KeyItem"
                    options:
                      $ref: "#/components/schemas/SolveOptions"
                    strategy:
                      type: object
                      required:
                        - isMaximization
                        - target
                      properties:
                        isMaximization:
                          type: boolean
                        target:
                          $ref: "#/components/schemas/WeightedSumTarget"
                        epsilonConstraints:
                          type: array
                          items:
                            type: object
                            required:
                              - target
                            properties:
                              target:
                                $ref: "#/components/schemas/WeightedSumTarget"
                              absoluteTolerance:
                                type: number
                              relativeTolerance:
                                type: number
                    transformations:
                      type: array
                      items:
                        anyOf:
                          - description: >
                              Adds slack to any constraint. The positive (resp.
                              negative) slack will

                              be available via a variable named `$label_surplus`
                              (resp.

                              `$label_deficit`). Objectives will also be added
                              when applicable, named

                              `$label_minimizeSurplus` and
                              `$label_minimizeDeficit`.
                            type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - relaxConstraint
                              label:
                                type: string
                              penalty:
                                description: >
                                  Strategy for computing the cost of relaxing a
                                  constraint.


                                  + `TOTAL_DEVIATION`: Cost proportional to the
                                  total sum of the
                                    (absolute value of) deviation.
                                  + `MAX_DEVIATION`: Cost proportional to the
                                  maximum deviation.

                                  + `DEVIATION_CARDINALITY`: Cost proportional
                                  to the number of rows with
                                    non-zero deviation. This penalty requires the relaxation to be
                                    bounded with finite values.

                                  The default is `TOTAL_DEVIATION`.
                                type: string
                                enum:
                                  - TOTAL_DEVIATION
                                  - MAX_DEVIATION
                                  - DEVIATION_CARDINALITY
                              isCapped:
                                description: >
                                  When set to `true`, adds deviation bound
                                  parameters

                                  (`$label_deficitCap` and/or
                                  `$label_surplusCap`).
                                type: boolean
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - omitConstraint
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - omitObjective
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - pinVariable
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - densifyVariable
                              label:
                                type: string
                          - type: object
                            required:
                              - kind
                              - label
                            additionalProperties: false
                            properties:
                              kind:
                                type: string
                                enum:
                                  - constrainObjective
                              label:
                                type: string
                              maxValue:
                                type: number
                              minValue:
                                type: number
      responses:
        "200":
          description: Input summary statistics
          content:
            application/json:
              schema:
                type: object
                required:
                  - dimensions
                  - parameters
                  - constraints
                  - variables
                  - objectives
                additionalProperties: false
                properties:
                  dimensions:
                    type: array
                    items:
                      $ref: "#/components/schemas/ProblemDimensionSummary"
                  parameters:
                    type: array
                    items:
                      type: object
                      required:
                        - label
                        - domainMultiplicity
                        - entryProfile
                      additionalProperties: false
                      properties:
                        label:
                          type: string
                        domainMultiplicity:
                          type: string
                        entryProfile:
                          type: object
                          required:
                            - count
                            - buckets
                          additionalProperties: false
                          properties:
                            count:
                              type: integer
                            min:
                              $ref: "#/components/schemas/ExtendedFloat"
                            max:
                              $ref: "#/components/schemas/ExtendedFloat"
                            mean:
                              type: number
                            stddev:
                              type: number
                            buckets:
                              type: array
                              items:
                                type: object
                                required:
                                  - left
                                  - right
                                  - count
                                additionalProperties: false
                                properties:
                                  left:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  right:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  count:
                                    type: integer
                  constraints:
                    type: array
                    items:
                      type: object
                      required:
                        - label
                        - reifiedInMillis
                        - domainMultiplicity
                        - coefficientMultiplicity
                        - rowCount
                        - columnCount
                        - weightProfile
                      additionalProperties: false
                      properties:
                        label:
                          type: string
                        domainMultiplicity:
                          type: string
                        coefficientMultiplicity:
                          type: string
                        rowCount:
                          type: integer
                        columnCount:
                          type: integer
                        weightProfile:
                          type: object
                          required:
                            - count
                            - buckets
                          additionalProperties: false
                          properties:
                            count:
                              type: integer
                            min:
                              $ref: "#/components/schemas/ExtendedFloat"
                            max:
                              $ref: "#/components/schemas/ExtendedFloat"
                            mean:
                              type: number
                            stddev:
                              type: number
                            buckets:
                              type: array
                              items:
                                type: object
                                required:
                                  - left
                                  - right
                                  - count
                                additionalProperties: false
                                properties:
                                  left:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  right:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  count:
                                    type: integer
                        reifiedInMillis:
                          type: number
                  variables:
                    type: array
                    items:
                      $ref: "#/components/schemas/ProblemVariableSummary"
                  objectives:
                    type: array
                    items:
                      type: object
                      required:
                        - label
                        - coefficientMultiplicity
                        - weightProfile
                        - reifiedInMillis
                      additionalProperties: false
                      properties:
                        label:
                          type: string
                        coefficientMultiplicity:
                          type: string
                        weightProfile:
                          type: object
                          required:
                            - count
                            - buckets
                          additionalProperties: false
                          properties:
                            count:
                              type: integer
                            min:
                              $ref: "#/components/schemas/ExtendedFloat"
                            max:
                              $ref: "#/components/schemas/ExtendedFloat"
                            mean:
                              type: number
                            stddev:
                              type: number
                            buckets:
                              type: array
                              items:
                                type: object
                                required:
                                  - left
                                  - right
                                  - count
                                additionalProperties: false
                                properties:
                                  left:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  right:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  count:
                                    type: integer
                        reifiedInMillis:
                          type: number
        default:
          $ref: "#/components/responses/Error2"
  /queue-solve:
    post:
      operationId: queueSolve
      description: Solve an optimization problem asynchronously
      x-upstream: attempt
      tags:
        - Solves
      security:
        - token: []
      requestBody:
        $ref: "#/components/requestBodies/QueueSolveRequest"
      responses:
        "200":
          description: Started attempt metadata
          content:
            application/json:
              schema:
                type: object
                required:
                  - uuid
                  - expiresAt
                properties:
                  uuid:
                    type: string
                  expiresAt:
                    type: string
        default:
          $ref: "#/components/responses/Error2"
  /queued-solves/{uuid}/inputs:
    get:
      operationId: getQueuedSolveInputs
      description: Retrieve a queued solve's input data
      x-upstream: attempt
      tags:
        - Solves
      security:
        - token: []
      parameters:
        - $ref: "#/components/parameters/QueuedSolveUuid"
      responses:
        "200":
          description: Inputs found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SolveInputs"
        "404":
          description: No matching attempt found
        default:
          $ref: "#/components/responses/Error2"
  /queued-solves/{uuid}/outputs:
    get:
      operationId: getQueuedSolveOutputs
      description: Retrieve a queued solve's output data
      x-upstream: attempt
      tags:
        - Solves
      security:
        - token: []
      parameters:
        - $ref: "#/components/parameters/QueuedSolveUuid"
      responses:
        "200":
          description: Outputs found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SolveOutputs"
        "404":
          description: No matching attempt found
        "409":
          description: >
            The queued solve exists but does not have any outputs. This could be
            because it is still pending or was infeasible.
        default:
          $ref: "#/components/responses/Error2"
components:
  responses:
    Error:
      description: Generic error
      content:
        application/json:
          schema:
            type: object
            required: *a1
            additionalProperties: false
            properties:
              status: *a2
              error: *a3
        text/plain:
          schema:
            type: string
    Error1:
      description: Generic error
      content:
        application/json:
          schema:
            type: object
            required:
              - status
              - error
            additionalProperties: false
            properties:
              status:
                type: string
                enum:
                  - UNKNOWN
                  - INTERNAL
                  - UNIMPLEMENTED
                  - UNAVAILABLE
                  - DEADLINE_EXCEEDED
                  - ABORTED
                  - INVALID_ARGUMENT
                  - UNAUTHENTICATED
                  - PERMISSION_DENIED
                  - NOT_FOUND
                  - ALREADY_EXISTS
                  - FAILED_PRECONDITION
                  - RESOURCE_EXHAUSTED
                  - CANCELLED
              error:
                type: object
                required:
                  - message
                additionalProperties: false
                properties:
                  message:
                    type: string
                  code:
                    type: string
                  tags:
                    type: object
                    additionalProperties: true
        text/plain:
          schema:
            type: string
    Error2:
      description: Generic error response
      content:
        application/json:
          schema:
            type: object
            required:
              - status
              - error
            additionalProperties: false
            properties:
              status:
                type: string
                enum:
                  - UNKNOWN
                  - INTERNAL
                  - UNIMPLEMENTED
                  - UNAVAILABLE
                  - DEADLINE_EXCEEDED
                  - ABORTED
                  - INVALID_ARGUMENT
                  - UNAUTHENTICATED
                  - PERMISSION_DENIED
                  - NOT_FOUND
                  - ALREADY_EXISTS
                  - FAILED_PRECONDITION
                  - RESOURCE_EXHAUSTED
                  - CANCELLED
              error:
                type: object
                required:
                  - message
                additionalProperties: false
                properties:
                  message:
                    type: string
                  code:
                    type: string
                  tags:
                    type: object
                    additionalProperties: true
        text/plain:
          schema:
            type: string
  securitySchemes:
    token:
      type: http
      scheme: bearer
  schemas:
    DefinitionSourceSlice:
      type: object
      additionalProperties: false
      properties:
        index:
          type: integer
        range:
          type: object
          additionalProperties: false
          properties:
            start:
              type: object
              additionalProperties: false
              properties:
                offset:
                  type: integer
                line:
                  type: integer
                column:
                  type: integer
              required:
                - offset
                - line
                - column
            end: &a8
              type: object
              additionalProperties: false
              properties:
                offset:
                  type: integer
                line:
                  type: integer
                column:
                  type: integer
              required:
                - offset
                - line
                - column
          required:
            - start
            - end
        definition:
          type: object
          additionalProperties: false
          properties:
            category:
              type: string
              enum:
                - ALIAS
                - CONSTRAINT
                - DIMENSION
                - OBJECTIVE
                - PARAMETER
                - VARIABLE
            source:
              type: string
            label:
              type: string
          required:
            - category
            - source
      required:
        - index
        - range
        - definition
    ErrorSourceSlice:
      type: object
      additionalProperties: false
      properties:
        index:
          type: integer
        range:
          type: object
          additionalProperties: false
          properties:
            start:
              $ref: "#/components/schemas/SourcePosition"
            end:
              $ref: "#/components/schemas/SourcePosition"
          required:
            - start
            - end
        message:
          type: string
        code:
          type: string
        isFatal:
          type: boolean
      required:
        - index
        - range
        - message
        - code
        - isFatal
    Outline:
      type: object
      required:
        - dimensions
        - parameters
        - variables
        - constraints
        - objectives
      additionalProperties: false
      properties:
        dimensions:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              label:
                type: string
              isNumeric:
                type: boolean
            required:
              - label
              - isNumeric
        parameters:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              label:
                type: string
              image:
                type: object
                required:
                  - lowerBound
                  - upperBound
                  - isIntegral
                additionalProperties: false
                properties:
                  lowerBound:
                    anyOf:
                      - type: integer
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - Dynamic
                  upperBound: &a6
                    anyOf:
                      - type: integer
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - Dynamic
                  isIntegral:
                    type: boolean
              bindings:
                type: array
                items:
                  type: object
                  additionalProperties: false
                  properties:
                    dimensionLabel:
                      type: string
                    qualifier:
                      type: string
              derivation:
                anyOf:
                  - type: object
                    additionalProperties: false
                    properties:
                      kind:
                        type: string
                        enum:
                          - pinnedVariable
                      label:
                        type: string
                    required:
                      - kind
                      - label
                  - type: object
                    additionalProperties: false
                    properties:
                      kind:
                        type: string
                        enum:
                          - relaxedConstraintCap
                      label:
                        type: string
                      variant:
                        type: string
                        enum:
                          - deficit
                          - surplus
                    required:
                      - kind
                      - label
                      - variant
            required:
              - label
              - image
              - bindings
        variables:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              label:
                type: string
              image: &a7
                type: object
                required:
                  - lowerBound
                  - upperBound
                  - isIntegral
                additionalProperties: false
                properties:
                  lowerBound:
                    anyOf:
                      - type: integer
                      - type: string
                        enum:
                          - Infinity
                          - -Infinity
                          - Dynamic
                  upperBound:
                    $ref: "#/components/schemas/TensorBound"
                  isIntegral:
                    type: boolean
              bindings:
                type: array
                items: &a5
                  type: object
                  additionalProperties: false
                  properties:
                    dimensionLabel:
                      type: string
                    qualifier:
                      type: string
              derivation:
                anyOf:
                  - type: object
                    additionalProperties: false
                    properties:
                      kind:
                        type: string
                        enum:
                          - relaxedConstraint
                      label:
                        type: string
                      variant: &a4
                        type: string
                        enum:
                          - deficit
                          - surplus
                    required:
                      - kind
                      - label
                      - variant
            required:
              - label
              - image
              - bindings
        constraints:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              label:
                type: string
              condition:
                type: string
                enum:
                  - eq
                  - geq
                  - leq
              bindings:
                type: array
                items:
                  $ref: "#/components/schemas/SourceBinding"
              subjects:
                type: array
                items:
                  anyOf:
                    - type: object
                      required:
                        - kind
                        - label
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - parameter
                        label:
                          type: string
                    - type: object
                      required:
                        - kind
                        - label
                      additionalProperties: false
                      properties:
                        kind:
                          type: string
                          enum:
                            - variable
                        label:
                          type: string
              derivation:
                anyOf:
                  - type: object
                    additionalProperties: false
                    properties:
                      kind:
                        type: string
                        enum:
                          - pinnedVariable
                      label:
                        type: string
                    required:
                      - kind
                      - label
                  - type: object
                    additionalProperties: false
                    properties:
                      kind:
                        type: string
                        enum:
                          - relaxedConstraintCap
                      label:
                        type: string
                      variant:
                        $ref: "#/components/schemas/RelaxationSlackVariant"
                    required:
                      - kind
                      - label
                      - variant
            required:
              - label
              - condition
              - bindings
              - subjects
        objectives:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              label:
                type: string
              isMaximization:
                type: boolean
              isQuadratic:
                type: boolean
              derivation:
                anyOf:
                  - type: object
                    additionalProperties: false
                    properties:
                      kind:
                        type: string
                        enum:
                          - relaxedConstraint
                      label:
                        type: string
                      variant:
                        $ref: "#/components/schemas/RelaxationSlackVariant"
                    required:
                      - kind
                      - label
                      - variant
            required:
              - label
              - isMaximization
              - isQuadratic
    Transformation:
      anyOf:
        - description: >
            Adds slack to any constraint. The positive (resp. negative) slack
            will

            be available via a variable named `$label_surplus` (resp.

            `$label_deficit`). Objectives will also be added when applicable,
            named

            `$label_minimizeSurplus` and `$label_minimizeDeficit`.
          type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - relaxConstraint
            label:
              type: string
            penalty:
              description: >
                Strategy for computing the cost of relaxing a constraint.


                + `TOTAL_DEVIATION`: Cost proportional to the total sum of the
                  (absolute value of) deviation.
                + `MAX_DEVIATION`: Cost proportional to the maximum deviation.

                + `DEVIATION_CARDINALITY`: Cost proportional to the number of
                rows with
                  non-zero deviation. This penalty requires the relaxation to be
                  bounded with finite values.

                The default is `TOTAL_DEVIATION`.
              type: string
              enum:
                - TOTAL_DEVIATION
                - MAX_DEVIATION
                - DEVIATION_CARDINALITY
            isCapped:
              description: |
                When set to `true`, adds deviation bound parameters
                (`$label_deficitCap` and/or `$label_surplusCap`).
              type: boolean
        - type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - omitConstraint
            label:
              type: string
        - type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - omitObjective
            label:
              type: string
        - type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - pinVariable
            label:
              type: string
        - type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - densifyVariable
            label:
              type: string
        - type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - constrainObjective
            label:
              type: string
            maxValue:
              type: number
            minValue:
              type: number
    DimensionOutline:
      type: object
      additionalProperties: false
      properties:
        label:
          type: string
        isNumeric:
          type: boolean
      required:
        - label
        - isNumeric
    ParameterOutline:
      type: object
      additionalProperties: false
      properties:
        label:
          type: string
        image:
          type: object
          required:
            - lowerBound
            - upperBound
            - isIntegral
          additionalProperties: false
          properties:
            lowerBound:
              anyOf:
                - type: integer
                - type: string
                  enum:
                    - Infinity
                    - -Infinity
                    - Dynamic
            upperBound:
              $ref: "#/components/schemas/TensorBound"
            isIntegral:
              type: boolean
        bindings:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              dimensionLabel:
                type: string
              qualifier:
                type: string
        derivation:
          anyOf:
            - type: object
              additionalProperties: false
              properties:
                kind:
                  type: string
                  enum:
                    - pinnedVariable
                label:
                  type: string
              required:
                - kind
                - label
            - type: object
              additionalProperties: false
              properties:
                kind:
                  type: string
                  enum:
                    - relaxedConstraintCap
                label:
                  type: string
                variant:
                  type: string
                  enum:
                    - deficit
                    - surplus
              required:
                - kind
                - label
                - variant
      required:
        - label
        - image
        - bindings
    ParameterDerivation:
      anyOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - pinnedVariable
            label:
              type: string
          required:
            - kind
            - label
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - relaxedConstraintCap
            label:
              type: string
            variant:
              type: string
              enum:
                - deficit
                - surplus
          required:
            - kind
            - label
            - variant
    VariableOutline:
      type: object
      additionalProperties: false
      properties:
        label:
          type: string
        image:
          $ref: "#/components/schemas/TensorImage"
        bindings:
          type: array
          items:
            $ref: "#/components/schemas/SourceBinding"
        derivation:
          anyOf:
            - type: object
              additionalProperties: false
              properties:
                kind:
                  type: string
                  enum:
                    - relaxedConstraint
                label:
                  type: string
                variant:
                  $ref: "#/components/schemas/RelaxationSlackVariant"
              required:
                - kind
                - label
                - variant
      required:
        - label
        - image
        - bindings
    VariableDerivation:
      anyOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - relaxedConstraint
            label:
              type: string
            variant:
              $ref: "#/components/schemas/RelaxationSlackVariant"
          required:
            - kind
            - label
            - variant
    RelaxationSlackVariant: *a4
    ConstraintOutline:
      type: object
      additionalProperties: false
      properties:
        label:
          type: string
        condition:
          type: string
          enum:
            - eq
            - geq
            - leq
        bindings:
          type: array
          items:
            $ref: "#/components/schemas/SourceBinding"
        subjects:
          type: array
          items:
            anyOf:
              - type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - parameter
                  label:
                    type: string
              - type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - variable
                  label:
                    type: string
        derivation:
          anyOf:
            - type: object
              additionalProperties: false
              properties:
                kind:
                  type: string
                  enum:
                    - pinnedVariable
                label:
                  type: string
              required:
                - kind
                - label
            - type: object
              additionalProperties: false
              properties:
                kind:
                  type: string
                  enum:
                    - relaxedConstraintCap
                label:
                  type: string
                variant:
                  $ref: "#/components/schemas/RelaxationSlackVariant"
              required:
                - kind
                - label
                - variant
      required:
        - label
        - condition
        - bindings
        - subjects
    ConstraintCondition:
      type: string
      enum:
        - eq
        - geq
        - leq
    ConstraintSubject:
      anyOf:
        - type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - parameter
            label:
              type: string
        - type: object
          required:
            - kind
            - label
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - variable
            label:
              type: string
    ConstraintDerivation:
      anyOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - pinnedVariable
            label:
              type: string
          required:
            - kind
            - label
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - relaxedConstraintCap
            label:
              type: string
            variant:
              $ref: "#/components/schemas/RelaxationSlackVariant"
          required:
            - kind
            - label
            - variant
    ObjectiveOutline:
      type: object
      additionalProperties: false
      properties:
        label:
          type: string
        isMaximization:
          type: boolean
        isQuadratic:
          type: boolean
        derivation:
          anyOf:
            - type: object
              additionalProperties: false
              properties:
                kind:
                  type: string
                  enum:
                    - relaxedConstraint
                label:
                  type: string
                variant:
                  $ref: "#/components/schemas/RelaxationSlackVariant"
              required:
                - kind
                - label
                - variant
      required:
        - label
        - isMaximization
        - isQuadratic
    ObjectiveDerivation:
      anyOf:
        - type: object
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - relaxedConstraint
            label:
              type: string
            variant:
              $ref: "#/components/schemas/RelaxationSlackVariant"
          required:
            - kind
            - label
            - variant
    SourceBinding: *a5
    TensorBound: *a6
    TensorImage: *a7
    RelaxationPenalty:
      description: |
        Strategy for computing the cost of relaxing a constraint.

        + `TOTAL_DEVIATION`: Cost proportional to the total sum of the
          (absolute value of) deviation.
        + `MAX_DEVIATION`: Cost proportional to the maximum deviation.
        + `DEVIATION_CARDINALITY`: Cost proportional to the number of rows with
          non-zero deviation. This penalty requires the relaxation to be
          bounded with finite values.

        The default is `TOTAL_DEVIATION`.
      type: string
      enum:
        - TOTAL_DEVIATION
        - MAX_DEVIATION
        - DEVIATION_CARDINALITY
    RelaxConstraintTransformation:
      description: |
        Adds slack to any constraint. The positive (resp. negative) slack will
        be available via a variable named `$label_surplus` (resp.
        `$label_deficit`). Objectives will also be added when applicable, named
        `$label_minimizeSurplus` and `$label_minimizeDeficit`.
      type: object
      required:
        - kind
        - label
      additionalProperties: false
      properties:
        kind:
          type: string
          enum:
            - relaxConstraint
        label:
          type: string
        penalty:
          description: >
            Strategy for computing the cost of relaxing a constraint.


            + `TOTAL_DEVIATION`: Cost proportional to the total sum of the
              (absolute value of) deviation.
            + `MAX_DEVIATION`: Cost proportional to the maximum deviation.

            + `DEVIATION_CARDINALITY`: Cost proportional to the number of rows
            with
              non-zero deviation. This penalty requires the relaxation to be
              bounded with finite values.

            The default is `TOTAL_DEVIATION`.
          type: string
          enum:
            - TOTAL_DEVIATION
            - MAX_DEVIATION
            - DEVIATION_CARDINALITY
        isCapped:
          description: |
            When set to `true`, adds deviation bound parameters
            (`$label_deficitCap` and/or `$label_surplusCap`).
          type: boolean
    OmitConstraintTransformation:
      type: object
      required:
        - kind
        - label
      additionalProperties: false
      properties:
        kind:
          type: string
          enum:
            - omitConstraint
        label:
          type: string
    OmitObjectiveTransformation:
      type: object
      required:
        - kind
        - label
      additionalProperties: false
      properties:
        kind:
          type: string
          enum:
            - omitObjective
        label:
          type: string
    PinVariableTransformation:
      type: object
      required:
        - kind
        - label
      additionalProperties: false
      properties:
        kind:
          type: string
          enum:
            - pinVariable
        label:
          type: string
    DensifyVariableTransformation:
      type: object
      required:
        - kind
        - label
      additionalProperties: false
      properties:
        kind:
          type: string
          enum:
            - densifyVariable
        label:
          type: string
    ConstrainObjectiveTransformation:
      type: object
      required:
        - kind
        - label
      additionalProperties: false
      properties:
        kind:
          type: string
          enum:
            - constrainObjective
        label:
          type: string
        maxValue:
          type: number
        minValue:
          type: number
    Definition:
      type: object
      additionalProperties: false
      properties:
        category:
          type: string
          enum:
            - ALIAS
            - CONSTRAINT
            - DIMENSION
            - OBJECTIVE
            - PARAMETER
            - VARIABLE
        source:
          type: string
        label:
          type: string
      required:
        - category
        - source
    DefinitionCategory:
      type: string
      enum:
        - ALIAS
        - CONSTRAINT
        - DIMENSION
        - OBJECTIVE
        - PARAMETER
        - VARIABLE
    SourcePosition: *a8
    SourceRange:
      type: object
      additionalProperties: false
      properties:
        start:
          type: object
          additionalProperties: false
          properties:
            offset:
              type: integer
            line:
              type: integer
            column:
              type: integer
          required:
            - offset
            - line
            - column
        end:
          $ref: "#/components/schemas/SourcePosition"
      required:
        - start
        - end
    Annotation:
      type: object
      required:
        - key
      additionalProperties: false
      properties:
        key:
          type: string
        value:
          type: string
    AttemptOperation:
      type: string
      enum:
        - SOLVE
        - QUEUE_SOLVE
        - FORMAT_PROBLEM
        - SUMMARIZE_PROBLEM
    AttemptTier:
      type: string
      enum:
        - TRYOUT
        - DEFAULT
        - PERFORMANCE
    ErrorStatus:
      type: string
      enum:
        - UNKNOWN
        - INTERNAL
        - UNIMPLEMENTED
        - UNAVAILABLE
        - DEADLINE_EXCEEDED
        - ABORTED
        - INVALID_ARGUMENT
        - UNAUTHENTICATED
        - PERMISSION_DENIED
        - NOT_FOUND
        - ALREADY_EXISTS
        - FAILED_PRECONDITION
        - RESOURCE_EXHAUSTED
        - CANCELLED
    ExtendedFloat:
      anyOf:
        - type: number
        - type: string
          enum:
            - Infinity
            - -Infinity
    Problem:
      type: object
      required:
        - formulation
        - inputs
      additionalProperties: false
      properties:
        formulation:
          anyOf:
            - $ref: "#/components/schemas/InlineProblemFormulation"
            - $ref: "#/components/schemas/RemoteProblemFormulation"
        inputs:
          type: object
          required:
            - parameters
          additionalProperties: false
          properties:
            parameters:
              type: array
              items:
                type: object
                required:
                  - label
                  - entries
                additionalProperties: false
                properties:
                  label:
                    type: string
                  defaultValue:
                    description: >
                      Value used for entries which are not explicitly specified
                      in the

                      array below. Defaults to 0 when unset.
                    anyOf:
                      - $ref: "#/components/schemas/ExtendedFloat"
                  entries:
                    type: array
                    items:
                      type: object
                      required:
                        - key
                      additionalProperties: false
                      properties:
                        key:
                          type: array
                          items:
                            $ref: "#/components/schemas/KeyItem"
                        value:
                          description: Defaults to 1 when unset
                          anyOf:
                            - $ref: "#/components/schemas/ExtendedFloat"
            dimensions:
              type: array
              items:
                type: object
                required:
                  - label
                  - items
                additionalProperties: false
                properties:
                  label:
                    type: string
                  items:
                    type: array
                    items:
                      $ref: "#/components/schemas/KeyItem"
        options:
          $ref: "#/components/schemas/SolveOptions"
        strategy:
          type: object
          required:
            - isMaximization
            - target
          properties:
            isMaximization:
              type: boolean
            target:
              $ref: "#/components/schemas/WeightedSumTarget"
            epsilonConstraints:
              type: array
              items:
                type: object
                required:
                  - target
                properties:
                  target:
                    $ref: "#/components/schemas/WeightedSumTarget"
                  absoluteTolerance:
                    type: number
                  relativeTolerance:
                    type: number
        transformations:
          type: array
          items:
            anyOf:
              - description: >
                  Adds slack to any constraint. The positive (resp. negative)
                  slack will

                  be available via a variable named `$label_surplus` (resp.

                  `$label_deficit`). Objectives will also be added when
                  applicable, named

                  `$label_minimizeSurplus` and `$label_minimizeDeficit`.
                type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - relaxConstraint
                  label:
                    type: string
                  penalty:
                    description: >
                      Strategy for computing the cost of relaxing a constraint.


                      + `TOTAL_DEVIATION`: Cost proportional to the total sum of
                      the
                        (absolute value of) deviation.
                      + `MAX_DEVIATION`: Cost proportional to the maximum
                      deviation.

                      + `DEVIATION_CARDINALITY`: Cost proportional to the number
                      of rows with
                        non-zero deviation. This penalty requires the relaxation to be
                        bounded with finite values.

                      The default is `TOTAL_DEVIATION`.
                    type: string
                    enum:
                      - TOTAL_DEVIATION
                      - MAX_DEVIATION
                      - DEVIATION_CARDINALITY
                  isCapped:
                    description: |
                      When set to `true`, adds deviation bound parameters
                      (`$label_deficitCap` and/or `$label_surplusCap`).
                    type: boolean
              - type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - omitConstraint
                  label:
                    type: string
              - type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - omitObjective
                  label:
                    type: string
              - type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - pinVariable
                  label:
                    type: string
              - type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - densifyVariable
                  label:
                    type: string
              - type: object
                required:
                  - kind
                  - label
                additionalProperties: false
                properties:
                  kind:
                    type: string
                    enum:
                      - constrainObjective
                  label:
                    type: string
                  maxValue:
                    type: number
                  minValue:
                    type: number
    ProblemSize:
      type: string
      enum:
        - XS
        - SM
        - MD
        - LG
        - XL
    SolveInputs:
      type: object
      required:
        - parameters
      additionalProperties: false
      properties:
        parameters:
          type: array
          items:
            type: object
            required:
              - label
              - entries
            additionalProperties: false
            properties:
              label:
                type: string
              defaultValue:
                description: >
                  Value used for entries which are not explicitly specified in
                  the

                  array below. Defaults to 0 when unset.
                anyOf:
                  - $ref: "#/components/schemas/ExtendedFloat"
              entries:
                type: array
                items:
                  type: object
                  required:
                    - key
                  additionalProperties: false
                  properties:
                    key:
                      type: array
                      items:
                        $ref: "#/components/schemas/KeyItem"
                    value:
                      description: Defaults to 1 when unset
                      anyOf:
                        - $ref: "#/components/schemas/ExtendedFloat"
        dimensions:
          type: array
          items:
            type: object
            required:
              - label
              - items
            additionalProperties: false
            properties:
              label:
                type: string
              items:
                type: array
                items:
                  $ref: "#/components/schemas/KeyItem"
    SolveStrategy:
      type: object
      required:
        - isMaximization
        - target
      properties:
        isMaximization:
          type: boolean
        target:
          $ref: "#/components/schemas/WeightedSumTarget"
        epsilonConstraints:
          type: array
          items:
            type: object
            required:
              - target
            properties:
              target:
                $ref: "#/components/schemas/WeightedSumTarget"
              absoluteTolerance:
                type: number
              relativeTolerance:
                type: number
    SolveOptions:
      type: object
      additionalProperties: false
      properties:
        relativeGapThreshold:
          description: |
            Relative gap threshold at which to consider a solution optimal
          type: number
        absoluteGapThreshold:
          description: |
            Absolute gap threshold at which to consider a solution optimal
          type: number
        timeoutMillis:
          description: |
            Upper bound on solving time. Note that the overall attempt time may
            be greater due to processing outside of the solve itself.
          type: number
        zeroValueThreshold:
          description: |
            Positive magnitude below which values will be assumed equal to
            zero. This is also used on solution results, causing values to be
            omitted from the solution if their dual value is also absent. It is
            finally used as threshold for rounding integral variables to the
            nearest integer. The default is 1e-6.
          type: number
        infinityValueThreshold:
          description: |
            Positive magnitude used to cap all input values. It is illegal for
            the reified problem to include coefficients higher or equal to this
            value so the input needs to be such that they are masked out during
            reification. The default is 1e13.
          type: number
        freeBoundThreshold:
          description: |
            Positive magnitude used to decide whether a bound is free. This
            value should typically be slightly smaller to the infinity value
            threshold to allow for small offsets to infinite values. The
            default is 1e12.
          type: number
    SolveOutcome:
      type: object
      required:
        - status
      properties:
        status:
          $ref: "#/components/schemas/SolveStatus"
        objectiveValue:
          type: number
        relativeGap:
          $ref: "#/components/schemas/ExtendedFloat"
    SolveOutputs:
      type: object
      required:
        - constraints
        - variables
      additionalProperties: false
      properties:
        constraints:
          description: |
            All entries where the constraint is active. Unlike for variables,
            zero-valued entries are included as they represent tight
            constraints.
          type: array
          items:
            type: object
            required:
              - label
              - entries
            additionalProperties: false
            properties:
              label:
                type: string
              entries:
                type: array
                items:
                  type: object
                  required:
                    - key
                    - value
                  additionalProperties: false
                  properties:
                    key:
                      type: array
                      items:
                        $ref: "#/components/schemas/KeyItem"
                    value:
                      type: number
                    dualValue:
                      type: number
        variables:
          description: |
            Entries with zero primal value and null dual value are omitted.
          type: array
          items:
            type: object
            required:
              - label
              - entries
            additionalProperties: false
            properties:
              label:
                type: string
              entries:
                type: array
                items:
                  type: object
                  required:
                    - key
                    - value
                  additionalProperties: false
                  properties:
                    key:
                      type: array
                      items:
                        $ref: "#/components/schemas/KeyItem"
                    value:
                      type: number
                    dualValue:
                      type: number
    SolveUpdate:
      anyOf:
        - type: object
          required:
            - kind
            - progress
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - reifying
            progress:
              anyOf:
                - type: object
                  required:
                    - kind
                    - summary
                  additionalProperties: false
                  properties:
                    kind:
                      type: string
                      enum:
                        - constraint
                    summary:
                      type: object
                      required:
                        - label
                        - reifiedInMillis
                        - domainMultiplicity
                        - coefficientMultiplicity
                        - rowCount
                        - columnCount
                        - weightProfile
                      additionalProperties: false
                      properties:
                        label:
                          type: string
                        domainMultiplicity:
                          type: string
                        coefficientMultiplicity:
                          type: string
                        rowCount:
                          type: integer
                        columnCount:
                          type: integer
                        weightProfile:
                          type: object
                          required:
                            - count
                            - buckets
                          additionalProperties: false
                          properties:
                            count:
                              type: integer
                            min:
                              $ref: "#/components/schemas/ExtendedFloat"
                            max:
                              $ref: "#/components/schemas/ExtendedFloat"
                            mean:
                              type: number
                            stddev:
                              type: number
                            buckets:
                              type: array
                              items:
                                type: object
                                required:
                                  - left
                                  - right
                                  - count
                                additionalProperties: false
                                properties:
                                  left:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  right:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  count:
                                    type: integer
                        reifiedInMillis:
                          type: number
                - type: object
                  required:
                    - kind
                    - summary
                  additionalProperties: false
                  properties:
                    kind:
                      type: string
                      enum:
                        - objective
                    summary:
                      type: object
                      required:
                        - label
                        - coefficientMultiplicity
                        - weightProfile
                        - reifiedInMillis
                      additionalProperties: false
                      properties:
                        label:
                          type: string
                        coefficientMultiplicity:
                          type: string
                        weightProfile:
                          type: object
                          required:
                            - count
                            - buckets
                          additionalProperties: false
                          properties:
                            count:
                              type: integer
                            min:
                              $ref: "#/components/schemas/ExtendedFloat"
                            max:
                              $ref: "#/components/schemas/ExtendedFloat"
                            mean:
                              type: number
                            stddev:
                              type: number
                            buckets:
                              type: array
                              items:
                                type: object
                                required:
                                  - left
                                  - right
                                  - count
                                additionalProperties: false
                                properties:
                                  left:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  right:
                                    $ref: "#/components/schemas/ExtendedFloat"
                                  count:
                                    type: integer
                        reifiedInMillis:
                          type: number
        - type: object
          required:
            - kind
            - summary
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - reified
            summary:
              type: object
              required:
                - dimensions
                - parameters
                - constraints
                - variables
                - objectives
              additionalProperties: false
              properties:
                dimensions:
                  type: array
                  items:
                    $ref: "#/components/schemas/ProblemDimensionSummary"
                parameters:
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - domainMultiplicity
                      - entryProfile
                    additionalProperties: false
                    properties:
                      label:
                        type: string
                      domainMultiplicity:
                        type: string
                      entryProfile:
                        type: object
                        required:
                          - count
                          - buckets
                        additionalProperties: false
                        properties:
                          count:
                            type: integer
                          min:
                            $ref: "#/components/schemas/ExtendedFloat"
                          max:
                            $ref: "#/components/schemas/ExtendedFloat"
                          mean:
                            type: number
                          stddev:
                            type: number
                          buckets:
                            type: array
                            items:
                              type: object
                              required:
                                - left
                                - right
                                - count
                              additionalProperties: false
                              properties:
                                left:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                right:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                count:
                                  type: integer
                constraints:
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - reifiedInMillis
                      - domainMultiplicity
                      - coefficientMultiplicity
                      - rowCount
                      - columnCount
                      - weightProfile
                    additionalProperties: false
                    properties:
                      label:
                        type: string
                      domainMultiplicity:
                        type: string
                      coefficientMultiplicity:
                        type: string
                      rowCount:
                        type: integer
                      columnCount:
                        type: integer
                      weightProfile:
                        type: object
                        required:
                          - count
                          - buckets
                        additionalProperties: false
                        properties:
                          count:
                            type: integer
                          min:
                            $ref: "#/components/schemas/ExtendedFloat"
                          max:
                            $ref: "#/components/schemas/ExtendedFloat"
                          mean:
                            type: number
                          stddev:
                            type: number
                          buckets:
                            type: array
                            items:
                              type: object
                              required:
                                - left
                                - right
                                - count
                              additionalProperties: false
                              properties:
                                left:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                right:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                count:
                                  type: integer
                      reifiedInMillis:
                        type: number
                variables:
                  type: array
                  items:
                    $ref: "#/components/schemas/ProblemVariableSummary"
                objectives:
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - coefficientMultiplicity
                      - weightProfile
                      - reifiedInMillis
                    additionalProperties: false
                    properties:
                      label:
                        type: string
                      coefficientMultiplicity:
                        type: string
                      weightProfile:
                        type: object
                        required:
                          - count
                          - buckets
                        additionalProperties: false
                        properties:
                          count:
                            type: integer
                          min:
                            $ref: "#/components/schemas/ExtendedFloat"
                          max:
                            $ref: "#/components/schemas/ExtendedFloat"
                          mean:
                            type: number
                          stddev:
                            type: number
                          buckets:
                            type: array
                            items:
                              type: object
                              required:
                                - left
                                - right
                                - count
                              additionalProperties: false
                              properties:
                                left:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                right:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                count:
                                  type: integer
                      reifiedInMillis:
                        type: number
        - type: object
          required:
            - kind
            - progress
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - solving
            progress:
              anyOf:
                - type: object
                  required:
                    - kind
                  additionalProperties: false
                  properties:
                    kind:
                      type: string
                      enum:
                        - activity
                    relativeGap:
                      $ref: "#/components/schemas/ExtendedFloat"
                    cutCount:
                      type: integer
                    lpIterationCount:
                      type: integer
                - type: object
                  required:
                    - kind
                    - objectiveValue
                  additionalProperties: false
                  properties:
                    kind:
                      type: string
                      enum:
                        - epsilonConstraint
                    objectiveValue:
                      type: number
        - type: object
          required:
            - kind
            - summary
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - denormalized
            summary:
              type: object
              required:
                - variables
              additionalProperties: false
              properties:
                variables:
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - resultProfile
                    additionalProperties: false
                    properties:
                      label:
                        type: string
                      resultProfile:
                        type: object
                        required:
                          - count
                          - buckets
                        additionalProperties: false
                        properties:
                          count:
                            type: integer
                          min:
                            $ref: "#/components/schemas/ExtendedFloat"
                          max:
                            $ref: "#/components/schemas/ExtendedFloat"
                          mean:
                            type: number
                          stddev:
                            type: number
                          buckets:
                            type: array
                            items:
                              type: object
                              required:
                                - left
                                - right
                                - count
                              additionalProperties: false
                              properties:
                                left:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                right:
                                  $ref: "#/components/schemas/ExtendedFloat"
                                count:
                                  type: integer
        - type: object
          required:
            - kind
            - outcome
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - solved
            outcome:
              type: object
              required:
                - status
              properties:
                status:
                  $ref: "#/components/schemas/SolveStatus"
                objectiveValue:
                  type: number
                relativeGap:
                  $ref: "#/components/schemas/ExtendedFloat"
            outputs:
              type: object
              required:
                - constraints
                - variables
              additionalProperties: false
              properties:
                constraints:
                  description: >
                    All entries where the constraint is active. Unlike for
                    variables,

                    zero-valued entries are included as they represent tight

                    constraints.
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - entries
                    additionalProperties: false
                    properties:
                      label:
                        type: string
                      entries:
                        type: array
                        items:
                          type: object
                          required:
                            - key
                            - value
                          additionalProperties: false
                          properties:
                            key:
                              type: array
                              items:
                                $ref: "#/components/schemas/KeyItem"
                            value:
                              type: number
                            dualValue:
                              type: number
                variables:
                  description: >
                    Entries with zero primal value and null dual value are
                    omitted.
                  type: array
                  items:
                    type: object
                    required:
                      - label
                      - entries
                    additionalProperties: false
                    properties:
                      label:
                        type: string
                      entries:
                        type: array
                        items:
                          type: object
                          required:
                            - key
                            - value
                          additionalProperties: false
                          properties:
                            key:
                              type: array
                              items:
                                $ref: "#/components/schemas/KeyItem"
                            value:
                              type: number
                            dualValue:
                              type: number
        - type: object
          required:
            - kind
            - status
            - error
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - error
            status:
              type: string
            error:
              type: object
              required:
                - message
              additionalProperties: false
              properties:
                message:
                  type: string
                code:
                  type: string
                tags:
                  type: object
                  additionalProperties: true
    ReifyProgress:
      anyOf:
        - type: object
          required:
            - kind
            - summary
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - constraint
            summary:
              type: object
              required:
                - label
                - reifiedInMillis
                - domainMultiplicity
                - coefficientMultiplicity
                - rowCount
                - columnCount
                - weightProfile
              additionalProperties: false
              properties:
                label:
                  type: string
                domainMultiplicity:
                  type: string
                coefficientMultiplicity:
                  type: string
                rowCount:
                  type: integer
                columnCount:
                  type: integer
                weightProfile:
                  type: object
                  required:
                    - count
                    - buckets
                  additionalProperties: false
                  properties:
                    count:
                      type: integer
                    min:
                      $ref: "#/components/schemas/ExtendedFloat"
                    max:
                      $ref: "#/components/schemas/ExtendedFloat"
                    mean:
                      type: number
                    stddev:
                      type: number
                    buckets:
                      type: array
                      items:
                        type: object
                        required:
                          - left
                          - right
                          - count
                        additionalProperties: false
                        properties:
                          left:
                            $ref: "#/components/schemas/ExtendedFloat"
                          right:
                            $ref: "#/components/schemas/ExtendedFloat"
                          count:
                            type: integer
                reifiedInMillis:
                  type: number
        - type: object
          required:
            - kind
            - summary
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - objective
            summary:
              type: object
              required:
                - label
                - coefficientMultiplicity
                - weightProfile
                - reifiedInMillis
              additionalProperties: false
              properties:
                label:
                  type: string
                coefficientMultiplicity:
                  type: string
                weightProfile:
                  type: object
                  required:
                    - count
                    - buckets
                  additionalProperties: false
                  properties:
                    count:
                      type: integer
                    min:
                      $ref: "#/components/schemas/ExtendedFloat"
                    max:
                      $ref: "#/components/schemas/ExtendedFloat"
                    mean:
                      type: number
                    stddev:
                      type: number
                    buckets:
                      type: array
                      items:
                        type: object
                        required:
                          - left
                          - right
                          - count
                        additionalProperties: false
                        properties:
                          left:
                            $ref: "#/components/schemas/ExtendedFloat"
                          right:
                            $ref: "#/components/schemas/ExtendedFloat"
                          count:
                            type: integer
                reifiedInMillis:
                  type: number
    SolveProgress:
      anyOf:
        - type: object
          required:
            - kind
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - activity
            relativeGap:
              $ref: "#/components/schemas/ExtendedFloat"
            cutCount:
              type: integer
            lpIterationCount:
              type: integer
        - type: object
          required:
            - kind
            - objectiveValue
          additionalProperties: false
          properties:
            kind:
              type: string
              enum:
                - epsilonConstraint
            objectiveValue:
              type: number
    SolveSummaries:
      type: object
      required:
        - problem
      additionalProperties: false
      properties:
        problem:
          type: object
          required:
            - dimensions
            - parameters
            - constraints
            - variables
            - objectives
          additionalProperties: false
          properties:
            dimensions:
              type: array
              items:
                $ref: "#/components/schemas/ProblemDimensionSummary"
            parameters:
              type: array
              items:
                type: object
                required:
                  - label
                  - domainMultiplicity
                  - entryProfile
                additionalProperties: false
                properties:
                  label:
                    type: string
                  domainMultiplicity:
                    type: string
                  entryProfile:
                    type: object
                    required:
                      - count
                      - buckets
                    additionalProperties: false
                    properties:
                      count:
                        type: integer
                      min:
                        $ref: "#/components/schemas/ExtendedFloat"
                      max:
                        $ref: "#/components/schemas/ExtendedFloat"
                      mean:
                        type: number
                      stddev:
                        type: number
                      buckets:
                        type: array
                        items:
                          type: object
                          required:
                            - left
                            - right
                            - count
                          additionalProperties: false
                          properties:
                            left:
                              $ref: "#/components/schemas/ExtendedFloat"
                            right:
                              $ref: "#/components/schemas/ExtendedFloat"
                            count:
                              type: integer
            constraints:
              type: array
              items:
                type: object
                required:
                  - label
                  - reifiedInMillis
                  - domainMultiplicity
                  - coefficientMultiplicity
                  - rowCount
                  - columnCount
                  - weightProfile
                additionalProperties: false
                properties:
                  label:
                    type: string
                  domainMultiplicity:
                    type: string
                  coefficientMultiplicity:
                    type: string
                  rowCount:
                    type: integer
                  columnCount:
                    type: integer
                  weightProfile:
                    type: object
                    required:
                      - count
                      - buckets
                    additionalProperties: false
                    properties:
                      count:
                        type: integer
                      min:
                        $ref: "#/components/schemas/ExtendedFloat"
                      max:
                        $ref: "#/components/schemas/ExtendedFloat"
                      mean:
                        type: number
                      stddev:
                        type: number
                      buckets:
                        type: array
                        items:
                          type: object
                          required:
                            - left
                            - right
                            - count
                          additionalProperties: false
                          properties:
                            left:
                              $ref: "#/components/schemas/ExtendedFloat"
                            right:
                              $ref: "#/components/schemas/ExtendedFloat"
                            count:
                              type: integer
                  reifiedInMillis:
                    type: number
            variables:
              type: array
              items:
                $ref: "#/components/schemas/ProblemVariableSummary"
            objectives:
              type: array
              items:
                type: object
                required:
                  - label
                  - coefficientMultiplicity
                  - weightProfile
                  - reifiedInMillis
                additionalProperties: false
                properties:
                  label:
                    type: string
                  coefficientMultiplicity:
                    type: string
                  weightProfile:
                    type: object
                    required:
                      - count
                      - buckets
                    additionalProperties: false
                    properties:
                      count:
                        type: integer
                      min:
                        $ref: "#/components/schemas/ExtendedFloat"
                      max:
                        $ref: "#/components/schemas/ExtendedFloat"
                      mean:
                        type: number
                      stddev:
                        type: number
                      buckets:
                        type: array
                        items:
                          type: object
                          required:
                            - left
                            - right
                            - count
                          additionalProperties: false
                          properties:
                            left:
                              $ref: "#/components/schemas/ExtendedFloat"
                            right:
                              $ref: "#/components/schemas/ExtendedFloat"
                            count:
                              type: integer
                  reifiedInMillis:
                    type: number
        solution:
          type: object
          required:
            - variables
          additionalProperties: false
          properties:
            variables:
              type: array
              items:
                type: object
                required:
                  - label
                  - resultProfile
                additionalProperties: false
                properties:
                  label:
                    type: string
                  resultProfile:
                    type: object
                    required:
                      - count
                      - buckets
                    additionalProperties: false
                    properties:
                      count:
                        type: integer
                      min:
                        $ref: "#/components/schemas/ExtendedFloat"
                      max:
                        $ref: "#/components/schemas/ExtendedFloat"
                      mean:
                        type: number
                      stddev:
                        type: number
                      buckets:
                        type: array
                        items:
                          type: object
                          required:
                            - left
                            - right
                            - count
                          additionalProperties: false
                          properties:
                            left:
                              $ref: "#/components/schemas/ExtendedFloat"
                            right:
                              $ref: "#/components/schemas/ExtendedFloat"
                            count:
                              type: integer
    Failure:
      type: object
      required:
        - status
        - error
      additionalProperties: false
      properties:
        status:
          type: string
          enum:
            - UNKNOWN
            - INTERNAL
            - UNIMPLEMENTED
            - UNAVAILABLE
            - DEADLINE_EXCEEDED
            - ABORTED
            - INVALID_ARGUMENT
            - UNAUTHENTICATED
            - PERMISSION_DENIED
            - NOT_FOUND
            - ALREADY_EXISTS
            - FAILED_PRECONDITION
            - RESOURCE_EXHAUSTED
            - CANCELLED
        error:
          type: object
          required:
            - message
          additionalProperties: false
          properties:
            message:
              type: string
            code:
              type: string
            tags:
              type: object
              additionalProperties: true
    SolveStatus:
      type: string
      enum:
        - UNKNOWN
        - INFEASIBLE
        - UNBOUNDED
        - FEASIBLE
        - OPTIMAL
        - ABORTED
    TensorResult:
      type: object
      required:
        - label
        - entries
      additionalProperties: false
      properties:
        label:
          type: string
        entries:
          type: array
          items:
            type: object
            required:
              - key
              - value
            additionalProperties: false
            properties:
              key:
                type: array
                items:
                  $ref: "#/components/schemas/KeyItem"
              value:
                type: number
              dualValue:
                type: number
    TensorResultEntry:
      type: object
      required:
        - key
        - value
      additionalProperties: false
      properties:
        key:
          type: array
          items:
            $ref: "#/components/schemas/KeyItem"
        value:
          type: number
        dualValue:
          type: number
    InlineProblemFormulation:
      type: object
      required:
        - sources
      additionalProperties: false
      properties:
        sources:
          type: array
          items:
            type: string
    RemoteProblemFormulation:
      type: object
      required:
        - name
      additionalProperties: false
      properties:
        name:
          type: string
        specificationTagName:
          type: string
    Transformations:
      type: array
      items:
        anyOf:
          - description: >
              Adds slack to any constraint. The positive (resp. negative) slack
              will

              be available via a variable named `$label_surplus` (resp.

              `$label_deficit`). Objectives will also be added when applicable,
              named

              `$label_minimizeSurplus` and `$label_minimizeDeficit`.
            type: object
            required:
              - kind
              - label
            additionalProperties: false
            properties:
              kind:
                type: string
                enum:
                  - relaxConstraint
              label:
                type: string
              penalty:
                description: >
                  Strategy for computing the cost of relaxing a constraint.


                  + `TOTAL_DEVIATION`: Cost proportional to the total sum of the
                    (absolute value of) deviation.
                  + `MAX_DEVIATION`: Cost proportional to the maximum deviation.

                  + `DEVIATION_CARDINALITY`: Cost proportional to the number of
                  rows with
                    non-zero deviation. This penalty requires the relaxation to be
                    bounded with finite values.

                  The default is `TOTAL_DEVIATION`.
                type: string
                enum:
                  - TOTAL_DEVIATION
                  - MAX_DEVIATION
                  - DEVIATION_CARDINALITY
              isCapped:
                description: |
                  When set to `true`, adds deviation bound parameters
                  (`$label_deficitCap` and/or `$label_surplusCap`).
                type: boolean
          - type: object
            required:
              - kind
              - label
            additionalProperties: false
            properties:
              kind:
                type: string
                enum:
                  - omitConstraint
              label:
                type: string
          - type: object
            required:
              - kind
              - label
            additionalProperties: false
            properties:
              kind:
                type: string
                enum:
                  - omitObjective
              label:
                type: string
          - type: object
            required:
              - kind
              - label
            additionalProperties: false
            properties:
              kind:
                type: string
                enum:
                  - pinVariable
              label:
                type: string
          - type: object
            required:
              - kind
              - label
            additionalProperties: false
            properties:
              kind:
                type: string
                enum:
                  - densifyVariable
              label:
                type: string
          - type: object
            required:
              - kind
              - label
            additionalProperties: false
            properties:
              kind:
                type: string
                enum:
                  - constrainObjective
              label:
                type: string
              maxValue:
                type: number
              minValue:
                type: number
    EntryKey:
      type: array
      items:
        $ref: "#/components/schemas/KeyItem"
    KeyItem:
      anyOf:
        - type: integer
        - type: string
    KeyItemSet:
      type: object
      required:
        - label
        - items
      additionalProperties: false
      properties:
        label:
          type: string
        items:
          type: array
          items:
            $ref: "#/components/schemas/KeyItem"
    Tensor:
      type: object
      required:
        - label
        - entries
      additionalProperties: false
      properties:
        label:
          type: string
        defaultValue:
          description: |
            Value used for entries which are not explicitly specified in the
            array below. Defaults to 0 when unset.
          anyOf:
            - $ref: "#/components/schemas/ExtendedFloat"
        entries:
          type: array
          items:
            type: object
            required:
              - key
            additionalProperties: false
            properties:
              key:
                type: array
                items:
                  $ref: "#/components/schemas/KeyItem"
              value:
                description: Defaults to 1 when unset
                anyOf:
                  - $ref: "#/components/schemas/ExtendedFloat"
    TensorEntry:
      type: object
      required:
        - key
      additionalProperties: false
      properties:
        key:
          type: array
          items:
            $ref: "#/components/schemas/KeyItem"
        value:
          description: Defaults to 1 when unset
          anyOf:
            - $ref: "#/components/schemas/ExtendedFloat"
    WeightedSumTarget:
      type: object
      required:
        - weights
      properties:
        weights:
          type: array
          items:
            type: object
            required:
              - label
              - value
            properties:
              label:
                type: string
              value:
                type: number
    ProblemSummary:
      type: object
      required:
        - dimensions
        - parameters
        - constraints
        - variables
        - objectives
      additionalProperties: false
      properties:
        dimensions:
          type: array
          items:
            type: object
            required:
              - label
              - itemCount
            additionalProperties: false
            properties:
              label:
                type: string
              itemCount:
                type: integer
        parameters:
          type: array
          items:
            type: object
            required:
              - label
              - domainMultiplicity
              - entryProfile
            additionalProperties: false
            properties:
              label:
                type: string
              domainMultiplicity:
                type: string
              entryProfile:
                type: object
                required:
                  - count
                  - buckets
                additionalProperties: false
                properties:
                  count:
                    type: integer
                  min:
                    $ref: "#/components/schemas/ExtendedFloat"
                  max:
                    $ref: "#/components/schemas/ExtendedFloat"
                  mean:
                    type: number
                  stddev:
                    type: number
                  buckets:
                    type: array
                    items:
                      type: object
                      required:
                        - left
                        - right
                        - count
                      additionalProperties: false
                      properties:
                        left:
                          $ref: "#/components/schemas/ExtendedFloat"
                        right:
                          $ref: "#/components/schemas/ExtendedFloat"
                        count:
                          type: integer
        constraints:
          type: array
          items:
            type: object
            required:
              - label
              - reifiedInMillis
              - domainMultiplicity
              - coefficientMultiplicity
              - rowCount
              - columnCount
              - weightProfile
            additionalProperties: false
            properties:
              label:
                type: string
              domainMultiplicity:
                type: string
              coefficientMultiplicity:
                type: string
              rowCount:
                type: integer
              columnCount:
                type: integer
              weightProfile:
                $ref: "#/components/schemas/ValueProfile"
              reifiedInMillis:
                type: number
        variables:
          type: array
          items:
            type: object
            required:
              - label
              - domainMultiplicity
              - columnCount
            additionalProperties: false
            properties:
              label:
                type: string
              domainMultiplicity:
                type: string
              columnCount:
                type: integer
        objectives:
          type: array
          items:
            type: object
            required:
              - label
              - coefficientMultiplicity
              - weightProfile
              - reifiedInMillis
            additionalProperties: false
            properties:
              label:
                type: string
              coefficientMultiplicity:
                type: string
              weightProfile:
                $ref: "#/components/schemas/ValueProfile"
              reifiedInMillis:
                type: number
    ProblemConstraintSummary:
      type: object
      required:
        - label
        - reifiedInMillis
        - domainMultiplicity
        - coefficientMultiplicity
        - rowCount
        - columnCount
        - weightProfile
      additionalProperties: false
      properties:
        label:
          type: string
        domainMultiplicity:
          type: string
        coefficientMultiplicity:
          type: string
        rowCount:
          type: integer
        columnCount:
          type: integer
        weightProfile:
          $ref: "#/components/schemas/ValueProfile"
        reifiedInMillis:
          type: number
    ProblemDimensionSummary:
      type: object
      required:
        - label
        - itemCount
      additionalProperties: false
      properties:
        label:
          type: string
        itemCount:
          type: integer
    ProblemObjectiveSummary:
      type: object
      required:
        - label
        - coefficientMultiplicity
        - weightProfile
        - reifiedInMillis
      additionalProperties: false
      properties:
        label:
          type: string
        coefficientMultiplicity:
          type: string
        weightProfile:
          $ref: "#/components/schemas/ValueProfile"
        reifiedInMillis:
          type: number
    ProblemParameterSummary:
      type: object
      required:
        - label
        - domainMultiplicity
        - entryProfile
      additionalProperties: false
      properties:
        label:
          type: string
        domainMultiplicity:
          type: string
        entryProfile:
          type: object
          required:
            - count
            - buckets
          additionalProperties: false
          properties:
            count:
              type: integer
            min:
              $ref: "#/components/schemas/ExtendedFloat"
            max:
              $ref: "#/components/schemas/ExtendedFloat"
            mean:
              type: number
            stddev:
              type: number
            buckets:
              type: array
              items:
                type: object
                required:
                  - left
                  - right
                  - count
                additionalProperties: false
                properties:
                  left:
                    $ref: "#/components/schemas/ExtendedFloat"
                  right:
                    $ref: "#/components/schemas/ExtendedFloat"
                  count:
                    type: integer
    ProblemVariableSummary:
      type: object
      required:
        - label
        - domainMultiplicity
        - columnCount
      additionalProperties: false
      properties:
        label:
          type: string
        domainMultiplicity:
          type: string
        columnCount:
          type: integer
    SolutionSummary:
      type: object
      required:
        - variables
      additionalProperties: false
      properties:
        variables:
          type: array
          items:
            type: object
            required:
              - label
              - resultProfile
            additionalProperties: false
            properties:
              label:
                type: string
              resultProfile:
                $ref: "#/components/schemas/ValueProfile"
    SolutionVariableSummary:
      type: object
      required:
        - label
        - resultProfile
      additionalProperties: false
      properties:
        label:
          type: string
        resultProfile:
          $ref: "#/components/schemas/ValueProfile"
    ValueProfile:
      type: object
      required:
        - count
        - buckets
      additionalProperties: false
      properties:
        count:
          type: integer
        min:
          $ref: "#/components/schemas/ExtendedFloat"
        max:
          $ref: "#/components/schemas/ExtendedFloat"
        mean:
          type: number
        stddev:
          type: number
        buckets:
          type: array
          items:
            type: object
            required:
              - left
              - right
              - count
            additionalProperties: false
            properties:
              left:
                $ref: "#/components/schemas/ExtendedFloat"
              right:
                $ref: "#/components/schemas/ExtendedFloat"
              count:
                type: integer
    ValueProfileBucket:
      type: object
      required:
        - left
        - right
        - count
      additionalProperties: false
      properties:
        left:
          $ref: "#/components/schemas/ExtendedFloat"
        right:
          $ref: "#/components/schemas/ExtendedFloat"
        count:
          type: integer
    ProblemMeasurements:
      type: object
      properties:
        itemCount:
          type: number
        entryCount:
          type: number
        rowCount:
          type: number
        columnCount:
          type: number
        weightCount:
          type: number
      additionalProperties: false
  parameters:
    QueuedSolveUuid:
      name: uuid
      in: path
      required: true
      schema:
        type: string
  requestBodies:
    QueueSolveRequest:
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - problem
            properties:
              annotations:
                type: array
                items:
                  type: object
                  required:
                    - key
                  additionalProperties: false
                  properties:
                    key:
                      type: string
                    value:
                      type: string
              problem:
                type: object
                required:
                  - formulation
                  - inputs
                additionalProperties: false
                properties:
                  formulation:
                    anyOf:
                      - $ref: "#/components/schemas/InlineProblemFormulation"
                      - $ref: "#/components/schemas/RemoteProblemFormulation"
                  inputs:
                    type: object
                    required:
                      - parameters
                    additionalProperties: false
                    properties:
                      parameters:
                        type: array
                        items:
                          type: object
                          required:
                            - label
                            - entries
                          additionalProperties: false
                          properties:
                            label:
                              type: string
                            defaultValue:
                              description: >
                                Value used for entries which are not explicitly
                                specified in the

                                array below. Defaults to 0 when unset.
                              anyOf:
                                - $ref: "#/components/schemas/ExtendedFloat"
                            entries:
                              type: array
                              items:
                                type: object
                                required:
                                  - key
                                additionalProperties: false
                                properties:
                                  key:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/KeyItem"
                                  value:
                                    description: Defaults to 1 when unset
                                    anyOf:
                                      - $ref: "#/components/schemas/ExtendedFloat"
                      dimensions:
                        type: array
                        items:
                          type: object
                          required:
                            - label
                            - items
                          additionalProperties: false
                          properties:
                            label:
                              type: string
                            items:
                              type: array
                              items:
                                $ref: "#/components/schemas/KeyItem"
                  options:
                    $ref: "#/components/schemas/SolveOptions"
                  strategy:
                    type: object
                    required:
                      - isMaximization
                      - target
                    properties:
                      isMaximization:
                        type: boolean
                      target:
                        $ref: "#/components/schemas/WeightedSumTarget"
                      epsilonConstraints:
                        type: array
                        items:
                          type: object
                          required:
                            - target
                          properties:
                            target:
                              $ref: "#/components/schemas/WeightedSumTarget"
                            absoluteTolerance:
                              type: number
                            relativeTolerance:
                              type: number
                  transformations:
                    type: array
                    items:
                      anyOf:
                        - description: >
                            Adds slack to any constraint. The positive (resp.
                            negative) slack will

                            be available via a variable named `$label_surplus`
                            (resp.

                            `$label_deficit`). Objectives will also be added
                            when applicable, named

                            `$label_minimizeSurplus` and
                            `$label_minimizeDeficit`.
                          type: object
                          required:
                            - kind
                            - label
                          additionalProperties: false
                          properties:
                            kind:
                              type: string
                              enum:
                                - relaxConstraint
                            label:
                              type: string
                            penalty:
                              description: >
                                Strategy for computing the cost of relaxing a
                                constraint.


                                + `TOTAL_DEVIATION`: Cost proportional to the
                                total sum of the
                                  (absolute value of) deviation.
                                + `MAX_DEVIATION`: Cost proportional to the
                                maximum deviation.

                                + `DEVIATION_CARDINALITY`: Cost proportional to
                                the number of rows with
                                  non-zero deviation. This penalty requires the relaxation to be
                                  bounded with finite values.

                                The default is `TOTAL_DEVIATION`.
                              type: string
                              enum:
                                - TOTAL_DEVIATION
                                - MAX_DEVIATION
                                - DEVIATION_CARDINALITY
                            isCapped:
                              description: >
                                When set to `true`, adds deviation bound
                                parameters

                                (`$label_deficitCap` and/or
                                `$label_surplusCap`).
                              type: boolean
                        - type: object
                          required:
                            - kind
                            - label
                          additionalProperties: false
                          properties:
                            kind:
                              type: string
                              enum:
                                - omitConstraint
                            label:
                              type: string
                        - type: object
                          required:
                            - kind
                            - label
                          additionalProperties: false
                          properties:
                            kind:
                              type: string
                              enum:
                                - omitObjective
                            label:
                              type: string
                        - type: object
                          required:
                            - kind
                            - label
                          additionalProperties: false
                          properties:
                            kind:
                              type: string
                              enum:
                                - pinVariable
                            label:
                              type: string
                        - type: object
                          required:
                            - kind
                            - label
                          additionalProperties: false
                          properties:
                            kind:
                              type: string
                              enum:
                                - densifyVariable
                            label:
                              type: string
                        - type: object
                          required:
                            - kind
                            - label
                          additionalProperties: false
                          properties:
                            kind:
                              type: string
                              enum:
                                - constrainObjective
                            label:
                              type: string
                            maxValue:
                              type: number
                            minValue:
                              type: number
