line_messaging_api/models/flex_image_size.rs
1/*
2* Copyright (C) 2016 LINE Corp.
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at
7*
8*     http://www.apache.org/licenses/LICENSE-2.0
9*
10* Unless required by applicable law or agreed to in writing, software
11* distributed under the License is distributed on an "AS IS" BASIS,
12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13* See the License for the specific language governing permissions and
14* limitations under the License.
15*/
16
17/*
18 * LINE Messaging API
19 *
20 * This document describes LINE Messaging API.
21 *
22 * The version of the OpenAPI document: 0.0.3
23 *
24 * Generated by: https://openapi-generator.tech
25 */
26
27/// FlexImageSize : You can set the width of an Flex image component with the `size` property, in pixels, as a percentage, or with a keyword. FlexImageSize just provides only keywords.
28
29/// You can set the width of an Flex image component with the `size` property, in pixels, as a percentage, or with a keyword. FlexImageSize just provides only keywords.
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum FlexImageSize {
32    #[serde(rename = "xxs")]
33    Xxs,
34    #[serde(rename = "xs")]
35    Xs,
36    #[serde(rename = "sm")]
37    Sm,
38    #[serde(rename = "md")]
39    Md,
40    #[serde(rename = "lg")]
41    Lg,
42    #[serde(rename = "xl")]
43    Xl,
44    #[serde(rename = "xxl")]
45    Xxl,
46    #[serde(rename = "3xl")]
47    Variant3xl,
48    #[serde(rename = "4xl")]
49    Variant4xl,
50    #[serde(rename = "5xl")]
51    Variant5xl,
52    #[serde(rename = "full")]
53    Full,
54}
55
56impl ToString for FlexImageSize {
57    fn to_string(&self) -> String {
58        match self {
59            Self::Xxs => String::from("xxs"),
60            Self::Xs => String::from("xs"),
61            Self::Sm => String::from("sm"),
62            Self::Md => String::from("md"),
63            Self::Lg => String::from("lg"),
64            Self::Xl => String::from("xl"),
65            Self::Xxl => String::from("xxl"),
66            Self::Variant3xl => String::from("3xl"),
67            Self::Variant4xl => String::from("4xl"),
68            Self::Variant5xl => String::from("5xl"),
69            Self::Full => String::from("full"),
70        }
71    }
72}
73
74impl Default for FlexImageSize {
75    fn default() -> FlexImageSize {
76        Self::Xxs
77    }
78}