/// <summary> /// Initializes a new instance of the <see cref="WorkerOfferedEvent" /> class. /// </summary> /// <param name="objectType">objectType (required).</param> /// <param name="bookingRequestId">The ID of the booking request.</param> /// <param name="agency">agency.</param> public WorkerOfferedEvent(string objectType = default(string), string bookingRequestId = default(string), Agency agency = default(Agency)) { // to ensure "objectType" is required (not null) if (objectType == null) { throw new InvalidDataException("objectType is a required property for WorkerOfferedEvent and cannot be null"); } else { this.ObjectType = objectType; } this.BookingRequestId = bookingRequestId; this.Agency = agency; }
/// <summary> /// Initializes a new instance of the <see cref="WorkerOffer" /> class. /// </summary> /// <param name="id">Unique identifier for this offer..</param> /// <param name="bookingRequestId">The underlying booking request for this offer..</param> /// <param name="worker">worker (required).</param> /// <param name="agency">agency (required).</param> /// <param name="qualificationStatus">Qualification Status: * `qualified` - Worker has passed all trust-defined checks, and may be considered valid to book. * `unqualified` - Worker has not passed some, or all of the trust-defined checks. These should be performed before progressing to booking the worker. (required).</param> public WorkerOffer(string id = default(string), string bookingRequestId = default(string), Person worker = default(Person), Agency agency = default(Agency), QualificationStatusEnum qualificationStatus = default(QualificationStatusEnum)) { // to ensure "worker" is required (not null) if (worker == null) { throw new InvalidDataException("worker is a required property for WorkerOffer and cannot be null"); } else { this.Worker = worker; } // to ensure "agency" is required (not null) if (agency == null) { throw new InvalidDataException("agency is a required property for WorkerOffer and cannot be null"); } else { this.Agency = agency; } // to ensure "qualificationStatus" is required (not null) if (qualificationStatus == null) { throw new InvalidDataException("qualificationStatus is a required property for WorkerOffer and cannot be null"); } else { this.QualificationStatus = qualificationStatus; } this.Id = id; this.BookingRequestId = bookingRequestId; }