Class: GetStream::Generated::Models::CreatePolicyTestSetRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/create_policy_test_set_request.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 = {}) ⇒ 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_keyString

Returns Moderation config key (default: app default).

Returns:

  • (String)

    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

#modeString

Returns Execution target: 'check' or 'labels'. Optional — defaults to 'labels' when the org has the labels API enabled, 'check' otherwise.

Returns:

  • (String)

    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

#nameString

Returns Display name; unique within an app.

Returns:

  • (String)

    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

#rowsArray<PolicyTestRow>

Returns Messages to test; capped at 1000. Mutually exclusive with seed.

Returns:

  • (Array<PolicyTestRow>)

    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

#seedPolicyTestSeedSpec

Returns:



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

def seed
  @seed
end

#teamString

Returns Team scope for the config (optional).

Returns:

  • (String)

    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_mappingsObject

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