Class: Appwrite::Models::PolicyPasswordPwned
- Inherits:
-
Object
- Object
- Appwrite::Models::PolicyPasswordPwned
- Defined in:
- lib/appwrite/models/policy_password_pwned.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#sessions ⇒ Object
readonly
Returns the value of attribute sessions.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, enabled:, sessions:, users:) ⇒ PolicyPasswordPwned
constructor
A new instance of PolicyPasswordPwned.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, enabled:, sessions:, users:) ⇒ PolicyPasswordPwned
Returns a new instance of PolicyPasswordPwned.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/appwrite/models/policy_password_pwned.rb', line 11 def initialize( id:, enabled:, sessions:, users: ) @id = id @enabled = enabled @sessions = sessions @users = users end |
Instance Attribute Details
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
7 8 9 |
# File 'lib/appwrite/models/policy_password_pwned.rb', line 7 def enabled @enabled end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/policy_password_pwned.rb', line 6 def id @id end |
#sessions ⇒ Object (readonly)
Returns the value of attribute sessions.
8 9 10 |
# File 'lib/appwrite/models/policy_password_pwned.rb', line 8 def sessions @sessions end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
9 10 11 |
# File 'lib/appwrite/models/policy_password_pwned.rb', line 9 def users @users end |
Class Method Details
.from(map:) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/appwrite/models/policy_password_pwned.rb', line 23 def self.from(map:) map = { "$id" => "", "enabled" => true, "sessions" => false, "users" => false }.merge(map) PolicyPasswordPwned.new( id: map["$id"], enabled: map["enabled"], sessions: map["sessions"], users: map["users"] ) end |
Instance Method Details
#to_map ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/appwrite/models/policy_password_pwned.rb', line 33 def to_map { "$id": @id, "enabled": @enabled, "sessions": @sessions, "users": @users } end |