def __add_parameters_from_field(self, field, path_parameters,<EOL>params, param_order):
for subfield_list in self.__field_to_subfields(field):<EOL><INDENT>descriptor = self.__parameter_descriptor(subfield_list)<EOL>qualified_name = '<STR_LIT:.>'.join(subfield.name for subfield in subfield_list)<EOL>in_path = qualified_name in path_parameters<EOL>if descriptor.get('<STR_LIT>', in_path):<EOL><INDENT>descriptor['<STR_LIT>'] = True<EOL>param_order.append(qualified_name)<EOL><DEDENT>params[qualified_name] = descriptor<EOL><DEDENT>
Adds all parameters in a field to a method parameters descriptor.

        Simple fields will only have one parameter, but a message field 'x' that
        corresponds to a message class with fields 'y' and 'z' will result in
        parameters 'x.y' and 'x.z', for example. The mapping from field to
        parameters is mostly handled by __field_to_subfields.

        Args:
          field: Field from which parameters will be added to the method descriptor.
          path_parameters: A list of parameters matched from a path for this field.
             For example for the hypothetical 'x' from above if the path was
             '/a/{x.z}/b/{other}' then this list would contain only the element
             'x.z' since 'other' does not match to this field.
          params: Dictionary with parameter names as keys and parameter descriptors
              as values. This will be updated for each parameter in the field.
          param_order: List of required parameter names to give them an order in the
              descriptor. All required parameters in the field will be added to this
              list.