messaging_api_line/models/
user_profile_response.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UserProfileResponse {
16    /// User's display name
17    #[serde(rename = "displayName")]
18    pub display_name: String,
19    /// User ID
20    #[serde(rename = "userId")]
21    pub user_id: String,
22    /// Profile image URL. `https` image URL. Not included in the response if the user doesn't have a profile image.
23    #[serde(rename = "pictureUrl", skip_serializing_if = "Option::is_none")]
24    pub picture_url: Option<String>,
25    /// User's status message. Not included in the response if the user doesn't have a status message.
26    #[serde(rename = "statusMessage", skip_serializing_if = "Option::is_none")]
27    pub status_message: Option<String>,
28    /// User's language, as a BCP 47 language tag. Not included in the response if the user hasn't yet consented to the LINE Privacy Policy.
29    #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
30    pub language: Option<String>,
31}
32
33impl UserProfileResponse {
34    pub fn new(display_name: String, user_id: String) -> UserProfileResponse {
35        UserProfileResponse {
36            display_name,
37            user_id,
38            picture_url: None,
39            status_message: None,
40            language: None,
41        }
42    }
43}
44