Class: GetStream::Generated::Models::PolicyRequest
- Defined in:
- lib/getstream_ruby/generated/models/policy_request.rb
Overview
Policy request
Instance Attribute Summary collapse
- #action ⇒ String
-
#name ⇒ String
User-friendly policy name.
-
#owner ⇒ Boolean
Whether policy applies to resource owner or not.
-
#priority ⇒ Integer
Policy priority.
-
#resources ⇒ Array<String>
List of resources to apply policy to.
-
#roles ⇒ Array<String>
List of roles to apply policy to.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PolicyRequest
constructor
Initialize with attributes.
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
#action ⇒ String
14 15 16 |
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 14 def action @action end |
#name ⇒ String
Returns User-friendly policy name.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 17 def name @name end |
#owner ⇒ Boolean
Returns Whether policy applies to resource owner or not.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 20 def owner @owner end |
#priority ⇒ Integer
Returns Policy priority.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 23 def priority @priority end |
#resources ⇒ Array<String>
Returns List of resources to apply policy to.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 26 def resources @resources end |
#roles ⇒ Array<String>
Returns List of roles to apply policy to.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/policy_request.rb', line 29 def roles @roles end |
Class Method Details
.json_field_mappings ⇒ Object
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 |