public Observable<ServiceResponse<TroubleshootingResultInner>> beginGetTroubleshootingResultWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) {
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (networkWatcherName == null) {
            throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null.");
        }
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (targetResourceId == null) {
            throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null.");
        }
        final String apiVersion = "2018-06-01";
        QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters();
        parameters.withTargetResourceId(targetResourceId);
        return service.beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<TroubleshootingResultInner>>>() {
                @Override
                public Observable<ServiceResponse<TroubleshootingResultInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<TroubleshootingResultInner> clientResponse = beginGetTroubleshootingResultDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
public Observable < ServiceResponse < TroubleshootingResultInner > > beginGetTroubleshootingResultWithServiceResponseAsync ( String resourceGroupName , String networkWatcherName , String targetResourceId ) { if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( networkWatcherName == null ) { throw new IllegalArgumentException ( "Parameter networkWatcherName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( targetResourceId == null ) { throw new IllegalArgumentException ( "Parameter targetResourceId is required and cannot be null." ) ; } final String apiVersion = "2018-06-01" ; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters ( ) ; parameters . withTargetResourceId ( targetResourceId ) ; return service . beginGetTroubleshootingResult ( resourceGroupName , networkWatcherName , this . client . subscriptionId ( ) , apiVersion , this . client . acceptLanguage ( ) , parameters , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < TroubleshootingResultInner > > > ( ) { @ Override public Observable < ServiceResponse < TroubleshootingResultInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < TroubleshootingResultInner > clientResponse = beginGetTroubleshootingResultDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; }
Get the last completed troubleshooting result on a specified resource.

@param resourceGroupName The name of the resource group.
@param networkWatcherName The name of the network watcher resource.
@param targetResourceId The target resource ID to query the troubleshooting result.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the TroubleshootingResultInner object