# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class WorkloadConnectionCredentials(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'workload_connection': 'DecoratedWorkloadConnectionInfo',
        'file_credentials': 'list[FileCredential]',
        'expires_at': 'int'
    }

    attribute_map = {
        'workload_connection': 'workload_connection',
        'file_credentials': 'file_credentials',
        'expires_at': 'expires_at'
    }

    def __init__(self, workload_connection=None, file_credentials=None, expires_at=None, local_vars_configuration=None):  # noqa: E501
        """WorkloadConnectionCredentials - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._workload_connection = None
        self._file_credentials = None
        self._expires_at = None
        self.discriminator = None

        self.workload_connection = workload_connection
        self.file_credentials = file_credentials
        if expires_at is not None:
            self.expires_at = expires_at

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

        Information about the workload connection  # noqa: E501

        :return: The workload_connection of this WorkloadConnectionCredentials.  # noqa: E501
        :rtype: DecoratedWorkloadConnectionInfo
        """
        return self._workload_connection

    @workload_connection.setter
    def workload_connection(self, workload_connection):
        """Sets the workload_connection of this WorkloadConnectionCredentials.

        Information about the workload connection  # noqa: E501

        :param workload_connection: The workload_connection of this WorkloadConnectionCredentials.  # noqa: E501
        :type: DecoratedWorkloadConnectionInfo
        """
        if self.local_vars_configuration.client_side_validation and workload_connection is None:  # noqa: E501
            raise ValueError("Invalid value for `workload_connection`, must not be `None`")  # noqa: E501

        self._workload_connection = workload_connection

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

        List of file credentials  # noqa: E501

        :return: The file_credentials of this WorkloadConnectionCredentials.  # noqa: E501
        :rtype: list[FileCredential]
        """
        return self._file_credentials

    @file_credentials.setter
    def file_credentials(self, file_credentials):
        """Sets the file_credentials of this WorkloadConnectionCredentials.

        List of file credentials  # noqa: E501

        :param file_credentials: The file_credentials of this WorkloadConnectionCredentials.  # noqa: E501
        :type: list[FileCredential]
        """
        if self.local_vars_configuration.client_side_validation and file_credentials is None:  # noqa: E501
            raise ValueError("Invalid value for `file_credentials`, must not be `None`")  # noqa: E501

        self._file_credentials = file_credentials

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

        Unix timestamp when the token expires  # noqa: E501

        :return: The expires_at of this WorkloadConnectionCredentials.  # noqa: E501
        :rtype: int
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this WorkloadConnectionCredentials.

        Unix timestamp when the token expires  # noqa: E501

        :param expires_at: The expires_at of this WorkloadConnectionCredentials.  # noqa: E501
        :type: int
        """

        self._expires_at = expires_at

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

        for attr, _ in six.iteritems(self.openapi_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

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
