apify_client/models.rs
1//! Data models for Apify API resources.
2//!
3//! Each resource is modelled with the fields most commonly used by clients, mirroring
4//! the reference JavaScript client. To remain forward-compatible with additive changes to
5//! the API, none of the models set `deny_unknown_fields`, so unknown API fields are ignored
6//! rather than breaking deserialization. Most resource models additionally capture any unknown
7//! fields in an `extra` map via `#[serde(flatten)]` so they remain accessible to callers.
8
9use std::collections::HashMap;
10
11use chrono::{DateTime, Utc};
12use serde::{Deserialize, Serialize};
13use serde_json::Value;
14
15/// Convenience alias for the catch-all map of unmodelled JSON fields.
16pub type Extra = HashMap<String, Value>;
17
18/// An Actor on the Apify platform.
19#[derive(Debug, Clone, Deserialize, Serialize)]
20#[serde(rename_all = "camelCase")]
21pub struct Actor {
22 /// Unique Actor ID.
23 pub id: String,
24 /// ID of the user who owns the Actor.
25 #[serde(default)]
26 pub user_id: Option<String>,
27 /// Technical name of the Actor (used in API paths).
28 #[serde(default)]
29 pub name: Option<String>,
30 /// Username of the Actor's owner.
31 #[serde(default)]
32 pub username: Option<String>,
33 /// Human-readable title shown in the UI.
34 #[serde(default)]
35 pub title: Option<String>,
36 /// Description of what the Actor does.
37 #[serde(default)]
38 pub description: Option<String>,
39 /// Whether the Actor is publicly available in Apify Store.
40 #[serde(default)]
41 pub is_public: Option<bool>,
42 /// When the Actor was created.
43 #[serde(default)]
44 pub created_at: Option<DateTime<Utc>>,
45 /// When the Actor was last modified.
46 #[serde(default)]
47 pub modified_at: Option<DateTime<Utc>>,
48 /// Any other fields returned by the API.
49 #[serde(flatten)]
50 pub extra: Extra,
51}
52
53/// A single execution of an Actor (an Actor run).
54#[derive(Debug, Clone, Deserialize, Serialize)]
55#[serde(rename_all = "camelCase")]
56pub struct ActorRun {
57 /// Unique run ID.
58 pub id: String,
59 /// ID of the Actor that produced this run.
60 #[serde(default)]
61 pub act_id: Option<String>,
62 /// ID of the task that started this run, if any.
63 #[serde(default)]
64 pub actor_task_id: Option<String>,
65 /// ID of the user who owns the run.
66 #[serde(default)]
67 pub user_id: Option<String>,
68 /// Current run status, e.g. `READY`, `RUNNING`, `SUCCEEDED`, `FAILED`, `ABORTED`, `TIMED-OUT`.
69 #[serde(default)]
70 pub status: Option<String>,
71 /// Optional human-readable status message.
72 #[serde(default)]
73 pub status_message: Option<String>,
74 /// When the run started.
75 #[serde(default)]
76 pub started_at: Option<DateTime<Utc>>,
77 /// When the run finished (absent while still running).
78 #[serde(default)]
79 pub finished_at: Option<DateTime<Utc>>,
80 /// ID of the build used for the run.
81 #[serde(default)]
82 pub build_id: Option<String>,
83 /// Default dataset ID associated with the run.
84 #[serde(default)]
85 pub default_dataset_id: Option<String>,
86 /// Default key-value store ID associated with the run.
87 #[serde(default)]
88 pub default_key_value_store_id: Option<String>,
89 /// Default request queue ID associated with the run.
90 #[serde(default)]
91 pub default_request_queue_id: Option<String>,
92 /// URL of the run's container, if running.
93 #[serde(default)]
94 pub container_url: Option<String>,
95 /// Any other fields returned by the API.
96 #[serde(flatten)]
97 pub extra: Extra,
98}
99
100/// Terminal run/build statuses, used by wait-for-finish helpers.
101pub(crate) const TERMINAL_STATUSES: &[&str] =
102 &["SUCCEEDED", "FAILED", "ABORTED", "TIMED-OUT", "TIMED_OUT"];
103
104impl ActorRun {
105 /// Returns `true` if the run has reached a terminal state.
106 pub fn is_terminal(&self) -> bool {
107 self.status
108 .as_deref()
109 .map(|s| TERMINAL_STATUSES.contains(&s))
110 .unwrap_or(false)
111 }
112}
113
114/// A build of an Actor.
115#[derive(Debug, Clone, Deserialize, Serialize)]
116#[serde(rename_all = "camelCase")]
117pub struct Build {
118 /// Unique build ID.
119 pub id: String,
120 /// ID of the Actor that was built.
121 #[serde(default)]
122 pub act_id: Option<String>,
123 /// Current build status.
124 #[serde(default)]
125 pub status: Option<String>,
126 /// When the build started.
127 #[serde(default)]
128 pub started_at: Option<DateTime<Utc>>,
129 /// When the build finished.
130 #[serde(default)]
131 pub finished_at: Option<DateTime<Utc>>,
132 /// Build number, e.g. `0.1.2`.
133 #[serde(default)]
134 pub build_number: Option<String>,
135 /// Digest of the built Docker image manifest, without the `sha256:` prefix. Compare the
136 /// digests of two builds to find out whether their image contents differ. `None` if the
137 /// digest is not available (e.g. the build has not finished, or is older than when the API
138 /// started recording it).
139 #[serde(default)]
140 pub image_digest: Option<String>,
141 /// Any other fields returned by the API.
142 #[serde(flatten)]
143 pub extra: Extra,
144}
145
146impl Build {
147 /// Returns `true` if the build has reached a terminal state.
148 pub fn is_terminal(&self) -> bool {
149 self.status
150 .as_deref()
151 .map(|s| TERMINAL_STATUSES.contains(&s))
152 .unwrap_or(false)
153 }
154}
155
156/// An Actor task (a saved, reusable Actor configuration).
157#[derive(Debug, Clone, Deserialize, Serialize)]
158#[serde(rename_all = "camelCase")]
159pub struct Task {
160 /// Unique task ID.
161 pub id: String,
162 /// ID of the Actor this task runs.
163 #[serde(default)]
164 pub act_id: Option<String>,
165 /// ID of the user who owns the task.
166 #[serde(default)]
167 pub user_id: Option<String>,
168 /// Technical name of the task.
169 #[serde(default)]
170 pub name: Option<String>,
171 /// Human-readable title.
172 #[serde(default)]
173 pub title: Option<String>,
174 /// Human-readable description shown on the task's public landing page. Required (up to 400
175 /// characters), alongside `title` (3 to 63 characters), to [`publish`](crate::clients::task::TaskClient::publish)
176 /// the task.
177 #[serde(default)]
178 pub description: Option<String>,
179 /// When the task was created.
180 #[serde(default)]
181 pub created_at: Option<DateTime<Utc>>,
182 /// When the task was last modified.
183 #[serde(default)]
184 pub modified_at: Option<DateTime<Utc>>,
185 /// Whether the task is published on its public landing page. Derived from
186 /// `public_config.published_at`; set it via [`TaskClient::update`](crate::clients::task::TaskClient::update)
187 /// (or the [`publish`](crate::clients::task::TaskClient::publish)/
188 /// [`unpublish`](crate::clients::task::TaskClient::unpublish) wrappers) to change it.
189 #[serde(default)]
190 pub is_public: Option<bool>,
191 /// The task's public landing page display configuration, or `None` if never configured.
192 #[serde(default)]
193 pub public_config: Option<TaskPublicConfig>,
194 /// Any other fields returned by the API.
195 #[serde(flatten)]
196 pub extra: Extra,
197}
198
199/// Public-facing display configuration of a task's public landing page.
200///
201/// The task is published when `published_at` is set and unpublished when it is `None`.
202/// `published_at` is server-controlled (read-only) - use
203/// [`TaskClient::publish`](crate::clients::task::TaskClient::publish) /
204/// [`TaskClient::unpublish`](crate::clients::task::TaskClient::unpublish) to change the
205/// publication state.
206#[derive(Debug, Clone, Default, Deserialize, Serialize)]
207#[serde(rename_all = "camelCase")]
208pub struct TaskPublicConfig {
209 /// When the task was published, or `None` if it isn't published. Read-only.
210 #[serde(default)]
211 pub published_at: Option<DateTime<Utc>>,
212 /// Name shown by search engines. Defaults to the task title when unset.
213 #[serde(default)]
214 pub seo_title: Option<String>,
215 /// Description shown by search engines. Defaults to the task description when unset.
216 #[serde(default)]
217 pub seo_description: Option<String>,
218 /// Names of the task input fields displayed on the public task page.
219 #[serde(default)]
220 pub input_schema_fields: Option<Vec<String>>,
221 /// Name of the Actor dataset schema entry whose results are displayed. `None` uses the
222 /// Actor's default dataset.
223 #[serde(default)]
224 pub dataset_name: Option<String>,
225 /// Key of the dataset view (from the Actor's dataset schema) used to display results.
226 /// Required to publish the task.
227 #[serde(default)]
228 pub dataset_view: Option<String>,
229}
230
231/// A dataset storage.
232#[derive(Debug, Clone, Deserialize, Serialize)]
233#[serde(rename_all = "camelCase")]
234pub struct Dataset {
235 /// Unique dataset ID.
236 pub id: String,
237 /// Technical name of the dataset, if named.
238 #[serde(default)]
239 pub name: Option<String>,
240 /// ID of the owner.
241 #[serde(default)]
242 pub user_id: Option<String>,
243 /// When the dataset was created.
244 #[serde(default)]
245 pub created_at: Option<DateTime<Utc>>,
246 /// When the dataset was last modified.
247 #[serde(default)]
248 pub modified_at: Option<DateTime<Utc>>,
249 /// Total number of items in the dataset.
250 #[serde(default)]
251 pub item_count: Option<i64>,
252 /// Any other fields returned by the API.
253 #[serde(flatten)]
254 pub extra: Extra,
255}
256
257/// A key-value store storage.
258#[derive(Debug, Clone, Deserialize, Serialize)]
259#[serde(rename_all = "camelCase")]
260pub struct KeyValueStore {
261 /// Unique store ID.
262 pub id: String,
263 /// Technical name of the store, if named.
264 #[serde(default)]
265 pub name: Option<String>,
266 /// ID of the owner.
267 #[serde(default)]
268 pub user_id: Option<String>,
269 /// When the store was created.
270 #[serde(default)]
271 pub created_at: Option<DateTime<Utc>>,
272 /// When the store was last modified.
273 #[serde(default)]
274 pub modified_at: Option<DateTime<Utc>>,
275 /// Any other fields returned by the API.
276 #[serde(flatten)]
277 pub extra: Extra,
278}
279
280/// Metadata about a single key in a key-value store.
281#[derive(Debug, Clone, Deserialize, Serialize)]
282#[serde(rename_all = "camelCase")]
283pub struct KeyValueStoreKey {
284 /// The record key.
285 pub key: String,
286 /// Size of the record value in bytes.
287 #[serde(default)]
288 pub size: Option<i64>,
289 /// Any other fields returned by the API.
290 #[serde(flatten)]
291 pub extra: Extra,
292}
293
294/// Result of listing keys in a key-value store (key-based pagination).
295#[derive(Debug, Clone, Deserialize, Serialize)]
296#[serde(rename_all = "camelCase")]
297pub struct KeyValueStoreKeysPage {
298 /// Maximum number of keys returned for this request.
299 #[serde(default)]
300 pub limit: i64,
301 /// Whether there are more keys to fetch.
302 #[serde(default)]
303 pub is_truncated: bool,
304 /// The key the listing started after.
305 #[serde(default)]
306 pub exclusive_start_key: Option<String>,
307 /// The value to use as `exclusive_start_key` for the next page.
308 #[serde(default)]
309 pub next_exclusive_start_key: Option<String>,
310 /// The keys of this page.
311 #[serde(default)]
312 pub items: Vec<KeyValueStoreKey>,
313}
314
315/// A record (key + value + content type) in a key-value store.
316#[derive(Debug, Clone)]
317pub struct KeyValueStoreRecord {
318 /// The record key.
319 pub key: String,
320 /// The raw value bytes.
321 pub value: Vec<u8>,
322 /// The MIME content type of the value, if reported by the API.
323 pub content_type: Option<String>,
324}
325
326impl KeyValueStoreRecord {
327 /// Interprets the value as UTF-8 text.
328 pub fn as_text(&self) -> Result<String, std::string::FromUtf8Error> {
329 String::from_utf8(self.value.clone())
330 }
331
332 /// Deserializes the value as JSON into `T`.
333 pub fn json<T: serde::de::DeserializeOwned>(&self) -> Result<T, serde_json::Error> {
334 serde_json::from_slice(&self.value)
335 }
336}
337
338/// A request queue storage.
339#[derive(Debug, Clone, Deserialize, Serialize)]
340#[serde(rename_all = "camelCase")]
341pub struct RequestQueue {
342 /// Unique queue ID.
343 pub id: String,
344 /// Technical name of the queue, if named.
345 #[serde(default)]
346 pub name: Option<String>,
347 /// ID of the owner.
348 #[serde(default)]
349 pub user_id: Option<String>,
350 /// When the queue was created.
351 #[serde(default)]
352 pub created_at: Option<DateTime<Utc>>,
353 /// When the queue was last modified.
354 #[serde(default)]
355 pub modified_at: Option<DateTime<Utc>>,
356 /// Total number of requests ever added.
357 #[serde(default)]
358 pub total_request_count: Option<i64>,
359 /// Any other fields returned by the API.
360 #[serde(flatten)]
361 pub extra: Extra,
362}
363
364/// A single request stored in a request queue.
365#[derive(Debug, Clone, Deserialize, Serialize)]
366#[serde(rename_all = "camelCase")]
367pub struct RequestQueueRequest {
368 /// Unique request ID (assigned by the API; omit when adding a new request).
369 #[serde(default, skip_serializing_if = "Option::is_none")]
370 pub id: Option<String>,
371 /// The URL to be processed.
372 pub url: String,
373 /// Unique key used for deduplication (defaults to `url`).
374 #[serde(default, skip_serializing_if = "Option::is_none")]
375 pub unique_key: Option<String>,
376 /// HTTP method, defaults to `GET`.
377 #[serde(default, skip_serializing_if = "Option::is_none")]
378 pub method: Option<String>,
379 /// Arbitrary user data attached to the request.
380 #[serde(default, skip_serializing_if = "Option::is_none")]
381 pub user_data: Option<Value>,
382 /// Any other fields returned by the API.
383 #[serde(flatten)]
384 pub extra: Extra,
385}
386
387/// Result of adding (or updating) a request in a queue.
388#[derive(Debug, Clone, Deserialize, Serialize)]
389#[serde(rename_all = "camelCase")]
390pub struct RequestQueueOperationInfo {
391 /// ID of the request that was added or updated.
392 pub request_id: String,
393 /// Whether the request was already present in the queue.
394 #[serde(default)]
395 pub was_already_present: bool,
396 /// Whether the request had already been handled.
397 #[serde(default)]
398 pub was_already_handled: bool,
399}
400
401/// The head of a request queue (requests waiting to be processed).
402#[derive(Debug, Clone, Deserialize, Serialize)]
403#[serde(rename_all = "camelCase")]
404pub struct RequestQueueHead {
405 /// Maximum number of requests returned.
406 #[serde(default)]
407 pub limit: i64,
408 /// Whether more than one client has accessed the queue.
409 #[serde(default)]
410 pub had_multiple_clients: bool,
411 /// The requests at the head of the queue.
412 #[serde(default)]
413 pub items: Vec<RequestQueueRequest>,
414 /// Any other fields returned by the API.
415 #[serde(flatten)]
416 pub extra: Extra,
417}
418
419/// The head of a request queue with a server-side lock applied (`POST .../head/lock`).
420///
421/// Same shape as [`RequestQueueHead`] plus the lock metadata the API returns alongside it.
422#[derive(Debug, Clone, Deserialize, Serialize)]
423#[serde(rename_all = "camelCase")]
424pub struct LockedRequestQueueHead {
425 /// Maximum number of requests returned.
426 #[serde(default)]
427 pub limit: i64,
428 /// Whether more than one client has accessed the queue.
429 #[serde(default)]
430 pub had_multiple_clients: bool,
431 /// Number of seconds the returned requests were locked for.
432 #[serde(default)]
433 pub lock_secs: i64,
434 /// Whether the queue has any requests locked, by this or another client.
435 #[serde(default)]
436 pub queue_has_locked_requests: Option<bool>,
437 /// The client key the lock was acquired with.
438 #[serde(default)]
439 pub client_key: Option<String>,
440 /// The locked requests from the head of the queue.
441 #[serde(default)]
442 pub items: Vec<RequestQueueRequest>,
443 /// Any other fields returned by the API.
444 #[serde(flatten)]
445 pub extra: Extra,
446}
447
448/// A page of requests returned by `GET /v2/request-queues/{queueId}/requests` (cursor-based
449/// pagination over every request in the queue, as opposed to [`RequestQueueHead`]'s unlocked
450/// peek at the head).
451#[derive(Debug, Clone, Default, Deserialize, Serialize)]
452#[serde(rename_all = "camelCase")]
453pub struct RequestQueueRequestsPage {
454 /// Maximum number of requests returned for this request.
455 #[serde(default)]
456 pub limit: i64,
457 /// ID of the last request of the previous page. Deprecated by the API in favour of `cursor`.
458 #[serde(default)]
459 pub exclusive_start_id: Option<String>,
460 /// Cursor identifying the current page.
461 #[serde(default)]
462 pub cursor: Option<String>,
463 /// Cursor to pass as `cursor` to fetch the next page; absent on the last page.
464 #[serde(default)]
465 pub next_cursor: Option<String>,
466 /// The requests of this page.
467 #[serde(default)]
468 pub items: Vec<RequestQueueRequest>,
469}
470
471/// Result of prolonging a request's lock (`PUT .../requests/{requestId}/lock`).
472#[derive(Debug, Clone, Deserialize, Serialize)]
473#[serde(rename_all = "camelCase")]
474pub struct RequestLockInfo {
475 /// When the (prolonged) lock expires.
476 pub lock_expires_at: DateTime<Utc>,
477}
478
479/// Result of `POST /v2/request-queues/{queueId}/requests/unlock`.
480#[derive(Debug, Clone, Deserialize, Serialize)]
481#[serde(rename_all = "camelCase")]
482pub struct UnlockRequestsResult {
483 /// Number of requests that were unlocked.
484 pub unlocked_count: i64,
485}
486
487/// A request successfully processed by a request-queue batch add or batch delete operation.
488///
489/// The populated fields depend on the operation: a batch **add** always sets `unique_key`,
490/// `request_id`, `was_already_present` and `was_already_handled` (the API's `AddedRequest`); a
491/// batch **delete** sets `id` and/or `unique_key`, whichever the request was identified by (the
492/// API's `DeletedRequest`).
493#[derive(Debug, Clone, Default, Deserialize, Serialize)]
494#[serde(rename_all = "camelCase")]
495pub struct ProcessedRequest {
496 /// The request's ID, when the operation identifies requests by ID (batch delete).
497 #[serde(default, skip_serializing_if = "Option::is_none")]
498 pub id: Option<String>,
499 /// The request's unique key.
500 #[serde(default, skip_serializing_if = "Option::is_none")]
501 pub unique_key: Option<String>,
502 /// The request's ID, as returned by a batch **add** (mirrors the API's `requestId`).
503 #[serde(default, skip_serializing_if = "Option::is_none")]
504 pub request_id: Option<String>,
505 /// Whether the request was already present in the queue (batch add only).
506 #[serde(default, skip_serializing_if = "Option::is_none")]
507 pub was_already_present: Option<bool>,
508 /// Whether the request had already been handled (batch add only).
509 #[serde(default, skip_serializing_if = "Option::is_none")]
510 pub was_already_handled: Option<bool>,
511}
512
513/// A request that a request-queue batch add operation did not process (typically due to rate
514/// limiting), and which [`crate::clients::request_queue::RequestQueueClient::batch_add_requests`]
515/// retries automatically.
516#[derive(Debug, Clone, Deserialize, Serialize)]
517#[serde(rename_all = "camelCase")]
518pub struct UnprocessedRequest {
519 /// The request's unique key.
520 pub unique_key: String,
521 /// The request's URL.
522 pub url: String,
523 /// The request's HTTP method.
524 #[serde(default, skip_serializing_if = "Option::is_none")]
525 pub method: Option<String>,
526}
527
528/// Result of a request-queue batch add or batch delete operation.
529#[derive(Debug, Clone, Default, Deserialize, Serialize)]
530#[serde(rename_all = "camelCase")]
531pub struct BatchRequestsOperationResult {
532 /// Requests that were successfully processed.
533 #[serde(default)]
534 pub processed_requests: Vec<ProcessedRequest>,
535 /// Requests that were not processed and can be retried.
536 #[serde(default)]
537 pub unprocessed_requests: Vec<UnprocessedRequest>,
538}
539
540/// A schedule that triggers Actor or task runs on a cron expression.
541#[derive(Debug, Clone, Deserialize, Serialize)]
542#[serde(rename_all = "camelCase")]
543pub struct Schedule {
544 /// Unique schedule ID.
545 pub id: String,
546 /// ID of the owner.
547 #[serde(default)]
548 pub user_id: Option<String>,
549 /// Technical name of the schedule.
550 #[serde(default)]
551 pub name: Option<String>,
552 /// The cron expression that determines when the schedule fires.
553 #[serde(default)]
554 pub cron_expression: Option<String>,
555 /// Whether the schedule is currently enabled.
556 #[serde(default)]
557 pub is_enabled: Option<bool>,
558 /// Any other fields returned by the API.
559 #[serde(flatten)]
560 pub extra: Extra,
561}
562
563/// A webhook that notifies an external URL on Actor events.
564#[derive(Debug, Clone, Deserialize, Serialize)]
565#[serde(rename_all = "camelCase")]
566pub struct Webhook {
567 /// Unique webhook ID.
568 pub id: String,
569 /// ID of the owner.
570 #[serde(default)]
571 pub user_id: Option<String>,
572 /// The URL that receives the webhook POST request.
573 #[serde(default)]
574 pub request_url: Option<String>,
575 /// Event types that trigger this webhook.
576 #[serde(default)]
577 pub event_types: Vec<String>,
578 /// Any other fields returned by the API.
579 #[serde(flatten)]
580 pub extra: Extra,
581}
582
583/// A single dispatch (invocation) of a webhook.
584#[derive(Debug, Clone, Deserialize, Serialize)]
585#[serde(rename_all = "camelCase")]
586pub struct WebhookDispatch {
587 /// Unique dispatch ID.
588 pub id: String,
589 /// ID of the webhook that produced this dispatch.
590 #[serde(default)]
591 pub webhook_id: Option<String>,
592 /// Any other fields returned by the API.
593 #[serde(flatten)]
594 pub extra: Extra,
595}
596
597/// Account information about a user.
598#[derive(Debug, Clone, Deserialize, Serialize)]
599#[serde(rename_all = "camelCase")]
600pub struct User {
601 /// Unique user ID.
602 pub id: String,
603 /// Username.
604 #[serde(default)]
605 pub username: Option<String>,
606 /// Any other fields returned by the API (public or private depending on the call).
607 #[serde(flatten)]
608 pub extra: Extra,
609}
610
611/// A single Actor entry as returned by the Apify Store listing.
612#[derive(Debug, Clone, Deserialize, Serialize)]
613#[serde(rename_all = "camelCase")]
614pub struct ActorStoreListItem {
615 /// Unique Actor ID.
616 pub id: String,
617 /// Technical name of the Actor.
618 #[serde(default)]
619 pub name: Option<String>,
620 /// Username of the Actor's owner.
621 #[serde(default)]
622 pub username: Option<String>,
623 /// Human-readable title.
624 #[serde(default)]
625 pub title: Option<String>,
626 /// Any other fields returned by the API.
627 #[serde(flatten)]
628 pub extra: Extra,
629}
630
631/// An Actor version.
632#[derive(Debug, Clone, Deserialize, Serialize)]
633#[serde(rename_all = "camelCase")]
634pub struct ActorVersion {
635 /// The version number, e.g. `0.1`.
636 pub version_number: String,
637 /// The source type of the version, e.g. `SOURCE_FILES`, `GIT_REPO`, `TARBALL`, `GITHUB_GIST`.
638 #[serde(default)]
639 pub source_type: Option<String>,
640 /// Any other fields returned by the API.
641 #[serde(flatten)]
642 pub extra: Extra,
643}
644
645/// An environment variable attached to an Actor version.
646#[derive(Debug, Clone, Deserialize, Serialize)]
647#[serde(rename_all = "camelCase")]
648pub struct ActorEnvVar {
649 /// The environment variable name.
650 pub name: String,
651 /// The value (may be omitted for secret variables in responses).
652 #[serde(default, skip_serializing_if = "Option::is_none")]
653 pub value: Option<String>,
654 /// Whether the variable is a secret.
655 #[serde(default, skip_serializing_if = "Option::is_none")]
656 pub is_secret: Option<bool>,
657 /// Any other fields returned by the API.
658 #[serde(flatten)]
659 pub extra: Extra,
660}