# Path: InstagramAPI/src/http/Response/Objects/Comment.py
# class Comment(object):
#     def __init__(self, commentData):
#         self.status = None
#         self.username_id = None
#         self.created_at_utc = None
#         self.created_at = None
#         self.bit_flags = None
#         self.user = None
#         self.comment = None
#         self.pk = None
#         self.type = None
#         self.media_id = None
# 
#         self.status = commentData['status']
#         if 'user_id' in commentData and commentData['user_id']:
#             self.username_id = commentData['user_id']
#         self.created_at_utc = commentData['created_at_utc']
#         self.created_at = commentData['created_at']
#         if 'bit_flags' in commentData and commentData['bit_flags']:
#             self.bit_flags = commentData['bit_flags']
#         self.user = User(commentData['user'])
#         self.comment = commentData['text']
#         self.pk = commentData['pk']
#         if 'type' in commentData and commentData['type']:
#             self.type = commentData['type']
#         if 'media_id' in commentData and commentData['media_id']:
#             self.media_id = commentData['media_id']
# 
#     def getStatus(self):
#         return self.status
# 
#     def getUsernameId(self):
#         return self.username_id
# 
#     def getCreatedAtUtc(self):
#         return self.created_at_utc
# 
#     def created_at(self):
#         return self.created_at
# 
#     def getBitFlags(self):
#         return self.bit_flags
# 
#     def getUser(self):
#         return self.user
# 
#     def getComment(self):
#         return self.comment
# 
#     def getCommentId(self):
#         return self.pk
# 
#     def getType(self):
#         return self.type
# 
#     def getMediaId(self):
#         return self.media_id
# 
# Path: InstagramAPI/src/http/Response/Response.py
# class Response(object):
#     STATUS_OK = "ok"
#     STATUS_FAIL = "fail"
# 
#     status = None
#     message = None
#     fullResponse = None
# 
#     def setStatus(self, status):
#         self.status = status
# 
#     def getStatus(self):
#         return self.status
# 
#     def setMessage(self, message):
#         self.message = message
# 
#     def getMessage(self):
#         return self.message
# 
#     def setFullResponse(self, response):
#         self.fullResponse = response
# 
#     def getFullResponse(self):
#         return self.fullResponse
# 
#     def isOk(self):
#         return self.getStatus() == Response.STATUS_OK


from InstagramAPI.src.http.Response.Objects.Comment import Comment
from .Response import Response


class CommentResponse(Response):
    def __init__(self, response):
        self.comment = None

        if self.STATUS_OK == response['status']:
            if 'comment' in response and response['comment']:
                self.comments = Comment(response['comment'])

        else:

# Path: InstagramAPI/src/http/Response/Objects/Comment.py
# class Comment(object):
#     def __init__(self, commentData):
#         self.status = None
#         self.username_id = None
#         self.created_at_utc = None
#         self.created_at = None
#         self.bit_flags = None
#         self.user = None
#         self.comment = None
#         self.pk = None
#         self.type = None
#         self.media_id = None
# 
#         self.status = commentData['status']
#         if 'user_id' in commentData and commentData['user_id']:
#             self.username_id = commentData['user_id']
#         self.created_at_utc = commentData['created_at_utc']
#         self.created_at = commentData['created_at']
#         if 'bit_flags' in commentData and commentData['bit_flags']:
#             self.bit_flags = commentData['bit_flags']
#         self.user = User(commentData['user'])
#         self.comment = commentData['text']
#         self.pk = commentData['pk']
#         if 'type' in commentData and commentData['type']:
#             self.type = commentData['type']
#         if 'media_id' in commentData and commentData['media_id']:
#             self.media_id = commentData['media_id']
# 
#     def getStatus(self):
#         return self.status
# 
#     def getUsernameId(self):
#         return self.username_id
# 
#     def getCreatedAtUtc(self):
#         return self.created_at_utc
# 
#     def created_at(self):
#         return self.created_at
# 
#     def getBitFlags(self):
#         return self.bit_flags
# 
#     def getUser(self):
#         return self.user
# 
#     def getComment(self):
#         return self.comment
# 
#     def getCommentId(self):
#         return self.pk
# 
#     def getType(self):
#         return self.type
# 
#     def getMediaId(self):
#         return self.media_id
# 
# Path: InstagramAPI/src/http/Response/Response.py
# class Response(object):
#     STATUS_OK = "ok"
#     STATUS_FAIL = "fail"
# 
#     status = None
#     message = None
#     fullResponse = None
# 
#     def setStatus(self, status):
#         self.status = status
# 
#     def getStatus(self):
#         return self.status
# 
#     def setMessage(self, message):
#         self.message = message
# 
#     def getMessage(self):
#         return self.message
# 
#     def setFullResponse(self, response):
#         self.fullResponse = response
# 
#     def getFullResponse(self):
#         return self.fullResponse
# 
#     def isOk(self):
#         return self.getStatus() == Response.STATUS_OK


# Path: InstagramAPI/src/http/Response/CommentResponse.py
from InstagramAPI.src.http.Response.Objects.Comment import Comment
from .Response import Response



class CommentResponse(Response):
    def __init__(self, response):
        self.comment = None

        if self.STATUS_OK == response['status']:
            if 'comment' in response and response['comment']:
                self.comments = Comment(response['comment'])

        else:

            self.setMessage(response['message'])