def list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil)
      response = list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:custom_headers).value!
      unless response.nil?
        page = response.body
        page.next_method = Proc.new do |next_page_link|
          list_event_hub_consumer_groups_next_async(next_page_link, custom_headers:custom_headers)
        end
        page
      end
    end
def list_event_hub_consumer_groups_as_lazy(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:nil)
      response = list_event_hub_consumer_groups_async(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers:custom_headers).value!
      unless response.nil?
        page = response.body
        page.next_method = Proc.new do |next_page_link|
          list_event_hub_consumer_groups_next_async(next_page_link, custom_headers:custom_headers)
        end
        page
      end
    end
Get a list of the consumer groups in the Event Hub-compatible device-to-cloud
 endpoint in an IoT hub.

 Get a list of the consumer groups in the Event Hub-compatible device-to-cloud
 endpoint in an IoT hub.

 @param resource_group_name [String] The name of the resource group that
 contains the IoT hub.
 @param resource_name [String] The name of the IoT hub.
 @param event_hub_endpoint_name [String] The name of the Event Hub-compatible
 endpoint.
 @param custom_headers [Hash{String => String}] A hash of custom headers that
 will be added to the HTTP request.

 @return [EventHubConsumerGroupsListResult] which provide lazy access to pages
 of the response.