Class: GetStream::Generated::Models::LabelsRequest

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

Initialize with attributes



32
33
34
35
36
37
38
39
40
# File 'lib/getstream_ruby/generated/models/labels_request.rb', line 32

def initialize(attributes = {})
  super(attributes)
  @content = attributes[:content] || attributes['content']
  @category = attributes[:category] || attributes['category'] || nil
  @content_id = attributes[:content_id] || attributes['content_id'] || nil
  @content_type = attributes[:content_type] || attributes['content_type'] || nil
  @policy = attributes[:policy] || attributes['policy'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
end

Instance Attribute Details

#categoryString

Returns Optional category for filtering (max 128 chars).

Returns:

  • (String)

    Optional category for filtering (max 128 chars)



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

def category
  @category
end

#contentString

Returns Content to moderate.

Returns:

  • (String)

    Content to moderate



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

def content
  @content
end

#content_idString

Returns Customer-supplied identifier for the moderated content, for tracing.

Returns:

  • (String)

    Customer-supplied identifier for the moderated content, for tracing



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

def content_id
  @content_id
end

#content_typeString

Returns Type of content: ‘text’ (default), ‘message’, or ‘username’. Stored as-sent; only ‘username’ routes to the username moderation API.

Returns:

  • (String)

    Type of content: ‘text’ (default), ‘message’, or ‘username’. Stored as-sent; only ‘username’ routes to the username moderation API.



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

def content_type
  @content_type
end

#policyString

Returns Optional moderation policy key (max 128 chars).

Returns:

  • (String)

    Optional moderation policy key (max 128 chars)



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

def policy
  @policy
end

#user_idString

Returns Optional customer-supplied user identifier for the content author (max 256 chars). Enables filtering stored results by user_id.

Returns:

  • (String)

    Optional customer-supplied user identifier for the content author (max 256 chars). Enables filtering stored results by user_id.



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

def user_id
  @user_id
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/labels_request.rb', line 43

def self.json_field_mappings
  {
    content: 'content',
    category: 'category',
    content_id: 'content_id',
    content_type: 'content_type',
    policy: 'policy',
    user_id: 'user_id'
  }
end