# Path: lamvery/clients/base.py
# class BaseClient:
# 
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, region=None, profile=None, dry_run=False):
#         self._session = boto3.session.Session(
#             profile_name=profile, region_name=region)
#         self._dry_run = dry_run
#         self._sts = self._session.client('sts')
# 
#     def get_account_id(self):
#         return self._sts.get_caller_identity().get('Account')


import botocore
import json
from lamvery.clients.base import BaseClient
# -*- coding: utf-8 -*-




class ApiGatewayClient(BaseClient):

    def __init__(self, *args, **kwargs):
        super(ApiGatewayClient, self).__init__(*args, **kwargs)
        self._api = self._session.client('apigateway')

    def get_rest_api(self, api_id):
        if api_id is None:
            return None

        try:
            return self._api.get_rest_api(restApiId=api_id)
        except botocore.exceptions.ClientError:
            return None

    def get_export(self, api_id, stage):
        if api_id is None:
            return {}

        try:
            ret = self._api.get_export(
                restApiId=api_id,

# Path: lamvery/clients/base.py
# class BaseClient:
# 
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, region=None, profile=None, dry_run=False):
#         self._session = boto3.session.Session(
#             profile_name=profile, region_name=region)
#         self._dry_run = dry_run
#         self._sts = self._session.client('sts')
# 
#     def get_account_id(self):
#         return self._sts.get_caller_identity().get('Account')


# Path: lamvery/clients/apigateway.py
import botocore
import json
from lamvery.clients.base import BaseClient

# -*- coding: utf-8 -*-




class ApiGatewayClient(BaseClient):

    def __init__(self, *args, **kwargs):
        super(ApiGatewayClient, self).__init__(*args, **kwargs)
        self._api = self._session.client('apigateway')

    def get_rest_api(self, api_id):
        if api_id is None:
            return None

        try:
            return self._api.get_rest_api(restApiId=api_id)
        except botocore.exceptions.ClientError:
            return None

    def get_export(self, api_id, stage):
        if api_id is None:
            return {}

        try:
            ret = self._api.get_export(
                restApiId=api_id,

                stageName=stage,