Class: Appwrite::Models::AnalyticsAnnotation

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/analytics_annotation.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, created_at:, updated_at:, property_id:, date:, content:, user_id:) ⇒ AnalyticsAnnotation

Returns a new instance of AnalyticsAnnotation.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/appwrite/models/analytics_annotation.rb', line 14

def initialize(
    id:,
    created_at:,
    updated_at:,
    property_id:,
    date:,
    content:,
    user_id:
)
    @id = id
    @created_at = created_at
    @updated_at = updated_at
    @property_id = property_id
    @date = date
    @content = content
    @user_id = user_id
end

Instance Attribute Details

#content ⇒ Object (readonly)

Returns the value of attribute content.



11
12
13
# File 'lib/appwrite/models/analytics_annotation.rb', line 11

def content
  @content
end

#created_at ⇒ Object (readonly)

Returns the value of attribute created_at.



7
8
9
# File 'lib/appwrite/models/analytics_annotation.rb', line 7

def created_at
  @created_at
end

#date ⇒ Object (readonly)

Returns the value of attribute date.



10
11
12
# File 'lib/appwrite/models/analytics_annotation.rb', line 10

def date
  @date
end

#id ⇒ Object (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/appwrite/models/analytics_annotation.rb', line 6

def id
  @id
end

#property_id ⇒ Object (readonly)

Returns the value of attribute property_id.



9
10
11
# File 'lib/appwrite/models/analytics_annotation.rb', line 9

def property_id
  @property_id
end

#updated_at ⇒ Object (readonly)

Returns the value of attribute updated_at.



8
9
10
# File 'lib/appwrite/models/analytics_annotation.rb', line 8

def updated_at
  @updated_at
end

#user_id ⇒ Object (readonly)

Returns the value of attribute user_id.



12
13
14
# File 'lib/appwrite/models/analytics_annotation.rb', line 12

def user_id
  @user_id
end

Class Method Details

.from(map:) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/appwrite/models/analytics_annotation.rb', line 32

def self.from(map:)
    map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "propertyId" => "", "date" => "", "content" => "", "userId" => "" }.merge(map)
    AnalyticsAnnotation.new(
        id: map["$id"],
        created_at: map["$createdAt"],
        updated_at: map["$updatedAt"],
        property_id: map["propertyId"],
        date: map["date"],
        content: map["content"],
        user_id: map["userId"]
    )
end

Instance Method Details

#to_map ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/appwrite/models/analytics_annotation.rb', line 45

def to_map
    {
        "$id": @id,
        "$createdAt": @created_at,
        "$updatedAt": @updated_at,
        "propertyId": @property_id,
        "date": @date,
        "content": @content,
        "userId": @user_id
    }
end