fetchFileDiff method
Fetches Git diff for an uncommitted file in a Workspace.
Request parameters:
workspace - Required. The workspace's name.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/repositories/\[^/\]+/workspaces/\[^/\]+$.
path - Required. The file's full path including filename, relative to
the workspace root.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a FetchFileDiffResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<FetchFileDiffResponse> fetchFileDiff(
core.String workspace, {
core.String? path,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'path': ?path == null ? null : [path],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$workspace') + ':fetchFileDiff';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return FetchFileDiffResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}