CampaignRecord class

Constructors

CampaignRecord({String? audience, int? budget, List<ChannelSpec> channels = const [], List<String> content = const [], int? createdAt, String? id, String? name, int? scheduleAt, String? status, int? updatedAt})
Returns a new CampaignRecord instance.

Properties

audience ↔ String?
Audience is an opaque reference to the segment this campaign targets. It is stored and echoed but not yet handed to the executors — a channel targets through the provider account it runs under — so it is documentation for now. Absent when never set.
getter/setter pair
budget ↔ int?
Budget is the campaign's total budget in CENTS, handed to each executor as the budget for its channel. 0 means none was set.
getter/setter pair
channels ↔ List<ChannelSpec>
Channels are the fan-out targets, at most one per kind and at most 12, each carrying its own post-launch state. Empty means nothing to launch, which is what makes a launch of this campaign a 400.
getter/setter pair
content ↔ List<String>
Content is the ordered creative set, at most 32, empty entries dropped. Content0 is the creative that runs; the rest are A/B variants a wired experiment can assign per launch.
getter/setter pair
createdAt ↔ int?
CreatedAt is when the campaign was created, in unix seconds. Server-set.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
id ↔ String?
ID is the campaign's server-minted handle — "cmp_" and 128 random bits — and the id every other campaign call is addressed by. Never read off the wire: a create that sends one has it ignored.
getter/setter pair
name ↔ String?
Name is the campaign's display name. Required on write, trimmed, and capped at 2048 characters.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scheduleAt ↔ int?
ScheduleAt is when the campaign should run, in unix seconds. 0 (absent) means launch immediately. It is passed to each executor; nothing in this service wakes up to launch it for you.
getter/setter pair
status ↔ String?
Status is the lifecycle state, server-owned and never accepted from a caller. Four values actually occur: draft (inert and fully mutable — nothing is sent and no budget is committed), live, paused and failed. After a fan-out live means AT LEAST ONE channel launched — read the channel rows for the rest — and failed means none did.
getter/setter pair
updatedAt ↔ int?
UpdatedAt is the last write in unix seconds — an edit, a launch or a pause. Server-set on every save.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → CampaignRecord?
Returns a new CampaignRecord instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<CampaignRecord>
mapFromJson(dynamic json) → Map<String, CampaignRecord>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<CampaignRecord>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.