/// <summary> /// Updates a component on a digital twin. /// Status codes: /// 200 (OK): Success. /// 400 (Bad Request): The request is invalid. /// 404 (Not Found): There is either no digital twin with the provided id or /// the component path is invalid. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// The id of the digital twin. The id is unique within the service and case /// sensitive. /// </param> /// <param name='componentPath'> /// The name of the DTDL component. /// </param> /// <param name='patchDocument'> /// An update specification described by JSON Patch. Updates to property values /// and $model elements may happen in the same request. Operations are limited /// to add, replace and remove. /// </param> /// <param name='ifMatch'> /// Only perform the operation if the entity's etag matches one of the etags /// provided or * is provided. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DigitalTwinsUpdateComponentHeaders> UpdateComponentAsync(this IDigitalTwinsOperations operations, string id, string componentPath, IList <object> patchDocument = default(IList <object>), string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateComponentWithHttpMessagesAsync(id, componentPath, patchDocument, ifMatch, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }