Repository navigation
Expand file tree
/
Copy pathAnalyzeRequest.php
More file actions
28 lines (25 loc) · 2.57 KB
/
Copy pathAnalyzeRequest.php
File metadata and controls
28 lines (25 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
declare(strict_types=1);
namespace GetStream\GeneratedModels;
class AnalyzeRequest extends BaseModel
{
public function __construct(
public ?string $entityType = null, // Caller-defined entity type. Required with entity_id + entity_creator_id; omit all three for stateless mode.
public ?string $entityID = null, // Caller-supplied content identifier. Required with entity_type + entity_creator_id; omit all three for stateless mode.
public ?string $entityCreatorID = null, // ID of the user who created the content. Required with entity_type + entity_id; omit all three for stateless mode.
public ?string $configKey = null, // Moderation policy key. Optional in stateful mode, required in stateless mode.
public ?array $texts = null, // Named text fields to moderate, keyed by caller label (e.g. title, description).
public ?object $custom = null, // Arbitrary metadata surfaced in the dashboard.
public ?\DateTime $contentPublishedAt = null, // 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.
public ?array $contentIds = null, // 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.
public ?bool $asyncResponse = null, // 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.
/** @deprecated */
public ?string $countryCode = null, // ISO 3166-1 alpha-2 country the content is aimed at (e.g. US, DE). Ignored when country_codes is set, but an invalid value is still rejected with 400.
public ?string $userID = null,
public ?UserRequest $user = null, // User request object
public ?array $countryCodes = null, // ISO 3166-1 alpha-2 countries the content is aimed at (e.g. US, DE), up to 300. The first is the primary country. Every country is sent to the AI text and image harm detection engines as country context. Takes precedence over country_code.
) {
}
// BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types!
// Use #[JsonKey('user_id')] to override field names if needed.
}