Class: Appwrite::Models::AppScope

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, description:, type:, category:, deprecated:) ⇒ AppScope

Returns a new instance of AppScope.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/appwrite/models/app_scope.rb', line 12

def initialize(
    value:,
    description:,
    type:,
    category:,
    deprecated:
)
    @value = value
    @description = description
    @type = type
    @category = category
    @deprecated = deprecated
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



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

def category
  @category
end

#deprecatedObject (readonly)

Returns the value of attribute deprecated.



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

def deprecated
  @deprecated
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Class Method Details

.from(map:) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'lib/appwrite/models/app_scope.rb', line 26

def self.from(map:)
    AppScope.new(
        value: map["value"],
        description: map["description"],
        type: map["type"],
        category: map["category"],
        deprecated: map["deprecated"]
    )
end

Instance Method Details

#to_mapObject



36
37
38
39
40
41
42
43
44
# File 'lib/appwrite/models/app_scope.rb', line 36

def to_map
    {
        "value": @value,
        "description": @description,
        "type": @type,
        "category": @category,
        "deprecated": @deprecated
    }
end