Class: GetStream::Generated::Models::Policy

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/policy.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ Policy

Initialize with attributes



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/getstream_ruby/generated/models/policy.rb', line 38

def initialize(attributes = {})
  super(attributes)
  @action = attributes[:action] || attributes['action']
  @created_at = attributes[:created_at] || attributes['created_at']
  @name = attributes[:name] || attributes['name']
  @owner = attributes[:owner] || attributes['owner']
  @priority = attributes[:priority] || attributes['priority']
  @updated_at = attributes[:updated_at] || attributes['updated_at']
  @resources = attributes[:resources] || attributes['resources']
  @roles = attributes[:roles] || attributes['roles']
end

Instance Attribute Details

#actionInteger



14
15
16
# File 'lib/getstream_ruby/generated/models/policy.rb', line 14

def action
  @action
end

#created_atDateTime



17
18
19
# File 'lib/getstream_ruby/generated/models/policy.rb', line 17

def created_at
  @created_at
end

#nameString



20
21
22
# File 'lib/getstream_ruby/generated/models/policy.rb', line 20

def name
  @name
end

#ownerBoolean



23
24
25
# File 'lib/getstream_ruby/generated/models/policy.rb', line 23

def owner
  @owner
end

#priorityInteger



26
27
28
# File 'lib/getstream_ruby/generated/models/policy.rb', line 26

def priority
  @priority
end

#resourcesArray<String>



32
33
34
# File 'lib/getstream_ruby/generated/models/policy.rb', line 32

def resources
  @resources
end

#rolesArray<String>



35
36
37
# File 'lib/getstream_ruby/generated/models/policy.rb', line 35

def roles
  @roles
end

#updated_atDateTime



29
30
31
# File 'lib/getstream_ruby/generated/models/policy.rb', line 29

def updated_at
  @updated_at
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/getstream_ruby/generated/models/policy.rb', line 51

def self.json_field_mappings
  {
    action: 'action',
    created_at: 'created_at',
    name: 'name',
    owner: 'owner',
    priority: 'priority',
    updated_at: 'updated_at',
    resources: 'resources',
    roles: 'roles'
  }
end