/// <summary> /// Initializes a new instance of the <see cref="CreateActivityOccurrenceRequest" /> class. /// </summary> /// <param name="ActivityId">The id of the activity, only needed when outside of challenge/event.</param> /// <param name="ChallengeActivityId">The id of the challenge activity (required if playing in a challenge/event). Note that this is the challenge_activity_id in case the same activity apears twice in the challenge..</param> /// <param name="CoreSettings">Defines core settings about the activity that affect how it can be created/played by users..</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 this occurence is a part of, if any.</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 'non_player' 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: SETUP)..</param> /// <param name="Users">The list of users participating in this occurrence. Can only be set directly with ACTIVITIES_ADMIN permission.</param> public CreateActivityOccurrenceRequest(long?ActivityId = default(long?), long?ChallengeActivityId = default(long?), CoreActivityOccurrenceSettings CoreSettings = default(CoreActivityOccurrenceSettings), ItemIdRequest Entitlement = default(ItemIdRequest), long?EventId = default(long?), int?Host = default(int?), List <SelectedSettingRequest> Settings = default(List <SelectedSettingRequest>), bool?Simulated = default(bool?), StatusEnum?Status = default(StatusEnum?), List <Participant> Users = default(List <Participant>)) { this.ActivityId = ActivityId; 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; }
/// <summary> /// Initializes a new instance of the <see cref="ActivityOccurrenceSettingsResource" /> class. /// </summary> /// <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="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> public ActivityOccurrenceSettingsResource(CoreActivityOccurrenceSettings CoreSettings = default(CoreActivityOccurrenceSettings), List <SelectedSettingRequest> Settings = default(List <SelectedSettingRequest>)) { this.CoreSettings = CoreSettings; this.Settings = Settings; }
/// <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 'non_player' 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; }