From 14523ad71c9d5af3a92cf5bf9d40b39eaa12847c Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 12 Aug 2025 23:33:28 +0000 Subject: [PATCH] Codes are generated by openapi --- .../bot/v2/webhook/.openapi-generator/FILES | 7 -- lib/line/bot/v2/webhook/core.rb | 7 -- .../bot/v2/webhook/model/action_result.rb | 72 ----------- lib/line/bot/v2/webhook/model/event.rb | 1 - .../v2/webhook/model/link_things_content.rb | 72 ----------- .../bot/v2/webhook/model/scenario_result.rb | 115 ------------------ .../model/scenario_result_things_content.rb | 78 ------------ .../bot/v2/webhook/model/things_content.rb | 78 ------------ lib/line/bot/v2/webhook/model/things_event.rb | 109 ----------------- .../v2/webhook/model/unlink_things_content.rb | 72 ----------- line-openapi | 2 +- .../bot/v2/webhook/.openapi-generator/FILES | 7 -- .../bot/v2/webhook/model/action_result.rbs | 42 ------- .../v2/webhook/model/link_things_content.rbs | 40 ------ .../bot/v2/webhook/model/scenario_result.rbs | 61 ---------- .../model/scenario_result_things_content.rbs | 43 ------- .../bot/v2/webhook/model/things_content.rbs | 43 ------- .../bot/v2/webhook/model/things_event.rbs | 59 --------- .../webhook/model/unlink_things_content.rbs | 40 ------ 19 files changed, 1 insertion(+), 947 deletions(-) delete mode 100644 lib/line/bot/v2/webhook/model/action_result.rb delete mode 100644 lib/line/bot/v2/webhook/model/link_things_content.rb delete mode 100644 lib/line/bot/v2/webhook/model/scenario_result.rb delete mode 100644 lib/line/bot/v2/webhook/model/scenario_result_things_content.rb delete mode 100644 lib/line/bot/v2/webhook/model/things_content.rb delete mode 100644 lib/line/bot/v2/webhook/model/things_event.rb delete mode 100644 lib/line/bot/v2/webhook/model/unlink_things_content.rb delete mode 100644 sig/line/bot/v2/webhook/model/action_result.rbs delete mode 100644 sig/line/bot/v2/webhook/model/link_things_content.rbs delete mode 100644 sig/line/bot/v2/webhook/model/scenario_result.rbs delete mode 100644 sig/line/bot/v2/webhook/model/scenario_result_things_content.rbs delete mode 100644 sig/line/bot/v2/webhook/model/things_content.rbs delete mode 100644 sig/line/bot/v2/webhook/model/things_event.rbs delete mode 100644 sig/line/bot/v2/webhook/model/unlink_things_content.rbs diff --git a/lib/line/bot/v2/webhook/.openapi-generator/FILES b/lib/line/bot/v2/webhook/.openapi-generator/FILES index 51edc2d4..841acee2 100644 --- a/lib/line/bot/v2/webhook/.openapi-generator/FILES +++ b/lib/line/bot/v2/webhook/.openapi-generator/FILES @@ -2,7 +2,6 @@ api/dummy_client.rb core.rb model/account_link_event.rb -model/action_result.rb model/activated_event.rb model/all_mentionee.rb model/attached_module_content.rb @@ -33,7 +32,6 @@ model/leave_event.rb model/left_members.rb model/left_membership_content.rb model/link_content.rb -model/link_things_content.rb model/location_message_content.rb model/member_joined_event.rb model/member_left_event.rb @@ -51,15 +49,10 @@ model/postback_content.rb model/postback_event.rb model/renewed_membership_content.rb model/room_source.rb -model/scenario_result.rb -model/scenario_result_things_content.rb model/source.rb model/sticker_message_content.rb model/text_message_content.rb -model/things_content.rb -model/things_event.rb model/unfollow_event.rb -model/unlink_things_content.rb model/unsend_detail.rb model/unsend_event.rb model/user_mentionee.rb diff --git a/lib/line/bot/v2/webhook/core.rb b/lib/line/bot/v2/webhook/core.rb index 59673c57..3d91678a 100644 --- a/lib/line/bot/v2/webhook/core.rb +++ b/lib/line/bot/v2/webhook/core.rb @@ -10,7 +10,6 @@ # Models require_relative './model/account_link_event' -require_relative './model/action_result' require_relative './model/activated_event' require_relative './model/all_mentionee' require_relative './model/attached_module_content' @@ -41,7 +40,6 @@ require_relative './model/left_members' require_relative './model/left_membership_content' require_relative './model/link_content' -require_relative './model/link_things_content' require_relative './model/location_message_content' require_relative './model/member_joined_event' require_relative './model/member_left_event' @@ -59,15 +57,10 @@ require_relative './model/postback_event' require_relative './model/renewed_membership_content' require_relative './model/room_source' -require_relative './model/scenario_result' -require_relative './model/scenario_result_things_content' require_relative './model/source' require_relative './model/sticker_message_content' require_relative './model/text_message_content' -require_relative './model/things_content' -require_relative './model/things_event' require_relative './model/unfollow_event' -require_relative './model/unlink_things_content' require_relative './model/unsend_detail' require_relative './model/unsend_event' require_relative './model/user_mentionee' diff --git a/lib/line/bot/v2/webhook/model/action_result.rb b/lib/line/bot/v2/webhook/model/action_result.rb deleted file mode 100644 index e629da86..00000000 --- a/lib/line/bot/v2/webhook/model/action_result.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - class ActionResult - # @!attribute [rw] type - # @return [String] ('void'|'binary') - attr_accessor :type - # @!attribute [rw] data - # @return [String,nil] Base64-encoded binary data - attr_accessor :data - - # @param type [String] ('void'|'binary') - # @param data [String,nil] Base64-encoded binary data - def initialize( - type:, - data: nil, - **dynamic_attributes - ) - - @type = type - @data = data - - dynamic_attributes.each do |key, value| - self.class.attr_accessor key - - if value.is_a?(Hash) - struct_klass = Struct.new(*value.keys.map(&:to_sym)) - struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } - instance_variable_set("@#{key}", struct_klass.new(*struct_values)) - else - instance_variable_set("@#{key}", value) - end - end - end - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ActionResult] Instance of the class - def self.create(args) # steep:ignore - symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) - return new(**symbolized_args) # steep:ignore - end - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==(other) - return false unless self.class == other.class - - instance_variables.all? do |var| - instance_variable_get(var) == other.instance_variable_get(var) - end - end - - # @return [Integer] Hash code of the object - def hash - [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash - end - end - end - end - end -end diff --git a/lib/line/bot/v2/webhook/model/event.rb b/lib/line/bot/v2/webhook/model/event.rb index 6d0b8d5c..9d7b595a 100644 --- a/lib/line/bot/v2/webhook/model/event.rb +++ b/lib/line/bot/v2/webhook/model/event.rb @@ -113,7 +113,6 @@ def self.detect_class(type:) module: Line::Bot::V2::Webhook::ModuleEvent, delivery: Line::Bot::V2::Webhook::PnpDeliveryCompletionEvent, postback: Line::Bot::V2::Webhook::PostbackEvent, - things: Line::Bot::V2::Webhook::ThingsEvent, unfollow: Line::Bot::V2::Webhook::UnfollowEvent, unsend: Line::Bot::V2::Webhook::UnsendEvent, videoPlayComplete: Line::Bot::V2::Webhook::VideoPlayCompleteEvent, diff --git a/lib/line/bot/v2/webhook/model/link_things_content.rb b/lib/line/bot/v2/webhook/model/link_things_content.rb deleted file mode 100644 index 305cb0f7..00000000 --- a/lib/line/bot/v2/webhook/model/link_things_content.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -require_relative './things_content' - -module Line - module Bot - module V2 - module Webhook - class LinkThingsContent < ThingsContent - # @!attribute [r] type - # @return [String] Type - attr_reader :type - # @!attribute [rw] device_id - # @return [String] Device ID of the device that has been linked with LINE. - attr_accessor :device_id - - # @param device_id [String] Device ID of the device that has been linked with LINE. - def initialize( - device_id:, - **dynamic_attributes - ) - @type = "link" - - @device_id = device_id - - dynamic_attributes.each do |key, value| - self.class.attr_accessor key - - if value.is_a?(Hash) - struct_klass = Struct.new(*value.keys.map(&:to_sym)) - struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } - instance_variable_set("@#{key}", struct_klass.new(*struct_values)) - else - instance_variable_set("@#{key}", value) - end - end - end - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::LinkThingsContent] Instance of the class - def self.create(args) # steep:ignore - symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) - return new(**symbolized_args) # steep:ignore - end - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==(other) - return false unless self.class == other.class - - instance_variables.all? do |var| - instance_variable_get(var) == other.instance_variable_get(var) - end - end - - # @return [Integer] Hash code of the object - def hash - [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash - end - end - end - end - end -end diff --git a/lib/line/bot/v2/webhook/model/scenario_result.rb b/lib/line/bot/v2/webhook/model/scenario_result.rb deleted file mode 100644 index d58d5204..00000000 --- a/lib/line/bot/v2/webhook/model/scenario_result.rb +++ /dev/null @@ -1,115 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - # @see https://developers.line.biz/en/reference/messaging-api/#scenario-result-event - class ScenarioResult - # @!attribute [rw] scenario_id - # @return [String,nil] Scenario ID executed - attr_accessor :scenario_id - # @!attribute [rw] revision - # @return [Integer,nil] Revision number of the scenario set containing the executed scenario - attr_accessor :revision - # @!attribute [rw] start_time - # @return [Integer] Timestamp for when execution of scenario action started (milliseconds, LINE app time) - attr_accessor :start_time - # @!attribute [rw] end_time - # @return [Integer] Timestamp for when execution of scenario was completed (milliseconds, LINE app time) - attr_accessor :end_time - # @!attribute [rw] result_code - # @return [String] Scenario execution completion status - attr_accessor :result_code - # @!attribute [rw] action_results - # @return [Array[ActionResult],nil] Execution result of individual operations specified in action. Only included when things.result.resultCode is success. - attr_accessor :action_results - # @!attribute [rw] ble_notification_payload - # @return [String,nil] Data contained in notification. - attr_accessor :ble_notification_payload - # @!attribute [rw] error_reason - # @return [String,nil] Error reason. - attr_accessor :error_reason - - # @param scenario_id [String,nil] Scenario ID executed - # @param revision [Integer,nil] Revision number of the scenario set containing the executed scenario - # @param start_time [Integer] Timestamp for when execution of scenario action started (milliseconds, LINE app time) - # @param end_time [Integer] Timestamp for when execution of scenario was completed (milliseconds, LINE app time) - # @param result_code [String] Scenario execution completion status - # @param action_results [Array[ActionResult, Hash[Symbol, untyped]],nil] Execution result of individual operations specified in action. Only included when things.result.resultCode is success. - # @param ble_notification_payload [String,nil] Data contained in notification. - # @param error_reason [String,nil] Error reason. - def initialize( - scenario_id: nil, - revision: nil, - start_time:, - end_time:, - result_code:, - action_results: nil, - ble_notification_payload: nil, - error_reason: nil, - **dynamic_attributes - ) - - @scenario_id = scenario_id - @revision = revision - @start_time = start_time - @end_time = end_time - @result_code = result_code - @action_results = action_results&.map do |item| - if item.is_a?(Hash) - Line::Bot::V2::Webhook::ActionResult.create(**item) # steep:ignore InsufficientKeywordArguments - else - item - end - end - @ble_notification_payload = ble_notification_payload - @error_reason = error_reason - - dynamic_attributes.each do |key, value| - self.class.attr_accessor key - - if value.is_a?(Hash) - struct_klass = Struct.new(*value.keys.map(&:to_sym)) - struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } - instance_variable_set("@#{key}", struct_klass.new(*struct_values)) - else - instance_variable_set("@#{key}", value) - end - end - end - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ScenarioResult] Instance of the class - def self.create(args) # steep:ignore - symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) - return new(**symbolized_args) # steep:ignore - end - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==(other) - return false unless self.class == other.class - - instance_variables.all? do |var| - instance_variable_get(var) == other.instance_variable_get(var) - end - end - - # @return [Integer] Hash code of the object - def hash - [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash - end - end - end - end - end -end diff --git a/lib/line/bot/v2/webhook/model/scenario_result_things_content.rb b/lib/line/bot/v2/webhook/model/scenario_result_things_content.rb deleted file mode 100644 index d3131af6..00000000 --- a/lib/line/bot/v2/webhook/model/scenario_result_things_content.rb +++ /dev/null @@ -1,78 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -require_relative './things_content' - -module Line - module Bot - module V2 - module Webhook - class ScenarioResultThingsContent < ThingsContent - # @!attribute [r] type - # @return [String] Type - attr_reader :type - # @!attribute [rw] device_id - # @return [String] Device ID of the device that has been linked with LINE. - attr_accessor :device_id - # @!attribute [rw] result - # @return [ScenarioResult] - attr_accessor :result - - # @param device_id [String] Device ID of the device that has been linked with LINE. - # @param result [ScenarioResult, Hash[Symbol, untyped]] - def initialize( - device_id:, - result:, - **dynamic_attributes - ) - @type = "scenarioResult" - - @device_id = device_id - @result = result.is_a?(Line::Bot::V2::Webhook::ScenarioResult) ? result : Line::Bot::V2::Webhook::ScenarioResult.create(**result) # steep:ignore - - dynamic_attributes.each do |key, value| - self.class.attr_accessor key - - if value.is_a?(Hash) - struct_klass = Struct.new(*value.keys.map(&:to_sym)) - struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } - instance_variable_set("@#{key}", struct_klass.new(*struct_values)) - else - instance_variable_set("@#{key}", value) - end - end - end - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ScenarioResultThingsContent] Instance of the class - def self.create(args) # steep:ignore - symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) - return new(**symbolized_args) # steep:ignore - end - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==(other) - return false unless self.class == other.class - - instance_variables.all? do |var| - instance_variable_get(var) == other.instance_variable_get(var) - end - end - - # @return [Integer] Hash code of the object - def hash - [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash - end - end - end - end - end -end diff --git a/lib/line/bot/v2/webhook/model/things_content.rb b/lib/line/bot/v2/webhook/model/things_content.rb deleted file mode 100644 index 012707d4..00000000 --- a/lib/line/bot/v2/webhook/model/things_content.rb +++ /dev/null @@ -1,78 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - class ThingsContent - # @!attribute [rw] type - # @return [String] Type - attr_accessor :type - - # @param type [String] Type - def initialize( - type:, - **dynamic_attributes - ) - - @type = type - - dynamic_attributes.each do |key, value| - self.class.attr_accessor key - - if value.is_a?(Hash) - struct_klass = Struct.new(*value.keys.map(&:to_sym)) - struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } - instance_variable_set("@#{key}", struct_klass.new(*struct_values)) - else - instance_variable_set("@#{key}", value) - end - end - end - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ThingsContent] Instance of the class - def self.create(args) # steep:ignore - symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) - klass = detect_class(type: symbolized_args[:type]) - return klass.new(**symbolized_args) if klass # steep:ignore - return new(**symbolized_args) # steep:ignore - end - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==(other) - return false unless self.class == other.class - - instance_variables.all? do |var| - instance_variable_get(var) == other.instance_variable_get(var) - end - end - - # @return [Integer] Hash code of the object - def hash - [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash - end - - private - - def self.detect_class(type:) - { - link: Line::Bot::V2::Webhook::LinkThingsContent, - scenarioResult: Line::Bot::V2::Webhook::ScenarioResultThingsContent, - unlink: Line::Bot::V2::Webhook::UnlinkThingsContent, - }[type.to_sym] - end - end - end - end - end -end diff --git a/lib/line/bot/v2/webhook/model/things_event.rb b/lib/line/bot/v2/webhook/model/things_event.rb deleted file mode 100644 index be2261f4..00000000 --- a/lib/line/bot/v2/webhook/model/things_event.rb +++ /dev/null @@ -1,109 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -require_relative './event' - -module Line - module Bot - module V2 - module Webhook - # Indicates that a user linked a device with LINE. - class ThingsEvent < Event - # @!attribute [r] type - # @return [String] Type of the event - attr_reader :type - # @!attribute [rw] source - # @return [Source,nil] - attr_accessor :source - # @!attribute [rw] timestamp - # @return [Integer] Time of the event in milliseconds. - attr_accessor :timestamp - # @!attribute [rw] mode - # @return [String] ('active'|'standby') - attr_accessor :mode - # @!attribute [rw] webhook_event_id - # @return [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format. - attr_accessor :webhook_event_id - # @!attribute [rw] delivery_context - # @return [DeliveryContext] - attr_accessor :delivery_context - # @!attribute [rw] reply_token - # @return [String] Reply token used to send reply message to this event - attr_accessor :reply_token - # @!attribute [rw] things - # @return [ThingsContent] - attr_accessor :things - - # @param source [Source, Hash[Symbol, untyped], nil] - # @param timestamp [Integer] Time of the event in milliseconds. - # @param mode [String] ('active'|'standby') - # @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format. - # @param delivery_context [DeliveryContext, Hash[Symbol, untyped]] - # @param reply_token [String] Reply token used to send reply message to this event - # @param things [ThingsContent, Hash[Symbol, untyped]] - def initialize( - source: nil, - timestamp:, - mode:, - webhook_event_id:, - delivery_context:, - reply_token:, - things:, - **dynamic_attributes - ) - @type = "things" - - @source = source.is_a?(Line::Bot::V2::Webhook::Source) || source.nil? ? source : Line::Bot::V2::Webhook::Source.create(**source) # steep:ignore - @timestamp = timestamp - @mode = mode - @webhook_event_id = webhook_event_id - @delivery_context = delivery_context.is_a?(Line::Bot::V2::Webhook::DeliveryContext) ? delivery_context : Line::Bot::V2::Webhook::DeliveryContext.create(**delivery_context) # steep:ignore - @reply_token = reply_token - @things = things.is_a?(Line::Bot::V2::Webhook::ThingsContent) ? things : Line::Bot::V2::Webhook::ThingsContent.create(**things) # steep:ignore - - dynamic_attributes.each do |key, value| - self.class.attr_accessor key - - if value.is_a?(Hash) - struct_klass = Struct.new(*value.keys.map(&:to_sym)) - struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } - instance_variable_set("@#{key}", struct_klass.new(*struct_values)) - else - instance_variable_set("@#{key}", value) - end - end - end - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ThingsEvent] Instance of the class - def self.create(args) # steep:ignore - symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) - return new(**symbolized_args) # steep:ignore - end - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==(other) - return false unless self.class == other.class - - instance_variables.all? do |var| - instance_variable_get(var) == other.instance_variable_get(var) - end - end - - # @return [Integer] Hash code of the object - def hash - [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash - end - end - end - end - end -end diff --git a/lib/line/bot/v2/webhook/model/unlink_things_content.rb b/lib/line/bot/v2/webhook/model/unlink_things_content.rb deleted file mode 100644 index b500509a..00000000 --- a/lib/line/bot/v2/webhook/model/unlink_things_content.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -require_relative './things_content' - -module Line - module Bot - module V2 - module Webhook - class UnlinkThingsContent < ThingsContent - # @!attribute [r] type - # @return [String] Type - attr_reader :type - # @!attribute [rw] device_id - # @return [String] Device ID of the device that has been linked with LINE. - attr_accessor :device_id - - # @param device_id [String] Device ID of the device that has been linked with LINE. - def initialize( - device_id:, - **dynamic_attributes - ) - @type = "unlink" - - @device_id = device_id - - dynamic_attributes.each do |key, value| - self.class.attr_accessor key - - if value.is_a?(Hash) - struct_klass = Struct.new(*value.keys.map(&:to_sym)) - struct_values = value.map { |_k, v| v.is_a?(Hash) ? Line::Bot::V2::Utils.hash_to_struct(v) : v } - instance_variable_set("@#{key}", struct_klass.new(*struct_values)) - else - instance_variable_set("@#{key}", value) - end - end - end - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::UnlinkThingsContent] Instance of the class - def self.create(args) # steep:ignore - symbolized_args = Line::Bot::V2::Utils.deep_symbolize(args) - return new(**symbolized_args) # steep:ignore - end - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==(other) - return false unless self.class == other.class - - instance_variables.all? do |var| - instance_variable_get(var) == other.instance_variable_get(var) - end - end - - # @return [Integer] Hash code of the object - def hash - [self.class, *instance_variables.map { |var| instance_variable_get(var) }].hash - end - end - end - end - end -end diff --git a/line-openapi b/line-openapi index b4589bc6..9c6ae632 160000 --- a/line-openapi +++ b/line-openapi @@ -1 +1 @@ -Subproject commit b4589bc62a4c1a42016a08e2b8945154e10e7193 +Subproject commit 9c6ae632250038aab446aaad9da5e29b533708e2 diff --git a/sig/line/bot/v2/webhook/.openapi-generator/FILES b/sig/line/bot/v2/webhook/.openapi-generator/FILES index 7a019615..00f494d1 100644 --- a/sig/line/bot/v2/webhook/.openapi-generator/FILES +++ b/sig/line/bot/v2/webhook/.openapi-generator/FILES @@ -1,7 +1,6 @@ .openapi-generator-ignore api/dummy_client.rbs model/account_link_event.rbs -model/action_result.rbs model/activated_event.rbs model/all_mentionee.rbs model/attached_module_content.rbs @@ -32,7 +31,6 @@ model/leave_event.rbs model/left_members.rbs model/left_membership_content.rbs model/link_content.rbs -model/link_things_content.rbs model/location_message_content.rbs model/member_joined_event.rbs model/member_left_event.rbs @@ -50,15 +48,10 @@ model/postback_content.rbs model/postback_event.rbs model/renewed_membership_content.rbs model/room_source.rbs -model/scenario_result.rbs -model/scenario_result_things_content.rbs model/source.rbs model/sticker_message_content.rbs model/text_message_content.rbs -model/things_content.rbs -model/things_event.rbs model/unfollow_event.rbs -model/unlink_things_content.rbs model/unsend_detail.rbs model/unsend_event.rbs model/user_mentionee.rbs diff --git a/sig/line/bot/v2/webhook/model/action_result.rbs b/sig/line/bot/v2/webhook/model/action_result.rbs deleted file mode 100644 index 46f4cf42..00000000 --- a/sig/line/bot/v2/webhook/model/action_result.rbs +++ /dev/null @@ -1,42 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - class ActionResult - attr_accessor type: 'void'|'binary' - attr_accessor data: String? - - - # @param type [String] ('void'|'binary') - # @param data [String,nil] Base64-encoded binary data - def initialize: ( - type: 'void'|'binary', - ?data: String?, - **untyped dynamic_attributes - ) -> void - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ActionResult] Instance of the class - def self.create: (Hash[Symbol, untyped]) -> ActionResult - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==: (untyped other) -> bool - - # @return [Integer] Hash code of the object - def hash: () -> Integer - end - end - end - end -end diff --git a/sig/line/bot/v2/webhook/model/link_things_content.rbs b/sig/line/bot/v2/webhook/model/link_things_content.rbs deleted file mode 100644 index 535cd52a..00000000 --- a/sig/line/bot/v2/webhook/model/link_things_content.rbs +++ /dev/null @@ -1,40 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - class LinkThingsContent < ThingsContent - attr_reader type: String - attr_accessor device_id: String - - - # @param device_id [String] Device ID of the device that has been linked with LINE. - def initialize: ( - device_id: String, - **untyped dynamic_attributes - ) -> void - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::LinkThingsContent] Instance of the class - def self.create: (Hash[Symbol, untyped]) -> LinkThingsContent - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==: (untyped other) -> bool - - # @return [Integer] Hash code of the object - def hash: () -> Integer - end - end - end - end -end diff --git a/sig/line/bot/v2/webhook/model/scenario_result.rbs b/sig/line/bot/v2/webhook/model/scenario_result.rbs deleted file mode 100644 index 3277472a..00000000 --- a/sig/line/bot/v2/webhook/model/scenario_result.rbs +++ /dev/null @@ -1,61 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - # @see https://developers.line.biz/en/reference/messaging-api/#scenario-result-event - class ScenarioResult - attr_accessor scenario_id: String? - attr_accessor revision: Integer? - attr_accessor start_time: Integer - attr_accessor end_time: Integer - attr_accessor result_code: String - attr_accessor action_results: Array[ActionResult]? - attr_accessor ble_notification_payload: String? - attr_accessor error_reason: String? - - - # @param scenario_id [String,nil] Scenario ID executed - # @param revision [Integer,nil] Revision number of the scenario set containing the executed scenario - # @param start_time [Integer] Timestamp for when execution of scenario action started (milliseconds, LINE app time) - # @param end_time [Integer] Timestamp for when execution of scenario was completed (milliseconds, LINE app time) - # @param result_code [String] Scenario execution completion status - # @param action_results [Array[ActionResult, Hash[Symbol, untyped]],nil] Execution result of individual operations specified in action. Only included when things.result.resultCode is success. - # @param ble_notification_payload [String,nil] Data contained in notification. - # @param error_reason [String,nil] Error reason. - def initialize: ( - ?scenario_id: String?, - ?revision: Integer?, - start_time: Integer, - end_time: Integer, - result_code: String, - ?action_results: Array[ActionResult| Hash[Symbol, untyped]]?, - ?ble_notification_payload: String?, - ?error_reason: String?, - **untyped dynamic_attributes - ) -> void - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ScenarioResult] Instance of the class - def self.create: (Hash[Symbol, untyped]) -> ScenarioResult - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==: (untyped other) -> bool - - # @return [Integer] Hash code of the object - def hash: () -> Integer - end - end - end - end -end diff --git a/sig/line/bot/v2/webhook/model/scenario_result_things_content.rbs b/sig/line/bot/v2/webhook/model/scenario_result_things_content.rbs deleted file mode 100644 index 43ce2764..00000000 --- a/sig/line/bot/v2/webhook/model/scenario_result_things_content.rbs +++ /dev/null @@ -1,43 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - class ScenarioResultThingsContent < ThingsContent - attr_reader type: String - attr_accessor device_id: String - attr_accessor result: ScenarioResult - - - # @param device_id [String] Device ID of the device that has been linked with LINE. - # @param result [ScenarioResult, Hash[Symbol, untyped]] - def initialize: ( - device_id: String, - result: ScenarioResult| Hash[Symbol, untyped], - **untyped dynamic_attributes - ) -> void - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ScenarioResultThingsContent] Instance of the class - def self.create: (Hash[Symbol, untyped]) -> ScenarioResultThingsContent - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==: (untyped other) -> bool - - # @return [Integer] Hash code of the object - def hash: () -> Integer - end - end - end - end -end diff --git a/sig/line/bot/v2/webhook/model/things_content.rbs b/sig/line/bot/v2/webhook/model/things_content.rbs deleted file mode 100644 index 7323a68f..00000000 --- a/sig/line/bot/v2/webhook/model/things_content.rbs +++ /dev/null @@ -1,43 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - class ThingsContent - attr_accessor type: String - - - # @param type [String] Type - def initialize: ( - type: String, - **untyped dynamic_attributes - ) -> void - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ThingsContent] Instance of the class - def self.create: (Hash[Symbol, untyped]) -> ThingsContent - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==: (untyped other) -> bool - - # @return [Integer] Hash code of the object - def hash: () -> Integer - - private - - def self.detect_class: (type: String) -> Class? - end - end - end - end -end diff --git a/sig/line/bot/v2/webhook/model/things_event.rbs b/sig/line/bot/v2/webhook/model/things_event.rbs deleted file mode 100644 index 65471aeb..00000000 --- a/sig/line/bot/v2/webhook/model/things_event.rbs +++ /dev/null @@ -1,59 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - # Indicates that a user linked a device with LINE. - class ThingsEvent < Event - attr_reader type: String - attr_accessor source: Source? - attr_accessor timestamp: Integer - attr_accessor mode: 'active'|'standby' - attr_accessor webhook_event_id: String - attr_accessor delivery_context: DeliveryContext - attr_accessor reply_token: String - attr_accessor things: ThingsContent - - - # @param source [Source, Hash[Symbol, untyped], nil] - # @param timestamp [Integer] Time of the event in milliseconds. - # @param mode [String] ('active'|'standby') - # @param webhook_event_id [String] Webhook Event ID. An ID that uniquely identifies a webhook event. This is a string in ULID format. - # @param delivery_context [DeliveryContext, Hash[Symbol, untyped]] - # @param reply_token [String] Reply token used to send reply message to this event - # @param things [ThingsContent, Hash[Symbol, untyped]] - def initialize: ( - ?source: Source?| Hash[Symbol, untyped]?, - timestamp: Integer, - mode: 'active'|'standby', - webhook_event_id: String, - delivery_context: DeliveryContext| Hash[Symbol, untyped], - reply_token: String, - things: ThingsContent| Hash[Symbol, untyped], - **untyped dynamic_attributes - ) -> void - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::ThingsEvent] Instance of the class - def self.create: (Hash[Symbol, untyped]) -> ThingsEvent - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==: (untyped other) -> bool - - # @return [Integer] Hash code of the object - def hash: () -> Integer - end - end - end - end -end diff --git a/sig/line/bot/v2/webhook/model/unlink_things_content.rbs b/sig/line/bot/v2/webhook/model/unlink_things_content.rbs deleted file mode 100644 index 238ebcf6..00000000 --- a/sig/line/bot/v2/webhook/model/unlink_things_content.rbs +++ /dev/null @@ -1,40 +0,0 @@ -# Webhook Type Definition -# Webhook event definition of the LINE Messaging API -# -# The version of the OpenAPI document: 1.0.0 -# -# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -# https://openapi-generator.tech -# Do not edit the class manually. - -module Line - module Bot - module V2 - module Webhook - class UnlinkThingsContent < ThingsContent - attr_reader type: String - attr_accessor device_id: String - - - # @param device_id [String] Device ID of the device that has been linked with LINE. - def initialize: ( - device_id: String, - **untyped dynamic_attributes - ) -> void - - # Create an instance of the class from a hash - # @param args [Hash] Hash containing all the required attributes - # @return [Line::Bot::V2::Webhook::UnlinkThingsContent] Instance of the class - def self.create: (Hash[Symbol, untyped]) -> UnlinkThingsContent - - # @param other [Object] Object to compare - # @return [Boolean] true if the objects are equal, false otherwise - def ==: (untyped other) -> bool - - # @return [Integer] Hash code of the object - def hash: () -> Integer - end - end - end - end -end