#NEWLINE# def __add_parameters_from_field( self , field , path_parameters , params , param_order ) : #NEWLINE# #INDENT# "Adds all parameters in a field to a method parameters descriptor.\n\n    Simple fields will only have one parameter, but a message field 'x' that\n    corresponds to a message class with fields 'y' and 'z' will result in\n    parameters 'x.y' and 'x.z', for example. The mapping from field to\n    parameters is mostly handled by __field_to_subfields.\n\n    Args:\n      field: Field from which parameters will be added to the method descriptor.\n      path_parameters: A list of parameters matched from a path for this field.\n         For example for the hypothetical 'x' from above if the path was\n         '/a/{x.z}/b/{other}' then this list would contain only the element\n         'x.z' since 'other' does not match to this field.\n      params: Dictionary with parameter names as keys and parameter descriptors\n          as values. This will be updated for each parameter in the field.\n      param_order: List of required parameter names to give them an order in the\n          descriptor. All required parameters in the field will be added to this\n          list.\n    " #NEWLINE# for subfield_list in self . __field_to_subfields ( field ) : #NEWLINE# #INDENT# descriptor = self . __parameter_descriptor ( subfield_list ) #NEWLINE# qualified_name = '.' . join ( ( subfield . name for subfield in subfield_list ) ) #NEWLINE# in_path = ( qualified_name in path_parameters ) #NEWLINE# if descriptor . get ( 'required' , in_path ) : #NEWLINE# #INDENT# descriptor [ 'required' ] = True #NEWLINE# param_order . append ( qualified_name ) #NEWLINE# #UNINDENT# params [ qualified_name ] = descriptor