PcoServicesBlockoutDate constructor
PcoServicesBlockoutDate({})
Create a new PcoServicesBlockoutDate 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 theid
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 PcoServicesBlockoutDate(
{String? id,
String? groupIdentifier,
String? reason,
String? timeZone,
bool? isShare,
DateTime? startsAt,
DateTime? endsAt,
DateTime? endsAtUtc,
DateTime? startsAtUtc,
Map<String, List<PcoResource>>? withRelationships,
List<PcoResource>? withIncluded}) {
var obj = PcoServicesBlockoutDate.empty();
obj._id = id;
if (groupIdentifier != null)
obj._attributes['group_identifier'] = groupIdentifier;
if (reason != null) obj._attributes['reason'] = reason;
if (timeZone != null) obj._attributes['time_zone'] = timeZone;
if (isShare != null) obj._attributes['share'] = isShare;
if (startsAt != null)
obj._attributes['starts_at'] = startsAt.toIso8601String();
if (endsAt != null) obj._attributes['ends_at'] = endsAt.toIso8601String();
if (endsAtUtc != null)
obj._attributes['ends_at_utc'] = endsAtUtc.toIso8601String();
if (startsAtUtc != null)
obj._attributes['starts_at_utc'] = startsAtUtc.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;
}