Class: GetStream::Generated::Models::Role
- Defined in:
- lib/getstream_ruby/generated/models/role.rb
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
Date/time of creation.
-
#custom ⇒ Boolean
Whether this is a custom role or built-in.
-
#name ⇒ String
Unique role name.
-
#scopes ⇒ Array<String>
List of scopes where this role is currently present.
-
#updated_at ⇒ DateTime
Date/time of the last update.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Role
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ Role
Initialize with attributes
29 30 31 32 33 34 35 36 |
# File 'lib/getstream_ruby/generated/models/role.rb', line 29 def initialize(attributes = {}) super(attributes) @created_at = attributes[:created_at] || attributes['created_at'] @custom = attributes[:custom] || attributes['custom'] @name = attributes[:name] || attributes['name'] @updated_at = attributes[:updated_at] || attributes['updated_at'] @scopes = attributes[:scopes] || attributes['scopes'] end |
Instance Attribute Details
#created_at ⇒ DateTime
14 15 16 |
# File 'lib/getstream_ruby/generated/models/role.rb', line 14 def created_at @created_at end |
#custom ⇒ Boolean
17 18 19 |
# File 'lib/getstream_ruby/generated/models/role.rb', line 17 def custom @custom end |
#name ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/role.rb', line 20 def name @name end |
#scopes ⇒ Array<String>
26 27 28 |
# File 'lib/getstream_ruby/generated/models/role.rb', line 26 def scopes @scopes end |
#updated_at ⇒ DateTime
23 24 25 |
# File 'lib/getstream_ruby/generated/models/role.rb', line 23 def updated_at @updated_at end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
39 40 41 42 43 44 45 46 47 |
# File 'lib/getstream_ruby/generated/models/role.rb', line 39 def self.json_field_mappings { created_at: 'created_at', custom: 'custom', name: 'name', updated_at: 'updated_at', scopes: 'scopes' } end |