get method
Returns a student submission for an add-on attachment.
This method returns the following error codes: * PERMISSION_DENIED for
access errors. * INVALID_ARGUMENT if the request is malformed. *
NOT_FOUND if one of the identified resources does not exist.
Request parameters:
courseId - Required. Identifier of the course.
postId - Optional. Deprecated, use item_id instead.
attachmentId - Required. Identifier of the attachment.
submissionId - Required. Identifier of the student’s submission.
itemId - Identifier of the Announcement, CourseWork, or
CourseWorkMaterial under which the attachment is attached. This field is
required, but is not marked as such while we are migrating from post_id.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a AddOnAttachmentStudentSubmission.
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<AddOnAttachmentStudentSubmission> get(
  core.String courseId,
  core.String postId,
  core.String attachmentId,
  core.String submissionId, {
  core.String? itemId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (itemId != null) 'itemId': [itemId],
    if ($fields != null) 'fields': [$fields],
  };
  final url_ =
      'v1/courses/' +
      commons.escapeVariable('$courseId') +
      '/posts/' +
      commons.escapeVariable('$postId') +
      '/addOnAttachments/' +
      commons.escapeVariable('$attachmentId') +
      '/studentSubmissions/' +
      commons.escapeVariable('$submissionId');
  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return AddOnAttachmentStudentSubmission.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}