├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── question.md ├── release.yml ├── scripts │ └── check-eol-newrelease.cjs └── workflows │ ├── check-eol-newrelease.yml │ ├── close-issue.yml │ ├── create-draft-release.yml │ ├── generate-code.yml │ ├── go.yml │ └── label-issue.yml ├── .gitignore ├── .gitmodules ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── examples ├── delivery_helper │ └── main.go ├── echo_bot │ └── server.go ├── echo_bot_handler │ └── server.go ├── insight_helper │ └── main.go ├── kitchensink │ ├── server.go │ └── static │ │ ├── buttons │ │ └── 1040.jpg │ │ ├── imagemap │ │ ├── preview.jpg │ │ └── video.mp4 │ │ ├── quick │ │ ├── sushi.png │ │ └── tempura.png │ │ └── rich │ │ ├── 240 │ │ ├── 300 │ │ ├── 460 │ │ ├── 700 │ │ └── 1040 └── richmenu_helper │ ├── main.go │ └── public │ ├── richmenu-a.png │ └── richmenu-b.png ├── generate-code.py ├── generator ├── .gitignore ├── pom.xml └── src │ ├── main │ ├── java │ │ └── line │ │ │ └── bot │ │ │ └── generator │ │ │ ├── LineBotSdkGoGeneratorGenerator.java │ │ │ └── pebble │ │ │ ├── EndpointFunction.java │ │ │ ├── HasDiscriminatorFunction.java │ │ │ ├── IsOmitEmptyFunction.java │ │ │ ├── MyPebbleExtension.java │ │ │ └── PebbleTemplateAdapter.java │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ ├── org.openapitools.codegen.CodegenConfig │ │ │ └── org.openapitools.codegen.api.TemplatingEngineAdapter │ │ └── line-bot-sdk-go-generator │ │ ├── api.pebble │ │ ├── apiBody │ │ ├── multipart.pebble │ │ └── normal.pebble │ │ ├── api_test.pebble │ │ ├── licenseInfo.pebble │ │ ├── model.pebble │ │ └── model │ │ ├── enum.pebble │ │ ├── innerEnum.pebble │ │ ├── interface.pebble │ │ └── struct.pebble │ └── test │ └── java │ └── line │ └── bot │ └── generator │ └── LineBotSdkNodejsGeneratorGeneratorTest.java ├── go.mod ├── go.sum ├── linebot ├── account_link.go ├── account_link_test.go ├── actions.go ├── audience.go ├── audience_test.go ├── channel_access_token │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_channel_access_token.go │ ├── model_channel_access_token_key_ids_response.go │ ├── model_error_response.go │ ├── model_issue_channel_access_token_response.go │ ├── model_issue_short_lived_channel_access_token_response.go │ ├── model_issue_stateless_channel_access_token_response.go │ ├── model_verify_channel_access_token_response.go │ └── tests │ │ ├── api │ │ └── api_channel_access_token_test_test.go │ │ └── handwritten │ │ └── api_IssueStatelessChannelToken_test.go ├── client.go ├── client_test.go ├── content_provider.go ├── delivery.go ├── delivery_test.go ├── demographic_filter.go ├── emoji.go ├── error.go ├── event.go ├── example_test.go ├── flex.go ├── flex_test.go ├── flex_unmarshal.go ├── get_bot_info.go ├── get_bot_info_test.go ├── get_content.go ├── get_content_test.go ├── get_count.go ├── get_count_test.go ├── get_follower_ids.go ├── get_follower_ids_test.go ├── get_ids.go ├── get_ids_test.go ├── get_profile.go ├── get_profile_test.go ├── get_quota.go ├── get_quota_test.go ├── get_summary.go ├── get_summary_test.go ├── httphandler │ ├── httphandler.go │ └── httphandler_test.go ├── imagemap.go ├── imageset.go ├── insight.go ├── insight │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_insight.go │ ├── model_age_tile.go │ ├── model_app_type_tile.go │ ├── model_area_tile.go │ ├── model_error_detail.go │ ├── model_error_response.go │ ├── model_gender_tile.go │ ├── model_get_friends_demographics_response.go │ ├── model_get_message_event_response.go │ ├── model_get_message_event_response_click.go │ ├── model_get_message_event_response_message.go │ ├── model_get_message_event_response_overview.go │ ├── model_get_number_of_followers_response.go │ ├── model_get_number_of_message_deliveries_response.go │ ├── model_get_statistics_per_unit_response.go │ ├── model_get_statistics_per_unit_response_click.go │ ├── model_get_statistics_per_unit_response_message.go │ ├── model_get_statistics_per_unit_response_overview.go │ ├── model_subscription_period_tile.go │ └── tests │ │ └── api │ │ └── api_insight_test_test.go ├── insight_test.go ├── leave.go ├── leave_test.go ├── liff.go ├── liff │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_liff.go │ ├── model_add_liff_app_request.go │ ├── model_add_liff_app_response.go │ ├── model_get_all_liff_apps_response.go │ ├── model_liff_app.go │ ├── model_liff_bot_prompt.go │ ├── model_liff_features.go │ ├── model_liff_scope.go │ ├── model_liff_view.go │ ├── model_update_liff_app_request.go │ ├── model_update_liff_view.go │ └── tests │ │ └── api │ │ └── api_liff_test_test.go ├── liff_test.go ├── manage_audience │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_manage_audience.go │ ├── api_manage_audience_blob.go │ ├── model_adaccount.go │ ├── model_add_audience_to_audience_group_request.go │ ├── model_audience.go │ ├── model_audience_group.go │ ├── model_audience_group_authority_level.go │ ├── model_audience_group_create_route.go │ ├── model_audience_group_failed_type.go │ ├── model_audience_group_job.go │ ├── model_audience_group_job_failed_type.go │ ├── model_audience_group_job_status.go │ ├── model_audience_group_job_type.go │ ├── model_audience_group_permission.go │ ├── model_audience_group_status.go │ ├── model_audience_group_type.go │ ├── model_create_audience_group_request.go │ ├── model_create_audience_group_response.go │ ├── model_create_click_based_audience_group_request.go │ ├── model_create_click_based_audience_group_response.go │ ├── model_create_imp_based_audience_group_request.go │ ├── model_create_imp_based_audience_group_response.go │ ├── model_detailed_owner.go │ ├── model_error_detail.go │ ├── model_error_response.go │ ├── model_get_audience_data_response.go │ ├── model_get_audience_group_authority_level_response.go │ ├── model_get_audience_groups_response.go │ ├── model_get_shared_audience_data_response.go │ ├── model_get_shared_audience_groups_response.go │ ├── model_update_audience_group_authority_level_request.go │ ├── model_update_audience_group_description_request.go │ └── tests │ │ ├── api │ │ ├── api_manage_audience_blob_test_test.go │ │ └── api_manage_audience_test_test.go │ │ └── handwritten │ │ └── api_multipart_test.go ├── mention.go ├── message.go ├── message_test.go ├── messaging_api │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_messaging_api.go │ ├── api_messaging_api_blob.go │ ├── model_action.go │ ├── model_age_demographic.go │ ├── model_age_demographic_filter.go │ ├── model_all_mention_target.go │ ├── model_alt_uri.go │ ├── model_app_type_demographic.go │ ├── model_app_type_demographic_filter.go │ ├── model_area_demographic.go │ ├── model_area_demographic_filter.go │ ├── model_audience_match_messages_request.go │ ├── model_audience_recipient.go │ ├── model_audio_message.go │ ├── model_bot_info_response.go │ ├── model_broadcast_request.go │ ├── model_buttons_template.go │ ├── model_camera_action.go │ ├── model_camera_roll_action.go │ ├── model_carousel_column.go │ ├── model_carousel_template.go │ ├── model_chat_reference.go │ ├── model_clipboard_action.go │ ├── model_clipboard_imagemap_action.go │ ├── model_confirm_template.go │ ├── model_create_rich_menu_alias_request.go │ ├── model_datetime_picker_action.go │ ├── model_demographic_filter.go │ ├── model_emoji.go │ ├── model_emoji_substitution_object.go │ ├── model_error_detail.go │ ├── model_error_response.go │ ├── model_filter.go │ ├── model_flex_block_style.go │ ├── model_flex_box.go │ ├── model_flex_box_background.go │ ├── model_flex_box_border_width.go │ ├── model_flex_box_corner_radius.go │ ├── model_flex_box_linear_gradient.go │ ├── model_flex_box_padding.go │ ├── model_flex_box_spacing.go │ ├── model_flex_bubble.go │ ├── model_flex_bubble_styles.go │ ├── model_flex_button.go │ ├── model_flex_carousel.go │ ├── model_flex_component.go │ ├── model_flex_container.go │ ├── model_flex_filler.go │ ├── model_flex_icon.go │ ├── model_flex_icon_size.go │ ├── model_flex_image.go │ ├── model_flex_image_size.go │ ├── model_flex_margin.go │ ├── model_flex_message.go │ ├── model_flex_offset.go │ ├── model_flex_separator.go │ ├── model_flex_span.go │ ├── model_flex_span_size.go │ ├── model_flex_text.go │ ├── model_flex_text_font_size.go │ ├── model_flex_video.go │ ├── model_gender_demographic.go │ ├── model_gender_demographic_filter.go │ ├── model_get_aggregation_unit_name_list_response.go │ ├── model_get_aggregation_unit_usage_response.go │ ├── model_get_followers_response.go │ ├── model_get_joined_membership_users_response.go │ ├── model_get_membership_subscription_response.go │ ├── model_get_message_content_transcoding_response.go │ ├── model_get_webhook_endpoint_response.go │ ├── model_group_member_count_response.go │ ├── model_group_summary_response.go │ ├── model_group_user_profile_response.go │ ├── model_image_carousel_column.go │ ├── model_image_carousel_template.go │ ├── model_image_message.go │ ├── model_imagemap_action.go │ ├── model_imagemap_area.go │ ├── model_imagemap_base_size.go │ ├── model_imagemap_external_link.go │ ├── model_imagemap_message.go │ ├── model_imagemap_video.go │ ├── model_issue_link_token_response.go │ ├── model_limit.go │ ├── model_location_action.go │ ├── model_location_message.go │ ├── model_mark_messages_as_read_request.go │ ├── model_members_ids_response.go │ ├── model_membership.go │ ├── model_membership_list_response.go │ ├── model_mention_substitution_object.go │ ├── model_mention_target.go │ ├── model_message.go │ ├── model_message_action.go │ ├── model_message_imagemap_action.go │ ├── model_message_quota_response.go │ ├── model_multicast_request.go │ ├── model_narrowcast_progress_response.go │ ├── model_narrowcast_request.go │ ├── model_number_of_messages_response.go │ ├── model_operator_demographic_filter.go │ ├── model_operator_recipient.go │ ├── model_pnp_messages_request.go │ ├── model_postback_action.go │ ├── model_push_message_request.go │ ├── model_push_message_response.go │ ├── model_quick_reply.go │ ├── model_quick_reply_item.go │ ├── model_quota_consumption_response.go │ ├── model_quota_type.go │ ├── model_recipient.go │ ├── model_redelivery_recipient.go │ ├── model_reply_message_request.go │ ├── model_reply_message_response.go │ ├── model_rich_menu_alias_list_response.go │ ├── model_rich_menu_alias_response.go │ ├── model_rich_menu_area.go │ ├── model_rich_menu_batch_link_operation.go │ ├── model_rich_menu_batch_operation.go │ ├── model_rich_menu_batch_progress_phase.go │ ├── model_rich_menu_batch_progress_response.go │ ├── model_rich_menu_batch_request.go │ ├── model_rich_menu_batch_unlink_all_operation.go │ ├── model_rich_menu_batch_unlink_operation.go │ ├── model_rich_menu_bounds.go │ ├── model_rich_menu_bulk_link_request.go │ ├── model_rich_menu_bulk_unlink_request.go │ ├── model_rich_menu_id_response.go │ ├── model_rich_menu_list_response.go │ ├── model_rich_menu_request.go │ ├── model_rich_menu_response.go │ ├── model_rich_menu_size.go │ ├── model_rich_menu_switch_action.go │ ├── model_room_member_count_response.go │ ├── model_room_user_profile_response.go │ ├── model_sender.go │ ├── model_sent_message.go │ ├── model_set_webhook_endpoint_request.go │ ├── model_show_loading_animation_request.go │ ├── model_sticker_message.go │ ├── model_subscribed_membership_plan.go │ ├── model_subscribed_membership_user.go │ ├── model_subscription.go │ ├── model_subscription_period_demographic.go │ ├── model_subscription_period_demographic_filter.go │ ├── model_substitution_object.go │ ├── model_template.go │ ├── model_template_image_aspect_ratio.go │ ├── model_template_image_size.go │ ├── model_template_message.go │ ├── model_test_webhook_endpoint_request.go │ ├── model_test_webhook_endpoint_response.go │ ├── model_text_message.go │ ├── model_text_message_v2.go │ ├── model_update_rich_menu_alias_request.go │ ├── model_uri_action.go │ ├── model_uri_imagemap_action.go │ ├── model_user_mention_target.go │ ├── model_user_profile_response.go │ ├── model_validate_message_request.go │ ├── model_video_message.go │ └── tests │ │ ├── api │ │ ├── api_messaging_api_blob_test_test.go │ │ └── api_messaging_api_test_test.go │ │ └── handwritten │ │ ├── api_GetFollowers_test.go │ │ ├── api_GetMembersIds_test.go │ │ ├── api_WithHttpInfo_test.go │ │ ├── calling_api_twice_test.go │ │ ├── model_datetime_picker_action_test.go │ │ ├── model_limit_test.go │ │ ├── model_reply_message_request_test.go │ │ └── model_sticker_message_test.go ├── module │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_line_module.go │ ├── model_acquire_chat_control_request.go │ ├── model_detach_module_request.go │ ├── model_get_modules_response.go │ ├── model_module_bot.go │ └── tests │ │ └── api │ │ └── api_line_module_test_test.go ├── module_attach │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_line_module_attach.go │ ├── model_attach_module_response.go │ └── tests │ │ └── api │ │ └── api_line_module_attach_test_test.go ├── oauth.go ├── oauth2.go ├── oauth2_test.go ├── oauth_test.go ├── progress.go ├── progress_test.go ├── quick_reply.go ├── raw.go ├── raw_test.go ├── recipient.go ├── response.go ├── richmenu.go ├── richmenu_test.go ├── send_message.go ├── send_message_test.go ├── sender.go ├── shop │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api_shop.go │ ├── model_error_response.go │ ├── model_mission_sticker_request.go │ └── tests │ │ └── api │ │ └── api_shop_test_test.go ├── template.go ├── template_test.go ├── template_unmarshal.go ├── validate_message.go ├── validate_message_test.go ├── version.go ├── webhook.go ├── webhook │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── httphandler.go │ ├── httphandler_test.go │ ├── model_account_link_event.go │ ├── model_action_result.go │ ├── model_activated_event.go │ ├── model_all_mentionee.go │ ├── model_attached_module_content.go │ ├── model_audio_message_content.go │ ├── model_beacon_content.go │ ├── model_beacon_event.go │ ├── model_bot_resumed_event.go │ ├── model_bot_suspended_event.go │ ├── model_callback_request.go │ ├── model_chat_control.go │ ├── model_content_provider.go │ ├── model_deactivated_event.go │ ├── model_delivery_context.go │ ├── model_detached_module_content.go │ ├── model_emoji.go │ ├── model_event.go │ ├── model_event_mode.go │ ├── model_file_message_content.go │ ├── model_follow_detail.go │ ├── model_follow_event.go │ ├── model_group_source.go │ ├── model_image_message_content.go │ ├── model_image_set.go │ ├── model_join_event.go │ ├── model_joined_members.go │ ├── model_joined_membership_content.go │ ├── model_leave_event.go │ ├── model_left_members.go │ ├── model_left_membership_content.go │ ├── model_link_content.go │ ├── model_link_things_content.go │ ├── model_location_message_content.go │ ├── model_member_joined_event.go │ ├── model_member_left_event.go │ ├── model_membership_content.go │ ├── model_membership_event.go │ ├── model_mention.go │ ├── model_mentionee.go │ ├── model_message_content.go │ ├── model_message_event.go │ ├── model_module_content.go │ ├── model_module_event.go │ ├── model_pnp_delivery.go │ ├── model_pnp_delivery_completion_event.go │ ├── model_postback_content.go │ ├── model_postback_event.go │ ├── model_renewed_membership_content.go │ ├── model_room_source.go │ ├── model_scenario_result.go │ ├── model_scenario_result_things_content.go │ ├── model_source.go │ ├── model_sticker_message_content.go │ ├── model_text_message_content.go │ ├── model_things_content.go │ ├── model_things_event.go │ ├── model_unfollow_event.go │ ├── model_unlink_things_content.go │ ├── model_unsend_detail.go │ ├── model_unsend_event.go │ ├── model_user_mentionee.go │ ├── model_user_source.go │ ├── model_video_message_content.go │ ├── model_video_play_complete.go │ ├── model_video_play_complete_event.go │ ├── parse.go │ └── tests │ │ └── handwritten │ │ └── model_source_test.go └── webhook_test.go ├── postprocess-file.sh ├── renovate.json5 ├── script ├── codecov.sh └── fmt.sh ├── testdata └── img │ └── richmenu.png ├── tools └── openapi-generator-cli.jar └── util ├── find_dollar_sign.go └── find_dollar_sign_test.go /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "Feature Request" 5 | --- 6 | 7 | ## Feature Request 8 | 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes 2 | changelog: 3 | categories: 4 | - title: Breaking Changes 5 | labels: 6 | - breaking-change 7 | - title: line-openapi updates 8 | labels: 9 | - line-openapi-update 10 | - title: New Features 11 | labels: 12 | - new-features 13 | - title: Bug fix 14 | labels: 15 | - bug-fix 16 | - title: Dependency updates 17 | labels: 18 | - dependency upgrade 19 | exclude: 20 | labels: 21 | - line-openapi-update 22 | - title: Other Changes 23 | labels: 24 | - "*" 25 | -------------------------------------------------------------------------------- /.github/workflows/check-eol-newrelease.yml: -------------------------------------------------------------------------------- 1 | name: "Check EoL & New Releases" 2 | 3 | on: 4 | schedule: 5 | # Every day at 22:00 UTC -> 07:00 JST 6 | - cron: '0 22 * * *' 7 | workflow_dispatch: 8 | 9 | jobs: 10 | check-eol-newrelease: 11 | runs-on: ubuntu-latest 12 | permissions: 13 | contents: read 14 | issues: write 15 | if: github.repository == 'line/line-bot-sdk-go' 16 | steps: 17 | - name: Check out code 18 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 19 | 20 | - name: Run EoL & NewRelease check 21 | uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 22 | with: 23 | script: | 24 | const checkEolAndNewReleases = require('.github/scripts/check-eol-newrelease.cjs'); 25 | await checkEolAndNewReleases({ github, context, core }, { 26 | languageName: 'Go', 27 | eolJsonUrl: 'https://endoflife.date/api/go.json', 28 | eolViewUrl: 'https://endoflife.date/go', 29 | eolLookbackDays: 100, 30 | newReleaseThresholdDays: 100, 31 | ltsOnly: false, 32 | retryCount: 3, 33 | retryIntervalSec: 30 34 | }); 35 | github-token: ${{ secrets.GITHUB_TOKEN }} 36 | -------------------------------------------------------------------------------- /.github/workflows/close-issue.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues 2 | # https://github.com/marketplace/actions/close-stale-issues 3 | name: Close inactive issues 4 | on: 5 | schedule: 6 | - cron: "30 1 * * *" 7 | 8 | jobs: 9 | close-issues: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | pull-requests: write 14 | if: github.repository == 'line/line-bot-sdk-go' 15 | steps: 16 | - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 17 | with: 18 | days-before-issue-stale: 14 19 | days-before-issue-close: 0 20 | stale-issue-label: "no-activity" 21 | close-issue-message: "This issue was closed because it has been inactive for 14 days." 22 | exempt-issue-labels: "bug,enhancement,keep,untriaged" 23 | days-before-pr-stale: -1 24 | days-before-pr-close: 14 25 | stale-pr-label: "no-activity" 26 | close-pr-message: "This pull request was closed because it has been inactive for 14 days. Please reopen if you still intend to submit this pull request." 27 | repo-token: ${{ secrets.GITHUB_TOKEN }} 28 | -------------------------------------------------------------------------------- /.github/workflows/label-issue.yml: -------------------------------------------------------------------------------- 1 | name: Label issue 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | - reopened 8 | - closed 9 | 10 | jobs: 11 | label-issues: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | issues: write 15 | steps: 16 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 17 | 18 | - name: Add label on issue open 19 | if: github.event.action == 'opened' || github.event.action == 'reopened' 20 | run: | 21 | gh issue edit ${{ github.event.issue.number }} \ 22 | --add-label "untriaged" \ 23 | env: 24 | GH_TOKEN: ${{ github.token }} 25 | 26 | - name: Remove label on issue close 27 | if: github.event.action == 'closed' 28 | run: | 29 | gh issue edit ${{ github.event.issue.number }} \ 30 | --remove-label "untriaged" 31 | env: 32 | GH_TOKEN: ${{ github.token }} 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | .idea* 27 | 28 | /.vscode/ 29 | 30 | # github workflow 31 | pr_info.json 32 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "line-openapi"] 2 | path = line-openapi 3 | url = git@github.com:line/line-openapi.git 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## How to contribute to LINE Bot SDK for Go project 2 | 3 | First of all, thank you so much for taking your time to contribute! LINE Bot SDK for Go is not very different from any other open 4 | source projects you are aware of. It will be amazing if you could help us by doing any of the following: 5 | 6 | - File an issue in [the issue tracker](https://github.com/line/line-bot-sdk-go/issues) to report bugs and propose new features and 7 | improvements. 8 | - Ask a question using [the issue tracker](https://github.com/line/line-bot-sdk-go/issues). 9 | - Contribute your work by sending [a pull request](https://github.com/line/line-bot-sdk-go/pulls). 10 | 11 | ### Contributor license agreement 12 | 13 | When you are sending a pull request and it's a non-trivial change beyond fixing typos, please make sure to sign 14 | [the ICLA (individual contributor license agreement)](https://cla-assistant.io/line/line-bot-sdk-go). Please 15 | [contact us](mailto:dl_oss_dev@linecorp.com) if you need the CCLA (corporate contributor license agreement). -------------------------------------------------------------------------------- /examples/kitchensink/static/buttons/1040.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/buttons/1040.jpg -------------------------------------------------------------------------------- /examples/kitchensink/static/imagemap/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/imagemap/preview.jpg -------------------------------------------------------------------------------- /examples/kitchensink/static/imagemap/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/imagemap/video.mp4 -------------------------------------------------------------------------------- /examples/kitchensink/static/quick/sushi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/quick/sushi.png -------------------------------------------------------------------------------- /examples/kitchensink/static/quick/tempura.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/quick/tempura.png -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/1040: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/rich/1040 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/240: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/rich/240 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/300: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/rich/300 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/460: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/rich/460 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/700: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/kitchensink/static/rich/700 -------------------------------------------------------------------------------- /examples/richmenu_helper/public/richmenu-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/richmenu_helper/public/richmenu-a.png -------------------------------------------------------------------------------- /examples/richmenu_helper/public/richmenu-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/examples/richmenu_helper/public/richmenu-b.png -------------------------------------------------------------------------------- /generator/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .vscode/ 3 | /out/ 4 | /dependency-reduced-pom.xml 5 | -------------------------------------------------------------------------------- /generator/src/main/java/line/bot/generator/pebble/EndpointFunction.java: -------------------------------------------------------------------------------- 1 | package line.bot.generator.pebble; 2 | 3 | import java.util.Collections; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import io.pebbletemplates.pebble.extension.Function; 8 | import io.pebbletemplates.pebble.template.EvaluationContext; 9 | import io.pebbletemplates.pebble.template.PebbleTemplate; 10 | 11 | public class EndpointFunction implements Function { 12 | @Override 13 | public List getArgumentNames() { 14 | return Collections.singletonList("className"); 15 | } 16 | 17 | @Override 18 | public Object execute(Map args, PebbleTemplate self, EvaluationContext context, int lineNumber) { 19 | String className = (String) args.get("className"); 20 | if (className.equals("LineModuleAttachClient")) { 21 | return "https://manager.line.biz"; 22 | } else if (className.contains("Blob")) { 23 | return "https://api-data.line.me"; 24 | } else { 25 | return "https://api.line.me"; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /generator/src/main/java/line/bot/generator/pebble/HasDiscriminatorFunction.java: -------------------------------------------------------------------------------- 1 | package line.bot.generator.pebble; 2 | 3 | import java.util.Collections; 4 | import java.util.List; 5 | import java.util.Map; 6 | 7 | import org.openapitools.codegen.CodegenModel; 8 | 9 | import io.pebbletemplates.pebble.extension.Function; 10 | import io.pebbletemplates.pebble.template.EvaluationContext; 11 | import io.pebbletemplates.pebble.template.PebbleTemplate; 12 | 13 | public class HasDiscriminatorFunction implements Function { 14 | @Override 15 | public List getArgumentNames() { 16 | return Collections.singletonList("model"); 17 | } 18 | 19 | @Override 20 | public Object execute(Map args, PebbleTemplate self, EvaluationContext context, int lineNumber) { 21 | CodegenModel model = (CodegenModel) args.get("model"); 22 | return model.allVars.stream() 23 | .anyMatch(it -> it.isDiscriminator); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /generator/src/main/java/line/bot/generator/pebble/MyPebbleExtension.java: -------------------------------------------------------------------------------- 1 | package line.bot.generator.pebble; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import io.pebbletemplates.pebble.extension.AbstractExtension; 7 | import io.pebbletemplates.pebble.extension.Function; 8 | 9 | public class MyPebbleExtension extends AbstractExtension { 10 | @Override 11 | public Map getFunctions() { 12 | HashMap map = new HashMap<>(); 13 | map.put("endpoint", new EndpointFunction()); 14 | map.put("hasDiscriminator", new HasDiscriminatorFunction()); 15 | map.put("isOmitEmpty", new IsOmitEmptyFunction()); 16 | return map; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig: -------------------------------------------------------------------------------- 1 | line.bot.generator.LineBotSdkGoGeneratorGenerator 2 | -------------------------------------------------------------------------------- /generator/src/main/resources/META-INF/services/org.openapitools.codegen.api.TemplatingEngineAdapter: -------------------------------------------------------------------------------- 1 | line.bot.generator.pebble.PebbleTemplateAdapter 2 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-go-generator/apiBody/multipart.pebble: -------------------------------------------------------------------------------- 1 | {# @pebvariable name="op" type="org.openapitools.codegen.CodegenOperation" #} 2 | const form = new FormData(); 3 | {% for param in op.formParams -%} 4 | {% if param.isFile -%} 5 | form.append("{{param.paramName}}", {{param.paramName}}); // file 6 | {% else -%} 7 | form.append("{{param.paramName}}", String({{param.paramName}})); 8 | {% endif -%} 9 | {% endfor %} 10 | const res = this.httpClient.{{op.httpMethod|lower}}{% if op.hasFormParams %}Form{% endif %}Multipart{% if op.returnType %}<{{ op.returnType }}>{% endif %}( 11 | "{{op.path}}" 12 | {% for param in op.pathParams -%} 13 | .replace("{{ "{" + param.paramName + "}" }}", String({{ param.paramName }})) 14 | {% endfor %}, 15 | form, 16 | ); 17 | return ensureJSON(res); 18 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-go-generator/licenseInfo.pebble: -------------------------------------------------------------------------------- 1 | /** 2 | * {{appName}} 3 | * {{appDescription}} 4 | * 5 | * The version of the OpenAPI document: {{version}} 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-go-generator/model.pebble: -------------------------------------------------------------------------------- 1 | {# @pebvariable name="models" type="java.util.ArrayList" -#} 2 | {# @pebvariable name="imports" type="java.util.List>" -#} 3 | {% include "./licenseInfo.pebble" %} 4 | 5 | //go:generate python3 ../../generate-code.py 6 | package {{ packageName }} 7 | 8 | {% for import in imports -%} 9 | {% if loop.first %}import ({% endif %} 10 | "{{import.import}}" 11 | {% if loop.last %}){% endif %} 12 | {% endfor %} 13 | 14 | {% for model in models -%} 15 | {%- if model.model.isEnum -%} 16 | {%- include "./model/enum.pebble" with {"model": model.model} -%} 17 | {%- else -%} 18 | {%- if model.model.discriminator != null -%} 19 | {%- include "./model/interface.pebble" with {"model": model.model} -%} 20 | {%- else -%} 21 | {%- include "./model/struct.pebble" with {"model": model.model} -%} 22 | {%- endif -%} 23 | {%- endif -%} 24 | {%- endfor -%} 25 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-go-generator/model/enum.pebble: -------------------------------------------------------------------------------- 1 | {# @pebvariable name="model" type="org.openapitools.codegen.CodegenModel" -#} 2 | {% if model.description %} 3 | /* 4 | * {{ model.description | escape }} 5 | */ 6 | {% endif %} 7 | 8 | // {{model.classname}} type 9 | type {{model.classname}} {% if model.format %}{{ model.format }}{% else %}{{ model.dataType }}{% endif %} 10 | 11 | // {{model.classname}} constants 12 | const ( 13 | {% if model.allowableValues != null %} 14 | {% for enumVar in model.allowableValues.get("enumVars") -%} 15 | {% if enumVar.enumDescription %} 16 | // {{enumVar.enumDescription }} 17 | {% endif %} 18 | {{ model.classname }}_{{ enumVar.name }} {{ model.classname }} = {{ enumVar.value }} 19 | {% endfor %} 20 | {% endif %} 21 | ) 22 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-go-generator/model/innerEnum.pebble: -------------------------------------------------------------------------------- 1 | {# @pebvariable name="model" type="org.openapitools.codegen.CodegenModel" -#} 2 | {# @pebvariable name="var" type="org.openapitools.codegen.CodegenProperty" -#} 3 | // {{ model.classname }}{{ var.datatypeWithEnum }} type 4 | {% if var.description %}/* {{ var.description }} */{% endif %} 5 | type {{ model.classname }}{{ var.datatypeWithEnum }} {{ var.datatype }} 6 | 7 | // {{ model.classname }}{{ var.datatypeWithEnum }} constants 8 | const ( 9 | {% if var.allowableValues != null %} 10 | {% for enumVar in var.allowableValues.get("enumVars") -%} 11 | {% if enumVar.enumDescription %} 12 | // {{enumVar.enumDescription }} 13 | {% endif %} 14 | {{ model.classname }}{{ var.datatypeWithEnum }}_{{ enumVar.name }} {{ model.classname }}{{ var.datatypeWithEnum }} = {{ enumVar.value }} 15 | {% endfor %} 16 | {% endif %} 17 | ) 18 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/line/line-bot-sdk-go/v8 2 | 3 | go 1.23 4 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/go.sum -------------------------------------------------------------------------------- /linebot/channel_access_token/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/channel_access_token/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | api_channel_access_token.go 2 | model_channel_access_token_key_ids_response.go 3 | model_error_response.go 4 | model_issue_channel_access_token_response.go 5 | model_issue_short_lived_channel_access_token_response.go 6 | model_issue_stateless_channel_access_token_response.go 7 | model_verify_channel_access_token_response.go 8 | -------------------------------------------------------------------------------- /linebot/channel_access_token/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/channel_access_token/model_channel_access_token_key_ids_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Channel Access Token API 3 | * This document describes Channel Access Token API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package channel_access_token 21 | 22 | // ChannelAccessTokenKeyIdsResponse 23 | // Channel access token key IDs 24 | // https://developers.line.biz/en/reference/messaging-api/#get-all-valid-channel-access-token-key-ids-v2-1 25 | type ChannelAccessTokenKeyIdsResponse struct { 26 | 27 | /** 28 | * Array of channel access token key IDs. (Required) 29 | */ 30 | Kids []string `json:"kids"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/channel_access_token/model_error_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Channel Access Token API 3 | * This document describes Channel Access Token API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package channel_access_token 21 | 22 | // ErrorResponse 23 | // Error response of the Channel access token 24 | 25 | type ErrorResponse struct { 26 | 27 | /** 28 | * Error summary 29 | */ 30 | Error string `json:"error,omitempty"` 31 | 32 | /** 33 | * Details of the error. Not returned in certain situations. 34 | */ 35 | ErrorDescription string `json:"error_description,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/channel_access_token/model_verify_channel_access_token_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Channel Access Token API 3 | * This document describes Channel Access Token API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package channel_access_token 21 | 22 | // VerifyChannelAccessTokenResponse 23 | // Verification result 24 | 25 | type VerifyChannelAccessTokenResponse struct { 26 | 27 | /** 28 | * The channel ID for which the channel access token was issued. (Required) 29 | */ 30 | ClientId string `json:"client_id"` 31 | 32 | /** 33 | * Number of seconds before the channel access token expires. (Required) 34 | */ 35 | ExpiresIn int64 `json:"expires_in"` 36 | 37 | /** 38 | * Permissions granted to the channel access token. 39 | */ 40 | Scope string `json:"scope,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/content_provider.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 LINE Corporation 2 | // 3 | // LINE Corporation licenses this file to you under the Apache License, 4 | // version 2.0 (the "License"); you may not use this file except in compliance 5 | // with the License. You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package linebot 16 | 17 | // ContentProviderType type 18 | type ContentProviderType string 19 | 20 | // ContentProviderType constants 21 | const ( 22 | ContentProviderTypeLINE ContentProviderType = "line" 23 | ContentProviderTypeExternal ContentProviderType = "external" 24 | ) 25 | 26 | // ContentProvider type 27 | // Deprecated: Use OpenAPI based classes instead. 28 | type ContentProvider struct { 29 | Type ContentProviderType `json:"type"` 30 | OriginalContentURL string `json:"originalContentUrl,omitempty"` 31 | PreviewImageURL string `json:"previewImageUrl,omitempty"` 32 | } 33 | -------------------------------------------------------------------------------- /linebot/emoji.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 LINE Corporation 2 | // 3 | // LINE Corporation licenses this file to you under the Apache License, 4 | // version 2.0 (the "License"); you may not use this file except in compliance 5 | // with the License. You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package linebot 16 | 17 | // Emoji type 18 | // Deprecated: Use OpenAPI based classes instead. 19 | type Emoji struct { 20 | Index int `json:"index"` 21 | Length int `json:"length,omitempty"` 22 | ProductID string `json:"productId,omitempty"` 23 | EmojiID string `json:"emojiId,omitempty"` 24 | } 25 | 26 | // NewEmoji function 27 | // Deprecated: Use OpenAPI based classes instead. 28 | func NewEmoji(index int, productID, emojiID string) *Emoji { 29 | return &Emoji{ 30 | Index: index, 31 | ProductID: productID, 32 | EmojiID: emojiID, 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /linebot/error.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 LINE Corporation 2 | // 3 | // LINE Corporation licenses this file to you under the Apache License, 4 | // version 2.0 (the "License"); you may not use this file except in compliance 5 | // with the License. You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package linebot 16 | 17 | import ( 18 | "bytes" 19 | "errors" 20 | "fmt" 21 | ) 22 | 23 | // errors 24 | var ( 25 | ErrInvalidSignature = errors.New("invalid signature") 26 | ) 27 | 28 | // APIError type 29 | // Deprecated: Use OpenAPI based classes instead. 30 | type APIError struct { 31 | Code int 32 | Response *ErrorResponse 33 | } 34 | 35 | // Error method 36 | func (e *APIError) Error() string { 37 | var buf bytes.Buffer 38 | fmt.Fprintf(&buf, "linebot: APIError %d ", e.Code) 39 | if e.Response != nil { 40 | fmt.Fprintf(&buf, "%s", e.Response.Message) 41 | for _, d := range e.Response.Details { 42 | fmt.Fprintf(&buf, "\n[%s] %s", d.Property, d.Message) 43 | } 44 | } 45 | return buf.String() 46 | } 47 | -------------------------------------------------------------------------------- /linebot/imageset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 LINE Corporation 2 | // 3 | // LINE Corporation licenses this file to you under the Apache License, 4 | // version 2.0 (the "License"); you may not use this file except in compliance 5 | // with the License. You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package linebot 16 | 17 | // ImageSet type 18 | // Deprecated: Use OpenAPI based classes instead. 19 | type ImageSet struct { 20 | ID string `json:"id"` 21 | Index int `json:"index"` 22 | Total int `json:"total"` 23 | } 24 | 25 | // NewImageSet function 26 | // Deprecated: Use OpenAPI based classes instead. 27 | func NewImageSet(ID string, index, total int) *ImageSet { 28 | return &ImageSet{ 29 | ID: ID, 30 | Index: index, 31 | Total: total, 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /linebot/insight/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/insight/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | api_insight.go 2 | model_age_tile.go 3 | model_app_type_tile.go 4 | model_area_tile.go 5 | model_error_detail.go 6 | model_error_response.go 7 | model_gender_tile.go 8 | model_get_friends_demographics_response.go 9 | model_get_message_event_response.go 10 | model_get_message_event_response_click.go 11 | model_get_message_event_response_message.go 12 | model_get_message_event_response_overview.go 13 | model_get_number_of_followers_response.go 14 | model_get_number_of_message_deliveries_response.go 15 | model_get_statistics_per_unit_response.go 16 | model_get_statistics_per_unit_response_click.go 17 | model_get_statistics_per_unit_response_message.go 18 | model_get_statistics_per_unit_response_overview.go 19 | model_subscription_period_tile.go 20 | -------------------------------------------------------------------------------- /linebot/insight/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/insight/model_app_type_tile.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package insight 21 | 22 | // AppTypeTile 23 | // AppTypeTile 24 | 25 | type AppTypeTile struct { 26 | 27 | /** 28 | * users' OS 29 | */ 30 | AppType AppTypeTileAPP_TYPE `json:"appType,omitempty"` 31 | 32 | /** 33 | * Percentage 34 | */ 35 | Percentage float64 `json:"percentage"` 36 | } 37 | 38 | // AppTypeTileAPP_TYPE type 39 | /* users' OS */ 40 | type AppTypeTileAPP_TYPE string 41 | 42 | // AppTypeTileAPP_TYPE constants 43 | const ( 44 | AppTypeTileAPP_TYPE_IOS AppTypeTileAPP_TYPE = "ios" 45 | 46 | AppTypeTileAPP_TYPE_ANDROID AppTypeTileAPP_TYPE = "android" 47 | 48 | AppTypeTileAPP_TYPE_OTHERS AppTypeTileAPP_TYPE = "others" 49 | ) 50 | -------------------------------------------------------------------------------- /linebot/insight/model_area_tile.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package insight 21 | 22 | // AreaTile 23 | // AreaTile 24 | 25 | type AreaTile struct { 26 | 27 | /** 28 | * users' country and region 29 | */ 30 | Area string `json:"area,omitempty"` 31 | 32 | /** 33 | * Percentage 34 | */ 35 | Percentage float64 `json:"percentage"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/insight/model_error_detail.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package insight 21 | 22 | // ErrorDetail 23 | // ErrorDetail 24 | 25 | type ErrorDetail struct { 26 | 27 | /** 28 | * Details of the error. Not included in the response under certain situations. 29 | */ 30 | Message string `json:"message,omitempty"` 31 | 32 | /** 33 | * Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations. 34 | */ 35 | Property string `json:"property,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/insight/model_error_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package insight 21 | 22 | // ErrorResponse 23 | // ErrorResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#error-responses 25 | type ErrorResponse struct { 26 | 27 | /** 28 | * Message containing information about the error. (Required) 29 | */ 30 | Message string `json:"message"` 31 | 32 | /** 33 | * An array of error details. If the array is empty, this property will not be included in the response. 34 | */ 35 | Details []ErrorDetail `json:"details,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/insight/model_gender_tile.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package insight 21 | 22 | // GenderTile 23 | // GenderTile 24 | 25 | type GenderTile struct { 26 | 27 | /** 28 | * users' gender 29 | */ 30 | Gender GenderTileGENDER `json:"gender,omitempty"` 31 | 32 | /** 33 | * Percentage 34 | */ 35 | Percentage float64 `json:"percentage"` 36 | } 37 | 38 | // GenderTileGENDER type 39 | /* users' gender */ 40 | type GenderTileGENDER string 41 | 42 | // GenderTileGENDER constants 43 | const ( 44 | GenderTileGENDER_MALE GenderTileGENDER = "male" 45 | 46 | GenderTileGENDER_FEMALE GenderTileGENDER = "female" 47 | 48 | GenderTileGENDER_UNKNOWN GenderTileGENDER = "unknown" 49 | ) 50 | -------------------------------------------------------------------------------- /linebot/insight/model_get_message_event_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package insight 21 | 22 | // GetMessageEventResponse 23 | // Statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. 24 | // https://developers.line.biz/en/reference/messaging-api/#get-insight-message-event-response 25 | type GetMessageEventResponse struct { 26 | 27 | /** 28 | * Get Overview 29 | */ 30 | Overview *GetMessageEventResponseOverview `json:"overview,omitempty"` 31 | 32 | /** 33 | * Array of information about individual message bubbles. 34 | */ 35 | Messages []GetMessageEventResponseMessage `json:"messages,omitempty"` 36 | 37 | /** 38 | * Array of information about opened URLs in the message. 39 | */ 40 | Clicks []GetMessageEventResponseClick `json:"clicks,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/insight/model_get_statistics_per_unit_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package insight 21 | 22 | // GetStatisticsPerUnitResponse 23 | // Response object for `get statistics per unit` 24 | // https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit-response 25 | type GetStatisticsPerUnitResponse struct { 26 | 27 | /** 28 | * Get Overview 29 | */ 30 | Overview *GetStatisticsPerUnitResponseOverview `json:"overview"` 31 | 32 | /** 33 | * Array of information about individual message bubbles. (Required) 34 | */ 35 | Messages []GetStatisticsPerUnitResponseMessage `json:"messages"` 36 | 37 | /** 38 | * Array of information about opened URLs in the message. (Required) 39 | */ 40 | Clicks []GetStatisticsPerUnitResponseClick `json:"clicks"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/liff/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/liff/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | api_liff.go 2 | model_add_liff_app_request.go 3 | model_add_liff_app_response.go 4 | model_get_all_liff_apps_response.go 5 | model_liff_app.go 6 | model_liff_bot_prompt.go 7 | model_liff_features.go 8 | model_liff_scope.go 9 | model_liff_view.go 10 | model_update_liff_app_request.go 11 | model_update_liff_view.go 12 | -------------------------------------------------------------------------------- /linebot/liff/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/liff/model_add_liff_app_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package liff 21 | 22 | // AddLiffAppResponse 23 | // AddLiffAppResponse 24 | 25 | type AddLiffAppResponse struct { 26 | 27 | /** 28 | * Get LiffId 29 | */ 30 | LiffId string `json:"liffId"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/liff/model_get_all_liff_apps_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package liff 21 | 22 | // GetAllLiffAppsResponse 23 | // GetAllLiffAppsResponse 24 | 25 | type GetAllLiffAppsResponse struct { 26 | 27 | /** 28 | * Get Apps 29 | */ 30 | Apps []LiffApp `json:"apps,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/liff/model_liff_bot_prompt.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package liff 21 | 22 | /* 23 | * 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. 24 | */ 25 | 26 | // LiffBotPrompt type 27 | type LiffBotPrompt string 28 | 29 | // LiffBotPrompt constants 30 | const ( 31 | LiffBotPrompt_NORMAL LiffBotPrompt = "normal" 32 | 33 | LiffBotPrompt_AGGRESSIVE LiffBotPrompt = "aggressive" 34 | 35 | LiffBotPrompt_NONE LiffBotPrompt = "none" 36 | ) 37 | -------------------------------------------------------------------------------- /linebot/liff/model_liff_features.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package liff 21 | 22 | // LiffFeatures 23 | // LiffFeatures 24 | 25 | type LiffFeatures struct { 26 | 27 | /** 28 | * `true` if the LIFF app supports Bluetooth® Low Energy for LINE Things. `false` otherwise. 29 | */ 30 | Ble bool `json:"ble"` 31 | 32 | /** 33 | * `true` to use the 2D code reader in the LIFF app. false otherwise. The default value is `false`. 34 | */ 35 | QrCode bool `json:"qrCode"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/liff/model_liff_scope.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package liff 21 | 22 | /* 23 | * Array of scopes required for some LIFF SDK methods to function. The default value is `[\"profile\", \"chat_message.write\"]`. 24 | */ 25 | 26 | // LiffScope type 27 | type LiffScope string 28 | 29 | // LiffScope constants 30 | const ( 31 | LiffScope_OPENID LiffScope = "openid" 32 | 33 | LiffScope_EMAIL LiffScope = "email" 34 | 35 | LiffScope_PROFILE LiffScope = "profile" 36 | 37 | LiffScope_CHAT_MESSAGE_WRITE LiffScope = "chat_message.write" 38 | ) 39 | -------------------------------------------------------------------------------- /linebot/manage_audience/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/manage_audience/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | api_manage_audience.go 2 | api_manage_audience_blob.go 3 | model_adaccount.go 4 | model_add_audience_to_audience_group_request.go 5 | model_audience.go 6 | model_audience_group.go 7 | model_audience_group_create_route.go 8 | model_audience_group_failed_type.go 9 | model_audience_group_job.go 10 | model_audience_group_job_failed_type.go 11 | model_audience_group_job_status.go 12 | model_audience_group_job_type.go 13 | model_audience_group_permission.go 14 | model_audience_group_status.go 15 | model_audience_group_type.go 16 | model_create_audience_group_request.go 17 | model_create_audience_group_response.go 18 | model_create_click_based_audience_group_request.go 19 | model_create_click_based_audience_group_response.go 20 | model_create_imp_based_audience_group_request.go 21 | model_create_imp_based_audience_group_response.go 22 | model_detailed_owner.go 23 | model_error_detail.go 24 | model_error_response.go 25 | model_get_audience_data_response.go 26 | model_get_audience_groups_response.go 27 | model_get_shared_audience_data_response.go 28 | model_get_shared_audience_groups_response.go 29 | model_update_audience_group_description_request.go 30 | -------------------------------------------------------------------------------- /linebot/manage_audience/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/manage_audience/model_adaccount.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // Adaccount 23 | // Adaccount 24 | 25 | type Adaccount struct { 26 | 27 | /** 28 | * Ad account name. 29 | */ 30 | Name string `json:"name,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_add_audience_to_audience_group_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // AddAudienceToAudienceGroupRequest 23 | // Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by JSON) 24 | // https://developers.line.biz/en/reference/messaging-api/#update-upload-audience-group 25 | type AddAudienceToAudienceGroupRequest struct { 26 | 27 | /** 28 | * The audience ID. 29 | */ 30 | AudienceGroupId int64 `json:"audienceGroupId"` 31 | 32 | /** 33 | * The audience's name. 34 | */ 35 | UploadDescription string `json:"uploadDescription,omitempty"` 36 | 37 | /** 38 | * An array of up to 10,000 user IDs or IFAs. 39 | */ 40 | Audiences []Audience `json:"audiences,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // Audience 23 | // Audience 24 | 25 | type Audience struct { 26 | 27 | /** 28 | * A user ID or IFA. You can specify an empty array. 29 | */ 30 | Id string `json:"id,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience_group_authority_level.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | /* 23 | * authority level 24 | */ 25 | 26 | // AudienceGroupAuthorityLevel type 27 | type AudienceGroupAuthorityLevel string 28 | 29 | // AudienceGroupAuthorityLevel constants 30 | const ( 31 | AudienceGroupAuthorityLevel_PUBLIC AudienceGroupAuthorityLevel = "PUBLIC" 32 | 33 | AudienceGroupAuthorityLevel_PRIVATE AudienceGroupAuthorityLevel = "PRIVATE" 34 | ) 35 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience_group_failed_type.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | /* 23 | * Failed type 24 | */ 25 | 26 | // AudienceGroupFailedType type 27 | type AudienceGroupFailedType string 28 | 29 | // AudienceGroupFailedType constants 30 | const ( 31 | AudienceGroupFailedType_AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT AudienceGroupFailedType = "AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT" 32 | 33 | AudienceGroupFailedType_INTERNAL_ERROR AudienceGroupFailedType = "INTERNAL_ERROR" 34 | 35 | AudienceGroupFailedType_NULL AudienceGroupFailedType = "null" 36 | ) 37 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience_group_job_failed_type.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | /* 23 | * Failed type 24 | */ 25 | 26 | // AudienceGroupJobFailedType type 27 | type AudienceGroupJobFailedType string 28 | 29 | // AudienceGroupJobFailedType constants 30 | const ( 31 | AudienceGroupJobFailedType_INTERNAL_ERROR AudienceGroupJobFailedType = "INTERNAL_ERROR" 32 | 33 | AudienceGroupJobFailedType_AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT AudienceGroupJobFailedType = "AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT" 34 | ) 35 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience_group_job_status.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | /* 23 | * Job status 24 | */ 25 | 26 | // AudienceGroupJobStatus type 27 | type AudienceGroupJobStatus string 28 | 29 | // AudienceGroupJobStatus constants 30 | const ( 31 | AudienceGroupJobStatus_QUEUED AudienceGroupJobStatus = "QUEUED" 32 | 33 | AudienceGroupJobStatus_WORKING AudienceGroupJobStatus = "WORKING" 34 | 35 | AudienceGroupJobStatus_FINISHED AudienceGroupJobStatus = "FINISHED" 36 | 37 | AudienceGroupJobStatus_FAILED AudienceGroupJobStatus = "FAILED" 38 | ) 39 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience_group_job_type.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | /* 23 | * Job Type 24 | */ 25 | 26 | // AudienceGroupJobType type 27 | type AudienceGroupJobType string 28 | 29 | // AudienceGroupJobType constants 30 | const ( 31 | AudienceGroupJobType_DIFF_ADD AudienceGroupJobType = "DIFF_ADD" 32 | ) 33 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience_group_permission.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | /* 23 | * Permission 24 | */ 25 | 26 | // AudienceGroupPermission type 27 | type AudienceGroupPermission string 28 | 29 | // AudienceGroupPermission constants 30 | const ( 31 | AudienceGroupPermission_READ AudienceGroupPermission = "READ" 32 | 33 | AudienceGroupPermission_READ_WRITE AudienceGroupPermission = "READ_WRITE" 34 | ) 35 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_audience_group_status.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | /* 23 | * Status 24 | */ 25 | 26 | // AudienceGroupStatus type 27 | type AudienceGroupStatus string 28 | 29 | // AudienceGroupStatus constants 30 | const ( 31 | AudienceGroupStatus_IN_PROGRESS AudienceGroupStatus = "IN_PROGRESS" 32 | 33 | AudienceGroupStatus_READY AudienceGroupStatus = "READY" 34 | 35 | AudienceGroupStatus_FAILED AudienceGroupStatus = "FAILED" 36 | 37 | AudienceGroupStatus_EXPIRED AudienceGroupStatus = "EXPIRED" 38 | 39 | AudienceGroupStatus_INACTIVE AudienceGroupStatus = "INACTIVE" 40 | 41 | AudienceGroupStatus_ACTIVATING AudienceGroupStatus = "ACTIVATING" 42 | ) 43 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_create_imp_based_audience_group_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // CreateImpBasedAudienceGroupRequest 23 | // Create audience for impression-based retargeting 24 | // https://developers.line.biz/en/reference/messaging-api/#create-imp-audience-group 25 | type CreateImpBasedAudienceGroupRequest struct { 26 | 27 | /** 28 | * The audience's name. This is case-insensitive, meaning `AUDIENCE` and `audience` are considered identical. Max character limit: 120 29 | */ 30 | Description string `json:"description,omitempty"` 31 | 32 | /** 33 | * The request ID of a broadcast or narrowcast message sent in the past 60 days. Each Messaging API request has a request ID. 34 | */ 35 | RequestId string `json:"requestId,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_detailed_owner.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // DetailedOwner 23 | // Owner of this audience group. 24 | 25 | type DetailedOwner struct { 26 | 27 | /** 28 | * Service name where the audience group has been created. 29 | */ 30 | ServiceType string `json:"serviceType,omitempty"` 31 | 32 | /** 33 | * Owner ID in the service. 34 | */ 35 | Id string `json:"id,omitempty"` 36 | 37 | /** 38 | * Owner account name. 39 | */ 40 | Name string `json:"name,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_error_detail.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // ErrorDetail 23 | // ErrorDetail 24 | 25 | type ErrorDetail struct { 26 | 27 | /** 28 | * Details of the error. Not included in the response under certain situations. 29 | */ 30 | Message string `json:"message,omitempty"` 31 | 32 | /** 33 | * Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations. 34 | */ 35 | Property string `json:"property,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_error_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // ErrorResponse 23 | // ErrorResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#error-responses 25 | type ErrorResponse struct { 26 | 27 | /** 28 | * Message containing information about the error. (Required) 29 | */ 30 | Message string `json:"message"` 31 | 32 | /** 33 | * An array of error details. If the array is empty, this property will not be included in the response. 34 | */ 35 | Details []ErrorDetail `json:"details,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_get_audience_data_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // GetAudienceDataResponse 23 | // Get audience data 24 | // https://developers.line.biz/en/reference/messaging-api/#get-audience-group 25 | type GetAudienceDataResponse struct { 26 | 27 | /** 28 | * Get AudienceGroup 29 | */ 30 | AudienceGroup *AudienceGroup `json:"audienceGroup,omitempty"` 31 | 32 | /** 33 | * 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 34 | */ 35 | Jobs []AudienceGroupJob `json:"jobs,omitempty"` 36 | 37 | /** 38 | * Get Adaccount 39 | */ 40 | Adaccount *Adaccount `json:"adaccount,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_get_audience_group_authority_level_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // GetAudienceGroupAuthorityLevelResponse 23 | // Get the authority level of the audience 24 | // https://developers.line.biz/en/reference/messaging-api/#get-authority-level 25 | type GetAudienceGroupAuthorityLevelResponse struct { 26 | 27 | /** 28 | * Get AuthorityLevel 29 | */ 30 | AuthorityLevel AudienceGroupAuthorityLevel `json:"authorityLevel,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_get_shared_audience_data_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // GetSharedAudienceDataResponse 23 | // Get audience data 24 | // https://developers.line.biz/en/reference/messaging-api/#get-audience-group 25 | type GetSharedAudienceDataResponse struct { 26 | 27 | /** 28 | * Get AudienceGroup 29 | */ 30 | AudienceGroup *AudienceGroup `json:"audienceGroup,omitempty"` 31 | 32 | /** 33 | * 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 34 | */ 35 | Jobs []AudienceGroupJob `json:"jobs,omitempty"` 36 | 37 | /** 38 | * Get Owner 39 | */ 40 | Owner *DetailedOwner `json:"owner,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_update_audience_group_authority_level_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // UpdateAudienceGroupAuthorityLevelRequest 23 | // Change the authority level of the audience 24 | // https://developers.line.biz/en/reference/messaging-api/#change-authority-level 25 | type UpdateAudienceGroupAuthorityLevelRequest struct { 26 | 27 | /** 28 | * Get AuthorityLevel 29 | */ 30 | AuthorityLevel AudienceGroupAuthorityLevel `json:"authorityLevel,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/manage_audience/model_update_audience_group_description_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package manage_audience 21 | 22 | // UpdateAudienceGroupDescriptionRequest 23 | // Rename an audience 24 | // https://developers.line.biz/en/reference/messaging-api/#set-description-audience-group 25 | type UpdateAudienceGroupDescriptionRequest struct { 26 | 27 | /** 28 | * The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 29 | */ 30 | Description string `json:"description,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/manage_audience/tests/api/api_manage_audience_blob_test_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | -------------------------------------------------------------------------------- /linebot/manage_audience/tests/api/api_manage_audience_test_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | -------------------------------------------------------------------------------- /linebot/mention.go: -------------------------------------------------------------------------------- 1 | package linebot 2 | 3 | // MentionedTargetType type 4 | type MentionedTargetType string 5 | 6 | // MentionedTargetType constants 7 | const ( 8 | MentionedTargetTypeUser MentionedTargetType = "user" 9 | MentionedTargetTypeAll MentionedTargetType = "all" 10 | ) 11 | 12 | // Mention type 13 | // Deprecated: Use OpenAPI based classes instead. 14 | type Mention struct { 15 | Mentionees []*Mentionee `json:"mentionees"` 16 | } 17 | 18 | // Mentionee type 19 | // Deprecated: Use OpenAPI based classes instead. 20 | type Mentionee struct { 21 | Index int `json:"index"` 22 | Length int `json:"length"` 23 | Type MentionedTargetType `json:"type"` 24 | UserID string `json:"userId,omitempty"` 25 | } 26 | -------------------------------------------------------------------------------- /linebot/messaging_api/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/messaging_api/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/messaging_api/model_age_demographic_filter.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // AgeDemographicFilter 27 | // AgeDemographicFilter 28 | 29 | type AgeDemographicFilter struct { 30 | DemographicFilter 31 | 32 | /** 33 | * Get Gte 34 | */ 35 | Gte AgeDemographic `json:"gte,omitempty"` 36 | 37 | /** 38 | * Get Lt 39 | */ 40 | Lt AgeDemographic `json:"lt,omitempty"` 41 | } 42 | 43 | // MarshalJSON customizes the JSON serialization of the AgeDemographicFilter struct. 44 | func (r *AgeDemographicFilter) MarshalJSON() ([]byte, error) { 45 | 46 | type Alias AgeDemographicFilter 47 | return json.Marshal(&struct { 48 | *Alias 49 | 50 | Type string `json:"type,omitempty"` 51 | }{ 52 | Alias: (*Alias)(r), 53 | 54 | Type: "age", 55 | }) 56 | } 57 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_all_mention_target.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // AllMentionTarget 27 | // AllMentionTarget 28 | // https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mentionee-all 29 | type AllMentionTarget struct { 30 | MentionTarget 31 | } 32 | 33 | // MarshalJSON customizes the JSON serialization of the AllMentionTarget struct. 34 | func (r *AllMentionTarget) MarshalJSON() ([]byte, error) { 35 | 36 | type Alias AllMentionTarget 37 | return json.Marshal(&struct { 38 | *Alias 39 | 40 | Type string `json:"type"` 41 | }{ 42 | Alias: (*Alias)(r), 43 | 44 | Type: "all", 45 | }) 46 | } 47 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_alt_uri.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // AltUri 23 | // AltUri 24 | 25 | type AltUri struct { 26 | 27 | /** 28 | * Get Desktop 29 | */ 30 | Desktop string `json:"desktop,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_app_type_demographic.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // AppTypeDemographic type 23 | type AppTypeDemographic string 24 | 25 | // AppTypeDemographic constants 26 | const ( 27 | AppTypeDemographic_IOS AppTypeDemographic = "ios" 28 | 29 | AppTypeDemographic_ANDROID AppTypeDemographic = "android" 30 | ) 31 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_app_type_demographic_filter.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // AppTypeDemographicFilter 27 | // AppTypeDemographicFilter 28 | 29 | type AppTypeDemographicFilter struct { 30 | DemographicFilter 31 | 32 | /** 33 | * Get OneOf 34 | */ 35 | OneOf []AppTypeDemographic `json:"oneOf,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the AppTypeDemographicFilter struct. 39 | func (r *AppTypeDemographicFilter) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias AppTypeDemographicFilter 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "appType", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_area_demographic_filter.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // AreaDemographicFilter 27 | // AreaDemographicFilter 28 | 29 | type AreaDemographicFilter struct { 30 | DemographicFilter 31 | 32 | /** 33 | * Get OneOf 34 | */ 35 | OneOf []AreaDemographic `json:"oneOf,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the AreaDemographicFilter struct. 39 | func (r *AreaDemographicFilter) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias AreaDemographicFilter 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "area", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_audience_recipient.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // AudienceRecipient 27 | // AudienceRecipient 28 | 29 | type AudienceRecipient struct { 30 | Recipient 31 | 32 | /** 33 | * Get AudienceGroupId 34 | */ 35 | AudienceGroupId int64 `json:"audienceGroupId"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the AudienceRecipient struct. 39 | func (r *AudienceRecipient) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias AudienceRecipient 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "audience", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_camera_action.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // CameraAction 27 | // CameraAction 28 | 29 | type CameraAction struct { 30 | Action 31 | 32 | /** 33 | * Label for the action. 34 | */ 35 | Label string `json:"label,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the CameraAction struct. 39 | func (r *CameraAction) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias CameraAction 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "camera", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_camera_roll_action.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // CameraRollAction 27 | // CameraRollAction 28 | 29 | type CameraRollAction struct { 30 | Action 31 | 32 | /** 33 | * Label for the action. 34 | */ 35 | Label string `json:"label,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the CameraRollAction struct. 39 | func (r *CameraRollAction) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias CameraRollAction 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "cameraRoll", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_chat_reference.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ChatReference 23 | // Chat reference 24 | // https://developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read 25 | type ChatReference struct { 26 | 27 | /** 28 | * The target user ID (Required) 29 | */ 30 | UserId string `json:"userId"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_create_rich_menu_alias_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // CreateRichMenuAliasRequest 23 | // CreateRichMenuAliasRequest 24 | // https://developers.line.biz/en/reference/messaging-api/#create-rich-menu-alias 25 | type CreateRichMenuAliasRequest struct { 26 | 27 | /** 28 | * Rich menu alias ID, which can be any ID, unique for each channel. (Required) 29 | */ 30 | RichMenuAliasId string `json:"richMenuAliasId"` 31 | 32 | /** 33 | * The rich menu ID to be associated with the rich menu alias. (Required) 34 | */ 35 | RichMenuId string `json:"richMenuId"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_emoji.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // Emoji 23 | // Emoji 24 | 25 | type Emoji struct { 26 | 27 | /** 28 | * Get Index 29 | */ 30 | Index int32 `json:"index"` 31 | 32 | /** 33 | * Get ProductId 34 | */ 35 | ProductId string `json:"productId,omitempty"` 36 | 37 | /** 38 | * Get EmojiId 39 | */ 40 | EmojiId string `json:"emojiId,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_error_detail.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ErrorDetail 23 | // ErrorDetail 24 | 25 | type ErrorDetail struct { 26 | 27 | /** 28 | * Details of the error. Not included in the response under certain situations. 29 | */ 30 | Message string `json:"message,omitempty"` 31 | 32 | /** 33 | * Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations. 34 | */ 35 | Property string `json:"property,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_error_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ErrorResponse 23 | // ErrorResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#error-responses 25 | type ErrorResponse struct { 26 | 27 | /** 28 | * Message containing information about the error. (Required) 29 | */ 30 | Message string `json:"message"` 31 | 32 | /** 33 | * An array of error details. If the array is empty, this property will not be included in the response. 34 | */ 35 | Details []ErrorDetail `json:"details,omitempty"` 36 | 37 | /** 38 | * Array of sent messages. 39 | */ 40 | SentMessages []SentMessage `json:"sentMessages,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_block_style.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // FlexBlockStyle 23 | // FlexBlockStyle 24 | 25 | type FlexBlockStyle struct { 26 | 27 | /** 28 | * Get BackgroundColor 29 | */ 30 | BackgroundColor string `json:"backgroundColor,omitempty"` 31 | 32 | /** 33 | * Get Separator 34 | */ 35 | Separator bool `json:"separator"` 36 | 37 | /** 38 | * Get SeparatorColor 39 | */ 40 | SeparatorColor string `json:"separatorColor,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_box_border_width.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * Width of box border. This is only for `borderWidth` in FlexBox. A value of none means that borders are not rendered; the other values are listed in order of increasing width. 24 | */ 25 | 26 | // FlexBoxBorderWidth type 27 | type FlexBoxBorderWidth string 28 | 29 | // FlexBoxBorderWidth constants 30 | const ( 31 | FlexBoxBorderWidth_NONE FlexBoxBorderWidth = "none" 32 | 33 | FlexBoxBorderWidth_LIGHT FlexBoxBorderWidth = "light" 34 | 35 | FlexBoxBorderWidth_NORMAL FlexBoxBorderWidth = "normal" 36 | 37 | FlexBoxBorderWidth_MEDIUM FlexBoxBorderWidth = "medium" 38 | 39 | FlexBoxBorderWidth_SEMI_BOLD FlexBoxBorderWidth = "semi-bold" 40 | 41 | FlexBoxBorderWidth_BOLD FlexBoxBorderWidth = "bold" 42 | ) 43 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_box_padding.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * Padding can be specified in pixels, percentage (to the parent box width) or with a keyword. FlexBoxPadding just provides only keywords. 24 | */ 25 | 26 | // FlexBoxPadding type 27 | type FlexBoxPadding string 28 | 29 | // FlexBoxPadding constants 30 | const ( 31 | FlexBoxPadding_NONE FlexBoxPadding = "none" 32 | 33 | FlexBoxPadding_XS FlexBoxPadding = "xs" 34 | 35 | FlexBoxPadding_SM FlexBoxPadding = "sm" 36 | 37 | FlexBoxPadding_MD FlexBoxPadding = "md" 38 | 39 | FlexBoxPadding_LG FlexBoxPadding = "lg" 40 | 41 | FlexBoxPadding_XL FlexBoxPadding = "xl" 42 | 43 | FlexBoxPadding_XXL FlexBoxPadding = "xxl" 44 | ) 45 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_box_spacing.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * You can specify the minimum space between two components with the `spacing` property of the parent box component, in pixels or with a keyword. FlexBoxSpacing just provides only keywords. 24 | */ 25 | 26 | // FlexBoxSpacing type 27 | type FlexBoxSpacing string 28 | 29 | // FlexBoxSpacing constants 30 | const ( 31 | FlexBoxSpacing_NONE FlexBoxSpacing = "none" 32 | 33 | FlexBoxSpacing_XS FlexBoxSpacing = "xs" 34 | 35 | FlexBoxSpacing_SM FlexBoxSpacing = "sm" 36 | 37 | FlexBoxSpacing_MD FlexBoxSpacing = "md" 38 | 39 | FlexBoxSpacing_LG FlexBoxSpacing = "lg" 40 | 41 | FlexBoxSpacing_XL FlexBoxSpacing = "xl" 42 | 43 | FlexBoxSpacing_XXL FlexBoxSpacing = "xxl" 44 | ) 45 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_bubble_styles.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // FlexBubbleStyles 23 | // FlexBubbleStyles 24 | 25 | type FlexBubbleStyles struct { 26 | 27 | /** 28 | * Get Header 29 | */ 30 | Header *FlexBlockStyle `json:"header,omitempty"` 31 | 32 | /** 33 | * Get Hero 34 | */ 35 | Hero *FlexBlockStyle `json:"hero,omitempty"` 36 | 37 | /** 38 | * Get Body 39 | */ 40 | Body *FlexBlockStyle `json:"body,omitempty"` 41 | 42 | /** 43 | * Get Footer 44 | */ 45 | Footer *FlexBlockStyle `json:"footer,omitempty"` 46 | } 47 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_carousel.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // FlexCarousel 27 | // FlexCarousel 28 | 29 | type FlexCarousel struct { 30 | FlexContainer 31 | 32 | /** 33 | * Get Contents 34 | */ 35 | Contents []FlexBubble `json:"contents"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the FlexCarousel struct. 39 | func (r *FlexCarousel) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias FlexCarousel 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "carousel", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_filler.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // FlexFiller 27 | // FlexFiller 28 | 29 | type FlexFiller struct { 30 | FlexComponent 31 | 32 | /** 33 | * Get Flex 34 | */ 35 | Flex int32 `json:"flex"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the FlexFiller struct. 39 | func (r *FlexFiller) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias FlexFiller 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "filler", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_margin.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * You can specify the minimum space before a child component with the `margin` property of the child component, in pixels or with a keyword. FlexMargin just provides only keywords. 24 | */ 25 | 26 | // FlexMargin type 27 | type FlexMargin string 28 | 29 | // FlexMargin constants 30 | const ( 31 | FlexMargin_NONE FlexMargin = "none" 32 | 33 | FlexMargin_XS FlexMargin = "xs" 34 | 35 | FlexMargin_SM FlexMargin = "sm" 36 | 37 | FlexMargin_MD FlexMargin = "md" 38 | 39 | FlexMargin_LG FlexMargin = "lg" 40 | 41 | FlexMargin_XL FlexMargin = "xl" 42 | 43 | FlexMargin_XXL FlexMargin = "xxl" 44 | ) 45 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_offset.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * You can specify the offset of a component with the `offset*` property, in pixels or with a keyword. You can also specify the percentage to the box width for `offsetStart` and `offsetEnd` and to the box height for `offsetTop` and `offsetBottom`. FlexOffset just provides only keywords. 24 | */ 25 | 26 | // FlexOffset type 27 | type FlexOffset string 28 | 29 | // FlexOffset constants 30 | const ( 31 | FlexOffset_NONE FlexOffset = "none" 32 | 33 | FlexOffset_XS FlexOffset = "xs" 34 | 35 | FlexOffset_SM FlexOffset = "sm" 36 | 37 | FlexOffset_MD FlexOffset = "md" 38 | 39 | FlexOffset_LG FlexOffset = "lg" 40 | 41 | FlexOffset_XL FlexOffset = "xl" 42 | 43 | FlexOffset_XXL FlexOffset = "xxl" 44 | ) 45 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_separator.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // FlexSeparator 27 | // FlexSeparator 28 | 29 | type FlexSeparator struct { 30 | FlexComponent 31 | 32 | /** 33 | * Get Margin 34 | */ 35 | Margin string `json:"margin,omitempty"` 36 | 37 | /** 38 | * Get Color 39 | */ 40 | Color string `json:"color,omitempty"` 41 | } 42 | 43 | // MarshalJSON customizes the JSON serialization of the FlexSeparator struct. 44 | func (r *FlexSeparator) MarshalJSON() ([]byte, error) { 45 | 46 | type Alias FlexSeparator 47 | return json.Marshal(&struct { 48 | *Alias 49 | 50 | Type string `json:"type"` 51 | }{ 52 | Alias: (*Alias)(r), 53 | 54 | Type: "separator", 55 | }) 56 | } 57 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_flex_span_size.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * Font size in the `size` property of the Flex span component. You can specify the size in pixels or with a keyword. FlexSpanSize just provides only keywords. 24 | */ 25 | 26 | // FlexSpanSize type 27 | type FlexSpanSize string 28 | 29 | // FlexSpanSize constants 30 | const ( 31 | FlexSpanSize_XXS FlexSpanSize = "xxs" 32 | 33 | FlexSpanSize_XS FlexSpanSize = "xs" 34 | 35 | FlexSpanSize_SM FlexSpanSize = "sm" 36 | 37 | FlexSpanSize_MD FlexSpanSize = "md" 38 | 39 | FlexSpanSize_LG FlexSpanSize = "lg" 40 | 41 | FlexSpanSize_XL FlexSpanSize = "xl" 42 | 43 | FlexSpanSize_XXL FlexSpanSize = "xxl" 44 | 45 | FlexSpanSize__3XL FlexSpanSize = "3xl" 46 | 47 | FlexSpanSize__4XL FlexSpanSize = "4xl" 48 | 49 | FlexSpanSize__5XL FlexSpanSize = "5xl" 50 | ) 51 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_gender_demographic.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GenderDemographic type 23 | type GenderDemographic string 24 | 25 | // GenderDemographic constants 26 | const ( 27 | GenderDemographic_MALE GenderDemographic = "male" 28 | 29 | GenderDemographic_FEMALE GenderDemographic = "female" 30 | ) 31 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_gender_demographic_filter.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // GenderDemographicFilter 27 | // GenderDemographicFilter 28 | 29 | type GenderDemographicFilter struct { 30 | DemographicFilter 31 | 32 | /** 33 | * Get OneOf 34 | */ 35 | OneOf []GenderDemographic `json:"oneOf,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the GenderDemographicFilter struct. 39 | func (r *GenderDemographicFilter) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias GenderDemographicFilter 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "gender", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_get_aggregation_unit_name_list_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GetAggregationUnitNameListResponse 23 | // GetAggregationUnitNameListResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-name-list-of-units-used-this-month 25 | type GetAggregationUnitNameListResponse struct { 26 | 27 | /** 28 | * An array of strings indicating the names of aggregation units used this month. (Required) 29 | */ 30 | CustomAggregationUnits []string `json:"customAggregationUnits"` 31 | 32 | /** 33 | * A continuation token to get the next array of unit names. Returned only when there are remaining aggregation units that weren't returned in customAggregationUnits in the original request. 34 | */ 35 | Next string `json:"next,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_get_aggregation_unit_usage_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GetAggregationUnitUsageResponse 23 | // GetAggregationUnitUsageResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-number-of-units-used-this-month 25 | type GetAggregationUnitUsageResponse struct { 26 | 27 | /** 28 | * Number of aggregation units used this month. (Required) 29 | */ 30 | NumOfCustomAggregationUnits int64 `json:"numOfCustomAggregationUnits"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_get_membership_subscription_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GetMembershipSubscriptionResponse 23 | // A user's membership subscription status 24 | // https://developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status 25 | type GetMembershipSubscriptionResponse struct { 26 | 27 | /** 28 | * List of subscription information (Required) 29 | */ 30 | Subscriptions []Subscription `json:"subscriptions"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_get_webhook_endpoint_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GetWebhookEndpointResponse 23 | // GetWebhookEndpointResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-webhook-endpoint-information 25 | type GetWebhookEndpointResponse struct { 26 | 27 | /** 28 | * Webhook URL (Required) 29 | */ 30 | Endpoint string `json:"endpoint"` 31 | 32 | /** 33 | * 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. (Required) 34 | */ 35 | Active bool `json:"active"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_group_member_count_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GroupMemberCountResponse 23 | // GroupMemberCountResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-members-group-count 25 | type GroupMemberCountResponse struct { 26 | 27 | /** 28 | * The count of members in the group chat. The number returned excludes the LINE Official Account. (Required) 29 | */ 30 | Count int32 `json:"count"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_group_summary_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GroupSummaryResponse 23 | // GroupSummaryResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-group-summary 25 | type GroupSummaryResponse struct { 26 | 27 | /** 28 | * Group ID (Required) 29 | */ 30 | GroupId string `json:"groupId"` 31 | 32 | /** 33 | * Group name (Required) 34 | */ 35 | GroupName string `json:"groupName"` 36 | 37 | /** 38 | * Group icon URL. Not included in the response if the user doesn't set a group profile icon. 39 | */ 40 | PictureUrl string `json:"pictureUrl,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_group_user_profile_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // GroupUserProfileResponse 23 | // GroupUserProfileResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-group-member-profile 25 | type GroupUserProfileResponse struct { 26 | 27 | /** 28 | * User's display name (Required) 29 | */ 30 | DisplayName string `json:"displayName"` 31 | 32 | /** 33 | * User ID (Required) 34 | */ 35 | UserId string `json:"userId"` 36 | 37 | /** 38 | * Profile image URL. `https` image URL. Not included in the response if the user doesn't have a profile image. 39 | */ 40 | PictureUrl string `json:"pictureUrl,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_image_carousel_template.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // ImageCarouselTemplate 27 | // ImageCarouselTemplate 28 | 29 | type ImageCarouselTemplate struct { 30 | Template 31 | 32 | /** 33 | * Get Columns 34 | */ 35 | Columns []ImageCarouselColumn `json:"columns"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the ImageCarouselTemplate struct. 39 | func (r *ImageCarouselTemplate) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias ImageCarouselTemplate 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "image_carousel", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_imagemap_area.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ImagemapArea 23 | // ImagemapArea 24 | 25 | type ImagemapArea struct { 26 | 27 | /** 28 | * Get X 29 | */ 30 | X int32 `json:"x"` 31 | 32 | /** 33 | * Get Y 34 | */ 35 | Y int32 `json:"y"` 36 | 37 | /** 38 | * Get Width 39 | */ 40 | Width int32 `json:"width"` 41 | 42 | /** 43 | * Get Height 44 | */ 45 | Height int32 `json:"height"` 46 | } 47 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_imagemap_base_size.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ImagemapBaseSize 23 | // ImagemapBaseSize 24 | 25 | type ImagemapBaseSize struct { 26 | 27 | /** 28 | * Get Height 29 | */ 30 | Height int32 `json:"height"` 31 | 32 | /** 33 | * Get Width 34 | */ 35 | Width int32 `json:"width"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_imagemap_external_link.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ImagemapExternalLink 23 | // ImagemapExternalLink 24 | 25 | type ImagemapExternalLink struct { 26 | 27 | /** 28 | * Get LinkUri 29 | */ 30 | LinkUri string `json:"linkUri,omitempty"` 31 | 32 | /** 33 | * Get Label 34 | */ 35 | Label string `json:"label,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_imagemap_video.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ImagemapVideo 23 | // ImagemapVideo 24 | 25 | type ImagemapVideo struct { 26 | 27 | /** 28 | * Get OriginalContentUrl 29 | */ 30 | OriginalContentUrl string `json:"originalContentUrl,omitempty"` 31 | 32 | /** 33 | * Get PreviewImageUrl 34 | */ 35 | PreviewImageUrl string `json:"previewImageUrl,omitempty"` 36 | 37 | /** 38 | * Get Area 39 | */ 40 | Area *ImagemapArea `json:"area,omitempty"` 41 | 42 | /** 43 | * Get ExternalLink 44 | */ 45 | ExternalLink *ImagemapExternalLink `json:"externalLink,omitempty"` 46 | } 47 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_issue_link_token_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // IssueLinkTokenResponse 23 | // IssueLinkTokenResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#issue-link-token 25 | type IssueLinkTokenResponse struct { 26 | 27 | /** 28 | * Link token. Link tokens are valid for 10 minutes and can only be used once. (Required) 29 | */ 30 | LinkToken string `json:"linkToken"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_limit.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // Limit 23 | // Limit of the Narrowcast 24 | // https://developers.line.biz/en/reference/messaging-api/#send-narrowcast-message 25 | type Limit struct { 26 | 27 | /** 28 | * 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. 29 | * minimum: 1 30 | */ 31 | Max int32 `json:"max,omitempty"` 32 | 33 | /** 34 | * 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. 35 | */ 36 | UpToRemainingQuota bool `json:"upToRemainingQuota"` 37 | } 38 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_location_action.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // LocationAction 27 | // LocationAction 28 | 29 | type LocationAction struct { 30 | Action 31 | 32 | /** 33 | * Label for the action. 34 | */ 35 | Label string `json:"label,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the LocationAction struct. 39 | func (r *LocationAction) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias LocationAction 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "location", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_mark_messages_as_read_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // MarkMessagesAsReadRequest 23 | // MarkMessagesAsReadRequest 24 | // https://developers.line.biz/en/reference/partner-docs/#mark-messages-from-users-as-read 25 | type MarkMessagesAsReadRequest struct { 26 | 27 | /** 28 | * Get Chat 29 | */ 30 | Chat *ChatReference `json:"chat"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_members_ids_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // MembersIdsResponse 23 | // MembersIdsResponse 24 | 25 | type MembersIdsResponse struct { 26 | 27 | /** 28 | * List of user IDs of members in the group chat. Only users of LINE for iOS and LINE for Android are included in `memberIds`. (Required) 29 | */ 30 | MemberIds []string `json:"memberIds"` 31 | 32 | /** 33 | * 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. 34 | */ 35 | Next string `json:"next,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_membership_list_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // MembershipListResponse 23 | // List of memberships 24 | 25 | type MembershipListResponse struct { 26 | 27 | /** 28 | * List of membership information (Required) 29 | */ 30 | Memberships []Membership `json:"memberships"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_message_action.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // MessageAction 27 | // MessageAction 28 | 29 | type MessageAction struct { 30 | Action 31 | 32 | /** 33 | * Label for the action. 34 | */ 35 | Label string `json:"label,omitempty"` 36 | 37 | /** 38 | * Get Text 39 | */ 40 | Text string `json:"text,omitempty"` 41 | } 42 | 43 | // MarshalJSON customizes the JSON serialization of the MessageAction struct. 44 | func (r *MessageAction) MarshalJSON() ([]byte, error) { 45 | 46 | type Alias MessageAction 47 | return json.Marshal(&struct { 48 | *Alias 49 | 50 | Type string `json:"type,omitempty"` 51 | }{ 52 | Alias: (*Alias)(r), 53 | 54 | Type: "message", 55 | }) 56 | } 57 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_message_quota_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // MessageQuotaResponse 23 | // MessageQuotaResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-quota 25 | type MessageQuotaResponse struct { 26 | 27 | /** 28 | * Get Type 29 | */ 30 | Type QuotaType `json:"type"` 31 | 32 | /** 33 | * The target limit for sending messages in the current month. This property is returned when the `type` property has a value of `limited`. 34 | */ 35 | Value int64 `json:"value"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_push_message_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // PushMessageResponse 23 | // PushMessageResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#send-push-message-response 25 | type PushMessageResponse struct { 26 | 27 | /** 28 | * Array of sent messages. (Required) 29 | */ 30 | SentMessages []SentMessage `json:"sentMessages"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_quick_reply.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // QuickReply 23 | // Quick reply 24 | // https://developers.line.biz/en/reference/messaging-api/#items-object 25 | type QuickReply struct { 26 | 27 | /** 28 | * Quick reply button objects. 29 | */ 30 | Items []QuickReplyItem `json:"items,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_quota_consumption_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // QuotaConsumptionResponse 23 | // QuotaConsumptionResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-consumption 25 | type QuotaConsumptionResponse struct { 26 | 27 | /** 28 | * The number of sent messages in the current month (Required) 29 | */ 30 | TotalUsage int64 `json:"totalUsage"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_quota_type.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * One of the following values to indicate whether a target limit is set or not. 24 | */ 25 | 26 | // QuotaType type 27 | type QuotaType string 28 | 29 | // QuotaType constants 30 | const ( 31 | QuotaType_NONE QuotaType = "none" 32 | 33 | QuotaType_LIMITED QuotaType = "limited" 34 | ) 35 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_redelivery_recipient.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // RedeliveryRecipient 27 | // RedeliveryRecipient 28 | 29 | type RedeliveryRecipient struct { 30 | Recipient 31 | 32 | /** 33 | * Get RequestId 34 | */ 35 | RequestId string `json:"requestId,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the RedeliveryRecipient struct. 39 | func (r *RedeliveryRecipient) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias RedeliveryRecipient 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type,omitempty"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "redelivery", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_reply_message_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ReplyMessageResponse 23 | // ReplyMessageResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#send-reply-message-response 25 | type ReplyMessageResponse struct { 26 | 27 | /** 28 | * Array of sent messages. (Required) 29 | */ 30 | SentMessages []SentMessage `json:"sentMessages"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_alias_list_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RichMenuAliasListResponse 23 | // RichMenuAliasListResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-alias-list 25 | type RichMenuAliasListResponse struct { 26 | 27 | /** 28 | * Rich menu aliases. (Required) 29 | */ 30 | Aliases []RichMenuAliasResponse `json:"aliases"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_alias_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RichMenuAliasResponse 23 | // RichMenuAliasResponse 24 | 25 | type RichMenuAliasResponse struct { 26 | 27 | /** 28 | * Rich menu alias ID. (Required) 29 | */ 30 | RichMenuAliasId string `json:"richMenuAliasId"` 31 | 32 | /** 33 | * The rich menu ID associated with the rich menu alias. (Required) 34 | */ 35 | RichMenuId string `json:"richMenuId"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_batch_unlink_all_operation.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // RichMenuBatchUnlinkAllOperation 27 | // Unlink the rich menu from all users linked to the rich menu. 28 | 29 | type RichMenuBatchUnlinkAllOperation struct { 30 | RichMenuBatchOperation 31 | } 32 | 33 | // MarshalJSON customizes the JSON serialization of the RichMenuBatchUnlinkAllOperation struct. 34 | func (r *RichMenuBatchUnlinkAllOperation) MarshalJSON() ([]byte, error) { 35 | 36 | type Alias RichMenuBatchUnlinkAllOperation 37 | return json.Marshal(&struct { 38 | *Alias 39 | 40 | Type string `json:"type"` 41 | }{ 42 | Alias: (*Alias)(r), 43 | 44 | Type: "unlinkAll", 45 | }) 46 | } 47 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_batch_unlink_operation.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // RichMenuBatchUnlinkOperation 27 | // Unlink the rich menu for all users linked to the rich menu specified in the `from` property. 28 | 29 | type RichMenuBatchUnlinkOperation struct { 30 | RichMenuBatchOperation 31 | 32 | /** 33 | * Get From 34 | */ 35 | From string `json:"from"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the RichMenuBatchUnlinkOperation struct. 39 | func (r *RichMenuBatchUnlinkOperation) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias RichMenuBatchUnlinkOperation 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "unlink", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_bulk_link_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RichMenuBulkLinkRequest 23 | // RichMenuBulkLinkRequest 24 | // https://developers.line.biz/en/reference/messaging-api/#link-rich-menu-to-users 25 | type RichMenuBulkLinkRequest struct { 26 | 27 | /** 28 | * ID of a rich menu (Required) 29 | */ 30 | RichMenuId string `json:"richMenuId"` 31 | 32 | /** 33 | * Array of user IDs. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. (Required) 34 | */ 35 | UserIds []string `json:"userIds"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_bulk_unlink_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RichMenuBulkUnlinkRequest 23 | // RichMenuBulkUnlinkRequest 24 | // https://developers.line.biz/en/reference/messaging-api/#unlink-rich-menu-from-users 25 | type RichMenuBulkUnlinkRequest struct { 26 | 27 | /** 28 | * Array of user IDs. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. (Required) 29 | */ 30 | UserIds []string `json:"userIds"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_id_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RichMenuIdResponse 23 | // RichMenuIdResponse 24 | 25 | type RichMenuIdResponse struct { 26 | 27 | /** 28 | * Rich menu ID (Required) 29 | */ 30 | RichMenuId string `json:"richMenuId"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_list_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RichMenuListResponse 23 | // RichMenuListResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-rich-menu-list 25 | type RichMenuListResponse struct { 26 | 27 | /** 28 | * Rich menus (Required) 29 | */ 30 | Richmenus []RichMenuResponse `json:"richmenus"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_rich_menu_size.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RichMenuSize 23 | // Rich menu size 24 | 25 | type RichMenuSize struct { 26 | 27 | /** 28 | * width 29 | * minimum: 1 30 | * maximum: 2147483647 31 | */ 32 | Width int64 `json:"width"` 33 | 34 | /** 35 | * height 36 | * minimum: 1 37 | * maximum: 2147483647 38 | */ 39 | Height int64 `json:"height"` 40 | } 41 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_room_member_count_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RoomMemberCountResponse 23 | // RoomMemberCountResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-members-room-count 25 | type RoomMemberCountResponse struct { 26 | 27 | /** 28 | * The count of members in the multi-person chat. The number returned excludes the LINE Official Account. (Required) 29 | */ 30 | Count int32 `json:"count"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_room_user_profile_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // RoomUserProfileResponse 23 | // RoomUserProfileResponse 24 | // https://developers.line.biz/en/reference/messaging-api/#get-room-member-profile 25 | type RoomUserProfileResponse struct { 26 | 27 | /** 28 | * User's display name (Required) 29 | */ 30 | DisplayName string `json:"displayName"` 31 | 32 | /** 33 | * User ID (Required) 34 | */ 35 | UserId string `json:"userId"` 36 | 37 | /** 38 | * Profile image URL. `https` image URL. Not included in the response if the user doesn't have a profile image. 39 | */ 40 | PictureUrl string `json:"pictureUrl,omitempty"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_sender.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // Sender 23 | // Change icon and display name 24 | 25 | type Sender struct { 26 | 27 | /** 28 | * Display name. Certain words such as `LINE` may not be used. 29 | */ 30 | Name string `json:"name,omitempty"` 31 | 32 | /** 33 | * URL of the image to display as an icon when sending a message 34 | */ 35 | IconUrl string `json:"iconUrl,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_sent_message.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // SentMessage 23 | // SentMessage 24 | 25 | type SentMessage struct { 26 | 27 | /** 28 | * ID of the sent message. (Required) 29 | */ 30 | Id string `json:"id"` 31 | 32 | /** 33 | * 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. 34 | */ 35 | QuoteToken string `json:"quoteToken,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_set_webhook_endpoint_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // SetWebhookEndpointRequest 23 | // SetWebhookEndpointRequest 24 | // https://developers.line.biz/en/reference/messaging-api/#set-webhook-endpoint-url 25 | type SetWebhookEndpointRequest struct { 26 | 27 | /** 28 | * A valid webhook URL. (Required) 29 | */ 30 | Endpoint string `json:"endpoint"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_show_loading_animation_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // ShowLoadingAnimationRequest 23 | // ShowLoadingAnimationRequest 24 | // https://developers.line.biz/en/reference/messaging-api/#display-a-loading-indicator-request-body 25 | type ShowLoadingAnimationRequest struct { 26 | 27 | /** 28 | * User ID of the target user for whom the loading animation is to be displayed. (Required) 29 | */ 30 | ChatId string `json:"chatId"` 31 | 32 | /** 33 | * The number of seconds to display the loading indicator. It must be a multiple of 5. The maximum value is 60 seconds. 34 | * minimum: 5 35 | * maximum: 60 36 | */ 37 | LoadingSeconds int32 `json:"loadingSeconds,omitempty"` 38 | } 39 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_subscription.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // Subscription 23 | // An array of memberships. 24 | 25 | type Subscription struct { 26 | 27 | /** 28 | * Get Membership 29 | */ 30 | Membership *SubscribedMembershipPlan `json:"membership"` 31 | 32 | /** 33 | * Get User 34 | */ 35 | User *SubscribedMembershipUser `json:"user"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_subscription_period_demographic.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // SubscriptionPeriodDemographic type 23 | type SubscriptionPeriodDemographic string 24 | 25 | // SubscriptionPeriodDemographic constants 26 | const ( 27 | SubscriptionPeriodDemographic__7 SubscriptionPeriodDemographic = "day_7" 28 | 29 | SubscriptionPeriodDemographic__30 SubscriptionPeriodDemographic = "day_30" 30 | 31 | SubscriptionPeriodDemographic__90 SubscriptionPeriodDemographic = "day_90" 32 | 33 | SubscriptionPeriodDemographic__180 SubscriptionPeriodDemographic = "day_180" 34 | 35 | SubscriptionPeriodDemographic__365 SubscriptionPeriodDemographic = "day_365" 36 | ) 37 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_template_image_aspect_ratio.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * Aspect ratio of the image. This is only for the `imageAspectRatio` in ButtonsTemplate. Specify one of the following values: `rectangle`: 1.51:1 `square`: 1:1 24 | */ 25 | 26 | // TemplateImageAspectRatio type 27 | type TemplateImageAspectRatio string 28 | 29 | // TemplateImageAspectRatio constants 30 | const ( 31 | TemplateImageAspectRatio_RECTANGLE TemplateImageAspectRatio = "rectangle" 32 | 33 | TemplateImageAspectRatio_SQUARE TemplateImageAspectRatio = "square" 34 | ) 35 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_template_image_size.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | /* 23 | * Size of the image. This is only for the `imageSize` in ButtonsTemplate. Specify one of the following values: `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. 24 | */ 25 | 26 | // TemplateImageSize type 27 | type TemplateImageSize string 28 | 29 | // TemplateImageSize constants 30 | const ( 31 | TemplateImageSize_COVER TemplateImageSize = "cover" 32 | 33 | TemplateImageSize_CONTAIN TemplateImageSize = "contain" 34 | ) 35 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_test_webhook_endpoint_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // TestWebhookEndpointRequest 23 | // TestWebhookEndpointRequest 24 | // https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint 25 | type TestWebhookEndpointRequest struct { 26 | 27 | /** 28 | * A webhook URL to be validated. 29 | */ 30 | Endpoint string `json:"endpoint,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_update_rich_menu_alias_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | // UpdateRichMenuAliasRequest 23 | // UpdateRichMenuAliasRequest 24 | // https://developers.line.biz/en/reference/messaging-api/#update-rich-menu-alias 25 | type UpdateRichMenuAliasRequest struct { 26 | 27 | /** 28 | * The rich menu ID to be associated with the rich menu alias. (Required) 29 | */ 30 | RichMenuId string `json:"richMenuId"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_uri_action.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // UriAction 27 | // UriAction 28 | 29 | type UriAction struct { 30 | Action 31 | 32 | /** 33 | * Label for the action. 34 | */ 35 | Label string `json:"label,omitempty"` 36 | 37 | /** 38 | * Get Uri 39 | */ 40 | Uri string `json:"uri,omitempty"` 41 | 42 | /** 43 | * Get AltUri 44 | */ 45 | AltUri *AltUri `json:"altUri,omitempty"` 46 | } 47 | 48 | // MarshalJSON customizes the JSON serialization of the UriAction struct. 49 | func (r *UriAction) MarshalJSON() ([]byte, error) { 50 | 51 | type Alias UriAction 52 | return json.Marshal(&struct { 53 | *Alias 54 | 55 | Type string `json:"type,omitempty"` 56 | }{ 57 | Alias: (*Alias)(r), 58 | 59 | Type: "uri", 60 | }) 61 | } 62 | -------------------------------------------------------------------------------- /linebot/messaging_api/model_user_mention_target.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package messaging_api 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // UserMentionTarget 27 | // UserMentionTarget 28 | // https://developers.line.biz/en/reference/messaging-api/#text-message-v2-mentionee-user 29 | type UserMentionTarget struct { 30 | MentionTarget 31 | 32 | /** 33 | * Get UserId 34 | */ 35 | UserId string `json:"userId"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the UserMentionTarget struct. 39 | func (r *UserMentionTarget) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias UserMentionTarget 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "user", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/messaging_api/tests/api/api_messaging_api_blob_test_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | -------------------------------------------------------------------------------- /linebot/messaging_api/tests/api/api_messaging_api_test_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | -------------------------------------------------------------------------------- /linebot/messaging_api/tests/handwritten/api_WithHttpInfo_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "net/http/httptest" 7 | "testing" 8 | 9 | "github.com/line/line-bot-sdk-go/v8/linebot/messaging_api" 10 | ) 11 | 12 | func TestTextMessageWithHttpInfo(t *testing.T) { 13 | server := httptest.NewServer( 14 | http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 15 | w.Header().Add("X-Line-Request-Id", "1234567890") 16 | w.Write([]byte(`{}`)) 17 | }), 18 | ) 19 | client, err := messaging_api.NewMessagingApiAPI( 20 | "channelToken", 21 | messaging_api.WithEndpoint(server.URL), 22 | ) 23 | if err != nil { 24 | t.Fatalf("Failed to create client: %v", err) 25 | } 26 | resp, _, err := client.PushMessageWithHttpInfo(&messaging_api.PushMessageRequest{ 27 | Messages: []messaging_api.MessageInterface{ 28 | &messaging_api.TextMessage{ 29 | Text: "Hello, world", 30 | }, 31 | }, 32 | }, "") 33 | if err != nil { 34 | t.Fatalf("Failed to create audience: %v", err) 35 | } 36 | log.Printf("Got response: %v", resp) 37 | if resp.StatusCode != http.StatusOK { 38 | t.Errorf("status: %d", resp.StatusCode) 39 | } 40 | if resp.Header.Get("X-Line-Request-Id") != "1234567890" { 41 | t.Errorf("X-Line-Request-Id: %s", resp.Header.Get("X-Line-Request-Id")) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /linebot/messaging_api/tests/handwritten/model_datetime_picker_action_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "encoding/json" 5 | "strings" 6 | "testing" 7 | 8 | "github.com/line/line-bot-sdk-go/v8/linebot/messaging_api" 9 | ) 10 | 11 | func TestDatetimePickerAction(t *testing.T) { 12 | msg := &messaging_api.DatetimePickerAction{} 13 | encodedMsg, err := json.Marshal(msg) 14 | if err != nil { 15 | t.Fatalf("Failed to encode message: %v", err) 16 | } 17 | encodedMsgStr := string(encodedMsg) 18 | if strings.Contains(encodedMsgStr, "mode") { 19 | t.Errorf("Encoded message contains unexpected field 'mode': %s\nenum value must not included if the value is empty.", encodedMsgStr) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /linebot/messaging_api/tests/handwritten/model_limit_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "encoding/json" 5 | "testing" 6 | 7 | "github.com/line/line-bot-sdk-go/v8/linebot/messaging_api" 8 | ) 9 | 10 | func TestLimitSerialization(t *testing.T) { 11 | tests := []struct { 12 | name string 13 | limit messaging_api.Limit 14 | expected string 15 | }{ 16 | { 17 | name: "Max is set", 18 | limit: messaging_api.Limit{Max: 10, UpToRemainingQuota: true}, 19 | expected: `{"max":10,"upToRemainingQuota":true}`, 20 | }, 21 | { 22 | name: "Max is zero (omitempty)", 23 | limit: messaging_api.Limit{Max: 0, UpToRemainingQuota: true}, 24 | expected: `{"upToRemainingQuota":true}`, 25 | }, 26 | { 27 | name: "Max is zero and UpToRemainingQuota is false", 28 | limit: messaging_api.Limit{Max: 0, UpToRemainingQuota: false}, 29 | expected: `{"upToRemainingQuota":false}`, 30 | }, 31 | } 32 | 33 | for _, tt := range tests { 34 | t.Run(tt.name, func(t *testing.T) { 35 | data, err := json.Marshal(tt.limit) 36 | if err != nil { 37 | t.Fatalf("Failed to marshal Limit: %v", err) 38 | } 39 | if string(data) != tt.expected { 40 | t.Errorf("Expected JSON: %s, got: %s", tt.expected, string(data)) 41 | } 42 | }) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /linebot/messaging_api/tests/handwritten/model_sticker_message_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "encoding/json" 5 | "strings" 6 | "testing" 7 | 8 | "github.com/line/line-bot-sdk-go/v8/linebot/messaging_api" 9 | ) 10 | 11 | func TestStickerMessage(t *testing.T) { 12 | req := &messaging_api.ReplyMessageRequest{ 13 | ReplyToken: "JKLJDSFhkljdsjfkla", 14 | Messages: []messaging_api.MessageInterface{ 15 | &messaging_api.StickerMessage{ 16 | PackageId: "1", 17 | StickerId: "2", 18 | }, 19 | }, 20 | } 21 | encodedMsg, err := json.Marshal(req) 22 | if err != nil { 23 | t.Fatalf("Failed to encode message: %v", err) 24 | } 25 | encodedMsgStr := string(encodedMsg) 26 | if !strings.Contains(encodedMsgStr, `"type":"sticker"`) { 27 | t.Errorf("Encoded message doens't contains expected default value: %s", encodedMsgStr) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /linebot/module/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/module/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | api_line_module.go 2 | model_acquire_chat_control_request.go 3 | model_detach_module_request.go 4 | model_get_modules_response.go 5 | model_module_bot.go 6 | -------------------------------------------------------------------------------- /linebot/module/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/module/model_detach_module_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package module 21 | 22 | // DetachModuleRequest 23 | // Unlink (detach) the module channel by the operation of the module channel administrator 24 | // https://developers.line.biz/en/reference/partner-docs/#unlink-detach-module-channel-by-operation-mc-admin 25 | type DetachModuleRequest struct { 26 | 27 | /** 28 | * User ID of the LINE Official Account bot attached to the module channel. 29 | */ 30 | BotId string `json:"botId,omitempty"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/module/model_get_modules_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package module 21 | 22 | // GetModulesResponse 23 | // List of bots to which the module is attached 24 | // https://developers.line.biz/en/reference/partner-docs/#get-multiple-bot-info-api 25 | type GetModulesResponse struct { 26 | 27 | /** 28 | * Array of Bot list Item objects representing basic information about the bot. (Required) 29 | */ 30 | Bots []ModuleBot `json:"bots"` 31 | 32 | /** 33 | * Continuation token. Used to get the next array of basic bot information. This property is only returned if there are more unreturned results. 34 | */ 35 | Next string `json:"next,omitempty"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/module_attach/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/module_attach/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | api_line_module_attach.go 2 | model_attach_module_response.go 3 | -------------------------------------------------------------------------------- /linebot/module_attach/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/module_attach/model_attach_module_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package module_attach 21 | 22 | // AttachModuleResponse 23 | // Attach by operation of the module channel provider 24 | 25 | type AttachModuleResponse struct { 26 | 27 | /** 28 | * User ID of the bot on the LINE Official Account. (Required) 29 | */ 30 | BotId string `json:"bot_id"` 31 | 32 | /** 33 | * Permissions (scope) granted by the LINE Official Account admin. (Required) 34 | */ 35 | Scopes []string `json:"scopes"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/module_attach/tests/api/api_line_module_attach_test_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "net/http/httptest" 7 | "testing" 8 | 9 | "github.com/line/line-bot-sdk-go/v8/linebot/module_attach" 10 | ) 11 | 12 | func TestAttachModule(t *testing.T) { 13 | server := httptest.NewServer( 14 | http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 15 | 16 | if r.Header.Get("Content-Type") != "application/x-www-form-urlencoded" { 17 | t.Fatalf("Invalid content-type: %s", r.Header.Get("Content-Type")) 18 | return 19 | } 20 | 21 | w.WriteHeader(http.StatusOK) 22 | w.Write([]byte("{}")) 23 | }), 24 | ) 25 | 26 | client, err := module_attach.NewLineModuleAttachAPI( 27 | "MY_CHANNEL_TOKEN", 28 | module_attach.WithEndpoint(server.URL), 29 | ) 30 | if err != nil { 31 | t.Fatalf("Failed to create client: %v", err) 32 | } 33 | resp, err := client.AttachModule( 34 | "hello", 35 | 36 | "hello", 37 | 38 | "hello", 39 | 40 | "hello", 41 | 42 | "hello", 43 | 44 | "hello", 45 | 46 | "hello", 47 | 48 | "hello", 49 | 50 | "hello", 51 | 52 | "hello", 53 | ) 54 | if err != nil { 55 | t.Fatalf("Failed to call API: %v", err) 56 | } 57 | log.Printf("Got response: %v", resp) 58 | } 59 | -------------------------------------------------------------------------------- /linebot/shop/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /linebot/shop/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | api_shop.go 2 | model_error_response.go 3 | model_mission_sticker_request.go 4 | -------------------------------------------------------------------------------- /linebot/shop/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/shop/model_error_response.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Mission Stickers API 3 | * This document describes LINE Mission Stickers API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package shop 21 | 22 | // ErrorResponse 23 | // ErrorResponse 24 | // https://developers.line.biz/en/reference/partner-docs/#send-mission-stickers-v3 25 | type ErrorResponse struct { 26 | 27 | /** 28 | * Message containing information about the error. (Required) 29 | */ 30 | Message string `json:"message"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/shop/model_mission_sticker_request.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Mission Stickers API 3 | * This document describes LINE Mission Stickers API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package shop 21 | 22 | // MissionStickerRequest 23 | // Send mission stickers (v3) 24 | // https://developers.line.biz/en/reference/partner-docs/#send-mission-stickers-v3 25 | type MissionStickerRequest struct { 26 | 27 | /** 28 | * Destination user ID (Required) 29 | */ 30 | To string `json:"to"` 31 | 32 | /** 33 | * Package ID for a set of stickers (Required) 34 | */ 35 | ProductId string `json:"productId"` 36 | 37 | /** 38 | * `STICKER` (Required) 39 | */ 40 | ProductType string `json:"productType"` 41 | 42 | /** 43 | * `false` (Required) 44 | */ 45 | SendPresentMessage bool `json:"sendPresentMessage"` 46 | } 47 | -------------------------------------------------------------------------------- /linebot/shop/tests/api/api_shop_test_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "net/http/httptest" 7 | "testing" 8 | 9 | "github.com/line/line-bot-sdk-go/v8/linebot/shop" 10 | ) 11 | 12 | func TestMissionStickerV3(t *testing.T) { 13 | server := httptest.NewServer( 14 | http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 15 | 16 | if r.Header.Get("Content-Type") != "application/json; charset=UTF-8" { 17 | t.Fatalf("Invalid content-type: %s", r.Header.Get("Content-Type")) 18 | return 19 | } 20 | 21 | w.WriteHeader(http.StatusOK) 22 | w.Write([]byte("{}")) 23 | }), 24 | ) 25 | 26 | client, err := shop.NewShopAPI( 27 | "MY_CHANNEL_TOKEN", 28 | shop.WithEndpoint(server.URL), 29 | ) 30 | if err != nil { 31 | t.Fatalf("Failed to create client: %v", err) 32 | } 33 | resp, err := client.MissionStickerV3( 34 | nil, 35 | ) 36 | if err != nil { 37 | t.Fatalf("Failed to call API: %v", err) 38 | } 39 | log.Printf("Got response: %v", resp) 40 | } 41 | -------------------------------------------------------------------------------- /linebot/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 LINE Corporation 2 | // 3 | // LINE Corporation licenses this file to you under the Apache License, 4 | // version 2.0 (the "License"); you may not use this file except in compliance 5 | // with the License. You may obtain a copy of the License at: 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package linebot 16 | 17 | import ( 18 | "runtime/debug" 19 | "strings" 20 | "sync" 21 | ) 22 | 23 | var ( 24 | sdkVersion = "8.unknown" 25 | sdkVersionOnce sync.Once 26 | ) 27 | 28 | func GetVersion() string { 29 | // getting the version of line-bot-sdk-go should be done only once. Computing it repeatedly is meaningless. 30 | sdkVersionOnce.Do(func() { 31 | info, ok := debug.ReadBuildInfo() 32 | if !ok { 33 | return 34 | } 35 | for _, dep := range info.Deps { 36 | if strings.Contains(dep.Path, "github.com/line/line-bot-sdk-go") { 37 | sdkVersion = strings.TrimPrefix(dep.Version, "v") 38 | break 39 | } 40 | } 41 | }) 42 | return sdkVersion 43 | } 44 | -------------------------------------------------------------------------------- /linebot/webhook/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | /api_dummy.go 25 | /tests/api/api_dummy_test_test.go 26 | /parse.go 27 | -------------------------------------------------------------------------------- /linebot/webhook/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.0.0 -------------------------------------------------------------------------------- /linebot/webhook/model_action_result.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // ActionResult 23 | // ActionResult 24 | 25 | type ActionResult struct { 26 | 27 | /** 28 | * Get Type 29 | */ 30 | Type ActionResultTYPE `json:"type"` 31 | 32 | /** 33 | * Base64-encoded binary data 34 | */ 35 | Data string `json:"data,omitempty"` 36 | } 37 | 38 | // ActionResultTYPE type 39 | 40 | type ActionResultTYPE string 41 | 42 | // ActionResultTYPE constants 43 | const ( 44 | ActionResultTYPE_VOID ActionResultTYPE = "void" 45 | 46 | ActionResultTYPE_BINARY ActionResultTYPE = "binary" 47 | ) 48 | -------------------------------------------------------------------------------- /linebot/webhook/model_chat_control.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // ChatControl 23 | // ChatControl 24 | 25 | type ChatControl struct { 26 | 27 | /** 28 | * Get ExpireAt 29 | */ 30 | ExpireAt int64 `json:"expireAt"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/model_delivery_context.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // DeliveryContext 23 | // webhook's delivery context information 24 | 25 | type DeliveryContext struct { 26 | 27 | /** 28 | * Whether the webhook event is a redelivered one or not. (Required) 29 | */ 30 | IsRedelivery bool `json:"isRedelivery"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/model_emoji.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // Emoji 23 | // Emoji 24 | 25 | type Emoji struct { 26 | 27 | /** 28 | * Index position for a character in text, with the first character being at position 0. (Required) 29 | */ 30 | Index int32 `json:"index"` 31 | 32 | /** 33 | * The length of the LINE emoji string. For LINE emoji (hello), 7 is the length. (Required) 34 | */ 35 | Length int32 `json:"length"` 36 | 37 | /** 38 | * Product ID for a LINE emoji set. (Required) 39 | */ 40 | ProductId string `json:"productId"` 41 | 42 | /** 43 | * ID for a LINE emoji inside a set. (Required) 44 | */ 45 | EmojiId string `json:"emojiId"` 46 | } 47 | -------------------------------------------------------------------------------- /linebot/webhook/model_event_mode.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | /* 23 | * Channel state. 24 | */ 25 | 26 | // EventMode type 27 | type EventMode string 28 | 29 | // EventMode constants 30 | const ( 31 | EventMode_ACTIVE EventMode = "active" 32 | 33 | EventMode_STANDBY EventMode = "standby" 34 | ) 35 | -------------------------------------------------------------------------------- /linebot/webhook/model_follow_detail.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // FollowDetail 23 | // FollowDetail 24 | 25 | type FollowDetail struct { 26 | 27 | /** 28 | * Whether a user has added your LINE Official Account as a friend or unblocked. (Required) 29 | */ 30 | IsUnblocked bool `json:"isUnblocked"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/model_image_set.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // ImageSet 23 | // ImageSet 24 | 25 | type ImageSet struct { 26 | 27 | /** 28 | * Image set ID. Only included when multiple images are sent simultaneously. (Required) 29 | */ 30 | Id string `json:"id"` 31 | 32 | /** 33 | * An index starting from 1, indicating the image number in a set of images sent simultaneously. Only included when multiple images are sent simultaneously. However, it won't be included if the sender is using LINE 11.15 or earlier for Android. 34 | */ 35 | Index int32 `json:"index"` 36 | 37 | /** 38 | * The total number of images sent simultaneously. 39 | */ 40 | Total int32 `json:"total"` 41 | } 42 | -------------------------------------------------------------------------------- /linebot/webhook/model_joined_members.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // JoinedMembers 23 | // JoinedMembers 24 | 25 | type JoinedMembers struct { 26 | 27 | /** 28 | * Users who joined. Array of source user objects. (Required) 29 | */ 30 | Members []UserSource `json:"members"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/model_joined_membership_content.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // JoinedMembershipContent 27 | // JoinedMembershipContent 28 | 29 | type JoinedMembershipContent struct { 30 | MembershipContent 31 | 32 | /** 33 | * The ID of the membership that the user joined. This is defined for each membership. (Required) 34 | */ 35 | MembershipId int32 `json:"membershipId"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the JoinedMembershipContent struct. 39 | func (r *JoinedMembershipContent) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias JoinedMembershipContent 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "joined", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/webhook/model_left_members.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // LeftMembers 23 | // LeftMembers 24 | 25 | type LeftMembers struct { 26 | 27 | /** 28 | * Users who left. Array of source user objects. (Required) 29 | */ 30 | Members []UserSource `json:"members"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/model_left_membership_content.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // LeftMembershipContent 27 | // LeftMembershipContent 28 | 29 | type LeftMembershipContent struct { 30 | MembershipContent 31 | 32 | /** 33 | * The ID of the membership that the user left. This is defined for each membership. (Required) 34 | */ 35 | MembershipId int32 `json:"membershipId"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the LeftMembershipContent struct. 39 | func (r *LeftMembershipContent) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias LeftMembershipContent 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "left", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/webhook/model_link_content.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // LinkContent 23 | // Content of the account link event. 24 | 25 | type LinkContent struct { 26 | 27 | /** 28 | * One of the following values to indicate whether linking the account was successful or not (Required) 29 | */ 30 | Result LinkContentRESULT `json:"result"` 31 | 32 | /** 33 | * Specified nonce (number used once) when verifying the user ID. (Required) 34 | */ 35 | Nonce string `json:"nonce"` 36 | } 37 | 38 | // LinkContentRESULT type 39 | /* One of the following values to indicate whether linking the account was successful or not */ 40 | type LinkContentRESULT string 41 | 42 | // LinkContentRESULT constants 43 | const ( 44 | LinkContentRESULT_OK LinkContentRESULT = "ok" 45 | 46 | LinkContentRESULT_FAILED LinkContentRESULT = "failed" 47 | ) 48 | -------------------------------------------------------------------------------- /linebot/webhook/model_link_things_content.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // LinkThingsContent 27 | // LinkThingsContent 28 | 29 | type LinkThingsContent struct { 30 | ThingsContent 31 | 32 | /** 33 | * Device ID of the device that has been linked with LINE. (Required) 34 | */ 35 | DeviceId string `json:"deviceId"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the LinkThingsContent struct. 39 | func (r *LinkThingsContent) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias LinkThingsContent 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "link", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/webhook/model_pnp_delivery.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // PnpDelivery 23 | // A delivery object containing a hashed phone number string or a string specified by `X-Line-Delivery-Tag` header 24 | 25 | type PnpDelivery struct { 26 | 27 | /** 28 | * A hashed phone number string or a string specified by `X-Line-Delivery-Tag` header (Required) 29 | */ 30 | Data string `json:"data"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/model_postback_content.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // PostbackContent 23 | // PostbackContent 24 | 25 | type PostbackContent struct { 26 | 27 | /** 28 | * Postback data (Required) 29 | */ 30 | Data string `json:"data"` 31 | 32 | /** 33 | * Get Params 34 | */ 35 | Params map[string]string `json:"params"` 36 | } 37 | -------------------------------------------------------------------------------- /linebot/webhook/model_renewed_membership_content.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // RenewedMembershipContent 27 | // RenewedMembershipContent 28 | 29 | type RenewedMembershipContent struct { 30 | MembershipContent 31 | 32 | /** 33 | * The ID of the membership that the user renewed. This is defined for each membership. (Required) 34 | */ 35 | MembershipId int32 `json:"membershipId"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the RenewedMembershipContent struct. 39 | func (r *RenewedMembershipContent) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias RenewedMembershipContent 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "renewed", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/webhook/model_unlink_things_content.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // UnlinkThingsContent 27 | // UnlinkThingsContent 28 | 29 | type UnlinkThingsContent struct { 30 | ThingsContent 31 | 32 | /** 33 | * Device ID of the device that has been linked with LINE. (Required) 34 | */ 35 | DeviceId string `json:"deviceId"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the UnlinkThingsContent struct. 39 | func (r *UnlinkThingsContent) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias UnlinkThingsContent 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "unlink", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/webhook/model_unsend_detail.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // UnsendDetail 23 | // UnsendDetail 24 | 25 | type UnsendDetail struct { 26 | 27 | /** 28 | * The message ID of the unsent message (Required) 29 | */ 30 | MessageId string `json:"messageId"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/model_user_source.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | import ( 23 | "encoding/json" 24 | ) 25 | 26 | // UserSource 27 | // UserSource 28 | 29 | type UserSource struct { 30 | Source 31 | 32 | /** 33 | * ID of the source user 34 | */ 35 | UserId string `json:"userId,omitempty"` 36 | } 37 | 38 | // MarshalJSON customizes the JSON serialization of the UserSource struct. 39 | func (r *UserSource) MarshalJSON() ([]byte, error) { 40 | 41 | type Alias UserSource 42 | return json.Marshal(&struct { 43 | *Alias 44 | 45 | Type string `json:"type"` 46 | }{ 47 | Alias: (*Alias)(r), 48 | 49 | Type: "user", 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /linebot/webhook/model_video_play_complete.go: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 15 | * https://openapi-generator.tech 16 | * Do not edit the class manually. 17 | */ 18 | 19 | //go:generate python3 ../../generate-code.py 20 | package webhook 21 | 22 | // VideoPlayComplete 23 | // VideoPlayComplete 24 | 25 | type VideoPlayComplete struct { 26 | 27 | /** 28 | * ID used to identify a video. Returns the same value as the trackingId assigned to the video message. (Required) 29 | */ 30 | TrackingId string `json:"trackingId"` 31 | } 32 | -------------------------------------------------------------------------------- /linebot/webhook/parse.go: -------------------------------------------------------------------------------- 1 | package webhook 2 | 3 | import ( 4 | "crypto/hmac" 5 | "crypto/sha256" 6 | "encoding/base64" 7 | "encoding/json" 8 | "errors" 9 | "fmt" 10 | "io" 11 | "net/http" 12 | ) 13 | 14 | var ( 15 | ErrInvalidSignature = errors.New("invalid signature") 16 | ) 17 | 18 | // ParseRequest func 19 | func ParseRequest(channelSecret string, r *http.Request) (*CallbackRequest, error) { 20 | defer func() { _ = r.Body.Close() }() 21 | body, err := io.ReadAll(r.Body) 22 | if err != nil { 23 | return nil, err 24 | } 25 | if !ValidateSignature(channelSecret, r.Header.Get("x-line-signature"), body) { 26 | return nil, ErrInvalidSignature 27 | } 28 | 29 | var cb CallbackRequest 30 | if err = json.Unmarshal(body, &cb); err != nil { 31 | return nil, fmt.Errorf("failed to unmarshal request body: %w, %s", err, body) 32 | } 33 | return &cb, nil 34 | } 35 | 36 | func ValidateSignature(channelSecret, signature string, body []byte) bool { 37 | decoded, err := base64.StdEncoding.DecodeString(signature) 38 | if err != nil { 39 | return false 40 | } 41 | hash := hmac.New(sha256.New, []byte(channelSecret)) 42 | 43 | _, err = hash.Write(body) 44 | if err != nil { 45 | return false 46 | } 47 | 48 | return hmac.Equal(decoded, hash.Sum(nil)) 49 | } 50 | -------------------------------------------------------------------------------- /linebot/webhook/tests/handwritten/model_source_test.go: -------------------------------------------------------------------------------- 1 | package tests 2 | 3 | import ( 4 | "encoding/json" 5 | "testing" 6 | 7 | "github.com/line/line-bot-sdk-go/v8/linebot/webhook" 8 | ) 9 | 10 | func TestStickerMessage(t *testing.T) { 11 | var cb webhook.CallbackRequest 12 | if err := json.Unmarshal([]byte(`{ 13 | "destination": "Uaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 14 | "events": [ 15 | { 16 | "type": "UNKNOWN", 17 | "great": "new-field" 18 | } 19 | ] 20 | }`), &cb); err != nil { 21 | t.Fatalf("Failed to unmarshal callback request: %v", err) 22 | } 23 | 24 | _, ok := cb.Events[0].(webhook.UnknownEvent) 25 | if !ok { 26 | t.Fatalf("Failed to cast to UnknownEvent: %v", cb.Events[0]) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /postprocess-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | goimports -w "$*" 4 | gofmt -l -s -w "$*" 5 | -------------------------------------------------------------------------------- /renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | $schema: 'https://docs.renovatebot.com/renovate-schema.json', 3 | extends: [ 4 | 'config:recommended', 5 | 'helpers:pinGitHubActionDigestsToSemver', 6 | ], 7 | timezone: 'Asia/Tokyo', 8 | automerge: true, 9 | platformAutomerge: true, 10 | 'git-submodules': { 11 | enabled: true, 12 | }, 13 | labels: [ 14 | 'dependency upgrade', 15 | ], 16 | packageRules: [ 17 | { 18 | labels: [ 19 | 'dependency upgrade', 20 | 'line-openapi-update', 21 | ], 22 | // In many cases, we would like to update line-openapi by dispatching the GitHub workflow during working 23 | // hours, as there are code changes. 24 | // If that is forgotten, there's a possibility that line-openapi updates or code changes won't happen at 25 | // all, so we allow it to run at night just in case. 26 | schedule: [ 27 | 'after 11pm', 28 | 'before 4am', 29 | ], 30 | matchPackageNames: [ 31 | '/line-openapi/', 32 | ], 33 | }, 34 | ], 35 | } 36 | -------------------------------------------------------------------------------- /script/codecov.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # https://github.com/codecov/example-go#caveat-multiple-files 3 | 4 | cd `dirname $0`/.. || exit 1 5 | echo "" > coverage.txt || exit 1 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -v -race -coverprofile=profile.out -covermode=atomic $d || exit 1 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt || exit 1 10 | rm profile.out || exit 1 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /script/fmt.sh: -------------------------------------------------------------------------------- 1 | # Copyright 2018 LINE Corporation 2 | # 3 | # LINE Corporation licenses this file to you under the Apache License, 4 | # version 2.0 (the "License"); you may not use this file except in compliance 5 | # with the License. You may obtain a copy of the License at: 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | # License for the specific language governing permissions and limitations 13 | # under the License. 14 | # 15 | # Fix all go codes with gofmt 16 | # 17 | # Usage: 18 | # bash script/fmt.sh 19 | 20 | cd `dirname $0`/.. 21 | find . -type d -name .git -prune -o \ 22 | -type d -name vendor -prune -o \ 23 | -type f -name "*.go" -print \ 24 | | xargs gofmt -l -s -w 25 | -------------------------------------------------------------------------------- /testdata/img/richmenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/testdata/img/richmenu.png -------------------------------------------------------------------------------- /tools/openapi-generator-cli.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-go/fea1aaaf6f43e557c1616487f1680031764aa733/tools/openapi-generator-cli.jar -------------------------------------------------------------------------------- /util/find_dollar_sign.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "unicode/utf16" 4 | 5 | /* 6 | When you want to send a text message with emoji, you need to add 7 | $ in the text, and identify the index of the $ in the text. 8 | 9 | FindDollarSignIndexInUTF16Text helps you to find the index of the $ in the text. 10 | */ 11 | 12 | type CharInUTF16 uint16 13 | 14 | const dollarSign CharInUTF16 = 36 15 | 16 | func FindDollarSignIndexInUTF16Text(text string) (indexes []int32) { 17 | encoded := utf16.Encode([]rune(text)) 18 | for i, unit := range encoded { 19 | 20 | if unit == uint16(dollarSign) { 21 | indexes = append(indexes, int32(i)) 22 | } 23 | } 24 | return indexes 25 | } 26 | -------------------------------------------------------------------------------- /util/find_dollar_sign_test.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestFindDollarSignIndexInUni16Text(t *testing.T) { 8 | text := "Hello, $ hello こんにちは $, สวัสดีครับ $" 9 | indexes := FindDollarSignIndexInUTF16Text(text) 10 | if len(indexes) != 3 { 11 | t.Errorf("Expected 3, but got %d", len(indexes)) 12 | } 13 | } 14 | --------------------------------------------------------------------------------