- release_tracks: [GA]
  help_text:
    brief: List background jobs in the conversion workspaces.
    description: List background jobs in the conversion workspaces.
    examples: |
      To list the background jobs in a conversion workspaces in a project and location `us-central1`, run:

        $ {command} my-conversion-workspace --region=us-central1

  request:
    collection: datamigration.projects.locations.conversionWorkspaces
    api_version: v1
    method: searchBackgroundJobs

  response:
    id_field: id
    result_attribute: jobs

  arguments:
    resource:
      help_text: The conversion workspace you want to get the details of.
      spec: !REF googlecloudsdk.command_lib.database_migration.resources:conversion_workspace

    params:
    - api_field: maxSize
      arg_name: max-size
      help_text: |
        The maximum number of jobs to return. The service may return fewer than this value. If
        unspecified, at most 100 jobs will be returned. The maximum value is 100; values above 100
        will be coerced to 100.
    - api_field: returnMostRecentPerJobType
      arg_name: most-recent-per-job-type
      help_text: |
        Returns only the most recent job per job type.

  output:
    format: |
      table(
        id:label=JOB_ID,
        jobType:label=JOB_TYPE,
        startTime:label=START_TIME,
        finishTime:label=FINISH_TIME,
        completionState:label=STATE,
        completionComment:label=COMMENT
      )
