Class: GetStream::Generated::Models::LabelResultResponse

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

Initialize with attributes



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 59

def initialize(attributes = {})
  super(attributes)
  @category = attributes[:category] || attributes['category']
  @content = attributes[:content] || attributes['content']
  @content_type = attributes[:content_type] || attributes['content_type']
  @created_at = attributes[:created_at] || attributes['created_at']
  @harm_type = attributes[:harm_type] || attributes['harm_type']
  @id = attributes[:id] || attributes['id']
  @language = attributes[:language] || attributes['language']
  @recommended_action = attributes[:recommended_action] || attributes['recommended_action']
  @severity = attributes[:severity] || attributes['severity']
  @labels = attributes[:labels] || attributes['labels']
  @content_id = attributes[:content_id] || attributes['content_id'] || nil
  @directed_at = attributes[:directed_at] || attributes['directed_at'] || nil
  @masked_content = attributes[:masked_content] || attributes['masked_content'] || nil
  @policy = attributes[:policy] || attributes['policy'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
end

Instance Attribute Details

#categoryString

Returns Category.

Returns:

  • (String)

    Category



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

def category
  @category
end

#contentString

Returns The moderated content.

Returns:

  • (String)

    The moderated content



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

def content
  @content
end

#content_idString

Returns Customer-supplied identifier for the moderated content.

Returns:

  • (String)

    Customer-supplied identifier for the moderated content



44
45
46
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 44

def content_id
  @content_id
end

#content_typeString

Returns:

  • (String)


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

def content_type
  @content_type
end

#created_atDateTime

Returns Timestamp.

Returns:

  • (DateTime)

    Timestamp



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

def created_at
  @created_at
end

#directed_atString

Returns Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.).

Returns:

  • (String)

    Who the content is directed at (USER, GROUP, EVERYONE, NONE, etc.)



47
48
49
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 47

def directed_at
  @directed_at
end

#harm_typeString

Returns High-level harm category.

Returns:

  • (String)

    High-level harm category



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

def harm_type
  @harm_type
end

#idString

Returns Unique identifier.

Returns:

  • (String)

    Unique identifier



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

def id
  @id
end

#labelsArray<String>

Returns Moderation labels.

Returns:

  • (Array<String>)

    Moderation labels



41
42
43
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 41

def labels
  @labels
end

#languageString

Returns Detected language.

Returns:

  • (String)

    Detected language



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

def language
  @language
end

#masked_contentString

Returns Content with blocklisted tokens masked (when a blocklist rule with action=mask rewrote the original).

Returns:

  • (String)

    Content with blocklisted tokens masked (when a blocklist rule with action=mask rewrote the original)



50
51
52
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 50

def masked_content
  @masked_content
end

#policyString

Returns:

  • (String)


53
54
55
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 53

def policy
  @policy
end

Returns Provider recommended action.

Returns:

  • (String)

    Provider recommended action



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

def recommended_action
  @recommended_action
end

#severityString

Returns Severity level.

Returns:

  • (String)

    Severity level



38
39
40
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 38

def severity
  @severity
end

#user_idString

Returns Customer-supplied user identifier for the content author.

Returns:

  • (String)

    Customer-supplied user identifier for the content author



56
57
58
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 56

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 79

def self.json_field_mappings
  {
    category: 'category',
    content: 'content',
    content_type: 'content_type',
    created_at: 'created_at',
    harm_type: 'harm_type',
    id: 'id',
    language: 'language',
    recommended_action: 'recommended_action',
    severity: 'severity',
    labels: 'labels',
    content_id: 'content_id',
    directed_at: 'directed_at',
    masked_content: 'masked_content',
    policy: 'policy',
    user_id: 'user_id'
  }
end