# Path: awslimitchecker/services/firehose.py
# class _FirehoseService(_AwsService):
# 
#     service_name = 'Firehose'
#     api_name = 'firehose'
#     quotas_service_code = 'firehose'
# 
#     def find_usage(self):
#         """
#         Determine the current usage for each limit of this service,
#         and update corresponding Limit via
#         :py:meth:`~.AwsLimit._add_current_usage`.
#         """
#         logger.debug("Checking usage for service %s", self.service_name)
#         self.connect()
#         for lim in self.limits.values():
#             lim._reset_usage()
#         try:
#             self._find_delivery_streams()
#         except EndpointConnectionError as ex:
#             logger.warning(
#                 'Caught exception when trying to use Firehose ('
#                 'perhaps the Firehose service is not available in this '
#                 'region?): %s', ex
#             )
# 
#         self._have_usage = True
#         logger.debug("Done checking usage.")
# 
#     def _find_delivery_streams(self):
#         streams = self.conn.list_delivery_streams()
#         usage = len(streams['DeliveryStreamNames'])
#         while streams.get('HasMoreDeliveryStreams'):
#             last_stream_name = streams['DeliveryStreamNames'][-1]
#             streams = self.conn.list_delivery_streams(
#                 ExclusiveStartDeliveryStreamName=last_stream_name)
#             usage += len(streams['DeliveryStreamNames'])
#         self.limits['Delivery streams per region']._add_current_usage(
#             usage,
#             resource_id=self._boto3_connection_kwargs['region_name'],
#             aws_type='AWS::KinesisFirehose::DeliveryStream',
#         )
# 
#     def get_limits(self):
#         """
#         Return all known limits for this service, as a dict of their names
#         to :py:class:`~.AwsLimit` objects.
# 
#         :returns: dict of limit names to :py:class:`~.AwsLimit` objects
#         :rtype: dict
#         """
#         if self.limits != {}:
#             return self.limits
#         limits = {}
#         limits['Delivery streams per region'] = AwsLimit(
#             'Delivery streams per region',
#             self,
#             50,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::KinesisFirehose::DeliveryStream',
#             quotas_name='Delivery streams'
#         )
#         self.limits = limits
#         return limits
# 
#     def required_iam_permissions(self):
#         """
#         Return a list of IAM Actions required for this Service to function
#         properly. All Actions will be shown with an Effect of "Allow"
#         and a Resource of "*".
# 
#         :returns: list of IAM Action strings
#         :rtype: list
#         """
#         return [
#             "firehose:ListDeliveryStreams",
#         ]
# 
# Path: awslimitchecker/tests/services/result_fixtures.py
# def get_boto3_resource_model(service_name, resource_name):
#     def test_instance_usage(self):
#     def test_instance_usage_vcpu(self):
#     def test_instance_usage_key_error(self):
#     def test_find_usage_networking_sgs(self):
#     def test_find_usage_networking_eips(self):
#     def test_find_usage_networking_eni_sg(self):
# class EBS(object):
# class VPC(object):
# class RDS(object):
# class ElasticBeanstalk(object):
# class CloudFront(object):
# class ELB(object):
# class Lambda(object):
# class ElastiCache(object):
# class EC2(object):
# class IAM(object):
# class Firehose(object):
# class Redshift(object):
# class ApiGateway(object):
# class DynamoDB(object):
# class Route53(object):
# class CloudTrail(object):
# class Kinesis(object):
# class EKS(object):
# class CertificateManager(object):


import sys
from awslimitchecker.services.firehose import _FirehoseService
from awslimitchecker.tests.services import result_fixtures
from botocore.exceptions import EndpointConnectionError
    from mock import call, patch, Mock
    from unittest.mock import call, patch, Mock
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with awslimitchecker.  If not, see <http://www.gnu.org/licenses/>.

The Copyright and Authors attributions contained herein may not be removed or
otherwise altered, except to add the Author attribution of a contributor to
this work. (Additional Terms pursuant to Section 7b of the AGPL v3)
################################################################################
While not legally required, I sincerely request that anyone who finds
bugs please submit them at <https://github.com/jantman/awslimitchecker> or
to me via email, and that you send any contributions or improvements
either as a pull request on GitHub, or to me via email.
################################################################################

AUTHORS:
Hugo Lopes Tavares <hltbra@gmail.com>
################################################################################
"""


# https://code.google.com/p/mock/issues/detail?id=249
# py>=3.4 should use unittest.mock not the mock package on pypi
if (
        sys.version_info[0] < 3 or
        sys.version_info[0] == 3 and sys.version_info[1] < 4
):
else:



# Path: awslimitchecker/services/firehose.py
# class _FirehoseService(_AwsService):
# 
#     service_name = 'Firehose'
#     api_name = 'firehose'
#     quotas_service_code = 'firehose'
# 
#     def find_usage(self):
#         """
#         Determine the current usage for each limit of this service,
#         and update corresponding Limit via
#         :py:meth:`~.AwsLimit._add_current_usage`.
#         """
#         logger.debug("Checking usage for service %s", self.service_name)
#         self.connect()
#         for lim in self.limits.values():
#             lim._reset_usage()
#         try:
#             self._find_delivery_streams()
#         except EndpointConnectionError as ex:
#             logger.warning(
#                 'Caught exception when trying to use Firehose ('
#                 'perhaps the Firehose service is not available in this '
#                 'region?): %s', ex
#             )
# 
#         self._have_usage = True
#         logger.debug("Done checking usage.")
# 
#     def _find_delivery_streams(self):
#         streams = self.conn.list_delivery_streams()
#         usage = len(streams['DeliveryStreamNames'])
#         while streams.get('HasMoreDeliveryStreams'):
#             last_stream_name = streams['DeliveryStreamNames'][-1]
#             streams = self.conn.list_delivery_streams(
#                 ExclusiveStartDeliveryStreamName=last_stream_name)
#             usage += len(streams['DeliveryStreamNames'])
#         self.limits['Delivery streams per region']._add_current_usage(
#             usage,
#             resource_id=self._boto3_connection_kwargs['region_name'],
#             aws_type='AWS::KinesisFirehose::DeliveryStream',
#         )
# 
#     def get_limits(self):
#         """
#         Return all known limits for this service, as a dict of their names
#         to :py:class:`~.AwsLimit` objects.
# 
#         :returns: dict of limit names to :py:class:`~.AwsLimit` objects
#         :rtype: dict
#         """
#         if self.limits != {}:
#             return self.limits
#         limits = {}
#         limits['Delivery streams per region'] = AwsLimit(
#             'Delivery streams per region',
#             self,
#             50,
#             self.warning_threshold,
#             self.critical_threshold,
#             limit_type='AWS::KinesisFirehose::DeliveryStream',
#             quotas_name='Delivery streams'
#         )
#         self.limits = limits
#         return limits
# 
#     def required_iam_permissions(self):
#         """
#         Return a list of IAM Actions required for this Service to function
#         properly. All Actions will be shown with an Effect of "Allow"
#         and a Resource of "*".
# 
#         :returns: list of IAM Action strings
#         :rtype: list
#         """
#         return [
#             "firehose:ListDeliveryStreams",
#         ]
# 
# Path: awslimitchecker/tests/services/result_fixtures.py
# def get_boto3_resource_model(service_name, resource_name):
#     def test_instance_usage(self):
#     def test_instance_usage_vcpu(self):
#     def test_instance_usage_key_error(self):
#     def test_find_usage_networking_sgs(self):
#     def test_find_usage_networking_eips(self):
#     def test_find_usage_networking_eni_sg(self):
# class EBS(object):
# class VPC(object):
# class RDS(object):
# class ElasticBeanstalk(object):
# class CloudFront(object):
# class ELB(object):
# class Lambda(object):
# class ElastiCache(object):
# class EC2(object):
# class IAM(object):
# class Firehose(object):
# class Redshift(object):
# class ApiGateway(object):
# class DynamoDB(object):
# class Route53(object):
# class CloudTrail(object):
# class Kinesis(object):
# class EKS(object):
# class CertificateManager(object):


# Path: awslimitchecker/tests/services/test_firehose.py
import sys
from awslimitchecker.services.firehose import _FirehoseService
from awslimitchecker.tests.services import result_fixtures
from botocore.exceptions import EndpointConnectionError
    from mock import call, patch, Mock
    from unittest.mock import call, patch, Mock

    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with awslimitchecker.  If not, see <http://www.gnu.org/licenses/>.

The Copyright and Authors attributions contained herein may not be removed or
otherwise altered, except to add the Author attribution of a contributor to
this work. (Additional Terms pursuant to Section 7b of the AGPL v3)
################################################################################
While not legally required, I sincerely request that anyone who finds
bugs please submit them at <https://github.com/jantman/awslimitchecker> or
to me via email, and that you send any contributions or improvements
either as a pull request on GitHub, or to me via email.
################################################################################

AUTHORS:
Hugo Lopes Tavares <hltbra@gmail.com>
################################################################################
"""


# https://code.google.com/p/mock/issues/detail?id=249
# py>=3.4 should use unittest.mock not the mock package on pypi
if (
        sys.version_info[0] < 3 or
        sys.version_info[0] == 3 and sys.version_info[1] < 4
):
else:



fixtures = result_fixtures.Firehose()