GithubCopilotSessionModelPatterns extension

Adds pattern-matching-related methods to GithubCopilotSessionModel.

on

Methods

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

Available on GithubCopilotSessionModel, provided by the GithubCopilotSessionModelPatterns extension

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

Available on GithubCopilotSessionModel, provided by the GithubCopilotSessionModelPatterns extension

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

Available on GithubCopilotSessionModel, provided by the GithubCopilotSessionModelPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String? name, String? resourceType, String? resourceId, String? userId, String? agentId, String? errorMessage, String? errorCode, int? pullRequestNumber, String? pullRequestUrl, String? pullRequestId, String? pullRequestBaseRef, GithubCopilotSessionStatus status, ModelTimestamp? completedAt, ModelTimestamp createdAt, ModelTimestamp updatedAt, bool fromServer)?, {required TResult orElse()}) → TResult

Available on GithubCopilotSessionModel, provided by the GithubCopilotSessionModelPatterns extension

A variant of when that fallback to an orElse callback.
when<TResult extends Object?>(TResult $default(String id, String? name, String? resourceType, String? resourceId, String? userId, String? agentId, String? errorMessage, String? errorCode, int? pullRequestNumber, String? pullRequestUrl, String? pullRequestId, String? pullRequestBaseRef, GithubCopilotSessionStatus status, ModelTimestamp? completedAt, ModelTimestamp createdAt, ModelTimestamp updatedAt, bool fromServer)) → TResult

Available on GithubCopilotSessionModel, provided by the GithubCopilotSessionModelPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String? name, String? resourceType, String? resourceId, String? userId, String? agentId, String? errorMessage, String? errorCode, int? pullRequestNumber, String? pullRequestUrl, String? pullRequestId, String? pullRequestBaseRef, GithubCopilotSessionStatus status, ModelTimestamp? completedAt, ModelTimestamp createdAt, ModelTimestamp updatedAt, bool fromServer)?) → TResult?

Available on GithubCopilotSessionModel, provided by the GithubCopilotSessionModelPatterns extension

A variant of when that fallback to returning null