'Populates maps and lists based on method description.
Iterates through each parameter for the method and parses the values from
the parameter dictionary.
Args:
method_desc: Dictionary with metadata describing an API method. Value
comes from the dictionary of methods stored in the \'methods\' key in
the deserialized discovery document.'

def set_parameters(self, method_desc):

    for (arg, desc) in six.iteritems(method_desc.get('parameters', {})):
        param = key2param(arg)
        self.argmap[param] = arg
        if desc.get('pattern'):
            self.pattern_params[param] = desc['pattern']
        if desc.get('enum'):
            self.enum_params[param] = desc['enum']
        if desc.get('required'):
            self.required_params.append(param)
        if desc.get('repeated'):
            self.repeated_params.append(param)
        if (desc.get('location') == 'query'):
            self.query_params.append(param)
        if (desc.get('location') == 'path'):
            self.path_params.add(param)
        self.param_types[param] = desc.get('type', 'string')
    for match in URITEMPLATE.finditer(method_desc['path']):
        for namematch in VARNAME.finditer(match.group(0)):
            name = key2param(namematch.group(0))
            self.path_params.add(name)
            if (name in self.query_params):
                self.query_params.remove(name)
