Skip to main content

orvanta_api/models/
human_task_claim_request.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.1.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// HumanTaskClaimRequest : Which park a claim or release is about (#1123). Optional in full: an element that holds exactly one parked token needs no body at all. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct HumanTaskClaimRequest {
17    /// The parked token, from `PendingUserTask.token_id`. Required only when the element holds more than one park -- there is no honest default for a multi-instance task, so ambiguity is an error rather than a guess. 
18    #[serde(rename = "token_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub token_id: Option<Option<uuid::Uuid>>,
20}
21
22impl HumanTaskClaimRequest {
23    /// Which park a claim or release is about (#1123). Optional in full: an element that holds exactly one parked token needs no body at all. 
24    pub fn new() -> HumanTaskClaimRequest {
25        HumanTaskClaimRequest {
26            token_id: None,
27        }
28    }
29}
30