Class: GetStream::Generated::Models::CreatePolicyTestSetRequest
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::CreatePolicyTestSetRequest
- Defined in:
- lib/getstream_ruby/generated/models/create_policy_test_set_request.rb
Instance Attribute Summary collapse
-
#config_key ⇒ String
Moderation config key (default: app default).
-
#mode ⇒ String
Execution target: 'check' or 'labels'.
-
#name ⇒ String
Display name; unique within an app.
-
#rows ⇒ Array<PolicyTestRow>
Messages to test; capped at 1000.
- #seed ⇒ PolicyTestSeedSpec
-
#team ⇒ String
Team scope for the config (optional).
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ CreatePolicyTestSetRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ CreatePolicyTestSetRequest
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/create_policy_test_set_request.rb', line 32 def initialize(attributes = {}) super(attributes) @name = attributes[:name] || attributes['name'] @config_key = attributes[:config_key] || attributes['config_key'] || nil @mode = attributes[:mode] || attributes['mode'] || nil @team = attributes[:team] || attributes['team'] || nil @rows = attributes[:rows] || attributes['rows'] || nil @seed = attributes[:seed] || attributes['seed'] || nil end |
Instance Attribute Details
#config_key ⇒ String
Returns Moderation config key (default: app default).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/create_policy_test_set_request.rb', line 17 def config_key @config_key end |
#mode ⇒ String
Returns Execution target: 'check' or 'labels'. Optional — defaults to 'labels' when the org has the labels API enabled, 'check' otherwise.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/create_policy_test_set_request.rb', line 20 def mode @mode end |
#name ⇒ String
Returns Display name; unique within an app.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/create_policy_test_set_request.rb', line 14 def name @name end |
#rows ⇒ Array<PolicyTestRow>
Returns Messages to test; capped at 1000. Mutually exclusive with seed.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/create_policy_test_set_request.rb', line 26 def rows @rows end |
#seed ⇒ PolicyTestSeedSpec
29 30 31 |
# File 'lib/getstream_ruby/generated/models/create_policy_test_set_request.rb', line 29 def seed @seed end |
#team ⇒ String
Returns Team scope for the config (optional).
23 24 25 |
# File 'lib/getstream_ruby/generated/models/create_policy_test_set_request.rb', line 23 def team @team 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/create_policy_test_set_request.rb', line 43 def self.json_field_mappings { name: 'name', config_key: 'config_key', mode: 'mode', team: 'team', rows: 'rows', seed: 'seed' } end |