Class: Appwrite::Models::Bucket
- Inherits:
-
Object
- Object
- Appwrite::Models::Bucket
- Defined in:
- lib/appwrite/models/bucket.rb
Instance Attribute Summary collapse
-
#allowed_file_extensions ⇒ Object
readonly
Returns the value of attribute allowed_file_extensions.
-
#antivirus ⇒ Object
readonly
Returns the value of attribute antivirus.
-
#compression ⇒ Object
readonly
Returns the value of attribute compression.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#encryption ⇒ Object
readonly
Returns the value of attribute encryption.
-
#file_security ⇒ Object
readonly
Returns the value of attribute file_security.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#maximum_file_size ⇒ Object
readonly
Returns the value of attribute maximum_file_size.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#permissions ⇒ Object
readonly
Returns the value of attribute permissions.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, permissions:, file_security:, name:, enabled:, maximum_file_size:, allowed_file_extensions:, compression:, encryption:, antivirus:) ⇒ Bucket
constructor
A new instance of Bucket.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, permissions:, file_security:, name:, enabled:, maximum_file_size:, allowed_file_extensions:, compression:, encryption:, antivirus:) ⇒ Bucket
Returns a new instance of Bucket.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/appwrite/models/bucket.rb', line 19 def initialize( id:, created_at:, updated_at:, permissions:, file_security:, name:, enabled:, maximum_file_size:, allowed_file_extensions:, compression:, encryption:, antivirus: ) @id = id @created_at = created_at @updated_at = updated_at @permissions = @file_security = file_security @name = name @enabled = enabled @maximum_file_size = maximum_file_size @allowed_file_extensions = allowed_file_extensions @compression = compression @encryption = encryption @antivirus = antivirus end |
Instance Attribute Details
#allowed_file_extensions ⇒ Object (readonly)
Returns the value of attribute allowed_file_extensions.
14 15 16 |
# File 'lib/appwrite/models/bucket.rb', line 14 def allowed_file_extensions @allowed_file_extensions end |
#antivirus ⇒ Object (readonly)
Returns the value of attribute antivirus.
17 18 19 |
# File 'lib/appwrite/models/bucket.rb', line 17 def antivirus @antivirus end |
#compression ⇒ Object (readonly)
Returns the value of attribute compression.
15 16 17 |
# File 'lib/appwrite/models/bucket.rb', line 15 def compression @compression end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/bucket.rb', line 7 def created_at @created_at end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
12 13 14 |
# File 'lib/appwrite/models/bucket.rb', line 12 def enabled @enabled end |
#encryption ⇒ Object (readonly)
Returns the value of attribute encryption.
16 17 18 |
# File 'lib/appwrite/models/bucket.rb', line 16 def encryption @encryption end |
#file_security ⇒ Object (readonly)
Returns the value of attribute file_security.
10 11 12 |
# File 'lib/appwrite/models/bucket.rb', line 10 def file_security @file_security end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/bucket.rb', line 6 def id @id end |
#maximum_file_size ⇒ Object (readonly)
Returns the value of attribute maximum_file_size.
13 14 15 |
# File 'lib/appwrite/models/bucket.rb', line 13 def maximum_file_size @maximum_file_size end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/appwrite/models/bucket.rb', line 11 def name @name end |
#permissions ⇒ Object (readonly)
Returns the value of attribute permissions.
9 10 11 |
# File 'lib/appwrite/models/bucket.rb', line 9 def @permissions end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/bucket.rb', line 8 def updated_at @updated_at end |
Class Method Details
.from(map:) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/appwrite/models/bucket.rb', line 47 def self.from(map:) Bucket.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], permissions: map["$permissions"], file_security: map["fileSecurity"], name: map["name"], enabled: map["enabled"], maximum_file_size: map["maximumFileSize"], allowed_file_extensions: map["allowedFileExtensions"], compression: map["compression"], encryption: map["encryption"], antivirus: map["antivirus"] ) end |
Instance Method Details
#to_map ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/appwrite/models/bucket.rb', line 64 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "$permissions": @permissions, "fileSecurity": @file_security, "name": @name, "enabled": @enabled, "maximumFileSize": @maximum_file_size, "allowedFileExtensions": @allowed_file_extensions, "compression": @compression, "encryption": @encryption, "antivirus": @antivirus } end |