Class: GetStream::Generated::Models::PolicyRequest

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

Overview

Policy request

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 = {}) ⇒ PolicyRequest

Initialize with attributes



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 32

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

Instance Attribute Details

#actionString



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

def action
  @action
end

#nameString



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

def name
  @name
end

#ownerBoolean



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

def owner
  @owner
end

#priorityInteger



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

def priority
  @priority
end

#resourcesArray<String>



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

def resources
  @resources
end

#rolesArray<String>



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

def roles
  @roles
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



43
44
45
46
47
48
49
50
51
52
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 43

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