Class: GetStream::Generated::Models::AnalyzeRequest

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

Initialize with attributes



47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/getstream_ruby/generated/models/analyze_request.rb', line 47

def initialize(attributes = {})
  super(attributes)
  @async_response = attributes[:async_response] || attributes['async_response'] || nil
  @config_key = attributes[:config_key] || attributes['config_key'] || nil
  @content_published_at = attributes[:content_published_at] || attributes['content_published_at'] || nil
  @entity_creator_id = attributes[:entity_creator_id] || attributes['entity_creator_id'] || nil
  @entity_id = attributes[:entity_id] || attributes['entity_id'] || nil
  @entity_type = attributes[:entity_type] || attributes['entity_type'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
  @content_ids = attributes[:content_ids] || attributes['content_ids'] || nil
  @custom = attributes[:custom] || attributes['custom'] || nil
  @texts = attributes[:texts] || attributes['texts'] || nil
  @user = attributes[:user] || attributes['user'] || nil
end

Instance Attribute Details

#async_responseBoolean

Returns When true, the response carries no verdicts (status ‘pending`) and per-modality results arrive via `moderation.text_analysis.complete` and `moderation.image_analysis.complete` webhooks. Image moderation runs on a background worker; text moderation runs synchronously and is then delivered via webhook.

Returns:

  • (Boolean)

    When true, the response carries no verdicts (status ‘pending`) and per-modality results arrive via `moderation.text_analysis.complete` and `moderation.image_analysis.complete` webhooks. Image moderation runs on a background worker; text moderation runs synchronously and is then delivered via webhook.



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

def async_response
  @async_response
end

#config_keyString

Returns Moderation policy key. Optional in stateful mode, required in stateless mode.

Returns:

  • (String)

    Moderation policy key. Optional in stateful mode, required in stateless mode.



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

def config_key
  @config_key
end

#content_idsHash<String, String>

Returns Optional map from a content label (either a ‘texts` key or an `image:<key>` multipart label) to a caller-supplied per-instance identifier. Echoed on per-field verdicts and surfaced in `matched_contents` when an aggregation rule fires.

Returns:

  • (Hash<String, String>)

    Optional map from a content label (either a ‘texts` key or an `image:<key>` multipart label) to a caller-supplied per-instance identifier. Echoed on per-field verdicts and surfaced in `matched_contents` when an aggregation rule fires.



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

def content_ids
  @content_ids
end

#content_published_atDateTime

Returns Original timestamp when the content was produced. Used as the ‘published_at` timestamp on per-content log entries that surface in `matched_contents` on aggregation-rule webhooks.

Returns:

  • (DateTime)

    Original timestamp when the content was produced. Used as the ‘published_at` timestamp on per-content log entries that surface in `matched_contents` on aggregation-rule webhooks.



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

def 
  @content_published_at
end

#customObject

Returns Arbitrary metadata surfaced in the dashboard.

Returns:

  • (Object)

    Arbitrary metadata surfaced in the dashboard.



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

def custom
  @custom
end

#entity_creator_idString

Returns ID of the user who created the content. Required with entity_type + entity_id; omit all three for stateless mode.

Returns:

  • (String)

    ID of the user who created the content. Required with entity_type + entity_id; omit all three for stateless mode.



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

def entity_creator_id
  @entity_creator_id
end

#entity_idString

Returns Caller-supplied content identifier. Required with entity_type + entity_creator_id; omit all three for stateless mode.

Returns:

  • (String)

    Caller-supplied content identifier. Required with entity_type + entity_creator_id; omit all three for stateless mode.



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

def entity_id
  @entity_id
end

#entity_typeString

Returns Caller-defined entity type. Required with entity_id + entity_creator_id; omit all three for stateless mode.

Returns:

  • (String)

    Caller-defined entity type. Required with entity_id + entity_creator_id; omit all three for stateless mode.



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

def entity_type
  @entity_type
end

#textsHash<String, String>

Returns Named text fields to moderate, keyed by caller label (e.g. title, description).

Returns:

  • (Hash<String, String>)

    Named text fields to moderate, keyed by caller label (e.g. title, description).



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

def texts
  @texts
end

#userUserRequest

Returns:



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

def user
  @user
end

#user_idString

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



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

def self.json_field_mappings
  {
    async_response: 'async_response',
    config_key: 'config_key',
    content_published_at: 'content_published_at',
    entity_creator_id: 'entity_creator_id',
    entity_id: 'entity_id',
    entity_type: 'entity_type',
    user_id: 'user_id',
    content_ids: 'content_ids',
    custom: 'custom',
    texts: 'texts',
    user: 'user'
  }
end