# 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.audit_log_v2_multiple_values import AuditLogV2MultipleValues  # noqa: F401,E501


class AuditLogV2Filter(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 = {
        'end_time': 'datetime',
        'from_document': 'int',
        'group_by': 'str',
        'page_size': 'int',
        'scopes': 'list[str]',
        'start_time': 'datetime',
        'terms_key_value': 'dict(str, AuditLogV2MultipleValues)'
    }

    attribute_map = {
        'end_time': 'endTime',
        'from_document': 'fromDocument',
        'group_by': 'groupBy',
        'page_size': 'pageSize',
        'scopes': 'scopes',
        'start_time': 'startTime',
        'terms_key_value': 'termsKeyValue'
    }

    def __init__(self, end_time=None, from_document=None, group_by=None, page_size=None, scopes=None, start_time=None, terms_key_value=None):  # noqa: E501
        """AuditLogV2Filter - a model defined in Swagger"""  # noqa: E501
        self._end_time = None
        self._from_document = None
        self._group_by = None
        self._page_size = None
        self._scopes = None
        self._start_time = None
        self._terms_key_value = None
        self.discriminator = None
        if end_time is not None:
            self.end_time = end_time
        if from_document is not None:
            self.from_document = from_document
        if group_by is not None:
            self.group_by = group_by
        if page_size is not None:
            self.page_size = page_size
        if scopes is not None:
            self.scopes = scopes
        if start_time is not None:
            self.start_time = start_time
        self.terms_key_value = terms_key_value

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

        Search for events by this earlier timestamp (inclusive).  # noqa: E501

        :return: The end_time of this AuditLogV2Filter.  # noqa: E501
        :rtype: datetime
        """
        return self._end_time

    @end_time.setter
    def end_time(self, end_time):
        """Sets the end_time of this AuditLogV2Filter.

        Search for events by this earlier timestamp (inclusive).  # noqa: E501

        :param end_time: The end_time of this AuditLogV2Filter.  # noqa: E501
        :type: datetime
        """

        self._end_time = end_time

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


        :return: The from_document of this AuditLogV2Filter.  # noqa: E501
        :rtype: int
        """
        return self._from_document

    @from_document.setter
    def from_document(self, from_document):
        """Sets the from_document of this AuditLogV2Filter.


        :param from_document: The from_document of this AuditLogV2Filter.  # noqa: E501
        :type: int
        """

        self._from_document = from_document

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


        :return: The group_by of this AuditLogV2Filter.  # noqa: E501
        :rtype: str
        """
        return self._group_by

    @group_by.setter
    def group_by(self, group_by):
        """Sets the group_by of this AuditLogV2Filter.


        :param group_by: The group_by of this AuditLogV2Filter.  # noqa: E501
        :type: str
        """

        self._group_by = group_by

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


        :return: The page_size of this AuditLogV2Filter.  # noqa: E501
        :rtype: int
        """
        return self._page_size

    @page_size.setter
    def page_size(self, page_size):
        """Sets the page_size of this AuditLogV2Filter.


        :param page_size: The page_size of this AuditLogV2Filter.  # noqa: E501
        :type: int
        """

        self._page_size = page_size

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


        :return: The scopes of this AuditLogV2Filter.  # noqa: E501
        :rtype: list[str]
        """
        return self._scopes

    @scopes.setter
    def scopes(self, scopes):
        """Sets the scopes of this AuditLogV2Filter.


        :param scopes: The scopes of this AuditLogV2Filter.  # noqa: E501
        :type: list[str]
        """

        self._scopes = scopes

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

        Search for events by this later timestamp (inclusive)  # noqa: E501

        :return: The start_time of this AuditLogV2Filter.  # noqa: E501
        :rtype: datetime
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this AuditLogV2Filter.

        Search for events by this later timestamp (inclusive)  # noqa: E501

        :param start_time: The start_time of this AuditLogV2Filter.  # noqa: E501
        :type: datetime
        """

        self._start_time = start_time

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

        TenantID must be provided in order to search audit logs  # noqa: E501

        :return: The terms_key_value of this AuditLogV2Filter.  # noqa: E501
        :rtype: dict(str, AuditLogV2MultipleValues)
        """
        return self._terms_key_value

    @terms_key_value.setter
    def terms_key_value(self, terms_key_value):
        """Sets the terms_key_value of this AuditLogV2Filter.

        TenantID must be provided in order to search audit logs  # noqa: E501

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

        self._terms_key_value = terms_key_value

    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(AuditLogV2Filter, 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, AuditLogV2Filter):
            return False

        return self.__dict__ == other.__dict__

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