def _InitPageable(self, api):
    response_type = self.values.get('responseType')
    if response_type == api.void_type:
      return
    next_page_token_name = self.FindPageToken(
        response_type.values.get('properties'))
    if not next_page_token_name:
      return
    is_page_token_parameter = True
    page_token_name = self.FindPageToken(self.optional_parameters)
    if not page_token_name:
      # page token may be field of request body instead of query parameter
      is_page_token_parameter = False
      request_type = self.values.get('requestType')
      if request_type:
        page_token_name = self.FindPageToken(
            request_type.values.get('properties'))
    if not page_token_name:
      return
    self.SetTemplateValue('isPageable', True)
    self.SetTemplateValue('isPagingStyleStandard',
                          (is_page_token_parameter and
                           page_token_name == 'pageToken' and
                           next_page_token_name == 'nextPageToken'))