public async virtual Task <PrivateLinkServiceCheckPrivateLinkServiceVisibilityOperation> CheckPrivateLinkServiceVisibilityAsync(CheckPrivateLinkServiceVisibilityRequest parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default) { if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } using var scope = _clientDiagnostics.CreateScope("PrivateLinkService.CheckPrivateLinkServiceVisibility"); scope.Start(); try { var response = await _restClient.CheckPrivateLinkServiceVisibilityAsync(Id.Name, parameters, cancellationToken).ConfigureAwait(false); var operation = new PrivateLinkServiceCheckPrivateLinkServiceVisibilityOperation(_clientDiagnostics, Pipeline, _restClient.CreateCheckPrivateLinkServiceVisibilityRequest(Id.Name, parameters).Request, response); if (waitForCompletion) { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); } return(operation); } catch (Exception e) { scope.Failed(e); throw; } }