patch method
UpdateProfile updates the profile bytes and labels on the profile resource created in the online mode.
Updating the bytes for profiles created in the offline mode is currently not supported: the profile content must be provided at the time of the profile creation. Direct use of this API is discouraged, please use a supported profiler agent instead for profile collection.
request
- The metadata request object.
Request parameters:
name
- Output only. Opaque, server-assigned, unique ID for this profile.
Value must have pattern ^projects/\[^/\]+/profiles/\[^/\]+$
.
updateMask
- Field mask used to specify the fields to be overwritten.
Currently only profile_bytes and labels fields are supported by
UpdateProfile, so only those fields can be specified in the mask. When no
mask is provided, all fields are overwritten.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Profile.
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<Profile> patch(
Profile request,
core.String name, {
core.String? updateMask,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (updateMask != null) 'updateMask': [updateMask],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v2/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'PATCH',
body: body_,
queryParams: queryParams_,
);
return Profile.fromJson(response_ as core.Map<core.String, core.dynamic>);
}