/// <summary> /// Initializes a new instance of the <see cref="MailingListAddMemberRequest" /> class. /// </summary> /// <param name="candidateId">Set to add an existing candidate to the mailing list..</param> /// <param name="preferredTeachingSubjectId">preferredTeachingSubjectId.</param> /// <param name="firstName">firstName (required).</param> /// <param name="lastName">lastName (required).</param> /// <param name="email">email (required).</param> /// <param name="telephone">telephone.</param> /// <param name="addressPostcode">addressPostcode (required).</param> /// <param name="privacyPolicy">privacyPolicy (required).</param> public MailingListAddMemberRequest(Guid?candidateId = default(Guid?), Guid?preferredTeachingSubjectId = default(Guid?), string firstName = default(string), string lastName = default(string), string email = default(string), string telephone = default(string), string addressPostcode = default(string), CandidatePrivacyPolicy privacyPolicy = default(CandidatePrivacyPolicy)) { // to ensure "firstName" is required (not null) if (firstName == null) { throw new InvalidDataException("firstName is a required property for MailingListAddMemberRequest and cannot be null"); } else { this.FirstName = firstName; } // to ensure "lastName" is required (not null) if (lastName == null) { throw new InvalidDataException("lastName is a required property for MailingListAddMemberRequest and cannot be null"); } else { this.LastName = lastName; } // to ensure "email" is required (not null) if (email == null) { throw new InvalidDataException("email is a required property for MailingListAddMemberRequest and cannot be null"); } else { this.Email = email; } // to ensure "addressPostcode" is required (not null) if (addressPostcode == null) { throw new InvalidDataException("addressPostcode is a required property for MailingListAddMemberRequest and cannot be null"); } else { this.AddressPostcode = addressPostcode; } // to ensure "privacyPolicy" is required (not null) if (privacyPolicy == null) { throw new InvalidDataException("privacyPolicy is a required property for MailingListAddMemberRequest and cannot be null"); } else { this.PrivacyPolicy = privacyPolicy; } this.CandidateId = candidateId; this.PreferredTeachingSubjectId = preferredTeachingSubjectId; this.Telephone = telephone; }
/// <summary> /// Initializes a new instance of the <see cref="Candidate" /> class. /// </summary> /// <param name="preferredTeachingSubjectId">preferredTeachingSubjectId.</param> /// <param name="preferredEducationPhaseId">preferredEducationPhaseId.</param> /// <param name="locationId">locationId.</param> /// <param name="initialTeacherTrainingYearId">initialTeacherTrainingYearId.</param> /// <param name="channelId">channelId.</param> /// <param name="email">email (required).</param> /// <param name="firstName">firstName (required).</param> /// <param name="lastName">lastName (required).</param> /// <param name="dateOfBirth">dateOfBirth (required).</param> /// <param name="telephone">telephone (required).</param> /// <param name="addressLine1">addressLine1 (required).</param> /// <param name="addressLine2">addressLine2.</param> /// <param name="addressLine3">addressLine3.</param> /// <param name="addressCity">addressCity (required).</param> /// <param name="addressState">addressState (required).</param> /// <param name="addressPostcode">addressPostcode (required).</param> /// <param name="qualifications">qualifications.</param> /// <param name="pastTeachingPositions">pastTeachingPositions.</param> /// <param name="phoneCall">phoneCall.</param> /// <param name="privacyPolicy">privacyPolicy.</param> /// <param name="id">id.</param> public Candidate(Guid?preferredTeachingSubjectId = default(Guid?), int?preferredEducationPhaseId = default(int?), int?locationId = default(int?), int?initialTeacherTrainingYearId = default(int?), int?channelId = default(int?), string email = default(string), string firstName = default(string), string lastName = default(string), DateTime?dateOfBirth = default(DateTime?), string telephone = default(string), string addressLine1 = default(string), string addressLine2 = default(string), string addressLine3 = default(string), string addressCity = default(string), string addressState = default(string), string addressPostcode = default(string), List <CandidateQualification> qualifications = default(List <CandidateQualification>), List <CandidatePastTeachingPosition> pastTeachingPositions = default(List <CandidatePastTeachingPosition>), PhoneCall phoneCall = default(PhoneCall), CandidatePrivacyPolicy privacyPolicy = default(CandidatePrivacyPolicy), Guid?id = default(Guid?)) { // to ensure "email" is required (not null) if (email == null) { throw new InvalidDataException("email is a required property for Candidate and cannot be null"); } else { this.Email = email; } // to ensure "firstName" is required (not null) if (firstName == null) { throw new InvalidDataException("firstName is a required property for Candidate and cannot be null"); } else { this.FirstName = firstName; } // to ensure "lastName" is required (not null) if (lastName == null) { throw new InvalidDataException("lastName is a required property for Candidate and cannot be null"); } else { this.LastName = lastName; } // to ensure "dateOfBirth" is required (not null) if (dateOfBirth == null) { throw new InvalidDataException("dateOfBirth is a required property for Candidate and cannot be null"); } else { this.DateOfBirth = dateOfBirth; } // to ensure "telephone" is required (not null) if (telephone == null) { throw new InvalidDataException("telephone is a required property for Candidate and cannot be null"); } else { this.Telephone = telephone; } // to ensure "addressLine1" is required (not null) if (addressLine1 == null) { throw new InvalidDataException("addressLine1 is a required property for Candidate and cannot be null"); } else { this.AddressLine1 = addressLine1; } // to ensure "addressCity" is required (not null) if (addressCity == null) { throw new InvalidDataException("addressCity is a required property for Candidate and cannot be null"); } else { this.AddressCity = addressCity; } // to ensure "addressState" is required (not null) if (addressState == null) { throw new InvalidDataException("addressState is a required property for Candidate and cannot be null"); } else { this.AddressState = addressState; } // to ensure "addressPostcode" is required (not null) if (addressPostcode == null) { throw new InvalidDataException("addressPostcode is a required property for Candidate and cannot be null"); } else { this.AddressPostcode = addressPostcode; } this.PreferredTeachingSubjectId = preferredTeachingSubjectId; this.PreferredEducationPhaseId = preferredEducationPhaseId; this.LocationId = locationId; this.InitialTeacherTrainingYearId = initialTeacherTrainingYearId; this.ChannelId = channelId; this.AddressLine2 = addressLine2; this.AddressLine3 = addressLine3; this.Qualifications = qualifications; this.PastTeachingPositions = pastTeachingPositions; this.PhoneCall = phoneCall; this.PrivacyPolicy = privacyPolicy; this.Id = id; }