# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from kps_api.models.log_tag import LogTag  # noqa: F401,E501
from kps_api.models.log_upload_status import LogUploadStatus  # noqa: F401,E501


class LogEntry(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'batch_id': 'str',
        'edge_id': 'str',
        'error_message': 'str',
        'id': 'str',
        'location': 'str',
        'status': 'LogUploadStatus',
        'tags': 'list[LogTag]'
    }

    attribute_map = {
        'batch_id': 'batchId',
        'edge_id': 'edgeId',
        'error_message': 'errorMessage',
        'id': 'id',
        'location': 'location',
        'status': 'status',
        'tags': 'tags'
    }

    def __init__(self, batch_id=None, edge_id=None, error_message=None, id=None, location=None, status=None, tags=None):  # noqa: E501
        """LogEntry - a model defined in Swagger"""  # noqa: E501
        self._batch_id = None
        self._edge_id = None
        self._error_message = None
        self._id = None
        self._location = None
        self._status = None
        self._tags = None
        self.discriminator = None
        if batch_id is not None:
            self.batch_id = batch_id
        self.edge_id = edge_id
        if error_message is not None:
            self.error_message = error_message
        if id is not None:
            self.id = id
        if location is not None:
            self.location = location
        if status is not None:
            self.status = status
        if tags is not None:
            self.tags = tags

    @property
    def batch_id(self):
        """Gets the batch_id of this LogEntry.  # noqa: E501

        ID that identifies logs from different edge as the same batch.  # noqa: E501

        :return: The batch_id of this LogEntry.  # noqa: E501
        :rtype: str
        """
        return self._batch_id

    @batch_id.setter
    def batch_id(self, batch_id):
        """Sets the batch_id of this LogEntry.

        ID that identifies logs from different edge as the same batch.  # noqa: E501

        :param batch_id: The batch_id of this LogEntry.  # noqa: E501
        :type: str
        """

        self._batch_id = batch_id

    @property
    def edge_id(self):
        """Gets the edge_id of this LogEntry.  # noqa: E501

        ID of the edge this entity belongs to  # noqa: E501

        :return: The edge_id of this LogEntry.  # noqa: E501
        :rtype: str
        """
        return self._edge_id

    @edge_id.setter
    def edge_id(self, edge_id):
        """Sets the edge_id of this LogEntry.

        ID of the edge this entity belongs to  # noqa: E501

        :param edge_id: The edge_id of this LogEntry.  # noqa: E501
        :type: str
        """
        if edge_id is None:
            raise ValueError("Invalid value for `edge_id`, must not be `None`")  # noqa: E501

        self._edge_id = edge_id

    @property
    def error_message(self):
        """Gets the error_message of this LogEntry.  # noqa: E501

        Error message - optional, should be populated when status == 'FAILED'  # noqa: E501

        :return: The error_message of this LogEntry.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this LogEntry.

        Error message - optional, should be populated when status == 'FAILED'  # noqa: E501

        :param error_message: The error_message of this LogEntry.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

    @property
    def id(self):
        """Gets the id of this LogEntry.  # noqa: E501

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

        :return: The id of this LogEntry.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this LogEntry.

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

        :param id: The id of this LogEntry.  # noqa: E501
        :type: str
        """

        self._id = id

    @property
    def location(self):
        """Gets the location of this LogEntry.  # noqa: E501

        Location or object key for the log in the bucket.  # noqa: E501

        :return: The location of this LogEntry.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this LogEntry.

        Location or object key for the log in the bucket.  # noqa: E501

        :param location: The location of this LogEntry.  # noqa: E501
        :type: str
        """

        self._location = location

    @property
    def status(self):
        """Gets the status of this LogEntry.  # noqa: E501


        :return: The status of this LogEntry.  # noqa: E501
        :rtype: LogUploadStatus
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this LogEntry.


        :param status: The status of this LogEntry.  # noqa: E501
        :type: LogUploadStatus
        """

        self._status = status

    @property
    def tags(self):
        """Gets the tags of this LogEntry.  # noqa: E501

        Tags carry the properties of the log  # noqa: E501

        :return: The tags of this LogEntry.  # noqa: E501
        :rtype: list[LogTag]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this LogEntry.

        Tags carry the properties of the log  # noqa: E501

        :param tags: The tags of this LogEntry.  # noqa: E501
        :type: list[LogTag]
        """

        self._tags = tags

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(LogEntry, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, LogEntry):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
