Class: E621ExportDownloader::Models::BulkUpdateRequest
- Inherits:
-
Object
- Object
- E621ExportDownloader::Models::BulkUpdateRequest
- Extended by:
- T::Sig
- Defined in:
- lib/e621_export_downloader/models/bulk_update_request.rb
Instance Attribute Summary collapse
-
#approver_id ⇒ Object
readonly
Returns the value of attribute approver_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#forum_topic_id ⇒ Object
readonly
Returns the value of attribute forum_topic_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#script ⇒ Object
readonly
Returns the value of attribute script.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(record) ⇒ BulkUpdateRequest
constructor
A new instance of BulkUpdateRequest.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(record) ⇒ BulkUpdateRequest
Returns a new instance of BulkUpdateRequest.
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 37 def initialize(record) @record = T.let(record, T::Hash[String, String]) @approver_id = T.let(T.must(record["approver_id"]).empty? ? nil : record["approver_id"].to_i, T.nilable(Integer)) @created_at = T.let(DateTime.parse(record["created_at"]), DateTime) @forum_topic_id = T.let(T.must(record["forum_topic_id"]).empty? ? nil : record["forum_topic_id"].to_i, T.nilable(Integer)) @id = T.let(record["id"].to_i, Integer) @script = T.let(T.must(record["script"]), String) @status = T.let(T.must(record["status"]), String) @title = T.let(T.must(record["title"]).empty? ? nil : record["title"], T.nilable(String)) @updated_at = T.let(DateTime.parse(record["updated_at"]), DateTime) @user_id = T.let(record["user_id"].to_i, Integer) end |
Instance Attribute Details
#approver_id ⇒ Object (readonly)
Returns the value of attribute approver_id.
10 11 12 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 10 def approver_id @approver_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
13 14 15 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 13 def created_at @created_at end |
#forum_topic_id ⇒ Object (readonly)
Returns the value of attribute forum_topic_id.
16 17 18 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 16 def forum_topic_id @forum_topic_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 19 def id @id end |
#script ⇒ Object (readonly)
Returns the value of attribute script.
22 23 24 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 22 def script @script end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
25 26 27 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 25 def status @status end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
28 29 30 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 28 def title @title end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
31 32 33 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 31 def updated_at @updated_at end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
34 35 36 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 34 def user_id @user_id end |
Instance Method Details
#to_json(*_args) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/e621_export_downloader/models/bulk_update_request.rb', line 51 def to_json(*_args) { approver_id: @approver_id, created_at: @created_at, forum_topic_id: @forum_topic_id, id: @id, script: @script, status: @status, title: @title, updated_at: @updated_at, user_id: @user_id, }.to_json end |