From 064d96c9e313cd4551555dbc212c679ab748242d Mon Sep 17 00:00:00 2001 From: nanato12 Date: Tue, 28 Nov 2023 13:39:47 +0900 Subject: [PATCH] run: cargo fmt --- .../apis/channel_access_token_api.rs | 228 ++- .../apis/configuration.rs | 6 +- openapi/src/channel_access_token/apis/mod.rs | 16 +- .../channel_access_token_key_ids_response.rs | 10 +- .../models/error_response.rs | 6 +- .../issue_channel_access_token_response.rs | 15 +- ...ort_lived_channel_access_token_response.rs | 14 +- ...stateless_channel_access_token_response.rs | 14 +- .../verify_channel_access_token_response.rs | 6 +- openapi/src/insight/apis/configuration.rs | 6 +- openapi/src/insight/apis/insight_api.rs | 185 +- openapi/src/insight/apis/mod.rs | 16 +- openapi/src/insight/models/age_tile.rs | 6 +- openapi/src/insight/models/app_type_tile.rs | 6 +- openapi/src/insight/models/area_tile.rs | 7 +- openapi/src/insight/models/error_detail.rs | 7 +- openapi/src/insight/models/error_response.rs | 7 +- openapi/src/insight/models/gender_tile.rs | 6 +- .../get_friends_demographics_response.rs | 11 +- .../models/get_message_event_response.rs | 6 +- .../get_message_event_response_click.rs | 28 +- .../get_message_event_response_message.rs | 84 +- .../get_message_event_response_overview.rs | 36 +- .../get_number_of_followers_response.rs | 9 +- ...t_number_of_message_deliveries_response.rs | 5 +- .../get_statistics_per_unit_response.rs | 12 +- .../get_statistics_per_unit_response_click.rs | 30 +- ...et_statistics_per_unit_response_message.rs | 91 +- ...t_statistics_per_unit_response_overview.rs | 34 +- .../models/subscription_period_tile.rs | 6 +- openapi/src/liff/apis/configuration.rs | 6 +- openapi/src/liff/apis/liff_api.rs | 111 +- openapi/src/liff/apis/mod.rs | 16 +- .../src/liff/models/add_liff_app_request.rs | 16 +- .../src/liff/models/add_liff_app_response.rs | 11 +- .../liff/models/get_all_liff_apps_response.rs | 11 +- openapi/src/liff/models/liff_app.rs | 14 +- openapi/src/liff/models/liff_bot_prompt.rs | 11 +- openapi/src/liff/models/liff_features.rs | 11 +- openapi/src/liff/models/liff_scope.rs | 7 +- openapi/src/liff/models/liff_view.rs | 14 +- .../liff/models/update_liff_app_request.rs | 16 +- .../src/manage_audience/apis/configuration.rs | 6 +- .../apis/manage_audience_api.rs | 372 +++- .../apis/manage_audience_blob_api.rs | 83 +- openapi/src/manage_audience/apis/mod.rs | 16 +- .../add_audience_to_audience_group_request.rs | 6 +- .../src/manage_audience/models/audience.rs | 10 +- .../manage_audience/models/audience_group.rs | 19 +- .../models/audience_group_authority_level.rs | 7 +- .../models/audience_group_create_route.rs | 11 +- .../models/audience_group_failed_type.rs | 11 +- .../models/audience_group_job.rs | 6 +- .../models/audience_group_job_failed_type.rs | 11 +- .../models/audience_group_job_status.rs | 7 +- .../models/audience_group_job_type.rs | 7 +- .../models/audience_group_permission.rs | 7 +- .../models/audience_group_status.rs | 7 +- .../models/audience_group_type.rs | 7 +- .../models/create_audience_group_request.rs | 14 +- .../models/create_audience_group_response.rs | 17 +- ...eate_click_based_audience_group_request.rs | 12 +- ...ate_click_based_audience_group_response.rs | 15 +- ...create_imp_based_audience_group_request.rs | 10 +- ...reate_imp_based_audience_group_response.rs | 6 +- .../manage_audience/models/error_detail.rs | 7 +- .../manage_audience/models/error_response.rs | 7 +- .../models/get_audience_data_response.rs | 8 +- ...audience_group_authority_level_response.rs | 6 +- .../models/get_audience_groups_response.rs | 11 +- ..._audience_group_authority_level_request.rs | 6 +- ...date_audience_group_description_request.rs | 12 +- .../src/messaging_api/apis/configuration.rs | 6 +- .../messaging_api/apis/messaging_api_api.rs | 1783 ++++++++++++----- .../apis/messaging_api_blob_api.rs | 156 +- openapi/src/messaging_api/apis/mod.rs | 16 +- openapi/src/messaging_api/models/action.rs | 10 +- .../messaging_api/models/age_demographic.rs | 10 +- .../models/age_demographic_filter.rs | 7 +- openapi/src/messaging_api/models/alt_uri.rs | 11 +- .../models/app_type_demographic.rs | 10 +- .../models/app_type_demographic_filter.rs | 7 +- .../messaging_api/models/area_demographic.rs | 10 +- .../models/area_demographic_filter.rs | 7 +- .../models/audience_match_messages_request.rs | 19 +- .../models/audience_recipient.rs | 7 +- .../src/messaging_api/models/audio_message.rs | 7 +- .../messaging_api/models/bot_info_response.rs | 18 +- .../messaging_api/models/broadcast_request.rs | 14 +- .../messaging_api/models/buttons_template.rs | 18 +- .../src/messaging_api/models/camera_action.rs | 7 +- .../models/camera_roll_action.rs | 7 +- .../messaging_api/models/carousel_column.rs | 11 +- .../messaging_api/models/carousel_template.rs | 12 +- .../messaging_api/models/chat_reference.rs | 10 +- .../messaging_api/models/confirm_template.rs | 13 +- .../models/create_rich_menu_alias_request.rs | 7 +- .../models/datetime_picker_action.rs | 8 +- .../models/demographic_filter.rs | 10 +- openapi/src/messaging_api/models/emoji.rs | 7 +- .../src/messaging_api/models/error_detail.rs | 7 +- .../messaging_api/models/error_response.rs | 7 +- openapi/src/messaging_api/models/filter.rs | 10 +- .../messaging_api/models/flex_block_style.rs | 7 +- openapi/src/messaging_api/models/flex_box.rs | 20 +- .../models/flex_box_background.rs | 11 +- .../models/flex_box_linear_gradient.rs | 7 +- .../src/messaging_api/models/flex_bubble.rs | 10 +- .../models/flex_bubble_styles.rs | 7 +- .../src/messaging_api/models/flex_button.rs | 16 +- .../src/messaging_api/models/flex_carousel.rs | 17 +- .../messaging_api/models/flex_component.rs | 11 +- .../messaging_api/models/flex_container.rs | 11 +- .../src/messaging_api/models/flex_filler.rs | 12 +- openapi/src/messaging_api/models/flex_icon.rs | 8 +- .../src/messaging_api/models/flex_image.rs | 28 +- .../src/messaging_api/models/flex_message.rs | 13 +- .../messaging_api/models/flex_separator.rs | 7 +- openapi/src/messaging_api/models/flex_span.rs | 12 +- openapi/src/messaging_api/models/flex_text.rs | 20 +- .../src/messaging_api/models/flex_video.rs | 14 +- .../models/gender_demographic.rs | 10 +- .../models/gender_demographic_filter.rs | 7 +- ...get_aggregation_unit_name_list_response.rs | 7 +- .../get_aggregation_unit_usage_response.rs | 7 +- .../models/get_followers_response.rs | 9 +- ...et_message_content_transcoding_response.rs | 13 +- .../models/get_webhook_endpoint_response.rs | 14 +- .../models/group_member_count_response.rs | 11 +- .../models/group_summary_response.rs | 7 +- .../models/group_user_profile_response.rs | 7 +- .../models/image_carousel_column.rs | 12 +- .../models/image_carousel_template.rs | 17 +- .../src/messaging_api/models/image_message.rs | 13 +- .../messaging_api/models/imagemap_action.rs | 11 +- .../src/messaging_api/models/imagemap_area.rs | 7 +- .../models/imagemap_base_size.rs | 12 +- .../models/imagemap_external_link.rs | 7 +- .../messaging_api/models/imagemap_message.rs | 15 +- .../messaging_api/models/imagemap_video.rs | 7 +- .../models/issue_link_token_response.rs | 11 +- openapi/src/messaging_api/models/limit.rs | 10 +- .../messaging_api/models/location_action.rs | 7 +- .../messaging_api/models/location_message.rs | 15 +- .../models/mark_messages_as_read_request.rs | 7 +- .../models/members_ids_response.rs | 9 +- openapi/src/messaging_api/models/message.rs | 11 +- .../messaging_api/models/message_action.rs | 7 +- .../models/message_imagemap_action.rs | 13 +- .../models/message_quota_response.rs | 9 +- .../messaging_api/models/multicast_request.rs | 24 +- .../models/narrowcast_progress_response.rs | 16 +- .../models/narrowcast_request.rs | 14 +- .../models/number_of_messages_response.rs | 10 +- .../models/operator_demographic_filter.rs | 7 +- .../models/operator_recipient.rs | 11 +- .../models/pnp_messages_request.rs | 19 +- .../messaging_api/models/postback_action.rs | 8 +- .../models/push_message_request.rs | 26 +- .../models/push_message_response.rs | 15 +- .../src/messaging_api/models/quick_reply.rs | 10 +- .../messaging_api/models/quick_reply_item.rs | 7 +- .../models/quota_consumption_response.rs | 11 +- .../src/messaging_api/models/quota_type.rs | 7 +- openapi/src/messaging_api/models/recipient.rs | 10 +- .../models/redelivery_recipient.rs | 7 +- .../models/reply_message_request.rs | 19 +- .../models/reply_message_response.rs | 15 +- .../models/rich_menu_alias_list_response.rs | 15 +- .../models/rich_menu_alias_response.rs | 7 +- .../messaging_api/models/rich_menu_area.rs | 6 +- .../models/rich_menu_batch_link_operation.rs | 12 +- .../models/rich_menu_batch_operation.rs | 10 +- .../models/rich_menu_batch_progress_phase.rs | 11 +- .../rich_menu_batch_progress_response.rs | 16 +- .../models/rich_menu_batch_request.rs | 11 +- .../rich_menu_batch_unlink_all_operation.rs | 10 +- .../rich_menu_batch_unlink_operation.rs | 11 +- .../messaging_api/models/rich_menu_bounds.rs | 6 +- .../models/rich_menu_bulk_link_request.rs | 7 +- .../models/rich_menu_bulk_unlink_request.rs | 11 +- .../models/rich_menu_id_response.rs | 11 +- .../models/rich_menu_list_response.rs | 15 +- .../messaging_api/models/rich_menu_request.rs | 7 +- .../models/rich_menu_response.rs | 16 +- .../messaging_api/models/rich_menu_size.rs | 6 +- .../models/rich_menu_switch_action.rs | 7 +- .../models/room_member_count_response.rs | 11 +- .../models/room_user_profile_response.rs | 7 +- openapi/src/messaging_api/models/sender.rs | 6 +- .../src/messaging_api/models/sent_message.rs | 9 +- .../models/set_webhook_endpoint_request.rs | 11 +- .../messaging_api/models/sticker_message.rs | 7 +- .../models/subscription_period_demographic.rs | 10 +- .../subscription_period_demographic_filter.rs | 7 +- openapi/src/messaging_api/models/template.rs | 11 +- .../messaging_api/models/template_message.rs | 13 +- .../models/test_webhook_endpoint_request.rs | 11 +- .../models/test_webhook_endpoint_response.rs | 16 +- .../src/messaging_api/models/text_message.rs | 7 +- .../models/update_rich_menu_alias_request.rs | 11 +- .../src/messaging_api/models/uri_action.rs | 7 +- .../models/uri_imagemap_action.rs | 13 +- .../models/user_profile_response.rs | 7 +- .../models/validate_message_request.rs | 11 +- .../src/messaging_api/models/video_message.rs | 13 +- openapi/src/module/apis/configuration.rs | 6 +- openapi/src/module/apis/line_module_api.rs | 131 +- openapi/src/module/apis/mod.rs | 16 +- .../models/acquire_chat_control_request.rs | 10 +- .../module/models/detach_module_request.rs | 10 +- .../src/module/models/get_modules_response.rs | 13 +- openapi/src/module/models/module_bot.rs | 6 +- .../src/module_attach/apis/configuration.rs | 6 +- .../apis/line_module_attach_api.rs | 42 +- openapi/src/module_attach/apis/mod.rs | 16 +- .../models/attach_module_response.rs | 11 +- openapi/src/shop/apis/configuration.rs | 6 +- openapi/src/shop/apis/mod.rs | 16 +- openapi/src/shop/apis/shop_api.rs | 31 +- openapi/src/shop/models/error_response.rs | 11 +- .../shop/models/mission_sticker_request.rs | 13 +- openapi/src/webhook/apis/configuration.rs | 6 +- openapi/src/webhook/apis/dummy_api.rs | 28 +- openapi/src/webhook/apis/mod.rs | 16 +- .../src/webhook/models/account_link_event.rs | 15 +- openapi/src/webhook/models/action_result.rs | 13 +- openapi/src/webhook/models/activated_event.rs | 15 +- openapi/src/webhook/models/all_mentionee.rs | 6 +- .../webhook/models/attached_module_content.rs | 7 +- .../webhook/models/audio_message_content.rs | 13 +- openapi/src/webhook/models/beacon_content.rs | 6 +- openapi/src/webhook/models/beacon_event.rs | 16 +- .../src/webhook/models/bot_resumed_event.rs | 14 +- .../src/webhook/models/bot_suspended_event.rs | 14 +- .../src/webhook/models/callback_request.rs | 14 +- openapi/src/webhook/models/chat_control.rs | 11 +- .../src/webhook/models/content_provider.rs | 5 +- .../src/webhook/models/deactivated_event.rs | 14 +- .../src/webhook/models/delivery_context.rs | 10 +- .../webhook/models/detached_module_content.rs | 6 +- openapi/src/webhook/models/emoji.rs | 7 +- openapi/src/webhook/models/event.rs | 10 +- openapi/src/webhook/models/event_mode.rs | 7 +- .../webhook/models/file_message_content.rs | 14 +- openapi/src/webhook/models/follow_event.rs | 15 +- openapi/src/webhook/models/group_source.rs | 7 +- .../webhook/models/image_message_content.rs | 16 +- openapi/src/webhook/models/image_set.rs | 7 +- openapi/src/webhook/models/join_event.rs | 15 +- openapi/src/webhook/models/joined_members.rs | 11 +- openapi/src/webhook/models/leave_event.rs | 14 +- openapi/src/webhook/models/left_members.rs | 11 +- openapi/src/webhook/models/link_content.rs | 10 +- .../src/webhook/models/link_things_content.rs | 12 +- .../models/location_message_content.rs | 14 +- .../src/webhook/models/member_joined_event.rs | 16 +- .../src/webhook/models/member_left_event.rs | 15 +- openapi/src/webhook/models/mention.rs | 11 +- openapi/src/webhook/models/mentionee.rs | 11 +- openapi/src/webhook/models/message_content.rs | 11 +- openapi/src/webhook/models/message_event.rs | 15 +- openapi/src/webhook/models/module_content.rs | 11 +- openapi/src/webhook/models/module_event.rs | 15 +- .../src/webhook/models/postback_content.rs | 12 +- openapi/src/webhook/models/postback_event.rs | 15 +- openapi/src/webhook/models/room_source.rs | 7 +- openapi/src/webhook/models/scenario_result.rs | 12 +- .../models/scenario_result_things_content.rs | 13 +- openapi/src/webhook/models/source.rs | 10 +- .../webhook/models/sticker_message_content.rs | 23 +- .../webhook/models/text_message_content.rs | 16 +- openapi/src/webhook/models/things_content.rs | 11 +- openapi/src/webhook/models/things_event.rs | 16 +- openapi/src/webhook/models/unfollow_event.rs | 14 +- .../webhook/models/unlink_things_content.rs | 12 +- openapi/src/webhook/models/unsend_detail.rs | 11 +- openapi/src/webhook/models/unsend_event.rs | 15 +- openapi/src/webhook/models/user_mentionee.rs | 6 +- openapi/src/webhook/models/user_source.rs | 7 +- .../webhook/models/video_message_content.rs | 16 +- .../src/webhook/models/video_play_complete.rs | 11 +- .../models/video_play_complete_event.rs | 16 +- 283 files changed, 3418 insertions(+), 2928 deletions(-) diff --git a/openapi/src/channel_access_token/apis/channel_access_token_api.rs b/openapi/src/channel_access_token/apis/channel_access_token_api.rs index 17a37a5f..766c19ac 100644 --- a/openapi/src/channel_access_token/apis/channel_access_token_api.rs +++ b/openapi/src/channel_access_token/apis/channel_access_token_api.rs @@ -20,15 +20,14 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::channel_access_token::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`gets_all_valid_channel_access_token_key_ids`] #[derive(Clone, Debug)] @@ -36,7 +35,7 @@ pub struct GetsAllValidChannelAccessTokenKeyIdsParams { /// `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` pub client_assertion_type: String, /// A JSON Web Token (JWT) (opens new window)the client needs to create and sign with the private key. - pub client_assertion: String + pub client_assertion: String, } /// struct for passing parameters to the method [`issue_channel_token`] @@ -47,7 +46,7 @@ pub struct IssueChannelTokenParams { /// Channel ID. pub client_id: Option, /// Channel secret. - pub client_secret: Option + pub client_secret: Option, } /// struct for passing parameters to the method [`issue_channel_token_by_jwt`] @@ -58,7 +57,7 @@ pub struct IssueChannelTokenByJwtParams { /// urn:ietf:params:oauth:client-assertion-type:jwt-bearer pub client_assertion_type: Option, /// A JSON Web Token the client needs to create and sign with the private key of the Assertion Signing Key. - pub client_assertion: Option + pub client_assertion: Option, } /// struct for passing parameters to the method [`issue_stateless_channel_token`] @@ -73,14 +72,14 @@ pub struct IssueStatelessChannelTokenParams { /// Channel ID. pub client_id: Option, /// Channel secret. - pub client_secret: Option + pub client_secret: Option, } /// struct for passing parameters to the method [`revoke_channel_token`] #[derive(Clone, Debug)] pub struct RevokeChannelTokenParams { /// Channel access token - pub access_token: Option + pub access_token: Option, } /// struct for passing parameters to the method [`revoke_channel_token_by_jwt`] @@ -91,24 +90,23 @@ pub struct RevokeChannelTokenByJwtParams { /// Channel Secret pub client_secret: Option, /// Channel access token - pub access_token: Option + pub access_token: Option, } /// struct for passing parameters to the method [`verify_channel_token`] #[derive(Clone, Debug)] pub struct VerifyChannelTokenParams { /// A short-lived or long-lived channel access token. - pub access_token: Option + pub access_token: Option, } /// struct for passing parameters to the method [`verify_channel_token_by_jwt`] #[derive(Clone, Debug)] pub struct VerifyChannelTokenByJwtParams { /// Channel access token with a user-specified expiration (Channel Access Token v2.1). - pub access_token: String + pub access_token: String, } - /// struct for typed errors of method [`gets_all_valid_channel_access_token_key_ids`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -166,25 +164,36 @@ pub enum VerifyChannelTokenByJwtError { UnknownValue(serde_json::Value), } - /// Gets all valid channel access token key IDs. -pub async fn gets_all_valid_channel_access_token_key_ids(configuration: &configuration::Configuration, params: GetsAllValidChannelAccessTokenKeyIdsParams) -> Result> { +pub async fn gets_all_valid_channel_access_token_key_ids( + configuration: &configuration::Configuration, + params: GetsAllValidChannelAccessTokenKeyIdsParams, +) -> Result< + crate::channel_access_token::models::ChannelAccessTokenKeyIdsResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let client_assertion_type = params.client_assertion_type; let client_assertion = params.client_assertion; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/oauth2/v2.1/tokens/kid", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("client_assertion_type", &client_assertion_type.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("client_assertion", &client_assertion.to_string())]); + let local_var_uri_str = format!( + "{}/oauth2/v2.1/tokens/kid", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder + .query(&[("client_assertion_type", &client_assertion_type.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("client_assertion", &client_assertion.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let local_var_req = local_var_req_builder.build()?; @@ -196,14 +205,25 @@ pub async fn gets_all_valid_channel_access_token_key_ids(configuration: &configu if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Issue short-lived channel access token -pub async fn issue_channel_token(configuration: &configuration::Configuration, params: IssueChannelTokenParams) -> Result> { +pub async fn issue_channel_token( + configuration: &configuration::Configuration, + params: IssueChannelTokenParams, +) -> Result< + crate::channel_access_token::models::IssueShortLivedChannelAccessTokenResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters @@ -211,14 +231,15 @@ pub async fn issue_channel_token(configuration: &configuration::Configuration, p let client_id = params.client_id; let client_secret = params.client_secret; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/oauth/accessToken", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let mut local_var_form_params = std::collections::HashMap::new(); if let Some(local_var_param_value) = grant_type { @@ -241,14 +262,25 @@ pub async fn issue_channel_token(configuration: &configuration::Configuration, p if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Issues a channel access token that allows you to specify a desired expiration date. This method lets you use JWT assertion for authentication. -pub async fn issue_channel_token_by_jwt(configuration: &configuration::Configuration, params: IssueChannelTokenByJwtParams) -> Result> { +pub async fn issue_channel_token_by_jwt( + configuration: &configuration::Configuration, + params: IssueChannelTokenByJwtParams, +) -> Result< + crate::channel_access_token::models::IssueChannelAccessTokenResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters @@ -256,14 +288,15 @@ pub async fn issue_channel_token_by_jwt(configuration: &configuration::Configura let client_assertion_type = params.client_assertion_type; let client_assertion = params.client_assertion; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/oauth2/v2.1/token", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let mut local_var_form_params = std::collections::HashMap::new(); if let Some(local_var_param_value) = grant_type { @@ -286,14 +319,25 @@ pub async fn issue_channel_token_by_jwt(configuration: &configuration::Configura if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// Issues a new stateless channel access token, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. -pub async fn issue_stateless_channel_token(configuration: &configuration::Configuration, params: IssueStatelessChannelTokenParams) -> Result> { +/// Issues a new stateless channel access token, which doesn't have max active token limit unlike the other token types. The newly issued token is only valid for 15 minutes but can not be revoked until it naturally expires. +pub async fn issue_stateless_channel_token( + configuration: &configuration::Configuration, + params: IssueStatelessChannelTokenParams, +) -> Result< + crate::channel_access_token::models::IssueStatelessChannelAccessTokenResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters @@ -303,14 +347,15 @@ pub async fn issue_stateless_channel_token(configuration: &configuration::Config let client_id = params.client_id; let client_secret = params.client_secret; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/oauth2/v3/token", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let mut local_var_form_params = std::collections::HashMap::new(); if let Some(local_var_param_value) = grant_type { @@ -339,27 +384,36 @@ pub async fn issue_stateless_channel_token(configuration: &configuration::Config if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Revoke short-lived or long-lived channel access token -pub async fn revoke_channel_token(configuration: &configuration::Configuration, params: RevokeChannelTokenParams) -> Result<(), Error> { +pub async fn revoke_channel_token( + configuration: &configuration::Configuration, + params: RevokeChannelTokenParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let access_token = params.access_token; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/oauth/revoke", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let mut local_var_form_params = std::collections::HashMap::new(); if let Some(local_var_param_value) = access_token { @@ -376,14 +430,22 @@ pub async fn revoke_channel_token(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Revoke channel access token v2.1 -pub async fn revoke_channel_token_by_jwt(configuration: &configuration::Configuration, params: RevokeChannelTokenByJwtParams) -> Result<(), Error> { +pub async fn revoke_channel_token_by_jwt( + configuration: &configuration::Configuration, + params: RevokeChannelTokenByJwtParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters @@ -391,14 +453,15 @@ pub async fn revoke_channel_token_by_jwt(configuration: &configuration::Configur let client_secret = params.client_secret; let access_token = params.access_token; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/oauth2/v2.1/revoke", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let mut local_var_form_params = std::collections::HashMap::new(); if let Some(local_var_param_value) = client_id { @@ -421,27 +484,39 @@ pub async fn revoke_channel_token_by_jwt(configuration: &configuration::Configur if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Verify the validity of short-lived and long-lived channel access tokens -pub async fn verify_channel_token(configuration: &configuration::Configuration, params: VerifyChannelTokenParams) -> Result> { +pub async fn verify_channel_token( + configuration: &configuration::Configuration, + params: VerifyChannelTokenParams, +) -> Result< + crate::channel_access_token::models::VerifyChannelAccessTokenResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let access_token = params.access_token; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/oauth/verify", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let mut local_var_form_params = std::collections::HashMap::new(); if let Some(local_var_param_value) = access_token { @@ -458,28 +533,41 @@ pub async fn verify_channel_token(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// You can verify whether a Channel access token with a user-specified expiration (Channel Access Token v2.1) is valid. -pub async fn verify_channel_token_by_jwt(configuration: &configuration::Configuration, params: VerifyChannelTokenByJwtParams) -> Result> { +pub async fn verify_channel_token_by_jwt( + configuration: &configuration::Configuration, + params: VerifyChannelTokenByJwtParams, +) -> Result< + crate::channel_access_token::models::VerifyChannelAccessTokenResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let access_token = params.access_token; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/oauth2/v2.1/verify", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - local_var_req_builder = local_var_req_builder.query(&[("access_token", &access_token.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("access_token", &access_token.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } let local_var_req = local_var_req_builder.build()?; @@ -491,9 +579,13 @@ pub async fn verify_channel_token_by_jwt(configuration: &configuration::Configur if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/channel_access_token/apis/configuration.rs b/openapi/src/channel_access_token/apis/configuration.rs index cb14f285..101bc203 100644 --- a/openapi/src/channel_access_token/apis/configuration.rs +++ b/openapi/src/channel_access_token/apis/configuration.rs @@ -20,12 +20,10 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/channel_access_token/apis/mod.rs b/openapi/src/channel_access_token/apis/mod.rs index aa35674f..435e8f0a 100644 --- a/openapi/src/channel_access_token/apis/mod.rs +++ b/openapi/src/channel_access_token/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/channel_access_token/models/channel_access_token_key_ids_response.rs b/openapi/src/channel_access_token/models/channel_access_token_key_ids_response.rs index 07bbc99b..5f08226f 100644 --- a/openapi/src/channel_access_token/models/channel_access_token_key_ids_response.rs +++ b/openapi/src/channel_access_token/models/channel_access_token_key_ids_response.rs @@ -20,14 +20,12 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// ChannelAccessTokenKeyIdsResponse : Channel access token key IDs - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ChannelAccessTokenKeyIdsResponse { /// Array of channel access token key IDs. @@ -38,10 +36,6 @@ pub struct ChannelAccessTokenKeyIdsResponse { impl ChannelAccessTokenKeyIdsResponse { /// Channel access token key IDs pub fn new(kids: Vec) -> ChannelAccessTokenKeyIdsResponse { - ChannelAccessTokenKeyIdsResponse { - kids, - } + ChannelAccessTokenKeyIdsResponse { kids } } } - - diff --git a/openapi/src/channel_access_token/models/error_response.rs b/openapi/src/channel_access_token/models/error_response.rs index dbeb45ac..f4e0ddec 100644 --- a/openapi/src/channel_access_token/models/error_response.rs +++ b/openapi/src/channel_access_token/models/error_response.rs @@ -20,14 +20,12 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// ErrorResponse : Error response of the Channel access token - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorResponse { /// Error summary @@ -47,5 +45,3 @@ impl ErrorResponse { } } } - - diff --git a/openapi/src/channel_access_token/models/issue_channel_access_token_response.rs b/openapi/src/channel_access_token/models/issue_channel_access_token_response.rs index 70e8b8b2..b04a88ec 100644 --- a/openapi/src/channel_access_token/models/issue_channel_access_token_response.rs +++ b/openapi/src/channel_access_token/models/issue_channel_access_token_response.rs @@ -20,17 +20,15 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IssueChannelAccessTokenResponse : Issued channel access token - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IssueChannelAccessTokenResponse { - /// Channel access token. + /// Channel access token. #[serde(rename = "access_token")] pub access_token: String, /// Amount of time in seconds from issue to expiration of the channel access token @@ -46,7 +44,12 @@ pub struct IssueChannelAccessTokenResponse { impl IssueChannelAccessTokenResponse { /// Issued channel access token - pub fn new(access_token: String, expires_in: i32, token_type: String, key_id: String) -> IssueChannelAccessTokenResponse { + pub fn new( + access_token: String, + expires_in: i32, + token_type: String, + key_id: String, + ) -> IssueChannelAccessTokenResponse { IssueChannelAccessTokenResponse { access_token, expires_in, @@ -55,5 +58,3 @@ impl IssueChannelAccessTokenResponse { } } } - - diff --git a/openapi/src/channel_access_token/models/issue_short_lived_channel_access_token_response.rs b/openapi/src/channel_access_token/models/issue_short_lived_channel_access_token_response.rs index a6cdb090..aebc370b 100644 --- a/openapi/src/channel_access_token/models/issue_short_lived_channel_access_token_response.rs +++ b/openapi/src/channel_access_token/models/issue_short_lived_channel_access_token_response.rs @@ -20,17 +20,15 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IssueShortLivedChannelAccessTokenResponse : Issued short-lived channel access token - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IssueShortLivedChannelAccessTokenResponse { - /// A short-lived channel access token. Valid for 30 days. Note: Channel access tokens cannot be refreshed. + /// A short-lived channel access token. Valid for 30 days. Note: Channel access tokens cannot be refreshed. #[serde(rename = "access_token")] pub access_token: String, /// Time until channel access token expires in seconds from time the token is issued. @@ -43,7 +41,11 @@ pub struct IssueShortLivedChannelAccessTokenResponse { impl IssueShortLivedChannelAccessTokenResponse { /// Issued short-lived channel access token - pub fn new(access_token: String, expires_in: i32, token_type: String) -> IssueShortLivedChannelAccessTokenResponse { + pub fn new( + access_token: String, + expires_in: i32, + token_type: String, + ) -> IssueShortLivedChannelAccessTokenResponse { IssueShortLivedChannelAccessTokenResponse { access_token, expires_in, @@ -51,5 +53,3 @@ impl IssueShortLivedChannelAccessTokenResponse { } } } - - diff --git a/openapi/src/channel_access_token/models/issue_stateless_channel_access_token_response.rs b/openapi/src/channel_access_token/models/issue_stateless_channel_access_token_response.rs index 1fce9e66..1b24b18d 100644 --- a/openapi/src/channel_access_token/models/issue_stateless_channel_access_token_response.rs +++ b/openapi/src/channel_access_token/models/issue_stateless_channel_access_token_response.rs @@ -20,17 +20,15 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// IssueStatelessChannelAccessTokenResponse : Issued stateless channel access token - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IssueStatelessChannelAccessTokenResponse { - /// A stateless channel access token. The token is an opaque string which means its format is an implementation detail and the consumer of this token should never try to use the data parsed from the token. + /// A stateless channel access token. The token is an opaque string which means its format is an implementation detail and the consumer of this token should never try to use the data parsed from the token. #[serde(rename = "access_token")] pub access_token: String, /// Duration in seconds after which the issued access token expires @@ -43,7 +41,11 @@ pub struct IssueStatelessChannelAccessTokenResponse { impl IssueStatelessChannelAccessTokenResponse { /// Issued stateless channel access token - pub fn new(access_token: String, expires_in: i32, token_type: String) -> IssueStatelessChannelAccessTokenResponse { + pub fn new( + access_token: String, + expires_in: i32, + token_type: String, + ) -> IssueStatelessChannelAccessTokenResponse { IssueStatelessChannelAccessTokenResponse { access_token, expires_in, @@ -51,5 +53,3 @@ impl IssueStatelessChannelAccessTokenResponse { } } } - - diff --git a/openapi/src/channel_access_token/models/verify_channel_access_token_response.rs b/openapi/src/channel_access_token/models/verify_channel_access_token_response.rs index ebbc2ac6..ff12b852 100644 --- a/openapi/src/channel_access_token/models/verify_channel_access_token_response.rs +++ b/openapi/src/channel_access_token/models/verify_channel_access_token_response.rs @@ -20,14 +20,12 @@ * This document describes Channel Access Token API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// VerifyChannelAccessTokenResponse : Verification result - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct VerifyChannelAccessTokenResponse { /// The channel ID for which the channel access token was issued. @@ -51,5 +49,3 @@ impl VerifyChannelAccessTokenResponse { } } } - - diff --git a/openapi/src/insight/apis/configuration.rs b/openapi/src/insight/apis/configuration.rs index 963c0dda..060e335c 100644 --- a/openapi/src/insight/apis/configuration.rs +++ b/openapi/src/insight/apis/configuration.rs @@ -20,12 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/insight/apis/insight_api.rs b/openapi/src/insight/apis/insight_api.rs index 7c52d13d..5ece9cfd 100644 --- a/openapi/src/insight/apis/insight_api.rs +++ b/openapi/src/insight/apis/insight_api.rs @@ -20,49 +20,47 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::insight::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`get_message_event`] #[derive(Clone, Debug)] pub struct GetMessageEventParams { - /// Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID. - pub request_id: String + /// Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID. + pub request_id: String, } /// struct for passing parameters to the method [`get_number_of_followers`] #[derive(Clone, Debug)] pub struct GetNumberOfFollowersParams { - /// Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 - pub date: Option + /// Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 + pub date: Option, } /// struct for passing parameters to the method [`get_number_of_message_deliveries`] #[derive(Clone, Debug)] pub struct GetNumberOfMessageDeliveriesParams { - /// Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9 - pub date: String + /// Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9 + pub date: String, } /// struct for passing parameters to the method [`get_statistics_per_unit`] #[derive(Clone, Debug)] pub struct GetStatisticsPerUnitParams { - /// Name of aggregation unit specified when sending the message. Case-sensitive. For example, `Promotion_a` and `Promotion_A` are regarded as different unit names. + /// Name of aggregation unit specified when sending the message. Case-sensitive. For example, `Promotion_a` and `Promotion_A` are regarded as different unit names. pub custom_aggregation_unit: String, - /// Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 + /// Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 pub from: String, - /// End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 - pub to: String + /// End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 + pub to: String, } - /// struct for typed errors of method [`get_friends_demographics`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -98,21 +96,29 @@ pub enum GetStatisticsPerUnitError { UnknownValue(serde_json::Value), } - -/// Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID). -pub async fn get_friends_demographics(configuration: &configuration::Configuration) -> Result> { +/// Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID). +pub async fn get_friends_demographics( + configuration: &configuration::Configuration, +) -> Result< + crate::insight::models::GetFriendsDemographicsResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/insight/demographic", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/insight/demographic", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -127,28 +133,40 @@ pub async fn get_friends_demographics(configuration: &configuration::Configurati if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. -pub async fn get_message_event(configuration: &configuration::Configuration, params: GetMessageEventParams) -> Result> { +/// Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. +pub async fn get_message_event( + configuration: &configuration::Configuration, + params: GetMessageEventParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let request_id = params.request_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/insight/message/event", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/insight/message/event", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("requestId", &request_id.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -163,30 +181,44 @@ pub async fn get_message_event(configuration: &configuration::Configuration, par if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// Returns the number of users who have added the LINE Official Account on or before a specified date. -pub async fn get_number_of_followers(configuration: &configuration::Configuration, params: GetNumberOfFollowersParams) -> Result> { +/// Returns the number of users who have added the LINE Official Account on or before a specified date. +pub async fn get_number_of_followers( + configuration: &configuration::Configuration, + params: GetNumberOfFollowersParams, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/insight/followers", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/insight/followers", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = date { - local_var_req_builder = local_var_req_builder.query(&[("date", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("date", &local_var_str.to_string())]); } if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -201,28 +233,43 @@ pub async fn get_number_of_followers(configuration: &configuration::Configuratio if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// Returns the number of messages sent from LINE Official Account on a specified day. -pub async fn get_number_of_message_deliveries(configuration: &configuration::Configuration, params: GetNumberOfMessageDeliveriesParams) -> Result> { +/// Returns the number of messages sent from LINE Official Account on a specified day. +pub async fn get_number_of_message_deliveries( + configuration: &configuration::Configuration, + params: GetNumberOfMessageDeliveriesParams, +) -> Result< + crate::insight::models::GetNumberOfMessageDeliveriesResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/insight/message/delivery", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/insight/message/delivery", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("date", &date.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -237,14 +284,23 @@ pub async fn get_number_of_message_deliveries(configuration: &configuration::Con if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account. -pub async fn get_statistics_per_unit(configuration: &configuration::Configuration, params: GetStatisticsPerUnitParams) -> Result> { +/// You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account. +pub async fn get_statistics_per_unit( + configuration: &configuration::Configuration, + params: GetStatisticsPerUnitParams, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters @@ -252,17 +308,24 @@ pub async fn get_statistics_per_unit(configuration: &configuration::Configuratio let from = params.from; let to = params.to; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/insight/message/event/aggregation", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("customAggregationUnit", &custom_aggregation_unit.to_string())]); + let local_var_uri_str = format!( + "{}/v2/bot/insight/message/event/aggregation", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[( + "customAggregationUnit", + &custom_aggregation_unit.to_string(), + )]); local_var_req_builder = local_var_req_builder.query(&[("from", &from.to_string())]); local_var_req_builder = local_var_req_builder.query(&[("to", &to.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -277,9 +340,13 @@ pub async fn get_statistics_per_unit(configuration: &configuration::Configuratio if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/insight/apis/mod.rs b/openapi/src/insight/apis/mod.rs index 19cd8f72..84b18e61 100644 --- a/openapi/src/insight/apis/mod.rs +++ b/openapi/src/insight/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/insight/models/age_tile.rs b/openapi/src/insight/models/age_tile.rs index c0a6f573..0f17f85a 100644 --- a/openapi/src/insight/models/age_tile.rs +++ b/openapi/src/insight/models/age_tile.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AgeTile { /// users' age @@ -76,4 +73,3 @@ impl Default for AgeInsight { Self::From0to14 } } - diff --git a/openapi/src/insight/models/app_type_tile.rs b/openapi/src/insight/models/app_type_tile.rs index c1c19671..c357b587 100644 --- a/openapi/src/insight/models/app_type_tile.rs +++ b/openapi/src/insight/models/app_type_tile.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AppTypeTile { /// users' OS @@ -62,4 +59,3 @@ impl Default for AppTypeInsight { Self::Ios } } - diff --git a/openapi/src/insight/models/area_tile.rs b/openapi/src/insight/models/area_tile.rs index 301a8651..4d6b9b2b 100644 --- a/openapi/src/insight/models/area_tile.rs +++ b/openapi/src/insight/models/area_tile.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AreaTile { /// users' country and region @@ -45,5 +42,3 @@ impl AreaTile { } } } - - diff --git a/openapi/src/insight/models/error_detail.rs b/openapi/src/insight/models/error_detail.rs index 72c686ac..22628b66 100644 --- a/openapi/src/insight/models/error_detail.rs +++ b/openapi/src/insight/models/error_detail.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorDetail { /// Details of the error. Not included in the response under certain situations. @@ -45,5 +42,3 @@ impl ErrorDetail { } } } - - diff --git a/openapi/src/insight/models/error_response.rs b/openapi/src/insight/models/error_response.rs index b77a9061..2a1627a1 100644 --- a/openapi/src/insight/models/error_response.rs +++ b/openapi/src/insight/models/error_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorResponse { /// Message containing information about the error. @@ -45,5 +42,3 @@ impl ErrorResponse { } } } - - diff --git a/openapi/src/insight/models/gender_tile.rs b/openapi/src/insight/models/gender_tile.rs index f273254e..94da0f9b 100644 --- a/openapi/src/insight/models/gender_tile.rs +++ b/openapi/src/insight/models/gender_tile.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GenderTile { /// users' gender @@ -62,4 +59,3 @@ impl Default for GenderInsight { Self::Male } } - diff --git a/openapi/src/insight/models/get_friends_demographics_response.rs b/openapi/src/insight/models/get_friends_demographics_response.rs index a27fc8b4..30e2914b 100644 --- a/openapi/src/insight/models/get_friends_demographics_response.rs +++ b/openapi/src/insight/models/get_friends_demographics_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetFriendsDemographicsResponse : Get friend demographics - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFriendsDemographicsResponse { /// true if friend demographic information is available. @@ -46,7 +44,10 @@ pub struct GetFriendsDemographicsResponse { #[serde(rename = "appTypes", skip_serializing_if = "Option::is_none")] pub app_types: Option>, /// Percentage per friendship duration. - #[serde(rename = "subscriptionPeriods", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "subscriptionPeriods", + skip_serializing_if = "Option::is_none" + )] pub subscription_periods: Option>, } @@ -63,5 +64,3 @@ impl GetFriendsDemographicsResponse { } } } - - diff --git a/openapi/src/insight/models/get_message_event_response.rs b/openapi/src/insight/models/get_message_event_response.rs index 77d410d0..65e3abff 100644 --- a/openapi/src/insight/models/get_message_event_response.rs +++ b/openapi/src/insight/models/get_message_event_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetMessageEventResponse : Statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMessageEventResponse { #[serde(rename = "overview", skip_serializing_if = "Option::is_none")] @@ -50,5 +48,3 @@ impl GetMessageEventResponse { } } } - - diff --git a/openapi/src/insight/models/get_message_event_response_click.rs b/openapi/src/insight/models/get_message_event_response_click.rs index 45be7706..e11c5331 100644 --- a/openapi/src/insight/models/get_message_event_response_click.rs +++ b/openapi/src/insight/models/get_message_event_response_click.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMessageEventResponseClick { /// The URL's serial number. @@ -36,13 +33,28 @@ pub struct GetMessageEventResponseClick { #[serde(rename = "url", skip_serializing_if = "Option::is_none")] pub url: Option, /// Number of times the URL was opened. - #[serde(rename = "click", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "click", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub click: Option>, /// Number of users that opened the URL. - #[serde(rename = "uniqueClick", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueClick", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_click: Option>, /// Number of users who opened this url through any link in the message. If a message contains two links to the same URL and a user opens both links, they're counted only once. - #[serde(rename = "uniqueClickOfRequest", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueClickOfRequest", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_click_of_request: Option>, } @@ -57,5 +69,3 @@ impl GetMessageEventResponseClick { } } } - - diff --git a/openapi/src/insight/models/get_message_event_response_message.rs b/openapi/src/insight/models/get_message_event_response_message.rs index fe7094dc..c28e9321 100644 --- a/openapi/src/insight/models/get_message_event_response_message.rs +++ b/openapi/src/insight/models/get_message_event_response_message.rs @@ -20,50 +20,102 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMessageEventResponseMessage { /// Bubble's serial number. #[serde(rename = "seq", skip_serializing_if = "Option::is_none")] pub seq: Option, /// Number of times the bubble was displayed. - #[serde(rename = "impression", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "impression", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub impression: Option>, /// Number of times audio or video in the bubble started playing. - #[serde(rename = "mediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played: Option>, /// Number of times audio or video in the bubble started playing and was played 25% of the total time. - #[serde(rename = "mediaPlayed25Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed25Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played25_percent: Option>, /// Number of times audio or video in the bubble started playing and was played 50% of the total time. - #[serde(rename = "mediaPlayed50Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed50Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played50_percent: Option>, /// Number of times audio or video in the bubble started playing and was played 75% of the total time. - #[serde(rename = "mediaPlayed75Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed75Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played75_percent: Option>, /// Number of times audio or video in the bubble started playing and was played 100% of the total time. - #[serde(rename = "mediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed100Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played100_percent: Option>, /// Number of users that started playing audio or video in the bubble. - #[serde(rename = "uniqueMediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played: Option>, /// Number of users that started playing audio or video in the bubble and played 25% of the total time. - #[serde(rename = "uniqueMediaPlayed25Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed25Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played25_percent: Option>, /// Number of users that started playing audio or video in the bubble and played 50% of the total time. - #[serde(rename = "uniqueMediaPlayed50Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed50Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played50_percent: Option>, /// Number of users that started playing audio or video in the bubble and played 75% of the total time. - #[serde(rename = "uniqueMediaPlayed75Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed75Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played75_percent: Option>, /// Number of users that started playing audio or video in the bubble and played 100% of the total time. - #[serde(rename = "uniqueMediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed100Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played100_percent: Option>, } @@ -85,5 +137,3 @@ impl GetMessageEventResponseMessage { } } } - - diff --git a/openapi/src/insight/models/get_message_event_response_overview.rs b/openapi/src/insight/models/get_message_event_response_overview.rs index eff6d16e..9788c404 100644 --- a/openapi/src/insight/models/get_message_event_response_overview.rs +++ b/openapi/src/insight/models/get_message_event_response_overview.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetMessageEventResponseOverview : Summary of message statistics. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMessageEventResponseOverview { /// Request ID. @@ -36,20 +34,40 @@ pub struct GetMessageEventResponseOverview { /// UNIX timestamp for message delivery time in seconds. #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] pub timestamp: Option, - /// Number of messages delivered. This property shows values of less than 20. However, if all messages have not been sent, it will be null. + /// Number of messages delivered. This property shows values of less than 20. However, if all messages have not been sent, it will be null. #[serde(rename = "delivered", skip_serializing_if = "Option::is_none")] pub delivered: Option, /// Number of users who opened the message, meaning they displayed at least 1 bubble. - #[serde(rename = "uniqueImpression", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueImpression", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_impression: Option>, /// Number of users who opened any URL in the message. - #[serde(rename = "uniqueClick", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueClick", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_click: Option>, /// Number of users who started playing any video or audio in the message. - #[serde(rename = "uniqueMediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played: Option>, /// Number of users who played the entirety of any video or audio in the message. - #[serde(rename = "uniqueMediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed100Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played100_percent: Option>, } @@ -67,5 +85,3 @@ impl GetMessageEventResponseOverview { } } } - - diff --git a/openapi/src/insight/models/get_number_of_followers_response.rs b/openapi/src/insight/models/get_number_of_followers_response.rs index ce911827..d846f9c1 100644 --- a/openapi/src/insight/models/get_number_of_followers_response.rs +++ b/openapi/src/insight/models/get_number_of_followers_response.rs @@ -20,23 +20,21 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetNumberOfFollowersResponse : Get number of followers - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNumberOfFollowersResponse { /// Calculation status. #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, - /// The number of times, as of the specified date, that a user added this LINE Official Account as a friend for the first time. The number doesn't decrease even if a user later blocks the account or when they delete their LINE account. + /// The number of times, as of the specified date, that a user added this LINE Official Account as a friend for the first time. The number doesn't decrease even if a user later blocks the account or when they delete their LINE account. #[serde(rename = "followers", skip_serializing_if = "Option::is_none")] pub followers: Option, - /// The number of users, as of the specified date, that the LINE Official Account can reach through targeted messages based on gender, age, and/or region. This number only includes users who are active on LINE or LINE services and whose demographics have a high level of certainty. + /// The number of users, as of the specified date, that the LINE Official Account can reach through targeted messages based on gender, age, and/or region. This number only includes users who are active on LINE or LINE services and whose demographics have a high level of certainty. #[serde(rename = "targetedReaches", skip_serializing_if = "Option::is_none")] pub targeted_reaches: Option, /// The number of users blocking the account as of the specified date. The number decreases when a user unblocks the account. @@ -72,4 +70,3 @@ impl Default for StatusInsight { Self::Ready } } - diff --git a/openapi/src/insight/models/get_number_of_message_deliveries_response.rs b/openapi/src/insight/models/get_number_of_message_deliveries_response.rs index 6eb25a4f..0c0f2c35 100644 --- a/openapi/src/insight/models/get_number_of_message_deliveries_response.rs +++ b/openapi/src/insight/models/get_number_of_message_deliveries_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetNumberOfMessageDeliveriesResponse : Get number of message deliveries - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetNumberOfMessageDeliveriesResponse { /// Status of the counting process. @@ -100,4 +98,3 @@ impl Default for StatusInsight { Self::Ready } } - diff --git a/openapi/src/insight/models/get_statistics_per_unit_response.rs b/openapi/src/insight/models/get_statistics_per_unit_response.rs index 0e9fe507..6266986d 100644 --- a/openapi/src/insight/models/get_statistics_per_unit_response.rs +++ b/openapi/src/insight/models/get_statistics_per_unit_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetStatisticsPerUnitResponse : Response object for `get statistics per unit` - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetStatisticsPerUnitResponse { #[serde(rename = "overview")] @@ -42,7 +40,11 @@ pub struct GetStatisticsPerUnitResponse { impl GetStatisticsPerUnitResponse { /// Response object for `get statistics per unit` - pub fn new(overview: crate::insight::models::GetStatisticsPerUnitResponseOverview, messages: Vec, clicks: Vec) -> GetStatisticsPerUnitResponse { + pub fn new( + overview: crate::insight::models::GetStatisticsPerUnitResponseOverview, + messages: Vec, + clicks: Vec, + ) -> GetStatisticsPerUnitResponse { GetStatisticsPerUnitResponse { overview: Box::new(overview), messages, @@ -50,5 +52,3 @@ impl GetStatisticsPerUnitResponse { } } } - - diff --git a/openapi/src/insight/models/get_statistics_per_unit_response_click.rs b/openapi/src/insight/models/get_statistics_per_unit_response_click.rs index c333c002..ab0255b3 100644 --- a/openapi/src/insight/models/get_statistics_per_unit_response_click.rs +++ b/openapi/src/insight/models/get_statistics_per_unit_response_click.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetStatisticsPerUnitResponseClick { /// The URL's serial number. @@ -36,13 +33,28 @@ pub struct GetStatisticsPerUnitResponseClick { #[serde(rename = "url")] pub url: String, /// Number of times the URL in the bubble was opened. - #[serde(rename = "click", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "click", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub click: Option>, /// Number of users that opened the URL in the bubble. - #[serde(rename = "uniqueClick", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueClick", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_click: Option>, - /// Number of users who opened this url through any link in the message. If another message bubble contains the same URL and a user opens both links, it's counted only once. - #[serde(rename = "uniqueClickOfRequest", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + /// Number of users who opened this url through any link in the message. If another message bubble contains the same URL and a user opens both links, it's counted only once. + #[serde( + rename = "uniqueClickOfRequest", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_click_of_request: Option>, } @@ -57,5 +69,3 @@ impl GetStatisticsPerUnitResponseClick { } } } - - diff --git a/openapi/src/insight/models/get_statistics_per_unit_response_message.rs b/openapi/src/insight/models/get_statistics_per_unit_response_message.rs index c434fe9d..1583b9c9 100644 --- a/openapi/src/insight/models/get_statistics_per_unit_response_message.rs +++ b/openapi/src/insight/models/get_statistics_per_unit_response_message.rs @@ -20,53 +20,110 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetStatisticsPerUnitResponseMessage { /// Bubble's serial number. #[serde(rename = "seq")] pub seq: i32, /// Number of times the bubble was displayed. - #[serde(rename = "impression", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "impression", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub impression: Option>, /// Number of times audio or video in the bubble started playing. - #[serde(rename = "mediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played: Option>, /// Number of times audio or video in the bubble started playing and was played 25% of the total time. - #[serde(rename = "mediaPlayed25Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed25Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played25_percent: Option>, /// Number of times audio or video in the bubble started playing and was played 50% of the total time. - #[serde(rename = "mediaPlayed50Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed50Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played50_percent: Option>, /// Number of times audio or video in the bubble started playing and was played 75% of the total time. - #[serde(rename = "mediaPlayed75Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed75Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played75_percent: Option>, /// Number of times audio or video in the bubble started playing and was played 100% of the total time. - #[serde(rename = "mediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "mediaPlayed100Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub media_played100_percent: Option>, /// Number of users the bubble was displayed. - #[serde(rename = "uniqueImpression", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueImpression", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_impression: Option>, /// Number of users that started playing audio or video in the bubble. - #[serde(rename = "uniqueMediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played: Option>, /// Number of users that started playing audio or video in the bubble and played 25% of the total time. - #[serde(rename = "uniqueMediaPlayed25Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed25Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played25_percent: Option>, /// Number of users that started playing audio or video in the bubble and played 50% of the total time. - #[serde(rename = "uniqueMediaPlayed50Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed50Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played50_percent: Option>, /// Number of users that started playing audio or video in the bubble and played 75% of the total time. - #[serde(rename = "uniqueMediaPlayed75Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed75Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played75_percent: Option>, /// Number of users that started playing audio or video in the bubble and played 100% of the total time. - #[serde(rename = "uniqueMediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed100Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played100_percent: Option>, } @@ -89,5 +146,3 @@ impl GetStatisticsPerUnitResponseMessage { } } } - - diff --git a/openapi/src/insight/models/get_statistics_per_unit_response_overview.rs b/openapi/src/insight/models/get_statistics_per_unit_response_overview.rs index 99dac1e0..f19ab0ef 100644 --- a/openapi/src/insight/models/get_statistics_per_unit_response_overview.rs +++ b/openapi/src/insight/models/get_statistics_per_unit_response_overview.rs @@ -20,27 +20,45 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetStatisticsPerUnitResponseOverview : Statistics related to messages. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetStatisticsPerUnitResponseOverview { /// Number of users who opened the message, meaning they displayed at least 1 bubble. - #[serde(rename = "uniqueImpression", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueImpression", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_impression: Option>, /// Number of users who opened any URL in the message. - #[serde(rename = "uniqueClick", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueClick", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_click: Option>, /// Number of users who started playing any video or audio in the message. - #[serde(rename = "uniqueMediaPlayed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played: Option>, /// Number of users who played the entirety of any video or audio in the message. - #[serde(rename = "uniqueMediaPlayed100Percent", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "uniqueMediaPlayed100Percent", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub unique_media_played100_percent: Option>, } @@ -55,5 +73,3 @@ impl GetStatisticsPerUnitResponseOverview { } } } - - diff --git a/openapi/src/insight/models/subscription_period_tile.rs b/openapi/src/insight/models/subscription_period_tile.rs index ff758faf..3de3b3bd 100644 --- a/openapi/src/insight/models/subscription_period_tile.rs +++ b/openapi/src/insight/models/subscription_period_tile.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API(Insight). * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscriptionPeriodTile { /// Subscription period. Possible values: `within7days`, `within90days`, `unknown` etc. @@ -70,4 +67,3 @@ impl Default for SubscriptionPeriodInsight { Self::Within7days } } - diff --git a/openapi/src/liff/apis/configuration.rs b/openapi/src/liff/apis/configuration.rs index 6a6de8c4..5f3153b3 100644 --- a/openapi/src/liff/apis/configuration.rs +++ b/openapi/src/liff/apis/configuration.rs @@ -20,12 +20,10 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/liff/apis/liff_api.rs b/openapi/src/liff/apis/liff_api.rs index 1c0fcced..b79e9b74 100644 --- a/openapi/src/liff/apis/liff_api.rs +++ b/openapi/src/liff/apis/liff_api.rs @@ -20,27 +20,26 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::liff::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`add_liff_app`] #[derive(Clone, Debug)] pub struct AddLiffAppParams { - pub add_liff_app_request: crate::liff::models::AddLiffAppRequest + pub add_liff_app_request: crate::liff::models::AddLiffAppRequest, } /// struct for passing parameters to the method [`delete_liff_app`] #[derive(Clone, Debug)] pub struct DeleteLiffAppParams { /// ID of the LIFF app to be updated - pub liff_id: String + pub liff_id: String, } /// struct for passing parameters to the method [`update_liff_app`] @@ -48,10 +47,9 @@ pub struct DeleteLiffAppParams { pub struct UpdateLiffAppParams { /// ID of the LIFF app to be updated pub liff_id: String, - pub update_liff_app_request: crate::liff::models::UpdateLiffAppRequest + pub update_liff_app_request: crate::liff::models::UpdateLiffAppRequest, } - /// struct for typed errors of method [`add_liff_app`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -89,22 +87,25 @@ pub enum UpdateLiffAppError { UnknownValue(serde_json::Value), } - /// Adding the LIFF app to a channel -pub async fn add_liff_app(configuration: &configuration::Configuration, params: AddLiffAppParams) -> Result> { +pub async fn add_liff_app( + configuration: &configuration::Configuration, + params: AddLiffAppParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let add_liff_app_request = params.add_liff_app_request; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/liff/v1/apps", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -120,27 +121,40 @@ pub async fn add_liff_app(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// Deletes a LIFF app from a channel. -pub async fn delete_liff_app(configuration: &configuration::Configuration, params: DeleteLiffAppParams) -> Result<(), Error> { +/// Deletes a LIFF app from a channel. +pub async fn delete_liff_app( + configuration: &configuration::Configuration, + params: DeleteLiffAppParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let liff_id = params.liff_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/liff/v1/apps/{liffId}", local_var_configuration.base_path, liffId=crate::liff::apis::urlencode(liff_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/liff/v1/apps/{liffId}", + local_var_configuration.base_path, + liffId = crate::liff::apis::urlencode(liff_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -155,26 +169,34 @@ pub async fn delete_liff_app(configuration: &configuration::Configuration, param if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets information on all the LIFF apps added to the channel. -pub async fn get_all_liff_apps(configuration: &configuration::Configuration) -> Result> { +pub async fn get_all_liff_apps( + configuration: &configuration::Configuration, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/liff/v1/apps", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -189,28 +211,41 @@ pub async fn get_all_liff_apps(configuration: &configuration::Configuration) -> if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Update LIFF app settings -pub async fn update_liff_app(configuration: &configuration::Configuration, params: UpdateLiffAppParams) -> Result<(), Error> { +pub async fn update_liff_app( + configuration: &configuration::Configuration, + params: UpdateLiffAppParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let liff_id = params.liff_id; let update_liff_app_request = params.update_liff_app_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/liff/v1/apps/{liffId}", local_var_configuration.base_path, liffId=crate::liff::apis::urlencode(liff_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/liff/v1/apps/{liffId}", + local_var_configuration.base_path, + liffId = crate::liff::apis::urlencode(liff_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -226,9 +261,13 @@ pub async fn update_liff_app(configuration: &configuration::Configuration, param if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/liff/apis/mod.rs b/openapi/src/liff/apis/mod.rs index 72d986b9..d9d562a0 100644 --- a/openapi/src/liff/apis/mod.rs +++ b/openapi/src/liff/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/liff/models/add_liff_app_request.rs b/openapi/src/liff/models/add_liff_app_request.rs index 54c33d65..08d69bdf 100644 --- a/openapi/src/liff/models/add_liff_app_request.rs +++ b/openapi/src/liff/models/add_liff_app_request.rs @@ -20,24 +20,24 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AddLiffAppRequest { #[serde(rename = "view")] pub view: Box, - /// Name of the LIFF app. The LIFF app name can't include \"LINE\" or similar strings, or inappropriate strings. + /// Name of the LIFF app. The LIFF app name can't include \"LINE\" or similar strings, or inappropriate strings. #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(rename = "features", skip_serializing_if = "Option::is_none")] pub features: Option>, - /// How additional information in LIFF URLs is handled. Specify `concat`. - #[serde(rename = "permanentLinkPattern", skip_serializing_if = "Option::is_none")] + /// How additional information in LIFF URLs is handled. Specify `concat`. + #[serde( + rename = "permanentLinkPattern", + skip_serializing_if = "Option::is_none" + )] pub permanent_link_pattern: Option, #[serde(rename = "scope", skip_serializing_if = "Option::is_none")] pub scope: Option>, @@ -57,5 +57,3 @@ impl AddLiffAppRequest { } } } - - diff --git a/openapi/src/liff/models/add_liff_app_response.rs b/openapi/src/liff/models/add_liff_app_response.rs index 9dbab347..c39057dd 100644 --- a/openapi/src/liff/models/add_liff_app_response.rs +++ b/openapi/src/liff/models/add_liff_app_response.rs @@ -20,13 +20,10 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AddLiffAppResponse { #[serde(rename = "liffId")] @@ -35,10 +32,6 @@ pub struct AddLiffAppResponse { impl AddLiffAppResponse { pub fn new(liff_id: String) -> AddLiffAppResponse { - AddLiffAppResponse { - liff_id, - } + AddLiffAppResponse { liff_id } } } - - diff --git a/openapi/src/liff/models/get_all_liff_apps_response.rs b/openapi/src/liff/models/get_all_liff_apps_response.rs index 331e1fe2..0b1dac2b 100644 --- a/openapi/src/liff/models/get_all_liff_apps_response.rs +++ b/openapi/src/liff/models/get_all_liff_apps_response.rs @@ -20,13 +20,10 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAllLiffAppsResponse { #[serde(rename = "apps", skip_serializing_if = "Option::is_none")] @@ -35,10 +32,6 @@ pub struct GetAllLiffAppsResponse { impl GetAllLiffAppsResponse { pub fn new() -> GetAllLiffAppsResponse { - GetAllLiffAppsResponse { - apps: None, - } + GetAllLiffAppsResponse { apps: None } } } - - diff --git a/openapi/src/liff/models/liff_app.rs b/openapi/src/liff/models/liff_app.rs index 801f72bc..2fc3255a 100644 --- a/openapi/src/liff/models/liff_app.rs +++ b/openapi/src/liff/models/liff_app.rs @@ -20,13 +20,10 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LiffApp { /// LIFF app ID @@ -39,8 +36,11 @@ pub struct LiffApp { pub description: Option, #[serde(rename = "features", skip_serializing_if = "Option::is_none")] pub features: Option>, - /// How additional information in LIFF URLs is handled. concat is returned. - #[serde(rename = "permanentLinkPattern", skip_serializing_if = "Option::is_none")] + /// How additional information in LIFF URLs is handled. concat is returned. + #[serde( + rename = "permanentLinkPattern", + skip_serializing_if = "Option::is_none" + )] pub permanent_link_pattern: Option, #[serde(rename = "scope", skip_serializing_if = "Option::is_none")] pub scope: Option>, @@ -61,5 +61,3 @@ impl LiffApp { } } } - - diff --git a/openapi/src/liff/models/liff_bot_prompt.rs b/openapi/src/liff/models/liff_bot_prompt.rs index 12bbfb67..318d2e42 100644 --- a/openapi/src/liff/models/liff_bot_prompt.rs +++ b/openapi/src/liff/models/liff_bot_prompt.rs @@ -20,13 +20,13 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ -/// LiffBotPrompt : Specify the setting for bot link feature with one of the following values: `normal`: Display the option to add the LINE Official Account as a friend in the channel consent screen. `aggressive`: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen. `none`: Don't display the option to add the LINE Official Account as a friend. The default value is none. +/// LiffBotPrompt : Specify the setting for bot link feature with one of the following values: `normal`: Display the option to add the LINE Official Account as a friend in the channel consent screen. `aggressive`: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen. `none`: Don't display the option to add the LINE Official Account as a friend. The default value is none. -/// Specify the setting for bot link feature with one of the following values: `normal`: Display the option to add the LINE Official Account as a friend in the channel consent screen. `aggressive`: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen. `none`: Don't display the option to add the LINE Official Account as a friend. The default value is none. +/// Specify the setting for bot link feature with one of the following values: `normal`: Display the option to add the LINE Official Account as a friend in the channel consent screen. `aggressive`: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen. `none`: Don't display the option to add the LINE Official Account as a friend. The default value is none. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum LiffBotPrompt { #[serde(rename = "normal")] @@ -35,7 +35,6 @@ pub enum LiffBotPrompt { Aggressive, #[serde(rename = "none")] None, - } impl ToString for LiffBotPrompt { @@ -53,7 +52,3 @@ impl Default for LiffBotPrompt { Self::Normal } } - - - - diff --git a/openapi/src/liff/models/liff_features.rs b/openapi/src/liff/models/liff_features.rs index 7594511f..fd51ffe8 100644 --- a/openapi/src/liff/models/liff_features.rs +++ b/openapi/src/liff/models/liff_features.rs @@ -20,19 +20,16 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LiffFeatures { - /// `true` if the LIFF app supports Bluetooth® Low Energy for LINE Things. `false` otherwise. + /// `true` if the LIFF app supports Bluetooth® Low Energy for LINE Things. `false` otherwise. #[serde(rename = "ble", skip_serializing_if = "Option::is_none")] pub ble: Option, - /// `true` to use the 2D code reader in the LIFF app. false otherwise. The default value is `false`. + /// `true` to use the 2D code reader in the LIFF app. false otherwise. The default value is `false`. #[serde(rename = "qrCode", skip_serializing_if = "Option::is_none")] pub qr_code: Option, } @@ -45,5 +42,3 @@ impl LiffFeatures { } } } - - diff --git a/openapi/src/liff/models/liff_scope.rs b/openapi/src/liff/models/liff_scope.rs index 3cf4896f..d23220a7 100644 --- a/openapi/src/liff/models/liff_scope.rs +++ b/openapi/src/liff/models/liff_scope.rs @@ -20,7 +20,7 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -37,7 +37,6 @@ pub enum LiffScope { Profile, #[serde(rename = "chat_message.write")] ChatMessagePeriodWrite, - } impl ToString for LiffScope { @@ -56,7 +55,3 @@ impl Default for LiffScope { Self::Openid } } - - - - diff --git a/openapi/src/liff/models/liff_view.rs b/openapi/src/liff/models/liff_view.rs index 037ec77c..cd61c93d 100644 --- a/openapi/src/liff/models/liff_view.rs +++ b/openapi/src/liff/models/liff_view.rs @@ -20,22 +20,19 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LiffView { - /// Size of the LIFF app view. Specify one of these values: - compact - tall - full + /// Size of the LIFF app view. Specify one of these values: - compact - tall - full #[serde(rename = "type")] pub r#type: TypeLiff, - /// Endpoint URL. This is the URL of the web app that implements the LIFF app (e.g. https://example.com). Used when the LIFF app is launched using the LIFF URL. The URL scheme must be https. URL fragments (#URL-fragment) can't be specified. + /// Endpoint URL. This is the URL of the web app that implements the LIFF app (e.g. https://example.com). Used when the LIFF app is launched using the LIFF URL. The URL scheme must be https. URL fragments (#URL-fragment) can't be specified. #[serde(rename = "url")] pub url: String, - /// `true` to use the LIFF app in modular mode. When in modular mode, the action button in the header is not displayed. + /// `true` to use the LIFF app in modular mode. When in modular mode, the action button in the header is not displayed. #[serde(rename = "moduleMode", skip_serializing_if = "Option::is_none")] pub module_mode: Option, } @@ -50,7 +47,7 @@ impl LiffView { } } -/// Size of the LIFF app view. Specify one of these values: - compact - tall - full +/// Size of the LIFF app view. Specify one of these values: - compact - tall - full #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum TypeLiff { #[serde(rename = "compact")] @@ -66,4 +63,3 @@ impl Default for TypeLiff { Self::Compact } } - diff --git a/openapi/src/liff/models/update_liff_app_request.rs b/openapi/src/liff/models/update_liff_app_request.rs index b0abd838..211716e0 100644 --- a/openapi/src/liff/models/update_liff_app_request.rs +++ b/openapi/src/liff/models/update_liff_app_request.rs @@ -20,24 +20,24 @@ * LIFF Server API. * * The version of the OpenAPI document: 1.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateLiffAppRequest { #[serde(rename = "view", skip_serializing_if = "Option::is_none")] pub view: Option>, - /// Name of the LIFF app. The LIFF app name can't include \"LINE\" or similar strings, or inappropriate strings. + /// Name of the LIFF app. The LIFF app name can't include \"LINE\" or similar strings, or inappropriate strings. #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(rename = "features", skip_serializing_if = "Option::is_none")] pub features: Option>, - /// How additional information in LIFF URLs is handled. Specify `concat`. - #[serde(rename = "permanentLinkPattern", skip_serializing_if = "Option::is_none")] + /// How additional information in LIFF URLs is handled. Specify `concat`. + #[serde( + rename = "permanentLinkPattern", + skip_serializing_if = "Option::is_none" + )] pub permanent_link_pattern: Option, #[serde(rename = "scope", skip_serializing_if = "Option::is_none")] pub scope: Option>, @@ -57,5 +57,3 @@ impl UpdateLiffAppRequest { } } } - - diff --git a/openapi/src/manage_audience/apis/configuration.rs b/openapi/src/manage_audience/apis/configuration.rs index 50e891c5..b598932e 100644 --- a/openapi/src/manage_audience/apis/configuration.rs +++ b/openapi/src/manage_audience/apis/configuration.rs @@ -20,12 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/manage_audience/apis/manage_audience_api.rs b/openapi/src/manage_audience/apis/manage_audience_api.rs index 2af101f0..42db8624 100644 --- a/openapi/src/manage_audience/apis/manage_audience_api.rs +++ b/openapi/src/manage_audience/apis/manage_audience_api.rs @@ -20,59 +20,61 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::manage_audience::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`activate_audience_group`] #[derive(Clone, Debug)] pub struct ActivateAudienceGroupParams { /// The audience ID. - pub audience_group_id: i64 + pub audience_group_id: i64, } /// struct for passing parameters to the method [`add_audience_to_audience_group`] #[derive(Clone, Debug)] pub struct AddAudienceToAudienceGroupParams { - pub add_audience_to_audience_group_request: crate::manage_audience::models::AddAudienceToAudienceGroupRequest + pub add_audience_to_audience_group_request: + crate::manage_audience::models::AddAudienceToAudienceGroupRequest, } /// struct for passing parameters to the method [`create_audience_group`] #[derive(Clone, Debug)] pub struct CreateAudienceGroupParams { - pub create_audience_group_request: crate::manage_audience::models::CreateAudienceGroupRequest + pub create_audience_group_request: crate::manage_audience::models::CreateAudienceGroupRequest, } /// struct for passing parameters to the method [`create_click_based_audience_group`] #[derive(Clone, Debug)] pub struct CreateClickBasedAudienceGroupParams { - pub create_click_based_audience_group_request: crate::manage_audience::models::CreateClickBasedAudienceGroupRequest + pub create_click_based_audience_group_request: + crate::manage_audience::models::CreateClickBasedAudienceGroupRequest, } /// struct for passing parameters to the method [`create_imp_based_audience_group`] #[derive(Clone, Debug)] pub struct CreateImpBasedAudienceGroupParams { - pub create_imp_based_audience_group_request: crate::manage_audience::models::CreateImpBasedAudienceGroupRequest + pub create_imp_based_audience_group_request: + crate::manage_audience::models::CreateImpBasedAudienceGroupRequest, } /// struct for passing parameters to the method [`delete_audience_group`] #[derive(Clone, Debug)] pub struct DeleteAudienceGroupParams { /// The audience ID. - pub audience_group_id: i64 + pub audience_group_id: i64, } /// struct for passing parameters to the method [`get_audience_data`] #[derive(Clone, Debug)] pub struct GetAudienceDataParams { /// The audience ID. - pub audience_group_id: i64 + pub audience_group_id: i64, } /// struct for passing parameters to the method [`get_audience_groups`] @@ -80,22 +82,23 @@ pub struct GetAudienceDataParams { pub struct GetAudienceGroupsParams { /// The page to return when getting (paginated) results. Must be 1 or higher. pub page: i64, - /// The name of the audience(s) to return. You can search for partial matches. This is case-insensitive, meaning AUDIENCE and audience are considered identical. If omitted, the name of the audience(s) will not be used as a search criterion. + /// The name of the audience(s) to return. You can search for partial matches. This is case-insensitive, meaning AUDIENCE and audience are considered identical. If omitted, the name of the audience(s) will not be used as a search criterion. pub description: Option, - /// The status of the audience(s) to return. If omitted, the status of the audience(s) will not be used as a search criterion. + /// The status of the audience(s) to return. If omitted, the status of the audience(s) will not be used as a search criterion. pub status: Option, - /// The number of audiences per page. Default: 20 Max: 40 + /// The number of audiences per page. Default: 20 Max: 40 pub size: Option, - /// true (default): Get public audiences created in all channels linked to the same bot. false: Get audiences created in the same channel. + /// true (default): Get public audiences created in all channels linked to the same bot. false: Get audiences created in the same channel. pub includes_external_public_groups: Option, - /// How the audience was created. If omitted, all audiences are included. `OA_MANAGER`: Return only audiences created with LINE Official Account Manager (opens new window). `MESSAGING_API`: Return only audiences created with Messaging API. - pub create_route: Option + /// How the audience was created. If omitted, all audiences are included. `OA_MANAGER`: Return only audiences created with LINE Official Account Manager (opens new window). `MESSAGING_API`: Return only audiences created with Messaging API. + pub create_route: Option, } /// struct for passing parameters to the method [`update_audience_group_authority_level`] #[derive(Clone, Debug)] pub struct UpdateAudienceGroupAuthorityLevelParams { - pub update_audience_group_authority_level_request: crate::manage_audience::models::UpdateAudienceGroupAuthorityLevelRequest + pub update_audience_group_authority_level_request: + crate::manage_audience::models::UpdateAudienceGroupAuthorityLevelRequest, } /// struct for passing parameters to the method [`update_audience_group_description`] @@ -103,10 +106,10 @@ pub struct UpdateAudienceGroupAuthorityLevelParams { pub struct UpdateAudienceGroupDescriptionParams { /// The audience ID. pub audience_group_id: i64, - pub update_audience_group_description_request: crate::manage_audience::models::UpdateAudienceGroupDescriptionRequest + pub update_audience_group_description_request: + crate::manage_audience::models::UpdateAudienceGroupDescriptionRequest, } - /// struct for typed errors of method [`activate_audience_group`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -185,22 +188,29 @@ pub enum UpdateAudienceGroupDescriptionError { UnknownValue(serde_json::Value), } - /// Activate audience -pub async fn activate_audience_group(configuration: &configuration::Configuration, params: ActivateAudienceGroupParams) -> Result<(), Error> { +pub async fn activate_audience_group( + configuration: &configuration::Configuration, + params: ActivateAudienceGroupParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let audience_group_id = params.audience_group_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/{audienceGroupId}/activate", local_var_configuration.base_path, audienceGroupId=audience_group_id); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/{audienceGroupId}/activate", + local_var_configuration.base_path, + audienceGroupId = audience_group_id + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -215,27 +225,39 @@ pub async fn activate_audience_group(configuration: &configuration::Configuratio if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by JSON) -pub async fn add_audience_to_audience_group(configuration: &configuration::Configuration, params: AddAudienceToAudienceGroupParams) -> Result<(), Error> { +pub async fn add_audience_to_audience_group( + configuration: &configuration::Configuration, + params: AddAudienceToAudienceGroupParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let add_audience_to_audience_group_request = params.add_audience_to_audience_group_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/upload", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/upload", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -251,27 +273,42 @@ pub async fn add_audience_to_audience_group(configuration: &configuration::Confi if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Create audience for uploading user IDs (by JSON) -pub async fn create_audience_group(configuration: &configuration::Configuration, params: CreateAudienceGroupParams) -> Result> { +pub async fn create_audience_group( + configuration: &configuration::Configuration, + params: CreateAudienceGroupParams, +) -> Result< + crate::manage_audience::models::CreateAudienceGroupResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let create_audience_group_request = params.create_audience_group_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/upload", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/upload", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -287,27 +324,43 @@ pub async fn create_audience_group(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Create audience for click-based retargeting -pub async fn create_click_based_audience_group(configuration: &configuration::Configuration, params: CreateClickBasedAudienceGroupParams) -> Result> { +pub async fn create_click_based_audience_group( + configuration: &configuration::Configuration, + params: CreateClickBasedAudienceGroupParams, +) -> Result< + crate::manage_audience::models::CreateClickBasedAudienceGroupResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters - let create_click_based_audience_group_request = params.create_click_based_audience_group_request; - + let create_click_based_audience_group_request = + params.create_click_based_audience_group_request; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/click", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/click", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -323,27 +376,42 @@ pub async fn create_click_based_audience_group(configuration: &configuration::Co if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Create audience for impression-based retargeting -pub async fn create_imp_based_audience_group(configuration: &configuration::Configuration, params: CreateImpBasedAudienceGroupParams) -> Result> { +pub async fn create_imp_based_audience_group( + configuration: &configuration::Configuration, + params: CreateImpBasedAudienceGroupParams, +) -> Result< + crate::manage_audience::models::CreateImpBasedAudienceGroupResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let create_imp_based_audience_group_request = params.create_imp_based_audience_group_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/imp", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/imp", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -359,27 +427,40 @@ pub async fn create_imp_based_audience_group(configuration: &configuration::Conf if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Delete audience -pub async fn delete_audience_group(configuration: &configuration::Configuration, params: DeleteAudienceGroupParams) -> Result<(), Error> { +pub async fn delete_audience_group( + configuration: &configuration::Configuration, + params: DeleteAudienceGroupParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let audience_group_id = params.audience_group_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/{audienceGroupId}", local_var_configuration.base_path, audienceGroupId=audience_group_id); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/{audienceGroupId}", + local_var_configuration.base_path, + audienceGroupId = audience_group_id + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -394,27 +475,40 @@ pub async fn delete_audience_group(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets audience data. -pub async fn get_audience_data(configuration: &configuration::Configuration, params: GetAudienceDataParams) -> Result> { +pub async fn get_audience_data( + configuration: &configuration::Configuration, + params: GetAudienceDataParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let audience_group_id = params.audience_group_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/{audienceGroupId}", local_var_configuration.base_path, audienceGroupId=audience_group_id); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/{audienceGroupId}", + local_var_configuration.base_path, + audienceGroupId = audience_group_id + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -429,26 +523,40 @@ pub async fn get_audience_data(configuration: &configuration::Configuration, par if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get the authority level of the audience -pub async fn get_audience_group_authority_level(configuration: &configuration::Configuration) -> Result> { +pub async fn get_audience_group_authority_level( + configuration: &configuration::Configuration, +) -> Result< + crate::manage_audience::models::GetAudienceGroupAuthorityLevelResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/authorityLevel", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/authorityLevel", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -463,14 +571,23 @@ pub async fn get_audience_group_authority_level(configuration: &configuration::C if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets data for more than one audience. -pub async fn get_audience_groups(configuration: &configuration::Configuration, params: GetAudienceGroupsParams) -> Result> { +pub async fn get_audience_groups( + configuration: &configuration::Configuration, + params: GetAudienceGroupsParams, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters @@ -481,30 +598,39 @@ pub async fn get_audience_groups(configuration: &configuration::Configuration, p let includes_external_public_groups = params.includes_external_public_groups; let create_route = params.create_route; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/list", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("page", &page.to_string())]); if let Some(ref local_var_str) = description { - local_var_req_builder = local_var_req_builder.query(&[("description", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("description", &local_var_str.to_string())]); } if let Some(ref local_var_str) = status { - local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("status", &local_var_str.to_string())]); } if let Some(ref local_var_str) = size { - local_var_req_builder = local_var_req_builder.query(&[("size", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("size", &local_var_str.to_string())]); } if let Some(ref local_var_str) = includes_external_public_groups { - local_var_req_builder = local_var_req_builder.query(&[("includesExternalPublicGroups", &local_var_str.to_string())]); + local_var_req_builder = local_var_req_builder + .query(&[("includesExternalPublicGroups", &local_var_str.to_string())]); } if let Some(ref local_var_str) = create_route { - local_var_req_builder = local_var_req_builder.query(&[("createRoute", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("createRoute", &local_var_str.to_string())]); } if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -519,32 +645,46 @@ pub async fn get_audience_groups(configuration: &configuration::Configuration, p if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Change the authority level of the audience -pub async fn update_audience_group_authority_level(configuration: &configuration::Configuration, params: UpdateAudienceGroupAuthorityLevelParams) -> Result<(), Error> { +pub async fn update_audience_group_authority_level( + configuration: &configuration::Configuration, + params: UpdateAudienceGroupAuthorityLevelParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters - let update_audience_group_authority_level_request = params.update_audience_group_authority_level_request; - + let update_audience_group_authority_level_request = + params.update_audience_group_authority_level_request; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/authorityLevel", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/authorityLevel", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); }; - local_var_req_builder = local_var_req_builder.json(&update_audience_group_authority_level_request); + local_var_req_builder = + local_var_req_builder.json(&update_audience_group_authority_level_request); let local_var_req = local_var_req_builder.build()?; let local_var_resp = local_var_client.execute(local_var_req).await?; @@ -555,28 +695,42 @@ pub async fn update_audience_group_authority_level(configuration: &configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Renames an existing audience. -pub async fn update_audience_group_description(configuration: &configuration::Configuration, params: UpdateAudienceGroupDescriptionParams) -> Result<(), Error> { +pub async fn update_audience_group_description( + configuration: &configuration::Configuration, + params: UpdateAudienceGroupDescriptionParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let audience_group_id = params.audience_group_id; - let update_audience_group_description_request = params.update_audience_group_description_request; - + let update_audience_group_description_request = + params.update_audience_group_description_request; let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/{audienceGroupId}/updateDescription", local_var_configuration.base_path, audienceGroupId=audience_group_id); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/{audienceGroupId}/updateDescription", + local_var_configuration.base_path, + audienceGroupId = audience_group_id + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -592,9 +746,13 @@ pub async fn update_audience_group_description(configuration: &configuration::Co if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/manage_audience/apis/manage_audience_blob_api.rs b/openapi/src/manage_audience/apis/manage_audience_blob_api.rs index 925ab312..d19e0e81 100644 --- a/openapi/src/manage_audience/apis/manage_audience_blob_api.rs +++ b/openapi/src/manage_audience/apis/manage_audience_blob_api.rs @@ -20,41 +20,39 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::manage_audience::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`add_user_ids_to_audience`] #[derive(Clone, Debug)] pub struct AddUserIdsToAudienceParams { - /// A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000 + /// A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000 pub file: std::path::PathBuf, /// The audience ID. pub audience_group_id: Option, /// The description to register with the job - pub upload_description: Option + pub upload_description: Option, } /// struct for passing parameters to the method [`create_audience_for_uploading_user_ids`] #[derive(Clone, Debug)] pub struct CreateAudienceForUploadingUserIdsParams { - /// A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000 + /// A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000 pub file: std::path::PathBuf, - /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 + /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 pub description: Option, - /// To specify recipients by IFAs: set `true`. To specify recipients by user IDs: set `false` or omit isIfaAudience property. + /// To specify recipients by IFAs: set `true`. To specify recipients by user IDs: set `false` or omit isIfaAudience property. pub is_ifa_audience: Option, - /// The description to register for the job (in `jobs[].description`). - pub upload_description: Option + /// The description to register for the job (in `jobs[].description`). + pub upload_description: Option, } - /// struct for typed errors of method [`add_user_ids_to_audience`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -69,9 +67,11 @@ pub enum CreateAudienceForUploadingUserIdsError { UnknownValue(serde_json::Value), } - /// Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by file). -pub async fn add_user_ids_to_audience(configuration: &configuration::Configuration, params: AddUserIdsToAudienceParams) -> Result<(), Error> { +pub async fn add_user_ids_to_audience( + configuration: &configuration::Configuration, + params: AddUserIdsToAudienceParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters @@ -79,14 +79,18 @@ pub async fn add_user_ids_to_audience(configuration: &configuration::Configurati let audience_group_id = params.audience_group_id; let upload_description = params.upload_description; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/upload/byFile", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/upload/byFile", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -96,7 +100,8 @@ pub async fn add_user_ids_to_audience(configuration: &configuration::Configurati local_var_form = local_var_form.text("audienceGroupId", local_var_param_value.to_string()); } if let Some(local_var_param_value) = upload_description { - local_var_form = local_var_form.text("uploadDescription", local_var_param_value.to_string()); + local_var_form = + local_var_form.text("uploadDescription", local_var_param_value.to_string()); } // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); @@ -110,14 +115,25 @@ pub async fn add_user_ids_to_audience(configuration: &configuration::Configurati if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Create audience for uploading user IDs (by file). -pub async fn create_audience_for_uploading_user_ids(configuration: &configuration::Configuration, params: CreateAudienceForUploadingUserIdsParams) -> Result> { +pub async fn create_audience_for_uploading_user_ids( + configuration: &configuration::Configuration, + params: CreateAudienceForUploadingUserIdsParams, +) -> Result< + crate::manage_audience::models::CreateAudienceGroupResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters @@ -126,14 +142,18 @@ pub async fn create_audience_for_uploading_user_ids(configuration: &configuratio let is_ifa_audience = params.is_ifa_audience; let upload_description = params.upload_description; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/audienceGroup/upload/byFile", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/audienceGroup/upload/byFile", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -146,7 +166,8 @@ pub async fn create_audience_for_uploading_user_ids(configuration: &configuratio local_var_form = local_var_form.text("isIfaAudience", local_var_param_value.to_string()); } if let Some(local_var_param_value) = upload_description { - local_var_form = local_var_form.text("uploadDescription", local_var_param_value.to_string()); + local_var_form = + local_var_form.text("uploadDescription", local_var_param_value.to_string()); } // TODO: support file upload for 'file' parameter local_var_req_builder = local_var_req_builder.multipart(local_var_form); @@ -160,9 +181,13 @@ pub async fn create_audience_for_uploading_user_ids(configuration: &configuratio if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/manage_audience/apis/mod.rs b/openapi/src/manage_audience/apis/mod.rs index 4c5beb72..f1a82f97 100644 --- a/openapi/src/manage_audience/apis/mod.rs +++ b/openapi/src/manage_audience/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/manage_audience/models/add_audience_to_audience_group_request.rs b/openapi/src/manage_audience/models/add_audience_to_audience_group_request.rs index 8c080583..208a013a 100644 --- a/openapi/src/manage_audience/models/add_audience_to_audience_group_request.rs +++ b/openapi/src/manage_audience/models/add_audience_to_audience_group_request.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// AddAudienceToAudienceGroupRequest : Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by JSON) - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AddAudienceToAudienceGroupRequest { /// The audience ID. @@ -51,5 +49,3 @@ impl AddAudienceToAudienceGroupRequest { } } } - - diff --git a/openapi/src/manage_audience/models/audience.rs b/openapi/src/manage_audience/models/audience.rs index a92d36e0..3eb16d59 100644 --- a/openapi/src/manage_audience/models/audience.rs +++ b/openapi/src/manage_audience/models/audience.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// Audience : Audience - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Audience { /// A user ID or IFA. You can specify an empty array. @@ -38,10 +36,6 @@ pub struct Audience { impl Audience { /// Audience pub fn new() -> Audience { - Audience { - id: None, - } + Audience { id: None } } } - - diff --git a/openapi/src/manage_audience/models/audience_group.rs b/openapi/src/manage_audience/models/audience_group.rs index 5219c5a9..bee86255 100644 --- a/openapi/src/manage_audience/models/audience_group.rs +++ b/openapi/src/manage_audience/models/audience_group.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// AudienceGroup : Audience group - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AudienceGroup { /// The audience ID. @@ -40,7 +38,12 @@ pub struct AudienceGroup { pub description: Option, #[serde(rename = "status", skip_serializing_if = "Option::is_none")] pub status: Option, - #[serde(rename = "failedType", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "failedType", + default, + with = "::serde_with::rust::double_option", + skip_serializing_if = "Option::is_none" + )] pub failed_type: Option>, /// The number of users included in the audience. #[serde(rename = "audienceCount", skip_serializing_if = "Option::is_none")] @@ -48,13 +51,13 @@ pub struct AudienceGroup { /// When the audience was created (in UNIX time). #[serde(rename = "created", skip_serializing_if = "Option::is_none")] pub created: Option, - /// The request ID that was specified when the audience was created. This is only included when `audienceGroup.type` is CLICK or IMP. + /// The request ID that was specified when the audience was created. This is only included when `audienceGroup.type` is CLICK or IMP. #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")] pub request_id: Option, - /// The URL that was specified when the audience was created. This is only included when `audienceGroup.type` is CLICK and link URL is specified. + /// The URL that was specified when the audience was created. This is only included when `audienceGroup.type` is CLICK and link URL is specified. #[serde(rename = "clickUrl", skip_serializing_if = "Option::is_none")] pub click_url: Option, - /// The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs. + /// The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs. #[serde(rename = "isIfaAudience", skip_serializing_if = "Option::is_none")] pub is_ifa_audience: Option, #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] @@ -82,5 +85,3 @@ impl AudienceGroup { } } } - - diff --git a/openapi/src/manage_audience/models/audience_group_authority_level.rs b/openapi/src/manage_audience/models/audience_group_authority_level.rs index 2c4541cc..c07e8169 100644 --- a/openapi/src/manage_audience/models/audience_group_authority_level.rs +++ b/openapi/src/manage_audience/models/audience_group_authority_level.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -33,7 +33,6 @@ pub enum AudienceGroupAuthorityLevel { Public, #[serde(rename = "PRIVATE")] Private, - } impl ToString for AudienceGroupAuthorityLevel { @@ -50,7 +49,3 @@ impl Default for AudienceGroupAuthorityLevel { Self::Public } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_create_route.rs b/openapi/src/manage_audience/models/audience_group_create_route.rs index 136f52ba..e105d1b6 100644 --- a/openapi/src/manage_audience/models/audience_group_create_route.rs +++ b/openapi/src/manage_audience/models/audience_group_create_route.rs @@ -20,13 +20,13 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// AudienceGroupCreateRoute : How the audience was created. One of: - `OA_MANAGER`: Audience created with [LINE Official Account Manager](https://manager.line.biz/). - `MESSAGING_API`: Audience created with Messaging API. - `POINT_AD`: Audience created with [LINE Points Ads](https://www.linebiz.com/jp/service/line-point-ad/) (Japanese only). - `AD_MANAGER`: Audience created with [LINE Ads](https://admanager.line.biz/). +/// AudienceGroupCreateRoute : How the audience was created. One of: - `OA_MANAGER`: Audience created with [LINE Official Account Manager](https://manager.line.biz/). - `MESSAGING_API`: Audience created with Messaging API. - `POINT_AD`: Audience created with [LINE Points Ads](https://www.linebiz.com/jp/service/line-point-ad/) (Japanese only). - `AD_MANAGER`: Audience created with [LINE Ads](https://admanager.line.biz/). -/// How the audience was created. One of: - `OA_MANAGER`: Audience created with [LINE Official Account Manager](https://manager.line.biz/). - `MESSAGING_API`: Audience created with Messaging API. - `POINT_AD`: Audience created with [LINE Points Ads](https://www.linebiz.com/jp/service/line-point-ad/) (Japanese only). - `AD_MANAGER`: Audience created with [LINE Ads](https://admanager.line.biz/). +/// How the audience was created. One of: - `OA_MANAGER`: Audience created with [LINE Official Account Manager](https://manager.line.biz/). - `MESSAGING_API`: Audience created with Messaging API. - `POINT_AD`: Audience created with [LINE Points Ads](https://www.linebiz.com/jp/service/line-point-ad/) (Japanese only). - `AD_MANAGER`: Audience created with [LINE Ads](https://admanager.line.biz/). #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AudienceGroupCreateRoute { #[serde(rename = "OA_MANAGER")] @@ -37,7 +37,6 @@ pub enum AudienceGroupCreateRoute { PointAd, #[serde(rename = "AD_MANAGER")] AdManager, - } impl ToString for AudienceGroupCreateRoute { @@ -56,7 +55,3 @@ impl Default for AudienceGroupCreateRoute { Self::OaManager } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_failed_type.rs b/openapi/src/manage_audience/models/audience_group_failed_type.rs index 7f038655..3e6bd0e2 100644 --- a/openapi/src/manage_audience/models/audience_group_failed_type.rs +++ b/openapi/src/manage_audience/models/audience_group_failed_type.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -35,13 +35,14 @@ pub enum AudienceGroupFailedType { InternalError, #[serde(rename = "null")] Null, - } impl ToString for AudienceGroupFailedType { fn to_string(&self) -> String { match self { - Self::AudienceGroupAudienceInsufficient => String::from("AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT"), + Self::AudienceGroupAudienceInsufficient => { + String::from("AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT") + } Self::InternalError => String::from("INTERNAL_ERROR"), Self::Null => String::from("null"), } @@ -53,7 +54,3 @@ impl Default for AudienceGroupFailedType { Self::AudienceGroupAudienceInsufficient } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_job.rs b/openapi/src/manage_audience/models/audience_group_job.rs index 67d59da4..91b6995f 100644 --- a/openapi/src/manage_audience/models/audience_group_job.rs +++ b/openapi/src/manage_audience/models/audience_group_job.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// AudienceGroupJob : Audience group job - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AudienceGroupJob { /// A job ID. @@ -68,5 +66,3 @@ impl AudienceGroupJob { } } } - - diff --git a/openapi/src/manage_audience/models/audience_group_job_failed_type.rs b/openapi/src/manage_audience/models/audience_group_job_failed_type.rs index 123a94d8..ca8acf54 100644 --- a/openapi/src/manage_audience/models/audience_group_job_failed_type.rs +++ b/openapi/src/manage_audience/models/audience_group_job_failed_type.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -33,14 +33,15 @@ pub enum AudienceGroupJobFailedType { InternalError, #[serde(rename = "AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT")] AudienceGroupAudienceInsufficient, - } impl ToString for AudienceGroupJobFailedType { fn to_string(&self) -> String { match self { Self::InternalError => String::from("INTERNAL_ERROR"), - Self::AudienceGroupAudienceInsufficient => String::from("AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT"), + Self::AudienceGroupAudienceInsufficient => { + String::from("AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT") + } } } } @@ -50,7 +51,3 @@ impl Default for AudienceGroupJobFailedType { Self::InternalError } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_job_status.rs b/openapi/src/manage_audience/models/audience_group_job_status.rs index e5120fd7..3abdfc92 100644 --- a/openapi/src/manage_audience/models/audience_group_job_status.rs +++ b/openapi/src/manage_audience/models/audience_group_job_status.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -37,7 +37,6 @@ pub enum AudienceGroupJobStatus { Finished, #[serde(rename = "FAILED")] Failed, - } impl ToString for AudienceGroupJobStatus { @@ -56,7 +55,3 @@ impl Default for AudienceGroupJobStatus { Self::Queued } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_job_type.rs b/openapi/src/manage_audience/models/audience_group_job_type.rs index 5e85736b..666f8c7b 100644 --- a/openapi/src/manage_audience/models/audience_group_job_type.rs +++ b/openapi/src/manage_audience/models/audience_group_job_type.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -31,7 +31,6 @@ pub enum AudienceGroupJobType { #[serde(rename = "DIFF_ADD")] DiffAdd, - } impl ToString for AudienceGroupJobType { @@ -47,7 +46,3 @@ impl Default for AudienceGroupJobType { Self::DiffAdd } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_permission.rs b/openapi/src/manage_audience/models/audience_group_permission.rs index d50db9a7..56eb02dc 100644 --- a/openapi/src/manage_audience/models/audience_group_permission.rs +++ b/openapi/src/manage_audience/models/audience_group_permission.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -33,7 +33,6 @@ pub enum AudienceGroupPermission { Read, #[serde(rename = "READ_WRITE")] ReadWrite, - } impl ToString for AudienceGroupPermission { @@ -50,7 +49,3 @@ impl Default for AudienceGroupPermission { Self::Read } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_status.rs b/openapi/src/manage_audience/models/audience_group_status.rs index 215d5c75..8cf1ec85 100644 --- a/openapi/src/manage_audience/models/audience_group_status.rs +++ b/openapi/src/manage_audience/models/audience_group_status.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -41,7 +41,6 @@ pub enum AudienceGroupStatus { Inactive, #[serde(rename = "ACTIVATING")] Activating, - } impl ToString for AudienceGroupStatus { @@ -62,7 +61,3 @@ impl Default for AudienceGroupStatus { Self::InProgress } } - - - - diff --git a/openapi/src/manage_audience/models/audience_group_type.rs b/openapi/src/manage_audience/models/audience_group_type.rs index 53b70df4..49d3fe17 100644 --- a/openapi/src/manage_audience/models/audience_group_type.rs +++ b/openapi/src/manage_audience/models/audience_group_type.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -53,7 +53,6 @@ pub enum AudienceGroupType { RichmenuImp, #[serde(rename = "RICHMENU_CLICK")] RichmenuClick, - } impl ToString for AudienceGroupType { @@ -80,7 +79,3 @@ impl Default for AudienceGroupType { Self::Upload } } - - - - diff --git a/openapi/src/manage_audience/models/create_audience_group_request.rs b/openapi/src/manage_audience/models/create_audience_group_request.rs index e6b1bfc3..93101e00 100644 --- a/openapi/src/manage_audience/models/create_audience_group_request.rs +++ b/openapi/src/manage_audience/models/create_audience_group_request.rs @@ -20,26 +20,24 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CreateAudienceGroupRequest : Create audience for uploading user IDs (by JSON) - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateAudienceGroupRequest { - /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 + /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, - /// To specify recipients by IFAs: set true. To specify recipients by user IDs: set false or omit isIfaAudience property. + /// To specify recipients by IFAs: set true. To specify recipients by user IDs: set false or omit isIfaAudience property. #[serde(rename = "isIfaAudience", skip_serializing_if = "Option::is_none")] pub is_ifa_audience: Option, - /// The description to register for the job (in jobs[].description). + /// The description to register for the job (in jobs[].description). #[serde(rename = "uploadDescription", skip_serializing_if = "Option::is_none")] pub upload_description: Option, - /// An array of user IDs or IFAs. Max number: 10,000 + /// An array of user IDs or IFAs. Max number: 10,000 #[serde(rename = "audiences", skip_serializing_if = "Option::is_none")] pub audiences: Option>, } @@ -55,5 +53,3 @@ impl CreateAudienceGroupRequest { } } } - - diff --git a/openapi/src/manage_audience/models/create_audience_group_response.rs b/openapi/src/manage_audience/models/create_audience_group_response.rs index 054b5bb7..846452a6 100644 --- a/openapi/src/manage_audience/models/create_audience_group_response.rs +++ b/openapi/src/manage_audience/models/create_audience_group_response.rs @@ -20,20 +20,18 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CreateAudienceGroupResponse : Create audience for uploading user IDs (by JSON) - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateAudienceGroupResponse { /// The audience ID. #[serde(rename = "audienceGroupId", skip_serializing_if = "Option::is_none")] pub audience_group_id: Option, - /// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. + /// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. #[serde(rename = "createRoute", skip_serializing_if = "Option::is_none")] pub create_route: Option, #[serde(rename = "type", skip_serializing_if = "Option::is_none")] @@ -44,13 +42,13 @@ pub struct CreateAudienceGroupResponse { /// When the audience was created (in UNIX time). #[serde(rename = "created", skip_serializing_if = "Option::is_none")] pub created: Option, - /// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. `READ`: Can use only. `READ_WRITE`: Can use and update. + /// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. `READ`: Can use only. `READ_WRITE`: Can use and update. #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] pub permission: Option, - /// Time of audience expiration. Only returned for specific audiences. + /// Time of audience expiration. Only returned for specific audiences. #[serde(rename = "expireTimestamp", skip_serializing_if = "Option::is_none")] pub expire_timestamp: Option, - /// The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs. One of: `true`: Accounts are specified with IFAs. `false` (default): Accounts are specified with user IDs. + /// The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs. One of: `true`: Accounts are specified with IFAs. `false` (default): Accounts are specified with user IDs. #[serde(rename = "isIfaAudience", skip_serializing_if = "Option::is_none")] pub is_ifa_audience: Option, } @@ -71,7 +69,7 @@ impl CreateAudienceGroupResponse { } } -/// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. +/// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CreateRouteManageAudience { #[serde(rename = "MESSAGING_API")] @@ -83,7 +81,7 @@ impl Default for CreateRouteManageAudience { Self::MessagingApi } } -/// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. `READ`: Can use only. `READ_WRITE`: Can use and update. +/// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. `READ`: Can use only. `READ_WRITE`: Can use and update. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PermissionManageAudience { #[serde(rename = "READ")] @@ -97,4 +95,3 @@ impl Default for PermissionManageAudience { Self::Read } } - diff --git a/openapi/src/manage_audience/models/create_click_based_audience_group_request.rs b/openapi/src/manage_audience/models/create_click_based_audience_group_request.rs index 9690c78b..3663475a 100644 --- a/openapi/src/manage_audience/models/create_click_based_audience_group_request.rs +++ b/openapi/src/manage_audience/models/create_click_based_audience_group_request.rs @@ -20,23 +20,21 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CreateClickBasedAudienceGroupRequest : Create audience for click-based retargeting - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateClickBasedAudienceGroupRequest { - /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 + /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, - /// The request ID of a broadcast or narrowcast message sent in the past 60 days. Each Messaging API request has a request ID. + /// The request ID of a broadcast or narrowcast message sent in the past 60 days. Each Messaging API request has a request ID. #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")] pub request_id: Option, - /// The URL clicked by the user. If empty, users who clicked any URL in the message are added to the list of recipients. Max character limit: 2,000 + /// The URL clicked by the user. If empty, users who clicked any URL in the message are added to the list of recipients. Max character limit: 2,000 #[serde(rename = "clickUrl", skip_serializing_if = "Option::is_none")] pub click_url: Option, } @@ -51,5 +49,3 @@ impl CreateClickBasedAudienceGroupRequest { } } } - - diff --git a/openapi/src/manage_audience/models/create_click_based_audience_group_response.rs b/openapi/src/manage_audience/models/create_click_based_audience_group_response.rs index 44e8c5b2..b96e60c0 100644 --- a/openapi/src/manage_audience/models/create_click_based_audience_group_response.rs +++ b/openapi/src/manage_audience/models/create_click_based_audience_group_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CreateClickBasedAudienceGroupResponse : Create audience for click-based retargeting - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateClickBasedAudienceGroupResponse { /// The audience ID. @@ -47,16 +45,16 @@ pub struct CreateClickBasedAudienceGroupResponse { /// The URL that was specified when the audience was created. #[serde(rename = "clickUrl", skip_serializing_if = "Option::is_none")] pub click_url: Option, - /// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. + /// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. #[serde(rename = "createRoute", skip_serializing_if = "Option::is_none")] pub create_route: Option, - /// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. - `READ`: Can use only. - `READ_WRITE`: Can use and update. + /// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. - `READ`: Can use only. - `READ_WRITE`: Can use and update. #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] pub permission: Option, /// Time of audience expiration. Only returned for specific audiences. #[serde(rename = "expireTimestamp", skip_serializing_if = "Option::is_none")] pub expire_timestamp: Option, - /// The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs. One of: true: Accounts are specified with IFAs. false (default): Accounts are specified with user IDs. + /// The value indicating the type of account to be sent, as specified when creating the audience for uploading user IDs. One of: true: Accounts are specified with IFAs. false (default): Accounts are specified with user IDs. #[serde(rename = "isIfaAudience", skip_serializing_if = "Option::is_none")] pub is_ifa_audience: Option, } @@ -79,7 +77,7 @@ impl CreateClickBasedAudienceGroupResponse { } } -/// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. +/// How the audience was created. `MESSAGING_API`: An audience created with Messaging API. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum CreateRouteManageAudience { #[serde(rename = "MESSAGING_API")] @@ -91,7 +89,7 @@ impl Default for CreateRouteManageAudience { Self::MessagingApi } } -/// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. - `READ`: Can use only. - `READ_WRITE`: Can use and update. +/// Audience's update permission. Audiences linked to the same channel will be READ_WRITE. - `READ`: Can use only. - `READ_WRITE`: Can use and update. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PermissionManageAudience { #[serde(rename = "READ")] @@ -105,4 +103,3 @@ impl Default for PermissionManageAudience { Self::Read } } - diff --git a/openapi/src/manage_audience/models/create_imp_based_audience_group_request.rs b/openapi/src/manage_audience/models/create_imp_based_audience_group_request.rs index 8e7aef33..020e1ba8 100644 --- a/openapi/src/manage_audience/models/create_imp_based_audience_group_request.rs +++ b/openapi/src/manage_audience/models/create_imp_based_audience_group_request.rs @@ -20,20 +20,18 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CreateImpBasedAudienceGroupRequest : Create audience for impression-based retargeting - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateImpBasedAudienceGroupRequest { - /// The audience's name. This is case-insensitive, meaning `AUDIENCE` and `audience` are considered identical. Max character limit: 120 + /// The audience's name. This is case-insensitive, meaning `AUDIENCE` and `audience` are considered identical. Max character limit: 120 #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, - /// The request ID of a broadcast or narrowcast message sent in the past 60 days. Each Messaging API request has a request ID. + /// The request ID of a broadcast or narrowcast message sent in the past 60 days. Each Messaging API request has a request ID. #[serde(rename = "requestId", skip_serializing_if = "Option::is_none")] pub request_id: Option, } @@ -47,5 +45,3 @@ impl CreateImpBasedAudienceGroupRequest { } } } - - diff --git a/openapi/src/manage_audience/models/create_imp_based_audience_group_response.rs b/openapi/src/manage_audience/models/create_imp_based_audience_group_response.rs index 3d6a9bd9..b69aafbf 100644 --- a/openapi/src/manage_audience/models/create_imp_based_audience_group_response.rs +++ b/openapi/src/manage_audience/models/create_imp_based_audience_group_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CreateImpBasedAudienceGroupResponse : Create audience for impression-based retargeting - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateImpBasedAudienceGroupResponse { /// The audience ID. @@ -58,5 +56,3 @@ impl CreateImpBasedAudienceGroupResponse { } } } - - diff --git a/openapi/src/manage_audience/models/error_detail.rs b/openapi/src/manage_audience/models/error_detail.rs index 7a690194..0cc22c63 100644 --- a/openapi/src/manage_audience/models/error_detail.rs +++ b/openapi/src/manage_audience/models/error_detail.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorDetail { /// Details of the error. Not included in the response under certain situations. @@ -45,5 +42,3 @@ impl ErrorDetail { } } } - - diff --git a/openapi/src/manage_audience/models/error_response.rs b/openapi/src/manage_audience/models/error_response.rs index 78180b47..9f8a8323 100644 --- a/openapi/src/manage_audience/models/error_response.rs +++ b/openapi/src/manage_audience/models/error_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorResponse { /// Message containing information about the error. @@ -45,5 +42,3 @@ impl ErrorResponse { } } } - - diff --git a/openapi/src/manage_audience/models/get_audience_data_response.rs b/openapi/src/manage_audience/models/get_audience_data_response.rs index f61e4e05..0d02e1af 100644 --- a/openapi/src/manage_audience/models/get_audience_data_response.rs +++ b/openapi/src/manage_audience/models/get_audience_data_response.rs @@ -20,19 +20,17 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetAudienceDataResponse : Get audience data - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAudienceDataResponse { #[serde(rename = "audienceGroup", skip_serializing_if = "Option::is_none")] pub audience_group: Option>, - /// An array of jobs. This array is used to keep track of each attempt to add new user IDs or IFAs to an audience for uploading user IDs. Empty array is returned for any other type of audience. Max: 50 + /// An array of jobs. This array is used to keep track of each attempt to add new user IDs or IFAs to an audience for uploading user IDs. Empty array is returned for any other type of audience. Max: 50 #[serde(rename = "jobs", skip_serializing_if = "Option::is_none")] pub jobs: Option>, } @@ -46,5 +44,3 @@ impl GetAudienceDataResponse { } } } - - diff --git a/openapi/src/manage_audience/models/get_audience_group_authority_level_response.rs b/openapi/src/manage_audience/models/get_audience_group_authority_level_response.rs index f0161a82..e4638ed7 100644 --- a/openapi/src/manage_audience/models/get_audience_group_authority_level_response.rs +++ b/openapi/src/manage_audience/models/get_audience_group_authority_level_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetAudienceGroupAuthorityLevelResponse : Get the authority level of the audience - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAudienceGroupAuthorityLevelResponse { #[serde(rename = "authorityLevel", skip_serializing_if = "Option::is_none")] @@ -42,5 +40,3 @@ impl GetAudienceGroupAuthorityLevelResponse { } } } - - diff --git a/openapi/src/manage_audience/models/get_audience_groups_response.rs b/openapi/src/manage_audience/models/get_audience_groups_response.rs index 19352fcf..8358b3de 100644 --- a/openapi/src/manage_audience/models/get_audience_groups_response.rs +++ b/openapi/src/manage_audience/models/get_audience_groups_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetAudienceGroupsResponse : Gets data for more than one audience. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAudienceGroupsResponse { /// An array of audience data. If there are no audiences that match the specified filter, an empty array will be returned. @@ -40,7 +38,10 @@ pub struct GetAudienceGroupsResponse { #[serde(rename = "totalCount", skip_serializing_if = "Option::is_none")] pub total_count: Option, /// Of the audiences you can get with the specified filter, the number of audiences with the update permission set to READ_WRITE. - #[serde(rename = "readWriteAudienceGroupTotalCount", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "readWriteAudienceGroupTotalCount", + skip_serializing_if = "Option::is_none" + )] pub read_write_audience_group_total_count: Option, /// The current page number. #[serde(rename = "page", skip_serializing_if = "Option::is_none")] @@ -63,5 +64,3 @@ impl GetAudienceGroupsResponse { } } } - - diff --git a/openapi/src/manage_audience/models/update_audience_group_authority_level_request.rs b/openapi/src/manage_audience/models/update_audience_group_authority_level_request.rs index cd0250c6..3cb7b431 100644 --- a/openapi/src/manage_audience/models/update_audience_group_authority_level_request.rs +++ b/openapi/src/manage_audience/models/update_audience_group_authority_level_request.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// UpdateAudienceGroupAuthorityLevelRequest : Change the authority level of the audience - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateAudienceGroupAuthorityLevelRequest { #[serde(rename = "authorityLevel", skip_serializing_if = "Option::is_none")] @@ -42,5 +40,3 @@ impl UpdateAudienceGroupAuthorityLevelRequest { } } } - - diff --git a/openapi/src/manage_audience/models/update_audience_group_description_request.rs b/openapi/src/manage_audience/models/update_audience_group_description_request.rs index 11835c37..ae8af222 100644 --- a/openapi/src/manage_audience/models/update_audience_group_description_request.rs +++ b/openapi/src/manage_audience/models/update_audience_group_description_request.rs @@ -20,17 +20,15 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// UpdateAudienceGroupDescriptionRequest : Rename an audience - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateAudienceGroupDescriptionRequest { - /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 + /// The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, } @@ -38,10 +36,6 @@ pub struct UpdateAudienceGroupDescriptionRequest { impl UpdateAudienceGroupDescriptionRequest { /// Rename an audience pub fn new() -> UpdateAudienceGroupDescriptionRequest { - UpdateAudienceGroupDescriptionRequest { - description: None, - } + UpdateAudienceGroupDescriptionRequest { description: None } } } - - diff --git a/openapi/src/messaging_api/apis/configuration.rs b/openapi/src/messaging_api/apis/configuration.rs index 50e891c5..b598932e 100644 --- a/openapi/src/messaging_api/apis/configuration.rs +++ b/openapi/src/messaging_api/apis/configuration.rs @@ -20,12 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/messaging_api/apis/messaging_api_api.rs b/openapi/src/messaging_api/apis/messaging_api_api.rs index a07e39eb..4e7772f4 100644 --- a/openapi/src/messaging_api/apis/messaging_api_api.rs +++ b/openapi/src/messaging_api/apis/messaging_api_api.rs @@ -20,86 +20,85 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::messaging_api::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`audience_match`] #[derive(Clone, Debug)] pub struct AudienceMatchParams { - pub audience_match_messages_request: crate::messaging_api::models::AudienceMatchMessagesRequest + pub audience_match_messages_request: crate::messaging_api::models::AudienceMatchMessagesRequest, } /// struct for passing parameters to the method [`broadcast`] #[derive(Clone, Debug)] pub struct BroadcastParams { pub broadcast_request: crate::messaging_api::models::BroadcastRequest, - /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. - pub x_line_retry_key: Option + /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. + pub x_line_retry_key: Option, } /// struct for passing parameters to the method [`create_rich_menu`] #[derive(Clone, Debug)] pub struct CreateRichMenuParams { - pub rich_menu_request: crate::messaging_api::models::RichMenuRequest + pub rich_menu_request: crate::messaging_api::models::RichMenuRequest, } /// struct for passing parameters to the method [`create_rich_menu_alias`] #[derive(Clone, Debug)] pub struct CreateRichMenuAliasParams { - pub create_rich_menu_alias_request: crate::messaging_api::models::CreateRichMenuAliasRequest + pub create_rich_menu_alias_request: crate::messaging_api::models::CreateRichMenuAliasRequest, } /// struct for passing parameters to the method [`delete_rich_menu`] #[derive(Clone, Debug)] pub struct DeleteRichMenuParams { /// ID of a rich menu - pub rich_menu_id: String + pub rich_menu_id: String, } /// struct for passing parameters to the method [`delete_rich_menu_alias`] #[derive(Clone, Debug)] pub struct DeleteRichMenuAliasParams { /// Rich menu alias ID that you want to delete. - pub rich_menu_alias_id: String + pub rich_menu_alias_id: String, } /// struct for passing parameters to the method [`get_ad_phone_message_statistics`] #[derive(Clone, Debug)] pub struct GetAdPhoneMessageStatisticsParams { - /// Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 - pub date: String + /// Date the message was sent Format: `yyyyMMdd` (e.g. `20190831`) Time Zone: UTC+9 + pub date: String, } /// struct for passing parameters to the method [`get_aggregation_unit_name_list`] #[derive(Clone, Debug)] pub struct GetAggregationUnitNameListParams { - /// The maximum number of aggregation units you can get per request. + /// The maximum number of aggregation units you can get per request. pub limit: Option, - /// Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all the aggregation units in one request, include this parameter to get the remaining array. - pub start: Option + /// Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all the aggregation units in one request, include this parameter to get the remaining array. + pub start: Option, } /// struct for passing parameters to the method [`get_followers`] #[derive(Clone, Debug)] pub struct GetFollowersParams { - /// Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs. + /// Value of the continuation token found in the next property of the JSON object returned in the response. Include this parameter to get the next array of user IDs. pub start: Option, /// The maximum number of user IDs to retrieve in a single request. - pub limit: Option + pub limit: Option, } /// struct for passing parameters to the method [`get_group_member_count`] #[derive(Clone, Debug)] pub struct GetGroupMemberCountParams { /// Group ID - pub group_id: String + pub group_id: String, } /// struct for passing parameters to the method [`get_group_member_profile`] @@ -108,7 +107,7 @@ pub struct GetGroupMemberProfileParams { /// Group ID pub group_id: String, /// User ID - pub user_id: String + pub user_id: String, } /// struct for passing parameters to the method [`get_group_members_ids`] @@ -116,99 +115,99 @@ pub struct GetGroupMemberProfileParams { pub struct GetGroupMembersIdsParams { /// Group ID pub group_id: String, - /// Value of the continuation token found in the `next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. - pub start: Option + /// Value of the continuation token found in the `next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. + pub start: Option, } /// struct for passing parameters to the method [`get_group_summary`] #[derive(Clone, Debug)] pub struct GetGroupSummaryParams { /// Group ID - pub group_id: String + pub group_id: String, } /// struct for passing parameters to the method [`get_narrowcast_progress`] #[derive(Clone, Debug)] pub struct GetNarrowcastProgressParams { /// The narrowcast message's request ID. Each Messaging API request has a request ID. - pub request_id: String + pub request_id: String, } /// struct for passing parameters to the method [`get_number_of_sent_broadcast_messages`] #[derive(Clone, Debug)] pub struct GetNumberOfSentBroadcastMessagesParams { - /// Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 - pub date: String + /// Date the messages were sent Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 + pub date: String, } /// struct for passing parameters to the method [`get_number_of_sent_multicast_messages`] #[derive(Clone, Debug)] pub struct GetNumberOfSentMulticastMessagesParams { - /// Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 - pub date: String + /// Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 + pub date: String, } /// struct for passing parameters to the method [`get_number_of_sent_push_messages`] #[derive(Clone, Debug)] pub struct GetNumberOfSentPushMessagesParams { - /// Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 - pub date: String + /// Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 + pub date: String, } /// struct for passing parameters to the method [`get_number_of_sent_reply_messages`] #[derive(Clone, Debug)] pub struct GetNumberOfSentReplyMessagesParams { - /// Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 - pub date: String + /// Date the messages were sent Format: `yyyyMMdd` (e.g. `20191231`) Timezone: UTC+9 + pub date: String, } /// struct for passing parameters to the method [`get_pnp_message_statistics`] #[derive(Clone, Debug)] pub struct GetPnpMessageStatisticsParams { - /// Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 - pub date: String + /// Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9 + pub date: String, } /// struct for passing parameters to the method [`get_profile`] #[derive(Clone, Debug)] pub struct GetProfileParams { /// User ID - pub user_id: String + pub user_id: String, } /// struct for passing parameters to the method [`get_rich_menu`] #[derive(Clone, Debug)] pub struct GetRichMenuParams { /// ID of a rich menu - pub rich_menu_id: String + pub rich_menu_id: String, } /// struct for passing parameters to the method [`get_rich_menu_alias`] #[derive(Clone, Debug)] pub struct GetRichMenuAliasParams { /// The rich menu alias ID whose information you want to obtain. - pub rich_menu_alias_id: String + pub rich_menu_alias_id: String, } /// struct for passing parameters to the method [`get_rich_menu_batch_progress`] #[derive(Clone, Debug)] pub struct GetRichMenuBatchProgressParams { /// A request ID used to batch control the rich menu linked to the user. Each Messaging API request has a request ID. - pub request_id: String + pub request_id: String, } /// struct for passing parameters to the method [`get_rich_menu_id_of_user`] #[derive(Clone, Debug)] pub struct GetRichMenuIdOfUserParams { /// User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. - pub user_id: String + pub user_id: String, } /// struct for passing parameters to the method [`get_room_member_count`] #[derive(Clone, Debug)] pub struct GetRoomMemberCountParams { /// Room ID - pub room_id: String + pub room_id: String, } /// struct for passing parameters to the method [`get_room_member_profile`] @@ -217,7 +216,7 @@ pub struct GetRoomMemberProfileParams { /// Room ID pub room_id: String, /// User ID - pub user_id: String + pub user_id: String, } /// struct for passing parameters to the method [`get_room_members_ids`] @@ -225,29 +224,29 @@ pub struct GetRoomMemberProfileParams { pub struct GetRoomMembersIdsParams { /// Room ID pub room_id: String, - /// Value of the continuation token found in the `next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. - pub start: Option + /// Value of the continuation token found in the `next` property of the JSON object returned in the response. Include this parameter to get the next array of user IDs for the members of the group. + pub start: Option, } /// struct for passing parameters to the method [`issue_link_token`] #[derive(Clone, Debug)] pub struct IssueLinkTokenParams { - /// User ID for the LINE account to be linked. Found in the `source` object of account link event objects. Do not use the LINE ID used in LINE. - pub user_id: String + /// User ID for the LINE account to be linked. Found in the `source` object of account link event objects. Do not use the LINE ID used in LINE. + pub user_id: String, } /// struct for passing parameters to the method [`leave_group`] #[derive(Clone, Debug)] pub struct LeaveGroupParams { /// Group ID - pub group_id: String + pub group_id: String, } /// struct for passing parameters to the method [`leave_room`] #[derive(Clone, Debug)] pub struct LeaveRoomParams { /// Room ID - pub room_id: String + pub room_id: String, } /// struct for passing parameters to the method [`link_rich_menu_id_to_user`] @@ -256,43 +255,43 @@ pub struct LinkRichMenuIdToUserParams { /// User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. pub user_id: String, /// ID of a rich menu - pub rich_menu_id: String + pub rich_menu_id: String, } /// struct for passing parameters to the method [`link_rich_menu_id_to_users`] #[derive(Clone, Debug)] pub struct LinkRichMenuIdToUsersParams { - pub rich_menu_bulk_link_request: crate::messaging_api::models::RichMenuBulkLinkRequest + pub rich_menu_bulk_link_request: crate::messaging_api::models::RichMenuBulkLinkRequest, } /// struct for passing parameters to the method [`mark_messages_as_read`] #[derive(Clone, Debug)] pub struct MarkMessagesAsReadParams { - pub mark_messages_as_read_request: crate::messaging_api::models::MarkMessagesAsReadRequest + pub mark_messages_as_read_request: crate::messaging_api::models::MarkMessagesAsReadRequest, } /// struct for passing parameters to the method [`multicast`] #[derive(Clone, Debug)] pub struct MulticastParams { pub multicast_request: crate::messaging_api::models::MulticastRequest, - /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. - pub x_line_retry_key: Option + /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. + pub x_line_retry_key: Option, } /// struct for passing parameters to the method [`narrowcast`] #[derive(Clone, Debug)] pub struct NarrowcastParams { pub narrowcast_request: crate::messaging_api::models::NarrowcastRequest, - /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. - pub x_line_retry_key: Option + /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. + pub x_line_retry_key: Option, } /// struct for passing parameters to the method [`push_message`] #[derive(Clone, Debug)] pub struct PushMessageParams { pub push_message_request: crate::messaging_api::models::PushMessageRequest, - /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. - pub x_line_retry_key: Option + /// Retry key. Specifies the UUID in hexadecimal format (e.g., `123e4567-e89b-12d3-a456-426614174000`) generated by any method. The retry key isn't generated by LINE. Each developer must generate their own retry key. + pub x_line_retry_key: Option, } /// struct for passing parameters to the method [`push_messages_by_phone`] @@ -300,51 +299,52 @@ pub struct PushMessageParams { pub struct PushMessagesByPhoneParams { pub pnp_messages_request: crate::messaging_api::models::PnpMessagesRequest, /// String returned in the delivery.data property of the delivery completion event via Webhook. - pub x_line_delivery_tag: Option + pub x_line_delivery_tag: Option, } /// struct for passing parameters to the method [`reply_message`] #[derive(Clone, Debug)] pub struct ReplyMessageParams { - pub reply_message_request: crate::messaging_api::models::ReplyMessageRequest + pub reply_message_request: crate::messaging_api::models::ReplyMessageRequest, } /// struct for passing parameters to the method [`rich_menu_batch`] #[derive(Clone, Debug)] pub struct RichMenuBatchParams { - pub rich_menu_batch_request: crate::messaging_api::models::RichMenuBatchRequest + pub rich_menu_batch_request: crate::messaging_api::models::RichMenuBatchRequest, } /// struct for passing parameters to the method [`set_default_rich_menu`] #[derive(Clone, Debug)] pub struct SetDefaultRichMenuParams { /// ID of a rich menu - pub rich_menu_id: String + pub rich_menu_id: String, } /// struct for passing parameters to the method [`set_webhook_endpoint`] #[derive(Clone, Debug)] pub struct SetWebhookEndpointParams { - pub set_webhook_endpoint_request: crate::messaging_api::models::SetWebhookEndpointRequest + pub set_webhook_endpoint_request: crate::messaging_api::models::SetWebhookEndpointRequest, } /// struct for passing parameters to the method [`test_webhook_endpoint`] #[derive(Clone, Debug)] pub struct TestWebhookEndpointParams { - pub test_webhook_endpoint_request: Option + pub test_webhook_endpoint_request: + Option, } /// struct for passing parameters to the method [`unlink_rich_menu_id_from_user`] #[derive(Clone, Debug)] pub struct UnlinkRichMenuIdFromUserParams { /// User ID. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. - pub user_id: String + pub user_id: String, } /// struct for passing parameters to the method [`unlink_rich_menu_id_from_users`] #[derive(Clone, Debug)] pub struct UnlinkRichMenuIdFromUsersParams { - pub rich_menu_bulk_unlink_request: crate::messaging_api::models::RichMenuBulkUnlinkRequest + pub rich_menu_bulk_unlink_request: crate::messaging_api::models::RichMenuBulkUnlinkRequest, } /// struct for passing parameters to the method [`update_rich_menu_alias`] @@ -352,52 +352,51 @@ pub struct UnlinkRichMenuIdFromUsersParams { pub struct UpdateRichMenuAliasParams { /// The rich menu alias ID you want to update. pub rich_menu_alias_id: String, - pub update_rich_menu_alias_request: crate::messaging_api::models::UpdateRichMenuAliasRequest + pub update_rich_menu_alias_request: crate::messaging_api::models::UpdateRichMenuAliasRequest, } /// struct for passing parameters to the method [`validate_broadcast`] #[derive(Clone, Debug)] pub struct ValidateBroadcastParams { - pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest + pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest, } /// struct for passing parameters to the method [`validate_multicast`] #[derive(Clone, Debug)] pub struct ValidateMulticastParams { - pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest + pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest, } /// struct for passing parameters to the method [`validate_narrowcast`] #[derive(Clone, Debug)] pub struct ValidateNarrowcastParams { - pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest + pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest, } /// struct for passing parameters to the method [`validate_push`] #[derive(Clone, Debug)] pub struct ValidatePushParams { - pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest + pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest, } /// struct for passing parameters to the method [`validate_reply`] #[derive(Clone, Debug)] pub struct ValidateReplyParams { - pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest + pub validate_message_request: crate::messaging_api::models::ValidateMessageRequest, } /// struct for passing parameters to the method [`validate_rich_menu_batch_request`] #[derive(Clone, Debug)] pub struct ValidateRichMenuBatchRequestParams { - pub rich_menu_batch_request: crate::messaging_api::models::RichMenuBatchRequest + pub rich_menu_batch_request: crate::messaging_api::models::RichMenuBatchRequest, } /// struct for passing parameters to the method [`validate_rich_menu_object`] #[derive(Clone, Debug)] pub struct ValidateRichMenuObjectParams { - pub rich_menu_request: crate::messaging_api::models::RichMenuRequest + pub rich_menu_request: crate::messaging_api::models::RichMenuRequest, } - /// struct for typed errors of method [`audience_match`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -849,22 +848,28 @@ pub enum ValidateRichMenuObjectError { UnknownValue(serde_json::Value), } - /// Send a message using phone number -pub async fn audience_match(configuration: &configuration::Configuration, params: AudienceMatchParams) -> Result<(), Error> { +pub async fn audience_match( + configuration: &configuration::Configuration, + params: AudienceMatchParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let audience_match_messages_request = params.audience_match_messages_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/bot/ad/multicast/phone", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/bot/ad/multicast/phone", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -880,31 +885,44 @@ pub async fn audience_match(configuration: &configuration::Configuration, params if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Sends a message to multiple users at any time. -pub async fn broadcast(configuration: &configuration::Configuration, params: BroadcastParams) -> Result> { +pub async fn broadcast( + configuration: &configuration::Configuration, + params: BroadcastParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let broadcast_request = params.broadcast_request; let x_line_retry_key = params.x_line_retry_key; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/broadcast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/broadcast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(local_var_param_value) = x_line_retry_key { - local_var_req_builder = local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); + local_var_req_builder = + local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -920,26 +938,37 @@ pub async fn broadcast(configuration: &configuration::Configuration, params: Bro if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Cancel default rich menu -pub async fn cancel_default_rich_menu(configuration: &configuration::Configuration) -> Result<(), Error> { +pub async fn cancel_default_rich_menu( + configuration: &configuration::Configuration, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/user/all/richmenu", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/user/all/richmenu", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -954,27 +983,36 @@ pub async fn cancel_default_rich_menu(configuration: &configuration::Configurati if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Create rich menu -pub async fn create_rich_menu(configuration: &configuration::Configuration, params: CreateRichMenuParams) -> Result> { +pub async fn create_rich_menu( + configuration: &configuration::Configuration, + params: CreateRichMenuParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_request = params.rich_menu_request; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/richmenu", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -990,27 +1028,39 @@ pub async fn create_rich_menu(configuration: &configuration::Configuration, para if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Create rich menu alias -pub async fn create_rich_menu_alias(configuration: &configuration::Configuration, params: CreateRichMenuAliasParams) -> Result<(), Error> { +pub async fn create_rich_menu_alias( + configuration: &configuration::Configuration, + params: CreateRichMenuAliasParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let create_rich_menu_alias_request = params.create_rich_menu_alias_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/alias", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/alias", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1026,27 +1076,40 @@ pub async fn create_rich_menu_alias(configuration: &configuration::Configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Deletes a rich menu. -pub async fn delete_rich_menu(configuration: &configuration::Configuration, params: DeleteRichMenuParams) -> Result<(), Error> { +pub async fn delete_rich_menu( + configuration: &configuration::Configuration, + params: DeleteRichMenuParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_id = params.rich_menu_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/{richMenuId}", local_var_configuration.base_path, richMenuId=crate::messaging_api::apis::urlencode(rich_menu_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/{richMenuId}", + local_var_configuration.base_path, + richMenuId = crate::messaging_api::apis::urlencode(rich_menu_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1061,27 +1124,40 @@ pub async fn delete_rich_menu(configuration: &configuration::Configuration, para if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Delete rich menu alias -pub async fn delete_rich_menu_alias(configuration: &configuration::Configuration, params: DeleteRichMenuAliasParams) -> Result<(), Error> { +pub async fn delete_rich_menu_alias( + configuration: &configuration::Configuration, + params: DeleteRichMenuAliasParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_alias_id = params.rich_menu_alias_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/alias/{richMenuAliasId}", local_var_configuration.base_path, richMenuAliasId=crate::messaging_api::apis::urlencode(rich_menu_alias_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/alias/{richMenuAliasId}", + local_var_configuration.base_path, + richMenuAliasId = crate::messaging_api::apis::urlencode(rich_menu_alias_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1096,28 +1172,43 @@ pub async fn delete_rich_menu_alias(configuration: &configuration::Configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get result of message delivery using phone number -pub async fn get_ad_phone_message_statistics(configuration: &configuration::Configuration, params: GetAdPhoneMessageStatisticsParams) -> Result> { +pub async fn get_ad_phone_message_statistics( + configuration: &configuration::Configuration, + params: GetAdPhoneMessageStatisticsParams, +) -> Result< + crate::messaging_api::models::NumberOfMessagesResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/delivery/ad_phone", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/delivery/ad_phone", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("date", &date.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1132,34 +1223,51 @@ pub async fn get_ad_phone_message_statistics(configuration: &configuration::Conf if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get name list of units used this month -pub async fn get_aggregation_unit_name_list(configuration: &configuration::Configuration, params: GetAggregationUnitNameListParams) -> Result> { +pub async fn get_aggregation_unit_name_list( + configuration: &configuration::Configuration, + params: GetAggregationUnitNameListParams, +) -> Result< + crate::messaging_api::models::GetAggregationUnitNameListResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let limit = params.limit; let start = params.start; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/aggregation/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/aggregation/list", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); } if let Some(ref local_var_str) = start { - local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("start", &local_var_str.to_string())]); } if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1174,26 +1282,40 @@ pub async fn get_aggregation_unit_name_list(configuration: &configuration::Confi if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get number of units used this month -pub async fn get_aggregation_unit_usage(configuration: &configuration::Configuration) -> Result> { +pub async fn get_aggregation_unit_usage( + configuration: &configuration::Configuration, +) -> Result< + crate::messaging_api::models::GetAggregationUnitUsageResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/aggregation/info", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/aggregation/info", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1208,26 +1330,34 @@ pub async fn get_aggregation_unit_usage(configuration: &configuration::Configura if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get bot info -pub async fn get_bot_info(configuration: &configuration::Configuration) -> Result> { +pub async fn get_bot_info( + configuration: &configuration::Configuration, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/info", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1242,26 +1372,37 @@ pub async fn get_bot_info(configuration: &configuration::Configuration) -> Resul if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets the ID of the default rich menu set with the Messaging API. -pub async fn get_default_rich_menu_id(configuration: &configuration::Configuration) -> Result> { +pub async fn get_default_rich_menu_id( + configuration: &configuration::Configuration, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/user/all/richmenu", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/user/all/richmenu", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1276,34 +1417,45 @@ pub async fn get_default_rich_menu_id(configuration: &configuration::Configurati if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get a list of users who added your LINE Official Account as a friend -pub async fn get_followers(configuration: &configuration::Configuration, params: GetFollowersParams) -> Result> { +pub async fn get_followers( + configuration: &configuration::Configuration, + params: GetFollowersParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let start = params.start; let limit = params.limit; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/followers/ids", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = start { - local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("start", &local_var_str.to_string())]); } if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); } if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1318,27 +1470,41 @@ pub async fn get_followers(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get number of users in a group chat -pub async fn get_group_member_count(configuration: &configuration::Configuration, params: GetGroupMemberCountParams) -> Result> { +pub async fn get_group_member_count( + configuration: &configuration::Configuration, + params: GetGroupMemberCountParams, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters let group_id = params.group_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/group/{groupId}/members/count", local_var_configuration.base_path, groupId=crate::messaging_api::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/group/{groupId}/members/count", + local_var_configuration.base_path, + groupId = crate::messaging_api::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1353,28 +1519,43 @@ pub async fn get_group_member_count(configuration: &configuration::Configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get group chat member profile -pub async fn get_group_member_profile(configuration: &configuration::Configuration, params: GetGroupMemberProfileParams) -> Result> { +pub async fn get_group_member_profile( + configuration: &configuration::Configuration, + params: GetGroupMemberProfileParams, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters let group_id = params.group_id; let user_id = params.user_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/group/{groupId}/member/{userId}", local_var_configuration.base_path, groupId=crate::messaging_api::apis::urlencode(group_id), userId=crate::messaging_api::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/group/{groupId}/member/{userId}", + local_var_configuration.base_path, + groupId = crate::messaging_api::apis::urlencode(group_id), + userId = crate::messaging_api::apis::urlencode(user_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1389,31 +1570,45 @@ pub async fn get_group_member_profile(configuration: &configuration::Configurati if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get group chat member user IDs -pub async fn get_group_members_ids(configuration: &configuration::Configuration, params: GetGroupMembersIdsParams) -> Result> { +pub async fn get_group_members_ids( + configuration: &configuration::Configuration, + params: GetGroupMembersIdsParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let group_id = params.group_id; let start = params.start; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/group/{groupId}/members/ids", local_var_configuration.base_path, groupId=crate::messaging_api::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/group/{groupId}/members/ids", + local_var_configuration.base_path, + groupId = crate::messaging_api::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = start { - local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("start", &local_var_str.to_string())]); } if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1428,27 +1623,40 @@ pub async fn get_group_members_ids(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get group chat summary -pub async fn get_group_summary(configuration: &configuration::Configuration, params: GetGroupSummaryParams) -> Result> { +pub async fn get_group_summary( + configuration: &configuration::Configuration, + params: GetGroupSummaryParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let group_id = params.group_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/group/{groupId}/summary", local_var_configuration.base_path, groupId=crate::messaging_api::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/group/{groupId}/summary", + local_var_configuration.base_path, + groupId = crate::messaging_api::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1463,26 +1671,34 @@ pub async fn get_group_summary(configuration: &configuration::Configuration, par if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets the target limit for sending messages in the current month. The total number of the free messages and the additional messages is returned. -pub async fn get_message_quota(configuration: &configuration::Configuration) -> Result> { +pub async fn get_message_quota( + configuration: &configuration::Configuration, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/message/quota", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1497,26 +1713,40 @@ pub async fn get_message_quota(configuration: &configuration::Configuration) -> if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets the number of messages sent in the current month. -pub async fn get_message_quota_consumption(configuration: &configuration::Configuration) -> Result> { +pub async fn get_message_quota_consumption( + configuration: &configuration::Configuration, +) -> Result< + crate::messaging_api::models::QuotaConsumptionResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/quota/consumption", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/quota/consumption", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1531,28 +1761,43 @@ pub async fn get_message_quota_consumption(configuration: &configuration::Config if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets the status of a narrowcast message. -pub async fn get_narrowcast_progress(configuration: &configuration::Configuration, params: GetNarrowcastProgressParams) -> Result> { +pub async fn get_narrowcast_progress( + configuration: &configuration::Configuration, + params: GetNarrowcastProgressParams, +) -> Result< + crate::messaging_api::models::NarrowcastProgressResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let request_id = params.request_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/progress/narrowcast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/progress/narrowcast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("requestId", &request_id.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1567,28 +1812,43 @@ pub async fn get_narrowcast_progress(configuration: &configuration::Configuratio if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get number of sent broadcast messages -pub async fn get_number_of_sent_broadcast_messages(configuration: &configuration::Configuration, params: GetNumberOfSentBroadcastMessagesParams) -> Result> { +pub async fn get_number_of_sent_broadcast_messages( + configuration: &configuration::Configuration, + params: GetNumberOfSentBroadcastMessagesParams, +) -> Result< + crate::messaging_api::models::NumberOfMessagesResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/delivery/broadcast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/delivery/broadcast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("date", &date.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1603,28 +1863,43 @@ pub async fn get_number_of_sent_broadcast_messages(configuration: &configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get number of sent multicast messages -pub async fn get_number_of_sent_multicast_messages(configuration: &configuration::Configuration, params: GetNumberOfSentMulticastMessagesParams) -> Result> { +pub async fn get_number_of_sent_multicast_messages( + configuration: &configuration::Configuration, + params: GetNumberOfSentMulticastMessagesParams, +) -> Result< + crate::messaging_api::models::NumberOfMessagesResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/delivery/multicast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/delivery/multicast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("date", &date.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1639,28 +1914,43 @@ pub async fn get_number_of_sent_multicast_messages(configuration: &configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get number of sent push messages -pub async fn get_number_of_sent_push_messages(configuration: &configuration::Configuration, params: GetNumberOfSentPushMessagesParams) -> Result> { +pub async fn get_number_of_sent_push_messages( + configuration: &configuration::Configuration, + params: GetNumberOfSentPushMessagesParams, +) -> Result< + crate::messaging_api::models::NumberOfMessagesResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/delivery/push", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/delivery/push", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("date", &date.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1675,28 +1965,43 @@ pub async fn get_number_of_sent_push_messages(configuration: &configuration::Con if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get number of sent reply messages -pub async fn get_number_of_sent_reply_messages(configuration: &configuration::Configuration, params: GetNumberOfSentReplyMessagesParams) -> Result> { +pub async fn get_number_of_sent_reply_messages( + configuration: &configuration::Configuration, + params: GetNumberOfSentReplyMessagesParams, +) -> Result< + crate::messaging_api::models::NumberOfMessagesResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/delivery/reply", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/delivery/reply", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("date", &date.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1711,28 +2016,43 @@ pub async fn get_number_of_sent_reply_messages(configuration: &configuration::Co if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// Get number of sent LINE notification messages  -pub async fn get_pnp_message_statistics(configuration: &configuration::Configuration, params: GetPnpMessageStatisticsParams) -> Result> { +/// Get number of sent LINE notification messages +pub async fn get_pnp_message_statistics( + configuration: &configuration::Configuration, + params: GetPnpMessageStatisticsParams, +) -> Result< + crate::messaging_api::models::NumberOfMessagesResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let date = params.date; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/delivery/pnp", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/delivery/pnp", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("date", &date.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1747,27 +2067,40 @@ pub async fn get_pnp_message_statistics(configuration: &configuration::Configura if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get profile -pub async fn get_profile(configuration: &configuration::Configuration, params: GetProfileParams) -> Result> { +pub async fn get_profile( + configuration: &configuration::Configuration, + params: GetProfileParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let user_id = params.user_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/profile/{userId}", local_var_configuration.base_path, userId=crate::messaging_api::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/profile/{userId}", + local_var_configuration.base_path, + userId = crate::messaging_api::apis::urlencode(user_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1782,27 +2115,40 @@ pub async fn get_profile(configuration: &configuration::Configuration, params: G if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets a rich menu via a rich menu ID. -pub async fn get_rich_menu(configuration: &configuration::Configuration, params: GetRichMenuParams) -> Result> { +pub async fn get_rich_menu( + configuration: &configuration::Configuration, + params: GetRichMenuParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_id = params.rich_menu_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/{richMenuId}", local_var_configuration.base_path, richMenuId=crate::messaging_api::apis::urlencode(rich_menu_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/{richMenuId}", + local_var_configuration.base_path, + richMenuId = crate::messaging_api::apis::urlencode(rich_menu_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1817,27 +2163,40 @@ pub async fn get_rich_menu(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get rich menu alias information -pub async fn get_rich_menu_alias(configuration: &configuration::Configuration, params: GetRichMenuAliasParams) -> Result> { +pub async fn get_rich_menu_alias( + configuration: &configuration::Configuration, + params: GetRichMenuAliasParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_alias_id = params.rich_menu_alias_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/alias/{richMenuAliasId}", local_var_configuration.base_path, richMenuAliasId=crate::messaging_api::apis::urlencode(rich_menu_alias_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/alias/{richMenuAliasId}", + local_var_configuration.base_path, + richMenuAliasId = crate::messaging_api::apis::urlencode(rich_menu_alias_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1852,26 +2211,38 @@ pub async fn get_rich_menu_alias(configuration: &configuration::Configuration, p if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get list of rich menu alias -pub async fn get_rich_menu_alias_list(configuration: &configuration::Configuration) -> Result> { +pub async fn get_rich_menu_alias_list( + configuration: &configuration::Configuration, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/alias/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/alias/list", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1886,28 +2257,43 @@ pub async fn get_rich_menu_alias_list(configuration: &configuration::Configurati if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get the status of Replace or unlink a linked rich menus in batches. -pub async fn get_rich_menu_batch_progress(configuration: &configuration::Configuration, params: GetRichMenuBatchProgressParams) -> Result> { +pub async fn get_rich_menu_batch_progress( + configuration: &configuration::Configuration, + params: GetRichMenuBatchProgressParams, +) -> Result< + crate::messaging_api::models::RichMenuBatchProgressResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let request_id = params.request_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/progress/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/progress/batch", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); local_var_req_builder = local_var_req_builder.query(&[("requestId", &request_id.to_string())]); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1922,27 +2308,40 @@ pub async fn get_rich_menu_batch_progress(configuration: &configuration::Configu if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get rich menu ID of user -pub async fn get_rich_menu_id_of_user(configuration: &configuration::Configuration, params: GetRichMenuIdOfUserParams) -> Result> { +pub async fn get_rich_menu_id_of_user( + configuration: &configuration::Configuration, + params: GetRichMenuIdOfUserParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let user_id = params.user_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/user/{userId}/richmenu", local_var_configuration.base_path, userId=crate::messaging_api::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/user/{userId}/richmenu", + local_var_configuration.base_path, + userId = crate::messaging_api::apis::urlencode(user_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1957,26 +2356,34 @@ pub async fn get_rich_menu_id_of_user(configuration: &configuration::Configurati if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get rich menu list -pub async fn get_rich_menu_list(configuration: &configuration::Configuration) -> Result> { +pub async fn get_rich_menu_list( + configuration: &configuration::Configuration, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/richmenu/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -1991,27 +2398,40 @@ pub async fn get_rich_menu_list(configuration: &configuration::Configuration) -> if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get number of users in a multi-person chat -pub async fn get_room_member_count(configuration: &configuration::Configuration, params: GetRoomMemberCountParams) -> Result> { +pub async fn get_room_member_count( + configuration: &configuration::Configuration, + params: GetRoomMemberCountParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let room_id = params.room_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/room/{roomId}/members/count", local_var_configuration.base_path, roomId=crate::messaging_api::apis::urlencode(room_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/room/{roomId}/members/count", + local_var_configuration.base_path, + roomId = crate::messaging_api::apis::urlencode(room_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2026,28 +2446,43 @@ pub async fn get_room_member_count(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get multi-person chat member profile -pub async fn get_room_member_profile(configuration: &configuration::Configuration, params: GetRoomMemberProfileParams) -> Result> { +pub async fn get_room_member_profile( + configuration: &configuration::Configuration, + params: GetRoomMemberProfileParams, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters let room_id = params.room_id; let user_id = params.user_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/room/{roomId}/member/{userId}", local_var_configuration.base_path, roomId=crate::messaging_api::apis::urlencode(room_id), userId=crate::messaging_api::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/room/{roomId}/member/{userId}", + local_var_configuration.base_path, + roomId = crate::messaging_api::apis::urlencode(room_id), + userId = crate::messaging_api::apis::urlencode(user_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2062,31 +2497,45 @@ pub async fn get_room_member_profile(configuration: &configuration::Configuratio if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get multi-person chat member user IDs -pub async fn get_room_members_ids(configuration: &configuration::Configuration, params: GetRoomMembersIdsParams) -> Result> { +pub async fn get_room_members_ids( + configuration: &configuration::Configuration, + params: GetRoomMembersIdsParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let room_id = params.room_id; let start = params.start; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/room/{roomId}/members/ids", local_var_configuration.base_path, roomId=crate::messaging_api::apis::urlencode(room_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/room/{roomId}/members/ids", + local_var_configuration.base_path, + roomId = crate::messaging_api::apis::urlencode(room_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = start { - local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("start", &local_var_str.to_string())]); } if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2101,26 +2550,38 @@ pub async fn get_room_members_ids(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get webhook endpoint information -pub async fn get_webhook_endpoint(configuration: &configuration::Configuration) -> Result> { +pub async fn get_webhook_endpoint( + configuration: &configuration::Configuration, +) -> Result> +{ let local_var_configuration = configuration; // unbox the parameters - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/channel/webhook/endpoint", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/channel/webhook/endpoint", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2135,27 +2596,40 @@ pub async fn get_webhook_endpoint(configuration: &configuration::Configuration) if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Issue link token -pub async fn issue_link_token(configuration: &configuration::Configuration, params: IssueLinkTokenParams) -> Result> { +pub async fn issue_link_token( + configuration: &configuration::Configuration, + params: IssueLinkTokenParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let user_id = params.user_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/user/{userId}/linkToken", local_var_configuration.base_path, userId=crate::messaging_api::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/user/{userId}/linkToken", + local_var_configuration.base_path, + userId = crate::messaging_api::apis::urlencode(user_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2170,27 +2644,40 @@ pub async fn issue_link_token(configuration: &configuration::Configuration, para if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Leave group chat -pub async fn leave_group(configuration: &configuration::Configuration, params: LeaveGroupParams) -> Result<(), Error> { +pub async fn leave_group( + configuration: &configuration::Configuration, + params: LeaveGroupParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let group_id = params.group_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/group/{groupId}/leave", local_var_configuration.base_path, groupId=crate::messaging_api::apis::urlencode(group_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/group/{groupId}/leave", + local_var_configuration.base_path, + groupId = crate::messaging_api::apis::urlencode(group_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2205,27 +2692,40 @@ pub async fn leave_group(configuration: &configuration::Configuration, params: L if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Leave multi-person chat -pub async fn leave_room(configuration: &configuration::Configuration, params: LeaveRoomParams) -> Result<(), Error> { +pub async fn leave_room( + configuration: &configuration::Configuration, + params: LeaveRoomParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let room_id = params.room_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/room/{roomId}/leave", local_var_configuration.base_path, roomId=crate::messaging_api::apis::urlencode(room_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/room/{roomId}/leave", + local_var_configuration.base_path, + roomId = crate::messaging_api::apis::urlencode(room_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2240,28 +2740,42 @@ pub async fn leave_room(configuration: &configuration::Configuration, params: Le if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Link rich menu to user. -pub async fn link_rich_menu_id_to_user(configuration: &configuration::Configuration, params: LinkRichMenuIdToUserParams) -> Result<(), Error> { +pub async fn link_rich_menu_id_to_user( + configuration: &configuration::Configuration, + params: LinkRichMenuIdToUserParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let user_id = params.user_id; let rich_menu_id = params.rich_menu_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/user/{userId}/richmenu/{richMenuId}", local_var_configuration.base_path, userId=crate::messaging_api::apis::urlencode(user_id), richMenuId=crate::messaging_api::apis::urlencode(rich_menu_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/user/{userId}/richmenu/{richMenuId}", + local_var_configuration.base_path, + userId = crate::messaging_api::apis::urlencode(user_id), + richMenuId = crate::messaging_api::apis::urlencode(rich_menu_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2276,27 +2790,39 @@ pub async fn link_rich_menu_id_to_user(configuration: &configuration::Configurat if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Link rich menu to multiple users -pub async fn link_rich_menu_id_to_users(configuration: &configuration::Configuration, params: LinkRichMenuIdToUsersParams) -> Result<(), Error> { +pub async fn link_rich_menu_id_to_users( + configuration: &configuration::Configuration, + params: LinkRichMenuIdToUsersParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_bulk_link_request = params.rich_menu_bulk_link_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/bulk/link", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/bulk/link", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2312,27 +2838,39 @@ pub async fn link_rich_menu_id_to_users(configuration: &configuration::Configura if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Mark messages from users as read -pub async fn mark_messages_as_read(configuration: &configuration::Configuration, params: MarkMessagesAsReadParams) -> Result<(), Error> { +pub async fn mark_messages_as_read( + configuration: &configuration::Configuration, + params: MarkMessagesAsReadParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let mark_messages_as_read_request = params.mark_messages_as_read_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/markAsRead", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/markAsRead", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2348,31 +2886,44 @@ pub async fn mark_messages_as_read(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// An API that efficiently sends the same message to multiple user IDs. You can't send messages to group chats or multi-person chats. -pub async fn multicast(configuration: &configuration::Configuration, params: MulticastParams) -> Result> { +pub async fn multicast( + configuration: &configuration::Configuration, + params: MulticastParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let multicast_request = params.multicast_request; let x_line_retry_key = params.x_line_retry_key; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/multicast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/multicast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(local_var_param_value) = x_line_retry_key { - local_var_req_builder = local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); + local_var_req_builder = + local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2388,31 +2939,44 @@ pub async fn multicast(configuration: &configuration::Configuration, params: Mul if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Send narrowcast message -pub async fn narrowcast(configuration: &configuration::Configuration, params: NarrowcastParams) -> Result> { +pub async fn narrowcast( + configuration: &configuration::Configuration, + params: NarrowcastParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let narrowcast_request = params.narrowcast_request; let x_line_retry_key = params.x_line_retry_key; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/narrowcast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/narrowcast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(local_var_param_value) = x_line_retry_key { - local_var_req_builder = local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); + local_var_req_builder = + local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2428,31 +2992,41 @@ pub async fn narrowcast(configuration: &configuration::Configuration, params: Na if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Sends a message to a user, group chat, or multi-person chat at any time. -pub async fn push_message(configuration: &configuration::Configuration, params: PushMessageParams) -> Result> { +pub async fn push_message( + configuration: &configuration::Configuration, + params: PushMessageParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let push_message_request = params.push_message_request; let x_line_retry_key = params.x_line_retry_key; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/message/push", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(local_var_param_value) = x_line_retry_key { - local_var_req_builder = local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); + local_var_req_builder = + local_var_req_builder.header("X-Line-Retry-Key", local_var_param_value.to_string()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2468,31 +3042,41 @@ pub async fn push_message(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Send LINE notification message -pub async fn push_messages_by_phone(configuration: &configuration::Configuration, params: PushMessagesByPhoneParams) -> Result<(), Error> { +pub async fn push_messages_by_phone( + configuration: &configuration::Configuration, + params: PushMessagesByPhoneParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let pnp_messages_request = params.pnp_messages_request; let x_line_delivery_tag = params.x_line_delivery_tag; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/bot/pnp/push", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(local_var_param_value) = x_line_delivery_tag { - local_var_req_builder = local_var_req_builder.header("X-Line-Delivery-Tag", local_var_param_value.to_string()); + local_var_req_builder = + local_var_req_builder.header("X-Line-Delivery-Tag", local_var_param_value.to_string()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2508,27 +3092,36 @@ pub async fn push_messages_by_phone(configuration: &configuration::Configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Send reply message -pub async fn reply_message(configuration: &configuration::Configuration, params: ReplyMessageParams) -> Result> { +pub async fn reply_message( + configuration: &configuration::Configuration, + params: ReplyMessageParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let reply_message_request = params.reply_message_request; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/message/reply", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2544,27 +3137,39 @@ pub async fn reply_message(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu -pub async fn rich_menu_batch(configuration: &configuration::Configuration, params: RichMenuBatchParams) -> Result<(), Error> { +/// You can use this endpoint to batch control the rich menu linked to the users using the endpoint such as Link rich menu to user. The following operations are available: 1. Replace a rich menu with another rich menu for all users linked to a specific rich menu 2. Unlink a rich menu for all users linked to a specific rich menu 3. Unlink a rich menu for all users linked the rich menu +pub async fn rich_menu_batch( + configuration: &configuration::Configuration, + params: RichMenuBatchParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_batch_request = params.rich_menu_batch_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/batch", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2580,27 +3185,40 @@ pub async fn rich_menu_batch(configuration: &configuration::Configuration, param if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Set default rich menu -pub async fn set_default_rich_menu(configuration: &configuration::Configuration, params: SetDefaultRichMenuParams) -> Result<(), Error> { +pub async fn set_default_rich_menu( + configuration: &configuration::Configuration, + params: SetDefaultRichMenuParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_id = params.rich_menu_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/user/all/richmenu/{richMenuId}", local_var_configuration.base_path, richMenuId=crate::messaging_api::apis::urlencode(rich_menu_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/user/all/richmenu/{richMenuId}", + local_var_configuration.base_path, + richMenuId = crate::messaging_api::apis::urlencode(rich_menu_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2615,27 +3233,39 @@ pub async fn set_default_rich_menu(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Set webhook endpoint URL -pub async fn set_webhook_endpoint(configuration: &configuration::Configuration, params: SetWebhookEndpointParams) -> Result<(), Error> { +pub async fn set_webhook_endpoint( + configuration: &configuration::Configuration, + params: SetWebhookEndpointParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let set_webhook_endpoint_request = params.set_webhook_endpoint_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/channel/webhook/endpoint", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/channel/webhook/endpoint", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2651,27 +3281,42 @@ pub async fn set_webhook_endpoint(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Test webhook endpoint -pub async fn test_webhook_endpoint(configuration: &configuration::Configuration, params: TestWebhookEndpointParams) -> Result> { +pub async fn test_webhook_endpoint( + configuration: &configuration::Configuration, + params: TestWebhookEndpointParams, +) -> Result< + crate::messaging_api::models::TestWebhookEndpointResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let test_webhook_endpoint_request = params.test_webhook_endpoint_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/channel/webhook/test", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/channel/webhook/test", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2687,27 +3332,40 @@ pub async fn test_webhook_endpoint(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Unlink rich menu from user -pub async fn unlink_rich_menu_id_from_user(configuration: &configuration::Configuration, params: UnlinkRichMenuIdFromUserParams) -> Result<(), Error> { +pub async fn unlink_rich_menu_id_from_user( + configuration: &configuration::Configuration, + params: UnlinkRichMenuIdFromUserParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let user_id = params.user_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/user/{userId}/richmenu", local_var_configuration.base_path, userId=crate::messaging_api::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/user/{userId}/richmenu", + local_var_configuration.base_path, + userId = crate::messaging_api::apis::urlencode(user_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2722,27 +3380,39 @@ pub async fn unlink_rich_menu_id_from_user(configuration: &configuration::Config if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Unlink rich menus from multiple users -pub async fn unlink_rich_menu_id_from_users(configuration: &configuration::Configuration, params: UnlinkRichMenuIdFromUsersParams) -> Result<(), Error> { +pub async fn unlink_rich_menu_id_from_users( + configuration: &configuration::Configuration, + params: UnlinkRichMenuIdFromUsersParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_bulk_unlink_request = params.rich_menu_bulk_unlink_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/bulk/unlink", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/bulk/unlink", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2758,28 +3428,41 @@ pub async fn unlink_rich_menu_id_from_users(configuration: &configuration::Confi if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Update rich menu alias -pub async fn update_rich_menu_alias(configuration: &configuration::Configuration, params: UpdateRichMenuAliasParams) -> Result<(), Error> { +pub async fn update_rich_menu_alias( + configuration: &configuration::Configuration, + params: UpdateRichMenuAliasParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_alias_id = params.rich_menu_alias_id; let update_rich_menu_alias_request = params.update_rich_menu_alias_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/alias/{richMenuAliasId}", local_var_configuration.base_path, richMenuAliasId=crate::messaging_api::apis::urlencode(rich_menu_alias_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/alias/{richMenuAliasId}", + local_var_configuration.base_path, + richMenuAliasId = crate::messaging_api::apis::urlencode(rich_menu_alias_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2795,27 +3478,39 @@ pub async fn update_rich_menu_alias(configuration: &configuration::Configuration if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Validate message objects of a broadcast message -pub async fn validate_broadcast(configuration: &configuration::Configuration, params: ValidateBroadcastParams) -> Result<(), Error> { +pub async fn validate_broadcast( + configuration: &configuration::Configuration, + params: ValidateBroadcastParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let validate_message_request = params.validate_message_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/validate/broadcast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/validate/broadcast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2831,27 +3526,39 @@ pub async fn validate_broadcast(configuration: &configuration::Configuration, pa if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Validate message objects of a multicast message -pub async fn validate_multicast(configuration: &configuration::Configuration, params: ValidateMulticastParams) -> Result<(), Error> { +pub async fn validate_multicast( + configuration: &configuration::Configuration, + params: ValidateMulticastParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let validate_message_request = params.validate_message_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/validate/multicast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/validate/multicast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2867,27 +3574,39 @@ pub async fn validate_multicast(configuration: &configuration::Configuration, pa if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Validate message objects of a narrowcast message -pub async fn validate_narrowcast(configuration: &configuration::Configuration, params: ValidateNarrowcastParams) -> Result<(), Error> { +pub async fn validate_narrowcast( + configuration: &configuration::Configuration, + params: ValidateNarrowcastParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let validate_message_request = params.validate_message_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/validate/narrowcast", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/validate/narrowcast", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2903,27 +3622,39 @@ pub async fn validate_narrowcast(configuration: &configuration::Configuration, p if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Validate message objects of a push message -pub async fn validate_push(configuration: &configuration::Configuration, params: ValidatePushParams) -> Result<(), Error> { +pub async fn validate_push( + configuration: &configuration::Configuration, + params: ValidatePushParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let validate_message_request = params.validate_message_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/validate/push", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/validate/push", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2939,27 +3670,39 @@ pub async fn validate_push(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Validate message objects of a reply message -pub async fn validate_reply(configuration: &configuration::Configuration, params: ValidateReplyParams) -> Result<(), Error> { +pub async fn validate_reply( + configuration: &configuration::Configuration, + params: ValidateReplyParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let validate_message_request = params.validate_message_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/validate/reply", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/validate/reply", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -2975,27 +3718,39 @@ pub async fn validate_reply(configuration: &configuration::Configuration, params if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Validate a request body of the Replace or unlink the linked rich menus in batches endpoint. -pub async fn validate_rich_menu_batch_request(configuration: &configuration::Configuration, params: ValidateRichMenuBatchRequestParams) -> Result<(), Error> { +pub async fn validate_rich_menu_batch_request( + configuration: &configuration::Configuration, + params: ValidateRichMenuBatchRequestParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_batch_request = params.rich_menu_batch_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/validate/batch", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/validate/batch", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -3011,27 +3766,39 @@ pub async fn validate_rich_menu_batch_request(configuration: &configuration::Con if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Validate rich menu object -pub async fn validate_rich_menu_object(configuration: &configuration::Configuration, params: ValidateRichMenuObjectParams) -> Result<(), Error> { +pub async fn validate_rich_menu_object( + configuration: &configuration::Configuration, + params: ValidateRichMenuObjectParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_request = params.rich_menu_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/validate", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/validate", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -3047,9 +3814,13 @@ pub async fn validate_rich_menu_object(configuration: &configuration::Configurat if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/messaging_api/apis/messaging_api_blob_api.rs b/openapi/src/messaging_api/apis/messaging_api_blob_api.rs index 8af6c110..b5171f2b 100644 --- a/openapi/src/messaging_api/apis/messaging_api_blob_api.rs +++ b/openapi/src/messaging_api/apis/messaging_api_blob_api.rs @@ -20,42 +20,41 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::messaging_api::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`get_message_content`] #[derive(Clone, Debug)] pub struct GetMessageContentParams { /// Message ID of video or audio - pub message_id: String + pub message_id: String, } /// struct for passing parameters to the method [`get_message_content_preview`] #[derive(Clone, Debug)] pub struct GetMessageContentPreviewParams { /// Message ID of image or video - pub message_id: String + pub message_id: String, } /// struct for passing parameters to the method [`get_message_content_transcoding_by_message_id`] #[derive(Clone, Debug)] pub struct GetMessageContentTranscodingByMessageIdParams { /// Message ID of video or audio - pub message_id: String + pub message_id: String, } /// struct for passing parameters to the method [`get_rich_menu_image`] #[derive(Clone, Debug)] pub struct GetRichMenuImageParams { /// ID of the rich menu with the image to be downloaded - pub rich_menu_id: String + pub rich_menu_id: String, } /// struct for passing parameters to the method [`set_rich_menu_image`] @@ -63,10 +62,9 @@ pub struct GetRichMenuImageParams { pub struct SetRichMenuImageParams { /// The ID of the rich menu to attach the image to pub rich_menu_id: String, - pub body: Option + pub body: Option, } - /// struct for typed errors of method [`get_message_content`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -102,22 +100,29 @@ pub enum SetRichMenuImageError { UnknownValue(serde_json::Value), } - /// Download image, video, and audio data sent from users. -pub async fn get_message_content(configuration: &configuration::Configuration, params: GetMessageContentParams) -> Result> { +pub async fn get_message_content( + configuration: &configuration::Configuration, + params: GetMessageContentParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let message_id = params.message_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/{messageId}/content", local_var_configuration.base_path, messageId=crate::messaging_api::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/{messageId}/content", + local_var_configuration.base_path, + messageId = crate::messaging_api::apis::urlencode(message_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -132,27 +137,40 @@ pub async fn get_message_content(configuration: &configuration::Configuration, p if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Get a preview image of the image or video -pub async fn get_message_content_preview(configuration: &configuration::Configuration, params: GetMessageContentPreviewParams) -> Result> { +pub async fn get_message_content_preview( + configuration: &configuration::Configuration, + params: GetMessageContentPreviewParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let message_id = params.message_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/{messageId}/content/preview", local_var_configuration.base_path, messageId=crate::messaging_api::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/{messageId}/content/preview", + local_var_configuration.base_path, + messageId = crate::messaging_api::apis::urlencode(message_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -167,27 +185,43 @@ pub async fn get_message_content_preview(configuration: &configuration::Configur if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Verify the preparation status of a video or audio for getting -pub async fn get_message_content_transcoding_by_message_id(configuration: &configuration::Configuration, params: GetMessageContentTranscodingByMessageIdParams) -> Result> { +pub async fn get_message_content_transcoding_by_message_id( + configuration: &configuration::Configuration, + params: GetMessageContentTranscodingByMessageIdParams, +) -> Result< + crate::messaging_api::models::GetMessageContentTranscodingResponse, + Error, +> { let local_var_configuration = configuration; // unbox the parameters let message_id = params.message_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/message/{messageId}/content/transcoding", local_var_configuration.base_path, messageId=crate::messaging_api::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/message/{messageId}/content/transcoding", + local_var_configuration.base_path, + messageId = crate::messaging_api::apis::urlencode(message_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -202,27 +236,40 @@ pub async fn get_message_content_transcoding_by_message_id(configuration: &confi if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Download rich menu image. -pub async fn get_rich_menu_image(configuration: &configuration::Configuration, params: GetRichMenuImageParams) -> Result> { +pub async fn get_rich_menu_image( + configuration: &configuration::Configuration, + params: GetRichMenuImageParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_id = params.rich_menu_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/{richMenuId}/content", local_var_configuration.base_path, richMenuId=crate::messaging_api::apis::urlencode(rich_menu_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/{richMenuId}/content", + local_var_configuration.base_path, + richMenuId = crate::messaging_api::apis::urlencode(rich_menu_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -237,28 +284,41 @@ pub async fn get_rich_menu_image(configuration: &configuration::Configuration, p if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Upload rich menu image -pub async fn set_rich_menu_image(configuration: &configuration::Configuration, params: SetRichMenuImageParams) -> Result<(), Error> { +pub async fn set_rich_menu_image( + configuration: &configuration::Configuration, + params: SetRichMenuImageParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let rich_menu_id = params.rich_menu_id; let body = params.body; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/richmenu/{richMenuId}/content", local_var_configuration.base_path, richMenuId=crate::messaging_api::apis::urlencode(rich_menu_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/richmenu/{richMenuId}/content", + local_var_configuration.base_path, + richMenuId = crate::messaging_api::apis::urlencode(rich_menu_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -274,9 +334,13 @@ pub async fn set_rich_menu_image(configuration: &configuration::Configuration, p if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/messaging_api/apis/mod.rs b/openapi/src/messaging_api/apis/mod.rs index c8b4e347..324c1a84 100644 --- a/openapi/src/messaging_api/apis/mod.rs +++ b/openapi/src/messaging_api/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/messaging_api/models/action.rs b/openapi/src/messaging_api/models/action.rs index c3aa5245..6626d954 100644 --- a/openapi/src/messaging_api/models/action.rs +++ b/openapi/src/messaging_api/models/action.rs @@ -20,18 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// Action : Action - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum Action { -} - - - - +pub enum Action {} diff --git a/openapi/src/messaging_api/models/age_demographic.rs b/openapi/src/messaging_api/models/age_demographic.rs index e2ed9ff5..d8e2c25f 100644 --- a/openapi/src/messaging_api/models/age_demographic.rs +++ b/openapi/src/messaging_api/models/age_demographic.rs @@ -20,12 +20,11 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AgeDemographic { #[serde(rename = "age_15")] @@ -44,7 +43,6 @@ pub enum AgeDemographic { Variant45, #[serde(rename = "age_50")] Variant50, - } impl ToString for AgeDemographic { @@ -67,7 +65,3 @@ impl Default for AgeDemographic { Self::Variant15 } } - - - - diff --git a/openapi/src/messaging_api/models/age_demographic_filter.rs b/openapi/src/messaging_api/models/age_demographic_filter.rs index 9dc3d21c..79a0271e 100644 --- a/openapi/src/messaging_api/models/age_demographic_filter.rs +++ b/openapi/src/messaging_api/models/age_demographic_filter.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AgeDemographicFilter { /// Type of demographic filter @@ -47,5 +44,3 @@ impl AgeDemographicFilter { } } } - - diff --git a/openapi/src/messaging_api/models/alt_uri.rs b/openapi/src/messaging_api/models/alt_uri.rs index ca78e718..6883b5ca 100644 --- a/openapi/src/messaging_api/models/alt_uri.rs +++ b/openapi/src/messaging_api/models/alt_uri.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AltUri { #[serde(rename = "desktop", skip_serializing_if = "Option::is_none")] @@ -35,10 +32,6 @@ pub struct AltUri { impl AltUri { pub fn new() -> AltUri { - AltUri { - desktop: None, - } + AltUri { desktop: None } } } - - diff --git a/openapi/src/messaging_api/models/app_type_demographic.rs b/openapi/src/messaging_api/models/app_type_demographic.rs index cc3aad46..bd825fcc 100644 --- a/openapi/src/messaging_api/models/app_type_demographic.rs +++ b/openapi/src/messaging_api/models/app_type_demographic.rs @@ -20,19 +20,17 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AppTypeDemographic { #[serde(rename = "ios")] Ios, #[serde(rename = "android")] Android, - } impl ToString for AppTypeDemographic { @@ -49,7 +47,3 @@ impl Default for AppTypeDemographic { Self::Ios } } - - - - diff --git a/openapi/src/messaging_api/models/app_type_demographic_filter.rs b/openapi/src/messaging_api/models/app_type_demographic_filter.rs index ae59c6d0..cdc0bf96 100644 --- a/openapi/src/messaging_api/models/app_type_demographic_filter.rs +++ b/openapi/src/messaging_api/models/app_type_demographic_filter.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AppTypeDemographicFilter { /// Type of demographic filter @@ -44,5 +41,3 @@ impl AppTypeDemographicFilter { } } } - - diff --git a/openapi/src/messaging_api/models/area_demographic.rs b/openapi/src/messaging_api/models/area_demographic.rs index a23f99a3..754d3cc2 100644 --- a/openapi/src/messaging_api/models/area_demographic.rs +++ b/openapi/src/messaging_api/models/area_demographic.rs @@ -20,12 +20,11 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] #[allow(non_camel_case_types)] pub enum AreaDemographic { @@ -207,7 +206,6 @@ pub enum AreaDemographic { YOGYAKARTA, #[serde(rename = "id_12")] LAINNYA, - } impl ToString for AreaDemographic { @@ -311,7 +309,3 @@ impl Default for AreaDemographic { Self::HOKKAIDO } } - - - - diff --git a/openapi/src/messaging_api/models/area_demographic_filter.rs b/openapi/src/messaging_api/models/area_demographic_filter.rs index 6e772fc0..d7cc2f0a 100644 --- a/openapi/src/messaging_api/models/area_demographic_filter.rs +++ b/openapi/src/messaging_api/models/area_demographic_filter.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AreaDemographicFilter { /// Type of demographic filter @@ -44,5 +41,3 @@ impl AreaDemographicFilter { } } } - - diff --git a/openapi/src/messaging_api/models/audience_match_messages_request.rs b/openapi/src/messaging_api/models/audience_match_messages_request.rs index dbb9ca47..8b8802e0 100644 --- a/openapi/src/messaging_api/models/audience_match_messages_request.rs +++ b/openapi/src/messaging_api/models/audience_match_messages_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AudienceMatchMessagesRequest { /// Destination of the message (A value obtained by hashing the telephone number, which is another value normalized to E.164 format, with SHA256). @@ -35,13 +32,19 @@ pub struct AudienceMatchMessagesRequest { /// Message to send. #[serde(rename = "to")] pub to: Vec, - /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. - #[serde(rename = "notificationDisabled", skip_serializing_if = "Option::is_none")] + /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. + #[serde( + rename = "notificationDisabled", + skip_serializing_if = "Option::is_none" + )] pub notification_disabled: Option, } impl AudienceMatchMessagesRequest { - pub fn new(messages: Vec, to: Vec) -> AudienceMatchMessagesRequest { + pub fn new( + messages: Vec, + to: Vec, + ) -> AudienceMatchMessagesRequest { AudienceMatchMessagesRequest { messages, to, @@ -49,5 +52,3 @@ impl AudienceMatchMessagesRequest { } } } - - diff --git a/openapi/src/messaging_api/models/audience_recipient.rs b/openapi/src/messaging_api/models/audience_recipient.rs index 3758b4d5..b45f1005 100644 --- a/openapi/src/messaging_api/models/audience_recipient.rs +++ b/openapi/src/messaging_api/models/audience_recipient.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AudienceRecipient { /// Type of recipient @@ -44,5 +41,3 @@ impl AudienceRecipient { } } } - - diff --git a/openapi/src/messaging_api/models/audio_message.rs b/openapi/src/messaging_api/models/audio_message.rs index 90062008..265f3d12 100644 --- a/openapi/src/messaging_api/models/audio_message.rs +++ b/openapi/src/messaging_api/models/audio_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AudioMessage { /// Type of message @@ -53,5 +50,3 @@ impl AudioMessage { } } } - - diff --git a/openapi/src/messaging_api/models/bot_info_response.rs b/openapi/src/messaging_api/models/bot_info_response.rs index 3c498e29..67cc2752 100644 --- a/openapi/src/messaging_api/models/bot_info_response.rs +++ b/openapi/src/messaging_api/models/bot_info_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BotInfoResponse { /// Bot's user ID @@ -44,7 +41,7 @@ pub struct BotInfoResponse { /// Profile image URL. `https` image URL. Not included in the response if the bot doesn't have a profile image. #[serde(rename = "pictureUrl", skip_serializing_if = "Option::is_none")] pub picture_url: Option, - /// Chat settings set in the LINE Official Account Manager. One of: `chat`: Chat is set to \"On\". `bot`: Chat is set to \"Off\". + /// Chat settings set in the LINE Official Account Manager. One of: `chat`: Chat is set to \"On\". `bot`: Chat is set to \"Off\". #[serde(rename = "chatMode")] pub chat_mode: ChatModeMessagingApi, /// Automatic read setting for messages. If the chat is set to \"Off\", auto is returned. If the chat is set to \"On\", manual is returned. `auto`: Auto read setting is enabled. `manual`: Auto read setting is disabled. @@ -53,7 +50,13 @@ pub struct BotInfoResponse { } impl BotInfoResponse { - pub fn new(user_id: String, basic_id: String, display_name: String, chat_mode: ChatModeMessagingApi, mark_as_read_mode: MarkAsReadModeMessagingApi) -> BotInfoResponse { + pub fn new( + user_id: String, + basic_id: String, + display_name: String, + chat_mode: ChatModeMessagingApi, + mark_as_read_mode: MarkAsReadModeMessagingApi, + ) -> BotInfoResponse { BotInfoResponse { user_id, basic_id, @@ -66,7 +69,7 @@ impl BotInfoResponse { } } -/// Chat settings set in the LINE Official Account Manager. One of: `chat`: Chat is set to \"On\". `bot`: Chat is set to \"Off\". +/// Chat settings set in the LINE Official Account Manager. One of: `chat`: Chat is set to \"On\". `bot`: Chat is set to \"Off\". #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ChatModeMessagingApi { #[serde(rename = "chat")] @@ -94,4 +97,3 @@ impl Default for MarkAsReadModeMessagingApi { Self::Auto } } - diff --git a/openapi/src/messaging_api/models/broadcast_request.rs b/openapi/src/messaging_api/models/broadcast_request.rs index 41480e3f..78f64236 100644 --- a/openapi/src/messaging_api/models/broadcast_request.rs +++ b/openapi/src/messaging_api/models/broadcast_request.rs @@ -20,20 +20,20 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BroadcastRequest { /// List of Message objects. #[serde(rename = "messages")] pub messages: Vec, - /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. - #[serde(rename = "notificationDisabled", skip_serializing_if = "Option::is_none")] + /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. + #[serde( + rename = "notificationDisabled", + skip_serializing_if = "Option::is_none" + )] pub notification_disabled: Option, } @@ -45,5 +45,3 @@ impl BroadcastRequest { } } } - - diff --git a/openapi/src/messaging_api/models/buttons_template.rs b/openapi/src/messaging_api/models/buttons_template.rs index 4e718304..c6aa446a 100644 --- a/openapi/src/messaging_api/models/buttons_template.rs +++ b/openapi/src/messaging_api/models/buttons_template.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ButtonsTemplate { #[serde(rename = "type")] @@ -37,7 +34,10 @@ pub struct ButtonsTemplate { pub image_aspect_ratio: Option, #[serde(rename = "imageSize", skip_serializing_if = "Option::is_none")] pub image_size: Option, - #[serde(rename = "imageBackgroundColor", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "imageBackgroundColor", + skip_serializing_if = "Option::is_none" + )] pub image_background_color: Option, #[serde(rename = "title", skip_serializing_if = "Option::is_none")] pub title: Option, @@ -50,7 +50,11 @@ pub struct ButtonsTemplate { } impl ButtonsTemplate { - pub fn new(r#type: String, text: String, actions: Vec) -> ButtonsTemplate { + pub fn new( + r#type: String, + text: String, + actions: Vec, + ) -> ButtonsTemplate { ButtonsTemplate { r#type, thumbnail_image_url: None, @@ -64,5 +68,3 @@ impl ButtonsTemplate { } } } - - diff --git a/openapi/src/messaging_api/models/camera_action.rs b/openapi/src/messaging_api/models/camera_action.rs index b491ab46..f428268a 100644 --- a/openapi/src/messaging_api/models/camera_action.rs +++ b/openapi/src/messaging_api/models/camera_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CameraAction { /// Type of action @@ -45,5 +42,3 @@ impl CameraAction { } } } - - diff --git a/openapi/src/messaging_api/models/camera_roll_action.rs b/openapi/src/messaging_api/models/camera_roll_action.rs index 7ccd6793..36424cab 100644 --- a/openapi/src/messaging_api/models/camera_roll_action.rs +++ b/openapi/src/messaging_api/models/camera_roll_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CameraRollAction { /// Type of action @@ -45,5 +42,3 @@ impl CameraRollAction { } } } - - diff --git a/openapi/src/messaging_api/models/carousel_column.rs b/openapi/src/messaging_api/models/carousel_column.rs index 204c5b63..305030c5 100644 --- a/openapi/src/messaging_api/models/carousel_column.rs +++ b/openapi/src/messaging_api/models/carousel_column.rs @@ -20,19 +20,20 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// CarouselColumn : Column object for carousel template. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CarouselColumn { #[serde(rename = "thumbnailImageUrl", skip_serializing_if = "Option::is_none")] pub thumbnail_image_url: Option, - #[serde(rename = "imageBackgroundColor", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "imageBackgroundColor", + skip_serializing_if = "Option::is_none" + )] pub image_background_color: Option, #[serde(rename = "title", skip_serializing_if = "Option::is_none")] pub title: Option, @@ -57,5 +58,3 @@ impl CarouselColumn { } } } - - diff --git a/openapi/src/messaging_api/models/carousel_template.rs b/openapi/src/messaging_api/models/carousel_template.rs index 5f61fe48..0d8a266f 100644 --- a/openapi/src/messaging_api/models/carousel_template.rs +++ b/openapi/src/messaging_api/models/carousel_template.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CarouselTemplate { #[serde(rename = "type")] @@ -40,7 +37,10 @@ pub struct CarouselTemplate { } impl CarouselTemplate { - pub fn new(r#type: String, columns: Vec) -> CarouselTemplate { + pub fn new( + r#type: String, + columns: Vec, + ) -> CarouselTemplate { CarouselTemplate { r#type, columns, @@ -49,5 +49,3 @@ impl CarouselTemplate { } } } - - diff --git a/openapi/src/messaging_api/models/chat_reference.rs b/openapi/src/messaging_api/models/chat_reference.rs index 2ca9962a..c3a636d4 100644 --- a/openapi/src/messaging_api/models/chat_reference.rs +++ b/openapi/src/messaging_api/models/chat_reference.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// ChatReference : Chat reference - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ChatReference { /// The target user ID @@ -38,10 +36,6 @@ pub struct ChatReference { impl ChatReference { /// Chat reference pub fn new(user_id: String) -> ChatReference { - ChatReference { - user_id, - } + ChatReference { user_id } } } - - diff --git a/openapi/src/messaging_api/models/confirm_template.rs b/openapi/src/messaging_api/models/confirm_template.rs index 1902dd61..351153c3 100644 --- a/openapi/src/messaging_api/models/confirm_template.rs +++ b/openapi/src/messaging_api/models/confirm_template.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ConfirmTemplate { #[serde(rename = "type")] @@ -38,7 +35,11 @@ pub struct ConfirmTemplate { } impl ConfirmTemplate { - pub fn new(r#type: String, text: String, actions: Vec) -> ConfirmTemplate { + pub fn new( + r#type: String, + text: String, + actions: Vec, + ) -> ConfirmTemplate { ConfirmTemplate { r#type, text, @@ -46,5 +47,3 @@ impl ConfirmTemplate { } } } - - diff --git a/openapi/src/messaging_api/models/create_rich_menu_alias_request.rs b/openapi/src/messaging_api/models/create_rich_menu_alias_request.rs index d3fad85b..8a7d765e 100644 --- a/openapi/src/messaging_api/models/create_rich_menu_alias_request.rs +++ b/openapi/src/messaging_api/models/create_rich_menu_alias_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateRichMenuAliasRequest { /// Rich menu alias ID, which can be any ID, unique for each channel. @@ -45,5 +42,3 @@ impl CreateRichMenuAliasRequest { } } } - - diff --git a/openapi/src/messaging_api/models/datetime_picker_action.rs b/openapi/src/messaging_api/models/datetime_picker_action.rs index b970c0d0..b5d6f09b 100644 --- a/openapi/src/messaging_api/models/datetime_picker_action.rs +++ b/openapi/src/messaging_api/models/datetime_picker_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DatetimePickerAction { /// Type of action @@ -61,7 +58,7 @@ impl DatetimePickerAction { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum ModeMessagingApi { #[serde(rename = "date")] @@ -77,4 +74,3 @@ impl Default for ModeMessagingApi { Self::Date } } - diff --git a/openapi/src/messaging_api/models/demographic_filter.rs b/openapi/src/messaging_api/models/demographic_filter.rs index fe0afb13..6b315a23 100644 --- a/openapi/src/messaging_api/models/demographic_filter.rs +++ b/openapi/src/messaging_api/models/demographic_filter.rs @@ -20,18 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// DemographicFilter : Demographic filter - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum DemographicFilter { -} - - - - +pub enum DemographicFilter {} diff --git a/openapi/src/messaging_api/models/emoji.rs b/openapi/src/messaging_api/models/emoji.rs index fb359f7c..bba2dd7f 100644 --- a/openapi/src/messaging_api/models/emoji.rs +++ b/openapi/src/messaging_api/models/emoji.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Emoji { #[serde(rename = "index", skip_serializing_if = "Option::is_none")] @@ -46,5 +43,3 @@ impl Emoji { } } } - - diff --git a/openapi/src/messaging_api/models/error_detail.rs b/openapi/src/messaging_api/models/error_detail.rs index 7a690194..0cc22c63 100644 --- a/openapi/src/messaging_api/models/error_detail.rs +++ b/openapi/src/messaging_api/models/error_detail.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorDetail { /// Details of the error. Not included in the response under certain situations. @@ -45,5 +42,3 @@ impl ErrorDetail { } } } - - diff --git a/openapi/src/messaging_api/models/error_response.rs b/openapi/src/messaging_api/models/error_response.rs index 91a62424..e56e2a0f 100644 --- a/openapi/src/messaging_api/models/error_response.rs +++ b/openapi/src/messaging_api/models/error_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorResponse { /// Message containing information about the error. @@ -49,5 +46,3 @@ impl ErrorResponse { } } } - - diff --git a/openapi/src/messaging_api/models/filter.rs b/openapi/src/messaging_api/models/filter.rs index f4785726..1c31140d 100644 --- a/openapi/src/messaging_api/models/filter.rs +++ b/openapi/src/messaging_api/models/filter.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// Filter : Filter for narrowcast - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Filter { #[serde(rename = "demographic", skip_serializing_if = "Option::is_none")] @@ -37,10 +35,6 @@ pub struct Filter { impl Filter { /// Filter for narrowcast pub fn new() -> Filter { - Filter { - demographic: None, - } + Filter { demographic: None } } } - - diff --git a/openapi/src/messaging_api/models/flex_block_style.rs b/openapi/src/messaging_api/models/flex_block_style.rs index 67b91741..0bf6636e 100644 --- a/openapi/src/messaging_api/models/flex_block_style.rs +++ b/openapi/src/messaging_api/models/flex_block_style.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexBlockStyle { #[serde(rename = "backgroundColor", skip_serializing_if = "Option::is_none")] @@ -46,5 +43,3 @@ impl FlexBlockStyle { } } } - - diff --git a/openapi/src/messaging_api/models/flex_box.rs b/openapi/src/messaging_api/models/flex_box.rs index 14291685..5b8b4c01 100644 --- a/openapi/src/messaging_api/models/flex_box.rs +++ b/openapi/src/messaging_api/models/flex_box.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexBox { #[serde(rename = "type")] @@ -88,7 +85,11 @@ pub struct FlexBox { } impl FlexBox { - pub fn new(r#type: String, layout: LayoutMessagingApi, contents: Vec) -> FlexBox { + pub fn new( + r#type: String, + layout: LayoutMessagingApi, + contents: Vec, + ) -> FlexBox { FlexBox { r#type, layout, @@ -122,7 +123,7 @@ impl FlexBox { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum LayoutMessagingApi { #[serde(rename = "horizontal")] @@ -138,7 +139,7 @@ impl Default for LayoutMessagingApi { Self::Horizontal } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PositionMessagingApi { #[serde(rename = "relative")] @@ -152,7 +153,7 @@ impl Default for PositionMessagingApi { Self::Relative } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum JustifyContentMessagingApi { #[serde(rename = "center")] @@ -174,7 +175,7 @@ impl Default for JustifyContentMessagingApi { Self::Center } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AlignItemsMessagingApi { #[serde(rename = "center")] @@ -190,4 +191,3 @@ impl Default for AlignItemsMessagingApi { Self::Center } } - diff --git a/openapi/src/messaging_api/models/flex_box_background.rs b/openapi/src/messaging_api/models/flex_box_background.rs index e8af59f7..14912f34 100644 --- a/openapi/src/messaging_api/models/flex_box_background.rs +++ b/openapi/src/messaging_api/models/flex_box_background.rs @@ -20,17 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum FlexBoxBackground { -} - - - - +pub enum FlexBoxBackground {} diff --git a/openapi/src/messaging_api/models/flex_box_linear_gradient.rs b/openapi/src/messaging_api/models/flex_box_linear_gradient.rs index dfc8e2bd..672625fd 100644 --- a/openapi/src/messaging_api/models/flex_box_linear_gradient.rs +++ b/openapi/src/messaging_api/models/flex_box_linear_gradient.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexBoxLinearGradient { #[serde(rename = "type")] @@ -55,5 +52,3 @@ impl FlexBoxLinearGradient { } } } - - diff --git a/openapi/src/messaging_api/models/flex_bubble.rs b/openapi/src/messaging_api/models/flex_bubble.rs index 40a69aeb..1020b3c8 100644 --- a/openapi/src/messaging_api/models/flex_bubble.rs +++ b/openapi/src/messaging_api/models/flex_bubble.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexBubble { #[serde(rename = "type")] @@ -65,7 +62,7 @@ impl FlexBubble { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum DirectionMessagingApi { #[serde(rename = "ltr")] @@ -79,7 +76,7 @@ impl Default for DirectionMessagingApi { Self::Ltr } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum SizeMessagingApi { #[serde(rename = "nano")] @@ -103,4 +100,3 @@ impl Default for SizeMessagingApi { Self::Nano } } - diff --git a/openapi/src/messaging_api/models/flex_bubble_styles.rs b/openapi/src/messaging_api/models/flex_bubble_styles.rs index 15b97ef2..43afd265 100644 --- a/openapi/src/messaging_api/models/flex_bubble_styles.rs +++ b/openapi/src/messaging_api/models/flex_bubble_styles.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexBubbleStyles { #[serde(rename = "header", skip_serializing_if = "Option::is_none")] @@ -49,5 +46,3 @@ impl FlexBubbleStyles { } } } - - diff --git a/openapi/src/messaging_api/models/flex_button.rs b/openapi/src/messaging_api/models/flex_button.rs index c6143416..9752b694 100644 --- a/openapi/src/messaging_api/models/flex_button.rs +++ b/openapi/src/messaging_api/models/flex_button.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexButton { #[serde(rename = "type")] @@ -83,7 +80,7 @@ impl FlexButton { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum StyleMessagingApi { #[serde(rename = "primary")] @@ -99,7 +96,7 @@ impl Default for StyleMessagingApi { Self::Primary } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GravityMessagingApi { #[serde(rename = "top")] @@ -115,7 +112,7 @@ impl Default for GravityMessagingApi { Self::Top } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PositionMessagingApi { #[serde(rename = "relative")] @@ -129,7 +126,7 @@ impl Default for PositionMessagingApi { Self::Relative } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum HeightMessagingApi { #[serde(rename = "md")] @@ -143,7 +140,7 @@ impl Default for HeightMessagingApi { Self::Md } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AdjustModeMessagingApi { #[serde(rename = "shrink-to-fit")] @@ -155,4 +152,3 @@ impl Default for AdjustModeMessagingApi { Self::ShrinkToFit } } - diff --git a/openapi/src/messaging_api/models/flex_carousel.rs b/openapi/src/messaging_api/models/flex_carousel.rs index 40cd6877..74dcf4d2 100644 --- a/openapi/src/messaging_api/models/flex_carousel.rs +++ b/openapi/src/messaging_api/models/flex_carousel.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexCarousel { #[serde(rename = "type")] @@ -36,12 +33,10 @@ pub struct FlexCarousel { } impl FlexCarousel { - pub fn new(r#type: String, contents: Vec) -> FlexCarousel { - FlexCarousel { - r#type, - contents, - } + pub fn new( + r#type: String, + contents: Vec, + ) -> FlexCarousel { + FlexCarousel { r#type, contents } } } - - diff --git a/openapi/src/messaging_api/models/flex_component.rs b/openapi/src/messaging_api/models/flex_component.rs index f25c1688..e5b5ad33 100644 --- a/openapi/src/messaging_api/models/flex_component.rs +++ b/openapi/src/messaging_api/models/flex_component.rs @@ -20,17 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum FlexComponent { -} - - - - +pub enum FlexComponent {} diff --git a/openapi/src/messaging_api/models/flex_container.rs b/openapi/src/messaging_api/models/flex_container.rs index 4298d395..2b95705b 100644 --- a/openapi/src/messaging_api/models/flex_container.rs +++ b/openapi/src/messaging_api/models/flex_container.rs @@ -20,17 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum FlexContainer { -} - - - - +pub enum FlexContainer {} diff --git a/openapi/src/messaging_api/models/flex_filler.rs b/openapi/src/messaging_api/models/flex_filler.rs index eceedcd1..64397a8f 100644 --- a/openapi/src/messaging_api/models/flex_filler.rs +++ b/openapi/src/messaging_api/models/flex_filler.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexFiller { #[serde(rename = "type")] @@ -37,11 +34,6 @@ pub struct FlexFiller { impl FlexFiller { pub fn new(r#type: String) -> FlexFiller { - FlexFiller { - r#type, - flex: None, - } + FlexFiller { r#type, flex: None } } } - - diff --git a/openapi/src/messaging_api/models/flex_icon.rs b/openapi/src/messaging_api/models/flex_icon.rs index cfb0d5f3..d7018f3b 100644 --- a/openapi/src/messaging_api/models/flex_icon.rs +++ b/openapi/src/messaging_api/models/flex_icon.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexIcon { #[serde(rename = "type")] @@ -71,7 +68,7 @@ impl FlexIcon { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PositionMessagingApi { #[serde(rename = "relative")] @@ -85,4 +82,3 @@ impl Default for PositionMessagingApi { Self::Relative } } - diff --git a/openapi/src/messaging_api/models/flex_image.rs b/openapi/src/messaging_api/models/flex_image.rs index b471cc56..72bed034 100644 --- a/openapi/src/messaging_api/models/flex_image.rs +++ b/openapi/src/messaging_api/models/flex_image.rs @@ -20,27 +20,24 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexImage { #[serde(rename = "type")] pub r#type: String, - /// Image URL (Max character limit: 2000) Protocol: HTTPS (TLS 1.2 or later) Image format: JPEG or PNG Maximum image size: 1024×1024 pixels Maximum file size: 10 MB (300 KB when the animated property is true) + /// Image URL (Max character limit: 2000) Protocol: HTTPS (TLS 1.2 or later) Image format: JPEG or PNG Maximum image size: 1024×1024 pixels Maximum file size: 10 MB (300 KB when the animated property is true) #[serde(rename = "url")] pub url: String, /// The ratio of the width or height of this component within the parent box. #[serde(rename = "flex", skip_serializing_if = "Option::is_none")] pub flex: Option, - /// The minimum amount of space to include before this component in its parent container. + /// The minimum amount of space to include before this component in its parent container. #[serde(rename = "margin", skip_serializing_if = "Option::is_none")] pub margin: Option, - /// Reference for offsetTop, offsetBottom, offsetStart, and offsetEnd. Specify one of the following values: `relative`: Use the previous box as reference. `absolute`: Use the top left of parent element as reference. The default value is relative. + /// Reference for offsetTop, offsetBottom, offsetStart, and offsetEnd. Specify one of the following values: `relative`: Use the previous box as reference. `absolute`: Use the top left of parent element as reference. The default value is relative. #[serde(rename = "position", skip_serializing_if = "Option::is_none")] pub position: Option, /// Offset. @@ -55,19 +52,19 @@ pub struct FlexImage { /// Offset. #[serde(rename = "offsetEnd", skip_serializing_if = "Option::is_none")] pub offset_end: Option, - /// Alignment style in horizontal direction. + /// Alignment style in horizontal direction. #[serde(rename = "align", skip_serializing_if = "Option::is_none")] pub align: Option, /// Alignment style in vertical direction. #[serde(rename = "gravity", skip_serializing_if = "Option::is_none")] pub gravity: Option, - /// The maximum image width. This is md by default. + /// The maximum image width. This is md by default. #[serde(rename = "size", skip_serializing_if = "Option::is_none")] pub size: Option, - /// Aspect ratio of the image. `{width}:{height}` format. Specify the value of `{width}` and `{height}` in the range from `1` to `100000`. However, you cannot set `{height}` to a value that is more than three times the value of `{width}`. The default value is `1:1`. + /// Aspect ratio of the image. `{width}:{height}` format. Specify the value of `{width}` and `{height}` in the range from `1` to `100000`. However, you cannot set `{height}` to a value that is more than three times the value of `{width}`. The default value is `1:1`. #[serde(rename = "aspectRatio", skip_serializing_if = "Option::is_none")] pub aspect_ratio: Option, - /// The display style of the image if the aspect ratio of the image and that specified by the aspectRatio property do not match. + /// The display style of the image if the aspect ratio of the image and that specified by the aspectRatio property do not match. #[serde(rename = "aspectMode", skip_serializing_if = "Option::is_none")] pub aspect_mode: Option, /// Background color of the image. Use a hexadecimal color code. @@ -75,7 +72,7 @@ pub struct FlexImage { pub background_color: Option, #[serde(rename = "action", skip_serializing_if = "Option::is_none")] pub action: Option>, - /// When this is `true`, an animated image (APNG) plays. You can specify a value of true up to 10 images in a single message. You can't send messages that exceed this limit. This is `false` by default. Animated images larger than 300 KB aren't played back. + /// When this is `true`, an animated image (APNG) plays. You can specify a value of true up to 10 images in a single message. You can't send messages that exceed this limit. This is `false` by default. Animated images larger than 300 KB aren't played back. #[serde(rename = "animated", skip_serializing_if = "Option::is_none")] pub animated: Option, } @@ -104,7 +101,7 @@ impl FlexImage { } } -/// Reference for offsetTop, offsetBottom, offsetStart, and offsetEnd. Specify one of the following values: `relative`: Use the previous box as reference. `absolute`: Use the top left of parent element as reference. The default value is relative. +/// Reference for offsetTop, offsetBottom, offsetStart, and offsetEnd. Specify one of the following values: `relative`: Use the previous box as reference. `absolute`: Use the top left of parent element as reference. The default value is relative. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PositionMessagingApi { #[serde(rename = "relative")] @@ -118,7 +115,7 @@ impl Default for PositionMessagingApi { Self::Relative } } -/// Alignment style in horizontal direction. +/// Alignment style in horizontal direction. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AlignMessagingApi { #[serde(rename = "start")] @@ -150,7 +147,7 @@ impl Default for GravityMessagingApi { Self::Top } } -/// The display style of the image if the aspect ratio of the image and that specified by the aspectRatio property do not match. +/// The display style of the image if the aspect ratio of the image and that specified by the aspectRatio property do not match. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AspectModeMessagingApi { #[serde(rename = "fit")] @@ -164,4 +161,3 @@ impl Default for AspectModeMessagingApi { Self::Fit } } - diff --git a/openapi/src/messaging_api/models/flex_message.rs b/openapi/src/messaging_api/models/flex_message.rs index 29485dcf..e1a46ca1 100644 --- a/openapi/src/messaging_api/models/flex_message.rs +++ b/openapi/src/messaging_api/models/flex_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexMessage { /// Type of message @@ -43,7 +40,11 @@ pub struct FlexMessage { } impl FlexMessage { - pub fn new(r#type: String, alt_text: String, contents: crate::messaging_api::models::FlexContainer) -> FlexMessage { + pub fn new( + r#type: String, + alt_text: String, + contents: crate::messaging_api::models::FlexContainer, + ) -> FlexMessage { FlexMessage { r#type, quick_reply: None, @@ -53,5 +54,3 @@ impl FlexMessage { } } } - - diff --git a/openapi/src/messaging_api/models/flex_separator.rs b/openapi/src/messaging_api/models/flex_separator.rs index b0b64a27..3d303ab2 100644 --- a/openapi/src/messaging_api/models/flex_separator.rs +++ b/openapi/src/messaging_api/models/flex_separator.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexSeparator { #[serde(rename = "type")] @@ -46,5 +43,3 @@ impl FlexSeparator { } } } - - diff --git a/openapi/src/messaging_api/models/flex_span.rs b/openapi/src/messaging_api/models/flex_span.rs index aeef951e..c839d9c8 100644 --- a/openapi/src/messaging_api/models/flex_span.rs +++ b/openapi/src/messaging_api/models/flex_span.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexSpan { #[serde(rename = "type")] @@ -59,7 +56,7 @@ impl FlexSpan { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum WeightMessagingApi { #[serde(rename = "regular")] @@ -73,7 +70,7 @@ impl Default for WeightMessagingApi { Self::Regular } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum StyleMessagingApi { #[serde(rename = "normal")] @@ -87,7 +84,7 @@ impl Default for StyleMessagingApi { Self::Normal } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum DecorationMessagingApi { #[serde(rename = "none")] @@ -103,4 +100,3 @@ impl Default for DecorationMessagingApi { Self::None } } - diff --git a/openapi/src/messaging_api/models/flex_text.rs b/openapi/src/messaging_api/models/flex_text.rs index f0fb6f28..55c5bf29 100644 --- a/openapi/src/messaging_api/models/flex_text.rs +++ b/openapi/src/messaging_api/models/flex_text.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexText { #[serde(rename = "type")] @@ -107,7 +104,7 @@ impl FlexText { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AlignMessagingApi { #[serde(rename = "start")] @@ -123,7 +120,7 @@ impl Default for AlignMessagingApi { Self::Start } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GravityMessagingApi { #[serde(rename = "top")] @@ -139,7 +136,7 @@ impl Default for GravityMessagingApi { Self::Top } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum WeightMessagingApi { #[serde(rename = "regular")] @@ -153,7 +150,7 @@ impl Default for WeightMessagingApi { Self::Regular } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum StyleMessagingApi { #[serde(rename = "normal")] @@ -167,7 +164,7 @@ impl Default for StyleMessagingApi { Self::Normal } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum DecorationMessagingApi { #[serde(rename = "none")] @@ -183,7 +180,7 @@ impl Default for DecorationMessagingApi { Self::None } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PositionMessagingApi { #[serde(rename = "relative")] @@ -197,7 +194,7 @@ impl Default for PositionMessagingApi { Self::Relative } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum AdjustModeMessagingApi { #[serde(rename = "shrink-to-fit")] @@ -209,4 +206,3 @@ impl Default for AdjustModeMessagingApi { Self::ShrinkToFit } } - diff --git a/openapi/src/messaging_api/models/flex_video.rs b/openapi/src/messaging_api/models/flex_video.rs index de635ecd..38926891 100644 --- a/openapi/src/messaging_api/models/flex_video.rs +++ b/openapi/src/messaging_api/models/flex_video.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FlexVideo { #[serde(rename = "type")] @@ -44,7 +41,12 @@ pub struct FlexVideo { } impl FlexVideo { - pub fn new(r#type: String, url: String, preview_url: String, alt_content: crate::messaging_api::models::FlexComponent) -> FlexVideo { + pub fn new( + r#type: String, + url: String, + preview_url: String, + alt_content: crate::messaging_api::models::FlexComponent, + ) -> FlexVideo { FlexVideo { r#type, url, @@ -55,5 +57,3 @@ impl FlexVideo { } } } - - diff --git a/openapi/src/messaging_api/models/gender_demographic.rs b/openapi/src/messaging_api/models/gender_demographic.rs index 6fc28f15..28352221 100644 --- a/openapi/src/messaging_api/models/gender_demographic.rs +++ b/openapi/src/messaging_api/models/gender_demographic.rs @@ -20,19 +20,17 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum GenderDemographic { #[serde(rename = "male")] Male, #[serde(rename = "female")] Female, - } impl ToString for GenderDemographic { @@ -49,7 +47,3 @@ impl Default for GenderDemographic { Self::Male } } - - - - diff --git a/openapi/src/messaging_api/models/gender_demographic_filter.rs b/openapi/src/messaging_api/models/gender_demographic_filter.rs index d5db8d42..698160df 100644 --- a/openapi/src/messaging_api/models/gender_demographic_filter.rs +++ b/openapi/src/messaging_api/models/gender_demographic_filter.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GenderDemographicFilter { /// Type of demographic filter @@ -44,5 +41,3 @@ impl GenderDemographicFilter { } } } - - diff --git a/openapi/src/messaging_api/models/get_aggregation_unit_name_list_response.rs b/openapi/src/messaging_api/models/get_aggregation_unit_name_list_response.rs index 2bf8a3ff..6c7eedfd 100644 --- a/openapi/src/messaging_api/models/get_aggregation_unit_name_list_response.rs +++ b/openapi/src/messaging_api/models/get_aggregation_unit_name_list_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAggregationUnitNameListResponse { /// An array of strings indicating the names of aggregation units used this month. @@ -45,5 +42,3 @@ impl GetAggregationUnitNameListResponse { } } } - - diff --git a/openapi/src/messaging_api/models/get_aggregation_unit_usage_response.rs b/openapi/src/messaging_api/models/get_aggregation_unit_usage_response.rs index 417f6a39..02297cc7 100644 --- a/openapi/src/messaging_api/models/get_aggregation_unit_usage_response.rs +++ b/openapi/src/messaging_api/models/get_aggregation_unit_usage_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetAggregationUnitUsageResponse { /// Number of aggregation units used this month. @@ -41,5 +38,3 @@ impl GetAggregationUnitUsageResponse { } } } - - diff --git a/openapi/src/messaging_api/models/get_followers_response.rs b/openapi/src/messaging_api/models/get_followers_response.rs index 5995ff0a..22563831 100644 --- a/openapi/src/messaging_api/models/get_followers_response.rs +++ b/openapi/src/messaging_api/models/get_followers_response.rs @@ -20,16 +20,13 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetFollowersResponse { - /// An array of strings indicating user IDs of users that have added the LINE Official Account as a friend. Only users of LINE for iOS and LINE for Android are included in `userIds`. + /// An array of strings indicating user IDs of users that have added the LINE Official Account as a friend. Only users of LINE for iOS and LINE for Android are included in `userIds`. #[serde(rename = "userIds")] pub user_ids: Vec, /// A continuation token to get the next array of user IDs. Returned only when there are remaining user IDs that weren't returned in `userIds` in the original request. The number of user IDs in the `userIds` element doesn't have to reach the maximum number specified by `limit` for the `next` property to be included in the response. @@ -45,5 +42,3 @@ impl GetFollowersResponse { } } } - - diff --git a/openapi/src/messaging_api/models/get_message_content_transcoding_response.rs b/openapi/src/messaging_api/models/get_message_content_transcoding_response.rs index 1cd7279e..676cec8d 100644 --- a/openapi/src/messaging_api/models/get_message_content_transcoding_response.rs +++ b/openapi/src/messaging_api/models/get_message_content_transcoding_response.rs @@ -20,17 +20,15 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetMessageContentTranscodingResponse : Transcoding response - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetMessageContentTranscodingResponse { - /// The preparation status. One of: `processing`: Preparing to get content. `succeeded`: Ready to get the content. You can get the content sent by users. `failed`: Failed to prepare to get the content. + /// The preparation status. One of: `processing`: Preparing to get content. `succeeded`: Ready to get the content. You can get the content sent by users. `failed`: Failed to prepare to get the content. #[serde(rename = "status")] pub status: StatusMessagingApi, } @@ -38,13 +36,11 @@ pub struct GetMessageContentTranscodingResponse { impl GetMessageContentTranscodingResponse { /// Transcoding response pub fn new(status: StatusMessagingApi) -> GetMessageContentTranscodingResponse { - GetMessageContentTranscodingResponse { - status, - } + GetMessageContentTranscodingResponse { status } } } -/// The preparation status. One of: `processing`: Preparing to get content. `succeeded`: Ready to get the content. You can get the content sent by users. `failed`: Failed to prepare to get the content. +/// The preparation status. One of: `processing`: Preparing to get content. `succeeded`: Ready to get the content. You can get the content sent by users. `failed`: Failed to prepare to get the content. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum StatusMessagingApi { #[serde(rename = "processing")] @@ -60,4 +56,3 @@ impl Default for StatusMessagingApi { Self::Processing } } - diff --git a/openapi/src/messaging_api/models/get_webhook_endpoint_response.rs b/openapi/src/messaging_api/models/get_webhook_endpoint_response.rs index 27bf63a7..545855e1 100644 --- a/openapi/src/messaging_api/models/get_webhook_endpoint_response.rs +++ b/openapi/src/messaging_api/models/get_webhook_endpoint_response.rs @@ -20,30 +20,22 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetWebhookEndpointResponse { /// Webhook URL #[serde(rename = "endpoint")] pub endpoint: String, - /// Webhook usage status. Send a webhook event from the LINE Platform to the webhook URL only if enabled. `true`: Webhook usage is enabled. `false`: Webhook usage is disabled. + /// Webhook usage status. Send a webhook event from the LINE Platform to the webhook URL only if enabled. `true`: Webhook usage is enabled. `false`: Webhook usage is disabled. #[serde(rename = "active")] pub active: bool, } impl GetWebhookEndpointResponse { pub fn new(endpoint: String, active: bool) -> GetWebhookEndpointResponse { - GetWebhookEndpointResponse { - endpoint, - active, - } + GetWebhookEndpointResponse { endpoint, active } } } - - diff --git a/openapi/src/messaging_api/models/group_member_count_response.rs b/openapi/src/messaging_api/models/group_member_count_response.rs index 7aaaf99e..98d0ff39 100644 --- a/openapi/src/messaging_api/models/group_member_count_response.rs +++ b/openapi/src/messaging_api/models/group_member_count_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GroupMemberCountResponse { /// The count of members in the group chat. The number returned excludes the LINE Official Account. @@ -36,10 +33,6 @@ pub struct GroupMemberCountResponse { impl GroupMemberCountResponse { pub fn new(count: i32) -> GroupMemberCountResponse { - GroupMemberCountResponse { - count, - } + GroupMemberCountResponse { count } } } - - diff --git a/openapi/src/messaging_api/models/group_summary_response.rs b/openapi/src/messaging_api/models/group_summary_response.rs index c8275b45..96a01ff2 100644 --- a/openapi/src/messaging_api/models/group_summary_response.rs +++ b/openapi/src/messaging_api/models/group_summary_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GroupSummaryResponse { /// Group ID @@ -49,5 +46,3 @@ impl GroupSummaryResponse { } } } - - diff --git a/openapi/src/messaging_api/models/group_user_profile_response.rs b/openapi/src/messaging_api/models/group_user_profile_response.rs index 1ccde8a0..0d7af208 100644 --- a/openapi/src/messaging_api/models/group_user_profile_response.rs +++ b/openapi/src/messaging_api/models/group_user_profile_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GroupUserProfileResponse { /// User's display name @@ -49,5 +46,3 @@ impl GroupUserProfileResponse { } } } - - diff --git a/openapi/src/messaging_api/models/image_carousel_column.rs b/openapi/src/messaging_api/models/image_carousel_column.rs index 972cebdf..65a00d97 100644 --- a/openapi/src/messaging_api/models/image_carousel_column.rs +++ b/openapi/src/messaging_api/models/image_carousel_column.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImageCarouselColumn { #[serde(rename = "imageUrl")] @@ -36,12 +33,13 @@ pub struct ImageCarouselColumn { } impl ImageCarouselColumn { - pub fn new(image_url: String, action: crate::messaging_api::models::Action) -> ImageCarouselColumn { + pub fn new( + image_url: String, + action: crate::messaging_api::models::Action, + ) -> ImageCarouselColumn { ImageCarouselColumn { image_url, action: Box::new(action), } } } - - diff --git a/openapi/src/messaging_api/models/image_carousel_template.rs b/openapi/src/messaging_api/models/image_carousel_template.rs index b6cd7641..27c389be 100644 --- a/openapi/src/messaging_api/models/image_carousel_template.rs +++ b/openapi/src/messaging_api/models/image_carousel_template.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImageCarouselTemplate { #[serde(rename = "type")] @@ -36,12 +33,10 @@ pub struct ImageCarouselTemplate { } impl ImageCarouselTemplate { - pub fn new(r#type: String, columns: Vec) -> ImageCarouselTemplate { - ImageCarouselTemplate { - r#type, - columns, - } + pub fn new( + r#type: String, + columns: Vec, + ) -> ImageCarouselTemplate { + ImageCarouselTemplate { r#type, columns } } } - - diff --git a/openapi/src/messaging_api/models/image_message.rs b/openapi/src/messaging_api/models/image_message.rs index d2b391a4..92d900ae 100644 --- a/openapi/src/messaging_api/models/image_message.rs +++ b/openapi/src/messaging_api/models/image_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImageMessage { /// Type of message @@ -43,7 +40,11 @@ pub struct ImageMessage { } impl ImageMessage { - pub fn new(r#type: String, original_content_url: String, preview_image_url: String) -> ImageMessage { + pub fn new( + r#type: String, + original_content_url: String, + preview_image_url: String, + ) -> ImageMessage { ImageMessage { r#type, quick_reply: None, @@ -53,5 +54,3 @@ impl ImageMessage { } } } - - diff --git a/openapi/src/messaging_api/models/imagemap_action.rs b/openapi/src/messaging_api/models/imagemap_action.rs index e9c0c73a..24d7eaa1 100644 --- a/openapi/src/messaging_api/models/imagemap_action.rs +++ b/openapi/src/messaging_api/models/imagemap_action.rs @@ -20,17 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum ImagemapAction { -} - - - - +pub enum ImagemapAction {} diff --git a/openapi/src/messaging_api/models/imagemap_area.rs b/openapi/src/messaging_api/models/imagemap_area.rs index 4fa37419..7ec8fcc0 100644 --- a/openapi/src/messaging_api/models/imagemap_area.rs +++ b/openapi/src/messaging_api/models/imagemap_area.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImagemapArea { #[serde(rename = "x")] @@ -49,5 +46,3 @@ impl ImagemapArea { } } } - - diff --git a/openapi/src/messaging_api/models/imagemap_base_size.rs b/openapi/src/messaging_api/models/imagemap_base_size.rs index 3d718c6d..b7dfcfb1 100644 --- a/openapi/src/messaging_api/models/imagemap_base_size.rs +++ b/openapi/src/messaging_api/models/imagemap_base_size.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImagemapBaseSize { #[serde(rename = "height")] @@ -37,11 +34,6 @@ pub struct ImagemapBaseSize { impl ImagemapBaseSize { pub fn new(height: i32, width: i32) -> ImagemapBaseSize { - ImagemapBaseSize { - height, - width, - } + ImagemapBaseSize { height, width } } } - - diff --git a/openapi/src/messaging_api/models/imagemap_external_link.rs b/openapi/src/messaging_api/models/imagemap_external_link.rs index 01214c5f..8cdd7aa6 100644 --- a/openapi/src/messaging_api/models/imagemap_external_link.rs +++ b/openapi/src/messaging_api/models/imagemap_external_link.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImagemapExternalLink { #[serde(rename = "linkUri", skip_serializing_if = "Option::is_none")] @@ -43,5 +40,3 @@ impl ImagemapExternalLink { } } } - - diff --git a/openapi/src/messaging_api/models/imagemap_message.rs b/openapi/src/messaging_api/models/imagemap_message.rs index 90123159..3794eff9 100644 --- a/openapi/src/messaging_api/models/imagemap_message.rs +++ b/openapi/src/messaging_api/models/imagemap_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImagemapMessage { /// Type of message @@ -49,7 +46,13 @@ pub struct ImagemapMessage { } impl ImagemapMessage { - pub fn new(r#type: String, base_url: String, alt_text: String, base_size: crate::messaging_api::models::ImagemapBaseSize, actions: Vec) -> ImagemapMessage { + pub fn new( + r#type: String, + base_url: String, + alt_text: String, + base_size: crate::messaging_api::models::ImagemapBaseSize, + actions: Vec, + ) -> ImagemapMessage { ImagemapMessage { r#type, quick_reply: None, @@ -62,5 +65,3 @@ impl ImagemapMessage { } } } - - diff --git a/openapi/src/messaging_api/models/imagemap_video.rs b/openapi/src/messaging_api/models/imagemap_video.rs index 51a22b77..18d496f6 100644 --- a/openapi/src/messaging_api/models/imagemap_video.rs +++ b/openapi/src/messaging_api/models/imagemap_video.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImagemapVideo { #[serde(rename = "originalContentUrl", skip_serializing_if = "Option::is_none")] @@ -49,5 +46,3 @@ impl ImagemapVideo { } } } - - diff --git a/openapi/src/messaging_api/models/issue_link_token_response.rs b/openapi/src/messaging_api/models/issue_link_token_response.rs index fd1d360d..4d9a0acc 100644 --- a/openapi/src/messaging_api/models/issue_link_token_response.rs +++ b/openapi/src/messaging_api/models/issue_link_token_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct IssueLinkTokenResponse { /// Link token. Link tokens are valid for 10 minutes and can only be used once. @@ -36,10 +33,6 @@ pub struct IssueLinkTokenResponse { impl IssueLinkTokenResponse { pub fn new(link_token: String) -> IssueLinkTokenResponse { - IssueLinkTokenResponse { - link_token, - } + IssueLinkTokenResponse { link_token } } } - - diff --git a/openapi/src/messaging_api/models/limit.rs b/openapi/src/messaging_api/models/limit.rs index 27164ca8..e3e545f0 100644 --- a/openapi/src/messaging_api/models/limit.rs +++ b/openapi/src/messaging_api/models/limit.rs @@ -20,20 +20,18 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// Limit : Limit of the Narrowcast - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Limit { - /// The maximum number of narrowcast messages to send. Use this parameter to limit the number of narrowcast messages sent. The recipients will be chosen at random. + /// The maximum number of narrowcast messages to send. Use this parameter to limit the number of narrowcast messages sent. The recipients will be chosen at random. #[serde(rename = "max", skip_serializing_if = "Option::is_none")] pub max: Option, - /// If true, the message will be sent within the maximum number of deliverable messages. The default value is `false`. Targets will be selected at random. + /// If true, the message will be sent within the maximum number of deliverable messages. The default value is `false`. Targets will be selected at random. #[serde(rename = "upToRemainingQuota", skip_serializing_if = "Option::is_none")] pub up_to_remaining_quota: Option, } @@ -47,5 +45,3 @@ impl Limit { } } } - - diff --git a/openapi/src/messaging_api/models/location_action.rs b/openapi/src/messaging_api/models/location_action.rs index 0417b8fc..29e6e216 100644 --- a/openapi/src/messaging_api/models/location_action.rs +++ b/openapi/src/messaging_api/models/location_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LocationAction { /// Type of action @@ -45,5 +42,3 @@ impl LocationAction { } } } - - diff --git a/openapi/src/messaging_api/models/location_message.rs b/openapi/src/messaging_api/models/location_message.rs index 4bbf0a7b..690b1377 100644 --- a/openapi/src/messaging_api/models/location_message.rs +++ b/openapi/src/messaging_api/models/location_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LocationMessage { /// Type of message @@ -47,7 +44,13 @@ pub struct LocationMessage { } impl LocationMessage { - pub fn new(r#type: String, title: String, address: String, latitude: f64, longitude: f64) -> LocationMessage { + pub fn new( + r#type: String, + title: String, + address: String, + latitude: f64, + longitude: f64, + ) -> LocationMessage { LocationMessage { r#type, quick_reply: None, @@ -59,5 +62,3 @@ impl LocationMessage { } } } - - diff --git a/openapi/src/messaging_api/models/mark_messages_as_read_request.rs b/openapi/src/messaging_api/models/mark_messages_as_read_request.rs index c8a3987f..22dfadc8 100644 --- a/openapi/src/messaging_api/models/mark_messages_as_read_request.rs +++ b/openapi/src/messaging_api/models/mark_messages_as_read_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MarkMessagesAsReadRequest { #[serde(rename = "chat")] @@ -40,5 +37,3 @@ impl MarkMessagesAsReadRequest { } } } - - diff --git a/openapi/src/messaging_api/models/members_ids_response.rs b/openapi/src/messaging_api/models/members_ids_response.rs index eb086fc6..e07a541c 100644 --- a/openapi/src/messaging_api/models/members_ids_response.rs +++ b/openapi/src/messaging_api/models/members_ids_response.rs @@ -20,19 +20,16 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MembersIdsResponse { /// List of user IDs of members in the group chat. Only users of LINE for iOS and LINE for Android are included in `memberIds`. #[serde(rename = "memberIds")] pub member_ids: Vec, - /// A continuation token to get the next array of user IDs of the members in the group chat. Returned only when there are remaining user IDs that were not returned in `memberIds` in the original request. + /// A continuation token to get the next array of user IDs of the members in the group chat. Returned only when there are remaining user IDs that were not returned in `memberIds` in the original request. #[serde(rename = "next", skip_serializing_if = "Option::is_none")] pub next: Option, } @@ -45,5 +42,3 @@ impl MembersIdsResponse { } } } - - diff --git a/openapi/src/messaging_api/models/message.rs b/openapi/src/messaging_api/models/message.rs index d75bdb76..fad6a2f4 100644 --- a/openapi/src/messaging_api/models/message.rs +++ b/openapi/src/messaging_api/models/message.rs @@ -20,17 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum Message { -} - - - - +pub enum Message {} diff --git a/openapi/src/messaging_api/models/message_action.rs b/openapi/src/messaging_api/models/message_action.rs index 6d74d488..dcfaed82 100644 --- a/openapi/src/messaging_api/models/message_action.rs +++ b/openapi/src/messaging_api/models/message_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageAction { /// Type of action @@ -48,5 +45,3 @@ impl MessageAction { } } } - - diff --git a/openapi/src/messaging_api/models/message_imagemap_action.rs b/openapi/src/messaging_api/models/message_imagemap_action.rs index 0e985e7d..ce0f740a 100644 --- a/openapi/src/messaging_api/models/message_imagemap_action.rs +++ b/openapi/src/messaging_api/models/message_imagemap_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageImagemapAction { #[serde(rename = "type")] @@ -40,7 +37,11 @@ pub struct MessageImagemapAction { } impl MessageImagemapAction { - pub fn new(r#type: String, area: crate::messaging_api::models::ImagemapArea, text: String) -> MessageImagemapAction { + pub fn new( + r#type: String, + area: crate::messaging_api::models::ImagemapArea, + text: String, + ) -> MessageImagemapAction { MessageImagemapAction { r#type, area: Box::new(area), @@ -49,5 +50,3 @@ impl MessageImagemapAction { } } } - - diff --git a/openapi/src/messaging_api/models/message_quota_response.rs b/openapi/src/messaging_api/models/message_quota_response.rs index c8949c02..06694585 100644 --- a/openapi/src/messaging_api/models/message_quota_response.rs +++ b/openapi/src/messaging_api/models/message_quota_response.rs @@ -20,18 +20,15 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageQuotaResponse { #[serde(rename = "type")] pub r#type: crate::messaging_api::models::QuotaType, - /// The target limit for sending messages in the current month. This property is returned when the `type` property has a value of `limited`. + /// The target limit for sending messages in the current month. This property is returned when the `type` property has a value of `limited`. #[serde(rename = "value", skip_serializing_if = "Option::is_none")] pub value: Option, } @@ -44,5 +41,3 @@ impl MessageQuotaResponse { } } } - - diff --git a/openapi/src/messaging_api/models/multicast_request.rs b/openapi/src/messaging_api/models/multicast_request.rs index 378ea815..d0a024ae 100644 --- a/openapi/src/messaging_api/models/multicast_request.rs +++ b/openapi/src/messaging_api/models/multicast_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MulticastRequest { /// Messages to send @@ -35,16 +32,25 @@ pub struct MulticastRequest { /// Array of user IDs. Use userId values which are returned in webhook event objects. Do not use LINE IDs found on LINE. #[serde(rename = "to")] pub to: Vec, - /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. - #[serde(rename = "notificationDisabled", skip_serializing_if = "Option::is_none")] + /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. + #[serde( + rename = "notificationDisabled", + skip_serializing_if = "Option::is_none" + )] pub notification_disabled: Option, /// Name of aggregation unit. Case-sensitive. - #[serde(rename = "customAggregationUnits", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "customAggregationUnits", + skip_serializing_if = "Option::is_none" + )] pub custom_aggregation_units: Option>, } impl MulticastRequest { - pub fn new(messages: Vec, to: Vec) -> MulticastRequest { + pub fn new( + messages: Vec, + to: Vec, + ) -> MulticastRequest { MulticastRequest { messages, to, @@ -53,5 +59,3 @@ impl MulticastRequest { } } } - - diff --git a/openapi/src/messaging_api/models/narrowcast_progress_response.rs b/openapi/src/messaging_api/models/narrowcast_progress_response.rs index 40f2e556..437aa176 100644 --- a/openapi/src/messaging_api/models/narrowcast_progress_response.rs +++ b/openapi/src/messaging_api/models/narrowcast_progress_response.rs @@ -20,16 +20,13 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct NarrowcastProgressResponse { - /// The current status. One of: `waiting`: Messages are not yet ready to be sent. They are currently being filtered or processed in some way. `sending`: Messages are currently being sent. `succeeded`: Messages were sent successfully. This may not mean the messages were successfully received. `failed`: Messages failed to be sent. Use the failedDescription property to find the cause of the failure. + /// The current status. One of: `waiting`: Messages are not yet ready to be sent. They are currently being filtered or processed in some way. `sending`: Messages are currently being sent. `succeeded`: Messages were sent successfully. This may not mean the messages were successfully received. `failed`: Messages failed to be sent. Use the failedDescription property to find the cause of the failure. #[serde(rename = "phase")] pub phase: PhaseMessagingApi, /// The number of users who successfully received the message. @@ -44,13 +41,13 @@ pub struct NarrowcastProgressResponse { /// The reason the message failed to be sent. This is only included with a `phase` property value of `failed`. #[serde(rename = "failedDescription", skip_serializing_if = "Option::is_none")] pub failed_description: Option, - /// Error summary. This is only included with a phase property value of failed. One of: `1`: An internal error occurred. `2`: An error occurred because there weren't enough recipients. `3`: A conflict error of requests occurs because a request that has already been accepted is retried. + /// Error summary. This is only included with a phase property value of failed. One of: `1`: An internal error occurred. `2`: An error occurred because there weren't enough recipients. `3`: A conflict error of requests occurs because a request that has already been accepted is retried. #[serde(rename = "errorCode", skip_serializing_if = "Option::is_none")] pub error_code: Option, - /// Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC + /// Narrowcast message request accepted time in milliseconds. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC #[serde(rename = "acceptedTime")] pub accepted_time: String, - /// Processing of narrowcast message request completion time in milliseconds. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC + /// Processing of narrowcast message request completion time in milliseconds. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2020-12-03T10:15:30.121Z) Timezone: UTC #[serde(rename = "completedTime", skip_serializing_if = "Option::is_none")] pub completed_time: Option, } @@ -70,7 +67,7 @@ impl NarrowcastProgressResponse { } } -/// The current status. One of: `waiting`: Messages are not yet ready to be sent. They are currently being filtered or processed in some way. `sending`: Messages are currently being sent. `succeeded`: Messages were sent successfully. This may not mean the messages were successfully received. `failed`: Messages failed to be sent. Use the failedDescription property to find the cause of the failure. +/// The current status. One of: `waiting`: Messages are not yet ready to be sent. They are currently being filtered or processed in some way. `sending`: Messages are currently being sent. `succeeded`: Messages were sent successfully. This may not mean the messages were successfully received. `failed`: Messages failed to be sent. Use the failedDescription property to find the cause of the failure. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum PhaseMessagingApi { #[serde(rename = "waiting")] @@ -88,4 +85,3 @@ impl Default for PhaseMessagingApi { Self::Waiting } } - diff --git a/openapi/src/messaging_api/models/narrowcast_request.rs b/openapi/src/messaging_api/models/narrowcast_request.rs index 46c967c6..ff4f000c 100644 --- a/openapi/src/messaging_api/models/narrowcast_request.rs +++ b/openapi/src/messaging_api/models/narrowcast_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct NarrowcastRequest { /// List of Message objects. @@ -38,8 +35,11 @@ pub struct NarrowcastRequest { pub filter: Option>, #[serde(rename = "limit", skip_serializing_if = "Option::is_none")] pub limit: Option>, - /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. - #[serde(rename = "notificationDisabled", skip_serializing_if = "Option::is_none")] + /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. + #[serde( + rename = "notificationDisabled", + skip_serializing_if = "Option::is_none" + )] pub notification_disabled: Option, } @@ -54,5 +54,3 @@ impl NarrowcastRequest { } } } - - diff --git a/openapi/src/messaging_api/models/number_of_messages_response.rs b/openapi/src/messaging_api/models/number_of_messages_response.rs index 50155bdf..6a331ca7 100644 --- a/openapi/src/messaging_api/models/number_of_messages_response.rs +++ b/openapi/src/messaging_api/models/number_of_messages_response.rs @@ -20,16 +20,13 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct NumberOfMessagesResponse { - /// Aggregation process status. One of: `ready`: The number of messages can be obtained. `unready`: We haven't finished calculating the number of sent messages for the specified in date. For example, this property is returned when the delivery date or a future date is specified. Calculation usually takes about a day. `unavailable_for_privacy`: The total number of messages on the specified day is less than 20. `out_of_service`: The specified date is earlier than the date on which we first started calculating sent messages (March 31, 2018). + /// Aggregation process status. One of: `ready`: The number of messages can be obtained. `unready`: We haven't finished calculating the number of sent messages for the specified in date. For example, this property is returned when the delivery date or a future date is specified. Calculation usually takes about a day. `unavailable_for_privacy`: The total number of messages on the specified day is less than 20. `out_of_service`: The specified date is earlier than the date on which we first started calculating sent messages (March 31, 2018). #[serde(rename = "status")] pub status: StatusMessagingApi, /// The number of messages delivered using the phone number on the date specified in `date`. The response has this property only when the value of `status` is `ready`. @@ -46,7 +43,7 @@ impl NumberOfMessagesResponse { } } -/// Aggregation process status. One of: `ready`: The number of messages can be obtained. `unready`: We haven't finished calculating the number of sent messages for the specified in date. For example, this property is returned when the delivery date or a future date is specified. Calculation usually takes about a day. `unavailable_for_privacy`: The total number of messages on the specified day is less than 20. `out_of_service`: The specified date is earlier than the date on which we first started calculating sent messages (March 31, 2018). +/// Aggregation process status. One of: `ready`: The number of messages can be obtained. `unready`: We haven't finished calculating the number of sent messages for the specified in date. For example, this property is returned when the delivery date or a future date is specified. Calculation usually takes about a day. `unavailable_for_privacy`: The total number of messages on the specified day is less than 20. `out_of_service`: The specified date is earlier than the date on which we first started calculating sent messages (March 31, 2018). #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum StatusMessagingApi { #[serde(rename = "ready")] @@ -64,4 +61,3 @@ impl Default for StatusMessagingApi { Self::Ready } } - diff --git a/openapi/src/messaging_api/models/operator_demographic_filter.rs b/openapi/src/messaging_api/models/operator_demographic_filter.rs index c07cfd80..175eb247 100644 --- a/openapi/src/messaging_api/models/operator_demographic_filter.rs +++ b/openapi/src/messaging_api/models/operator_demographic_filter.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OperatorDemographicFilter { /// Type of demographic filter @@ -50,5 +47,3 @@ impl OperatorDemographicFilter { } } } - - diff --git a/openapi/src/messaging_api/models/operator_recipient.rs b/openapi/src/messaging_api/models/operator_recipient.rs index 6a726c55..d597c1e1 100644 --- a/openapi/src/messaging_api/models/operator_recipient.rs +++ b/openapi/src/messaging_api/models/operator_recipient.rs @@ -20,22 +20,19 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct OperatorRecipient { /// Type of recipient #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub r#type: Option, - /// Create a new recipient object by taking the logical conjunction (AND) of the specified array of recipient objects. + /// Create a new recipient object by taking the logical conjunction (AND) of the specified array of recipient objects. #[serde(rename = "and", skip_serializing_if = "Option::is_none")] pub and: Option>, - /// Create a new recipient object by taking the logical disjunction (OR) of the specified array of recipient objects. + /// Create a new recipient object by taking the logical disjunction (OR) of the specified array of recipient objects. #[serde(rename = "or", skip_serializing_if = "Option::is_none")] pub or: Option>, #[serde(rename = "not", skip_serializing_if = "Option::is_none")] @@ -52,5 +49,3 @@ impl OperatorRecipient { } } } - - diff --git a/openapi/src/messaging_api/models/pnp_messages_request.rs b/openapi/src/messaging_api/models/pnp_messages_request.rs index d70d449d..f11fe04b 100644 --- a/openapi/src/messaging_api/models/pnp_messages_request.rs +++ b/openapi/src/messaging_api/models/pnp_messages_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PnpMessagesRequest { /// Message to be sent. @@ -35,13 +32,19 @@ pub struct PnpMessagesRequest { /// Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256. #[serde(rename = "to")] pub to: String, - /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. - #[serde(rename = "notificationDisabled", skip_serializing_if = "Option::is_none")] + /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. + #[serde( + rename = "notificationDisabled", + skip_serializing_if = "Option::is_none" + )] pub notification_disabled: Option, } impl PnpMessagesRequest { - pub fn new(messages: Vec, to: String) -> PnpMessagesRequest { + pub fn new( + messages: Vec, + to: String, + ) -> PnpMessagesRequest { PnpMessagesRequest { messages, to, @@ -49,5 +52,3 @@ impl PnpMessagesRequest { } } } - - diff --git a/openapi/src/messaging_api/models/postback_action.rs b/openapi/src/messaging_api/models/postback_action.rs index c554c8ea..9adba992 100644 --- a/openapi/src/messaging_api/models/postback_action.rs +++ b/openapi/src/messaging_api/models/postback_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PostbackAction { /// Type of action @@ -61,7 +58,7 @@ impl PostbackAction { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum InputOptionMessagingApi { #[serde(rename = "closeRichMenu")] @@ -79,4 +76,3 @@ impl Default for InputOptionMessagingApi { Self::CloseRichMenu } } - diff --git a/openapi/src/messaging_api/models/push_message_request.rs b/openapi/src/messaging_api/models/push_message_request.rs index 9e497cbc..d8f71192 100644 --- a/openapi/src/messaging_api/models/push_message_request.rs +++ b/openapi/src/messaging_api/models/push_message_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PushMessageRequest { /// ID of the receiver. @@ -35,16 +32,25 @@ pub struct PushMessageRequest { /// List of Message objects. #[serde(rename = "messages")] pub messages: Vec, - /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. - #[serde(rename = "notificationDisabled", skip_serializing_if = "Option::is_none")] + /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. + #[serde( + rename = "notificationDisabled", + skip_serializing_if = "Option::is_none" + )] pub notification_disabled: Option, - /// List of aggregation unit name. Case-sensitive. This functions can only be used by corporate users who have submitted the required applications. - #[serde(rename = "customAggregationUnits", skip_serializing_if = "Option::is_none")] + /// List of aggregation unit name. Case-sensitive. This functions can only be used by corporate users who have submitted the required applications. + #[serde( + rename = "customAggregationUnits", + skip_serializing_if = "Option::is_none" + )] pub custom_aggregation_units: Option>, } impl PushMessageRequest { - pub fn new(to: String, messages: Vec) -> PushMessageRequest { + pub fn new( + to: String, + messages: Vec, + ) -> PushMessageRequest { PushMessageRequest { to, messages, @@ -53,5 +59,3 @@ impl PushMessageRequest { } } } - - diff --git a/openapi/src/messaging_api/models/push_message_response.rs b/openapi/src/messaging_api/models/push_message_response.rs index 669ceded..8c46b4f4 100644 --- a/openapi/src/messaging_api/models/push_message_response.rs +++ b/openapi/src/messaging_api/models/push_message_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PushMessageResponse { /// Array of sent messages. @@ -35,11 +32,9 @@ pub struct PushMessageResponse { } impl PushMessageResponse { - pub fn new(sent_messages: Vec) -> PushMessageResponse { - PushMessageResponse { - sent_messages, - } + pub fn new( + sent_messages: Vec, + ) -> PushMessageResponse { + PushMessageResponse { sent_messages } } } - - diff --git a/openapi/src/messaging_api/models/quick_reply.rs b/openapi/src/messaging_api/models/quick_reply.rs index 3682af39..76e4f3ee 100644 --- a/openapi/src/messaging_api/models/quick_reply.rs +++ b/openapi/src/messaging_api/models/quick_reply.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// QuickReply : Quick reply - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct QuickReply { /// Quick reply button objects. @@ -38,10 +36,6 @@ pub struct QuickReply { impl QuickReply { /// Quick reply pub fn new() -> QuickReply { - QuickReply { - items: None, - } + QuickReply { items: None } } } - - diff --git a/openapi/src/messaging_api/models/quick_reply_item.rs b/openapi/src/messaging_api/models/quick_reply_item.rs index c8a24021..fae47b27 100644 --- a/openapi/src/messaging_api/models/quick_reply_item.rs +++ b/openapi/src/messaging_api/models/quick_reply_item.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct QuickReplyItem { /// URL of the icon that is displayed at the beginning of the button @@ -48,5 +45,3 @@ impl QuickReplyItem { } } } - - diff --git a/openapi/src/messaging_api/models/quota_consumption_response.rs b/openapi/src/messaging_api/models/quota_consumption_response.rs index f8774079..86f6c6fb 100644 --- a/openapi/src/messaging_api/models/quota_consumption_response.rs +++ b/openapi/src/messaging_api/models/quota_consumption_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct QuotaConsumptionResponse { /// The number of sent messages in the current month @@ -36,10 +33,6 @@ pub struct QuotaConsumptionResponse { impl QuotaConsumptionResponse { pub fn new(total_usage: i64) -> QuotaConsumptionResponse { - QuotaConsumptionResponse { - total_usage, - } + QuotaConsumptionResponse { total_usage } } } - - diff --git a/openapi/src/messaging_api/models/quota_type.rs b/openapi/src/messaging_api/models/quota_type.rs index 1b103b46..d368ae25 100644 --- a/openapi/src/messaging_api/models/quota_type.rs +++ b/openapi/src/messaging_api/models/quota_type.rs @@ -20,7 +20,7 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ @@ -33,7 +33,6 @@ pub enum QuotaType { None, #[serde(rename = "limited")] Limited, - } impl ToString for QuotaType { @@ -50,7 +49,3 @@ impl Default for QuotaType { Self::None } } - - - - diff --git a/openapi/src/messaging_api/models/recipient.rs b/openapi/src/messaging_api/models/recipient.rs index 2aa766dd..eaeac4b1 100644 --- a/openapi/src/messaging_api/models/recipient.rs +++ b/openapi/src/messaging_api/models/recipient.rs @@ -20,18 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// Recipient : Recipient - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum Recipient { -} - - - - +pub enum Recipient {} diff --git a/openapi/src/messaging_api/models/redelivery_recipient.rs b/openapi/src/messaging_api/models/redelivery_recipient.rs index 813e4e6a..258b088c 100644 --- a/openapi/src/messaging_api/models/redelivery_recipient.rs +++ b/openapi/src/messaging_api/models/redelivery_recipient.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RedeliveryRecipient { /// Type of recipient @@ -44,5 +41,3 @@ impl RedeliveryRecipient { } } } - - diff --git a/openapi/src/messaging_api/models/reply_message_request.rs b/openapi/src/messaging_api/models/reply_message_request.rs index 30b9d695..be691ff0 100644 --- a/openapi/src/messaging_api/models/reply_message_request.rs +++ b/openapi/src/messaging_api/models/reply_message_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ReplyMessageRequest { /// replyToken received via webhook. @@ -35,13 +32,19 @@ pub struct ReplyMessageRequest { /// List of messages. #[serde(rename = "messages")] pub messages: Vec, - /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. - #[serde(rename = "notificationDisabled", skip_serializing_if = "Option::is_none")] + /// `true`: The user doesn’t receive a push notification when a message is sent. `false`: The user receives a push notification when the message is sent (unless they have disabled push notifications in LINE and/or their device). The default value is false. + #[serde( + rename = "notificationDisabled", + skip_serializing_if = "Option::is_none" + )] pub notification_disabled: Option, } impl ReplyMessageRequest { - pub fn new(reply_token: String, messages: Vec) -> ReplyMessageRequest { + pub fn new( + reply_token: String, + messages: Vec, + ) -> ReplyMessageRequest { ReplyMessageRequest { reply_token, messages, @@ -49,5 +52,3 @@ impl ReplyMessageRequest { } } } - - diff --git a/openapi/src/messaging_api/models/reply_message_response.rs b/openapi/src/messaging_api/models/reply_message_response.rs index 6277ae55..2b87622b 100644 --- a/openapi/src/messaging_api/models/reply_message_response.rs +++ b/openapi/src/messaging_api/models/reply_message_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ReplyMessageResponse { /// Array of sent messages. @@ -35,11 +32,9 @@ pub struct ReplyMessageResponse { } impl ReplyMessageResponse { - pub fn new(sent_messages: Vec) -> ReplyMessageResponse { - ReplyMessageResponse { - sent_messages, - } + pub fn new( + sent_messages: Vec, + ) -> ReplyMessageResponse { + ReplyMessageResponse { sent_messages } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_alias_list_response.rs b/openapi/src/messaging_api/models/rich_menu_alias_list_response.rs index 5129bd12..09c870c2 100644 --- a/openapi/src/messaging_api/models/rich_menu_alias_list_response.rs +++ b/openapi/src/messaging_api/models/rich_menu_alias_list_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuAliasListResponse { /// Rich menu aliases. @@ -35,11 +32,9 @@ pub struct RichMenuAliasListResponse { } impl RichMenuAliasListResponse { - pub fn new(aliases: Vec) -> RichMenuAliasListResponse { - RichMenuAliasListResponse { - aliases, - } + pub fn new( + aliases: Vec, + ) -> RichMenuAliasListResponse { + RichMenuAliasListResponse { aliases } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_alias_response.rs b/openapi/src/messaging_api/models/rich_menu_alias_response.rs index af41ce4c..4e59f2cd 100644 --- a/openapi/src/messaging_api/models/rich_menu_alias_response.rs +++ b/openapi/src/messaging_api/models/rich_menu_alias_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuAliasResponse { /// Rich menu alias ID. @@ -45,5 +42,3 @@ impl RichMenuAliasResponse { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_area.rs b/openapi/src/messaging_api/models/rich_menu_area.rs index 7fd43665..d6fe9b07 100644 --- a/openapi/src/messaging_api/models/rich_menu_area.rs +++ b/openapi/src/messaging_api/models/rich_menu_area.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RichMenuArea : Rich menu area - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuArea { #[serde(rename = "bounds", skip_serializing_if = "Option::is_none")] @@ -45,5 +43,3 @@ impl RichMenuArea { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_batch_link_operation.rs b/openapi/src/messaging_api/models/rich_menu_batch_link_operation.rs index ff35df50..45063f66 100644 --- a/openapi/src/messaging_api/models/rich_menu_batch_link_operation.rs +++ b/openapi/src/messaging_api/models/rich_menu_batch_link_operation.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RichMenuBatchLinkOperation : Replace the rich menu with the rich menu specified in the `to` property for all users linked to the rich menu specified in the `from` property. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBatchLinkOperation { /// The type of operation to the rich menu linked to the user. One of link, unlink, or unlinkAll. @@ -42,12 +40,6 @@ pub struct RichMenuBatchLinkOperation { impl RichMenuBatchLinkOperation { /// Replace the rich menu with the rich menu specified in the `to` property for all users linked to the rich menu specified in the `from` property. pub fn new(r#type: String, from: String, to: String) -> RichMenuBatchLinkOperation { - RichMenuBatchLinkOperation { - r#type, - from, - to, - } + RichMenuBatchLinkOperation { r#type, from, to } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_batch_operation.rs b/openapi/src/messaging_api/models/rich_menu_batch_operation.rs index e4a0ab9b..3e808ae4 100644 --- a/openapi/src/messaging_api/models/rich_menu_batch_operation.rs +++ b/openapi/src/messaging_api/models/rich_menu_batch_operation.rs @@ -20,18 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RichMenuBatchOperation : Rich menu operation object represents the batch operation to the rich menu linked to the user. - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum RichMenuBatchOperation { -} - - - - +pub enum RichMenuBatchOperation {} diff --git a/openapi/src/messaging_api/models/rich_menu_batch_progress_phase.rs b/openapi/src/messaging_api/models/rich_menu_batch_progress_phase.rs index aa91e785..ce5b6fff 100644 --- a/openapi/src/messaging_api/models/rich_menu_batch_progress_phase.rs +++ b/openapi/src/messaging_api/models/rich_menu_batch_progress_phase.rs @@ -20,13 +20,13 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ -/// RichMenuBatchProgressPhase : The current status. One of: `ongoing`: Rich menu batch control is in progress. `succeeded`: Rich menu batch control is complete. `failed`: Rich menu batch control failed. This means that the rich menu for one or more users couldn't be controlled. There may also be users whose operations have been successfully completed. +/// RichMenuBatchProgressPhase : The current status. One of: `ongoing`: Rich menu batch control is in progress. `succeeded`: Rich menu batch control is complete. `failed`: Rich menu batch control failed. This means that the rich menu for one or more users couldn't be controlled. There may also be users whose operations have been successfully completed. -/// The current status. One of: `ongoing`: Rich menu batch control is in progress. `succeeded`: Rich menu batch control is complete. `failed`: Rich menu batch control failed. This means that the rich menu for one or more users couldn't be controlled. There may also be users whose operations have been successfully completed. +/// The current status. One of: `ongoing`: Rich menu batch control is in progress. `succeeded`: Rich menu batch control is complete. `failed`: Rich menu batch control failed. This means that the rich menu for one or more users couldn't be controlled. There may also be users whose operations have been successfully completed. #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum RichMenuBatchProgressPhase { #[serde(rename = "ongoing")] @@ -35,7 +35,6 @@ pub enum RichMenuBatchProgressPhase { Succeeded, #[serde(rename = "failed")] Failed, - } impl ToString for RichMenuBatchProgressPhase { @@ -53,7 +52,3 @@ impl Default for RichMenuBatchProgressPhase { Self::Ongoing } } - - - - diff --git a/openapi/src/messaging_api/models/rich_menu_batch_progress_response.rs b/openapi/src/messaging_api/models/rich_menu_batch_progress_response.rs index 852a358d..057ddb9e 100644 --- a/openapi/src/messaging_api/models/rich_menu_batch_progress_response.rs +++ b/openapi/src/messaging_api/models/rich_menu_batch_progress_response.rs @@ -20,27 +20,27 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBatchProgressResponse { #[serde(rename = "phase")] pub phase: crate::messaging_api::models::RichMenuBatchProgressPhase, - /// The accepted time in milliseconds of the request of batch control the rich menu. Format: ISO 8601 (e.g. 2023-06-08T10:15:30.121Z) Timezone: UTC + /// The accepted time in milliseconds of the request of batch control the rich menu. Format: ISO 8601 (e.g. 2023-06-08T10:15:30.121Z) Timezone: UTC #[serde(rename = "acceptedTime")] pub accepted_time: String, - /// The completed time in milliseconds of rich menu batch control. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2023-06-08T10:15:30.121Z) Timezone: UTC + /// The completed time in milliseconds of rich menu batch control. Returned when the phase property is succeeded or failed. Format: ISO 8601 (e.g. 2023-06-08T10:15:30.121Z) Timezone: UTC #[serde(rename = "completedTime", skip_serializing_if = "Option::is_none")] pub completed_time: Option, } impl RichMenuBatchProgressResponse { - pub fn new(phase: crate::messaging_api::models::RichMenuBatchProgressPhase, accepted_time: String) -> RichMenuBatchProgressResponse { + pub fn new( + phase: crate::messaging_api::models::RichMenuBatchProgressPhase, + accepted_time: String, + ) -> RichMenuBatchProgressResponse { RichMenuBatchProgressResponse { phase, accepted_time, @@ -48,5 +48,3 @@ impl RichMenuBatchProgressResponse { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_batch_request.rs b/openapi/src/messaging_api/models/rich_menu_batch_request.rs index 349b2e4b..4da5f0ac 100644 --- a/openapi/src/messaging_api/models/rich_menu_batch_request.rs +++ b/openapi/src/messaging_api/models/rich_menu_batch_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBatchRequest { /// Array of Rich menu operation object... @@ -38,12 +35,12 @@ pub struct RichMenuBatchRequest { } impl RichMenuBatchRequest { - pub fn new(operations: Vec) -> RichMenuBatchRequest { + pub fn new( + operations: Vec, + ) -> RichMenuBatchRequest { RichMenuBatchRequest { operations, resume_request_key: None, } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_batch_unlink_all_operation.rs b/openapi/src/messaging_api/models/rich_menu_batch_unlink_all_operation.rs index b650847e..8bc2c2dd 100644 --- a/openapi/src/messaging_api/models/rich_menu_batch_unlink_all_operation.rs +++ b/openapi/src/messaging_api/models/rich_menu_batch_unlink_all_operation.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RichMenuBatchUnlinkAllOperation : Unlink the rich menu from all users linked to the rich menu. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBatchUnlinkAllOperation { /// The type of operation to the rich menu linked to the user. One of link, unlink, or unlinkAll. @@ -38,10 +36,6 @@ pub struct RichMenuBatchUnlinkAllOperation { impl RichMenuBatchUnlinkAllOperation { /// Unlink the rich menu from all users linked to the rich menu. pub fn new(r#type: String) -> RichMenuBatchUnlinkAllOperation { - RichMenuBatchUnlinkAllOperation { - r#type, - } + RichMenuBatchUnlinkAllOperation { r#type } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_batch_unlink_operation.rs b/openapi/src/messaging_api/models/rich_menu_batch_unlink_operation.rs index cd5b7a2d..45dfec8c 100644 --- a/openapi/src/messaging_api/models/rich_menu_batch_unlink_operation.rs +++ b/openapi/src/messaging_api/models/rich_menu_batch_unlink_operation.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RichMenuBatchUnlinkOperation : Unlink the rich menu for all users linked to the rich menu specified in the `from` property. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBatchUnlinkOperation { /// The type of operation to the rich menu linked to the user. One of link, unlink, or unlinkAll. @@ -40,11 +38,6 @@ pub struct RichMenuBatchUnlinkOperation { impl RichMenuBatchUnlinkOperation { /// Unlink the rich menu for all users linked to the rich menu specified in the `from` property. pub fn new(r#type: String, from: String) -> RichMenuBatchUnlinkOperation { - RichMenuBatchUnlinkOperation { - r#type, - from, - } + RichMenuBatchUnlinkOperation { r#type, from } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_bounds.rs b/openapi/src/messaging_api/models/rich_menu_bounds.rs index b3927ddc..dd263e8f 100644 --- a/openapi/src/messaging_api/models/rich_menu_bounds.rs +++ b/openapi/src/messaging_api/models/rich_menu_bounds.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RichMenuBounds : Rich menu bounds - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBounds { /// Horizontal position relative to the top-left corner of the area. @@ -55,5 +53,3 @@ impl RichMenuBounds { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_bulk_link_request.rs b/openapi/src/messaging_api/models/rich_menu_bulk_link_request.rs index e831711c..dd54346e 100644 --- a/openapi/src/messaging_api/models/rich_menu_bulk_link_request.rs +++ b/openapi/src/messaging_api/models/rich_menu_bulk_link_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBulkLinkRequest { /// ID of a rich menu @@ -45,5 +42,3 @@ impl RichMenuBulkLinkRequest { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_bulk_unlink_request.rs b/openapi/src/messaging_api/models/rich_menu_bulk_unlink_request.rs index cf03fcc2..1ed1fff1 100644 --- a/openapi/src/messaging_api/models/rich_menu_bulk_unlink_request.rs +++ b/openapi/src/messaging_api/models/rich_menu_bulk_unlink_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuBulkUnlinkRequest { /// Array of user IDs. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. @@ -36,10 +33,6 @@ pub struct RichMenuBulkUnlinkRequest { impl RichMenuBulkUnlinkRequest { pub fn new(user_ids: Vec) -> RichMenuBulkUnlinkRequest { - RichMenuBulkUnlinkRequest { - user_ids, - } + RichMenuBulkUnlinkRequest { user_ids } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_id_response.rs b/openapi/src/messaging_api/models/rich_menu_id_response.rs index a9eb0145..9b7301e4 100644 --- a/openapi/src/messaging_api/models/rich_menu_id_response.rs +++ b/openapi/src/messaging_api/models/rich_menu_id_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuIdResponse { /// Rich menu ID @@ -36,10 +33,6 @@ pub struct RichMenuIdResponse { impl RichMenuIdResponse { pub fn new(rich_menu_id: String) -> RichMenuIdResponse { - RichMenuIdResponse { - rich_menu_id, - } + RichMenuIdResponse { rich_menu_id } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_list_response.rs b/openapi/src/messaging_api/models/rich_menu_list_response.rs index 0dc22339..8a9f071e 100644 --- a/openapi/src/messaging_api/models/rich_menu_list_response.rs +++ b/openapi/src/messaging_api/models/rich_menu_list_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuListResponse { /// Rich menus @@ -35,11 +32,9 @@ pub struct RichMenuListResponse { } impl RichMenuListResponse { - pub fn new(richmenus: Vec) -> RichMenuListResponse { - RichMenuListResponse { - richmenus, - } + pub fn new( + richmenus: Vec, + ) -> RichMenuListResponse { + RichMenuListResponse { richmenus } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_request.rs b/openapi/src/messaging_api/models/rich_menu_request.rs index 599d015f..f74156b1 100644 --- a/openapi/src/messaging_api/models/rich_menu_request.rs +++ b/openapi/src/messaging_api/models/rich_menu_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuRequest { #[serde(rename = "size", skip_serializing_if = "Option::is_none")] @@ -56,5 +53,3 @@ impl RichMenuRequest { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_response.rs b/openapi/src/messaging_api/models/rich_menu_response.rs index 5de2f5cd..4aab97f1 100644 --- a/openapi/src/messaging_api/models/rich_menu_response.rs +++ b/openapi/src/messaging_api/models/rich_menu_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuResponse { /// ID of a rich menu @@ -49,7 +46,14 @@ pub struct RichMenuResponse { } impl RichMenuResponse { - pub fn new(rich_menu_id: String, size: crate::messaging_api::models::RichMenuSize, selected: bool, name: String, chat_bar_text: String, areas: Vec) -> RichMenuResponse { + pub fn new( + rich_menu_id: String, + size: crate::messaging_api::models::RichMenuSize, + selected: bool, + name: String, + chat_bar_text: String, + areas: Vec, + ) -> RichMenuResponse { RichMenuResponse { rich_menu_id, size: Box::new(size), @@ -60,5 +64,3 @@ impl RichMenuResponse { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_size.rs b/openapi/src/messaging_api/models/rich_menu_size.rs index 82580177..f16496bb 100644 --- a/openapi/src/messaging_api/models/rich_menu_size.rs +++ b/openapi/src/messaging_api/models/rich_menu_size.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// RichMenuSize : Rich menu size - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuSize { /// width @@ -47,5 +45,3 @@ impl RichMenuSize { } } } - - diff --git a/openapi/src/messaging_api/models/rich_menu_switch_action.rs b/openapi/src/messaging_api/models/rich_menu_switch_action.rs index b1ff1b23..ab91c123 100644 --- a/openapi/src/messaging_api/models/rich_menu_switch_action.rs +++ b/openapi/src/messaging_api/models/rich_menu_switch_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RichMenuSwitchAction { /// Type of action @@ -51,5 +48,3 @@ impl RichMenuSwitchAction { } } } - - diff --git a/openapi/src/messaging_api/models/room_member_count_response.rs b/openapi/src/messaging_api/models/room_member_count_response.rs index 906492b3..07450e5b 100644 --- a/openapi/src/messaging_api/models/room_member_count_response.rs +++ b/openapi/src/messaging_api/models/room_member_count_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RoomMemberCountResponse { /// The count of members in the multi-person chat. The number returned excludes the LINE Official Account. @@ -36,10 +33,6 @@ pub struct RoomMemberCountResponse { impl RoomMemberCountResponse { pub fn new(count: i32) -> RoomMemberCountResponse { - RoomMemberCountResponse { - count, - } + RoomMemberCountResponse { count } } } - - diff --git a/openapi/src/messaging_api/models/room_user_profile_response.rs b/openapi/src/messaging_api/models/room_user_profile_response.rs index 5e6dabd3..43065db0 100644 --- a/openapi/src/messaging_api/models/room_user_profile_response.rs +++ b/openapi/src/messaging_api/models/room_user_profile_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RoomUserProfileResponse { /// User's display name @@ -49,5 +46,3 @@ impl RoomUserProfileResponse { } } } - - diff --git a/openapi/src/messaging_api/models/sender.rs b/openapi/src/messaging_api/models/sender.rs index 3f9828c5..358522c0 100644 --- a/openapi/src/messaging_api/models/sender.rs +++ b/openapi/src/messaging_api/models/sender.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// Sender : Change icon and display name - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Sender { /// Display name. Certain words such as `LINE` may not be used. @@ -47,5 +45,3 @@ impl Sender { } } } - - diff --git a/openapi/src/messaging_api/models/sent_message.rs b/openapi/src/messaging_api/models/sent_message.rs index 25d7d67e..a12e9b39 100644 --- a/openapi/src/messaging_api/models/sent_message.rs +++ b/openapi/src/messaging_api/models/sent_message.rs @@ -20,19 +20,16 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SentMessage { /// ID of the sent message. #[serde(rename = "id")] pub id: String, - /// Quote token of the message. Only included when a message object that can be specified as a quote target was sent as a push or reply message. + /// Quote token of the message. Only included when a message object that can be specified as a quote target was sent as a push or reply message. #[serde(rename = "quoteToken", skip_serializing_if = "Option::is_none")] pub quote_token: Option, } @@ -45,5 +42,3 @@ impl SentMessage { } } } - - diff --git a/openapi/src/messaging_api/models/set_webhook_endpoint_request.rs b/openapi/src/messaging_api/models/set_webhook_endpoint_request.rs index e3a95f09..78f099f1 100644 --- a/openapi/src/messaging_api/models/set_webhook_endpoint_request.rs +++ b/openapi/src/messaging_api/models/set_webhook_endpoint_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SetWebhookEndpointRequest { /// A valid webhook URL. @@ -36,10 +33,6 @@ pub struct SetWebhookEndpointRequest { impl SetWebhookEndpointRequest { pub fn new(endpoint: String) -> SetWebhookEndpointRequest { - SetWebhookEndpointRequest { - endpoint, - } + SetWebhookEndpointRequest { endpoint } } } - - diff --git a/openapi/src/messaging_api/models/sticker_message.rs b/openapi/src/messaging_api/models/sticker_message.rs index 4ab7878f..d119aea7 100644 --- a/openapi/src/messaging_api/models/sticker_message.rs +++ b/openapi/src/messaging_api/models/sticker_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct StickerMessage { /// Type of message @@ -57,5 +54,3 @@ impl StickerMessage { } } } - - diff --git a/openapi/src/messaging_api/models/subscription_period_demographic.rs b/openapi/src/messaging_api/models/subscription_period_demographic.rs index c373f434..85b7d59e 100644 --- a/openapi/src/messaging_api/models/subscription_period_demographic.rs +++ b/openapi/src/messaging_api/models/subscription_period_demographic.rs @@ -20,12 +20,11 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum SubscriptionPeriodDemographic { #[serde(rename = "day_7")] @@ -38,7 +37,6 @@ pub enum SubscriptionPeriodDemographic { Variant180, #[serde(rename = "day_365")] Variant365, - } impl ToString for SubscriptionPeriodDemographic { @@ -58,7 +56,3 @@ impl Default for SubscriptionPeriodDemographic { Self::Variant7 } } - - - - diff --git a/openapi/src/messaging_api/models/subscription_period_demographic_filter.rs b/openapi/src/messaging_api/models/subscription_period_demographic_filter.rs index 3a63e45f..f51f724f 100644 --- a/openapi/src/messaging_api/models/subscription_period_demographic_filter.rs +++ b/openapi/src/messaging_api/models/subscription_period_demographic_filter.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct SubscriptionPeriodDemographicFilter { /// Type of demographic filter @@ -47,5 +44,3 @@ impl SubscriptionPeriodDemographicFilter { } } } - - diff --git a/openapi/src/messaging_api/models/template.rs b/openapi/src/messaging_api/models/template.rs index 6649f034..83037876 100644 --- a/openapi/src/messaging_api/models/template.rs +++ b/openapi/src/messaging_api/models/template.rs @@ -20,17 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum Template { -} - - - - +pub enum Template {} diff --git a/openapi/src/messaging_api/models/template_message.rs b/openapi/src/messaging_api/models/template_message.rs index c87d4f6a..dc86fe7d 100644 --- a/openapi/src/messaging_api/models/template_message.rs +++ b/openapi/src/messaging_api/models/template_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TemplateMessage { /// Type of message @@ -43,7 +40,11 @@ pub struct TemplateMessage { } impl TemplateMessage { - pub fn new(r#type: String, alt_text: String, template: crate::messaging_api::models::Template) -> TemplateMessage { + pub fn new( + r#type: String, + alt_text: String, + template: crate::messaging_api::models::Template, + ) -> TemplateMessage { TemplateMessage { r#type, quick_reply: None, @@ -53,5 +54,3 @@ impl TemplateMessage { } } } - - diff --git a/openapi/src/messaging_api/models/test_webhook_endpoint_request.rs b/openapi/src/messaging_api/models/test_webhook_endpoint_request.rs index fd27d33e..48ca434c 100644 --- a/openapi/src/messaging_api/models/test_webhook_endpoint_request.rs +++ b/openapi/src/messaging_api/models/test_webhook_endpoint_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TestWebhookEndpointRequest { /// A webhook URL to be validated. @@ -36,10 +33,6 @@ pub struct TestWebhookEndpointRequest { impl TestWebhookEndpointRequest { pub fn new() -> TestWebhookEndpointRequest { - TestWebhookEndpointRequest { - endpoint: None, - } + TestWebhookEndpointRequest { endpoint: None } } } - - diff --git a/openapi/src/messaging_api/models/test_webhook_endpoint_response.rs b/openapi/src/messaging_api/models/test_webhook_endpoint_response.rs index bc096205..e2cd6fce 100644 --- a/openapi/src/messaging_api/models/test_webhook_endpoint_response.rs +++ b/openapi/src/messaging_api/models/test_webhook_endpoint_response.rs @@ -20,19 +20,16 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TestWebhookEndpointResponse { /// Result of the communication from the LINE platform to the webhook URL. #[serde(rename = "success", skip_serializing_if = "Option::is_none")] pub success: Option, - /// Time of the event in milliseconds. Even in the case of a redelivered webhook, it represents the time the event occurred, not the time it was redelivered. + /// Time of the event in milliseconds. Even in the case of a redelivered webhook, it represents the time the event occurred, not the time it was redelivered. #[serde(rename = "timestamp")] pub timestamp: String, /// The HTTP status code. If the webhook response isn't received, the status code is set to zero or a negative number. @@ -47,7 +44,12 @@ pub struct TestWebhookEndpointResponse { } impl TestWebhookEndpointResponse { - pub fn new(timestamp: String, status_code: i32, reason: String, detail: String) -> TestWebhookEndpointResponse { + pub fn new( + timestamp: String, + status_code: i32, + reason: String, + detail: String, + ) -> TestWebhookEndpointResponse { TestWebhookEndpointResponse { success: None, timestamp, @@ -57,5 +59,3 @@ impl TestWebhookEndpointResponse { } } } - - diff --git a/openapi/src/messaging_api/models/text_message.rs b/openapi/src/messaging_api/models/text_message.rs index 25a81507..54d11d43 100644 --- a/openapi/src/messaging_api/models/text_message.rs +++ b/openapi/src/messaging_api/models/text_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TextMessage { /// Type of message @@ -57,5 +54,3 @@ impl TextMessage { } } } - - diff --git a/openapi/src/messaging_api/models/update_rich_menu_alias_request.rs b/openapi/src/messaging_api/models/update_rich_menu_alias_request.rs index 0442553d..809fb7a4 100644 --- a/openapi/src/messaging_api/models/update_rich_menu_alias_request.rs +++ b/openapi/src/messaging_api/models/update_rich_menu_alias_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateRichMenuAliasRequest { /// The rich menu ID to be associated with the rich menu alias. @@ -36,10 +33,6 @@ pub struct UpdateRichMenuAliasRequest { impl UpdateRichMenuAliasRequest { pub fn new(rich_menu_id: String) -> UpdateRichMenuAliasRequest { - UpdateRichMenuAliasRequest { - rich_menu_id, - } + UpdateRichMenuAliasRequest { rich_menu_id } } } - - diff --git a/openapi/src/messaging_api/models/uri_action.rs b/openapi/src/messaging_api/models/uri_action.rs index af839015..5e8f3959 100644 --- a/openapi/src/messaging_api/models/uri_action.rs +++ b/openapi/src/messaging_api/models/uri_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UriAction { /// Type of action @@ -51,5 +48,3 @@ impl UriAction { } } } - - diff --git a/openapi/src/messaging_api/models/uri_imagemap_action.rs b/openapi/src/messaging_api/models/uri_imagemap_action.rs index 09fdb705..db6fbc46 100644 --- a/openapi/src/messaging_api/models/uri_imagemap_action.rs +++ b/openapi/src/messaging_api/models/uri_imagemap_action.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UriImagemapAction { #[serde(rename = "type")] @@ -40,7 +37,11 @@ pub struct UriImagemapAction { } impl UriImagemapAction { - pub fn new(r#type: String, area: crate::messaging_api::models::ImagemapArea, link_uri: String) -> UriImagemapAction { + pub fn new( + r#type: String, + area: crate::messaging_api::models::ImagemapArea, + link_uri: String, + ) -> UriImagemapAction { UriImagemapAction { r#type, area: Box::new(area), @@ -49,5 +50,3 @@ impl UriImagemapAction { } } } - - diff --git a/openapi/src/messaging_api/models/user_profile_response.rs b/openapi/src/messaging_api/models/user_profile_response.rs index 88c57e09..67d37874 100644 --- a/openapi/src/messaging_api/models/user_profile_response.rs +++ b/openapi/src/messaging_api/models/user_profile_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UserProfileResponse { /// User's display name @@ -57,5 +54,3 @@ impl UserProfileResponse { } } } - - diff --git a/openapi/src/messaging_api/models/validate_message_request.rs b/openapi/src/messaging_api/models/validate_message_request.rs index 9a07babb..0ebf061e 100644 --- a/openapi/src/messaging_api/models/validate_message_request.rs +++ b/openapi/src/messaging_api/models/validate_message_request.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ValidateMessageRequest { /// Array of message objects to validate @@ -36,10 +33,6 @@ pub struct ValidateMessageRequest { impl ValidateMessageRequest { pub fn new(messages: Vec) -> ValidateMessageRequest { - ValidateMessageRequest { - messages, - } + ValidateMessageRequest { messages } } } - - diff --git a/openapi/src/messaging_api/models/video_message.rs b/openapi/src/messaging_api/models/video_message.rs index eba84a92..cacd81a9 100644 --- a/openapi/src/messaging_api/models/video_message.rs +++ b/openapi/src/messaging_api/models/video_message.rs @@ -20,13 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct VideoMessage { /// Type of message @@ -45,7 +42,11 @@ pub struct VideoMessage { } impl VideoMessage { - pub fn new(r#type: String, original_content_url: String, preview_image_url: String) -> VideoMessage { + pub fn new( + r#type: String, + original_content_url: String, + preview_image_url: String, + ) -> VideoMessage { VideoMessage { r#type, quick_reply: None, @@ -56,5 +57,3 @@ impl VideoMessage { } } } - - diff --git a/openapi/src/module/apis/configuration.rs b/openapi/src/module/apis/configuration.rs index 50e891c5..b598932e 100644 --- a/openapi/src/module/apis/configuration.rs +++ b/openapi/src/module/apis/configuration.rs @@ -20,12 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/module/apis/line_module_api.rs b/openapi/src/module/apis/line_module_api.rs index 27acf9e9..8e06723f 100644 --- a/openapi/src/module/apis/line_module_api.rs +++ b/openapi/src/module/apis/line_module_api.rs @@ -20,47 +20,45 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::module::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`acquire_chat_control`] #[derive(Clone, Debug)] pub struct AcquireChatControlParams { /// The `userId`, `roomId`, or `groupId` pub chat_id: String, - pub acquire_chat_control_request: Option + pub acquire_chat_control_request: Option, } /// struct for passing parameters to the method [`detach_module`] #[derive(Clone, Debug)] pub struct DetachModuleParams { - pub detach_module_request: Option + pub detach_module_request: Option, } /// struct for passing parameters to the method [`get_modules`] #[derive(Clone, Debug)] pub struct GetModulesParams { - /// Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all basic information about the bots in one request, include this parameter to get the remaining array. + /// Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all basic information about the bots in one request, include this parameter to get the remaining array. pub start: Option, - /// Specify the maximum number of bots that you get basic information from. The default value is 100. Max value: 100 - pub limit: Option + /// Specify the maximum number of bots that you get basic information from. The default value is 100. Max value: 100 + pub limit: Option, } /// struct for passing parameters to the method [`release_chat_control`] #[derive(Clone, Debug)] pub struct ReleaseChatControlParams { /// The `userId`, `roomId`, or `groupId` - pub chat_id: String + pub chat_id: String, } - /// struct for typed errors of method [`acquire_chat_control`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -89,23 +87,30 @@ pub enum ReleaseChatControlError { UnknownValue(serde_json::Value), } - -/// If the Standby Channel wants to take the initiative (Chat Control), it calls the Acquire Control API. The channel that was previously an Active Channel will automatically switch to a Standby Channel. -pub async fn acquire_chat_control(configuration: &configuration::Configuration, params: AcquireChatControlParams) -> Result<(), Error> { +/// If the Standby Channel wants to take the initiative (Chat Control), it calls the Acquire Control API. The channel that was previously an Active Channel will automatically switch to a Standby Channel. +pub async fn acquire_chat_control( + configuration: &configuration::Configuration, + params: AcquireChatControlParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let chat_id = params.chat_id; let acquire_chat_control_request = params.acquire_chat_control_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/chat/{chatId}/control/acquire", local_var_configuration.base_path, chatId=crate::module::apis::urlencode(chat_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/chat/{chatId}/control/acquire", + local_var_configuration.base_path, + chatId = crate::module::apis::urlencode(chat_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -121,27 +126,39 @@ pub async fn acquire_chat_control(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// The module channel admin calls the Detach API to detach the module channel from a LINE Official Account. -pub async fn detach_module(configuration: &configuration::Configuration, params: DetachModuleParams) -> Result<(), Error> { +pub async fn detach_module( + configuration: &configuration::Configuration, + params: DetachModuleParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let detach_module_request = params.detach_module_request; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/channel/detach", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/channel/detach", + local_var_configuration.base_path + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -157,34 +174,45 @@ pub async fn detach_module(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } /// Gets a list of basic information about the bots of multiple LINE Official Accounts that have attached module channels. -pub async fn get_modules(configuration: &configuration::Configuration, params: GetModulesParams) -> Result> { +pub async fn get_modules( + configuration: &configuration::Configuration, + params: GetModulesParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let start = params.start; let limit = params.limit; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/v2/bot/list", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); if let Some(ref local_var_str) = start { - local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("start", &local_var_str.to_string())]); } if let Some(ref local_var_str) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); + local_var_req_builder = + local_var_req_builder.query(&[("limit", &local_var_str.to_string())]); } if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -199,27 +227,40 @@ pub async fn get_modules(configuration: &configuration::Configuration, params: G if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } -/// To return the initiative (Chat Control) of Active Channel to Primary Channel, call the Release Control API. -pub async fn release_chat_control(configuration: &configuration::Configuration, params: ReleaseChatControlParams) -> Result<(), Error> { +/// To return the initiative (Chat Control) of Active Channel to Primary Channel, call the Release Control API. +pub async fn release_chat_control( + configuration: &configuration::Configuration, + params: ReleaseChatControlParams, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let chat_id = params.chat_id; - let local_var_client = &local_var_configuration.client; - let local_var_uri_str = format!("{}/v2/bot/chat/{chatId}/control/release", local_var_configuration.base_path, chatId=crate::module::apis::urlencode(chat_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let local_var_uri_str = format!( + "{}/v2/bot/chat/{chatId}/control/release", + local_var_configuration.base_path, + chatId = crate::module::apis::urlencode(chat_id) + ); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -234,9 +275,13 @@ pub async fn release_chat_control(configuration: &configuration::Configuration, if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/module/apis/mod.rs b/openapi/src/module/apis/mod.rs index f75a39f2..d1cba450 100644 --- a/openapi/src/module/apis/mod.rs +++ b/openapi/src/module/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/module/models/acquire_chat_control_request.rs b/openapi/src/module/models/acquire_chat_control_request.rs index 86ad2616..7edeefd1 100644 --- a/openapi/src/module/models/acquire_chat_control_request.rs +++ b/openapi/src/module/models/acquire_chat_control_request.rs @@ -20,20 +20,18 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// AcquireChatControlRequest : Request entity of the Acquire Control API - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AcquireChatControlRequest { - /// `True`: After the time limit (ttl) has passed, the initiative (Chat Control) will return to the Primary Channel. (Default) `False`: There's no time limit and the initiative (Chat Control) doesn't change over time. + /// `True`: After the time limit (ttl) has passed, the initiative (Chat Control) will return to the Primary Channel. (Default) `False`: There's no time limit and the initiative (Chat Control) doesn't change over time. #[serde(rename = "expired", skip_serializing_if = "Option::is_none")] pub expired: Option, - /// The time it takes for initiative (Chat Control) to return to the Primary Channel (the time that the module channel stays on the Active Channel). The value is specified in seconds. The maximum value is one year (3600 * 24 * 365). The default value is 3600 (1 hour). * Ignored if the value of expired is false. + /// The time it takes for initiative (Chat Control) to return to the Primary Channel (the time that the module channel stays on the Active Channel). The value is specified in seconds. The maximum value is one year (3600 * 24 * 365). The default value is 3600 (1 hour). * Ignored if the value of expired is false. #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")] pub ttl: Option, } @@ -47,5 +45,3 @@ impl AcquireChatControlRequest { } } } - - diff --git a/openapi/src/module/models/detach_module_request.rs b/openapi/src/module/models/detach_module_request.rs index cb8f266b..8adda0eb 100644 --- a/openapi/src/module/models/detach_module_request.rs +++ b/openapi/src/module/models/detach_module_request.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// DetachModuleRequest : Unlink (detach) the module channel by the operation of the module channel administrator - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DetachModuleRequest { /// User ID of the LINE Official Account bot attached to the module channel. @@ -38,10 +36,6 @@ pub struct DetachModuleRequest { impl DetachModuleRequest { /// Unlink (detach) the module channel by the operation of the module channel administrator pub fn new() -> DetachModuleRequest { - DetachModuleRequest { - bot_id: None, - } + DetachModuleRequest { bot_id: None } } } - - diff --git a/openapi/src/module/models/get_modules_response.rs b/openapi/src/module/models/get_modules_response.rs index e20764b0..1db80c07 100644 --- a/openapi/src/module/models/get_modules_response.rs +++ b/openapi/src/module/models/get_modules_response.rs @@ -20,20 +20,18 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// GetModulesResponse : List of bots to which the module is attached - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GetModulesResponse { /// Array of Bot list Item objects representing basic information about the bot. #[serde(rename = "bots")] pub bots: Vec, - /// Continuation token. Used to get the next array of basic bot information. This property is only returned if there are more unreturned results. + /// Continuation token. Used to get the next array of basic bot information. This property is only returned if there are more unreturned results. #[serde(rename = "next", skip_serializing_if = "Option::is_none")] pub next: Option, } @@ -41,11 +39,6 @@ pub struct GetModulesResponse { impl GetModulesResponse { /// List of bots to which the module is attached pub fn new(bots: Vec) -> GetModulesResponse { - GetModulesResponse { - bots, - next: None, - } + GetModulesResponse { bots, next: None } } } - - diff --git a/openapi/src/module/models/module_bot.rs b/openapi/src/module/models/module_bot.rs index 4518f55a..4fba3acf 100644 --- a/openapi/src/module/models/module_bot.rs +++ b/openapi/src/module/models/module_bot.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// ModuleBot : basic information about the bot. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ModuleBot { /// Bot's user ID @@ -59,5 +57,3 @@ impl ModuleBot { } } } - - diff --git a/openapi/src/module_attach/apis/configuration.rs b/openapi/src/module_attach/apis/configuration.rs index 4fcfaa83..f65adffe 100644 --- a/openapi/src/module_attach/apis/configuration.rs +++ b/openapi/src/module_attach/apis/configuration.rs @@ -20,12 +20,10 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/module_attach/apis/line_module_attach_api.rs b/openapi/src/module_attach/apis/line_module_attach_api.rs index 8727c9c2..e4d9d34a 100644 --- a/openapi/src/module_attach/apis/line_module_attach_api.rs +++ b/openapi/src/module_attach/apis/line_module_attach_api.rs @@ -20,15 +20,14 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::module_attach::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`attach_module`] #[derive(Clone, Debug)] @@ -41,21 +40,20 @@ pub struct AttachModuleParams { pub redirect_uri: Option, /// Specify when using PKCE (Proof Key for Code Exchange) defined in the OAuth 2.0 extension specification as a countermeasure against authorization code interception attacks. pub code_verifier: Option, - /// Instead of using Authorization header, you can use this parameter to specify the channel ID of the module channel. You can find the channel ID of the module channel in the LINE Developers Console. + /// Instead of using Authorization header, you can use this parameter to specify the channel ID of the module channel. You can find the channel ID of the module channel in the LINE Developers Console. pub client_id: Option, - /// Instead of using Authorization header, you can use this parameter to specify the channel secret of the module channel. You can find the channel secret of the module channel in the LINE Developers Console. + /// Instead of using Authorization header, you can use this parameter to specify the channel secret of the module channel. You can find the channel secret of the module channel in the LINE Developers Console. pub client_secret: Option, - /// If you specified a value for region in the URL for authentication and authorization, specify the same value. + /// If you specified a value for region in the URL for authentication and authorization, specify the same value. pub region: Option, /// If you specified a value for basic_search_id in the URL for authentication and authorization, specify the same value. pub basic_search_id: Option, /// If you specified a value for scope in the URL for authentication and authorization, specify the same value. pub scope: Option, /// If you specified a value for brand_type in the URL for authentication and authorization, specify the same value. - pub brand_type: Option + pub brand_type: Option, } - /// struct for typed errors of method [`attach_module`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -63,9 +61,11 @@ pub enum AttachModuleError { UnknownValue(serde_json::Value), } - /// Attach by operation of the module channel provider -pub async fn attach_module(configuration: &configuration::Configuration, params: AttachModuleParams) -> Result> { +pub async fn attach_module( + configuration: &configuration::Configuration, + params: AttachModuleParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters @@ -80,17 +80,21 @@ pub async fn attach_module(configuration: &configuration::Configuration, params: let scope = params.scope; let brand_type = params.brand_type; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/module/auth/v1/token", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth { - local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned()); + local_var_req_builder = local_var_req_builder.basic_auth( + local_var_auth_conf.0.to_owned(), + local_var_auth_conf.1.to_owned(), + ); }; let mut local_var_form_params = std::collections::HashMap::new(); if let Some(local_var_param_value) = grant_type { @@ -134,9 +138,13 @@ pub async fn attach_module(configuration: &configuration::Configuration, params: if !local_var_status.is_client_error() && !local_var_status.is_server_error() { serde_json::from_str(&local_var_content).map_err(Error::from) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/module_attach/apis/mod.rs b/openapi/src/module_attach/apis/mod.rs index 38e458d4..fadb8439 100644 --- a/openapi/src/module_attach/apis/mod.rs +++ b/openapi/src/module_attach/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/module_attach/models/attach_module_response.rs b/openapi/src/module_attach/models/attach_module_response.rs index 4e9b7524..40f237c6 100644 --- a/openapi/src/module_attach/models/attach_module_response.rs +++ b/openapi/src/module_attach/models/attach_module_response.rs @@ -20,14 +20,12 @@ * This document describes LINE Messaging API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// AttachModuleResponse : Attach by operation of the module channel provider - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AttachModuleResponse { /// User ID of the bot on the LINE Official Account. @@ -41,11 +39,6 @@ pub struct AttachModuleResponse { impl AttachModuleResponse { /// Attach by operation of the module channel provider pub fn new(bot_id: String, scopes: Vec) -> AttachModuleResponse { - AttachModuleResponse { - bot_id, - scopes, - } + AttachModuleResponse { bot_id, scopes } } } - - diff --git a/openapi/src/shop/apis/configuration.rs b/openapi/src/shop/apis/configuration.rs index 2da5a682..fcdc4d9d 100644 --- a/openapi/src/shop/apis/configuration.rs +++ b/openapi/src/shop/apis/configuration.rs @@ -20,12 +20,10 @@ * This document describes LINE Mission Stickers API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/shop/apis/mod.rs b/openapi/src/shop/apis/mod.rs index 6041f555..264f2dc4 100644 --- a/openapi/src/shop/apis/mod.rs +++ b/openapi/src/shop/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/shop/apis/shop_api.rs b/openapi/src/shop/apis/shop_api.rs index 0105b650..a5fd200e 100644 --- a/openapi/src/shop/apis/shop_api.rs +++ b/openapi/src/shop/apis/shop_api.rs @@ -20,23 +20,21 @@ * This document describes LINE Mission Stickers API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::shop::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`mission_sticker_v3`] #[derive(Clone, Debug)] pub struct MissionStickerV3Params { - pub mission_sticker_request: crate::shop::models::MissionStickerRequest + pub mission_sticker_request: crate::shop::models::MissionStickerRequest, } - /// struct for typed errors of method [`mission_sticker_v3`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -44,22 +42,25 @@ pub enum MissionStickerV3Error { UnknownValue(serde_json::Value), } - /// Sends a mission sticker. -pub async fn mission_sticker_v3(configuration: &configuration::Configuration, params: MissionStickerV3Params) -> Result<(), Error> { +pub async fn mission_sticker_v3( + configuration: &configuration::Configuration, + params: MissionStickerV3Params, +) -> Result<(), Error> { let local_var_configuration = configuration; // unbox the parameters let mission_sticker_request = params.mission_sticker_request; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/shop/v3/mission", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } if let Some(ref local_var_token) = local_var_configuration.bearer_access_token { local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); @@ -75,9 +76,13 @@ pub async fn mission_sticker_v3(configuration: &configuration::Configuration, pa if !local_var_status.is_client_error() && !local_var_status.is_server_error() { Ok(()) } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_entity: Option = + serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/shop/models/error_response.rs b/openapi/src/shop/models/error_response.rs index 791631dc..7c1b903c 100644 --- a/openapi/src/shop/models/error_response.rs +++ b/openapi/src/shop/models/error_response.rs @@ -20,13 +20,10 @@ * This document describes LINE Mission Stickers API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorResponse { /// Message containing information about the error. @@ -36,10 +33,6 @@ pub struct ErrorResponse { impl ErrorResponse { pub fn new(message: String) -> ErrorResponse { - ErrorResponse { - message, - } + ErrorResponse { message } } } - - diff --git a/openapi/src/shop/models/mission_sticker_request.rs b/openapi/src/shop/models/mission_sticker_request.rs index 711af464..815bce2d 100644 --- a/openapi/src/shop/models/mission_sticker_request.rs +++ b/openapi/src/shop/models/mission_sticker_request.rs @@ -20,14 +20,12 @@ * This document describes LINE Mission Stickers API. * * The version of the OpenAPI document: 0.0.1 - * + * * Generated by: https://openapi-generator.tech */ /// MissionStickerRequest : Send mission stickers (v3) - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MissionStickerRequest { /// Destination user ID @@ -46,7 +44,12 @@ pub struct MissionStickerRequest { impl MissionStickerRequest { /// Send mission stickers (v3) - pub fn new(to: String, product_id: String, product_type: String, send_present_message: bool) -> MissionStickerRequest { + pub fn new( + to: String, + product_id: String, + product_type: String, + send_present_message: bool, + ) -> MissionStickerRequest { MissionStickerRequest { to, product_id, @@ -55,5 +58,3 @@ impl MissionStickerRequest { } } } - - diff --git a/openapi/src/webhook/apis/configuration.rs b/openapi/src/webhook/apis/configuration.rs index af18b32c..1d5fe847 100644 --- a/openapi/src/webhook/apis/configuration.rs +++ b/openapi/src/webhook/apis/configuration.rs @@ -20,12 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Debug, Clone)] pub struct Configuration { pub base_path: String, @@ -46,7 +44,6 @@ pub struct ApiKey { pub key: String, } - impl Configuration { pub fn new() -> Configuration { Configuration::default() @@ -63,7 +60,6 @@ impl Default for Configuration { oauth_access_token: None, bearer_access_token: None, api_key: None, - } } } diff --git a/openapi/src/webhook/apis/dummy_api.rs b/openapi/src/webhook/apis/dummy_api.rs index 911fb6f4..35ebdf5c 100644 --- a/openapi/src/webhook/apis/dummy_api.rs +++ b/openapi/src/webhook/apis/dummy_api.rs @@ -20,23 +20,21 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - use reqwest; +use super::{configuration, Error}; use crate::webhook::apis::ResponseContent; -use super::{Error, configuration}; /// struct for passing parameters to the method [`callback`] #[derive(Clone, Debug)] pub struct CallbackParams { - pub callback_request: crate::webhook::models::CallbackRequest + pub callback_request: crate::webhook::models::CallbackRequest, } - /// struct for typed errors of method [`callback`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -44,22 +42,25 @@ pub enum CallbackError { UnknownValue(serde_json::Value), } - /// This is the dummy endpoint to generate the model classes -pub async fn callback(configuration: &configuration::Configuration, params: CallbackParams) -> Result> { +pub async fn callback( + configuration: &configuration::Configuration, + params: CallbackParams, +) -> Result> { let local_var_configuration = configuration; // unbox the parameters let callback_request = params.callback_request; - let local_var_client = &local_var_configuration.client; let local_var_uri_str = format!("{}/callback", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let mut local_var_req_builder = + local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + local_var_req_builder = + local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); } local_var_req_builder = local_var_req_builder.json(&callback_request); @@ -73,8 +74,11 @@ pub async fn callback(configuration: &configuration::Configuration, params: Call serde_json::from_str(&local_var_content).map_err(Error::from) } else { let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + let local_var_error = ResponseContent { + status: local_var_status, + content: local_var_content, + entity: local_var_entity, + }; Err(Error::ResponseError(local_var_error)) } } - diff --git a/openapi/src/webhook/apis/mod.rs b/openapi/src/webhook/apis/mod.rs index 5c6267bf..1d67dad8 100644 --- a/openapi/src/webhook/apis/mod.rs +++ b/openapi/src/webhook/apis/mod.rs @@ -32,7 +32,7 @@ pub enum Error { ResponseError(ResponseContent), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), @@ -44,7 +44,7 @@ impl fmt::Display for Error { } } -impl error::Error for Error { +impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, @@ -55,19 +55,19 @@ impl error::Error for Error { } } -impl From for Error { +impl From for Error { fn from(e: reqwest::Error) -> Self { Error::Reqwest(e) } } -impl From for Error { +impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) } } -impl From for Error { +impl From for Error { fn from(e: std::io::Error) -> Self { Error::Io(e) } @@ -94,8 +94,10 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String value, )); } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + } + serde_json::Value::String(s) => { + params.push((format!("{}[{}]", prefix, key), s.clone())) + } _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), } } diff --git a/openapi/src/webhook/models/account_link_event.rs b/openapi/src/webhook/models/account_link_event.rs index 10d932f2..804090c8 100644 --- a/openapi/src/webhook/models/account_link_event.rs +++ b/openapi/src/webhook/models/account_link_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// AccountLinkEvent : Event object for when a user has linked their LINE account with a provider's service account. You can reply to account link events. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AccountLinkEvent { /// Type of the event @@ -54,7 +52,14 @@ pub struct AccountLinkEvent { impl AccountLinkEvent { /// Event object for when a user has linked their LINE account with a provider's service account. You can reply to account link events. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, link: crate::webhook::models::LinkContent) -> AccountLinkEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + link: crate::webhook::models::LinkContent, + ) -> AccountLinkEvent { AccountLinkEvent { r#type, source: None, @@ -67,5 +72,3 @@ impl AccountLinkEvent { } } } - - diff --git a/openapi/src/webhook/models/action_result.rs b/openapi/src/webhook/models/action_result.rs index 653a96e9..b594a8a6 100644 --- a/openapi/src/webhook/models/action_result.rs +++ b/openapi/src/webhook/models/action_result.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ActionResult { #[serde(rename = "type")] @@ -38,14 +35,11 @@ pub struct ActionResult { impl ActionResult { pub fn new(r#type: TypeWebhook) -> ActionResult { - ActionResult { - r#type, - data: None, - } + ActionResult { r#type, data: None } } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum TypeWebhook { #[serde(rename = "void")] @@ -59,4 +53,3 @@ impl Default for TypeWebhook { Self::Void } } - diff --git a/openapi/src/webhook/models/activated_event.rs b/openapi/src/webhook/models/activated_event.rs index 0c95745d..a1457880 100644 --- a/openapi/src/webhook/models/activated_event.rs +++ b/openapi/src/webhook/models/activated_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// ActivatedEvent : This event indicates that the module channel has been switched to Active Channel by calling the Acquire Control API. Sent to the webhook URL server of the module channel. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ActivatedEvent { /// Type of the event @@ -51,7 +49,14 @@ pub struct ActivatedEvent { impl ActivatedEvent { /// This event indicates that the module channel has been switched to Active Channel by calling the Acquire Control API. Sent to the webhook URL server of the module channel. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, chat_control: crate::webhook::models::ChatControl) -> ActivatedEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + chat_control: crate::webhook::models::ChatControl, + ) -> ActivatedEvent { ActivatedEvent { r#type, source: None, @@ -63,5 +68,3 @@ impl ActivatedEvent { } } } - - diff --git a/openapi/src/webhook/models/all_mentionee.rs b/openapi/src/webhook/models/all_mentionee.rs index 2f6f2e32..52f28612 100644 --- a/openapi/src/webhook/models/all_mentionee.rs +++ b/openapi/src/webhook/models/all_mentionee.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// AllMentionee : Mentioned target is entire group - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AllMentionee { /// Mentioned target. @@ -51,5 +49,3 @@ impl AllMentionee { } } } - - diff --git a/openapi/src/webhook/models/attached_module_content.rs b/openapi/src/webhook/models/attached_module_content.rs index b8ad8f72..b44d24e6 100644 --- a/openapi/src/webhook/models/attached_module_content.rs +++ b/openapi/src/webhook/models/attached_module_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AttachedModuleContent { /// Type @@ -49,5 +46,3 @@ impl AttachedModuleContent { } } } - - diff --git a/openapi/src/webhook/models/audio_message_content.rs b/openapi/src/webhook/models/audio_message_content.rs index b22dba0e..b7993dfc 100644 --- a/openapi/src/webhook/models/audio_message_content.rs +++ b/openapi/src/webhook/models/audio_message_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct AudioMessageContent { /// Type @@ -43,7 +40,11 @@ pub struct AudioMessageContent { } impl AudioMessageContent { - pub fn new(r#type: String, id: String, content_provider: crate::webhook::models::ContentProvider) -> AudioMessageContent { + pub fn new( + r#type: String, + id: String, + content_provider: crate::webhook::models::ContentProvider, + ) -> AudioMessageContent { AudioMessageContent { r#type, id, @@ -52,5 +53,3 @@ impl AudioMessageContent { } } } - - diff --git a/openapi/src/webhook/models/beacon_content.rs b/openapi/src/webhook/models/beacon_content.rs index d2989d06..e222970a 100644 --- a/openapi/src/webhook/models/beacon_content.rs +++ b/openapi/src/webhook/models/beacon_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BeaconContent { /// Hardware ID of the beacon that was detected @@ -66,4 +63,3 @@ impl Default for TypeWebhook { Self::Enter } } - diff --git a/openapi/src/webhook/models/beacon_event.rs b/openapi/src/webhook/models/beacon_event.rs index c969b9ff..482c092c 100644 --- a/openapi/src/webhook/models/beacon_event.rs +++ b/openapi/src/webhook/models/beacon_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// BeaconEvent : Event object for when a user enters the range of a LINE Beacon. You can reply to beacon events. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BeaconEvent { /// Type of the event @@ -54,7 +52,15 @@ pub struct BeaconEvent { impl BeaconEvent { /// Event object for when a user enters the range of a LINE Beacon. You can reply to beacon events. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, reply_token: String, beacon: crate::webhook::models::BeaconContent) -> BeaconEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + reply_token: String, + beacon: crate::webhook::models::BeaconContent, + ) -> BeaconEvent { BeaconEvent { r#type, source: None, @@ -67,5 +73,3 @@ impl BeaconEvent { } } } - - diff --git a/openapi/src/webhook/models/bot_resumed_event.rs b/openapi/src/webhook/models/bot_resumed_event.rs index c19f379b..46e9a1de 100644 --- a/openapi/src/webhook/models/bot_resumed_event.rs +++ b/openapi/src/webhook/models/bot_resumed_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// BotResumedEvent : This event indicates that the LINE Official Account has returned from the suspended state. Sent to the webhook URL server of the module channel. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BotResumedEvent { /// Type of the event @@ -49,7 +47,13 @@ pub struct BotResumedEvent { impl BotResumedEvent { /// This event indicates that the LINE Official Account has returned from the suspended state. Sent to the webhook URL server of the module channel. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext) -> BotResumedEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + ) -> BotResumedEvent { BotResumedEvent { r#type, source: None, @@ -60,5 +64,3 @@ impl BotResumedEvent { } } } - - diff --git a/openapi/src/webhook/models/bot_suspended_event.rs b/openapi/src/webhook/models/bot_suspended_event.rs index e9e8925f..96ae5868 100644 --- a/openapi/src/webhook/models/bot_suspended_event.rs +++ b/openapi/src/webhook/models/bot_suspended_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// BotSuspendedEvent : This event indicates that the LINE Official Account has been suspended (Suspend). Sent to the webhook URL server of the module channel. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct BotSuspendedEvent { /// Type of the event @@ -49,7 +47,13 @@ pub struct BotSuspendedEvent { impl BotSuspendedEvent { /// This event indicates that the LINE Official Account has been suspended (Suspend). Sent to the webhook URL server of the module channel. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext) -> BotSuspendedEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + ) -> BotSuspendedEvent { BotSuspendedEvent { r#type, source: None, @@ -60,5 +64,3 @@ impl BotSuspendedEvent { } } } - - diff --git a/openapi/src/webhook/models/callback_request.rs b/openapi/src/webhook/models/callback_request.rs index 418ec40d..2974c7fd 100644 --- a/openapi/src/webhook/models/callback_request.rs +++ b/openapi/src/webhook/models/callback_request.rs @@ -20,26 +20,24 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ -/// CallbackRequest : The request body contains a JSON object with the user ID of a bot that should receive webhook events and an array of webhook event objects. - - +/// CallbackRequest : The request body contains a JSON object with the user ID of a bot that should receive webhook events and an array of webhook event objects. #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct CallbackRequest { - /// User ID of a bot that should receive webhook events. The user ID value is a string that matches the regular expression, `U[0-9a-f]{32}`. + /// User ID of a bot that should receive webhook events. The user ID value is a string that matches the regular expression, `U[0-9a-f]{32}`. #[serde(rename = "destination")] pub destination: String, - /// Array of webhook event objects. The LINE Platform may send an empty array that doesn't include a webhook event object to confirm communication. + /// Array of webhook event objects. The LINE Platform may send an empty array that doesn't include a webhook event object to confirm communication. #[serde(rename = "events")] pub events: Vec, } impl CallbackRequest { - /// The request body contains a JSON object with the user ID of a bot that should receive webhook events and an array of webhook event objects. + /// The request body contains a JSON object with the user ID of a bot that should receive webhook events and an array of webhook event objects. pub fn new(destination: String, events: Vec) -> CallbackRequest { CallbackRequest { destination, @@ -47,5 +45,3 @@ impl CallbackRequest { } } } - - diff --git a/openapi/src/webhook/models/chat_control.rs b/openapi/src/webhook/models/chat_control.rs index 24e35f14..07dd8929 100644 --- a/openapi/src/webhook/models/chat_control.rs +++ b/openapi/src/webhook/models/chat_control.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ChatControl { #[serde(rename = "expireAt")] @@ -35,10 +32,6 @@ pub struct ChatControl { impl ChatControl { pub fn new(expire_at: i64) -> ChatControl { - ChatControl { - expire_at, - } + ChatControl { expire_at } } } - - diff --git a/openapi/src/webhook/models/content_provider.rs b/openapi/src/webhook/models/content_provider.rs index bba4d798..daf5ead1 100644 --- a/openapi/src/webhook/models/content_provider.rs +++ b/openapi/src/webhook/models/content_provider.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// ContentProvider : Provider of the media file. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ContentProvider { /// Provider of the image file. @@ -66,4 +64,3 @@ impl Default for TypeWebhook { Self::Line } } - diff --git a/openapi/src/webhook/models/deactivated_event.rs b/openapi/src/webhook/models/deactivated_event.rs index c92e883c..dc2b03dc 100644 --- a/openapi/src/webhook/models/deactivated_event.rs +++ b/openapi/src/webhook/models/deactivated_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// DeactivatedEvent : This event indicates that the module channel has been switched to Standby Channel by calling Acquire Control API or Release Control API. Sent to the webhook URL server of the module channel. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DeactivatedEvent { /// Type of the event @@ -49,7 +47,13 @@ pub struct DeactivatedEvent { impl DeactivatedEvent { /// This event indicates that the module channel has been switched to Standby Channel by calling Acquire Control API or Release Control API. Sent to the webhook URL server of the module channel. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext) -> DeactivatedEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + ) -> DeactivatedEvent { DeactivatedEvent { r#type, source: None, @@ -60,5 +64,3 @@ impl DeactivatedEvent { } } } - - diff --git a/openapi/src/webhook/models/delivery_context.rs b/openapi/src/webhook/models/delivery_context.rs index 037588aa..d1f1fba7 100644 --- a/openapi/src/webhook/models/delivery_context.rs +++ b/openapi/src/webhook/models/delivery_context.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// DeliveryContext : webhook's delivery context information - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DeliveryContext { /// Whether the webhook event is a redelivered one or not. @@ -38,10 +36,6 @@ pub struct DeliveryContext { impl DeliveryContext { /// webhook's delivery context information pub fn new(is_redelivery: bool) -> DeliveryContext { - DeliveryContext { - is_redelivery, - } + DeliveryContext { is_redelivery } } } - - diff --git a/openapi/src/webhook/models/detached_module_content.rs b/openapi/src/webhook/models/detached_module_content.rs index 8142fa8c..a7f031f5 100644 --- a/openapi/src/webhook/models/detached_module_content.rs +++ b/openapi/src/webhook/models/detached_module_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct DetachedModuleContent { /// Type @@ -62,4 +59,3 @@ impl Default for ReasonWebhook { Self::BotDeleted } } - diff --git a/openapi/src/webhook/models/emoji.rs b/openapi/src/webhook/models/emoji.rs index 39370967..76761f44 100644 --- a/openapi/src/webhook/models/emoji.rs +++ b/openapi/src/webhook/models/emoji.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Emoji { /// Index position for a character in text, with the first character being at position 0. @@ -53,5 +50,3 @@ impl Emoji { } } } - - diff --git a/openapi/src/webhook/models/event.rs b/openapi/src/webhook/models/event.rs index 7c4881d0..41dc00db 100644 --- a/openapi/src/webhook/models/event.rs +++ b/openapi/src/webhook/models/event.rs @@ -20,18 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// Event : Webhook event - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum Event { -} - - - - +pub enum Event {} diff --git a/openapi/src/webhook/models/event_mode.rs b/openapi/src/webhook/models/event_mode.rs index 241c3f30..5549bb03 100644 --- a/openapi/src/webhook/models/event_mode.rs +++ b/openapi/src/webhook/models/event_mode.rs @@ -20,7 +20,7 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ @@ -33,7 +33,6 @@ pub enum EventMode { Active, #[serde(rename = "standby")] Standby, - } impl ToString for EventMode { @@ -50,7 +49,3 @@ impl Default for EventMode { Self::Active } } - - - - diff --git a/openapi/src/webhook/models/file_message_content.rs b/openapi/src/webhook/models/file_message_content.rs index b7ccfa7d..8cc8fdaf 100644 --- a/openapi/src/webhook/models/file_message_content.rs +++ b/openapi/src/webhook/models/file_message_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FileMessageContent { /// Type @@ -44,7 +41,12 @@ pub struct FileMessageContent { } impl FileMessageContent { - pub fn new(r#type: String, id: String, file_name: String, file_size: i32) -> FileMessageContent { + pub fn new( + r#type: String, + id: String, + file_name: String, + file_size: i32, + ) -> FileMessageContent { FileMessageContent { r#type, id, @@ -53,5 +55,3 @@ impl FileMessageContent { } } } - - diff --git a/openapi/src/webhook/models/follow_event.rs b/openapi/src/webhook/models/follow_event.rs index 541eba63..47213b8b 100644 --- a/openapi/src/webhook/models/follow_event.rs +++ b/openapi/src/webhook/models/follow_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// FollowEvent : Event object for when your LINE Official Account is added as a friend (or unblocked). You can reply to follow events. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct FollowEvent { /// Type of the event @@ -52,7 +50,14 @@ pub struct FollowEvent { impl FollowEvent { /// Event object for when your LINE Official Account is added as a friend (or unblocked). You can reply to follow events. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, reply_token: String) -> FollowEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + reply_token: String, + ) -> FollowEvent { FollowEvent { r#type, source: None, @@ -64,5 +69,3 @@ impl FollowEvent { } } } - - diff --git a/openapi/src/webhook/models/group_source.rs b/openapi/src/webhook/models/group_source.rs index a2cd1b67..0eba4442 100644 --- a/openapi/src/webhook/models/group_source.rs +++ b/openapi/src/webhook/models/group_source.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct GroupSource { /// source type @@ -49,5 +46,3 @@ impl GroupSource { } } } - - diff --git a/openapi/src/webhook/models/image_message_content.rs b/openapi/src/webhook/models/image_message_content.rs index bf19d9af..dd1244a8 100644 --- a/openapi/src/webhook/models/image_message_content.rs +++ b/openapi/src/webhook/models/image_message_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImageMessageContent { /// Type @@ -39,13 +36,18 @@ pub struct ImageMessageContent { pub content_provider: Box, #[serde(rename = "imageSet", skip_serializing_if = "Option::is_none")] pub image_set: Option>, - /// Quote token to quote this message. + /// Quote token to quote this message. #[serde(rename = "quoteToken")] pub quote_token: String, } impl ImageMessageContent { - pub fn new(r#type: String, id: String, content_provider: crate::webhook::models::ContentProvider, quote_token: String) -> ImageMessageContent { + pub fn new( + r#type: String, + id: String, + content_provider: crate::webhook::models::ContentProvider, + quote_token: String, + ) -> ImageMessageContent { ImageMessageContent { r#type, id, @@ -55,5 +57,3 @@ impl ImageMessageContent { } } } - - diff --git a/openapi/src/webhook/models/image_set.rs b/openapi/src/webhook/models/image_set.rs index faa77092..c6adbe92 100644 --- a/openapi/src/webhook/models/image_set.rs +++ b/openapi/src/webhook/models/image_set.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ImageSet { /// Image set ID. Only included when multiple images are sent simultaneously. @@ -49,5 +46,3 @@ impl ImageSet { } } } - - diff --git a/openapi/src/webhook/models/join_event.rs b/openapi/src/webhook/models/join_event.rs index cc5f7931..ec9d1189 100644 --- a/openapi/src/webhook/models/join_event.rs +++ b/openapi/src/webhook/models/join_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// JoinEvent : Event object for when your LINE Official Account joins a group chat or multi-person chat. You can reply to join events. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct JoinEvent { /// Type of the event @@ -52,7 +50,14 @@ pub struct JoinEvent { impl JoinEvent { /// Event object for when your LINE Official Account joins a group chat or multi-person chat. You can reply to join events. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, reply_token: String) -> JoinEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + reply_token: String, + ) -> JoinEvent { JoinEvent { r#type, source: None, @@ -64,5 +69,3 @@ impl JoinEvent { } } } - - diff --git a/openapi/src/webhook/models/joined_members.rs b/openapi/src/webhook/models/joined_members.rs index b04a5166..03d01194 100644 --- a/openapi/src/webhook/models/joined_members.rs +++ b/openapi/src/webhook/models/joined_members.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct JoinedMembers { /// Users who joined. Array of source user objects. @@ -36,10 +33,6 @@ pub struct JoinedMembers { impl JoinedMembers { pub fn new(members: Vec) -> JoinedMembers { - JoinedMembers { - members, - } + JoinedMembers { members } } } - - diff --git a/openapi/src/webhook/models/leave_event.rs b/openapi/src/webhook/models/leave_event.rs index 9134827c..7090d236 100644 --- a/openapi/src/webhook/models/leave_event.rs +++ b/openapi/src/webhook/models/leave_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// LeaveEvent : Event object for when a user removes your LINE Official Account from a group chat or when your LINE Official Account leaves a group chat or multi-person chat. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LeaveEvent { /// Type of the event @@ -49,7 +47,13 @@ pub struct LeaveEvent { impl LeaveEvent { /// Event object for when a user removes your LINE Official Account from a group chat or when your LINE Official Account leaves a group chat or multi-person chat. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext) -> LeaveEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + ) -> LeaveEvent { LeaveEvent { r#type, source: None, @@ -60,5 +64,3 @@ impl LeaveEvent { } } } - - diff --git a/openapi/src/webhook/models/left_members.rs b/openapi/src/webhook/models/left_members.rs index 43178258..bde6572b 100644 --- a/openapi/src/webhook/models/left_members.rs +++ b/openapi/src/webhook/models/left_members.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LeftMembers { /// Users who left. Array of source user objects. @@ -36,10 +33,6 @@ pub struct LeftMembers { impl LeftMembers { pub fn new(members: Vec) -> LeftMembers { - LeftMembers { - members, - } + LeftMembers { members } } } - - diff --git a/openapi/src/webhook/models/link_content.rs b/openapi/src/webhook/models/link_content.rs index cd64d946..377c2c13 100644 --- a/openapi/src/webhook/models/link_content.rs +++ b/openapi/src/webhook/models/link_content.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// LinkContent : Content of the account link event. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LinkContent { /// One of the following values to indicate whether linking the account was successful or not @@ -41,10 +39,7 @@ pub struct LinkContent { impl LinkContent { /// Content of the account link event. pub fn new(result: ResultWebhook, nonce: String) -> LinkContent { - LinkContent { - result, - nonce, - } + LinkContent { result, nonce } } } @@ -62,4 +57,3 @@ impl Default for ResultWebhook { Self::Ok } } - diff --git a/openapi/src/webhook/models/link_things_content.rs b/openapi/src/webhook/models/link_things_content.rs index 201ed4af..b23b64e5 100644 --- a/openapi/src/webhook/models/link_things_content.rs +++ b/openapi/src/webhook/models/link_things_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LinkThingsContent { /// Type @@ -39,11 +36,6 @@ pub struct LinkThingsContent { impl LinkThingsContent { pub fn new(r#type: String, device_id: String) -> LinkThingsContent { - LinkThingsContent { - r#type, - device_id, - } + LinkThingsContent { r#type, device_id } } } - - diff --git a/openapi/src/webhook/models/location_message_content.rs b/openapi/src/webhook/models/location_message_content.rs index ee1dad7b..3bd7e0d2 100644 --- a/openapi/src/webhook/models/location_message_content.rs +++ b/openapi/src/webhook/models/location_message_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct LocationMessageContent { /// Type @@ -50,7 +47,12 @@ pub struct LocationMessageContent { } impl LocationMessageContent { - pub fn new(r#type: String, id: String, latitude: f64, longitude: f64) -> LocationMessageContent { + pub fn new( + r#type: String, + id: String, + latitude: f64, + longitude: f64, + ) -> LocationMessageContent { LocationMessageContent { r#type, id, @@ -61,5 +63,3 @@ impl LocationMessageContent { } } } - - diff --git a/openapi/src/webhook/models/member_joined_event.rs b/openapi/src/webhook/models/member_joined_event.rs index 4ad9ea69..9b6f71c9 100644 --- a/openapi/src/webhook/models/member_joined_event.rs +++ b/openapi/src/webhook/models/member_joined_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// MemberJoinedEvent : Event object for when a user joins a group chat or multi-person chat that the LINE Official Account is in. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MemberJoinedEvent { /// Type of the event @@ -54,7 +52,15 @@ pub struct MemberJoinedEvent { impl MemberJoinedEvent { /// Event object for when a user joins a group chat or multi-person chat that the LINE Official Account is in. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, reply_token: String, joined: crate::webhook::models::JoinedMembers) -> MemberJoinedEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + reply_token: String, + joined: crate::webhook::models::JoinedMembers, + ) -> MemberJoinedEvent { MemberJoinedEvent { r#type, source: None, @@ -67,5 +73,3 @@ impl MemberJoinedEvent { } } } - - diff --git a/openapi/src/webhook/models/member_left_event.rs b/openapi/src/webhook/models/member_left_event.rs index 1d4c5fcc..6a7c86f6 100644 --- a/openapi/src/webhook/models/member_left_event.rs +++ b/openapi/src/webhook/models/member_left_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// MemberLeftEvent : Event object for when a user leaves a group chat or multi-person chat that the LINE Official Account is in. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MemberLeftEvent { /// Type of the event @@ -51,7 +49,14 @@ pub struct MemberLeftEvent { impl MemberLeftEvent { /// Event object for when a user leaves a group chat or multi-person chat that the LINE Official Account is in. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, left: crate::webhook::models::LeftMembers) -> MemberLeftEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + left: crate::webhook::models::LeftMembers, + ) -> MemberLeftEvent { MemberLeftEvent { r#type, source: None, @@ -63,5 +68,3 @@ impl MemberLeftEvent { } } } - - diff --git a/openapi/src/webhook/models/mention.rs b/openapi/src/webhook/models/mention.rs index d1f9cce7..64994162 100644 --- a/openapi/src/webhook/models/mention.rs +++ b/openapi/src/webhook/models/mention.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Mention { /// Array of one or more mention objects. Max: 20 mentions @@ -36,10 +33,6 @@ pub struct Mention { impl Mention { pub fn new(mentionees: Vec) -> Mention { - Mention { - mentionees, - } + Mention { mentionees } } } - - diff --git a/openapi/src/webhook/models/mentionee.rs b/openapi/src/webhook/models/mentionee.rs index 01b73957..d5f265b1 100644 --- a/openapi/src/webhook/models/mentionee.rs +++ b/openapi/src/webhook/models/mentionee.rs @@ -20,17 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum Mentionee { -} - - - - +pub enum Mentionee {} diff --git a/openapi/src/webhook/models/message_content.rs b/openapi/src/webhook/models/message_content.rs index bcc1803b..ac543ae6 100644 --- a/openapi/src/webhook/models/message_content.rs +++ b/openapi/src/webhook/models/message_content.rs @@ -20,17 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum MessageContent { -} - - - - +pub enum MessageContent {} diff --git a/openapi/src/webhook/models/message_event.rs b/openapi/src/webhook/models/message_event.rs index 6904e75d..5825ad75 100644 --- a/openapi/src/webhook/models/message_event.rs +++ b/openapi/src/webhook/models/message_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// MessageEvent : Webhook event object which contains the sent message. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageEvent { /// Type of the event @@ -53,7 +51,14 @@ pub struct MessageEvent { impl MessageEvent { /// Webhook event object which contains the sent message. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, message: crate::webhook::models::MessageContent) -> MessageEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + message: crate::webhook::models::MessageContent, + ) -> MessageEvent { MessageEvent { r#type, source: None, @@ -66,5 +71,3 @@ impl MessageEvent { } } } - - diff --git a/openapi/src/webhook/models/module_content.rs b/openapi/src/webhook/models/module_content.rs index c41b3a10..a4107a5b 100644 --- a/openapi/src/webhook/models/module_content.rs +++ b/openapi/src/webhook/models/module_content.rs @@ -20,17 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum ModuleContent { -} - - - - +pub enum ModuleContent {} diff --git a/openapi/src/webhook/models/module_event.rs b/openapi/src/webhook/models/module_event.rs index 1801608a..348a8a63 100644 --- a/openapi/src/webhook/models/module_event.rs +++ b/openapi/src/webhook/models/module_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// ModuleEvent : This event indicates that the module channel has been attached to the LINE Official Account. Sent to the webhook URL server of the module channel. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ModuleEvent { /// Type of the event @@ -51,7 +49,14 @@ pub struct ModuleEvent { impl ModuleEvent { /// This event indicates that the module channel has been attached to the LINE Official Account. Sent to the webhook URL server of the module channel. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, module: crate::webhook::models::ModuleContent) -> ModuleEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + module: crate::webhook::models::ModuleContent, + ) -> ModuleEvent { ModuleEvent { r#type, source: None, @@ -63,5 +68,3 @@ impl ModuleEvent { } } } - - diff --git a/openapi/src/webhook/models/postback_content.rs b/openapi/src/webhook/models/postback_content.rs index 148a6c49..f67be605 100644 --- a/openapi/src/webhook/models/postback_content.rs +++ b/openapi/src/webhook/models/postback_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PostbackContent { /// Postback data @@ -38,11 +35,6 @@ pub struct PostbackContent { impl PostbackContent { pub fn new(data: String) -> PostbackContent { - PostbackContent { - data, - params: None, - } + PostbackContent { data, params: None } } } - - diff --git a/openapi/src/webhook/models/postback_event.rs b/openapi/src/webhook/models/postback_event.rs index 88839e6b..c50a566c 100644 --- a/openapi/src/webhook/models/postback_event.rs +++ b/openapi/src/webhook/models/postback_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// PostbackEvent : Event object for when a user performs a postback action which initiates a postback. You can reply to postback events. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PostbackEvent { /// Type of the event @@ -54,7 +52,14 @@ pub struct PostbackEvent { impl PostbackEvent { /// Event object for when a user performs a postback action which initiates a postback. You can reply to postback events. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, postback: crate::webhook::models::PostbackContent) -> PostbackEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + postback: crate::webhook::models::PostbackContent, + ) -> PostbackEvent { PostbackEvent { r#type, source: None, @@ -67,5 +72,3 @@ impl PostbackEvent { } } } - - diff --git a/openapi/src/webhook/models/room_source.rs b/openapi/src/webhook/models/room_source.rs index 7a65e9e4..eea1e7eb 100644 --- a/openapi/src/webhook/models/room_source.rs +++ b/openapi/src/webhook/models/room_source.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct RoomSource { /// source type @@ -49,5 +46,3 @@ impl RoomSource { } } } - - diff --git a/openapi/src/webhook/models/scenario_result.rs b/openapi/src/webhook/models/scenario_result.rs index 9f9c8a9e..ace8ef8c 100644 --- a/openapi/src/webhook/models/scenario_result.rs +++ b/openapi/src/webhook/models/scenario_result.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ScenarioResult { /// Scenario ID executed @@ -48,7 +45,10 @@ pub struct ScenarioResult { #[serde(rename = "actionResults", skip_serializing_if = "Option::is_none")] pub action_results: Option>, /// Data contained in notification. - #[serde(rename = "bleNotificationPayload", skip_serializing_if = "Option::is_none")] + #[serde( + rename = "bleNotificationPayload", + skip_serializing_if = "Option::is_none" + )] pub ble_notification_payload: Option, /// Error reason. #[serde(rename = "errorReason", skip_serializing_if = "Option::is_none")] @@ -69,5 +69,3 @@ impl ScenarioResult { } } } - - diff --git a/openapi/src/webhook/models/scenario_result_things_content.rs b/openapi/src/webhook/models/scenario_result_things_content.rs index 5d7b57b5..15ad5c5f 100644 --- a/openapi/src/webhook/models/scenario_result_things_content.rs +++ b/openapi/src/webhook/models/scenario_result_things_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ScenarioResultThingsContent { /// Type @@ -40,7 +37,11 @@ pub struct ScenarioResultThingsContent { } impl ScenarioResultThingsContent { - pub fn new(r#type: String, device_id: String, result: crate::webhook::models::ScenarioResult) -> ScenarioResultThingsContent { + pub fn new( + r#type: String, + device_id: String, + result: crate::webhook::models::ScenarioResult, + ) -> ScenarioResultThingsContent { ScenarioResultThingsContent { r#type, device_id, @@ -48,5 +49,3 @@ impl ScenarioResultThingsContent { } } } - - diff --git a/openapi/src/webhook/models/source.rs b/openapi/src/webhook/models/source.rs index a7268ac6..d3bd98e7 100644 --- a/openapi/src/webhook/models/source.rs +++ b/openapi/src/webhook/models/source.rs @@ -20,18 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// Source : the source of the event. - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum Source { -} - - - - +pub enum Source {} diff --git a/openapi/src/webhook/models/sticker_message_content.rs b/openapi/src/webhook/models/sticker_message_content.rs index 89fda409..9e8f62eb 100644 --- a/openapi/src/webhook/models/sticker_message_content.rs +++ b/openapi/src/webhook/models/sticker_message_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct StickerMessageContent { /// Type @@ -43,13 +40,13 @@ pub struct StickerMessageContent { pub sticker_id: String, #[serde(rename = "stickerResourceType")] pub sticker_resource_type: StickerResourceTypeWebhook, - /// Array of up to 15 keywords describing the sticker. If a sticker has 16 or more keywords, a random selection of 15 keywords will be returned. The keyword selection is random for each event, so different keywords may be returned for the same sticker. + /// Array of up to 15 keywords describing the sticker. If a sticker has 16 or more keywords, a random selection of 15 keywords will be returned. The keyword selection is random for each event, so different keywords may be returned for the same sticker. #[serde(rename = "keywords", skip_serializing_if = "Option::is_none")] pub keywords: Option>, - /// Any text entered by the user. This property is only included for message stickers. Max character limit: 100 + /// Any text entered by the user. This property is only included for message stickers. Max character limit: 100 #[serde(rename = "text", skip_serializing_if = "Option::is_none")] pub text: Option, - /// Quote token to quote this message. + /// Quote token to quote this message. #[serde(rename = "quoteToken")] pub quote_token: String, /// Message ID of a quoted message. Only included when the received message quotes a past message. @@ -58,7 +55,14 @@ pub struct StickerMessageContent { } impl StickerMessageContent { - pub fn new(r#type: String, id: String, package_id: String, sticker_id: String, sticker_resource_type: StickerResourceTypeWebhook, quote_token: String) -> StickerMessageContent { + pub fn new( + r#type: String, + id: String, + package_id: String, + sticker_id: String, + sticker_resource_type: StickerResourceTypeWebhook, + quote_token: String, + ) -> StickerMessageContent { StickerMessageContent { r#type, id, @@ -73,7 +77,7 @@ impl StickerMessageContent { } } -/// +/// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum StickerResourceTypeWebhook { #[serde(rename = "STATIC")] @@ -103,4 +107,3 @@ impl Default for StickerResourceTypeWebhook { Self::Static } } - diff --git a/openapi/src/webhook/models/text_message_content.rs b/openapi/src/webhook/models/text_message_content.rs index a6b4c599..50f34079 100644 --- a/openapi/src/webhook/models/text_message_content.rs +++ b/openapi/src/webhook/models/text_message_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct TextMessageContent { /// Type @@ -43,7 +40,7 @@ pub struct TextMessageContent { pub emojis: Option>, #[serde(rename = "mention", skip_serializing_if = "Option::is_none")] pub mention: Option>, - /// Quote token to quote this message. + /// Quote token to quote this message. #[serde(rename = "quoteToken")] pub quote_token: String, /// Message ID of a quoted message. Only included when the received message quotes a past message. @@ -52,7 +49,12 @@ pub struct TextMessageContent { } impl TextMessageContent { - pub fn new(r#type: String, id: String, text: String, quote_token: String) -> TextMessageContent { + pub fn new( + r#type: String, + id: String, + text: String, + quote_token: String, + ) -> TextMessageContent { TextMessageContent { r#type, id, @@ -64,5 +66,3 @@ impl TextMessageContent { } } } - - diff --git a/openapi/src/webhook/models/things_content.rs b/openapi/src/webhook/models/things_content.rs index 2d8c3070..3fb5cedf 100644 --- a/openapi/src/webhook/models/things_content.rs +++ b/openapi/src/webhook/models/things_content.rs @@ -20,17 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "")] -pub enum ThingsContent { -} - - - - +pub enum ThingsContent {} diff --git a/openapi/src/webhook/models/things_event.rs b/openapi/src/webhook/models/things_event.rs index f5fc835c..efe2fe9e 100644 --- a/openapi/src/webhook/models/things_event.rs +++ b/openapi/src/webhook/models/things_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// ThingsEvent : Indicates that a user linked a device with LINE. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct ThingsEvent { /// Type of the event @@ -54,7 +52,15 @@ pub struct ThingsEvent { impl ThingsEvent { /// Indicates that a user linked a device with LINE. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, reply_token: String, things: crate::webhook::models::ThingsContent) -> ThingsEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + reply_token: String, + things: crate::webhook::models::ThingsContent, + ) -> ThingsEvent { ThingsEvent { r#type, source: None, @@ -67,5 +73,3 @@ impl ThingsEvent { } } } - - diff --git a/openapi/src/webhook/models/unfollow_event.rs b/openapi/src/webhook/models/unfollow_event.rs index 24890341..00ca854f 100644 --- a/openapi/src/webhook/models/unfollow_event.rs +++ b/openapi/src/webhook/models/unfollow_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// UnfollowEvent : Event object for when your LINE Official Account is blocked. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UnfollowEvent { /// Type of the event @@ -49,7 +47,13 @@ pub struct UnfollowEvent { impl UnfollowEvent { /// Event object for when your LINE Official Account is blocked. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext) -> UnfollowEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + ) -> UnfollowEvent { UnfollowEvent { r#type, source: None, @@ -60,5 +64,3 @@ impl UnfollowEvent { } } } - - diff --git a/openapi/src/webhook/models/unlink_things_content.rs b/openapi/src/webhook/models/unlink_things_content.rs index 4b888890..07bf6762 100644 --- a/openapi/src/webhook/models/unlink_things_content.rs +++ b/openapi/src/webhook/models/unlink_things_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UnlinkThingsContent { /// Type @@ -39,11 +36,6 @@ pub struct UnlinkThingsContent { impl UnlinkThingsContent { pub fn new(r#type: String, device_id: String) -> UnlinkThingsContent { - UnlinkThingsContent { - r#type, - device_id, - } + UnlinkThingsContent { r#type, device_id } } } - - diff --git a/openapi/src/webhook/models/unsend_detail.rs b/openapi/src/webhook/models/unsend_detail.rs index 326066ce..54af6edc 100644 --- a/openapi/src/webhook/models/unsend_detail.rs +++ b/openapi/src/webhook/models/unsend_detail.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UnsendDetail { /// The message ID of the unsent message @@ -36,10 +33,6 @@ pub struct UnsendDetail { impl UnsendDetail { pub fn new(message_id: String) -> UnsendDetail { - UnsendDetail { - message_id, - } + UnsendDetail { message_id } } } - - diff --git a/openapi/src/webhook/models/unsend_event.rs b/openapi/src/webhook/models/unsend_event.rs index 50a366b0..3ae068eb 100644 --- a/openapi/src/webhook/models/unsend_event.rs +++ b/openapi/src/webhook/models/unsend_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// UnsendEvent : Event object for when the user unsends a message. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UnsendEvent { /// Type of the event @@ -51,7 +49,14 @@ pub struct UnsendEvent { impl UnsendEvent { /// Event object for when the user unsends a message. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, unsend: crate::webhook::models::UnsendDetail) -> UnsendEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + unsend: crate::webhook::models::UnsendDetail, + ) -> UnsendEvent { UnsendEvent { r#type, source: None, @@ -63,5 +68,3 @@ impl UnsendEvent { } } } - - diff --git a/openapi/src/webhook/models/user_mentionee.rs b/openapi/src/webhook/models/user_mentionee.rs index 6115ab0c..d85acb8f 100644 --- a/openapi/src/webhook/models/user_mentionee.rs +++ b/openapi/src/webhook/models/user_mentionee.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// UserMentionee : Mentioned target is user - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UserMentionee { /// Mentioned target. @@ -55,5 +53,3 @@ impl UserMentionee { } } } - - diff --git a/openapi/src/webhook/models/user_source.rs b/openapi/src/webhook/models/user_source.rs index 8f9da8fa..bc219665 100644 --- a/openapi/src/webhook/models/user_source.rs +++ b/openapi/src/webhook/models/user_source.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct UserSource { /// source type @@ -45,5 +42,3 @@ impl UserSource { } } } - - diff --git a/openapi/src/webhook/models/video_message_content.rs b/openapi/src/webhook/models/video_message_content.rs index f407cae4..40f698ba 100644 --- a/openapi/src/webhook/models/video_message_content.rs +++ b/openapi/src/webhook/models/video_message_content.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct VideoMessageContent { /// Type @@ -40,13 +37,18 @@ pub struct VideoMessageContent { pub duration: Option, #[serde(rename = "contentProvider")] pub content_provider: Box, - /// Quote token to quote this message. + /// Quote token to quote this message. #[serde(rename = "quoteToken")] pub quote_token: String, } impl VideoMessageContent { - pub fn new(r#type: String, id: String, content_provider: crate::webhook::models::ContentProvider, quote_token: String) -> VideoMessageContent { + pub fn new( + r#type: String, + id: String, + content_provider: crate::webhook::models::ContentProvider, + quote_token: String, + ) -> VideoMessageContent { VideoMessageContent { r#type, id, @@ -56,5 +58,3 @@ impl VideoMessageContent { } } } - - diff --git a/openapi/src/webhook/models/video_play_complete.rs b/openapi/src/webhook/models/video_play_complete.rs index dc283f16..f6661f48 100644 --- a/openapi/src/webhook/models/video_play_complete.rs +++ b/openapi/src/webhook/models/video_play_complete.rs @@ -20,13 +20,10 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ - - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct VideoPlayComplete { /// ID used to identify a video. Returns the same value as the trackingId assigned to the video message. @@ -36,10 +33,6 @@ pub struct VideoPlayComplete { impl VideoPlayComplete { pub fn new(tracking_id: String) -> VideoPlayComplete { - VideoPlayComplete { - tracking_id, - } + VideoPlayComplete { tracking_id } } } - - diff --git a/openapi/src/webhook/models/video_play_complete_event.rs b/openapi/src/webhook/models/video_play_complete_event.rs index c6f31b03..e160da2c 100644 --- a/openapi/src/webhook/models/video_play_complete_event.rs +++ b/openapi/src/webhook/models/video_play_complete_event.rs @@ -20,14 +20,12 @@ * Webhook event definition of the LINE Messaging API * * The version of the OpenAPI document: 1.0.0 - * + * * Generated by: https://openapi-generator.tech */ /// VideoPlayCompleteEvent : Event for when a user finishes viewing a video at least once with the specified trackingId sent by the LINE Official Account. - - #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct VideoPlayCompleteEvent { /// Type of the event @@ -54,7 +52,15 @@ pub struct VideoPlayCompleteEvent { impl VideoPlayCompleteEvent { /// Event for when a user finishes viewing a video at least once with the specified trackingId sent by the LINE Official Account. - pub fn new(r#type: String, timestamp: i64, mode: crate::webhook::models::EventMode, webhook_event_id: String, delivery_context: crate::webhook::models::DeliveryContext, reply_token: String, video_play_complete: crate::webhook::models::VideoPlayComplete) -> VideoPlayCompleteEvent { + pub fn new( + r#type: String, + timestamp: i64, + mode: crate::webhook::models::EventMode, + webhook_event_id: String, + delivery_context: crate::webhook::models::DeliveryContext, + reply_token: String, + video_play_complete: crate::webhook::models::VideoPlayComplete, + ) -> VideoPlayCompleteEvent { VideoPlayCompleteEvent { r#type, source: None, @@ -67,5 +73,3 @@ impl VideoPlayCompleteEvent { } } } - -