get method

Future<Message> get(
  1. String name, {
  2. String? view,
  3. String? $fields,
})

Gets an HL7v2 message.

Request parameters:

name - Required. The resource name of the HL7v2 message to retrieve. Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/datasets/\[^/\]+/hl7V2Stores/\[^/\]+/messages/\[^/\]+$.

view - Specifies which parts of the Message resource to return in the response. When unspecified, equivalent to FULL. Possible string values are:

  • "MESSAGE_VIEW_UNSPECIFIED" : Not specified, equivalent to FULL.
  • "RAW_ONLY" : Server responses include all the message fields except parsed_data field, and schematized_data fields.
  • "PARSED_ONLY" : Server responses include all the message fields except data field, and schematized_data fields.
  • "FULL" : Server responses include all the message fields.
  • "SCHEMATIZED_ONLY" : Server responses include all the message fields except data and parsed_data fields.
  • "BASIC" : Server responses include only the name field.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Message.

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<Message> get(
  core.String name, {
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' + core.Uri.encodeFull('$name');

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return Message.fromJson(response_ as core.Map<core.String, core.dynamic>);
}