def __params_order_descriptor(self, message_type, path, is_params_class=False):
path_params = []<EOL>query_params = []<EOL>path_parameter_dict = self.__get_path_parameters(path)<EOL>for field in sorted(message_type.all_fields(), key=lambda f: f.number):<EOL><INDENT>matched_path_parameters = path_parameter_dict.get(field.name, [])<EOL>if not isinstance(field, messages.MessageField):<EOL><INDENT>name = field.name<EOL>if name in matched_path_parameters:<EOL><INDENT>path_params.append(name)<EOL><DEDENT>elif is_params_class and field.required:<EOL><INDENT>query_params.append(name)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for subfield_list in self.__field_to_subfields(field):<EOL><INDENT>name = '<STR_LIT:.>'.join(subfield.name for subfield in subfield_list)<EOL>if name in matched_path_parameters:<EOL><INDENT>path_params.append(name)<EOL><DEDENT>elif is_params_class and field.required:<EOL><INDENT>query_params.append(name)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return path_params + sorted(query_params)<EOL>
Describe the order of path parameters.

        Args:
          message_type: messages.Message class, Message with parameters to describe.
          path: string, HTTP path to method.
          is_params_class: boolean, Whether the message represents URL parameters.

        Returns:
          Descriptor list for the parameter order.