code: public Observable<VirtualMachineCaptureResultInner> beginCaptureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) {
          return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).map(new Func1<ServiceResponse<VirtualMachineCaptureResultInner>, VirtualMachineCaptureResultInner>() {
              @Override
              public VirtualMachineCaptureResultInner call(ServiceResponse<VirtualMachineCaptureResultInner> response) {
                  return response.body();
              }
          });
      }
docs: Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.
  
  @param resourceGroupName The name of the resource group.
  @param vmName The name of the virtual machine.
  @param parameters Parameters supplied to the Capture Virtual Machine operation.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the VirtualMachineCaptureResultInner object