# Path: shelf/json_response.py
# class JsonResponse(flask.Response):
#     def __init__(self, *args, **kwargs):
#         super(JsonResponse, self).__init__(*args, **kwargs)
#         self.headers["Content-Type"] = "application/json"
# 
#     def set_data(self, data):
#         if not isinstance(data, basestring):
#             data = json.dumps(data)
# 
#         super(JsonResponse, self).set_data(data)
# 
# Path: shelf/cloud/cloud_exceptions.py
# class ArtifactNotFoundError(CloudStorageException):
#     def __init__(self, artifact_name):
#         message = "Artifact {0} not found".format(artifact_name)
#         super(ArtifactNotFoundError, self).__init__(message, ErrorCode.RESOURCE_NOT_FOUND)
# 
# class DuplicateArtifactError(CloudStorageException):
#     def __init__(self, artifact_name):
#         message = "Artifact by name {0} already exists in current directory".format(artifact_name)
#         super(DuplicateArtifactError, self).__init__(message, ErrorCode.DUPLICATE_ARTIFACT)
# 
# class BucketConfigurationNotFound(CloudStorageException):
#     def __init__(self, bucket_name):
#         message = "Could not find configuration for bucket {0}".format(bucket_name)
#         super(BucketConfigurationNotFound, self).__init__(message, ErrorCode.RESOURCE_NOT_FOUND)
# 
# Path: shelf/error_code.py
# class ErrorCode(object):
#     RESOURCE_NOT_FOUND = "resource_not_found"
#     INTERNAL_SERVER_ERROR = "internal_server_error"
#     DUPLICATE_ARTIFACT = "duplicate_artifact"
#     INVALID_ARTIFACT_NAME = "invalid_artifact_name"
#     FORBIDDEN = "forbidden"
#     INVALID_SEARCH_CRITERIA = "invalid_search_criteria"
#     BAD_REQUEST = "bad_request"
#     PERMISSION_DENIED = "permission_denied"
#     INVALID_REQUEST_DATA_FORMAT = "invalid_request_data_format"


from shelf.json_response import JsonResponse
from shelf.cloud.cloud_exceptions import ArtifactNotFoundError, DuplicateArtifactError, BucketConfigurationNotFound
from shelf.error_code import ErrorCode
from shelf.metadata.error_code import ErrorCode as MetadataErrorCode
    }

    return vnd_error(error)


def create_201():
    """
        Creates a 201 response
    """
    response = JsonResponse()
    response.status_code = 201
    return response


def create_204():
    """
        Creates a 204 response
    """
    response = JsonResponse()
    response.status_code = 204
    return response


def create_200(body):
    """
        Creates a 200 response

        Args:
            body(dict): body of response.
    """

# Path: shelf/json_response.py
# class JsonResponse(flask.Response):
#     def __init__(self, *args, **kwargs):
#         super(JsonResponse, self).__init__(*args, **kwargs)
#         self.headers["Content-Type"] = "application/json"
# 
#     def set_data(self, data):
#         if not isinstance(data, basestring):
#             data = json.dumps(data)
# 
#         super(JsonResponse, self).set_data(data)
# 
# Path: shelf/cloud/cloud_exceptions.py
# class ArtifactNotFoundError(CloudStorageException):
#     def __init__(self, artifact_name):
#         message = "Artifact {0} not found".format(artifact_name)
#         super(ArtifactNotFoundError, self).__init__(message, ErrorCode.RESOURCE_NOT_FOUND)
# 
# class DuplicateArtifactError(CloudStorageException):
#     def __init__(self, artifact_name):
#         message = "Artifact by name {0} already exists in current directory".format(artifact_name)
#         super(DuplicateArtifactError, self).__init__(message, ErrorCode.DUPLICATE_ARTIFACT)
# 
# class BucketConfigurationNotFound(CloudStorageException):
#     def __init__(self, bucket_name):
#         message = "Could not find configuration for bucket {0}".format(bucket_name)
#         super(BucketConfigurationNotFound, self).__init__(message, ErrorCode.RESOURCE_NOT_FOUND)
# 
# Path: shelf/error_code.py
# class ErrorCode(object):
#     RESOURCE_NOT_FOUND = "resource_not_found"
#     INTERNAL_SERVER_ERROR = "internal_server_error"
#     DUPLICATE_ARTIFACT = "duplicate_artifact"
#     INVALID_ARTIFACT_NAME = "invalid_artifact_name"
#     FORBIDDEN = "forbidden"
#     INVALID_SEARCH_CRITERIA = "invalid_search_criteria"
#     BAD_REQUEST = "bad_request"
#     PERMISSION_DENIED = "permission_denied"
#     INVALID_REQUEST_DATA_FORMAT = "invalid_request_data_format"


# Path: shelf/response_map.py
from shelf.json_response import JsonResponse
from shelf.cloud.cloud_exceptions import ArtifactNotFoundError, DuplicateArtifactError, BucketConfigurationNotFound
from shelf.error_code import ErrorCode
from shelf.metadata.error_code import ErrorCode as MetadataErrorCode

    }

    return vnd_error(error)


def create_201():
    """
        Creates a 201 response
    """
    response = JsonResponse()
    response.status_code = 201
    return response


def create_204():
    """
        Creates a 204 response
    """
    response = JsonResponse()
    response.status_code = 204
    return response


def create_200(body):
    """
        Creates a 200 response

        Args:
            body(dict): body of response.
    """

    response = JsonResponse()