code: public Observable<ServiceResponse<EventHubConsumerGroupInfoInner>> getEventHubConsumerGroupWithServiceResponseAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) {
          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 (resourceName == null) {
              throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
          }
          if (eventHubEndpointName == null) {
              throw new IllegalArgumentException("Parameter eventHubEndpointName is required and cannot be null.");
          }
          if (name == null) {
              throw new IllegalArgumentException("Parameter name is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          return service.getEventHubConsumerGroup(this.client.subscriptionId(), resourceGroupName, resourceName, eventHubEndpointName, name, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EventHubConsumerGroupInfoInner>>>() {
                  @Override
                  public Observable<ServiceResponse<EventHubConsumerGroupInfoInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<EventHubConsumerGroupInfoInner> clientResponse = getEventHubConsumerGroupDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
  Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
  
  @param resourceGroupName The name of the resource group that contains the IoT hub.
  @param resourceName The name of the IoT hub.
  @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
  @param name The name of the consumer group to retrieve.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the EventHubConsumerGroupInfoInner object