1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* public
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.97.5
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DigitalFilesConfig {
/// Files attached to this entitlement. Add files via `POST /entitlements/{id}/files` and remove them via `DELETE /entitlements/{id}/files/{file_id}`.
#[serde(rename = "digital_file_ids")]
pub digital_file_ids: Vec<String>,
/// Optional external URL shown to the customer alongside the files.
#[serde(rename = "external_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub external_url: Option<Option<String>>,
/// Optional human-readable delivery instructions shown to the customer alongside the files.
#[serde(rename = "instructions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub instructions: Option<Option<String>>,
/// Three-way patchable list of legacy file identifiers: * omitted → preserve the current value * `null` → clear * `[...]` → replace On create, an omitted field, an explicit `null`, or an empty array all result in no legacy files attached.
#[serde(rename = "legacy_file_ids", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub legacy_file_ids: Option<Option<Vec<String>>>,
}
impl DigitalFilesConfig {
pub fn new(digital_file_ids: Vec<String>) -> DigitalFilesConfig {
DigitalFilesConfig {
digital_file_ids,
external_url: None,
instructions: None,
legacy_file_ids: None,
}
}
}