# Path: boto3/docs/base.py
# class BaseDocumenter:
#     def __init__(self, resource):
#         self._resource = resource
#         self._client = self._resource.meta.client
#         self._resource_model = self._resource.meta.resource_model
#         self._service_model = self._client.meta.service_model
#         self._resource_name = self._resource.meta.resource_model.name
#         self._service_name = self._service_model.service_name
#         self._service_docs_name = self._client.__class__.__name__
#         self.member_map = OrderedDict()
#         self.represents_service_resource = (
#             self._service_name == self._resource_name
#         )
# 
#     @property
#     def class_name(self):
#         return f'{self._service_docs_name}.{self._resource_name}'
# 
# Path: boto3/docs/method.py
# def document_model_driven_resource_method(
#     section,
#     method_name,
#     operation_model,
#     event_emitter,
#     method_description=None,
#     example_prefix=None,
#     include_input=None,
#     include_output=None,
#     exclude_input=None,
#     exclude_output=None,
#     document_output=True,
#     resource_action_model=None,
#     include_signature=True,
# ):
# 
#     document_model_driven_method(
#         section=section,
#         method_name=method_name,
#         operation_model=operation_model,
#         event_emitter=event_emitter,
#         method_description=method_description,
#         example_prefix=example_prefix,
#         include_input=include_input,
#         include_output=include_output,
#         exclude_input=exclude_input,
#         exclude_output=exclude_output,
#         document_output=document_output,
#         include_signature=include_signature,
#     )
# 
#     # If this action returns a resource modify the return example to
#     # appropriately reflect that.
#     if resource_action_model.resource:
#         if 'return' in section.available_sections:
#             section.delete_section('return')
#         resource_type = resource_action_model.resource.type
# 
#         new_return_section = section.add_new_section('return')
#         return_resource_type = '{}.{}'.format(
#             operation_model.service_model.service_name, resource_type
#         )
# 
#         return_type = f':py:class:`{return_resource_type}`'
#         return_description = f'{resource_type} resource'
# 
#         if _method_returns_resource_list(resource_action_model.resource):
#             return_type = f'list({return_type})'
#             return_description = f'A list of {resource_type} resources'
# 
#         new_return_section.style.new_line()
#         new_return_section.write(f':rtype: {return_type}')
#         new_return_section.style.new_line()
#         new_return_section.write(f':returns: {return_description}')
#         new_return_section.style.new_line()
# 
# Path: boto3/docs/utils.py
# def add_resource_type_overview(
#     section, resource_type, description, intro_link=None
# ):
#     section.style.new_line()
#     section.write('.. rst-class:: admonition-title')
#     section.style.new_line()
#     section.style.new_line()
#     section.write(resource_type)
#     section.style.new_line()
#     section.style.new_line()
#     section.write(description)
#     section.style.new_line()
#     if intro_link is not None:
#         section.write(
#             f'For more information about {resource_type.lower()} refer to the '
#             f':ref:`Resources Introduction Guide<{intro_link}>`.'
#         )
#         section.style.new_line()
# 
# def get_resource_ignore_params(params):
#     """Helper method to determine which parameters to ignore for actions
# 
#     :returns: A list of the parameter names that does not need to be
#         included in a resource's method call for documentation purposes.
#     """
#     ignore_params = []
#     for param in params:
#         result = jmespath.compile(param.target)
#         current = result.parsed
#         # Use JMESPath to find the left most element in the target expression
#         # which will be the parameter to ignore in the action call.
#         while current['children']:
#             current = current['children'][0]
#         # Make sure the parameter we are about to ignore is a field.
#         # If it is not, we should ignore the result to avoid false positives.
#         if current['type'] == 'field':
#             ignore_params.append(current['value'])
#     return ignore_params


from botocore import xform_name
from botocore.docs.method import get_instance_public_methods
from botocore.docs.utils import DocumentedShape
from boto3.docs.base import BaseDocumenter
from boto3.docs.method import document_model_driven_resource_method
from boto3.docs.utils import (
    add_resource_type_overview,
    get_resource_ignore_params,
)
    if service_model.service_name == resource_name:
        example_resource_name = resource_name

    custom_action_info_dict = {
        'all': {
            'method_description': (
                f'Creates an iterable of all {collection_model.resource.type} '
                f'resources in the collection.'
            ),
            'example_prefix': '{}_iterator = {}.{}.all'.format(
                xform_name(collection_model.resource.type),
                example_resource_name,
                collection_model.name,
            ),
            'exclude_input': underlying_operation_members,
        },
        'filter': {
            'method_description': (
                f'Creates an iterable of all {collection_model.resource.type} '
                f'resources in the collection filtered by kwargs passed to '
                f'method. A {collection_model.resource.type} collection will '
                f'include all resources by default if no filters are provided, '
                f'and extreme caution should be taken when performing actions '
                f'on all resources.'
            ),
            'example_prefix': '{}_iterator = {}.{}.filter'.format(
                xform_name(collection_model.resource.type),
                example_resource_name,
                collection_model.name,
            ),

# Path: boto3/docs/base.py
# class BaseDocumenter:
#     def __init__(self, resource):
#         self._resource = resource
#         self._client = self._resource.meta.client
#         self._resource_model = self._resource.meta.resource_model
#         self._service_model = self._client.meta.service_model
#         self._resource_name = self._resource.meta.resource_model.name
#         self._service_name = self._service_model.service_name
#         self._service_docs_name = self._client.__class__.__name__
#         self.member_map = OrderedDict()
#         self.represents_service_resource = (
#             self._service_name == self._resource_name
#         )
# 
#     @property
#     def class_name(self):
#         return f'{self._service_docs_name}.{self._resource_name}'
# 
# Path: boto3/docs/method.py
# def document_model_driven_resource_method(
#     section,
#     method_name,
#     operation_model,
#     event_emitter,
#     method_description=None,
#     example_prefix=None,
#     include_input=None,
#     include_output=None,
#     exclude_input=None,
#     exclude_output=None,
#     document_output=True,
#     resource_action_model=None,
#     include_signature=True,
# ):
# 
#     document_model_driven_method(
#         section=section,
#         method_name=method_name,
#         operation_model=operation_model,
#         event_emitter=event_emitter,
#         method_description=method_description,
#         example_prefix=example_prefix,
#         include_input=include_input,
#         include_output=include_output,
#         exclude_input=exclude_input,
#         exclude_output=exclude_output,
#         document_output=document_output,
#         include_signature=include_signature,
#     )
# 
#     # If this action returns a resource modify the return example to
#     # appropriately reflect that.
#     if resource_action_model.resource:
#         if 'return' in section.available_sections:
#             section.delete_section('return')
#         resource_type = resource_action_model.resource.type
# 
#         new_return_section = section.add_new_section('return')
#         return_resource_type = '{}.{}'.format(
#             operation_model.service_model.service_name, resource_type
#         )
# 
#         return_type = f':py:class:`{return_resource_type}`'
#         return_description = f'{resource_type} resource'
# 
#         if _method_returns_resource_list(resource_action_model.resource):
#             return_type = f'list({return_type})'
#             return_description = f'A list of {resource_type} resources'
# 
#         new_return_section.style.new_line()
#         new_return_section.write(f':rtype: {return_type}')
#         new_return_section.style.new_line()
#         new_return_section.write(f':returns: {return_description}')
#         new_return_section.style.new_line()
# 
# Path: boto3/docs/utils.py
# def add_resource_type_overview(
#     section, resource_type, description, intro_link=None
# ):
#     section.style.new_line()
#     section.write('.. rst-class:: admonition-title')
#     section.style.new_line()
#     section.style.new_line()
#     section.write(resource_type)
#     section.style.new_line()
#     section.style.new_line()
#     section.write(description)
#     section.style.new_line()
#     if intro_link is not None:
#         section.write(
#             f'For more information about {resource_type.lower()} refer to the '
#             f':ref:`Resources Introduction Guide<{intro_link}>`.'
#         )
#         section.style.new_line()
# 
# def get_resource_ignore_params(params):
#     """Helper method to determine which parameters to ignore for actions
# 
#     :returns: A list of the parameter names that does not need to be
#         included in a resource's method call for documentation purposes.
#     """
#     ignore_params = []
#     for param in params:
#         result = jmespath.compile(param.target)
#         current = result.parsed
#         # Use JMESPath to find the left most element in the target expression
#         # which will be the parameter to ignore in the action call.
#         while current['children']:
#             current = current['children'][0]
#         # Make sure the parameter we are about to ignore is a field.
#         # If it is not, we should ignore the result to avoid false positives.
#         if current['type'] == 'field':
#             ignore_params.append(current['value'])
#     return ignore_params


# Path: boto3/docs/collection.py
from botocore import xform_name
from botocore.docs.method import get_instance_public_methods
from botocore.docs.utils import DocumentedShape
from boto3.docs.base import BaseDocumenter
from boto3.docs.method import document_model_driven_resource_method
from boto3.docs.utils import (
    add_resource_type_overview,
    get_resource_ignore_params,
)

    if service_model.service_name == resource_name:
        example_resource_name = resource_name

    custom_action_info_dict = {
        'all': {
            'method_description': (
                f'Creates an iterable of all {collection_model.resource.type} '
                f'resources in the collection.'
            ),
            'example_prefix': '{}_iterator = {}.{}.all'.format(
                xform_name(collection_model.resource.type),
                example_resource_name,
                collection_model.name,
            ),
            'exclude_input': underlying_operation_members,
        },
        'filter': {
            'method_description': (
                f'Creates an iterable of all {collection_model.resource.type} '
                f'resources in the collection filtered by kwargs passed to '
                f'method. A {collection_model.resource.type} collection will '
                f'include all resources by default if no filters are provided, '
                f'and extreme caution should be taken when performing actions '
                f'on all resources.'
            ),
            'example_prefix': '{}_iterator = {}.{}.filter'.format(
                xform_name(collection_model.resource.type),
                example_resource_name,
                collection_model.name,
            ),

            'exclude_input': get_resource_ignore_params(