/// <summary>
 /// Initializes a new instance of the <see cref="ActivityOccurrenceJoinResult" /> class.
 /// </summary>
 /// <param name="Entitlement">The details on the entitlement object needed to enter the occurrence (if any).</param>
 /// <param name="ErrorCode">Zero if the user was/could be added to the occurrence. Jsapi error code indicating the reason of the failure otherwise (required).</param>
 /// <param name="Message">An error message if failure.</param>
 /// <param name="UserId">The user&#39;s id (required).</param>
 public ActivityOccurrenceJoinResult(ActivityEntitlementResource Entitlement = default(ActivityEntitlementResource), int?ErrorCode = default(int?), string Message = default(string), long?UserId = default(long?))
 {
     // to ensure "ErrorCode" is required (not null)
     if (ErrorCode == null)
     {
         throw new InvalidDataException("ErrorCode is a required property for ActivityOccurrenceJoinResult and cannot be null");
     }
     else
     {
         this.ErrorCode = ErrorCode;
     }
     // to ensure "UserId" is required (not null)
     if (UserId == null)
     {
         throw new InvalidDataException("UserId is a required property for ActivityOccurrenceJoinResult and cannot be null");
     }
     else
     {
         this.UserId = UserId;
     }
     this.Entitlement = Entitlement;
     this.Message     = Message;
 }
예제 #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="ActivityOccurrenceResource" /> class.
 /// </summary>
 /// <param name="ActivityId">The id of the activity (required).</param>
 /// <param name="Bans">The ids of banned users that cannot join the occurrence. See occurrence-user delete endpoint.</param>
 /// <param name="ChallengeActivityId">The id of the challenge activity (as part of the event, required if eventId set).</param>
 /// <param name="CoreSettings">Defines core settings about the activity occurrence that affect how it behaves in the system. Validated against core settings in activity/challenge-activity..</param>
 /// <param name="Entitlement">The entitlement item required to enter the occurrence. Required if not part of an event. Must come from the set of entitlement items listed in the activity.</param>
 /// <param name="EventId">The id of the event.</param>
 /// <param name="Host">The host of the occurrence, if not a participant (will be left out of users array). Must be the caller that creates the occurrence unless admin. Requires activity/challenge to allow host_option of &#39;non_player&#39; if not admin as well.</param>
 /// <param name="Settings">The values selected from the available settings defined for the activity. Ex: difficulty: hard. Can be left out if the activity is played during an event and the settings are already set at the event level. Ex: every monday, difficulty: hard, number of questions: 10, category: sport. Otherwise, the set must exactly match those of the activity..</param>
 /// <param name="Simulated">Whether this occurrence will be ran as a simulation. Simulations will not be rewarded. Useful for bot play or trials.</param>
 /// <param name="Status">The current status of the occurrence (default: OPEN).</param>
 /// <param name="Users">The list of users participating in this occurrence. Can only be set directly with ACTIVITIES_ADMIN permission.</param>
 public ActivityOccurrenceResource(long?ActivityId = default(long?), List <int?> Bans = default(List <int?>), long?ChallengeActivityId = default(long?), CoreActivityOccurrenceSettings CoreSettings = default(CoreActivityOccurrenceSettings), ActivityEntitlementResource Entitlement = default(ActivityEntitlementResource), long?EventId = default(long?), SimpleUserResource Host = default(SimpleUserResource), List <SelectedSettingResource> Settings = default(List <SelectedSettingResource>), bool?Simulated = default(bool?), StatusEnum?Status = default(StatusEnum?), List <ActivityUserResource> Users = default(List <ActivityUserResource>))
 {
     // to ensure "ActivityId" is required (not null)
     if (ActivityId == null)
     {
         throw new InvalidDataException("ActivityId is a required property for ActivityOccurrenceResource and cannot be null");
     }
     else
     {
         this.ActivityId = ActivityId;
     }
     this.Bans = Bans;
     this.ChallengeActivityId = ChallengeActivityId;
     this.CoreSettings        = CoreSettings;
     this.Entitlement         = Entitlement;
     this.EventId             = EventId;
     this.Host      = Host;
     this.Settings  = Settings;
     this.Simulated = Simulated;
     this.Status    = Status;
     this.Users     = Users;
 }