RepositoryTrigger.fromJson constructor

RepositoryTrigger.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory RepositoryTrigger.fromJson(Map<String, dynamic> json) {
  return RepositoryTrigger(
    destinationArn: json['destinationArn'] as String,
    events: (json['events'] as List)
        .whereNotNull()
        .map((e) => (e as String).toRepositoryTriggerEventEnum())
        .toList(),
    name: json['name'] as String,
    branches: (json['branches'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    customData: json['customData'] as String?,
  );
}