Skip to main content

wellfriend/generated/
models.rs

1// Generated by scripts/sdk/generate-rust.mjs. Do not edit.
2//! Request and response types generated from the API document.
3
4use serde::{Deserialize, Serialize};
5
6use crate::Object;
7
8/// Paging parameters of a list call.
9#[derive(Debug, Clone, Default, PartialEq, Eq)]
10pub struct ListParams {
11    /// The most items on one page.
12    pub limit: Option<u32>,
13    /// The cursor of the page to read, from `next_cursor`.
14    pub cursor: Option<String>,
15}
16
17string_enum! {
18    /// Allowed values of `QuoteKind`.
19    QuoteKind {
20        Operation => "operation",
21        Chain => "chain",
22    }
23}
24
25string_enum! {
26    /// pages when the step's credits depend on its page count (ocr-pdf); flat otherwise.
27    QuoteStepsItemPricing {
28        Flat => "flat",
29        Pages => "pages",
30    }
31}
32
33/// The `QuoteStepsItem` object.
34#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
35pub struct QuoteStepsItem {
36    /// The `id` field.
37    #[serde(default)]
38    pub id: String,
39    /// The `toolId` field.
40    #[serde(rename = "toolId", default)]
41    pub tool_id: String,
42    /// The `pages` field.
43    #[serde(default, skip_serializing_if = "Option::is_none")]
44    pub pages: Option<i64>,
45    /// The `requestUnits` field.
46    #[serde(rename = "requestUnits", default)]
47    pub request_units: i64,
48    /// The `credits` field.
49    #[serde(default)]
50    pub credits: i64,
51    /// pages when the step's credits depend on its page count (ocr-pdf); flat otherwise.
52    #[serde(default)]
53    pub pricing: QuoteStepsItemPricing,
54    /// Fields this SDK version does not model.
55    #[serde(flatten)]
56    pub extra: Object,
57}
58
59/// The `QuoteTransfersUpload` object.
60#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
61pub struct QuoteTransfersUpload {
62    /// The `operation` field.
63    #[serde(default)]
64    pub operation: String,
65    /// The `requestUnits` field.
66    #[serde(rename = "requestUnits", default)]
67    pub request_units: i64,
68    /// Fields this SDK version does not model.
69    #[serde(flatten)]
70    pub extra: Object,
71}
72
73/// The `QuoteTransfers` object.
74#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
75pub struct QuoteTransfers {
76    /// The `upload` field.
77    #[serde(default)]
78    pub upload: QuoteTransfersUpload,
79    /// The `download` field.
80    #[serde(default)]
81    pub download: QuoteTransfersUpload,
82    /// Fields this SDK version does not model.
83    #[serde(flatten)]
84    pub extra: Object,
85}
86
87/// The `QuoteWithTransfers` object.
88#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
89pub struct QuoteWithTransfers {
90    /// The `requestUnits` field.
91    #[serde(rename = "requestUnits", default)]
92    pub request_units: i64,
93    /// The `credits` field.
94    #[serde(default)]
95    pub credits: i64,
96    /// Fields this SDK version does not model.
97    #[serde(flatten)]
98    pub extra: Object,
99}
100
101/// The `QuoteOcrCreditRule` object.
102#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
103pub struct QuoteOcrCreditRule {
104    /// The `baseCredits` field.
105    #[serde(
106        rename = "baseCredits",
107        default,
108        skip_serializing_if = "Option::is_none"
109    )]
110    pub base_credits: Option<i64>,
111    /// The `includedPages` field.
112    #[serde(
113        rename = "includedPages",
114        default,
115        skip_serializing_if = "Option::is_none"
116    )]
117    pub included_pages: Option<i64>,
118    /// The `extraPageFactor` field.
119    #[serde(
120        rename = "extraPageFactor",
121        default,
122        skip_serializing_if = "Option::is_none",
123        serialize_with = "crate::util::number"
124    )]
125    pub extra_page_factor: Option<f64>,
126    /// Fields this SDK version does not model.
127    #[serde(flatten)]
128    pub extra: Object,
129}
130
131/// The `Quote` object.
132#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
133pub struct Quote {
134    /// The `kind` field.
135    #[serde(default)]
136    pub kind: QuoteKind,
137    /// The `operation` field.
138    #[serde(default)]
139    pub operation: String,
140    /// The `requestUnits` field.
141    #[serde(rename = "requestUnits", default)]
142    pub request_units: i64,
143    /// The `credits` field.
144    #[serde(default)]
145    pub credits: i64,
146    /// The `steps` field.
147    #[serde(default, deserialize_with = "crate::util::null_default")]
148    pub steps: Vec<QuoteStepsItem>,
149    /// The `transfers` field.
150    #[serde(default)]
151    pub transfers: QuoteTransfers,
152    /// The `withTransfers` field.
153    #[serde(rename = "withTransfers", default)]
154    pub with_transfers: QuoteWithTransfers,
155    /// The `ocrCreditRule` field.
156    #[serde(
157        rename = "ocrCreditRule",
158        default,
159        skip_serializing_if = "Option::is_none"
160    )]
161    pub ocr_credit_rule: Option<QuoteOcrCreditRule>,
162    /// The `notes` field.
163    #[serde(default, deserialize_with = "crate::util::null_default")]
164    pub notes: Vec<String>,
165    /// Fields this SDK version does not model.
166    #[serde(flatten)]
167    pub extra: Object,
168}
169
170/// The `PricingQuoteRequestStepsItem` object.
171#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
172pub struct PricingQuoteRequestStepsItem {
173    /// The `id` field.
174    #[serde(default, skip_serializing_if = "Option::is_none")]
175    pub id: Option<String>,
176    /// The `toolId` field.
177    #[serde(rename = "toolId", default)]
178    pub tool_id: String,
179    /// The `parameters` field.
180    #[serde(default, skip_serializing_if = "Option::is_none")]
181    pub parameters: Option<Object>,
182    /// The `inputs` field.
183    #[serde(default, skip_serializing_if = "Option::is_none")]
184    pub inputs: Option<Vec<Object>>,
185    /// The `assets` field.
186    #[serde(default, skip_serializing_if = "Option::is_none")]
187    pub assets: Option<Object>,
188    /// The `keep` field.
189    #[serde(default, skip_serializing_if = "Option::is_none")]
190    pub keep: Option<bool>,
191    /// The pages this step reads, when they differ from file.pages (for example after a split).
192    #[serde(default, skip_serializing_if = "Option::is_none")]
193    pub pages: Option<i64>,
194    /// Fields this SDK version does not model.
195    #[serde(flatten)]
196    pub extra: Object,
197}
198
199/// The `PricingQuoteRequestFile` object.
200#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
201pub struct PricingQuoteRequestFile {
202    /// The `pages` field.
203    #[serde(default, skip_serializing_if = "Option::is_none")]
204    pub pages: Option<i64>,
205    /// The `sizeBytes` field.
206    #[serde(rename = "sizeBytes", default, skip_serializing_if = "Option::is_none")]
207    pub size_bytes: Option<i64>,
208    /// Fields this SDK version does not model.
209    #[serde(flatten)]
210    pub extra: Object,
211}
212
213/// Send toolId (and parameters) for one document operation, or steps for a chain. Free: no key is
214/// needed, nothing is reserved and no usage is recorded.
215#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
216pub struct PricingQuoteRequest {
217    /// The `toolId` field.
218    #[serde(rename = "toolId", default, skip_serializing_if = "Option::is_none")]
219    pub tool_id: Option<String>,
220    /// The `parameters` field.
221    #[serde(default, skip_serializing_if = "Option::is_none")]
222    pub parameters: Option<Object>,
223    /// The `steps` field.
224    #[serde(default, skip_serializing_if = "Option::is_none")]
225    pub steps: Option<Vec<PricingQuoteRequestStepsItem>>,
226    /// The `file` field.
227    #[serde(default, skip_serializing_if = "Option::is_none")]
228    pub file: Option<PricingQuoteRequestFile>,
229    /// Fields this SDK version does not model.
230    #[serde(flatten)]
231    pub extra: Object,
232}
233
234/// The `WorkflowsValidateRequest` object.
235#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
236pub struct WorkflowsValidateRequest {
237    /// The `schemaVersion` field.
238    #[serde(rename = "schemaVersion", default)]
239    pub schema_version: String,
240    /// The `startNodeId` field.
241    #[serde(rename = "startNodeId", default)]
242    pub start_node_id: String,
243    /// The `nodes` field.
244    #[serde(default, deserialize_with = "crate::util::null_default")]
245    pub nodes: Vec<serde_json::Value>,
246    /// The `edges` field.
247    #[serde(default, deserialize_with = "crate::util::null_default")]
248    pub edges: Vec<serde_json::Value>,
249    /// Fields this SDK version does not model.
250    #[serde(flatten)]
251    pub extra: Object,
252}
253
254/// The `WorkflowsCreateRequest` object.
255#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
256pub struct WorkflowsCreateRequest {
257    /// The `name` field.
258    #[serde(default)]
259    pub name: String,
260    /// The `description` field.
261    #[serde(default, skip_serializing_if = "Option::is_none")]
262    pub description: Option<String>,
263    /// The `trigger` field.
264    #[serde(default, skip_serializing_if = "Option::is_none")]
265    pub trigger: Option<Object>,
266    /// The `graph` field.
267    #[serde(default, deserialize_with = "crate::util::null_default")]
268    pub graph: Object,
269    /// Fields this SDK version does not model.
270    #[serde(flatten)]
271    pub extra: Object,
272}
273
274/// The `WorkflowsUpdateRequest` object.
275#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
276pub struct WorkflowsUpdateRequest {
277    /// The `workflowId` field.
278    #[serde(rename = "workflowId", default)]
279    pub workflow_id: String,
280    /// Fields this SDK version does not model.
281    #[serde(flatten)]
282    pub extra: Object,
283}
284
285/// The `WorkflowsPublishRequest` object.
286#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
287pub struct WorkflowsPublishRequest {
288    /// The `workflowId` field.
289    #[serde(rename = "workflowId", default)]
290    pub workflow_id: String,
291    /// Fields this SDK version does not model.
292    #[serde(flatten)]
293    pub extra: Object,
294}
295
296/// The `WebhooksVerifyRemoteRequest` object.
297#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
298pub struct WebhooksVerifyRemoteRequest {
299    /// Fields this SDK version does not model.
300    #[serde(flatten)]
301    pub extra: Object,
302}
303
304string_enum! {
305    /// Allowed values of `WebhooksEndpointsCreateRequestOrderingMode`.
306    WebhooksEndpointsCreateRequestOrderingMode {
307        Unordered => "UNORDERED",
308        OrderedBySubject => "ORDERED_BY_SUBJECT",
309    }
310}
311
312string_enum! {
313    /// Allowed values of `WebhooksEndpointsCreateRequestSignatureScheme`.
314    WebhooksEndpointsCreateRequestSignatureScheme {
315        HmacSha256 => "HMAC_SHA256",
316        Ed25519 => "ED25519",
317    }
318}
319
320/// The `WebhooksEndpointsCreateRequest` object.
321#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
322pub struct WebhooksEndpointsCreateRequest {
323    /// The `url` field.
324    #[serde(default)]
325    pub url: String,
326    /// The `eventFilters` field.
327    #[serde(
328        rename = "eventFilters",
329        default,
330        deserialize_with = "crate::util::null_default"
331    )]
332    pub event_filters: Vec<String>,
333    /// The `description` field.
334    #[serde(default, skip_serializing_if = "Option::is_none")]
335    pub description: Option<String>,
336    /// The `maxConcurrency` field.
337    #[serde(
338        rename = "maxConcurrency",
339        default,
340        skip_serializing_if = "Option::is_none"
341    )]
342    pub max_concurrency: Option<i64>,
343    /// The `rateLimitPerSecond` field.
344    #[serde(
345        rename = "rateLimitPerSecond",
346        default,
347        skip_serializing_if = "Option::is_none"
348    )]
349    pub rate_limit_per_second: Option<i64>,
350    /// Static headers sent with every delivery (at most 20; HTTP token names; printable ASCII values up
351    /// to 1024 characters; Host, Content-*, webhook-*, Wellfriend-* and hop-by-hop names refused).
352    /// Stored encrypted.
353    #[serde(
354        rename = "customHeaders",
355        default,
356        skip_serializing_if = "Option::is_none"
357    )]
358    pub custom_headers: Option<Object>,
359    /// The `orderingMode` field.
360    #[serde(
361        rename = "orderingMode",
362        default,
363        skip_serializing_if = "Option::is_none"
364    )]
365    pub ordering_mode: Option<WebhooksEndpointsCreateRequestOrderingMode>,
366    /// The `signatureScheme` field.
367    #[serde(
368        rename = "signatureScheme",
369        default,
370        skip_serializing_if = "Option::is_none"
371    )]
372    pub signature_scheme: Option<WebhooksEndpointsCreateRequestSignatureScheme>,
373    /// Fields this SDK version does not model.
374    #[serde(flatten)]
375    pub extra: Object,
376}
377
378/// The `WebhooksEndpointsGetResponse` object.
379#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
380pub struct WebhooksEndpointsGetResponse {
381    /// The `endpoint` field.
382    #[serde(default, deserialize_with = "crate::util::null_default")]
383    pub endpoint: Object,
384    /// Fields this SDK version does not model.
385    #[serde(flatten)]
386    pub extra: Object,
387}
388
389string_enum! {
390    /// Allowed values of `WebhooksEndpointsUpdateRequestStatus`.
391    WebhooksEndpointsUpdateRequestStatus {
392        Active => "ACTIVE",
393        Disabled => "DISABLED",
394    }
395}
396
397string_enum! {
398    /// On re-enable: deliver queued deliveries, or skip (cancel) them.
399    WebhooksEndpointsUpdateRequestHeldDeliveries {
400        Deliver => "deliver",
401        Skip => "skip",
402    }
403}
404
405/// The `WebhooksEndpointsUpdateRequest` object.
406#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
407pub struct WebhooksEndpointsUpdateRequest {
408    /// The `url` field.
409    #[serde(default, skip_serializing_if = "Option::is_none")]
410    pub url: Option<String>,
411    /// The `eventFilters` field.
412    #[serde(
413        rename = "eventFilters",
414        default,
415        skip_serializing_if = "Option::is_none"
416    )]
417    pub event_filters: Option<Vec<String>>,
418    /// The `enabled` field.
419    #[serde(default, skip_serializing_if = "Option::is_none")]
420    pub enabled: Option<bool>,
421    /// The `status` field.
422    #[serde(default, skip_serializing_if = "Option::is_none")]
423    pub status: Option<WebhooksEndpointsUpdateRequestStatus>,
424    /// The `description` field.
425    #[serde(default, skip_serializing_if = "Option::is_none")]
426    pub description: Option<String>,
427    /// The `maxConcurrency` field.
428    #[serde(
429        rename = "maxConcurrency",
430        default,
431        skip_serializing_if = "Option::is_none"
432    )]
433    pub max_concurrency: Option<i64>,
434    /// The `rateLimitPerSecond` field.
435    #[serde(
436        rename = "rateLimitPerSecond",
437        default,
438        skip_serializing_if = "Option::is_none"
439    )]
440    pub rate_limit_per_second: Option<i64>,
441    /// Static headers sent with every delivery (at most 20; HTTP token names; printable ASCII values up
442    /// to 1024 characters; Host, Content-*, webhook-*, Wellfriend-* and hop-by-hop names refused).
443    /// Stored encrypted.
444    #[serde(
445        rename = "customHeaders",
446        default,
447        skip_serializing_if = "Option::is_none"
448    )]
449    pub custom_headers: Option<Object>,
450    /// The `orderingMode` field.
451    #[serde(
452        rename = "orderingMode",
453        default,
454        skip_serializing_if = "Option::is_none"
455    )]
456    pub ordering_mode: Option<WebhooksEndpointsCreateRequestOrderingMode>,
457    /// On re-enable: deliver queued deliveries, or skip (cancel) them.
458    #[serde(
459        rename = "heldDeliveries",
460        default,
461        skip_serializing_if = "Option::is_none"
462    )]
463    pub held_deliveries: Option<WebhooksEndpointsUpdateRequestHeldDeliveries>,
464    /// Fields this SDK version does not model.
465    #[serde(flatten)]
466    pub extra: Object,
467}
468
469/// The `WebhooksEndpointsDeleteResponse` object.
470#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
471pub struct WebhooksEndpointsDeleteResponse {
472    /// The `id` field.
473    #[serde(default)]
474    pub id: String,
475    /// The `deleted` field.
476    #[serde(default)]
477    pub deleted: String,
478    /// Fields this SDK version does not model.
479    #[serde(flatten)]
480    pub extra: Object,
481}
482
483/// The `WebhooksEndpointsDeleteRequest` object.
484#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
485pub struct WebhooksEndpointsDeleteRequest {
486    /// The `endpointId` field.
487    #[serde(rename = "endpointId", default)]
488    pub endpoint_id: String,
489    /// Fields this SDK version does not model.
490    #[serde(flatten)]
491    pub extra: Object,
492}
493
494/// The `WebhooksEndpointsTestRequest` object.
495#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
496pub struct WebhooksEndpointsTestRequest {
497    /// The `endpointId` field.
498    #[serde(rename = "endpointId", default)]
499    pub endpoint_id: String,
500    /// Fields this SDK version does not model.
501    #[serde(flatten)]
502    pub extra: Object,
503}
504
505/// The `WebhooksDeliveriesListItem` object.
506#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
507pub struct WebhooksDeliveriesListItem {
508    /// The `endpointUrl` field.
509    #[serde(
510        rename = "endpointUrl",
511        default,
512        skip_serializing_if = "Option::is_none"
513    )]
514    pub endpoint_url: Option<String>,
515    /// The `nextAttemptAt` field.
516    #[serde(
517        rename = "nextAttemptAt",
518        default,
519        skip_serializing_if = "Option::is_none"
520    )]
521    pub next_attempt_at: Option<String>,
522    /// The `lastHttpStatus` field.
523    #[serde(
524        rename = "lastHttpStatus",
525        default,
526        skip_serializing_if = "Option::is_none"
527    )]
528    pub last_http_status: Option<i64>,
529    /// The `lastDurationMilliseconds` field.
530    #[serde(
531        rename = "lastDurationMilliseconds",
532        default,
533        skip_serializing_if = "Option::is_none"
534    )]
535    pub last_duration_milliseconds: Option<i64>,
536    /// Fields this SDK version does not model.
537    #[serde(flatten)]
538    pub extra: Object,
539}
540
541/// The `WebhooksDeliveriesReplayRequest` object.
542#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
543pub struct WebhooksDeliveriesReplayRequest {
544    /// The `reason` field.
545    #[serde(default, skip_serializing_if = "Option::is_none")]
546    pub reason: Option<String>,
547    /// Fields this SDK version does not model.
548    #[serde(flatten)]
549    pub extra: Object,
550}
551
552/// The `WebhooksEndpointsRotateSecretResponse` object.
553#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
554pub struct WebhooksEndpointsRotateSecretResponse {
555    /// The `endpoint` field.
556    #[serde(default, deserialize_with = "crate::util::null_default")]
557    pub endpoint: Object,
558    /// The `secret` field.
559    #[serde(default, skip_serializing_if = "Option::is_none")]
560    pub secret: Option<String>,
561    /// The `publicKey` field.
562    #[serde(rename = "publicKey", default, skip_serializing_if = "Option::is_none")]
563    pub public_key: Option<String>,
564    /// The `keyId` field.
565    #[serde(rename = "keyId", default, skip_serializing_if = "Option::is_none")]
566    pub key_id: Option<String>,
567    /// The `version` field.
568    #[serde(default, skip_serializing_if = "Option::is_none")]
569    pub version: Option<i64>,
570    /// Fields this SDK version does not model.
571    #[serde(flatten)]
572    pub extra: Object,
573}
574
575/// Creates signing secret version n+1 (returned once) and keeps the previous secret valid for
576/// overlapSeconds. Every delivery carries one signature per still-valid secret, newest first.
577#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
578pub struct WebhooksEndpointsRotateSecretRequest {
579    /// The `overlapSeconds` field.
580    #[serde(
581        rename = "overlapSeconds",
582        default,
583        skip_serializing_if = "Option::is_none"
584    )]
585    pub overlap_seconds: Option<i64>,
586    /// Fields this SDK version does not model.
587    #[serde(flatten)]
588    pub extra: Object,
589}
590
591/// The `WebhooksEndpointsReplayResponseReplayJob` object.
592#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
593pub struct WebhooksEndpointsReplayResponseReplayJob {
594    /// The `id` field.
595    #[serde(default)]
596    pub id: String,
597    /// The `status` field.
598    #[serde(default)]
599    pub status: String,
600    /// The `queued` field.
601    #[serde(default)]
602    pub queued: i64,
603    /// Fields this SDK version does not model.
604    #[serde(flatten)]
605    pub extra: Object,
606}
607
608/// The `WebhooksEndpointsReplayResponse` object.
609#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
610pub struct WebhooksEndpointsReplayResponse {
611    /// The `replayJob` field.
612    #[serde(rename = "replayJob", default)]
613    pub replay_job: WebhooksEndpointsReplayResponseReplayJob,
614    /// Fields this SDK version does not model.
615    #[serde(flatten)]
616    pub extra: Object,
617}
618
619string_enum! {
620    /// Allowed values of `WebhooksEndpointsReplayRequestStatusesItem`.
621    WebhooksEndpointsReplayRequestStatusesItem {
622        DeadLetter => "DEAD_LETTER",
623        Failed => "FAILED",
624    }
625}
626
627/// Replays, per event, the newest delivery generation that is in one of statuses and was created
628/// since; at most 10000 per request. Each copy is a new generation; webhook-id stays the event id
629/// and Wellfriend-Replay carries the generation.
630#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
631pub struct WebhooksEndpointsReplayRequest {
632    /// At most 30 days ago.
633    #[serde(default)]
634    pub since: String,
635    /// The `statuses` field.
636    #[serde(default, skip_serializing_if = "Option::is_none")]
637    pub statuses: Option<Vec<WebhooksEndpointsReplayRequestStatusesItem>>,
638    /// Fields this SDK version does not model.
639    #[serde(flatten)]
640    pub extra: Object,
641}
642
643/// The `WebhooksEndpointsInsightsResponse` object.
644#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
645pub struct WebhooksEndpointsInsightsResponse {
646    /// The `endpoint` field.
647    #[serde(default, deserialize_with = "crate::util::null_default")]
648    pub endpoint: Object,
649    /// The `circuit` field.
650    #[serde(default, deserialize_with = "crate::util::null_default")]
651    pub circuit: Object,
652    /// The `signingKeys` field.
653    #[serde(
654        rename = "signingKeys",
655        default,
656        deserialize_with = "crate::util::null_default"
657    )]
658    pub signing_keys: Vec<Object>,
659    /// 24-hour and 7-day delivery counts, attempt success rate, p50/p95 latency and the status and
660    /// failure-code breakdown.
661    #[serde(default, deserialize_with = "crate::util::null_default")]
662    pub metrics: Vec<Object>,
663    /// The `healthEvents` field.
664    #[serde(
665        rename = "healthEvents",
666        default,
667        deserialize_with = "crate::util::null_default"
668    )]
669    pub health_events: Vec<Object>,
670    /// The `activity` field.
671    #[serde(default, deserialize_with = "crate::util::null_default")]
672    pub activity: Vec<Object>,
673    /// Fields this SDK version does not model.
674    #[serde(flatten)]
675    pub extra: Object,
676}
677
678/// The `WebhooksDeliveriesGetResponse` object.
679#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
680pub struct WebhooksDeliveriesGetResponse {
681    /// The delivery with its payload (body), replay lineage (replayOf, replays) and attemptsLog: each
682    /// attempt's request path, signed timestamp, body digest, the keys that signed it, response status,
683    /// bytes, digest and excerpt, remote address, Retry-After, failure code and timing. Signature
684    /// values are never stored.
685    #[serde(default, deserialize_with = "crate::util::null_default")]
686    pub delivery: Object,
687    /// Fields this SDK version does not model.
688    #[serde(flatten)]
689    pub extra: Object,
690}
691
692/// Query parameters of `documents.list`.
693#[derive(Debug, Clone, Default, PartialEq)]
694pub struct DocumentsListParams {
695    /// Page size; values above 100 are capped at 100.
696    pub limit: Option<u32>,
697    /// Opaque nextCursor from the previous page.
698    pub cursor: Option<String>,
699    /// Keeps documents whose title or id contains this text, ignoring case.
700    pub q: Option<String>,
701}
702
703string_enum! {
704    /// Allowed values of `UploadStatus`.
705    UploadStatus {
706        Uploading => "uploading",
707        Processing => "processing",
708        Completed => "completed",
709        Failed => "failed",
710        Cancelled => "cancelled",
711        Expired => "expired",
712    }
713}
714
715/// The `Upload` object.
716#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
717pub struct Upload {
718    /// The `uploadId` field.
719    #[serde(rename = "uploadId", default)]
720    pub upload_id: String,
721    /// The `status` field.
722    #[serde(default)]
723    pub status: UploadStatus,
724    /// The `filename` field.
725    #[serde(default)]
726    pub filename: String,
727    /// The `title` field.
728    #[serde(default, skip_serializing_if = "Option::is_none")]
729    pub title: Option<String>,
730    /// The `contentType` field.
731    #[serde(rename = "contentType", default)]
732    pub content_type: String,
733    /// The `sizeBytes` field.
734    #[serde(rename = "sizeBytes", default)]
735    pub size_bytes: i64,
736    /// The `sha256` field.
737    #[serde(default, skip_serializing_if = "Option::is_none")]
738    pub sha256: Option<String>,
739    /// Every part is exactly this long (8 MiB = 8,388,608 bytes) except the last.
740    #[serde(rename = "partSizeBytes", default)]
741    pub part_size_bytes: i64,
742    /// The `partCount` field.
743    #[serde(rename = "partCount", default)]
744    pub part_count: i64,
745    /// The `receivedParts` field.
746    #[serde(
747        rename = "receivedParts",
748        default,
749        deserialize_with = "crate::util::null_default"
750    )]
751    pub received_parts: Vec<i64>,
752    /// The `receivedBytes` field.
753    #[serde(
754        rename = "receivedBytes",
755        default,
756        skip_serializing_if = "Option::is_none"
757    )]
758    pub received_bytes: Option<i64>,
759    /// The `documentId` field.
760    #[serde(
761        rename = "documentId",
762        default,
763        skip_serializing_if = "Option::is_none"
764    )]
765    pub document_id: Option<String>,
766    /// The `versionId` field.
767    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
768    pub version_id: Option<String>,
769    /// The `error` field.
770    #[serde(default, skip_serializing_if = "Option::is_none")]
771    pub error: Option<Object>,
772    /// The `createdAt` field.
773    #[serde(rename = "createdAt", default, skip_serializing_if = "Option::is_none")]
774    pub created_at: Option<String>,
775    /// The `expiresAt` field.
776    #[serde(rename = "expiresAt", default)]
777    pub expires_at: String,
778    /// Fields this SDK version does not model.
779    #[serde(flatten)]
780    pub extra: Object,
781}
782
783/// The `UploadsCreateRequest` object.
784#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
785pub struct UploadsCreateRequest {
786    /// The `filename` field.
787    #[serde(default)]
788    pub filename: String,
789    /// The `contentType` field.
790    #[serde(rename = "contentType", default)]
791    pub content_type: String,
792    /// Exact file size in bytes. Must be within your plan's per-file limit: FREE 100 MiB, D1 100 MiB,
793    /// D2 100 MiB, D3 200 MiB (1 MiB = 1,048,576 bytes).
794    #[serde(rename = "sizeBytes", default)]
795    pub size_bytes: i64,
796    /// SHA-256 of the whole file. Required above 50 MiB.
797    #[serde(default, skip_serializing_if = "Option::is_none")]
798    pub sha256: Option<String>,
799    /// The `title` field.
800    #[serde(default, skip_serializing_if = "Option::is_none")]
801    pub title: Option<String>,
802    /// Fields this SDK version does not model.
803    #[serde(flatten)]
804    pub extra: Object,
805}
806
807/// The `UploadsAbortRequest` object.
808#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
809pub struct UploadsAbortRequest {
810    /// The `uploadId` field.
811    #[serde(rename = "uploadId", default)]
812    pub upload_id: String,
813    /// Fields this SDK version does not model.
814    #[serde(flatten)]
815    pub extra: Object,
816}
817
818/// The `UploadPart` object.
819#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
820pub struct UploadPart {
821    /// The `uploadId` field.
822    #[serde(rename = "uploadId", default)]
823    pub upload_id: String,
824    /// The `partIndex` field.
825    #[serde(rename = "partIndex", default)]
826    pub part_index: i64,
827    /// The `sizeBytes` field.
828    #[serde(rename = "sizeBytes", default)]
829    pub size_bytes: i64,
830    /// The `sha256` field.
831    #[serde(default)]
832    pub sha256: String,
833    /// The `alreadyReceived` field.
834    #[serde(rename = "alreadyReceived", default)]
835    pub already_received: bool,
836    /// Fields this SDK version does not model.
837    #[serde(flatten)]
838    pub extra: Object,
839}
840
841/// The `UploadsCompleteRequest` object.
842#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
843pub struct UploadsCompleteRequest {
844    /// Fields this SDK version does not model.
845    #[serde(flatten)]
846    pub extra: Object,
847}
848
849string_enum! {
850    /// The tool to run; /docs/developer-api/tools lists every tool and its options. A completed
851    /// operation reports outputDocumentId and outputVersionId. ocr-pdf runs OCR as an ordinary
852    /// operation (a searchable PDF, or the recognised text as text, Markdown, JSON or DOCX), billed in
853    /// credits from the plan's pool plus one request unit. Deprecated ids of merged tools (html-to-pdf,
854    /// url-to-pdf, html-to-image, pdfa-validation, pdfua-validation, pdf-signature-validation,
855    /// linearize-pdf) are still accepted and run as the tool they now are.
856    DocumentOperationsCreateRequestToolId {
857        AddPageNumbers => "add-page-numbers",
858        AddWatermark => "add-watermark",
859        CheckPdf => "check-pdf",
860        CompressPdf => "compress-pdf",
861        ConvertFromJpg => "convert-from-jpg",
862        ConvertToJpg => "convert-to-jpg",
863        CropImage => "crop-image",
864        CropPdf => "crop-pdf",
865        CsvToPdf => "csv-to-pdf",
866        EditMetadata => "edit-metadata",
867        ExcelToPdf => "excel-to-pdf",
868        FlattenPdf => "flatten-pdf",
869        ImageMetadata => "image-metadata",
870        ImageToPdf => "image-to-pdf",
871        JsonToPdf => "json-to-pdf",
872        MarkdownToPdf => "markdown-to-pdf",
873        MergePdf => "merge-pdf",
874        NUpPdf => "n-up-pdf",
875        OcrPdf => "ocr-pdf",
876        OrganizePdf => "organize-pdf",
877        PdfEdit => "pdf-edit",
878        PdfTableExtraction => "pdf-table-extraction",
879        PdfToChunks => "pdf-to-chunks",
880        PdfToEpub => "pdf-to-epub",
881        PdfToExcel => "pdf-to-excel",
882        PdfToHtml => "pdf-to-html",
883        PdfToImages => "pdf-to-images",
884        PdfToJson => "pdf-to-json",
885        PdfToMarkdown => "pdf-to-markdown",
886        PdfToPowerpoint => "pdf-to-powerpoint",
887        PdfToText => "pdf-to-text",
888        PdfToWord => "pdf-to-word",
889        PdfaConversion => "pdfa-conversion",
890        PowerpointToPdf => "powerpoint-to-pdf",
891        ProtectPdf => "protect-pdf",
892        RenderPage => "render-page",
893        RepairPdf => "repair-pdf",
894        ResizeImage => "resize-image",
895        RotateImage => "rotate-image",
896        RotatePdf => "rotate-pdf",
897        SanitizePdf => "sanitize-pdf",
898        RedactPdf => "redact-pdf",
899        ScalePdf => "scale-pdf",
900        SignPdf => "sign-pdf",
901        SplitPdf => "split-pdf",
902        SvgToPdf => "svg-to-pdf",
903        TextToPdf => "text-to-pdf",
904        UnlockPdf => "unlock-pdf",
905        WatermarkImage => "watermark-image",
906        WebCapture => "web-capture",
907        WordToPdf => "word-to-pdf",
908    }
909}
910
911/// The `DocumentOperationsCreateRequestInputsItem` object.
912#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
913pub struct DocumentOperationsCreateRequestInputsItem {
914    /// The `documentId` field.
915    #[serde(rename = "documentId", default)]
916    pub document_id: String,
917    /// An immutable version; omitted means the document's current version.
918    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
919    pub version_id: Option<String>,
920    /// Fields this SDK version does not model.
921    #[serde(flatten)]
922    pub extra: Object,
923}
924
925/// The `DocumentOperationsCreateRequestAssetsValue` object.
926#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
927pub struct DocumentOperationsCreateRequestAssetsValue {
928    /// The `documentId` field.
929    #[serde(
930        rename = "documentId",
931        default,
932        skip_serializing_if = "Option::is_none"
933    )]
934    pub document_id: Option<String>,
935    /// The `versionId` field.
936    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
937    pub version_id: Option<String>,
938    /// Base64 file content, for inline assets only (certificateFile).
939    #[serde(default, skip_serializing_if = "Option::is_none")]
940    pub content: Option<String>,
941    /// The `fileName` field.
942    #[serde(rename = "fileName", default, skip_serializing_if = "Option::is_none")]
943    pub file_name: Option<String>,
944    /// Fields this SDK version does not model.
945    #[serde(flatten)]
946    pub extra: Object,
947}
948
949/// Instead of documentId/versionId: the output of an earlier operation (chaining without a
950/// re-upload). There is no limit on how many operations follow one another this way.
951#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
952pub struct DocumentOperationsCreateRequestSource {
953    /// An earlier operation of this workspace whose output this operation reads, with no re-upload.
954    /// While it is queued or running this operation is accepted in state waiting and queued when it
955    /// completes; if it fails this operation fails with SOURCE_FAILED and its request unit is given
956    /// back.
957    #[serde(rename = "operationId", default)]
958    pub operation_id: String,
959    /// 0 (default): the whole output. n &gt;= 1: part n of a multi-part (ZIP) output (split-pdf,
960    /// pdf-to-images, pdf-table-extraction), see GET /api/v2/document-operations/{operationId}/outputs.
961    #[serde(default, skip_serializing_if = "Option::is_none")]
962    pub output: Option<i64>,
963    /// Fields this SDK version does not model.
964    #[serde(flatten)]
965    pub extra: Object,
966}
967
968/// The `DocumentOperationsCreateRequest` object.
969#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
970pub struct DocumentOperationsCreateRequest {
971    /// The document to process (its current version unless versionId is set). Required unless source
972    /// names an earlier operation.
973    #[serde(
974        rename = "documentId",
975        default,
976        skip_serializing_if = "Option::is_none"
977    )]
978    pub document_id: Option<String>,
979    /// The `versionId` field.
980    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
981    pub version_id: Option<String>,
982    /// The tool to run; /docs/developer-api/tools lists every tool and its options. A completed
983    /// operation reports outputDocumentId and outputVersionId. ocr-pdf runs OCR as an ordinary
984    /// operation (a searchable PDF, or the recognised text as text, Markdown, JSON or DOCX), billed in
985    /// credits from the plan's pool plus one request unit. Deprecated ids of merged tools (html-to-pdf,
986    /// url-to-pdf, html-to-image, pdfa-validation, pdfua-validation, pdf-signature-validation,
987    /// linearize-pdf) are still accepted and run as the tool they now are.
988    #[serde(rename = "toolId", default)]
989    pub tool_id: DocumentOperationsCreateRequestToolId,
990    /// Each value is checked against the catalog before queueing: its type, its choices, its range, and
991    /// options required by the selected mode. Unknown parameters, AI mode and invalid values are
992    /// refused with 400 OPERATION_INPUT_INVALID; an input version of a type the tool does not read is
993    /// refused with 422 OPERATION_INPUT_UNSUPPORTED. Passwords and passphrases are encrypted before
994    /// queueing and never reported back. For pdf-edit: {"edit": {"operation": "REPLACE_TEXT", ...}} and
995    /// an optional outputName. File content inside an edit command (replacement_image,
996    /// mutation.import_pdf) and an inline certificate are base64; the request body may be up to 12 MB.
997    #[serde(default, skip_serializing_if = "Option::is_none")]
998    pub parameters: Option<Object>,
999    /// Further input versions after documentId/versionId, in processing order, for tools that read
1000    /// several files: merge-pdf (2 to 30 PDFs in all) and image-to-pdf (1 to 50 images in all). Each
1001    /// must be a version of this workspace of a type and size the tool reads; any other tool refuses
1002    /// inputs with 400 OPERATION_INPUT_INVALID.
1003    #[serde(default, skip_serializing_if = "Option::is_none")]
1004    pub inputs: Option<Vec<DocumentOperationsCreateRequestInputsItem>>,
1005    /// Named asset files a tool reads: add-watermark watermarkImage (type image), watermark-image
1006    /// watermarkImage (mode image), sign-pdf signatureImage (signatureType image), stampImage (stamp
1007    /// fields) and certificateFile (signatureType digital).
1008    #[serde(default, skip_serializing_if = "Option::is_none")]
1009    pub assets:
1010        Option<std::collections::BTreeMap<String, DocumentOperationsCreateRequestAssetsValue>>,
1011    /// Instead of documentId/versionId: the output of an earlier operation (chaining without a
1012    /// re-upload). There is no limit on how many operations follow one another this way.
1013    #[serde(default, skip_serializing_if = "Option::is_none")]
1014    pub source: Option<DocumentOperationsCreateRequestSource>,
1015    /// Fields this SDK version does not model.
1016    #[serde(flatten)]
1017    pub extra: Object,
1018}
1019
1020/// The `SecureLinksCreateRequest` object.
1021#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1022pub struct SecureLinksCreateRequest {
1023    /// The `documentId` field.
1024    #[serde(rename = "documentId", default)]
1025    pub document_id: String,
1026    /// The `versionId` field.
1027    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
1028    pub version_id: Option<String>,
1029    /// The `authenticationMode` field.
1030    #[serde(
1031        rename = "authenticationMode",
1032        default,
1033        skip_serializing_if = "Option::is_none"
1034    )]
1035    pub authentication_mode: Option<String>,
1036    /// The `expiresAt` field.
1037    #[serde(rename = "expiresAt", default, skip_serializing_if = "Option::is_none")]
1038    pub expires_at: Option<String>,
1039    /// The `maximumViews` field.
1040    #[serde(
1041        rename = "maximumViews",
1042        default,
1043        skip_serializing_if = "Option::is_none"
1044    )]
1045    pub maximum_views: Option<i64>,
1046    /// Fields this SDK version does not model.
1047    #[serde(flatten)]
1048    pub extra: Object,
1049}
1050
1051/// The `SecureLinksUpdateRequest` object.
1052#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1053pub struct SecureLinksUpdateRequest {
1054    /// The `expiresAt` field.
1055    #[serde(rename = "expiresAt", default, skip_serializing_if = "Option::is_none")]
1056    pub expires_at: Option<String>,
1057    /// The `maximumViews` field.
1058    #[serde(
1059        rename = "maximumViews",
1060        default,
1061        skip_serializing_if = "Option::is_none"
1062    )]
1063    pub maximum_views: Option<i64>,
1064    /// Fields this SDK version does not model.
1065    #[serde(flatten)]
1066    pub extra: Object,
1067}
1068
1069/// The `SecureLinksRevokeRequest` object.
1070#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1071pub struct SecureLinksRevokeRequest {
1072    /// The `linkId` field.
1073    #[serde(rename = "linkId", default)]
1074    pub link_id: String,
1075    /// Fields this SDK version does not model.
1076    #[serde(flatten)]
1077    pub extra: Object,
1078}
1079
1080/// The `SecureLinksVersionRequest` object.
1081#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1082pub struct SecureLinksVersionRequest {
1083    /// The `versionId` field.
1084    #[serde(rename = "versionId", default)]
1085    pub version_id: String,
1086    /// The `reason` field.
1087    #[serde(default)]
1088    pub reason: String,
1089    /// The `reauthenticate` field.
1090    #[serde(default, skip_serializing_if = "Option::is_none")]
1091    pub reauthenticate: Option<bool>,
1092    /// Fields this SDK version does not model.
1093    #[serde(flatten)]
1094    pub extra: Object,
1095}
1096
1097/// The `SecureLinksRecipientsAddRequestRecipientsItem` object.
1098#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1099pub struct SecureLinksRecipientsAddRequestRecipientsItem {
1100    /// The `email` field.
1101    #[serde(default)]
1102    pub email: String,
1103    /// The `displayName` field.
1104    #[serde(
1105        rename = "displayName",
1106        default,
1107        skip_serializing_if = "Option::is_none"
1108    )]
1109    pub display_name: Option<String>,
1110    /// The `maximumViews` field.
1111    #[serde(
1112        rename = "maximumViews",
1113        default,
1114        skip_serializing_if = "Option::is_none"
1115    )]
1116    pub maximum_views: Option<i64>,
1117    /// The `expiresAt` field.
1118    #[serde(rename = "expiresAt", default, skip_serializing_if = "Option::is_none")]
1119    pub expires_at: Option<String>,
1120    /// The `downloadPolicy` field.
1121    #[serde(
1122        rename = "downloadPolicy",
1123        default,
1124        skip_serializing_if = "Option::is_none"
1125    )]
1126    pub download_policy: Option<String>,
1127    /// The `printPolicy` field.
1128    #[serde(
1129        rename = "printPolicy",
1130        default,
1131        skip_serializing_if = "Option::is_none"
1132    )]
1133    pub print_policy: Option<String>,
1134    /// Fields this SDK version does not model.
1135    #[serde(flatten)]
1136    pub extra: Object,
1137}
1138
1139/// The `SecureLinksRecipientsAddRequest` object.
1140#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1141pub struct SecureLinksRecipientsAddRequest {
1142    /// The `recipients` field.
1143    #[serde(default, deserialize_with = "crate::util::null_default")]
1144    pub recipients: Vec<SecureLinksRecipientsAddRequestRecipientsItem>,
1145    /// Fields this SDK version does not model.
1146    #[serde(flatten)]
1147    pub extra: Object,
1148}
1149
1150/// The `SecureLinksPasswordRequest` object.
1151#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1152pub struct SecureLinksPasswordRequest {
1153    /// The `password` field.
1154    #[serde(default)]
1155    pub password: String,
1156    /// The `reason` field.
1157    #[serde(default)]
1158    pub reason: String,
1159    /// The `revokeSessions` field.
1160    #[serde(
1161        rename = "revokeSessions",
1162        default,
1163        skip_serializing_if = "Option::is_none"
1164    )]
1165    pub revoke_sessions: Option<bool>,
1166    /// Fields this SDK version does not model.
1167    #[serde(flatten)]
1168    pub extra: Object,
1169}
1170
1171/// The `SecureLinksSessionsRevokeRequest` object.
1172#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1173pub struct SecureLinksSessionsRevokeRequest {
1174    /// The `reason` field.
1175    #[serde(default, skip_serializing_if = "Option::is_none")]
1176    pub reason: Option<String>,
1177    /// Fields this SDK version does not model.
1178    #[serde(flatten)]
1179    pub extra: Object,
1180}
1181
1182/// The `WorkflowRunsCreateRequest` object.
1183#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1184pub struct WorkflowRunsCreateRequest {
1185    /// The `input` field.
1186    #[serde(default, deserialize_with = "crate::util::null_default")]
1187    pub input: Object,
1188    /// Fields this SDK version does not model.
1189    #[serde(flatten)]
1190    pub extra: Object,
1191}
1192
1193/// The `WorkflowRunsCancelRequest` object.
1194#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1195pub struct WorkflowRunsCancelRequest {
1196    /// The `runId` field.
1197    #[serde(rename = "runId", default)]
1198    pub run_id: String,
1199    /// Fields this SDK version does not model.
1200    #[serde(flatten)]
1201    pub extra: Object,
1202}
1203
1204/// The `WorkflowRunsReplayRequest` object.
1205#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1206pub struct WorkflowRunsReplayRequest {
1207    /// The `runId` field.
1208    #[serde(rename = "runId", default)]
1209    pub run_id: String,
1210    /// Fields this SDK version does not model.
1211    #[serde(flatten)]
1212    pub extra: Object,
1213}
1214
1215string_enum! {
1216    /// Allowed values of `WorkflowApprovalsDecideRequestDecision`.
1217    WorkflowApprovalsDecideRequestDecision {
1218        Approve => "approve",
1219        Reject => "reject",
1220    }
1221}
1222
1223/// The `WorkflowApprovalsDecideRequest` object.
1224#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1225pub struct WorkflowApprovalsDecideRequest {
1226    /// The `decision` field.
1227    #[serde(default)]
1228    pub decision: WorkflowApprovalsDecideRequestDecision,
1229    /// The `reason` field.
1230    #[serde(default, skip_serializing_if = "Option::is_none")]
1231    pub reason: Option<String>,
1232    /// Fields this SDK version does not model.
1233    #[serde(flatten)]
1234    pub extra: Object,
1235}
1236
1237/// The `ConnectorsAccountsTestRequest` object.
1238#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1239pub struct ConnectorsAccountsTestRequest {
1240    /// The `accountId` field.
1241    #[serde(rename = "accountId", default)]
1242    pub account_id: String,
1243    /// Fields this SDK version does not model.
1244    #[serde(flatten)]
1245    pub extra: Object,
1246}
1247
1248/// The `ConnectorsAccountsDisconnectRequest` object.
1249#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1250pub struct ConnectorsAccountsDisconnectRequest {
1251    /// The `accountId` field.
1252    #[serde(rename = "accountId", default)]
1253    pub account_id: String,
1254    /// Fields this SDK version does not model.
1255    #[serde(flatten)]
1256    pub extra: Object,
1257}
1258
1259/// The `ConnectorsImportRequest` object.
1260#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1261pub struct ConnectorsImportRequest {
1262    /// Fields this SDK version does not model.
1263    #[serde(flatten)]
1264    pub extra: Object,
1265}
1266
1267/// The `ConnectorsSendRequest` object.
1268#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1269pub struct ConnectorsSendRequest {
1270    /// Fields this SDK version does not model.
1271    #[serde(flatten)]
1272    pub extra: Object,
1273}
1274
1275/// The `ConnectorsExportRequest` object.
1276#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1277pub struct ConnectorsExportRequest {
1278    /// Fields this SDK version does not model.
1279    #[serde(flatten)]
1280    pub extra: Object,
1281}
1282
1283/// The `ConnectorsGenericCreateRequest` object.
1284#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1285pub struct ConnectorsGenericCreateRequest {
1286    /// The `name` field.
1287    #[serde(default)]
1288    pub name: String,
1289    /// The `endpoint` field.
1290    #[serde(default)]
1291    pub endpoint: String,
1292    /// The `authorizationScheme` field.
1293    #[serde(
1294        rename = "authorizationScheme",
1295        default,
1296        skip_serializing_if = "Option::is_none"
1297    )]
1298    pub authorization_scheme: Option<String>,
1299    /// The `secret` field.
1300    #[serde(default)]
1301    pub secret: String,
1302    /// Fields this SDK version does not model.
1303    #[serde(flatten)]
1304    pub extra: Object,
1305}
1306
1307/// The `ConnectorsGenericTriggerRequest` object.
1308#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1309pub struct ConnectorsGenericTriggerRequest {
1310    /// The `accountId` field.
1311    #[serde(rename = "accountId", default)]
1312    pub account_id: String,
1313    /// Fields this SDK version does not model.
1314    #[serde(flatten)]
1315    pub extra: Object,
1316}
1317
1318/// The `TemplatesCreateRequest` object.
1319#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1320pub struct TemplatesCreateRequest {
1321    /// The `title` field.
1322    #[serde(default)]
1323    pub title: String,
1324    /// The `documentId` field.
1325    #[serde(
1326        rename = "documentId",
1327        default,
1328        skip_serializing_if = "Option::is_none"
1329    )]
1330    pub document_id: Option<String>,
1331    /// The `versionId` field.
1332    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
1333    pub version_id: Option<String>,
1334    /// The `parentId` field.
1335    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
1336    pub parent_id: Option<String>,
1337    /// The `definition` field.
1338    #[serde(default, deserialize_with = "crate::util::null_default")]
1339    pub definition: Object,
1340    /// Fields this SDK version does not model.
1341    #[serde(flatten)]
1342    pub extra: Object,
1343}
1344
1345/// The `TemplatesUpdateRequest` object.
1346#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1347pub struct TemplatesUpdateRequest {
1348    /// The `title` field.
1349    #[serde(default, skip_serializing_if = "Option::is_none")]
1350    pub title: Option<String>,
1351    /// The `definition` field.
1352    #[serde(default, deserialize_with = "crate::util::null_default")]
1353    pub definition: Object,
1354    /// The `expectedRevision` field.
1355    #[serde(rename = "expectedRevision", default)]
1356    pub expected_revision: i64,
1357    /// Fields this SDK version does not model.
1358    #[serde(flatten)]
1359    pub extra: Object,
1360}
1361
1362/// The `TemplatesTransitionRequest` object.
1363#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1364pub struct TemplatesTransitionRequest {
1365    /// The `action` field.
1366    #[serde(default)]
1367    pub action: String,
1368    /// The `expectedRevision` field.
1369    #[serde(rename = "expectedRevision", default)]
1370    pub expected_revision: i64,
1371    /// The `reason` field.
1372    #[serde(default, skip_serializing_if = "Option::is_none")]
1373    pub reason: Option<String>,
1374    /// Fields this SDK version does not model.
1375    #[serde(flatten)]
1376    pub extra: Object,
1377}
1378
1379/// The `SignatureRequestsCreateRequest` object.
1380#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1381pub struct SignatureRequestsCreateRequest {
1382    /// The `title` field.
1383    #[serde(default)]
1384    pub title: String,
1385    /// The `documentId` field.
1386    #[serde(
1387        rename = "documentId",
1388        default,
1389        skip_serializing_if = "Option::is_none"
1390    )]
1391    pub document_id: Option<String>,
1392    /// The `versionId` field.
1393    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
1394    pub version_id: Option<String>,
1395    /// The `parentId` field.
1396    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
1397    pub parent_id: Option<String>,
1398    /// The `definition` field.
1399    #[serde(default, deserialize_with = "crate::util::null_default")]
1400    pub definition: Object,
1401    /// Fields this SDK version does not model.
1402    #[serde(flatten)]
1403    pub extra: Object,
1404}
1405
1406/// The `SignatureRequestsUpdateRequest` object.
1407#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1408pub struct SignatureRequestsUpdateRequest {
1409    /// The `title` field.
1410    #[serde(default, skip_serializing_if = "Option::is_none")]
1411    pub title: Option<String>,
1412    /// The `definition` field.
1413    #[serde(default, deserialize_with = "crate::util::null_default")]
1414    pub definition: Object,
1415    /// The `expectedRevision` field.
1416    #[serde(rename = "expectedRevision", default)]
1417    pub expected_revision: i64,
1418    /// Fields this SDK version does not model.
1419    #[serde(flatten)]
1420    pub extra: Object,
1421}
1422
1423/// The `SignatureRequestsTransitionRequest` object.
1424#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1425pub struct SignatureRequestsTransitionRequest {
1426    /// The `action` field.
1427    #[serde(default)]
1428    pub action: String,
1429    /// The `expectedRevision` field.
1430    #[serde(rename = "expectedRevision", default)]
1431    pub expected_revision: i64,
1432    /// The `reason` field.
1433    #[serde(default, skip_serializing_if = "Option::is_none")]
1434    pub reason: Option<String>,
1435    /// Fields this SDK version does not model.
1436    #[serde(flatten)]
1437    pub extra: Object,
1438}
1439
1440/// The `AnnotationsCreateRequest` object.
1441#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1442pub struct AnnotationsCreateRequest {
1443    /// The `title` field.
1444    #[serde(default)]
1445    pub title: String,
1446    /// The `documentId` field.
1447    #[serde(
1448        rename = "documentId",
1449        default,
1450        skip_serializing_if = "Option::is_none"
1451    )]
1452    pub document_id: Option<String>,
1453    /// The `versionId` field.
1454    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
1455    pub version_id: Option<String>,
1456    /// The `parentId` field.
1457    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
1458    pub parent_id: Option<String>,
1459    /// The `definition` field.
1460    #[serde(default, deserialize_with = "crate::util::null_default")]
1461    pub definition: Object,
1462    /// Fields this SDK version does not model.
1463    #[serde(flatten)]
1464    pub extra: Object,
1465}
1466
1467/// The `AnnotationsUpdateRequest` object.
1468#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1469pub struct AnnotationsUpdateRequest {
1470    /// The `title` field.
1471    #[serde(default, skip_serializing_if = "Option::is_none")]
1472    pub title: Option<String>,
1473    /// The `definition` field.
1474    #[serde(default, deserialize_with = "crate::util::null_default")]
1475    pub definition: Object,
1476    /// The `expectedRevision` field.
1477    #[serde(rename = "expectedRevision", default)]
1478    pub expected_revision: i64,
1479    /// Fields this SDK version does not model.
1480    #[serde(flatten)]
1481    pub extra: Object,
1482}
1483
1484/// The `AnnotationsTransitionRequest` object.
1485#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1486pub struct AnnotationsTransitionRequest {
1487    /// The `action` field.
1488    #[serde(default)]
1489    pub action: String,
1490    /// The `expectedRevision` field.
1491    #[serde(rename = "expectedRevision", default)]
1492    pub expected_revision: i64,
1493    /// The `reason` field.
1494    #[serde(default, skip_serializing_if = "Option::is_none")]
1495    pub reason: Option<String>,
1496    /// Fields this SDK version does not model.
1497    #[serde(flatten)]
1498    pub extra: Object,
1499}
1500
1501/// The `FormsCreateRequest` object.
1502#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1503pub struct FormsCreateRequest {
1504    /// The `title` field.
1505    #[serde(default)]
1506    pub title: String,
1507    /// The `documentId` field.
1508    #[serde(
1509        rename = "documentId",
1510        default,
1511        skip_serializing_if = "Option::is_none"
1512    )]
1513    pub document_id: Option<String>,
1514    /// The `versionId` field.
1515    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
1516    pub version_id: Option<String>,
1517    /// The `parentId` field.
1518    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
1519    pub parent_id: Option<String>,
1520    /// The `definition` field.
1521    #[serde(default, deserialize_with = "crate::util::null_default")]
1522    pub definition: Object,
1523    /// Fields this SDK version does not model.
1524    #[serde(flatten)]
1525    pub extra: Object,
1526}
1527
1528/// The `FormsUpdateRequest` object.
1529#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1530pub struct FormsUpdateRequest {
1531    /// The `title` field.
1532    #[serde(default, skip_serializing_if = "Option::is_none")]
1533    pub title: Option<String>,
1534    /// The `definition` field.
1535    #[serde(default, deserialize_with = "crate::util::null_default")]
1536    pub definition: Object,
1537    /// The `expectedRevision` field.
1538    #[serde(rename = "expectedRevision", default)]
1539    pub expected_revision: i64,
1540    /// Fields this SDK version does not model.
1541    #[serde(flatten)]
1542    pub extra: Object,
1543}
1544
1545/// The `FormsTransitionRequest` object.
1546#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1547pub struct FormsTransitionRequest {
1548    /// The `action` field.
1549    #[serde(default)]
1550    pub action: String,
1551    /// The `expectedRevision` field.
1552    #[serde(rename = "expectedRevision", default)]
1553    pub expected_revision: i64,
1554    /// The `reason` field.
1555    #[serde(default, skip_serializing_if = "Option::is_none")]
1556    pub reason: Option<String>,
1557    /// Fields this SDK version does not model.
1558    #[serde(flatten)]
1559    pub extra: Object,
1560}
1561
1562/// The `DealRoomsCreateRequest` object.
1563#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1564pub struct DealRoomsCreateRequest {
1565    /// The `title` field.
1566    #[serde(default)]
1567    pub title: String,
1568    /// The `documentId` field.
1569    #[serde(
1570        rename = "documentId",
1571        default,
1572        skip_serializing_if = "Option::is_none"
1573    )]
1574    pub document_id: Option<String>,
1575    /// The `versionId` field.
1576    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
1577    pub version_id: Option<String>,
1578    /// The `parentId` field.
1579    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
1580    pub parent_id: Option<String>,
1581    /// The `definition` field.
1582    #[serde(default, deserialize_with = "crate::util::null_default")]
1583    pub definition: Object,
1584    /// Fields this SDK version does not model.
1585    #[serde(flatten)]
1586    pub extra: Object,
1587}
1588
1589/// The `DealRoomsUpdateRequest` object.
1590#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1591pub struct DealRoomsUpdateRequest {
1592    /// The `title` field.
1593    #[serde(default, skip_serializing_if = "Option::is_none")]
1594    pub title: Option<String>,
1595    /// The `definition` field.
1596    #[serde(default, deserialize_with = "crate::util::null_default")]
1597    pub definition: Object,
1598    /// The `expectedRevision` field.
1599    #[serde(rename = "expectedRevision", default)]
1600    pub expected_revision: i64,
1601    /// Fields this SDK version does not model.
1602    #[serde(flatten)]
1603    pub extra: Object,
1604}
1605
1606/// The `DealRoomsTransitionRequest` object.
1607#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1608pub struct DealRoomsTransitionRequest {
1609    /// The `action` field.
1610    #[serde(default)]
1611    pub action: String,
1612    /// The `expectedRevision` field.
1613    #[serde(rename = "expectedRevision", default)]
1614    pub expected_revision: i64,
1615    /// The `reason` field.
1616    #[serde(default, skip_serializing_if = "Option::is_none")]
1617    pub reason: Option<String>,
1618    /// Fields this SDK version does not model.
1619    #[serde(flatten)]
1620    pub extra: Object,
1621}
1622
1623/// The `EmbedsCreateRequest` object.
1624#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1625pub struct EmbedsCreateRequest {
1626    /// The `title` field.
1627    #[serde(default)]
1628    pub title: String,
1629    /// The `documentId` field.
1630    #[serde(
1631        rename = "documentId",
1632        default,
1633        skip_serializing_if = "Option::is_none"
1634    )]
1635    pub document_id: Option<String>,
1636    /// The `versionId` field.
1637    #[serde(rename = "versionId", default, skip_serializing_if = "Option::is_none")]
1638    pub version_id: Option<String>,
1639    /// The `parentId` field.
1640    #[serde(rename = "parentId", default, skip_serializing_if = "Option::is_none")]
1641    pub parent_id: Option<String>,
1642    /// The `definition` field.
1643    #[serde(default, deserialize_with = "crate::util::null_default")]
1644    pub definition: Object,
1645    /// Fields this SDK version does not model.
1646    #[serde(flatten)]
1647    pub extra: Object,
1648}
1649
1650/// The `EmbedsUpdateRequest` object.
1651#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1652pub struct EmbedsUpdateRequest {
1653    /// The `title` field.
1654    #[serde(default, skip_serializing_if = "Option::is_none")]
1655    pub title: Option<String>,
1656    /// The `definition` field.
1657    #[serde(default, deserialize_with = "crate::util::null_default")]
1658    pub definition: Object,
1659    /// The `expectedRevision` field.
1660    #[serde(rename = "expectedRevision", default)]
1661    pub expected_revision: i64,
1662    /// Fields this SDK version does not model.
1663    #[serde(flatten)]
1664    pub extra: Object,
1665}
1666
1667/// The `EmbedsTransitionRequest` object.
1668#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1669pub struct EmbedsTransitionRequest {
1670    /// The `action` field.
1671    #[serde(default)]
1672    pub action: String,
1673    /// The `expectedRevision` field.
1674    #[serde(rename = "expectedRevision", default)]
1675    pub expected_revision: i64,
1676    /// The `reason` field.
1677    #[serde(default, skip_serializing_if = "Option::is_none")]
1678    pub reason: Option<String>,
1679    /// Fields this SDK version does not model.
1680    #[serde(flatten)]
1681    pub extra: Object,
1682}
1683
1684/// The `KeysCreateRequest` object.
1685#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1686pub struct KeysCreateRequest {
1687    /// The `name` field.
1688    #[serde(default)]
1689    pub name: String,
1690    /// The `scopes` field.
1691    #[serde(default, deserialize_with = "crate::util::null_default")]
1692    pub scopes: Vec<String>,
1693    /// The `expiresInDays` field.
1694    #[serde(rename = "expiresInDays", default)]
1695    pub expires_in_days: String,
1696    /// Fields this SDK version does not model.
1697    #[serde(flatten)]
1698    pub extra: Object,
1699}
1700
1701/// The `KeysRevokeRequest` object.
1702#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1703pub struct KeysRevokeRequest {
1704    /// The `keyId` field.
1705    #[serde(rename = "keyId", default)]
1706    pub key_id: String,
1707    /// Fields this SDK version does not model.
1708    #[serde(flatten)]
1709    pub extra: Object,
1710}
1711
1712/// The `KeysRotateRequest` object.
1713#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1714pub struct KeysRotateRequest {
1715    /// The `keyId` field.
1716    #[serde(rename = "keyId", default)]
1717    pub key_id: String,
1718    /// Fields this SDK version does not model.
1719    #[serde(flatten)]
1720    pub extra: Object,
1721}
1722
1723string_enum! {
1724    /// Allowed values of `RoomsCreateRequestKind`.
1725    RoomsCreateRequestKind {
1726        VirtualDataRoom => "VIRTUAL_DATA_ROOM",
1727        DigitalSalesRoom => "DIGITAL_SALES_ROOM",
1728    }
1729}
1730
1731/// The `RoomsCreateRequest` object.
1732#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1733pub struct RoomsCreateRequest {
1734    /// The `name` field.
1735    #[serde(default)]
1736    pub name: String,
1737    /// The `kind` field.
1738    #[serde(default, skip_serializing_if = "Option::is_none")]
1739    pub kind: Option<RoomsCreateRequestKind>,
1740    /// The `slug` field.
1741    #[serde(default, skip_serializing_if = "Option::is_none")]
1742    pub slug: Option<String>,
1743    /// The `description` field.
1744    #[serde(default, skip_serializing_if = "Option::is_none")]
1745    pub description: Option<String>,
1746    /// The `branding` field.
1747    #[serde(default, skip_serializing_if = "Option::is_none")]
1748    pub branding: Option<Object>,
1749    /// Fields this SDK version does not model.
1750    #[serde(flatten)]
1751    pub extra: Object,
1752}
1753
1754string_enum! {
1755    /// Allowed values of `RoomsTransitionRequestTargetState`.
1756    RoomsTransitionRequestTargetState {
1757        Draft => "DRAFT",
1758        InternalReview => "INTERNAL_REVIEW",
1759        Open => "OPEN",
1760        Paused => "PAUSED",
1761        Closed => "CLOSED",
1762        Archived => "ARCHIVED",
1763    }
1764}
1765
1766/// The `RoomsTransitionRequest` object.
1767#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1768pub struct RoomsTransitionRequest {
1769    /// The `targetState` field.
1770    #[serde(rename = "targetState", default)]
1771    pub target_state: RoomsTransitionRequestTargetState,
1772    /// Fields this SDK version does not model.
1773    #[serde(flatten)]
1774    pub extra: Object,
1775}
1776
1777/// The `RoomsFoldersCreateRequest` object.
1778#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1779pub struct RoomsFoldersCreateRequest {
1780    /// The `name` field.
1781    #[serde(default)]
1782    pub name: String,
1783    /// The `parentFolderId` field.
1784    #[serde(
1785        rename = "parentFolderId",
1786        default,
1787        skip_serializing_if = "Option::is_none"
1788    )]
1789    pub parent_folder_id: Option<String>,
1790    /// The `sortOrder` field.
1791    #[serde(rename = "sortOrder", default, skip_serializing_if = "Option::is_none")]
1792    pub sort_order: Option<i64>,
1793    /// Fields this SDK version does not model.
1794    #[serde(flatten)]
1795    pub extra: Object,
1796}
1797
1798/// The `RoomsFoldersUpdateRequest` object.
1799#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1800pub struct RoomsFoldersUpdateRequest {
1801    /// The `name` field.
1802    #[serde(default, skip_serializing_if = "Option::is_none")]
1803    pub name: Option<String>,
1804    /// The `parentFolderId` field.
1805    #[serde(
1806        rename = "parentFolderId",
1807        default,
1808        skip_serializing_if = "Option::is_none"
1809    )]
1810    pub parent_folder_id: Option<String>,
1811    /// The `sortOrder` field.
1812    #[serde(rename = "sortOrder", default, skip_serializing_if = "Option::is_none")]
1813    pub sort_order: Option<i64>,
1814    /// Fields this SDK version does not model.
1815    #[serde(flatten)]
1816    pub extra: Object,
1817}
1818
1819/// The `RoomsDocumentsAddRequest` object.
1820#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1821pub struct RoomsDocumentsAddRequest {
1822    /// The `folderId` field.
1823    #[serde(rename = "folderId", default)]
1824    pub folder_id: String,
1825    /// The `documentId` field.
1826    #[serde(rename = "documentId", default)]
1827    pub document_id: String,
1828    /// The `documentVersionId` field.
1829    #[serde(rename = "documentVersionId", default)]
1830    pub document_version_id: String,
1831    /// The `displayName` field.
1832    #[serde(rename = "displayName", default)]
1833    pub display_name: String,
1834    /// The `sortOrder` field.
1835    #[serde(rename = "sortOrder", default, skip_serializing_if = "Option::is_none")]
1836    pub sort_order: Option<i64>,
1837    /// Fields this SDK version does not model.
1838    #[serde(flatten)]
1839    pub extra: Object,
1840}
1841
1842/// The `RoomsDocumentsUpdateRequest` object.
1843#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1844pub struct RoomsDocumentsUpdateRequest {
1845    /// The `folderId` field.
1846    #[serde(rename = "folderId", default, skip_serializing_if = "Option::is_none")]
1847    pub folder_id: Option<String>,
1848    /// The `displayName` field.
1849    #[serde(
1850        rename = "displayName",
1851        default,
1852        skip_serializing_if = "Option::is_none"
1853    )]
1854    pub display_name: Option<String>,
1855    /// The `sortOrder` field.
1856    #[serde(rename = "sortOrder", default, skip_serializing_if = "Option::is_none")]
1857    pub sort_order: Option<i64>,
1858    /// Fields this SDK version does not model.
1859    #[serde(flatten)]
1860    pub extra: Object,
1861}
1862
1863string_enum! {
1864    /// Allowed values of `RoomsParticipantsAddRequestParticipantKind`.
1865    RoomsParticipantsAddRequestParticipantKind {
1866        External => "EXTERNAL",
1867        Internal => "INTERNAL",
1868        Guest => "GUEST",
1869    }
1870}
1871
1872string_enum! {
1873    /// Allowed values of `RoomsParticipantsAddRequestRole`.
1874    RoomsParticipantsAddRequestRole {
1875        Admin => "ADMIN",
1876        Contributor => "CONTRIBUTOR",
1877        Viewer => "VIEWER",
1878    }
1879}
1880
1881/// The `RoomsParticipantsAddRequest` object.
1882#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1883pub struct RoomsParticipantsAddRequest {
1884    /// The `email` field.
1885    #[serde(default)]
1886    pub email: String,
1887    /// The `displayName` field.
1888    #[serde(
1889        rename = "displayName",
1890        default,
1891        skip_serializing_if = "Option::is_none"
1892    )]
1893    pub display_name: Option<String>,
1894    /// The `participantKind` field.
1895    #[serde(
1896        rename = "participantKind",
1897        default,
1898        skip_serializing_if = "Option::is_none"
1899    )]
1900    pub participant_kind: Option<RoomsParticipantsAddRequestParticipantKind>,
1901    /// The `role` field.
1902    #[serde(default, skip_serializing_if = "Option::is_none")]
1903    pub role: Option<RoomsParticipantsAddRequestRole>,
1904    /// The `accessStartsAt` field.
1905    #[serde(
1906        rename = "accessStartsAt",
1907        default,
1908        skip_serializing_if = "Option::is_none"
1909    )]
1910    pub access_starts_at: Option<String>,
1911    /// The `accessEndsAt` field.
1912    #[serde(
1913        rename = "accessEndsAt",
1914        default,
1915        skip_serializing_if = "Option::is_none"
1916    )]
1917    pub access_ends_at: Option<String>,
1918    /// The `authenticationPolicy` field.
1919    #[serde(
1920        rename = "authenticationPolicy",
1921        default,
1922        skip_serializing_if = "Option::is_none"
1923    )]
1924    pub authentication_policy: Option<Object>,
1925    /// Fields this SDK version does not model.
1926    #[serde(flatten)]
1927    pub extra: Object,
1928}
1929
1930string_enum! {
1931    /// Allowed values of `RoomsParticipantsUpdateRequestState`.
1932    RoomsParticipantsUpdateRequestState {
1933        Revoked => "REVOKED",
1934        Active => "ACTIVE",
1935    }
1936}
1937
1938/// The `RoomsParticipantsUpdateRequest` object.
1939#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1940pub struct RoomsParticipantsUpdateRequest {
1941    /// The `state` field.
1942    #[serde(default)]
1943    pub state: RoomsParticipantsUpdateRequestState,
1944    /// Fields this SDK version does not model.
1945    #[serde(flatten)]
1946    pub extra: Object,
1947}
1948
1949string_enum! {
1950    /// Allowed values of `RoomsPermissionsSetRequestSubjectType`.
1951    RoomsPermissionsSetRequestSubjectType {
1952        Participant => "PARTICIPANT",
1953        Group => "GROUP",
1954        Email => "EMAIL",
1955        Domain => "DOMAIN",
1956    }
1957}
1958
1959string_enum! {
1960    /// Allowed values of `RoomsPermissionsSetRequestEffect`.
1961    RoomsPermissionsSetRequestEffect {
1962        Allow => "ALLOW",
1963        Deny => "DENY",
1964    }
1965}
1966
1967string_enum! {
1968    /// Allowed values of `RoomsPermissionsSetRequestActionsItem`.
1969    RoomsPermissionsSetRequestActionsItem {
1970        View => "view",
1971        Download => "download",
1972        Print => "print",
1973        Annotate => "annotate",
1974        Upload => "upload",
1975        AskQuestion => "ask_question",
1976        AnswerQuestion => "answer_question",
1977        Invite => "invite",
1978        Administer => "administer",
1979    }
1980}
1981
1982/// The `RoomsPermissionsSetRequest` object.
1983#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
1984pub struct RoomsPermissionsSetRequest {
1985    /// The `folderId` field.
1986    #[serde(rename = "folderId", default, skip_serializing_if = "Option::is_none")]
1987    pub folder_id: Option<String>,
1988    /// The `roomDocumentId` field.
1989    #[serde(
1990        rename = "roomDocumentId",
1991        default,
1992        skip_serializing_if = "Option::is_none"
1993    )]
1994    pub room_document_id: Option<String>,
1995    /// The `participantId` field.
1996    #[serde(
1997        rename = "participantId",
1998        default,
1999        skip_serializing_if = "Option::is_none"
2000    )]
2001    pub participant_id: Option<String>,
2002    /// The `groupId` field.
2003    #[serde(rename = "groupId", default, skip_serializing_if = "Option::is_none")]
2004    pub group_id: Option<String>,
2005    /// The `subjectType` field.
2006    #[serde(rename = "subjectType", default)]
2007    pub subject_type: RoomsPermissionsSetRequestSubjectType,
2008    /// The `subjectValue` field.
2009    #[serde(rename = "subjectValue", default)]
2010    pub subject_value: String,
2011    /// The `effect` field.
2012    #[serde(default)]
2013    pub effect: RoomsPermissionsSetRequestEffect,
2014    /// The `actions` field.
2015    #[serde(default, deserialize_with = "crate::util::null_default")]
2016    pub actions: Vec<RoomsPermissionsSetRequestActionsItem>,
2017    /// The `conditions` field.
2018    #[serde(default, skip_serializing_if = "Option::is_none")]
2019    pub conditions: Option<Object>,
2020    /// Fields this SDK version does not model.
2021    #[serde(flatten)]
2022    pub extra: Object,
2023}
2024
2025/// The `RoomsPermissionsRevokeRequest` object.
2026#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2027pub struct RoomsPermissionsRevokeRequest {
2028    /// Fields this SDK version does not model.
2029    #[serde(flatten)]
2030    pub extra: Object,
2031}
2032
2033/// The `RoomsRequestsCreateRequestComponentsItem` object.
2034#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2035pub struct RoomsRequestsCreateRequestComponentsItem {
2036    /// The `title` field.
2037    #[serde(default)]
2038    pub title: String,
2039    /// The `description` field.
2040    #[serde(default, skip_serializing_if = "Option::is_none")]
2041    pub description: Option<String>,
2042    /// The `required` field.
2043    #[serde(default, skip_serializing_if = "Option::is_none")]
2044    pub required: Option<bool>,
2045    /// Fields this SDK version does not model.
2046    #[serde(flatten)]
2047    pub extra: Object,
2048}
2049
2050/// The `RoomsRequestsCreateRequest` object.
2051#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2052pub struct RoomsRequestsCreateRequest {
2053    /// The `title` field.
2054    #[serde(default)]
2055    pub title: String,
2056    /// The `description` field.
2057    #[serde(default, skip_serializing_if = "Option::is_none")]
2058    pub description: Option<String>,
2059    /// The `folderId` field.
2060    #[serde(rename = "folderId", default, skip_serializing_if = "Option::is_none")]
2061    pub folder_id: Option<String>,
2062    /// The `priority` field.
2063    #[serde(default, skip_serializing_if = "Option::is_none")]
2064    pub priority: Option<String>,
2065    /// The `dueAt` field.
2066    #[serde(rename = "dueAt", default, skip_serializing_if = "Option::is_none")]
2067    pub due_at: Option<String>,
2068    /// The `responsiblePartyType` field.
2069    #[serde(
2070        rename = "responsiblePartyType",
2071        default,
2072        skip_serializing_if = "Option::is_none"
2073    )]
2074    pub responsible_party_type: Option<String>,
2075    /// The `responsiblePartyId` field.
2076    #[serde(
2077        rename = "responsiblePartyId",
2078        default,
2079        skip_serializing_if = "Option::is_none"
2080    )]
2081    pub responsible_party_id: Option<String>,
2082    /// The `components` field.
2083    #[serde(default, deserialize_with = "crate::util::null_default")]
2084    pub components: Vec<RoomsRequestsCreateRequestComponentsItem>,
2085    /// Fields this SDK version does not model.
2086    #[serde(flatten)]
2087    pub extra: Object,
2088}
2089
2090/// The `RoomsQuestionsCreateRequest` object.
2091#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2092pub struct RoomsQuestionsCreateRequest {
2093    /// The `title` field.
2094    #[serde(default)]
2095    pub title: String,
2096    /// The `body` field.
2097    #[serde(default)]
2098    pub body: String,
2099    /// The `folderId` field.
2100    #[serde(rename = "folderId", default, skip_serializing_if = "Option::is_none")]
2101    pub folder_id: Option<String>,
2102    /// The `roomDocumentId` field.
2103    #[serde(
2104        rename = "roomDocumentId",
2105        default,
2106        skip_serializing_if = "Option::is_none"
2107    )]
2108    pub room_document_id: Option<String>,
2109    /// The `documentVersionId` field.
2110    #[serde(
2111        rename = "documentVersionId",
2112        default,
2113        skip_serializing_if = "Option::is_none"
2114    )]
2115    pub document_version_id: Option<String>,
2116    /// The `visibility` field.
2117    #[serde(default, skip_serializing_if = "Option::is_none")]
2118    pub visibility: Option<String>,
2119    /// The `visibilityGroupId` field.
2120    #[serde(
2121        rename = "visibilityGroupId",
2122        default,
2123        skip_serializing_if = "Option::is_none"
2124    )]
2125    pub visibility_group_id: Option<String>,
2126    /// The `dueAt` field.
2127    #[serde(rename = "dueAt", default, skip_serializing_if = "Option::is_none")]
2128    pub due_at: Option<String>,
2129    /// The `anchor` field.
2130    #[serde(default, skip_serializing_if = "Option::is_none")]
2131    pub anchor: Option<Object>,
2132    /// Fields this SDK version does not model.
2133    #[serde(flatten)]
2134    pub extra: Object,
2135}
2136
2137/// The `RoomsQuestionsAnswerRequest` object.
2138#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2139pub struct RoomsQuestionsAnswerRequest {
2140    /// The `body` field.
2141    #[serde(default)]
2142    pub body: String,
2143    /// The `visibility` field.
2144    #[serde(default, skip_serializing_if = "Option::is_none")]
2145    pub visibility: Option<String>,
2146    /// Fields this SDK version does not model.
2147    #[serde(flatten)]
2148    pub extra: Object,
2149}
2150
2151/// The `PortalsCreateRequest` object.
2152#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2153pub struct PortalsCreateRequest {
2154    /// The `name` field.
2155    #[serde(default)]
2156    pub name: String,
2157    /// The `slug` field.
2158    #[serde(default)]
2159    pub slug: String,
2160    /// The `roomId` field.
2161    #[serde(rename = "roomId", default, skip_serializing_if = "Option::is_none")]
2162    pub room_id: Option<String>,
2163    /// The `branding` field.
2164    #[serde(default, skip_serializing_if = "Option::is_none")]
2165    pub branding: Option<Object>,
2166    /// Fields this SDK version does not model.
2167    #[serde(flatten)]
2168    pub extra: Object,
2169}
2170
2171/// The `PortalsUpdateRequest` object.
2172#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2173pub struct PortalsUpdateRequest {
2174    /// The `name` field.
2175    #[serde(default, skip_serializing_if = "Option::is_none")]
2176    pub name: Option<String>,
2177    /// The `branding` field.
2178    #[serde(default, skip_serializing_if = "Option::is_none")]
2179    pub branding: Option<Object>,
2180    /// The `navigation` field.
2181    #[serde(default, skip_serializing_if = "Option::is_none")]
2182    pub navigation: Option<Vec<serde_json::Value>>,
2183    /// Fields this SDK version does not model.
2184    #[serde(flatten)]
2185    pub extra: Object,
2186}
2187
2188/// The `PortalsPublishRequest` object.
2189#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2190pub struct PortalsPublishRequest {
2191    /// Fields this SDK version does not model.
2192    #[serde(flatten)]
2193    pub extra: Object,
2194}
2195
2196/// The `PortalsRoomsAddRequest` object.
2197#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2198pub struct PortalsRoomsAddRequest {
2199    /// The `roomId` field.
2200    #[serde(rename = "roomId", default)]
2201    pub room_id: String,
2202    /// Fields this SDK version does not model.
2203    #[serde(flatten)]
2204    pub extra: Object,
2205}
2206
2207/// The `PortalsAnnouncementsCreateRequest` object.
2208#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2209pub struct PortalsAnnouncementsCreateRequest {
2210    /// The `title` field.
2211    #[serde(default)]
2212    pub title: String,
2213    /// The `body` field.
2214    #[serde(default)]
2215    pub body: String,
2216    /// Fields this SDK version does not model.
2217    #[serde(flatten)]
2218    pub extra: Object,
2219}
2220
2221string_enum! {
2222    /// Allowed values of `PortalsResourcesCreateRequestResourceType`.
2223    PortalsResourcesCreateRequestResourceType {
2224        Document => "DOCUMENT",
2225        ExternalLink => "EXTERNAL_LINK",
2226    }
2227}
2228
2229/// The `PortalsResourcesCreateRequest` object.
2230#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2231pub struct PortalsResourcesCreateRequest {
2232    /// The `title` field.
2233    #[serde(default)]
2234    pub title: String,
2235    /// The `resourceType` field.
2236    #[serde(rename = "resourceType", default)]
2237    pub resource_type: PortalsResourcesCreateRequestResourceType,
2238    /// The `documentVersionId` field.
2239    #[serde(
2240        rename = "documentVersionId",
2241        default,
2242        skip_serializing_if = "Option::is_none"
2243    )]
2244    pub document_version_id: Option<String>,
2245    /// The `externalUrl` field.
2246    #[serde(
2247        rename = "externalUrl",
2248        default,
2249        skip_serializing_if = "Option::is_none"
2250    )]
2251    pub external_url: Option<String>,
2252    /// The `sortOrder` field.
2253    #[serde(rename = "sortOrder", default, skip_serializing_if = "Option::is_none")]
2254    pub sort_order: Option<i64>,
2255    /// Fields this SDK version does not model.
2256    #[serde(flatten)]
2257    pub extra: Object,
2258}
2259
2260/// The `EmbedSessionsCreateRequestPermissions` object.
2261#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2262pub struct EmbedSessionsCreateRequestPermissions {
2263    /// The `view` field.
2264    #[serde(default)]
2265    pub view: String,
2266    /// The `search` field.
2267    #[serde(default, skip_serializing_if = "Option::is_none")]
2268    pub search: Option<bool>,
2269    /// The `download` field.
2270    #[serde(default, skip_serializing_if = "Option::is_none")]
2271    pub download: Option<bool>,
2272    /// The `print` field.
2273    #[serde(default, skip_serializing_if = "Option::is_none")]
2274    pub print: Option<bool>,
2275    /// The `annotate` field.
2276    #[serde(default, skip_serializing_if = "Option::is_none")]
2277    pub annotate: Option<bool>,
2278    /// The `forms` field.
2279    #[serde(default, skip_serializing_if = "Option::is_none")]
2280    pub forms: Option<bool>,
2281    /// Fields this SDK version does not model.
2282    #[serde(flatten)]
2283    pub extra: Object,
2284}
2285
2286/// The `EmbedSessionsCreateRequest` object.
2287#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2288pub struct EmbedSessionsCreateRequest {
2289    /// The `documentId` field.
2290    #[serde(rename = "documentId", default)]
2291    pub document_id: String,
2292    /// The `documentVersionId` field.
2293    #[serde(
2294        rename = "documentVersionId",
2295        default,
2296        skip_serializing_if = "Option::is_none"
2297    )]
2298    pub document_version_id: Option<String>,
2299    /// The `parentOrigin` field.
2300    #[serde(rename = "parentOrigin", default)]
2301    pub parent_origin: String,
2302    /// The `permissions` field.
2303    #[serde(default)]
2304    pub permissions: EmbedSessionsCreateRequestPermissions,
2305    /// The `allowedCommands` field.
2306    #[serde(
2307        rename = "allowedCommands",
2308        default,
2309        skip_serializing_if = "Option::is_none"
2310    )]
2311    pub allowed_commands: Option<Vec<String>>,
2312    /// The `viewerConfiguration` field.
2313    #[serde(
2314        rename = "viewerConfiguration",
2315        default,
2316        skip_serializing_if = "Option::is_none"
2317    )]
2318    pub viewer_configuration: Option<Object>,
2319    /// The `hostReference` field.
2320    #[serde(
2321        rename = "hostReference",
2322        default,
2323        skip_serializing_if = "Option::is_none"
2324    )]
2325    pub host_reference: Option<String>,
2326    /// The `ttlSeconds` field.
2327    #[serde(
2328        rename = "ttlSeconds",
2329        default,
2330        skip_serializing_if = "Option::is_none"
2331    )]
2332    pub ttl_seconds: Option<i64>,
2333    /// Fields this SDK version does not model.
2334    #[serde(flatten)]
2335    pub extra: Object,
2336}
2337
2338/// The `EmbedSessionsRefreshRequest` object.
2339#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2340pub struct EmbedSessionsRefreshRequest {
2341    /// The `ttlSeconds` field.
2342    #[serde(
2343        rename = "ttlSeconds",
2344        default,
2345        skip_serializing_if = "Option::is_none"
2346    )]
2347    pub ttl_seconds: Option<i64>,
2348    /// Fields this SDK version does not model.
2349    #[serde(flatten)]
2350    pub extra: Object,
2351}
2352
2353/// The `EmbedSessionsRevokeRequest` object.
2354#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2355pub struct EmbedSessionsRevokeRequest {
2356    /// Fields this SDK version does not model.
2357    #[serde(flatten)]
2358    pub extra: Object,
2359}
2360
2361/// The `EsignLevelsResponse` object.
2362#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2363pub struct EsignLevelsResponse {
2364    /// The `levels` field.
2365    #[serde(default, deserialize_with = "crate::util::null_default")]
2366    pub levels: Vec<serde_json::Value>,
2367    /// The `secondFactors` field.
2368    #[serde(
2369        rename = "secondFactors",
2370        default,
2371        skip_serializing_if = "Option::is_none"
2372    )]
2373    pub second_factors: Option<Vec<String>>,
2374    /// The `jurisdictions` field.
2375    #[serde(default, deserialize_with = "crate::util::null_default")]
2376    pub jurisdictions: Vec<serde_json::Value>,
2377    /// The `documentTypes` field.
2378    #[serde(
2379        rename = "documentTypes",
2380        default,
2381        deserialize_with = "crate::util::null_default"
2382    )]
2383    pub document_types: Vec<serde_json::Value>,
2384    /// The `consentVersion` field.
2385    #[serde(
2386        rename = "consentVersion",
2387        default,
2388        skip_serializing_if = "Option::is_none"
2389    )]
2390    pub consent_version: Option<String>,
2391    /// Fields this SDK version does not model.
2392    #[serde(flatten)]
2393    pub extra: Object,
2394}
2395
2396string_enum! {
2397    /// Allowed values of `EsignEnvelopesListItemStatus`.
2398    EsignEnvelopesListItemStatus {
2399        Sent => "SENT",
2400        Viewed => "VIEWED",
2401        PartiallySigned => "PARTIALLY_SIGNED",
2402        Completed => "COMPLETED",
2403        Declined => "DECLINED",
2404        Cancelled => "CANCELLED",
2405        Expired => "EXPIRED",
2406        Invalid => "INVALID",
2407    }
2408}
2409
2410string_enum! {
2411    /// Allowed values of `EsignEnvelopesListItemLevel`.
2412    EsignEnvelopesListItemLevel {
2413        Simple => "simple",
2414        Advanced => "advanced",
2415        OrganisationSeal => "organisation_seal",
2416    }
2417}
2418
2419/// The `EsignEnvelopesListItem` object.
2420#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2421pub struct EsignEnvelopesListItem {
2422    /// The `id` field.
2423    #[serde(default)]
2424    pub id: String,
2425    /// The `status` field.
2426    #[serde(default)]
2427    pub status: EsignEnvelopesListItemStatus,
2428    /// The `level` field.
2429    #[serde(default)]
2430    pub level: EsignEnvelopesListItemLevel,
2431    /// The `recipients` field.
2432    #[serde(default, deserialize_with = "crate::util::null_default")]
2433    pub recipients: Vec<Object>,
2434    /// signedDocument: the signed version's content route; certificate: the certificate of completion,
2435    /// once completed.
2436    #[serde(default, deserialize_with = "crate::util::null_default")]
2437    pub links: Object,
2438    /// Fields this SDK version does not model.
2439    #[serde(flatten)]
2440    pub extra: Object,
2441}
2442
2443/// Query parameters of `esign.envelopes.list`.
2444#[derive(Debug, Clone, Default, PartialEq)]
2445pub struct EsignEnvelopesListParams {
2446    /// Only envelopes of this document.
2447    pub document_id: Option<String>,
2448    /// The most items on one page.
2449    pub limit: Option<u32>,
2450    /// The cursor of the page to read, from `next_cursor`.
2451    pub cursor: Option<String>,
2452}
2453
2454/// The `EsignEnvelopesCreateResponse` object.
2455#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2456pub struct EsignEnvelopesCreateResponse {
2457    /// The `envelope` field.
2458    #[serde(default)]
2459    pub envelope: EsignEnvelopesListItem,
2460    /// The `created` field.
2461    #[serde(default)]
2462    pub created: bool,
2463    /// Fields this SDK version does not model.
2464    #[serde(flatten)]
2465    pub extra: Object,
2466}
2467
2468string_enum! {
2469    /// Allowed values of `EsignEnvelopesCreateRequestSigningOrder`.
2470    EsignEnvelopesCreateRequestSigningOrder {
2471        Parallel => "PARALLEL",
2472        Sequential => "SEQUENTIAL",
2473    }
2474}
2475
2476string_enum! {
2477    /// The law that governs the document; GET /api/v2/esign/levels lists each with its notice.
2478    EsignEnvelopesCreateRequestJurisdiction {
2479        Us => "US",
2480        Eu => "EU",
2481        Gb => "GB",
2482        Ca => "CA",
2483        Au => "AU",
2484        Sg => "SG",
2485        Ch => "CH",
2486        Br => "BR",
2487        Ae => "AE",
2488        Jp => "JP",
2489        In => "IN",
2490        Other => "OTHER",
2491    }
2492}
2493
2494string_enum! {
2495    /// Types often excluded from electronic signature laws need excludedDocumentAcknowledged.
2496    EsignEnvelopesCreateRequestDocumentType {
2497        CommercialContract => "commercial_contract",
2498        Employment => "employment",
2499        ConsumerAgreement => "consumer_agreement",
2500        Nda => "nda",
2501        Approval => "approval",
2502        WillOrTrust => "will_or_trust",
2503        FamilyLaw => "family_law",
2504        CourtDocument => "court_document",
2505        RealEstateDeed => "real_estate_deed",
2506        PowerOfAttorney => "power_of_attorney",
2507        NegotiableInstrument => "negotiable_instrument",
2508        StatutoryNotice => "statutory_notice",
2509        HazardousMaterials => "hazardous_materials",
2510        Other => "other",
2511    }
2512}
2513
2514string_enum! {
2515    /// Advanced level only. access_code: a code you give each signer separately. authenticator: a code
2516    /// from the authenticator app on the signer's Wellfriend account. sms: a text message code, only
2517    /// when GET /api/v2/esign/levels lists it.
2518    EsignEnvelopesCreateRequestSecondFactor {
2519        AccessCode => "access_code",
2520        Authenticator => "authenticator",
2521        Sms => "sms",
2522    }
2523}
2524
2525/// The `EsignEnvelopesCreateRequestRecipientsItem` object.
2526#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2527pub struct EsignEnvelopesCreateRequestRecipientsItem {
2528    /// The signer's full name.
2529    #[serde(default)]
2530    pub name: String,
2531    /// Where the signing link and the email code go.
2532    #[serde(default)]
2533    pub email: String,
2534    /// Shown to the signer, for example Director. Default Signer.
2535    #[serde(default, skip_serializing_if = "Option::is_none")]
2536    pub role: Option<String>,
2537    /// E.164 mobile number; required for each signer when secondFactor is sms.
2538    #[serde(
2539        rename = "mobileNumber",
2540        default,
2541        skip_serializing_if = "Option::is_none"
2542    )]
2543    pub mobile_number: Option<String>,
2544    /// Fields this SDK version does not model.
2545    #[serde(flatten)]
2546    pub extra: Object,
2547}
2548
2549string_enum! {
2550    /// Allowed values of `EsignEnvelopesCreateRequestFieldsItemType`.
2551    EsignEnvelopesCreateRequestFieldsItemType {
2552        Signature => "SIGNATURE",
2553        Initials => "INITIALS",
2554        Name => "NAME",
2555        Date => "DATE",
2556        Text => "TEXT",
2557    }
2558}
2559
2560/// The `EsignEnvelopesCreateRequestFieldsItem` object.
2561#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2562pub struct EsignEnvelopesCreateRequestFieldsItem {
2563    /// The recipient who fills this field.
2564    #[serde(rename = "recipientEmail", default)]
2565    pub recipient_email: String,
2566    /// The `type` field.
2567    #[serde(default)]
2568    pub r#type: EsignEnvelopesCreateRequestFieldsItemType,
2569    /// Unique within the envelope.
2570    #[serde(rename = "fieldName", default)]
2571    pub field_name: String,
2572    /// The `label` field.
2573    #[serde(default, skip_serializing_if = "Option::is_none")]
2574    pub label: Option<String>,
2575    /// The `page` field.
2576    #[serde(default)]
2577    pub page: i64,
2578    /// The `xPercent` field.
2579    #[serde(
2580        rename = "xPercent",
2581        default,
2582        serialize_with = "crate::util::required_number"
2583    )]
2584    pub x_percent: f64,
2585    /// The `yPercent` field.
2586    #[serde(
2587        rename = "yPercent",
2588        default,
2589        serialize_with = "crate::util::required_number"
2590    )]
2591    pub y_percent: f64,
2592    /// The `widthPercent` field.
2593    #[serde(
2594        rename = "widthPercent",
2595        default,
2596        serialize_with = "crate::util::required_number"
2597    )]
2598    pub width_percent: f64,
2599    /// The `heightPercent` field.
2600    #[serde(
2601        rename = "heightPercent",
2602        default,
2603        serialize_with = "crate::util::required_number"
2604    )]
2605    pub height_percent: f64,
2606    /// The `required` field.
2607    #[serde(default, skip_serializing_if = "Option::is_none")]
2608    pub required: Option<bool>,
2609    /// Fields this SDK version does not model.
2610    #[serde(flatten)]
2611    pub extra: Object,
2612}
2613
2614/// The `EsignEnvelopesCreateRequest` object.
2615#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2616pub struct EsignEnvelopesCreateRequest {
2617    /// The PDF document to send (a document of this workspace and key environment).
2618    #[serde(rename = "documentId", default)]
2619    pub document_id: String,
2620    /// The exact version the signers see and sign.
2621    #[serde(rename = "versionId", default)]
2622    pub version_id: String,
2623    /// The `title` field.
2624    #[serde(default)]
2625    pub title: String,
2626    /// simple: electronic signature with an email code. advanced: advanced electronic signature (eIDAS
2627    /// Article 26) with an email code and a second factor. organisation_seal: the organisation's
2628    /// advanced electronic seal; an organisation administrator must have switched it on.
2629    #[serde(default)]
2630    pub level: EsignEnvelopesListItemLevel,
2631    /// The `signingOrder` field.
2632    #[serde(
2633        rename = "signingOrder",
2634        default,
2635        skip_serializing_if = "Option::is_none"
2636    )]
2637    pub signing_order: Option<EsignEnvelopesCreateRequestSigningOrder>,
2638    /// The `expiresInDays` field.
2639    #[serde(
2640        rename = "expiresInDays",
2641        default,
2642        skip_serializing_if = "Option::is_none"
2643    )]
2644    pub expires_in_days: Option<i64>,
2645    /// The law that governs the document; GET /api/v2/esign/levels lists each with its notice.
2646    #[serde(default)]
2647    pub jurisdiction: EsignEnvelopesCreateRequestJurisdiction,
2648    /// Types often excluded from electronic signature laws need excludedDocumentAcknowledged.
2649    #[serde(rename = "documentType", default)]
2650    pub document_type: EsignEnvelopesCreateRequestDocumentType,
2651    /// Advanced level only. access_code: a code you give each signer separately. authenticator: a code
2652    /// from the authenticator app on the signer's Wellfriend account. sms: a text message code, only
2653    /// when GET /api/v2/esign/levels lists it.
2654    #[serde(
2655        rename = "secondFactor",
2656        default,
2657        skip_serializing_if = "Option::is_none"
2658    )]
2659    pub second_factor: Option<EsignEnvelopesCreateRequestSecondFactor>,
2660    /// With secondFactor access_code. Stored only as a keyed hash; never returned.
2661    #[serde(
2662        rename = "accessCode",
2663        default,
2664        skip_serializing_if = "Option::is_none"
2665    )]
2666    pub access_code: Option<String>,
2667    /// You checked that this document type may be signed electronically under the chosen law.
2668    #[serde(
2669        rename = "excludedDocumentAcknowledged",
2670        default,
2671        skip_serializing_if = "Option::is_none"
2672    )]
2673    pub excluded_document_acknowledged: Option<bool>,
2674    /// The `recipients` field.
2675    #[serde(default, deserialize_with = "crate::util::null_default")]
2676    pub recipients: Vec<EsignEnvelopesCreateRequestRecipientsItem>,
2677    /// The `fields` field.
2678    #[serde(default, deserialize_with = "crate::util::null_default")]
2679    pub fields: Vec<EsignEnvelopesCreateRequestFieldsItem>,
2680    /// Fields this SDK version does not model.
2681    #[serde(flatten)]
2682    pub extra: Object,
2683}
2684
2685/// The `EsignEnvelopesGetResponse` object.
2686#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2687pub struct EsignEnvelopesGetResponse {
2688    /// The `envelope` field.
2689    #[serde(default)]
2690    pub envelope: EsignEnvelopesListItem,
2691    /// Fields this SDK version does not model.
2692    #[serde(flatten)]
2693    pub extra: Object,
2694}
2695
2696/// The `EsignEnvelopesCancelRequest` object.
2697#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2698pub struct EsignEnvelopesCancelRequest {
2699    /// Fields this SDK version does not model.
2700    #[serde(flatten)]
2701    pub extra: Object,
2702}
2703
2704/// The `EsignValidateResponse` object.
2705#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
2706pub struct EsignValidateResponse {
2707    /// The `overall` field.
2708    #[serde(default)]
2709    pub overall: String,
2710    /// The `signatures` field.
2711    #[serde(default, deserialize_with = "crate::util::null_default")]
2712    pub signatures: Vec<Object>,
2713    /// Fields this SDK version does not model.
2714    #[serde(flatten)]
2715    pub extra: Object,
2716}