# coding: utf-8

"""
    external/v1/auth_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

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

class V1SystemMetrics(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 = {
        'cpu': 'V1CPUSystemMetrics',
        'gpu': 'list[V1GPUSystemMetrics]',
        'storage': 'V1StorageSystemMetrics',
        'timestamp': 'datetime'
    }

    attribute_map = {
        'cpu': 'cpu',
        'gpu': 'gpu',
        'storage': 'storage',
        'timestamp': 'timestamp'
    }

    def __init__(self, cpu: 'V1CPUSystemMetrics' =None, gpu: 'list[V1GPUSystemMetrics]' =None, storage: 'V1StorageSystemMetrics' =None, timestamp: 'datetime' =None):  # noqa: E501
        """V1SystemMetrics - a model defined in Swagger"""  # noqa: E501
        self._cpu = None
        self._gpu = None
        self._storage = None
        self._timestamp = None
        self.discriminator = None
        if cpu is not None:
            self.cpu = cpu
        if gpu is not None:
            self.gpu = gpu
        if storage is not None:
            self.storage = storage
        if timestamp is not None:
            self.timestamp = timestamp

    @property
    def cpu(self) -> 'V1CPUSystemMetrics':
        """Gets the cpu of this V1SystemMetrics.  # noqa: E501


        :return: The cpu of this V1SystemMetrics.  # noqa: E501
        :rtype: V1CPUSystemMetrics
        """
        return self._cpu

    @cpu.setter
    def cpu(self, cpu: 'V1CPUSystemMetrics'):
        """Sets the cpu of this V1SystemMetrics.


        :param cpu: The cpu of this V1SystemMetrics.  # noqa: E501
        :type: V1CPUSystemMetrics
        """

        self._cpu = cpu

    @property
    def gpu(self) -> 'list[V1GPUSystemMetrics]':
        """Gets the gpu of this V1SystemMetrics.  # noqa: E501


        :return: The gpu of this V1SystemMetrics.  # noqa: E501
        :rtype: list[V1GPUSystemMetrics]
        """
        return self._gpu

    @gpu.setter
    def gpu(self, gpu: 'list[V1GPUSystemMetrics]'):
        """Sets the gpu of this V1SystemMetrics.


        :param gpu: The gpu of this V1SystemMetrics.  # noqa: E501
        :type: list[V1GPUSystemMetrics]
        """

        self._gpu = gpu

    @property
    def storage(self) -> 'V1StorageSystemMetrics':
        """Gets the storage of this V1SystemMetrics.  # noqa: E501


        :return: The storage of this V1SystemMetrics.  # noqa: E501
        :rtype: V1StorageSystemMetrics
        """
        return self._storage

    @storage.setter
    def storage(self, storage: 'V1StorageSystemMetrics'):
        """Sets the storage of this V1SystemMetrics.


        :param storage: The storage of this V1SystemMetrics.  # noqa: E501
        :type: V1StorageSystemMetrics
        """

        self._storage = storage

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


        :return: The timestamp of this V1SystemMetrics.  # noqa: E501
        :rtype: datetime
        """
        return self._timestamp

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


        :param timestamp: The timestamp of this V1SystemMetrics.  # noqa: E501
        :type: datetime
        """

        self._timestamp = timestamp

    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(V1SystemMetrics, 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: 'V1SystemMetrics') -> bool:
        """Returns true if both objects are equal"""
        if not isinstance(other, V1SystemMetrics):
            return False

        return self.__dict__ == other.__dict__

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