# Path: heatclient/common/base.py
# def getid(obj):
#     def add_hook(cls, hook_type, hook_func):
#     def run_hooks(cls, hook_type, *args, **kwargs):
#     def __init__(self, client):
#     def _list(self, url, response_key=None, obj_class=None, json=None):
#     def _get(self, url, response_key=None):
#     def _head(self, url):
#     def _post(self, url, json, response_key=None, return_raw=False):
#     def _put(self, url, json=None, response_key=None):
#     def _patch(self, url, json=None, response_key=None):
#     def _delete(self, url):
#     def list(self):
#     def find(self, **kwargs):
#     def findall(self, **kwargs):
#     def build_url(self, base_url=None, **kwargs):
#     def _filter_kwargs(self, kwargs):
#     def create(self, **kwargs):
#     def get(self, **kwargs):
#     def head(self, **kwargs):
#     def list(self, base_url=None, **kwargs):
#     def put(self, base_url=None, **kwargs):
#     def update(self, **kwargs):
#     def delete(self, **kwargs):
#     def find(self, base_url=None, **kwargs):
#     def __init__(self, name, module):
#     def _parse_extension_module(self):
#     def __repr__(self):
#     def __init__(self, manager, info, loaded=False):
#     def __repr__(self):
#     def human_id(self):
#     def _add_details(self, info):
#     def __getattr__(self, k):
#     def get(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def is_same_obj(self, other):
#     def is_loaded(self):
#     def set_loaded(self, val):
#     def to_dict(self):
# class HookableMixin(object):
# class BaseManager(HookableMixin):
# class ManagerWithFind(BaseManager):
# class CrudManager(BaseManager):
# class Extension(HookableMixin):
# class Resource(object):
#     SUPPORTED_HOOKS = ('__pre_parse_args__', '__post_parse_args__')
#     HUMAN_ID = False
#     NAME_ATTR = 'name'
# 
# Path: heatclient/common/utils.py
# LOG = logging.getLogger(__name__)
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def link_formatter(links):
#     def format_link(l):
# def resource_nested_identifier(rsrc):
# def json_formatter(js):
# def yaml_formatter(js):
# def text_wrap_formatter(d):
# def newline_list_formatter(r):
# def print_dict(d, formatters=None):
#     def __init__(self):
#     def prepend_paths(self, resource_path, stack_id):
#     def build_resource_name(self, event):
#         def get_stack_id():
# def event_log_formatter(events, event_log_context=None):
# def print_update_list(lst, fields, formatters=None):
# def find_resource(manager, name_or_id):
# def format_parameters(params, parse_semicolon=True):
# def format_all_parameters(params, param_files,
#                           template_file=None, template_url=None):
# def format_parameter_file(param_files, template_file=None,
#                           template_url=None):
# def resolve_param_get_file(file, base_url):
# def format_output(output, format='yaml'):
# def parse_query_url(url):
# def get_template_url(template_file=None, template_url=None):
# def read_url_content(url):
# def base_url_for_url(url):
# def normalise_file_path_to_url(path):
# def get_response_body(resp):
# class EventLogContext(object):


from oslo_utils import encodeutils
from six.moves.urllib import parse
from heatclient.common import base
from heatclient.common import utils
import six
        if 'with_description' in kwargs:
            with_description = kwargs.pop('with_description')
            params.update({'with_description': with_description})
        if params:
            url += '?%s' % parse.urlencode(params, True)

        return self._list(url, self.KEY)

    def get(self, resource_type, with_description=False):
        """Get the details for a specific resource_type.

        :param resource_type: name of the resource type to get the details for
        :param with_description: return result with description or not
        """
        url_str = '/%s/%s' % (
                  self.KEY,
                  parse.quote(encodeutils.safe_encode(resource_type)))
        resp = self.client.get(url_str,
                               params={'with_description': with_description})
        body = utils.get_response_body(resp)
        return body

    def generate_template(self, resource_type, template_type='cfn'):
        url_str = '/%s/%s/template' % (
                  self.KEY,
                  parse.quote(encodeutils.safe_encode(resource_type)))
        if template_type:
            url_str += '?%s' % parse.urlencode(
                {'template_type': template_type}, True)
        resp = self.client.get(url_str)

# Path: heatclient/common/base.py
# def getid(obj):
#     def add_hook(cls, hook_type, hook_func):
#     def run_hooks(cls, hook_type, *args, **kwargs):
#     def __init__(self, client):
#     def _list(self, url, response_key=None, obj_class=None, json=None):
#     def _get(self, url, response_key=None):
#     def _head(self, url):
#     def _post(self, url, json, response_key=None, return_raw=False):
#     def _put(self, url, json=None, response_key=None):
#     def _patch(self, url, json=None, response_key=None):
#     def _delete(self, url):
#     def list(self):
#     def find(self, **kwargs):
#     def findall(self, **kwargs):
#     def build_url(self, base_url=None, **kwargs):
#     def _filter_kwargs(self, kwargs):
#     def create(self, **kwargs):
#     def get(self, **kwargs):
#     def head(self, **kwargs):
#     def list(self, base_url=None, **kwargs):
#     def put(self, base_url=None, **kwargs):
#     def update(self, **kwargs):
#     def delete(self, **kwargs):
#     def find(self, base_url=None, **kwargs):
#     def __init__(self, name, module):
#     def _parse_extension_module(self):
#     def __repr__(self):
#     def __init__(self, manager, info, loaded=False):
#     def __repr__(self):
#     def human_id(self):
#     def _add_details(self, info):
#     def __getattr__(self, k):
#     def get(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def is_same_obj(self, other):
#     def is_loaded(self):
#     def set_loaded(self, val):
#     def to_dict(self):
# class HookableMixin(object):
# class BaseManager(HookableMixin):
# class ManagerWithFind(BaseManager):
# class CrudManager(BaseManager):
# class Extension(HookableMixin):
# class Resource(object):
#     SUPPORTED_HOOKS = ('__pre_parse_args__', '__post_parse_args__')
#     HUMAN_ID = False
#     NAME_ATTR = 'name'
# 
# Path: heatclient/common/utils.py
# LOG = logging.getLogger(__name__)
# def arg(*args, **kwargs):
#     def _decorator(func):
# def env(*args, **kwargs):
# def add_arg(func, *args, **kwargs):
# def print_list(objs, fields, formatters=None, sortby_index=0,
#                mixed_case_fields=None, field_labels=None):
# def link_formatter(links):
#     def format_link(l):
# def resource_nested_identifier(rsrc):
# def json_formatter(js):
# def yaml_formatter(js):
# def text_wrap_formatter(d):
# def newline_list_formatter(r):
# def print_dict(d, formatters=None):
#     def __init__(self):
#     def prepend_paths(self, resource_path, stack_id):
#     def build_resource_name(self, event):
#         def get_stack_id():
# def event_log_formatter(events, event_log_context=None):
# def print_update_list(lst, fields, formatters=None):
# def find_resource(manager, name_or_id):
# def format_parameters(params, parse_semicolon=True):
# def format_all_parameters(params, param_files,
#                           template_file=None, template_url=None):
# def format_parameter_file(param_files, template_file=None,
#                           template_url=None):
# def resolve_param_get_file(file, base_url):
# def format_output(output, format='yaml'):
# def parse_query_url(url):
# def get_template_url(template_file=None, template_url=None):
# def read_url_content(url):
# def base_url_for_url(url):
# def normalise_file_path_to_url(path):
# def get_response_body(resp):
# class EventLogContext(object):


# Path: heatclient/v1/resource_types.py
from oslo_utils import encodeutils
from six.moves.urllib import parse
from heatclient.common import base
from heatclient.common import utils
import six

        if 'with_description' in kwargs:
            with_description = kwargs.pop('with_description')
            params.update({'with_description': with_description})
        if params:
            url += '?%s' % parse.urlencode(params, True)

        return self._list(url, self.KEY)

    def get(self, resource_type, with_description=False):
        """Get the details for a specific resource_type.

        :param resource_type: name of the resource type to get the details for
        :param with_description: return result with description or not
        """
        url_str = '/%s/%s' % (
                  self.KEY,
                  parse.quote(encodeutils.safe_encode(resource_type)))
        resp = self.client.get(url_str,
                               params={'with_description': with_description})
        body = utils.get_response_body(resp)
        return body

    def generate_template(self, resource_type, template_type='cfn'):
        url_str = '/%s/%s/template' % (
                  self.KEY,
                  parse.quote(encodeutils.safe_encode(resource_type)))
        if template_type:
            url_str += '?%s' % parse.urlencode(
                {'template_type': template_type}, True)
        resp = self.client.get(url_str)

        body = utils.get_response_body(resp)