PcoServicesArrangement constructor
PcoServicesArrangement({
- required String songId,
- String? id,
- double? bpm,
- DateTime? createdAt,
- bool? isHasChords,
- int? length,
- String? meter,
- String? name,
- String? notes,
- String? printMargin,
- String? printOrientation,
- String? printPageSize,
- DateTime? updatedAt,
- String? chordChart,
- String? chordChartFont,
- String? chordChartKey,
- int? chordChartColumns,
- int? chordChartFontSize,
- bool? isHasChordChart,
- bool? isLyricsEnabled,
- bool? isNumberChartEnabled,
- bool? isNumeralChartEnabled,
- List? sequence,
- List? sequenceShort,
- List? sequenceFull,
- int? chordChartChordColor,
- DateTime? archivedAt,
- String? lyrics,
- int? isrc,
- String? mtid,
- String? rehearsalMixId,
- Map<
String, List< ? withRelationships,PcoResource> > - List<
PcoResource> ? withIncluded,
Create a new PcoServicesArrangement object using this endpoint: https://api.planningcenteronline.com/services/v2/songs/$songId/arrangements
NOTES:
- Creating an instance of a class this way does not save it on the server.
- Call
save()
on the object to save it 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:
bpm
,chordChart
,chordChartChordColor
,chordChartColumns
,chordChartFont
,chordChartFontSize
,chordChartKey
,isrc
,length
,isLyricsEnabled
,meter
,mtid
,name
,notes
,isNumberChartEnabled
,isNumeralChartEnabled
,printMargin
,printOrientation
,printPageSize
,rehearsalMixId
,sequence
- FIELDS USED WHEN UPDATING:
bpm
,chordChart
,chordChartChordColor
,chordChartColumns
,chordChartFont
,chordChartFontSize
,chordChartKey
,isrc
,length
,isLyricsEnabled
,meter
,mtid
,name
,notes
,isNumberChartEnabled
,isNumeralChartEnabled
,printMargin
,printOrientation
,printPageSize
,rehearsalMixId
,sequence
Implementation
factory PcoServicesArrangement(
{required String songId,
String? id,
double? bpm,
DateTime? createdAt,
bool? isHasChords,
int? length,
String? meter,
String? name,
String? notes,
String? printMargin,
String? printOrientation,
String? printPageSize,
DateTime? updatedAt,
String? chordChart,
String? chordChartFont,
String? chordChartKey,
int? chordChartColumns,
int? chordChartFontSize,
bool? isHasChordChart,
bool? isLyricsEnabled,
bool? isNumberChartEnabled,
bool? isNumeralChartEnabled,
List? sequence,
List? sequenceShort,
List? sequenceFull,
int? chordChartChordColor,
DateTime? archivedAt,
String? lyrics,
int? isrc,
String? mtid,
String? rehearsalMixId,
Map<String, List<PcoResource>>? withRelationships,
List<PcoResource>? withIncluded}) {
var obj = PcoServicesArrangement.empty();
obj._id = id;
obj._apiPathOverride =
'https://api.planningcenteronline.com/services/v2/songs/$songId/arrangements';
if (bpm != null) obj._attributes['bpm'] = bpm;
if (createdAt != null)
obj._attributes['created_at'] = createdAt.toIso8601String();
if (isHasChords != null) obj._attributes['has_chords'] = isHasChords;
if (length != null) obj._attributes['length'] = length;
if (meter != null) obj._attributes['meter'] = meter;
if (name != null) obj._attributes['name'] = name;
if (notes != null) obj._attributes['notes'] = notes;
if (printMargin != null) obj._attributes['print_margin'] = printMargin;
if (printOrientation != null)
obj._attributes['print_orientation'] = printOrientation;
if (printPageSize != null)
obj._attributes['print_page_size'] = printPageSize;
if (updatedAt != null)
obj._attributes['updated_at'] = updatedAt.toIso8601String();
if (chordChart != null) obj._attributes['chord_chart'] = chordChart;
if (chordChartFont != null)
obj._attributes['chord_chart_font'] = chordChartFont;
if (chordChartKey != null)
obj._attributes['chord_chart_key'] = chordChartKey;
if (chordChartColumns != null)
obj._attributes['chord_chart_columns'] = chordChartColumns;
if (chordChartFontSize != null)
obj._attributes['chord_chart_font_size'] = chordChartFontSize;
if (isHasChordChart != null)
obj._attributes['has_chord_chart'] = isHasChordChart;
if (isLyricsEnabled != null)
obj._attributes['lyrics_enabled'] = isLyricsEnabled;
if (isNumberChartEnabled != null)
obj._attributes['number_chart_enabled'] = isNumberChartEnabled;
if (isNumeralChartEnabled != null)
obj._attributes['numeral_chart_enabled'] = isNumeralChartEnabled;
if (sequence != null) obj._attributes['sequence'] = sequence;
if (sequenceShort != null)
obj._attributes['sequence_short'] = sequenceShort;
if (sequenceFull != null) obj._attributes['sequence_full'] = sequenceFull;
if (chordChartChordColor != null)
obj._attributes['chord_chart_chord_color'] = chordChartChordColor;
if (archivedAt != null)
obj._attributes['archived_at'] = archivedAt.toIso8601String();
if (lyrics != null) obj._attributes['lyrics'] = lyrics;
if (isrc != null) obj._attributes['isrc'] = isrc;
if (mtid != null) obj._attributes['mtid'] = mtid;
if (rehearsalMixId != null)
obj._attributes['rehearsal_mix_id'] = rehearsalMixId;
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;
}