# 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 V1UserRequestedComputeConfig(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 = {
        'affinity_identifier': 'str',
        'count': 'int',
        'cpu_image_override': 'str',
        'disk_size': 'int',
        'gpu_image_override': 'str',
        'id': 'str',
        'is_byom': 'bool',
        'name': 'str',
        'preemptible': 'bool',
        'same_compute_on_resume': 'bool',
        'shm_size': 'int'
    }

    attribute_map = {
        'affinity_identifier': 'affinityIdentifier',
        'count': 'count',
        'cpu_image_override': 'cpuImageOverride',
        'disk_size': 'diskSize',
        'gpu_image_override': 'gpuImageOverride',
        'id': 'id',
        'is_byom': 'isByom',
        'name': 'name',
        'preemptible': 'preemptible',
        'same_compute_on_resume': 'sameComputeOnResume',
        'shm_size': 'shmSize'
    }

    def __init__(self, affinity_identifier: 'str' =None, count: 'int' =None, cpu_image_override: 'str' =None, disk_size: 'int' =None, gpu_image_override: 'str' =None, id: 'str' =None, is_byom: 'bool' =None, name: 'str' =None, preemptible: 'bool' =None, same_compute_on_resume: 'bool' =None, shm_size: 'int' =None):  # noqa: E501
        """V1UserRequestedComputeConfig - a model defined in Swagger"""  # noqa: E501
        self._affinity_identifier = None
        self._count = None
        self._cpu_image_override = None
        self._disk_size = None
        self._gpu_image_override = None
        self._id = None
        self._is_byom = None
        self._name = None
        self._preemptible = None
        self._same_compute_on_resume = None
        self._shm_size = None
        self.discriminator = None
        if affinity_identifier is not None:
            self.affinity_identifier = affinity_identifier
        if count is not None:
            self.count = count
        if cpu_image_override is not None:
            self.cpu_image_override = cpu_image_override
        if disk_size is not None:
            self.disk_size = disk_size
        if gpu_image_override is not None:
            self.gpu_image_override = gpu_image_override
        if id is not None:
            self.id = id
        if is_byom is not None:
            self.is_byom = is_byom
        if name is not None:
            self.name = name
        if preemptible is not None:
            self.preemptible = preemptible
        if same_compute_on_resume is not None:
            self.same_compute_on_resume = same_compute_on_resume
        if shm_size is not None:
            self.shm_size = shm_size

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

        affinity_identifier is an arbitrary value that is used to co-located different works in the same zone.  # noqa: E501

        :return: The affinity_identifier of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: str
        """
        return self._affinity_identifier

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

        affinity_identifier is an arbitrary value that is used to co-located different works in the same zone.  # noqa: E501

        :param affinity_identifier: The affinity_identifier of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: str
        """

        self._affinity_identifier = affinity_identifier

    @property
    def count(self) -> 'int':
        """Gets the count of this V1UserRequestedComputeConfig.  # noqa: E501


        :return: The count of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: int
        """
        return self._count

    @count.setter
    def count(self, count: 'int'):
        """Sets the count of this V1UserRequestedComputeConfig.


        :param count: The count of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: int
        """

        self._count = count

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

        cpu_image_override is used to specify a custom image used to launch the resource when running on a cpu machine.  # noqa: E501

        :return: The cpu_image_override of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: str
        """
        return self._cpu_image_override

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

        cpu_image_override is used to specify a custom image used to launch the resource when running on a cpu machine.  # noqa: E501

        :param cpu_image_override: The cpu_image_override of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: str
        """

        self._cpu_image_override = cpu_image_override

    @property
    def disk_size(self) -> 'int':
        """Gets the disk_size of this V1UserRequestedComputeConfig.  # noqa: E501


        :return: The disk_size of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: int
        """
        return self._disk_size

    @disk_size.setter
    def disk_size(self, disk_size: 'int'):
        """Sets the disk_size of this V1UserRequestedComputeConfig.


        :param disk_size: The disk_size of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: int
        """

        self._disk_size = disk_size

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

        gpu_image_override is used to specify a custom image used to launch the resource when running on a cpu machine.  # noqa: E501

        :return: The gpu_image_override of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: str
        """
        return self._gpu_image_override

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

        gpu_image_override is used to specify a custom image used to launch the resource when running on a cpu machine.  # noqa: E501

        :param gpu_image_override: The gpu_image_override of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: str
        """

        self._gpu_image_override = gpu_image_override

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


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

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


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

        self._id = id

    @property
    def is_byom(self) -> 'bool':
        """Gets the is_byom of this V1UserRequestedComputeConfig.  # noqa: E501


        :return: The is_byom of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: bool
        """
        return self._is_byom

    @is_byom.setter
    def is_byom(self, is_byom: 'bool'):
        """Sets the is_byom of this V1UserRequestedComputeConfig.


        :param is_byom: The is_byom of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: bool
        """

        self._is_byom = is_byom

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


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

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


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

        self._name = name

    @property
    def preemptible(self) -> 'bool':
        """Gets the preemptible of this V1UserRequestedComputeConfig.  # noqa: E501


        :return: The preemptible of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: bool
        """
        return self._preemptible

    @preemptible.setter
    def preemptible(self, preemptible: 'bool'):
        """Sets the preemptible of this V1UserRequestedComputeConfig.


        :param preemptible: The preemptible of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: bool
        """

        self._preemptible = preemptible

    @property
    def same_compute_on_resume(self) -> 'bool':
        """Gets the same_compute_on_resume of this V1UserRequestedComputeConfig.  # noqa: E501


        :return: The same_compute_on_resume of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: bool
        """
        return self._same_compute_on_resume

    @same_compute_on_resume.setter
    def same_compute_on_resume(self, same_compute_on_resume: 'bool'):
        """Sets the same_compute_on_resume of this V1UserRequestedComputeConfig.


        :param same_compute_on_resume: The same_compute_on_resume of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: bool
        """

        self._same_compute_on_resume = same_compute_on_resume

    @property
    def shm_size(self) -> 'int':
        """Gets the shm_size of this V1UserRequestedComputeConfig.  # noqa: E501


        :return: The shm_size of this V1UserRequestedComputeConfig.  # noqa: E501
        :rtype: int
        """
        return self._shm_size

    @shm_size.setter
    def shm_size(self, shm_size: 'int'):
        """Sets the shm_size of this V1UserRequestedComputeConfig.


        :param shm_size: The shm_size of this V1UserRequestedComputeConfig.  # noqa: E501
        :type: int
        """

        self._shm_size = shm_size

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

        return self.__dict__ == other.__dict__

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