Class: Appwrite::Models::Project

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, created_at:, updated_at:, name:, team_id:, region:, dev_keys:, smtp_enabled:, smtp_sender_name:, smtp_sender_email:, smtp_reply_to_name:, smtp_reply_to_email:, smtp_host:, smtp_port:, smtp_username:, smtp_password:, smtp_secure:, ping_count:, pinged_at:, labels:, status:, onboarding:, auth_methods:, services:, protocols:, blocks:, console_accessed_at:, billing_limits:, o_auth2_server_enabled:, o_auth2_server_authorization_url:, o_auth2_server_scopes:, o_auth2_server_default_scopes:, o_auth2_server_authorization_details_types:, o_auth2_server_access_token_duration:, o_auth2_server_refresh_token_duration:, o_auth2_server_public_access_token_duration:, o_auth2_server_public_refresh_token_duration:, o_auth2_server_confidential_pkce:, o_auth2_server_verification_url:, o_auth2_server_user_code_length:, o_auth2_server_user_code_format:, o_auth2_server_device_code_duration:, o_auth2_server_discovery_url:) ⇒ Project

Returns a new instance of Project.



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
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
131
132
133
134
135
136
137
138
# File 'lib/appwrite/models/project.rb', line 50

def initialize(
    id:,
    created_at:,
    updated_at:,
    name:,
    team_id:,
    region:,
    dev_keys:,
    smtp_enabled:,
    smtp_sender_name:,
    smtp_sender_email:,
    smtp_reply_to_name:,
    smtp_reply_to_email:,
    smtp_host:,
    smtp_port:,
    smtp_username:,
    smtp_password:,
    smtp_secure:,
    ping_count:,
    pinged_at:,
    labels:,
    status:,
    onboarding:,
    auth_methods:,
    services:,
    protocols:,
    blocks:,
    console_accessed_at:,
    billing_limits: ,
    o_auth2_server_enabled: ,
    o_auth2_server_authorization_url: ,
    o_auth2_server_scopes: ,
    o_auth2_server_default_scopes: ,
    o_auth2_server_authorization_details_types: ,
    o_auth2_server_access_token_duration: ,
    o_auth2_server_refresh_token_duration: ,
    o_auth2_server_public_access_token_duration: ,
    o_auth2_server_public_refresh_token_duration: ,
    o_auth2_server_confidential_pkce: ,
    o_auth2_server_verification_url: ,
    o_auth2_server_user_code_length: ,
    o_auth2_server_user_code_format: ,
    o_auth2_server_device_code_duration: ,
    o_auth2_server_discovery_url: 
)
    @id = id
    @created_at = created_at
    @updated_at = updated_at
    @name = name
    @team_id = team_id
    @region = region
    @dev_keys = dev_keys
    @smtp_enabled = smtp_enabled
    @smtp_sender_name = smtp_sender_name
    @smtp_sender_email = smtp_sender_email
    @smtp_reply_to_name = smtp_reply_to_name
    @smtp_reply_to_email = smtp_reply_to_email
    @smtp_host = smtp_host
    @smtp_port = smtp_port
    @smtp_username = smtp_username
    @smtp_password = smtp_password
    @smtp_secure = smtp_secure
    @ping_count = ping_count
    @pinged_at = pinged_at
    @labels = labels
    @status = status
    @onboarding = onboarding
    @auth_methods = auth_methods
    @services = services
    @protocols = protocols
    @blocks = blocks
    @console_accessed_at = console_accessed_at
    @billing_limits = billing_limits
    @o_auth2_server_enabled = o_auth2_server_enabled
    @o_auth2_server_authorization_url = o_auth2_server_authorization_url
    @o_auth2_server_scopes = o_auth2_server_scopes
    @o_auth2_server_default_scopes = o_auth2_server_default_scopes
    @o_auth2_server_authorization_details_types = o_auth2_server_authorization_details_types
    @o_auth2_server_access_token_duration = o_auth2_server_access_token_duration
    @o_auth2_server_refresh_token_duration = o_auth2_server_refresh_token_duration
    @o_auth2_server_public_access_token_duration = o_auth2_server_public_access_token_duration
    @o_auth2_server_public_refresh_token_duration = o_auth2_server_public_refresh_token_duration
    @o_auth2_server_confidential_pkce = o_auth2_server_confidential_pkce
    @o_auth2_server_verification_url = o_auth2_server_verification_url
    @o_auth2_server_user_code_length = o_auth2_server_user_code_length
    @o_auth2_server_user_code_format = o_auth2_server_user_code_format
    @o_auth2_server_device_code_duration = o_auth2_server_device_code_duration
    @o_auth2_server_discovery_url = o_auth2_server_discovery_url
end

Instance Attribute Details

#auth_methodsObject (readonly)

Returns the value of attribute auth_methods.



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

def auth_methods
  @auth_methods
end

#billing_limitsObject (readonly)

Returns the value of attribute billing_limits.



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

def billing_limits
  @billing_limits
end

#blocksObject (readonly)

Returns the value of attribute blocks.



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

def blocks
  @blocks
end

#console_accessed_atObject (readonly)

Returns the value of attribute console_accessed_at.



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

def console_accessed_at
  @console_accessed_at
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#dev_keysObject (readonly)

Returns the value of attribute dev_keys.



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

def dev_keys
  @dev_keys
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#labelsObject (readonly)

Returns the value of attribute labels.



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

def labels
  @labels
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#o_auth2_server_access_token_durationObject (readonly)

Returns the value of attribute o_auth2_server_access_token_duration.



39
40
41
# File 'lib/appwrite/models/project.rb', line 39

def o_auth2_server_access_token_duration
  @o_auth2_server_access_token_duration
end

#o_auth2_server_authorization_details_typesObject (readonly)

Returns the value of attribute o_auth2_server_authorization_details_types.



38
39
40
# File 'lib/appwrite/models/project.rb', line 38

def o_auth2_server_authorization_details_types
  @o_auth2_server_authorization_details_types
end

#o_auth2_server_authorization_urlObject (readonly)

Returns the value of attribute o_auth2_server_authorization_url.



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

def o_auth2_server_authorization_url
  @o_auth2_server_authorization_url
end

#o_auth2_server_confidential_pkceObject (readonly)

Returns the value of attribute o_auth2_server_confidential_pkce.



43
44
45
# File 'lib/appwrite/models/project.rb', line 43

def o_auth2_server_confidential_pkce
  @o_auth2_server_confidential_pkce
end

#o_auth2_server_default_scopesObject (readonly)

Returns the value of attribute o_auth2_server_default_scopes.



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

def o_auth2_server_default_scopes
  @o_auth2_server_default_scopes
end

#o_auth2_server_device_code_durationObject (readonly)

Returns the value of attribute o_auth2_server_device_code_duration.



47
48
49
# File 'lib/appwrite/models/project.rb', line 47

def o_auth2_server_device_code_duration
  @o_auth2_server_device_code_duration
end

#o_auth2_server_discovery_urlObject (readonly)

Returns the value of attribute o_auth2_server_discovery_url.



48
49
50
# File 'lib/appwrite/models/project.rb', line 48

def o_auth2_server_discovery_url
  @o_auth2_server_discovery_url
end

#o_auth2_server_enabledObject (readonly)

Returns the value of attribute o_auth2_server_enabled.



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

def o_auth2_server_enabled
  @o_auth2_server_enabled
end

#o_auth2_server_public_access_token_durationObject (readonly)

Returns the value of attribute o_auth2_server_public_access_token_duration.



41
42
43
# File 'lib/appwrite/models/project.rb', line 41

def o_auth2_server_public_access_token_duration
  @o_auth2_server_public_access_token_duration
end

#o_auth2_server_public_refresh_token_durationObject (readonly)

Returns the value of attribute o_auth2_server_public_refresh_token_duration.



42
43
44
# File 'lib/appwrite/models/project.rb', line 42

def o_auth2_server_public_refresh_token_duration
  @o_auth2_server_public_refresh_token_duration
end

#o_auth2_server_refresh_token_durationObject (readonly)

Returns the value of attribute o_auth2_server_refresh_token_duration.



40
41
42
# File 'lib/appwrite/models/project.rb', line 40

def o_auth2_server_refresh_token_duration
  @o_auth2_server_refresh_token_duration
end

#o_auth2_server_scopesObject (readonly)

Returns the value of attribute o_auth2_server_scopes.



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

def o_auth2_server_scopes
  @o_auth2_server_scopes
end

#o_auth2_server_user_code_formatObject (readonly)

Returns the value of attribute o_auth2_server_user_code_format.



46
47
48
# File 'lib/appwrite/models/project.rb', line 46

def o_auth2_server_user_code_format
  @o_auth2_server_user_code_format
end

#o_auth2_server_user_code_lengthObject (readonly)

Returns the value of attribute o_auth2_server_user_code_length.



45
46
47
# File 'lib/appwrite/models/project.rb', line 45

def o_auth2_server_user_code_length
  @o_auth2_server_user_code_length
end

#o_auth2_server_verification_urlObject (readonly)

Returns the value of attribute o_auth2_server_verification_url.



44
45
46
# File 'lib/appwrite/models/project.rb', line 44

def o_auth2_server_verification_url
  @o_auth2_server_verification_url
end

#onboardingObject (readonly)

Returns the value of attribute onboarding.



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

def onboarding
  @onboarding
end

#ping_countObject (readonly)

Returns the value of attribute ping_count.



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

def ping_count
  @ping_count
end

#pinged_atObject (readonly)

Returns the value of attribute pinged_at.



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

def pinged_at
  @pinged_at
end

#protocolsObject (readonly)

Returns the value of attribute protocols.



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

def protocols
  @protocols
end

#regionObject (readonly)

Returns the value of attribute region.



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

def region
  @region
end

#servicesObject (readonly)

Returns the value of attribute services.



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

def services
  @services
end

#smtp_enabledObject (readonly)

Returns the value of attribute smtp_enabled.



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

def smtp_enabled
  @smtp_enabled
end

#smtp_hostObject (readonly)

Returns the value of attribute smtp_host.



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

def smtp_host
  @smtp_host
end

#smtp_passwordObject (readonly)

Returns the value of attribute smtp_password.



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

def smtp_password
  @smtp_password
end

#smtp_portObject (readonly)

Returns the value of attribute smtp_port.



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

def smtp_port
  @smtp_port
end

#smtp_reply_to_emailObject (readonly)

Returns the value of attribute smtp_reply_to_email.



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

def smtp_reply_to_email
  @smtp_reply_to_email
end

#smtp_reply_to_nameObject (readonly)

Returns the value of attribute smtp_reply_to_name.



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

def smtp_reply_to_name
  @smtp_reply_to_name
end

#smtp_secureObject (readonly)

Returns the value of attribute smtp_secure.



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

def smtp_secure
  @smtp_secure
end

#smtp_sender_emailObject (readonly)

Returns the value of attribute smtp_sender_email.



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

def smtp_sender_email
  @smtp_sender_email
end

#smtp_sender_nameObject (readonly)

Returns the value of attribute smtp_sender_name.



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

def smtp_sender_name
  @smtp_sender_name
end

#smtp_usernameObject (readonly)

Returns the value of attribute smtp_username.



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

def smtp_username
  @smtp_username
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

#team_idObject (readonly)

Returns the value of attribute team_id.



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

def team_id
  @team_id
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

Class Method Details

.from(map:) ⇒ Object



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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/appwrite/models/project.rb', line 140

def self.from(map:)
    Project.new(
        id: map["$id"],
        created_at: map["$createdAt"],
        updated_at: map["$updatedAt"],
        name: map["name"],
        team_id: map["teamId"],
        region: map["region"],
        dev_keys: map["devKeys"].map { |it| DevKey.from(map: it) },
        smtp_enabled: map["smtpEnabled"],
        smtp_sender_name: map["smtpSenderName"],
        smtp_sender_email: map["smtpSenderEmail"],
        smtp_reply_to_name: map["smtpReplyToName"],
        smtp_reply_to_email: map["smtpReplyToEmail"],
        smtp_host: map["smtpHost"],
        smtp_port: map["smtpPort"],
        smtp_username: map["smtpUsername"],
        smtp_password: map["smtpPassword"],
        smtp_secure: map["smtpSecure"],
        ping_count: map["pingCount"],
        pinged_at: map["pingedAt"],
        labels: map["labels"],
        status: map["status"],
        onboarding: map["onboarding"],
        auth_methods: map["authMethods"].map { |it| ProjectAuthMethod.from(map: it) },
        services: map["services"].map { |it| ProjectService.from(map: it) },
        protocols: map["protocols"].map { |it| ProjectProtocol.from(map: it) },
        blocks: map["blocks"].map { |it| Block.from(map: it) },
        console_accessed_at: map["consoleAccessedAt"],
        billing_limits: map["billingLimits"].nil? ? nil : BillingLimits.from(map: map["billingLimits"]),
        o_auth2_server_enabled: map["oAuth2ServerEnabled"],
        o_auth2_server_authorization_url: map["oAuth2ServerAuthorizationUrl"],
        o_auth2_server_scopes: map["oAuth2ServerScopes"],
        o_auth2_server_default_scopes: map["oAuth2ServerDefaultScopes"],
        o_auth2_server_authorization_details_types: map["oAuth2ServerAuthorizationDetailsTypes"],
        o_auth2_server_access_token_duration: map["oAuth2ServerAccessTokenDuration"],
        o_auth2_server_refresh_token_duration: map["oAuth2ServerRefreshTokenDuration"],
        o_auth2_server_public_access_token_duration: map["oAuth2ServerPublicAccessTokenDuration"],
        o_auth2_server_public_refresh_token_duration: map["oAuth2ServerPublicRefreshTokenDuration"],
        o_auth2_server_confidential_pkce: map["oAuth2ServerConfidentialPkce"],
        o_auth2_server_verification_url: map["oAuth2ServerVerificationUrl"],
        o_auth2_server_user_code_length: map["oAuth2ServerUserCodeLength"],
        o_auth2_server_user_code_format: map["oAuth2ServerUserCodeFormat"],
        o_auth2_server_device_code_duration: map["oAuth2ServerDeviceCodeDuration"],
        o_auth2_server_discovery_url: map["oAuth2ServerDiscoveryUrl"]
    )
end

Instance Method Details

#to_mapObject



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/appwrite/models/project.rb', line 188

def to_map
    {
        "$id": @id,
        "$createdAt": @created_at,
        "$updatedAt": @updated_at,
        "name": @name,
        "teamId": @team_id,
        "region": @region,
        "devKeys": @dev_keys.map { |it| it.to_map },
        "smtpEnabled": @smtp_enabled,
        "smtpSenderName": @smtp_sender_name,
        "smtpSenderEmail": @smtp_sender_email,
        "smtpReplyToName": @smtp_reply_to_name,
        "smtpReplyToEmail": @smtp_reply_to_email,
        "smtpHost": @smtp_host,
        "smtpPort": @smtp_port,
        "smtpUsername": @smtp_username,
        "smtpPassword": @smtp_password,
        "smtpSecure": @smtp_secure,
        "pingCount": @ping_count,
        "pingedAt": @pinged_at,
        "labels": @labels,
        "status": @status,
        "onboarding": @onboarding,
        "authMethods": @auth_methods.map { |it| it.to_map },
        "services": @services.map { |it| it.to_map },
        "protocols": @protocols.map { |it| it.to_map },
        "blocks": @blocks.map { |it| it.to_map },
        "consoleAccessedAt": @console_accessed_at,
        "billingLimits": @billing_limits&.to_map,
        "oAuth2ServerEnabled": @o_auth2_server_enabled,
        "oAuth2ServerAuthorizationUrl": @o_auth2_server_authorization_url,
        "oAuth2ServerScopes": @o_auth2_server_scopes,
        "oAuth2ServerDefaultScopes": @o_auth2_server_default_scopes,
        "oAuth2ServerAuthorizationDetailsTypes": @o_auth2_server_authorization_details_types,
        "oAuth2ServerAccessTokenDuration": @o_auth2_server_access_token_duration,
        "oAuth2ServerRefreshTokenDuration": @o_auth2_server_refresh_token_duration,
        "oAuth2ServerPublicAccessTokenDuration": @o_auth2_server_public_access_token_duration,
        "oAuth2ServerPublicRefreshTokenDuration": @o_auth2_server_public_refresh_token_duration,
        "oAuth2ServerConfidentialPkce": @o_auth2_server_confidential_pkce,
        "oAuth2ServerVerificationUrl": @o_auth2_server_verification_url,
        "oAuth2ServerUserCodeLength": @o_auth2_server_user_code_length,
        "oAuth2ServerUserCodeFormat": @o_auth2_server_user_code_format,
        "oAuth2ServerDeviceCodeDuration": @o_auth2_server_device_code_duration,
        "oAuth2ServerDiscoveryUrl": @o_auth2_server_discovery_url
    }
end