BuildJobPatterns extension

Adds pattern-matching-related methods to BuildJob.

on

Methods

map<TResult extends Object?>(TResult $default(_BuildJob value)) → TResult

Available on BuildJob, provided by the BuildJobPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_BuildJob value)?) → TResult?

Available on BuildJob, provided by the BuildJobPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_BuildJob value)?, {required TResult orElse()}) → TResult

Available on BuildJob, provided by the BuildJobPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String status, String owner, String repo, String? teamId, String? workflowId, String? workflowFileName, String? installationToken, String? commitSha, int? pullRequestNumber, int? runCount, String? latestRunId, String? tagName, String? branch, String? jobKey, String? workflowRunId, List<String>? needs, String? githubBaseUrl, String? githubApiBaseUrl, DateTime? createdAt, DateTime? updatedAt)?, {required TResult orElse()}) → TResult

Available on BuildJob, provided by the BuildJobPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(String id, String status, String owner, String repo, String? teamId, String? workflowId, String? workflowFileName, String? installationToken, String? commitSha, int? pullRequestNumber, int? runCount, String? latestRunId, String? tagName, String? branch, String? jobKey, String? workflowRunId, List<String>? needs, String? githubBaseUrl, String? githubApiBaseUrl, DateTime? createdAt, DateTime? updatedAt)) → TResult

Available on BuildJob, provided by the BuildJobPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String status, String owner, String repo, String? teamId, String? workflowId, String? workflowFileName, String? installationToken, String? commitSha, int? pullRequestNumber, int? runCount, String? latestRunId, String? tagName, String? branch, String? jobKey, String? workflowRunId, List<String>? needs, String? githubBaseUrl, String? githubApiBaseUrl, DateTime? createdAt, DateTime? updatedAt)?) → TResult?

Available on BuildJob, provided by the BuildJobPatterns extension

A variant of when that fallback to returning null