public async Task <WriteResponseApiModel> WriteAttributesAsync( string endpointId, [FromBody][Required] WriteRequestApiModel request) { if (request == null) { throw new ArgumentNullException(nameof(request)); } var writeResult = await _nodes.NodeWriteAsync( endpointId, request.ToServiceModel()); return(writeResult.ToApiModel()); }
/// <summary> /// Write attributes /// </summary> /// <param name="endpoint"></param> /// <param name="request"></param> /// <returns></returns> public async Task <WriteResponseApiModel> NodeWriteAsync( EndpointApiModel endpoint, WriteRequestApiModel request) { if (request == null) { throw new ArgumentNullException(nameof(request)); } var result = await _nodes.NodeWriteAsync( endpoint.ToServiceModel(), request.ToServiceModel()); return(result.ToApiModel()); }