Class: Appwrite::Models::ActivityEvent

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, user_type:, user_id:, user_email:, user_name:, resource_parent:, resource_type:, resource_id:, resource:, event:, user_agent:, ip:, mode:, country:, time:, project_id:, team_id:, hostname:, os_code:, os_name:, os_version:, client_type:, client_code:, client_name:, client_version:, client_engine:, client_engine_version:, device_name:, device_brand:, device_model:, country_code:, country_name:) ⇒ ActivityEvent

Returns a new instance of ActivityEvent.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/appwrite/models/activity_event.rb', line 39

def initialize(
    id:,
    user_type:,
    user_id:,
    user_email:,
    user_name:,
    resource_parent:,
    resource_type:,
    resource_id:,
    resource:,
    event:,
    user_agent:,
    ip:,
    mode:,
    country:,
    time:,
    project_id:,
    team_id:,
    hostname:,
    os_code:,
    os_name:,
    os_version:,
    client_type:,
    client_code:,
    client_name:,
    client_version:,
    client_engine:,
    client_engine_version:,
    device_name:,
    device_brand:,
    device_model:,
    country_code:,
    country_name:
)
    @id = id
    @user_type = user_type
    @user_id = user_id
    @user_email = user_email
    @user_name = user_name
    @resource_parent = resource_parent
    @resource_type = resource_type
    @resource_id = resource_id
    @resource = resource
    @event = event
    @user_agent = user_agent
    @ip = ip
    @mode = mode
    @country = country
    @time = time
    @project_id = project_id
    @team_id = team_id
    @hostname = hostname
    @os_code = os_code
    @os_name = os_name
    @os_version = os_version
    @client_type = client_type
    @client_code = client_code
    @client_name = client_name
    @client_version = client_version
    @client_engine = client_engine
    @client_engine_version = client_engine_version
    @device_name = device_name
    @device_brand = device_brand
    @device_model = device_model
    @country_code = country_code
    @country_name = country_name
end

Instance Attribute Details

#client_codeObject (readonly)

Returns the value of attribute client_code.



28
29
30
# File 'lib/appwrite/models/activity_event.rb', line 28

def client_code
  @client_code
end

#client_engineObject (readonly)

Returns the value of attribute client_engine.



31
32
33
# File 'lib/appwrite/models/activity_event.rb', line 31

def client_engine
  @client_engine
end

#client_engine_versionObject (readonly)

Returns the value of attribute client_engine_version.



32
33
34
# File 'lib/appwrite/models/activity_event.rb', line 32

def client_engine_version
  @client_engine_version
end

#client_nameObject (readonly)

Returns the value of attribute client_name.



29
30
31
# File 'lib/appwrite/models/activity_event.rb', line 29

def client_name
  @client_name
end

#client_typeObject (readonly)

Returns the value of attribute client_type.



27
28
29
# File 'lib/appwrite/models/activity_event.rb', line 27

def client_type
  @client_type
end

#client_versionObject (readonly)

Returns the value of attribute client_version.



30
31
32
# File 'lib/appwrite/models/activity_event.rb', line 30

def client_version
  @client_version
end

#countryObject (readonly)

Returns the value of attribute country.



19
20
21
# File 'lib/appwrite/models/activity_event.rb', line 19

def country
  @country
end

#country_codeObject (readonly)

Returns the value of attribute country_code.



36
37
38
# File 'lib/appwrite/models/activity_event.rb', line 36

def country_code
  @country_code
end

#country_nameObject (readonly)

Returns the value of attribute country_name.



37
38
39
# File 'lib/appwrite/models/activity_event.rb', line 37

def country_name
  @country_name
end

#device_brandObject (readonly)

Returns the value of attribute device_brand.



34
35
36
# File 'lib/appwrite/models/activity_event.rb', line 34

def device_brand
  @device_brand
end

#device_modelObject (readonly)

Returns the value of attribute device_model.



35
36
37
# File 'lib/appwrite/models/activity_event.rb', line 35

def device_model
  @device_model
end

#device_nameObject (readonly)

Returns the value of attribute device_name.



33
34
35
# File 'lib/appwrite/models/activity_event.rb', line 33

def device_name
  @device_name
end

#eventObject (readonly)

Returns the value of attribute event.



15
16
17
# File 'lib/appwrite/models/activity_event.rb', line 15

def event
  @event
end

#hostnameObject (readonly)

Returns the value of attribute hostname.



23
24
25
# File 'lib/appwrite/models/activity_event.rb', line 23

def hostname
  @hostname
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#ipObject (readonly)

Returns the value of attribute ip.



17
18
19
# File 'lib/appwrite/models/activity_event.rb', line 17

def ip
  @ip
end

#modeObject (readonly)

Returns the value of attribute mode.



18
19
20
# File 'lib/appwrite/models/activity_event.rb', line 18

def mode
  @mode
end

#os_codeObject (readonly)

Returns the value of attribute os_code.



24
25
26
# File 'lib/appwrite/models/activity_event.rb', line 24

def os_code
  @os_code
end

#os_nameObject (readonly)

Returns the value of attribute os_name.



25
26
27
# File 'lib/appwrite/models/activity_event.rb', line 25

def os_name
  @os_name
end

#os_versionObject (readonly)

Returns the value of attribute os_version.



26
27
28
# File 'lib/appwrite/models/activity_event.rb', line 26

def os_version
  @os_version
end

#project_idObject (readonly)

Returns the value of attribute project_id.



21
22
23
# File 'lib/appwrite/models/activity_event.rb', line 21

def project_id
  @project_id
end

#resourceObject (readonly)

Returns the value of attribute resource.



14
15
16
# File 'lib/appwrite/models/activity_event.rb', line 14

def resource
  @resource
end

#resource_idObject (readonly)

Returns the value of attribute resource_id.



13
14
15
# File 'lib/appwrite/models/activity_event.rb', line 13

def resource_id
  @resource_id
end

#resource_parentObject (readonly)

Returns the value of attribute resource_parent.



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

def resource_parent
  @resource_parent
end

#resource_typeObject (readonly)

Returns the value of attribute resource_type.



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

def resource_type
  @resource_type
end

#team_idObject (readonly)

Returns the value of attribute team_id.



22
23
24
# File 'lib/appwrite/models/activity_event.rb', line 22

def team_id
  @team_id
end

#timeObject (readonly)

Returns the value of attribute time.



20
21
22
# File 'lib/appwrite/models/activity_event.rb', line 20

def time
  @time
end

#user_agentObject (readonly)

Returns the value of attribute user_agent.



16
17
18
# File 'lib/appwrite/models/activity_event.rb', line 16

def user_agent
  @user_agent
end

#user_emailObject (readonly)

Returns the value of attribute user_email.



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

def user_email
  @user_email
end

#user_idObject (readonly)

Returns the value of attribute user_id.



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

def user_id
  @user_id
end

#user_nameObject (readonly)

Returns the value of attribute user_name.



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

def user_name
  @user_name
end

#user_typeObject (readonly)

Returns the value of attribute user_type.



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

def user_type
  @user_type
end

Class Method Details

.from(map:) ⇒ Object



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/appwrite/models/activity_event.rb', line 107

def self.from(map:)
    ActivityEvent.new(
        id: map["$id"],
        user_type: map["userType"],
        user_id: map["userId"],
        user_email: map["userEmail"],
        user_name: map["userName"],
        resource_parent: map["resourceParent"],
        resource_type: map["resourceType"],
        resource_id: map["resourceId"],
        resource: map["resource"],
        event: map["event"],
        user_agent: map["userAgent"],
        ip: map["ip"],
        mode: map["mode"],
        country: map["country"],
        time: map["time"],
        project_id: map["projectId"],
        team_id: map["teamId"],
        hostname: map["hostname"],
        os_code: map["osCode"],
        os_name: map["osName"],
        os_version: map["osVersion"],
        client_type: map["clientType"],
        client_code: map["clientCode"],
        client_name: map["clientName"],
        client_version: map["clientVersion"],
        client_engine: map["clientEngine"],
        client_engine_version: map["clientEngineVersion"],
        device_name: map["deviceName"],
        device_brand: map["deviceBrand"],
        device_model: map["deviceModel"],
        country_code: map["countryCode"],
        country_name: map["countryName"]
    )
end

Instance Method Details

#to_mapObject



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/appwrite/models/activity_event.rb', line 144

def to_map
    {
        "$id": @id,
        "userType": @user_type,
        "userId": @user_id,
        "userEmail": @user_email,
        "userName": @user_name,
        "resourceParent": @resource_parent,
        "resourceType": @resource_type,
        "resourceId": @resource_id,
        "resource": @resource,
        "event": @event,
        "userAgent": @user_agent,
        "ip": @ip,
        "mode": @mode,
        "country": @country,
        "time": @time,
        "projectId": @project_id,
        "teamId": @team_id,
        "hostname": @hostname,
        "osCode": @os_code,
        "osName": @os_name,
        "osVersion": @os_version,
        "clientType": @client_type,
        "clientCode": @client_code,
        "clientName": @client_name,
        "clientVersion": @client_version,
        "clientEngine": @client_engine,
        "clientEngineVersion": @client_engine_version,
        "deviceName": @device_name,
        "deviceBrand": @device_brand,
        "deviceModel": @device_model,
        "countryCode": @country_code,
        "countryName": @country_name
    }
end