code: public Observable<ServiceResponse<GetEnvironmentResponseInner>> getEnvironmentWithServiceResponseAsync(String userName, String environmentId, String expand) {
          if (userName == null) {
              throw new IllegalArgumentException("Parameter userName 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 (environmentId == null) {
              throw new IllegalArgumentException("Parameter environmentId is required and cannot be null.");
          }
          EnvironmentOperationsPayload environmentOperationsPayload = new EnvironmentOperationsPayload();
          environmentOperationsPayload.withEnvironmentId(environmentId);
          return service.getEnvironment(userName, expand, this.client.apiVersion(), this.client.acceptLanguage(), environmentOperationsPayload, this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GetEnvironmentResponseInner>>>() {
                  @Override
                  public Observable<ServiceResponse<GetEnvironmentResponseInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<GetEnvironmentResponseInner> clientResponse = getEnvironmentDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Gets the virtual machine details.
  
  @param userName The name of the user.
  @param environmentId The resourceId of the environment
  @param expand Specify the $expand query. Example: 'properties($expand=environment)'
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the GetEnvironmentResponseInner object