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



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

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

Instance Attribute Details

#category ⇒ String

Returns Category.

Returns:

  • (String) —

    Category



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

def category
  @category
end

#content ⇒ String

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_id ⇒ String

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_type ⇒ String

Returns:

  • (String)


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

def content_type
  @content_type
end

#created_at ⇒ DateTime

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_at ⇒ String

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

#fully_masked_content ⇒ String

Returns The stored content with every non-whitespace character masked. Present only when recommended_action is not 'keep'. Derived at runtime and never stored.

Returns:

  • (String) —

    The stored content with every non-whitespace character masked. Present only when recommended_action is not 'keep'. Derived at runtime and never stored.



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

def fully_masked_content
  @fully_masked_content
end

#harm_type ⇒ String

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

#id ⇒ String

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

#labels ⇒ Array<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

#language ⇒ String

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_content ⇒ String

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)



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

def masked_content
  @masked_content
end

#policy ⇒ String

Returns:

  • (String)


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

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

#severity ⇒ String

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_id ⇒ String

Returns Customer-supplied user identifier for the content author.

Returns:

  • (String) —

    Customer-supplied user identifier for the content author



59
60
61
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 59

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/getstream_ruby/generated/models/label_result_response.rb', line 83

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',
    fully_masked_content: 'fully_masked_content',
    masked_content: 'masked_content',
    policy: 'policy',
    user_id: 'user_id'
  }
end