code: def __add_parameters_from_field(self, field, path_parameters,
                                    params, param_order):
      
      for subfield_list in self.__field_to_subfields(field):
        descriptor = self.__parameter_descriptor(subfield_list)
  
        qualified_name = '.'.join(subfield.name for subfield in subfield_list)
        in_path = qualified_name in path_parameters
        if descriptor.get('required', in_path):
          descriptor['required'] = True
          param_order.append(qualified_name)
  
        params[qualified_name] = descriptor
docs: 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.