patch method
- MetadataImport request,
- String name, {
- String? requestId,
- String? updateMask,
- String? $fields,
Updates a single import.
Only the description field of MetadataImport is supported to be updated.
request
- The metadata request object.
Request parameters:
name
- Immutable. The relative resource name of the metadata import, of
the
form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/services/\[^/\]+/metadataImports/\[^/\]+$
.
requestId
- Optional. A request ID. Specify a unique request ID to allow
the server to ignore the request if it has completed. The server will
ignore subsequent requests that provide a duplicate request ID for at
least 60 minutes after the first request.For example, if an initial
request times out, followed by another request with the same request ID,
the server ignores the second request to prevent the creation of duplicate
commitments.The request ID must be a valid UUID
(https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A
zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
updateMask
- Required. A field mask used to specify the fields to be
overwritten in the metadata import resource by the update. Fields
specified in the update_mask are relative to the resource (not to the full
request). A field is overwritten if it is in the mask.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Operation.
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<Operation> patch(
MetadataImport request,
core.String name, {
core.String? requestId,
core.String? updateMask,
core.String? $fields,
}) async {
final _body = convert.json.encode(request);
final _queryParams = <core.String, core.List<core.String>>{
if (requestId != null) 'requestId': [requestId],
if (updateMask != null) 'updateMask': [updateMask],
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1beta/' + core.Uri.encodeFull('$name');
final _response = await _requester.request(
_url,
'PATCH',
body: _body,
queryParams: _queryParams,
);
return Operation.fromJson(_response as core.Map<core.String, core.dynamic>);
}