Class GetCampaignResponse
Get Campaign response
Inherited Members
Namespace: Unity.Services.Apis.Admin.RemoteConfig
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "GetCampaignResponse")]
[Preserve]
public class GetCampaignResponse
Constructors
GetCampaignResponse(string, List<CampaignVariants>, bool, int, int, DateTime, DateTime, List<string>, List<string>, string)
Initializes a new instance of the GetCampaignResponse class.
Declaration
[Preserve]
public GetCampaignResponse(string name = null, List<CampaignVariants> variants = null, bool enabled = false, int rolloutPercentage = 100, int priority = 1000, DateTime startDate = default, DateTime endDate = default, List<string> kpi = null, List<string> audience = null, string description = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | name. |
| List<CampaignVariants> | variants | variants. |
| bool | enabled | enabled (default to false). |
| int | rolloutPercentage | The percentage of your user base that will adhere to this game override. For values less than 100, Unity randomly assigns the game override to that percent of your players on a user ID basis. While experiences may differ from player to player, players will have a consistent experience each session. (default to 100). |
| int | priority | Integer between 0 (highest priority) and 1000 (lowest priority). In the event of a conflict, priority is awarded to the game overrides that was created first. (default to 1000). |
| DateTime | startDate | Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Lower bound for when enabled game overrides will go into effect.. |
| DateTime | endDate | Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Upper bound for when enabled game overrides will cease to be active.. |
| List<string> | kpi | List of key performing indicators. |
| List<string> | audience | A list of audience whom you want to target your campaign. |
| string | description | description. |
Properties
Audience
A list of audience whom you want to target your campaign
Declaration
[DataMember(Name = "audience", EmitDefaultValue = false)]
[Preserve]
public List<string> Audience { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | A list of audience whom you want to target your campaign |
Condition
The Condition is a JEXL expression of contextual data attributes that defines the target audience for a game override. ### JEXL support - JexlExpression from the Java Expression Language (JEXL) spec. - JexlScripts are not supported. ### Categories Remote Config supports the following attribute categories. Category | Description - -- -- -- - | - -- -- -- -- -- user | Custom developer-defined attributes that describe the user. app | Custom developer-defined attributes that describe the application. unity | Predefined attributes (detailed below). #### Custom User ID When you call SetCustomUserId in our C# APIs, this automatically exposes the ID you pass in to the user attributes. Example from C#: ConfigManager.SetCustomUserID(\"some-user-id\"); Allows you to create a game override condition like: user.customUserId == \"some-user-id\" #### Predefined unity attributes Attribute | Type | Description | Example - -- -- -- -- | - -- - | - -- -- -- -- -- | - -- -- -- appBuildVersion | String | The build number your application is running. | \"1\" appVersion | String | The version your application is running. | \"1.0\" cpu | String | The name of the CPU processor. | \"Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz\" cpuFrequency | Int | The processor frequency in MHz of the device running your app. | 3100 country | String | The applicable country. This attribute uses ISO 3166-1 alpha2 country codes. | \"US\" language | String | The applicable language. This attribute uses ISO 639-1 language codes. | \"en\" osVersion | String | The operating system version of the device running your app. | \"Mac OS X 10.14.3\" platform | String | The applicable device or platform (see below). | \"iOS\" timeSinceStart | Int | The time in milliseconds since a session of your app has begun. | 2473741 graphicsDeviceVendor | String | Vendor of the user's graphics card. | \"ATI Technologies Inc.\" ram | Int | Amount of RAM in MB on the device. | 16384 #### Supported platforms - Android - iOS - Linux - macOS - Metro - SamsungTV - Switch - Tizen - tvOS - WebGL - Wii - Windows
Declaration
[DataMember(Name = "condition", EmitDefaultValue = false)]
[Preserve]
public string Condition { get; }
Property Value
| Type | Description |
|---|---|
| string | The Condition is a JEXL expression of contextual data attributes that defines the target audience for a game override. ### JEXL support - |
CreatedAt
Gets or Sets CreatedAt
Declaration
[DataMember(Name = "createdAt", EmitDefaultValue = false)]
[Preserve]
public DateTime CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Description
Gets or Sets Description
Declaration
[DataMember(Name = "description", EmitDefaultValue = false)]
[Preserve]
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Enabled
Gets or Sets Enabled
Declaration
[DataMember(Name = "enabled", EmitDefaultValue = true)]
[Preserve]
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
EndDate
Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Upper bound for when enabled game overrides will cease to be active.
Declaration
[DataMember(Name = "endDate", EmitDefaultValue = false)]
[Preserve]
public DateTime EndDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime | Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Upper bound for when enabled game overrides will cease to be active. |
EnvironmentId
Gets or Sets EnvironmentId
Declaration
[DataMember(Name = "environmentId", EmitDefaultValue = false)]
[Preserve]
public string EnvironmentId { get; }
Property Value
| Type | Description |
|---|---|
| string |
Id
Gets or Sets Id
Declaration
[DataMember(Name = "id", EmitDefaultValue = false)]
[Preserve]
public string Id { get; }
Property Value
| Type | Description |
|---|---|
| string |
Kpi
List of key performing indicators
Declaration
[DataMember(Name = "kpi", EmitDefaultValue = false)]
[Preserve]
public List<string> Kpi { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | List of key performing indicators |
Name
Gets or Sets Name
Declaration
[DataMember(Name = "name", EmitDefaultValue = false)]
[Preserve]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Priority
Integer between 0 (highest priority) and 1000 (lowest priority). In the event of a conflict, priority is awarded to the game overrides that was created first.
Declaration
[DataMember(Name = "priority", EmitDefaultValue = false)]
[Preserve]
public int Priority { get; set; }
Property Value
| Type | Description |
|---|---|
| int | Integer between 0 (highest priority) and 1000 (lowest priority). In the event of a conflict, priority is awarded to the game overrides that was created first. |
ProjectId
Gets or Sets ProjectId
Declaration
[DataMember(Name = "projectId", EmitDefaultValue = false)]
[Preserve]
public string ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| string |
RolloutPercentage
The percentage of your user base that will adhere to this game override. For values less than 100, Unity randomly assigns the game override to that percent of your players on a user ID basis. While experiences may differ from player to player, players will have a consistent experience each session.
Declaration
[DataMember(Name = "rolloutPercentage", EmitDefaultValue = false)]
[Preserve]
public int RolloutPercentage { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The percentage of your user base that will adhere to this game override. For values less than 100, Unity randomly assigns the game override to that percent of your players on a user ID basis. While experiences may differ from player to player, players will have a consistent experience each session. |
StartDate
Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Lower bound for when enabled game overrides will go into effect.
Declaration
[DataMember(Name = "startDate", EmitDefaultValue = false)]
[Preserve]
public DateTime StartDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime | Timestamp in ISO 8601 UTC format (YYYY-MM-DDThh:mm:ssZ). Lower bound for when enabled game overrides will go into effect. |
UpdatedAt
Gets or Sets UpdatedAt
Declaration
[DataMember(Name = "updatedAt", EmitDefaultValue = false)]
[Preserve]
public DateTime UpdatedAt { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
Variants
Gets or Sets Variants
Declaration
[DataMember(Name = "variants", EmitDefaultValue = false)]
[Preserve]
public List<CampaignVariants> Variants { get; set; }
Property Value
| Type | Description |
|---|---|
| List<CampaignVariants> |
Methods
ShouldSerializeCondition()
Returns false as Condition should not be serialized given that it's read-only.
Declaration
public bool ShouldSerializeCondition()
Returns
| Type | Description |
|---|---|
| bool | false (boolean) |
ShouldSerializeCreatedAt()
Returns false as CreatedAt should not be serialized given that it's read-only.
Declaration
public bool ShouldSerializeCreatedAt()
Returns
| Type | Description |
|---|---|
| bool | false (boolean) |
ShouldSerializeEnvironmentId()
Returns false as EnvironmentId should not be serialized given that it's read-only.
Declaration
public bool ShouldSerializeEnvironmentId()
Returns
| Type | Description |
|---|---|
| bool | false (boolean) |
ShouldSerializeId()
Returns false as Id should not be serialized given that it's read-only.
Declaration
public bool ShouldSerializeId()
Returns
| Type | Description |
|---|---|
| bool | false (boolean) |
ShouldSerializeProjectId()
Returns false as ProjectId should not be serialized given that it's read-only.
Declaration
public bool ShouldSerializeProjectId()
Returns
| Type | Description |
|---|---|
| bool | false (boolean) |
ShouldSerializeUpdatedAt()
Returns false as UpdatedAt should not be serialized given that it's read-only.
Declaration
public bool ShouldSerializeUpdatedAt()
Returns
| Type | Description |
|---|---|
| bool | false (boolean) |