Class: Appwrite::Models::Report
- Inherits:
-
Object
- Object
- Appwrite::Models::Report
- Defined in:
- lib/appwrite/models/report.rb
Instance Attribute Summary collapse
-
#analyzed_at ⇒ Object
readonly
Returns the value of attribute analyzed_at.
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#categories ⇒ Object
readonly
Returns the value of attribute categories.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#insights ⇒ Object
readonly
Returns the value of attribute insights.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#target_type ⇒ Object
readonly
Returns the value of attribute target_type.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, app_id:, type:, title:, summary:, target_type:, target:, categories:, insights:, analyzed_at:) ⇒ Report
constructor
A new instance of Report.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, app_id:, type:, title:, summary:, target_type:, target:, categories:, insights:, analyzed_at:) ⇒ Report
Returns a new instance of Report.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/appwrite/models/report.rb', line 19 def initialize( id:, created_at:, updated_at:, app_id:, type:, title:, summary:, target_type:, target:, categories:, insights:, analyzed_at: ) @id = id @created_at = created_at @updated_at = updated_at @app_id = app_id @type = type @title = title @summary = summary @target_type = target_type @target = target @categories = categories @insights = insights @analyzed_at = analyzed_at end |
Instance Attribute Details
#analyzed_at ⇒ Object (readonly)
Returns the value of attribute analyzed_at.
17 18 19 |
# File 'lib/appwrite/models/report.rb', line 17 def analyzed_at @analyzed_at end |
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
9 10 11 |
# File 'lib/appwrite/models/report.rb', line 9 def app_id @app_id end |
#categories ⇒ Object (readonly)
Returns the value of attribute categories.
15 16 17 |
# File 'lib/appwrite/models/report.rb', line 15 def categories @categories end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/report.rb', line 7 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/report.rb', line 6 def id @id end |
#insights ⇒ Object (readonly)
Returns the value of attribute insights.
16 17 18 |
# File 'lib/appwrite/models/report.rb', line 16 def insights @insights end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
12 13 14 |
# File 'lib/appwrite/models/report.rb', line 12 def summary @summary end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
14 15 16 |
# File 'lib/appwrite/models/report.rb', line 14 def target @target end |
#target_type ⇒ Object (readonly)
Returns the value of attribute target_type.
13 14 15 |
# File 'lib/appwrite/models/report.rb', line 13 def target_type @target_type end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/appwrite/models/report.rb', line 11 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
10 11 12 |
# File 'lib/appwrite/models/report.rb', line 10 def type @type end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/report.rb', line 8 def updated_at @updated_at end |
Class Method Details
.from(map:) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/appwrite/models/report.rb', line 47 def self.from(map:) Report.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], app_id: map["appId"], type: map["type"], title: map["title"], summary: map["summary"], target_type: map["targetType"], target: map["target"], categories: map["categories"], insights: map["insights"].map { |it| Insight.from(map: it) }, analyzed_at: map["analyzedAt"] ) end |
Instance Method Details
#to_map ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/appwrite/models/report.rb', line 64 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "appId": @app_id, "type": @type, "title": @title, "summary": @summary, "targetType": @target_type, "target": @target, "categories": @categories, "insights": @insights.map { |it| it.to_map }, "analyzedAt": @analyzed_at } end |