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:, actor_type:, actor_id:, actor_email:, actor_name:, resource_parent:, resource_type:, resource_id:, resource:, event:, user_agent:, ip:, mode:, country:, continent_code:, city:, subdivisions:, isp:, autonomous_system_number:, autonomous_system_organization:, connection_type:, connection_usage_type:, connection_organization:, time:, project_id:, team_id:, hostname:, sdk:, sdk_version:) ⇒ ActivityEvent

Returns a new instance of ActivityEvent.



36
37
38
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
# File 'lib/appwrite/models/activity_event.rb', line 36

def initialize(
    id:,
    actor_type:,
    actor_id:,
    actor_email:,
    actor_name:,
    resource_parent:,
    resource_type:,
    resource_id:,
    resource:,
    event:,
    user_agent:,
    ip:,
    mode:,
    country:,
    continent_code:,
    city:,
    subdivisions:,
    isp:,
    autonomous_system_number:,
    autonomous_system_organization:,
    connection_type:,
    connection_usage_type:,
    connection_organization:,
    time:,
    project_id:,
    team_id:,
    hostname:,
    sdk:,
    sdk_version:
)
    @id = id
    @actor_type = actor_type
    @actor_id = actor_id
    @actor_email = actor_email
    @actor_name = actor_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
    @continent_code = continent_code
    @city = city
    @subdivisions = subdivisions
    @isp = isp
    @autonomous_system_number = autonomous_system_number
    @autonomous_system_organization = autonomous_system_organization
    @connection_type = connection_type
    @connection_usage_type = connection_usage_type
    @connection_organization = connection_organization
    @time = time
    @project_id = project_id
    @team_id = team_id
    @hostname = hostname
    @sdk = sdk
    @sdk_version = sdk_version
end

Instance Attribute Details

#actor_emailObject (readonly)

Returns the value of attribute actor_email.



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

def actor_email
  @actor_email
end

#actor_idObject (readonly)

Returns the value of attribute actor_id.



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

def actor_id
  @actor_id
end

#actor_nameObject (readonly)

Returns the value of attribute actor_name.



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

def actor_name
  @actor_name
end

#actor_typeObject (readonly)

Returns the value of attribute actor_type.



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

def actor_type
  @actor_type
end

#autonomous_system_numberObject (readonly)

Returns the value of attribute autonomous_system_number.



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

def autonomous_system_number
  @autonomous_system_number
end

#autonomous_system_organizationObject (readonly)

Returns the value of attribute autonomous_system_organization.



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

def autonomous_system_organization
  @autonomous_system_organization
end

#cityObject (readonly)

Returns the value of attribute city.



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

def city
  @city
end

#connection_organizationObject (readonly)

Returns the value of attribute connection_organization.



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

def connection_organization
  @connection_organization
end

#connection_typeObject (readonly)

Returns the value of attribute connection_type.



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

def connection_type
  @connection_type
end

#connection_usage_typeObject (readonly)

Returns the value of attribute connection_usage_type.



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

def connection_usage_type
  @connection_usage_type
end

#continent_codeObject (readonly)

Returns the value of attribute continent_code.



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

def continent_code
  @continent_code
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

#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.



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

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

#ispObject (readonly)

Returns the value of attribute isp.



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

def isp
  @isp
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

#project_idObject (readonly)

Returns the value of attribute project_id.



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

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

#sdkObject (readonly)

Returns the value of attribute sdk.



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

def sdk
  @sdk
end

#sdk_versionObject (readonly)

Returns the value of attribute sdk_version.



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

def sdk_version
  @sdk_version
end

#subdivisionsObject (readonly)

Returns the value of attribute subdivisions.



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

def subdivisions
  @subdivisions
end

#team_idObject (readonly)

Returns the value of attribute team_id.



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

def team_id
  @team_id
end

#timeObject (readonly)

Returns the value of attribute time.



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

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

Class Method Details

.from(map:) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/appwrite/models/activity_event.rb', line 98

def self.from(map:)
    ActivityEvent.new(
        id: map["$id"],
        actor_type: map["actorType"],
        actor_id: map["actorId"],
        actor_email: map["actorEmail"],
        actor_name: map["actorName"],
        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"],
        continent_code: map["continentCode"],
        city: map["city"],
        subdivisions: map["subdivisions"],
        isp: map["isp"],
        autonomous_system_number: map["autonomousSystemNumber"],
        autonomous_system_organization: map["autonomousSystemOrganization"],
        connection_type: map["connectionType"],
        connection_usage_type: map["connectionUsageType"],
        connection_organization: map["connectionOrganization"],
        time: map["time"],
        project_id: map["projectId"],
        team_id: map["teamId"],
        hostname: map["hostname"],
        sdk: map["sdk"],
        sdk_version: map["sdkVersion"]
    )
end

Instance Method Details

#to_mapObject



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/appwrite/models/activity_event.rb', line 132

def to_map
    {
        "$id": @id,
        "actorType": @actor_type,
        "actorId": @actor_id,
        "actorEmail": @actor_email,
        "actorName": @actor_name,
        "resourceParent": @resource_parent,
        "resourceType": @resource_type,
        "resourceId": @resource_id,
        "resource": @resource,
        "event": @event,
        "userAgent": @user_agent,
        "ip": @ip,
        "mode": @mode,
        "country": @country,
        "continentCode": @continent_code,
        "city": @city,
        "subdivisions": @subdivisions,
        "isp": @isp,
        "autonomousSystemNumber": @autonomous_system_number,
        "autonomousSystemOrganization": @autonomous_system_organization,
        "connectionType": @connection_type,
        "connectionUsageType": @connection_usage_type,
        "connectionOrganization": @connection_organization,
        "time": @time,
        "projectId": @project_id,
        "teamId": @team_id,
        "hostname": @hostname,
        "sdk": @sdk,
        "sdkVersion": @sdk_version
    }
end