Class: GetStream::Generated::Models::Permission
- Defined in:
- lib/getstream_ruby/generated/models/permission.rb
Instance Attribute Summary collapse
-
#action ⇒ String
Action name this permission is for (e.g. SendMessage).
-
#condition ⇒ Object
MongoDB style condition which decides whether or not the permission is granted.
-
#custom ⇒ Boolean
Whether this is a custom permission or built-in.
-
#description ⇒ String
Description of the permission.
-
#id ⇒ String
Unique permission ID.
-
#level ⇒ String
Level at which permission could be applied (app or channel).
-
#name ⇒ String
Name of the permission.
-
#owner ⇒ Boolean
Whether this permission applies to resource owner or not.
-
#same_team ⇒ Boolean
Whether this permission applies to teammates (multi-tenancy mode only).
-
#tags ⇒ Array<String>
List of tags of the permission.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Permission
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ Permission
Initialize with attributes
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 44 def initialize(attributes = {}) super(attributes) @action = attributes[:action] || attributes['action'] @custom = attributes[:custom] || attributes['custom'] @description = attributes[:description] || attributes['description'] @id = attributes[:id] || attributes['id'] @level = attributes[:level] || attributes['level'] @name = attributes[:name] || attributes['name'] @owner = attributes[:owner] || attributes['owner'] @same_team = attributes[:same_team] || attributes['same_team'] = attributes[:tags] || attributes['tags'] @condition = attributes[:condition] || attributes['condition'] || nil end |
Instance Attribute Details
#action ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 14 def action @action end |
#condition ⇒ Object
41 42 43 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 41 def condition @condition end |
#custom ⇒ Boolean
17 18 19 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 17 def custom @custom end |
#description ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 20 def description @description end |
#id ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 23 def id @id end |
#level ⇒ String
26 27 28 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 26 def level @level end |
#name ⇒ String
29 30 31 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 29 def name @name end |
#owner ⇒ Boolean
32 33 34 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 32 def owner @owner end |
#same_team ⇒ Boolean
35 36 37 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 35 def same_team @same_team end |
#tags ⇒ Array<String>
38 39 40 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 38 def end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/getstream_ruby/generated/models/permission.rb', line 59 def self.json_field_mappings { action: 'action', custom: 'custom', description: 'description', id: 'id', level: 'level', name: 'name', owner: 'owner', same_team: 'same_team', tags: 'tags', condition: 'condition' } end |