Add setters to PassportElementErrorFiles
@@ -291,6 +291,28 @@ pub struct PassportElementErrorFiles {
pub file_hashes: Vec<String>,
}
+impl PassportElementErrorFiles {
+ pub fn new<S>(r#type: PassportElementErrorFilesType, file_hash: S) -> Self
+ where
+ S: Into<String>,
+ {
+ 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<S>(mut self, val: S) -> Self
+ where
+ S: Into<String>,
+ {
+ self.file_hash = val.into();
+ self
+ }
+}
+
/// Represents an issue with one of the files that constitute the
/// translation of a document.
///
