pub struct UploadMessageRequestBody {
pub header: String,
pub body: String,
pub image: Option<UploadMessageImage>,
pub bullet_points: Option<Vec<BulletPoint>>,
pub header_position: Option<HeaderPosition>,
}Expand description
The request body for uploading a message, which includes the message text and an optional image reference.
Fields§
§header: StringThe header text of the retention message that the system displays to customers.
body: StringThe body text of the retention message that the system displays to customers.
image: Option<UploadMessageImage>The optional image identifier and its alternative text to appear as part of a text-based message with an image.
bullet_points: Option<Vec<BulletPoint>>The bulleted list to display as part of the retention message.
header_position: Option<HeaderPosition>The position of the header relative to the body and image.
Implementations§
Source§impl UploadMessageRequestBody
impl UploadMessageRequestBody
Sourcepub fn new(
header: String,
body: String,
image: Option<UploadMessageImage>,
bullet_points: Option<Vec<BulletPoint>>,
header_position: Option<HeaderPosition>,
) -> Result<Self, ValidationError>
pub fn new( header: String, body: String, image: Option<UploadMessageImage>, bullet_points: Option<Vec<BulletPoint>>, header_position: Option<HeaderPosition>, ) -> Result<Self, ValidationError>
Creates a new UploadMessageRequestBody with validation.
§Errors
Returns ValidationError::HeaderTooLong if header exceeds 66 characters.
Returns ValidationError::BodyTooLong if body exceeds 144 characters.
Returns ValidationError::TooManyBulletPoints if more than 5 bullet points are provided.
Trait Implementations§
Source§impl Clone for UploadMessageRequestBody
impl Clone for UploadMessageRequestBody
Source§fn clone(&self) -> UploadMessageRequestBody
fn clone(&self) -> UploadMessageRequestBody
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more