# coding: utf-8

"""
    external/v1/external_session_service.proto

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: version not set
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git

    NOTE
    ----
    standard swagger-codegen-cli for this python client has been modified
    by custom templates. The purpose of these templates is to include
    typing information in the API and Model code. Please refer to the
    main grid repository for more info
"""


import pprint
import re  # noqa: F401
from typing import TYPE_CHECKING

import six

from grid.openapi.configuration import Configuration

if TYPE_CHECKING:
    from datetime import datetime
    from grid.openapi.models import *

class V1ComputeUsage(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 = {
        'billed_time_seconds': 'str',
        'cluster_id': 'str',
        'cost': 'float',
        'created_at': 'datetime',
        'deleted_at': 'datetime',
        'hourly_cost': 'float',
        'id': 'str',
        'instance_type': 'str',
        'name': 'str',
        'resource_type': 'str',
        'resources': 'V1Resources',
        'user_id': 'str'
    }

    attribute_map = {
        'billed_time_seconds': 'billedTimeSeconds',
        'cluster_id': 'clusterId',
        'cost': 'cost',
        'created_at': 'createdAt',
        'deleted_at': 'deletedAt',
        'hourly_cost': 'hourlyCost',
        'id': 'id',
        'instance_type': 'instanceType',
        'name': 'name',
        'resource_type': 'resourceType',
        'resources': 'resources',
        'user_id': 'userId'
    }

    def __init__(self, billed_time_seconds: 'str' = None, cluster_id: 'str' = None, cost: 'float' = None, created_at: 'datetime' = None, deleted_at: 'datetime' = None, hourly_cost: 'float' = None, id: 'str' = None, instance_type: 'str' = None, name: 'str' = None, resource_type: 'str' = None, resources: 'V1Resources' = None, user_id: 'str' = None, _configuration=None):  # noqa: E501
        """V1ComputeUsage - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._billed_time_seconds = None
        self._cluster_id = None
        self._cost = None
        self._created_at = None
        self._deleted_at = None
        self._hourly_cost = None
        self._id = None
        self._instance_type = None
        self._name = None
        self._resource_type = None
        self._resources = None
        self._user_id = None
        self.discriminator = None

        if billed_time_seconds is not None:
            self.billed_time_seconds = billed_time_seconds
        if cluster_id is not None:
            self.cluster_id = cluster_id
        if cost is not None:
            self.cost = cost
        if created_at is not None:
            self.created_at = created_at
        if deleted_at is not None:
            self.deleted_at = deleted_at
        if hourly_cost is not None:
            self.hourly_cost = hourly_cost
        if id is not None:
            self.id = id
        if instance_type is not None:
            self.instance_type = instance_type
        if name is not None:
            self.name = name
        if resource_type is not None:
            self.resource_type = resource_type
        if resources is not None:
            self.resources = resources
        if user_id is not None:
            self.user_id = user_id

    @property
    def billed_time_seconds(self) -> 'str':
        """Gets the billed_time_seconds of this V1ComputeUsage.  # noqa: E501


        :return: The billed_time_seconds of this V1ComputeUsage.  # noqa: E501
        :rtype: str
        """
        return self._billed_time_seconds

    @billed_time_seconds.setter
    def billed_time_seconds(self, billed_time_seconds: 'str'):
        """Sets the billed_time_seconds of this V1ComputeUsage.


        :param billed_time_seconds: The billed_time_seconds of this V1ComputeUsage.  # noqa: E501
        :type: str
        """

        self._billed_time_seconds = billed_time_seconds

    @property
    def cluster_id(self) -> 'str':
        """Gets the cluster_id of this V1ComputeUsage.  # noqa: E501


        :return: The cluster_id of this V1ComputeUsage.  # noqa: E501
        :rtype: str
        """
        return self._cluster_id

    @cluster_id.setter
    def cluster_id(self, cluster_id: 'str'):
        """Sets the cluster_id of this V1ComputeUsage.


        :param cluster_id: The cluster_id of this V1ComputeUsage.  # noqa: E501
        :type: str
        """

        self._cluster_id = cluster_id

    @property
    def cost(self) -> 'float':
        """Gets the cost of this V1ComputeUsage.  # noqa: E501


        :return: The cost of this V1ComputeUsage.  # noqa: E501
        :rtype: float
        """
        return self._cost

    @cost.setter
    def cost(self, cost: 'float'):
        """Sets the cost of this V1ComputeUsage.


        :param cost: The cost of this V1ComputeUsage.  # noqa: E501
        :type: float
        """

        self._cost = cost

    @property
    def created_at(self) -> 'datetime':
        """Gets the created_at of this V1ComputeUsage.  # noqa: E501


        :return: The created_at of this V1ComputeUsage.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at: 'datetime'):
        """Sets the created_at of this V1ComputeUsage.


        :param created_at: The created_at of this V1ComputeUsage.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

    @property
    def deleted_at(self) -> 'datetime':
        """Gets the deleted_at of this V1ComputeUsage.  # noqa: E501


        :return: The deleted_at of this V1ComputeUsage.  # noqa: E501
        :rtype: datetime
        """
        return self._deleted_at

    @deleted_at.setter
    def deleted_at(self, deleted_at: 'datetime'):
        """Sets the deleted_at of this V1ComputeUsage.


        :param deleted_at: The deleted_at of this V1ComputeUsage.  # noqa: E501
        :type: datetime
        """

        self._deleted_at = deleted_at

    @property
    def hourly_cost(self) -> 'float':
        """Gets the hourly_cost of this V1ComputeUsage.  # noqa: E501


        :return: The hourly_cost of this V1ComputeUsage.  # noqa: E501
        :rtype: float
        """
        return self._hourly_cost

    @hourly_cost.setter
    def hourly_cost(self, hourly_cost: 'float'):
        """Sets the hourly_cost of this V1ComputeUsage.


        :param hourly_cost: The hourly_cost of this V1ComputeUsage.  # noqa: E501
        :type: float
        """

        self._hourly_cost = hourly_cost

    @property
    def id(self) -> 'str':
        """Gets the id of this V1ComputeUsage.  # noqa: E501


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

    @id.setter
    def id(self, id: 'str'):
        """Sets the id of this V1ComputeUsage.


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

        self._id = id

    @property
    def instance_type(self) -> 'str':
        """Gets the instance_type of this V1ComputeUsage.  # noqa: E501


        :return: The instance_type of this V1ComputeUsage.  # noqa: E501
        :rtype: str
        """
        return self._instance_type

    @instance_type.setter
    def instance_type(self, instance_type: 'str'):
        """Sets the instance_type of this V1ComputeUsage.


        :param instance_type: The instance_type of this V1ComputeUsage.  # noqa: E501
        :type: str
        """

        self._instance_type = instance_type

    @property
    def name(self) -> 'str':
        """Gets the name of this V1ComputeUsage.  # noqa: E501


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

    @name.setter
    def name(self, name: 'str'):
        """Sets the name of this V1ComputeUsage.


        :param name: The name of this V1ComputeUsage.  # noqa: E501
        :type: str
        """

        self._name = name

    @property
    def resource_type(self) -> 'str':
        """Gets the resource_type of this V1ComputeUsage.  # noqa: E501


        :return: The resource_type of this V1ComputeUsage.  # noqa: E501
        :rtype: str
        """
        return self._resource_type

    @resource_type.setter
    def resource_type(self, resource_type: 'str'):
        """Sets the resource_type of this V1ComputeUsage.


        :param resource_type: The resource_type of this V1ComputeUsage.  # noqa: E501
        :type: str
        """

        self._resource_type = resource_type

    @property
    def resources(self) -> 'V1Resources':
        """Gets the resources of this V1ComputeUsage.  # noqa: E501


        :return: The resources of this V1ComputeUsage.  # noqa: E501
        :rtype: V1Resources
        """
        return self._resources

    @resources.setter
    def resources(self, resources: 'V1Resources'):
        """Sets the resources of this V1ComputeUsage.


        :param resources: The resources of this V1ComputeUsage.  # noqa: E501
        :type: V1Resources
        """

        self._resources = resources

    @property
    def user_id(self) -> 'str':
        """Gets the user_id of this V1ComputeUsage.  # noqa: E501


        :return: The user_id of this V1ComputeUsage.  # noqa: E501
        :rtype: str
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id: 'str'):
        """Sets the user_id of this V1ComputeUsage.


        :param user_id: The user_id of this V1ComputeUsage.  # noqa: E501
        :type: str
        """

        self._user_id = user_id

    def to_dict(self) -> dict:
        """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(V1ComputeUsage, dict):
            for key, value in self.items():
                result[key] = value

        return result

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

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

    def __eq__(self, other: 'V1ComputeUsage') -> bool:
        """Returns true if both objects are equal"""
        if not isinstance(other, V1ComputeUsage):
            return False

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

    def __ne__(self, other: 'V1ComputeUsage') -> bool:
        """Returns true if both objects are not equal"""
        if not isinstance(other, V1ComputeUsage):
            return True

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