class_docstr: List jobs in a dbt Cloud project.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/operator:DbtCloudListJobsOperator`
  
  Retrieves metadata for all jobs tied to a specified dbt Cloud account. If a ``project_id`` is
  supplied, only jobs pertaining to this project id will be retrieved.
  
  :param account_id: Optional. If an account ID is not provided explicitly,
      the account ID from the dbt Cloud connection will be used.
  :param order_by: Optional. Field to order the result by. Use '-' to indicate reverse order.
      For example, to use reverse order by the run ID use ``order_by=-id``.
  :param project_id: Optional. The ID of a dbt Cloud project.
class_docstr_tok: ["List","jobs","in","a","dbt","Cloud","project",".","..","seealso",":",":","For","more","information","on","how","to","use","this","operator",",","take","a","look","at","the","guide",":",":","ref",":","`","howto\/operator",":","DbtCloudListJobsOperator","`","Retrieves","metadata","for","all","jobs","tied","to","a","specified","dbt","Cloud","account",".","If","a","``","project_id","``","is","supplied",",","only","jobs","pertaining","to","this","project","id","will","be","retrieved",".",":","param","account_id",":","Optional",".","If","an","account","ID","is","not","provided","explicitly",",","the","account","ID","from","the","dbt","Cloud","connection","will","be","used",".",":","param","order_by",":","Optional",".","Field","to","order","the","result","by",".","Use","'-","'","to","indicate","reverse","order",".","For","example",",","to","use","reverse","order","by","the","run","ID","use","``","order_by=-id","``",".",":","param","project_id",":","Optional",".","The","ID","of","a","dbt","Cloud","project","."]
code: def execute(self, context: Context) -> list:
      hook = DbtCloudHook(self.dbt_cloud_conn_id)
      list_jobs_response = hook.list_jobs(
          account_id=self.account_id,
          order_by=self.order_by,
          project_id=self.project_id,
      )
      buffer = []
      for job_metadata in list_jobs_response:
          for job in job_metadata.json()["data"]:
              buffer.append(job["id"])
      self.log.info(
          "Jobs in the specified dbt Cloud account are: %s",
          ", ".join(map(str, buffer)),
      )
      return buffer
  
imports: from __future__ import annotations
  import json
  import time
  import warnings
  from functools import cached_property
  from pathlib import Path
  from typing import TYPE_CHECKING, Any
  from airflow.configuration import conf
  from airflow.models import BaseOperator, BaseOperatorLink, XCom
  from airflow.providers.dbt.cloud.hooks.dbt import DbtCloudHook, DbtCloudJobRunException, DbtCloudJobRunStatus, JobRunInfo
  from airflow.providers.dbt.cloud.triggers.dbt import DbtCloudRunJobTrigger
  from airflow.providers.dbt.cloud.utils.openlineage import generate_openlineage_events_from_dbt_cloud_run
label_desc: Use image node_id 2 for calling the DbtCloudListJobsOperator obj's underlying member method code with example usage: obj.execute(context) and returns: buffer