public Observable<ServiceResponse<Void>> addUsersWithServiceResponseAsync(String resourceGroupName, String labAccountName, String labName, List<String> emailAddresses) {
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (labAccountName == null) {
            throw new IllegalArgumentException("Parameter labAccountName is required and cannot be null.");
        }
        if (labName == null) {
            throw new IllegalArgumentException("Parameter labName is required and cannot be null.");
        }
        if (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        if (emailAddresses == null) {
            throw new IllegalArgumentException("Parameter emailAddresses is required and cannot be null.");
        }
        Validator.validate(emailAddresses);
        AddUsersPayload addUsersPayload = new AddUsersPayload();
        addUsersPayload.withEmailAddresses(emailAddresses);
        return service.addUsers(this.client.subscriptionId(), resourceGroupName, labAccountName, labName, this.client.apiVersion(), this.client.acceptLanguage(), addUsersPayload, this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
                @Override
                public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<Void> clientResponse = addUsersDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
public Observable < ServiceResponse < Void > > addUsersWithServiceResponseAsync ( String resourceGroupName , String labAccountName , String labName , List < String > emailAddresses ) { if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( labAccountName == null ) { throw new IllegalArgumentException ( "Parameter labAccountName is required and cannot be null." ) ; } if ( labName == null ) { throw new IllegalArgumentException ( "Parameter labName is required and cannot be null." ) ; } if ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } if ( emailAddresses == null ) { throw new IllegalArgumentException ( "Parameter emailAddresses is required and cannot be null." ) ; } Validator . validate ( emailAddresses ) ; AddUsersPayload addUsersPayload = new AddUsersPayload ( ) ; addUsersPayload . withEmailAddresses ( emailAddresses ) ; return service . addUsers ( this . client . subscriptionId ( ) , resourceGroupName , labAccountName , labName , this . client . apiVersion ( ) , this . client . acceptLanguage ( ) , addUsersPayload , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < Void > > > ( ) { @ Override public Observable < ServiceResponse < Void > > call ( Response < ResponseBody > response ) { try { ServiceResponse < Void > clientResponse = addUsersDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; }
Add users to a lab.

@param resourceGroupName The name of the resource group.
@param labAccountName The name of the lab Account.
@param labName The name of the lab.
@param emailAddresses List of user emails addresses to add to the lab.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the {@link ServiceResponse} object if successful.