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


class CloudCredsListResponsePayload(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 = {
        'order_by': 'str',
        'order_by_keys': 'list[str]',
        'page_index': 'int',
        'page_size': 'int',
        'result': 'list[CloudCreds]',
        'total_count': 'int'
    }

    attribute_map = {
        'order_by': 'orderBy',
        'order_by_keys': 'orderByKeys',
        'page_index': 'pageIndex',
        'page_size': 'pageSize',
        'result': 'result',
        'total_count': 'totalCount'
    }

    def __init__(self, order_by=None, order_by_keys=None, page_index=None, page_size=None, result=None, total_count=None):  # noqa: E501
        """CloudCredsListResponsePayload - a model defined in Swagger"""  # noqa: E501
        self._order_by = None
        self._order_by_keys = None
        self._page_index = None
        self._page_size = None
        self._result = None
        self._total_count = None
        self.discriminator = None
        if order_by is not None:
            self.order_by = order_by
        if order_by_keys is not None:
            self.order_by_keys = order_by_keys
        self.page_index = page_index
        self.page_size = page_size
        self.result = result
        self.total_count = total_count

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

        Specify result order. Zero or more entries with format: &ltkey> [desc] where orderByKeys lists allowed keys in each response.  # noqa: E501

        :return: The order_by of this CloudCredsListResponsePayload.  # noqa: E501
        :rtype: str
        """
        return self._order_by

    @order_by.setter
    def order_by(self, order_by):
        """Sets the order_by of this CloudCredsListResponsePayload.

        Specify result order. Zero or more entries with format: &ltkey> [desc] where orderByKeys lists allowed keys in each response.  # noqa: E501

        :param order_by: The order_by of this CloudCredsListResponsePayload.  # noqa: E501
        :type: str
        """

        self._order_by = order_by

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

        Keys that can be used in orderBy.  # noqa: E501

        :return: The order_by_keys of this CloudCredsListResponsePayload.  # noqa: E501
        :rtype: list[str]
        """
        return self._order_by_keys

    @order_by_keys.setter
    def order_by_keys(self, order_by_keys):
        """Sets the order_by_keys of this CloudCredsListResponsePayload.

        Keys that can be used in orderBy.  # noqa: E501

        :param order_by_keys: The order_by_keys of this CloudCredsListResponsePayload.  # noqa: E501
        :type: list[str]
        """

        self._order_by_keys = order_by_keys

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

        0-based index of the page to fetch results.  # noqa: E501

        :return: The page_index of this CloudCredsListResponsePayload.  # noqa: E501
        :rtype: int
        """
        return self._page_index

    @page_index.setter
    def page_index(self, page_index):
        """Sets the page_index of this CloudCredsListResponsePayload.

        0-based index of the page to fetch results.  # noqa: E501

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

        self._page_index = page_index

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

        Item count of each page.  # noqa: E501

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

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

        Item count of each page.  # noqa: E501

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

        self._page_size = page_size

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

        list of cloud profiles  # noqa: E501

        :return: The result of this CloudCredsListResponsePayload.  # noqa: E501
        :rtype: list[CloudCreds]
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this CloudCredsListResponsePayload.

        list of cloud profiles  # noqa: E501

        :param result: The result of this CloudCredsListResponsePayload.  # noqa: E501
        :type: list[CloudCreds]
        """
        if result is None:
            raise ValueError("Invalid value for `result`, must not be `None`")  # noqa: E501

        self._result = result

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

        Count of all items matching the query.  # noqa: E501

        :return: The total_count of this CloudCredsListResponsePayload.  # noqa: E501
        :rtype: int
        """
        return self._total_count

    @total_count.setter
    def total_count(self, total_count):
        """Sets the total_count of this CloudCredsListResponsePayload.

        Count of all items matching the query.  # noqa: E501

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

        self._total_count = total_count

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

        return self.__dict__ == other.__dict__

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