diff --git a/src/types/passport_element_error.rs b/src/types/passport_element_error.rs index d99d0abc..2ee14cc5 100644 --- a/src/types/passport_element_error.rs +++ b/src/types/passport_element_error.rs @@ -291,6 +291,28 @@ pub struct PassportElementErrorFiles { pub file_hashes: Vec, } +impl PassportElementErrorFiles { + pub fn new(r#type: PassportElementErrorFilesType, file_hash: S) -> Self + where + S: Into, + { + Self { r#type, file_hash: file_hash.into() } + } + + pub fn r#type(mut self, val: PassportElementErrorFilesType) -> Self { + self.r#type = val; + self + } + + pub fn file_hash(mut self, val: S) -> Self + where + S: Into, + { + self.file_hash = val.into(); + self + } +} + /// Represents an issue with one of the files that constitute the /// translation of a document. ///