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:, 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_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_discovery_url:) ⇒ Project

Returns a new instance of Project.



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
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/appwrite/models/project.rb', line 43

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:,
    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_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_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
    @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_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_discovery_url = o_auth2_server_discovery_url
end

Instance Attribute Details

#auth_methodsObject (readonly)

Returns the value of attribute auth_methods.



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

def auth_methods
  @auth_methods
end

#billing_limitsObject (readonly)

Returns the value of attribute billing_limits.



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

def billing_limits
  @billing_limits
end

#blocksObject (readonly)

Returns the value of attribute blocks.



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

def blocks
  @blocks
end

#console_accessed_atObject (readonly)

Returns the value of attribute console_accessed_at.



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

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.



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

def o_auth2_server_access_token_duration
  @o_auth2_server_access_token_duration
end

#o_auth2_server_authorization_urlObject (readonly)

Returns the value of attribute o_auth2_server_authorization_url.



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

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.



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

def o_auth2_server_confidential_pkce
  @o_auth2_server_confidential_pkce
end

#o_auth2_server_discovery_urlObject (readonly)

Returns the value of attribute o_auth2_server_discovery_url.



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

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.



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

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.



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

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.



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

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.



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

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.



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

def o_auth2_server_scopes
  @o_auth2_server_scopes
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.



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

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.



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

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



119
120
121
122
123
124
125
126
127
128
129
130
131
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
# File 'lib/appwrite/models/project.rb', line 119

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"],
        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: 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_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_discovery_url: map["oAuth2ServerDiscoveryUrl"]
    )
end

Instance Method Details

#to_mapObject



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
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/appwrite/models/project.rb', line 160

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,
        "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,
        "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,
        "oAuth2ServerDiscoveryUrl": @o_auth2_server_discovery_url
    }
end