def page_index=(page_index)

      if !page_index.nil? && page_index > 6
        fail ArgumentError, "invalid value for 'page_index', must be smaller than or equal to 6."
      end

      if !page_index.nil? && page_index < 0
        fail ArgumentError, "invalid value for 'page_index', must be greater than or equal to 0."
      end

      @page_index = page_index
    end
def page_index=(page_index)

      if !page_index.nil? && page_index > 6
        fail ArgumentError, "invalid value for 'page_index', must be smaller than or equal to 6."
      end

      if !page_index.nil? && page_index < 0
        fail ArgumentError, "invalid value for 'page_index', must be greater than or equal to 0."
      end

      @page_index = page_index
    end
Custom attribute writer method with validation
 @param [Object] page_index Value to be assigned