# 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_collector_cloudwatch import LogCollectorCloudwatch  # noqa: F401,E501
from kps_api.models.log_collector_destination import LogCollectorDestination  # noqa: F401,E501
from kps_api.models.log_collector_kinesis import LogCollectorKinesis  # noqa: F401,E501
from kps_api.models.log_collector_sources import LogCollectorSources  # noqa: F401,E501
from kps_api.models.log_collector_stackdriver import LogCollectorStackdriver  # noqa: F401,E501
from kps_api.models.log_collector_status import LogCollectorStatus  # noqa: F401,E501
from kps_api.models.log_collector_type import LogCollectorType  # noqa: F401,E501


class LogCollector(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 = {
        'cloud_creds_id': 'str',
        'cloudwatch_details': 'LogCollectorCloudwatch',
        'code': 'str',
        'dest': 'LogCollectorDestination',
        'id': 'str',
        'kinesis_details': 'LogCollectorKinesis',
        'name': 'str',
        'project_id': 'str',
        'sources': 'LogCollectorSources',
        'stackdriver_details': 'LogCollectorStackdriver',
        'state': 'LogCollectorStatus',
        'type': 'LogCollectorType'
    }

    attribute_map = {
        'cloud_creds_id': 'cloudCredsID',
        'cloudwatch_details': 'cloudwatchDetails',
        'code': 'code',
        'dest': 'dest',
        'id': 'id',
        'kinesis_details': 'kinesisDetails',
        'name': 'name',
        'project_id': 'projectId',
        'sources': 'sources',
        'stackdriver_details': 'stackdriverDetails',
        'state': 'state',
        'type': 'type'
    }

    def __init__(self, cloud_creds_id=None, cloudwatch_details=None, code=None, dest=None, id=None, kinesis_details=None, name=None, project_id=None, sources=None, stackdriver_details=None, state=None, type=None):  # noqa: E501
        """LogCollector - a model defined in Swagger"""  # noqa: E501
        self._cloud_creds_id = None
        self._cloudwatch_details = None
        self._code = None
        self._dest = None
        self._id = None
        self._kinesis_details = None
        self._name = None
        self._project_id = None
        self._sources = None
        self._stackdriver_details = None
        self._state = None
        self._type = None
        self.discriminator = None
        self.cloud_creds_id = cloud_creds_id
        if cloudwatch_details is not None:
            self.cloudwatch_details = cloudwatch_details
        if code is not None:
            self.code = code
        self.dest = dest
        if id is not None:
            self.id = id
        if kinesis_details is not None:
            self.kinesis_details = kinesis_details
        self.name = name
        if project_id is not None:
            self.project_id = project_id
        self.sources = sources
        if stackdriver_details is not None:
            self.stackdriver_details = stackdriver_details
        self.state = state
        self.type = type

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

        CloudCreds id. Destination id for the cloud (should match with the CloudDestinationType)  # noqa: E501

        :return: The cloud_creds_id of this LogCollector.  # noqa: E501
        :rtype: str
        """
        return self._cloud_creds_id

    @cloud_creds_id.setter
    def cloud_creds_id(self, cloud_creds_id):
        """Sets the cloud_creds_id of this LogCollector.

        CloudCreds id. Destination id for the cloud (should match with the CloudDestinationType)  # noqa: E501

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

        self._cloud_creds_id = cloud_creds_id

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


        :return: The cloudwatch_details of this LogCollector.  # noqa: E501
        :rtype: LogCollectorCloudwatch
        """
        return self._cloudwatch_details

    @cloudwatch_details.setter
    def cloudwatch_details(self, cloudwatch_details):
        """Sets the cloudwatch_details of this LogCollector.


        :param cloudwatch_details: The cloudwatch_details of this LogCollector.  # noqa: E501
        :type: LogCollectorCloudwatch
        """

        self._cloudwatch_details = cloudwatch_details

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

        A code to modify logs during collection Log stream modifications (script source code)  # noqa: E501

        :return: The code of this LogCollector.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this LogCollector.

        A code to modify logs during collection Log stream modifications (script source code)  # noqa: E501

        :param code: The code of this LogCollector.  # noqa: E501
        :type: str
        """

        self._code = code

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


        :return: The dest of this LogCollector.  # noqa: E501
        :rtype: LogCollectorDestination
        """
        return self._dest

    @dest.setter
    def dest(self, dest):
        """Sets the dest of this LogCollector.


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

        self._dest = dest

    @property
    def id(self):
        """Gets the id of this LogCollector.  # 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 LogCollector.  # noqa: E501
        :rtype: str
        """
        return self._id

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

        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 LogCollector.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The kinesis_details of this LogCollector.  # noqa: E501
        :rtype: LogCollectorKinesis
        """
        return self._kinesis_details

    @kinesis_details.setter
    def kinesis_details(self, kinesis_details):
        """Sets the kinesis_details of this LogCollector.


        :param kinesis_details: The kinesis_details of this LogCollector.  # noqa: E501
        :type: LogCollectorKinesis
        """

        self._kinesis_details = kinesis_details

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

        Name of the LogCollector. Visible by UI only  # noqa: E501

        :return: The name of this LogCollector.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this LogCollector.

        Name of the LogCollector. Visible by UI only  # noqa: E501

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

        self._name = name

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

        ID of parent project. This should be required for PROJECT log collectors.  # noqa: E501

        :return: The project_id of this LogCollector.  # noqa: E501
        :rtype: str
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this LogCollector.

        ID of parent project. This should be required for PROJECT log collectors.  # noqa: E501

        :param project_id: The project_id of this LogCollector.  # noqa: E501
        :type: str
        """

        self._project_id = project_id

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


        :return: The sources of this LogCollector.  # noqa: E501
        :rtype: LogCollectorSources
        """
        return self._sources

    @sources.setter
    def sources(self, sources):
        """Sets the sources of this LogCollector.


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

        self._sources = sources

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


        :return: The stackdriver_details of this LogCollector.  # noqa: E501
        :rtype: LogCollectorStackdriver
        """
        return self._stackdriver_details

    @stackdriver_details.setter
    def stackdriver_details(self, stackdriver_details):
        """Sets the stackdriver_details of this LogCollector.


        :param stackdriver_details: The stackdriver_details of this LogCollector.  # noqa: E501
        :type: LogCollectorStackdriver
        """

        self._stackdriver_details = stackdriver_details

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


        :return: The state of this LogCollector.  # noqa: E501
        :rtype: LogCollectorStatus
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this LogCollector.


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

        self._state = state

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


        :return: The type of this LogCollector.  # noqa: E501
        :rtype: LogCollectorType
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this LogCollector.


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

        self._type = type

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

        return self.__dict__ == other.__dict__

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