Class: Appwrite::Models::PolicyPasswordStrength

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, min:, uppercase:, lowercase:, number:, symbols:) ⇒ PolicyPasswordStrength

Returns a new instance of PolicyPasswordStrength.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/appwrite/models/policy_password_strength.rb', line 13

def initialize(
    id:,
    min:,
    uppercase:,
    lowercase:,
    number:,
    symbols:
)
    @id = id
    @min = min
    @uppercase = uppercase
    @lowercase = lowercase
    @number = number
    @symbols = symbols
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#lowercaseObject (readonly)

Returns the value of attribute lowercase.



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

def lowercase
  @lowercase
end

#minObject (readonly)

Returns the value of attribute min.



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

def min
  @min
end

#numberObject (readonly)

Returns the value of attribute number.



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

def number
  @number
end

#symbolsObject (readonly)

Returns the value of attribute symbols.



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

def symbols
  @symbols
end

#uppercaseObject (readonly)

Returns the value of attribute uppercase.



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

def uppercase
  @uppercase
end

Class Method Details

.from(map:) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/appwrite/models/policy_password_strength.rb', line 29

def self.from(map:)
    PolicyPasswordStrength.new(
        id: map["$id"],
        min: map["min"],
        uppercase: map["uppercase"],
        lowercase: map["lowercase"],
        number: map["number"],
        symbols: map["symbols"]
    )
end

Instance Method Details

#to_mapObject



40
41
42
43
44
45
46
47
48
49
# File 'lib/appwrite/models/policy_password_strength.rb', line 40

def to_map
    {
        "$id": @id,
        "min": @min,
        "uppercase": @uppercase,
        "lowercase": @lowercase,
        "number": @number,
        "symbols": @symbols
    }
end