class Appwrite::Models::Bucket

Attributes

allowed_file_extensions[R]
antivirus[R]
date_created[R]
date_updated[R]
enabled[R]
encryption[R]
id[R]
maximum_file_size[R]
name[R]
permission[R]
read[R]
write[R]

Public Class Methods

from(map:) click to toggle source
# File lib/appwrite/models/bucket.rb, line 47
def self.from(map:)
    Bucket.new(
        id: map["$id"],
        read: map["$read"],
        write: map["$write"],
        permission: map["permission"],
        date_created: map["dateCreated"],
        date_updated: map["dateUpdated"],
        name: map["name"],
        enabled: map["enabled"],
        maximum_file_size: map["maximumFileSize"],
        allowed_file_extensions: map["allowedFileExtensions"],
        encryption: map["encryption"],
        antivirus: map["antivirus"]
    )
end
new( id:, read:, write:, permission:, date_created:, date_updated:, name:, enabled:, maximum_file_size:, allowed_file_extensions:, encryption:, antivirus: ) click to toggle source
# File lib/appwrite/models/bucket.rb, line 19
def initialize(
    id:,
    read:,
    write:,
    permission:,
    date_created:,
    date_updated:,
    name:,
    enabled:,
    maximum_file_size:,
    allowed_file_extensions:,
    encryption:,
    antivirus:
)
    @id = id
    @read = read
    @write = write
    @permission = permission
    @date_created = date_created
    @date_updated = date_updated
    @name = name
    @enabled = enabled
    @maximum_file_size = maximum_file_size
    @allowed_file_extensions = allowed_file_extensions
    @encryption = encryption
    @antivirus = antivirus
end

Public Instance Methods

to_map() click to toggle source
# File lib/appwrite/models/bucket.rb, line 64
def to_map
    {
        "$id": @id,
        "$read": @read,
        "$write": @write,
        "permission": @permission,
        "dateCreated": @date_created,
        "dateUpdated": @date_updated,
        "name": @name,
        "enabled": @enabled,
        "maximumFileSize": @maximum_file_size,
        "allowedFileExtensions": @allowed_file_extensions,
        "encryption": @encryption,
        "antivirus": @antivirus
    }
end