code: def __request_message_descriptor(self, request_kind, message_type, method_id,
                                     request_body_class):
      
      if request_body_class:
        message_type = request_body_class
  
      if (request_kind != self.__NO_BODY and
          message_type != message_types.VoidMessage()):
        self.__request_schema[method_id] = self.__parser.add_message(
            message_type.__class__)
        return {
            '$ref': self.__request_schema[method_id],
            'parameterName': 'resource',
        }
docs: Describes the parameters and body of the request.
  
      Args:
        request_kind: The type of request being made.
        message_type: messages.Message or ResourceContainer class. The message to
            describe.
        method_id: string, Unique method identifier (e.g. 'myapi.items.method')
        request_body_class: messages.Message of the original body when using
            a ResourceContainer. Otherwise, this should be null.
  
      Returns:
        Dictionary describing the request.
  
      Raises:
        ValueError: if the method path and request required fields do not match