messaging_api_line/models/flex_offset.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/// FlexOffset : You can specify the offset of a component with the `offset*` property, in pixels or with a keyword. You can also specify the percentage to the box width for `offsetStart` and `offsetEnd` and to the box height for `offsetTop` and `offsetBottom`. FlexOffset just provides only keywords.
15/// You can specify the offset of a component with the `offset*` property, in pixels or with a keyword. You can also specify the percentage to the box width for `offsetStart` and `offsetEnd` and to the box height for `offsetTop` and `offsetBottom`. FlexOffset just provides only keywords.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum FlexOffset {
18 #[serde(rename = "none")]
19 None,
20 #[serde(rename = "xs")]
21 Xs,
22 #[serde(rename = "sm")]
23 Sm,
24 #[serde(rename = "md")]
25 Md,
26 #[serde(rename = "lg")]
27 Lg,
28 #[serde(rename = "xl")]
29 Xl,
30 #[serde(rename = "xxl")]
31 Xxl,
32
33}
34
35impl std::fmt::Display for FlexOffset {
36 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
37 match self {
38 Self::None => write!(f, "none"),
39 Self::Xs => write!(f, "xs"),
40 Self::Sm => write!(f, "sm"),
41 Self::Md => write!(f, "md"),
42 Self::Lg => write!(f, "lg"),
43 Self::Xl => write!(f, "xl"),
44 Self::Xxl => write!(f, "xxl"),
45 }
46 }
47}
48
49impl Default for FlexOffset {
50 fn default() -> FlexOffset {
51 Self::None
52 }
53}
54