PcoCheckInsLocation constructor

PcoCheckInsLocation({
  1. String? id,
  2. String? name,
  3. String? kind,
  4. bool? isOpened,
  5. String? questions,
  6. int? ageMinInMonths,
  7. int? ageMaxInMonths,
  8. String? ageRangeBy,
  9. String? ageOn,
  10. String? childOrAdult,
  11. String? effectiveDate,
  12. String? gender,
  13. int? gradeMin,
  14. int? gradeMax,
  15. int? maxOccupancy,
  16. int? minVolunteers,
  17. int? attendeesPerVolunteer,
  18. int? position,
  19. DateTime? updatedAt,
  20. DateTime? createdAt,
  21. Map<String, List<PcoResource>>? withRelationships,
  22. List<PcoResource>? withIncluded,
})

Create a new PcoCheckInsLocation object. This object cannot be created with the API

NOTES:

  • Creating an instance of a class this way does not save it on the server.
  • This object cannot be saved directly to the server.
  • Only set the id field if you know what you are doing. Save operations will overwrite data when the id is set.
  • Dummy data can be supplied for a required parameter, but if so, .save() should not be called on the object
  • FIELDS USED WHEN CREATING: none
  • FIELDS USED WHEN UPDATING: none

Implementation

factory PcoCheckInsLocation(
    {String? id,
    String? name,
    String? kind,
    bool? isOpened,
    String? questions,
    int? ageMinInMonths,
    int? ageMaxInMonths,
    String? ageRangeBy,
    String? ageOn,
    String? childOrAdult,
    String? effectiveDate,
    String? gender,
    int? gradeMin,
    int? gradeMax,
    int? maxOccupancy,
    int? minVolunteers,
    int? attendeesPerVolunteer,
    int? position,
    DateTime? updatedAt,
    DateTime? createdAt,
    Map<String, List<PcoResource>>? withRelationships,
    List<PcoResource>? withIncluded}) {
  var obj = PcoCheckInsLocation.empty();
  obj._id = id;
  if (name != null) obj._attributes['name'] = name;
  if (kind != null) obj._attributes['kind'] = kind;
  if (isOpened != null) obj._attributes['opened'] = isOpened;
  if (questions != null) obj._attributes['questions'] = questions;
  if (ageMinInMonths != null)
    obj._attributes['age_min_in_months'] = ageMinInMonths;
  if (ageMaxInMonths != null)
    obj._attributes['age_max_in_months'] = ageMaxInMonths;
  if (ageRangeBy != null) obj._attributes['age_range_by'] = ageRangeBy;
  if (ageOn != null) obj._attributes['age_on'] = ageOn;
  if (childOrAdult != null) obj._attributes['child_or_adult'] = childOrAdult;
  if (effectiveDate != null)
    obj._attributes['effective_date'] = effectiveDate;
  if (gender != null) obj._attributes['gender'] = gender;
  if (gradeMin != null) obj._attributes['grade_min'] = gradeMin;
  if (gradeMax != null) obj._attributes['grade_max'] = gradeMax;
  if (maxOccupancy != null) obj._attributes['max_occupancy'] = maxOccupancy;
  if (minVolunteers != null)
    obj._attributes['min_volunteers'] = minVolunteers;
  if (attendeesPerVolunteer != null)
    obj._attributes['attendees_per_volunteer'] = attendeesPerVolunteer;
  if (position != null) obj._attributes['position'] = position;
  if (updatedAt != null)
    obj._attributes['updated_at'] = updatedAt.toIso8601String();
  if (createdAt != null)
    obj._attributes['created_at'] = createdAt.toIso8601String();

  if (withRelationships != null) {
    for (var r in withRelationships.entries) {
      obj._relationships[r.key] = r.value;
    }
    obj._hasManualRelationships = true;
  }

  if (withIncluded != null) {
    obj._included.addAll(withIncluded);
    obj._hasManualIncluded = true;
  }

  return obj;
}