/// <summary>
 /// Initializes a new instance of the <see cref="CampaignResource" /> class.
 /// </summary>
 /// <param name="Active">Whether the campaign is active or not.  Defaults to false.</param>
 /// <param name="AdditionalProperties">A map of additional properties, keyed on the property name.  Must match the names and types defined in the template for this item type.</param>
 /// <param name="LeaderboardStrategy">The strategy for calculating the leaderboard. Defaults to highest score. Value MUST come from the list of available strategies from the Leaderboard Service.</param>
 /// <param name="LongDescription">The user friendly name of that resource. Defaults to blank string.</param>
 /// <param name="Name">The user friendly name of that resource (required).</param>
 /// <param name="RewardSet">The rewards to give at the end of the campaign. When creating/updating only id is used. Reward set must be pre-existing.</param>
 /// <param name="ShortDescription">The user friendly name of that resource. Defaults to blank string.</param>
 /// <param name="Template">A campaign template this campaign is validated against (private). May be null and no validation of additional_properties will be done.</param>
 public CampaignResource(bool?Active = default(bool?), Dictionary <string, Property> AdditionalProperties = default(Dictionary <string, Property>), string LeaderboardStrategy = default(string), string LongDescription = default(string), string Name = default(string), RewardSetResource RewardSet = default(RewardSetResource), string ShortDescription = default(string), string Template = default(string))
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for CampaignResource and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     this.Active = Active;
     this.AdditionalProperties = AdditionalProperties;
     this.LeaderboardStrategy  = LeaderboardStrategy;
     this.LongDescription      = LongDescription;
     this.RewardSet            = RewardSet;
     this.ShortDescription     = ShortDescription;
     this.Template             = Template;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChallengeActivityResource" /> class.
 /// </summary>
 /// <param name="ActivityId">The id of the activity (required).</param>
 /// <param name="AdditionalProperties">A map of additional properties, keyed on the property name.  Must match the names and types defined in the template for this item type.</param>
 /// <param name="ChallengeId">The id of the challenge.</param>
 /// <param name="CoreSettings">Defines core settings about the activity that affect how it can be created/played by users. Values may be left null to inherit from parent activity..</param>
 /// <param name="Entitlement">The entitlement item needed to participate in the activity as part of this event. Null indicates free entry. When creating/updating only id is used. Item must be pre-existing.</param>
 /// <param name="RewardSet">The rewards to give at the end of each occurence of the activity. When creating/updating only id is used. Reward set must be pre-existing.</param>
 /// <param name="Settings">The list of settings and the select options.</param>
 /// <param name="Template">A challenge activity template this challenge activity is validated against (private). May be null and no validation of additional_properties will be done.</param>
 public ChallengeActivityResource(long?ActivityId = default(long?), Dictionary <string, Property> AdditionalProperties = default(Dictionary <string, Property>), long?ChallengeId = default(long?), CoreChallengeActivitySettings CoreSettings = default(CoreChallengeActivitySettings), ActivityEntitlementResource Entitlement = default(ActivityEntitlementResource), RewardSetResource RewardSet = default(RewardSetResource), List <SelectedSettingResource> Settings = default(List <SelectedSettingResource>), string Template = default(string))
 {
     // to ensure "ActivityId" is required (not null)
     if (ActivityId == null)
     {
         throw new InvalidDataException("ActivityId is a required property for ChallengeActivityResource and cannot be null");
     }
     else
     {
         this.ActivityId = ActivityId;
     }
     this.AdditionalProperties = AdditionalProperties;
     this.ChallengeId          = ChallengeId;
     this.CoreSettings         = CoreSettings;
     this.Entitlement          = Entitlement;
     this.RewardSet            = RewardSet;
     this.Settings             = Settings;
     this.Template             = Template;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ActivityResource" /> class.
 /// </summary>
 /// <param name="AdditionalProperties">A map of additional properties keyed on the property name. Used to further describe an activity. While settings will vary from one activity occurrence (a game) to another, additional properties are shared by all the occurrences of this activity. Ex: Activity Logo, Disclaimer, Greeting, etc. Validated against template if one exists for activities.</param>
 /// <param name="CoreSettings">Defines core settings about the activity that affect how it can be created/played by users..</param>
 /// <param name="Entitlements">The list of items that can be used for entitlement (wager amounts/etc).</param>
 /// <param name="Launch">Details about how to launch the activity.</param>
 /// <param name="LeaderboardStrategy">The strategy for calculating the leaderboard. No strategy means no leaderboard for the top level context. Value MUST come from the list of available strategies from the Leaderboard Service.</param>
 /// <param name="LongDescription">The user friendly name of that resource. Defaults to blank string.</param>
 /// <param name="Name">The user friendly name of that resource (required).</param>
 /// <param name="RewardSet">The rewards to give at the end of each occurence of the activity. When creating/updating only id is used. Reward set must be pre-existing.</param>
 /// <param name="Settings">Define what parameters are required/available to start and run an activity. For example: Difficulty, Number of Questions, Character name, Avatar, Duration, etc. Not populated when getting listing.</param>
 /// <param name="ShortDescription">The user friendly name of that resource. Defaults to blank string.</param>
 /// <param name="Template">Whether this activity is a template for other activities. Default: false.</param>
 /// <param name="TemplateId">An activity template this activity is validated against (private). May be null and no validation of additional_properties will be done.</param>
 /// <param name="Type">The type of the activity.</param>
 /// <param name="UniqueKey">The unique key (for static reference in code) of the activity.</param>
 public ActivityResource(Dictionary <string, Property> AdditionalProperties = default(Dictionary <string, Property>), CoreActivitySettings CoreSettings = default(CoreActivitySettings), List <ActivityEntitlementResource> Entitlements = default(List <ActivityEntitlementResource>), string Launch = default(string), string LeaderboardStrategy = default(string), string LongDescription = default(string), string Name = default(string), RewardSetResource RewardSet = default(RewardSetResource), List <AvailableSettingResource> Settings = default(List <AvailableSettingResource>), string ShortDescription = default(string), bool?Template = default(bool?), string TemplateId = default(string), string Type = default(string), string UniqueKey = default(string))
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for ActivityResource and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     this.AdditionalProperties = AdditionalProperties;
     this.CoreSettings         = CoreSettings;
     this.Entitlements         = Entitlements;
     this.Launch = Launch;
     this.LeaderboardStrategy = LeaderboardStrategy;
     this.LongDescription     = LongDescription;
     this.RewardSet           = RewardSet;
     this.Settings            = Settings;
     this.ShortDescription    = ShortDescription;
     this.Template            = Template;
     this.TemplateId          = TemplateId;
     this.Type      = Type;
     this.UniqueKey = UniqueKey;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ChallengeResource" /> class.
 /// </summary>
 /// <param name="AdditionalProperties">A map of additional properties, keyed on the property name.  Must match the names and types defined in the template for this item type.</param>
 /// <param name="CampaignId">The id of the campaign this challenge is a part of. The challenge must be tied to an active campaign before it will spawn events.</param>
 /// <param name="CopyOf">The ID of the original challenge it was copied from.</param>
 /// <param name="EndDate">The end date of this challenge in seconds since epoch. required if part of a campaign.</param>
 /// <param name="LeaderboardStrategy">The strategy for calculating the leaderboard. Defaults to highest score. Value MUST come from the list of available strategies from the Leaderboard Service..</param>
 /// <param name="LongDescription">The user friendly name of that resource. Defaults to blank string.</param>
 /// <param name="Name">The user friendly name of that resource (required).</param>
 /// <param name="RewardLagMinutes">The number of minutes minimum to wait at the end of this challenge before running rewards, to allow activities to complete.</param>
 /// <param name="RewardSet">The rewards to give at the end of the challenge. When creating/updating only id is used. Reward set must be pre-existing.</param>
 /// <param name="Schedule">The repeat schedule for the challenge.</param>
 /// <param name="ShortDescription">The user friendly name of that resource. Defaults to blank string.</param>
 /// <param name="StartDate">The start date of this challenge in seconds since epoch. required if part of a campaign.</param>
 /// <param name="Template">A challenge template this challenge is validated against (private). May be null and no validation of additional_properties will be done.</param>
 public ChallengeResource(Dictionary <string, Property> AdditionalProperties = default(Dictionary <string, Property>), long?CampaignId = default(long?), long?CopyOf = default(long?), long?EndDate = default(long?), string LeaderboardStrategy = default(string), string LongDescription = default(string), string Name = default(string), int?RewardLagMinutes = default(int?), RewardSetResource RewardSet = default(RewardSetResource), Schedule Schedule = default(Schedule), string ShortDescription = default(string), long?StartDate = default(long?), string Template = default(string))
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for ChallengeResource and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     this.AdditionalProperties = AdditionalProperties;
     this.CampaignId           = CampaignId;
     this.CopyOf              = CopyOf;
     this.EndDate             = EndDate;
     this.LeaderboardStrategy = LeaderboardStrategy;
     this.LongDescription     = LongDescription;
     this.RewardLagMinutes    = RewardLagMinutes;
     this.RewardSet           = RewardSet;
     this.Schedule            = Schedule;
     this.ShortDescription    = ShortDescription;
     this.StartDate           = StartDate;
     this.Template            = Template;
 }