Add setters to PassportElementErrorTranslationFiles

This commit is contained in:
Temirkhan Myrzamadi 2020-07-28 15:42:58 +06:00
parent 9e0e338b5a
commit e5c7980659

View file

@ -368,6 +368,28 @@ pub struct PassportElementErrorTranslationFiles {
pub file_hashes: Vec<String>,
}
impl PassportElementErrorTranslationFiles {
pub fn new<S>(r#type: PassportElementErrorTranslationFilesType, file_hash: S) -> Self
where
S: Into<String>,
{
Self { r#type, file_hashes: file_hash.into() }
}
pub fn r#type(mut self, val: PassportElementErrorTranslationFilesType) -> Self {
self.r#type = val;
self
}
pub fn file_hashes<S>(mut self, val: S) -> Self
where
S: Into<String>,
{
self.file_hashes = val.into();
self
}
}
/// Represents an issue in an unspecified place.
///
/// The error is considered resolved when new data is added.