pub struct Job {
pub completed_at: Option<String>,
pub created_at: Option<String>,
pub error: Option<Box<JobError>>,
pub id: Option<String>,
pub item_count: Option<i32>,
pub links_bulk_create: Option<Box<LinksBulkCreateResult>>,
pub status: Option<Status>,
pub status_url: Option<String>,
pub type: Option<Type>,
}Expand description
Job : A bulk link creation running in the background. You get one back from POST /v1/links/bulk/jobs, and read it again with GET /v1/jobs/{id} until it is finished. Its status says where it stands: - pending: accepted, waiting to run. - running: creating the links now. - succeeded: done; linksBulkCreate.linkIds holds the created link IDs. - failed: error says why. No link was created: a batch is all or nothing. A job can be read for 24 hours after it finishes.
Fields§
§completed_at: Option<String>When the job finished, once it has.
created_at: Option<String>When the job was accepted.
error: Option<Box<JobError>>Set when status is JOB_STATUS_FAILED.
id: Option<String>Job ID (UUID).
item_count: Option<i32>How many items the job was submitted with.
links_bulk_create: Option<Box<LinksBulkCreateResult>>Set when a JOB_TYPE_LINKS_BULK_CREATE job succeeded.
status: Option<Status>Where the job stands. Poll until JOB_STATUS_SUCCEEDED or JOB_STATUS_FAILED. - JOB_STATUS_UNSPECIFIED: Not set. - JOB_STATUS_PENDING: Accepted and waiting to run. - JOB_STATUS_RUNNING: Running now. - JOB_STATUS_SUCCEEDED: Finished; the result is set. - JOB_STATUS_FAILED: Finished without doing its work; error says why. Nothing was created.
status_url: Option<String>Path to poll for this job’s status.
type: Option<Type>What the job does. - JOB_TYPE_UNSPECIFIED: Not set. - JOB_TYPE_LINKS_BULK_CREATE: Creates a batch of links (POST /v1/links/bulk/jobs).
Implementations§
Source§impl Job
impl Job
Sourcepub fn new() -> Job
pub fn new() -> Job
A bulk link creation running in the background. You get one back from POST /v1/links/bulk/jobs, and read it again with GET /v1/jobs/{id} until it is finished. Its status says where it stands: - pending: accepted, waiting to run. - running: creating the links now. - succeeded: done; linksBulkCreate.linkIds holds the created link IDs. - failed: error says why. No link was created: a batch is all or nothing. A job can be read for 24 hours after it finishes.