messaging_api_line/models/
template_image_size.rs

1/*
2 * LINE Messaging API
3 *
4 * This document describes LINE Messaging API.
5 *
6 * The version of the OpenAPI document: 0.0.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TemplateImageSize : Size of the image.  This is only for the `imageSize` in ButtonsTemplate. Specify one of the following values:  `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. 
15/// Size of the image.  This is only for the `imageSize` in ButtonsTemplate. Specify one of the following values:  `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum TemplateImageSize {
18    #[serde(rename = "cover")]
19    Cover,
20    #[serde(rename = "contain")]
21    Contain,
22
23}
24
25impl std::fmt::Display for TemplateImageSize {
26    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Self::Cover => write!(f, "cover"),
29            Self::Contain => write!(f, "contain"),
30        }
31    }
32}
33
34impl Default for TemplateImageSize {
35    fn default() -> TemplateImageSize {
36        Self::Cover
37    }
38}
39