<filename>openapi_client/models/shared_cloud_discovery_result.py
# coding: utf-8

"""
    Prisma Cloud Compute API

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

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from openapi_client.configuration import Configuration


class SharedCloudDiscoveryResult(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 = {
        'account_id': 'str',
        'collections': 'list[str]',
        'credential_id': 'str',
        'defended': 'int',
        'entities': 'list[SharedCloudDiscoveryEntity]',
        'err': 'str',
        'project': 'str',
        'provider': 'CommonCloudProvider',
        'region': 'str',
        'registry': 'str',
        'service_type': 'SharedScanResultType',
        'total': 'int'
    }

    attribute_map = {
        'account_id': 'accountID',
        'collections': 'collections',
        'credential_id': 'credentialId',
        'defended': 'defended',
        'entities': 'entities',
        'err': 'err',
        'project': 'project',
        'provider': 'provider',
        'region': 'region',
        'registry': 'registry',
        'service_type': 'serviceType',
        'total': 'total'
    }

    def __init__(self, account_id=None, collections=None, credential_id=None, defended=None, entities=None, err=None, project=None, provider=None, region=None, registry=None, service_type=None, total=None, local_vars_configuration=None):  # noqa: E501
        """SharedCloudDiscoveryResult - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._account_id = None
        self._collections = None
        self._credential_id = None
        self._defended = None
        self._entities = None
        self._err = None
        self._project = None
        self._provider = None
        self._region = None
        self._registry = None
        self._service_type = None
        self._total = None
        self.discriminator = None

        if account_id is not None:
            self.account_id = account_id
        if collections is not None:
            self.collections = collections
        if credential_id is not None:
            self.credential_id = credential_id
        if defended is not None:
            self.defended = defended
        if entities is not None:
            self.entities = entities
        if err is not None:
            self.err = err
        if project is not None:
            self.project = project
        if provider is not None:
            self.provider = provider
        if region is not None:
            self.region = region
        if registry is not None:
            self.registry = registry
        if service_type is not None:
            self.service_type = service_type
        if total is not None:
            self.total = total

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

        AccountID is the cloud account ID.   # noqa: E501

        :return: The account_id of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: str
        """
        return self._account_id

    @account_id.setter
    def account_id(self, account_id):
        """Sets the account_id of this SharedCloudDiscoveryResult.

        AccountID is the cloud account ID.   # noqa: E501

        :param account_id: The account_id of this SharedCloudDiscoveryResult.  # noqa: E501
        :type account_id: str
        """

        self._account_id = account_id

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

        Collections are the matched result collections.   # noqa: E501

        :return: The collections of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._collections

    @collections.setter
    def collections(self, collections):
        """Sets the collections of this SharedCloudDiscoveryResult.

        Collections are the matched result collections.   # noqa: E501

        :param collections: The collections of this SharedCloudDiscoveryResult.  # noqa: E501
        :type collections: list[str]
        """

        self._collections = collections

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

        CredentialID is the id reference of the credential used.   # noqa: E501

        :return: The credential_id of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: str
        """
        return self._credential_id

    @credential_id.setter
    def credential_id(self, credential_id):
        """Sets the credential_id of this SharedCloudDiscoveryResult.

        CredentialID is the id reference of the credential used.   # noqa: E501

        :param credential_id: The credential_id of this SharedCloudDiscoveryResult.  # noqa: E501
        :type credential_id: str
        """

        self._credential_id = credential_id

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

        Defended is the number of defended entities (registries, functions, clusters).   # noqa: E501

        :return: The defended of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: int
        """
        return self._defended

    @defended.setter
    def defended(self, defended):
        """Sets the defended of this SharedCloudDiscoveryResult.

        Defended is the number of defended entities (registries, functions, clusters).   # noqa: E501

        :param defended: The defended of this SharedCloudDiscoveryResult.  # noqa: E501
        :type defended: int
        """

        self._defended = defended

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

        Entities holds detailed scan results.   # noqa: E501

        :return: The entities of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: list[SharedCloudDiscoveryEntity]
        """
        return self._entities

    @entities.setter
    def entities(self, entities):
        """Sets the entities of this SharedCloudDiscoveryResult.

        Entities holds detailed scan results.   # noqa: E501

        :param entities: The entities of this SharedCloudDiscoveryResult.  # noqa: E501
        :type entities: list[SharedCloudDiscoveryEntity]
        """

        self._entities = entities

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

        Err holds any error found during a scan.   # noqa: E501

        :return: The err of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: str
        """
        return self._err

    @err.setter
    def err(self, err):
        """Sets the err of this SharedCloudDiscoveryResult.

        Err holds any error found during a scan.   # noqa: E501

        :param err: The err of this SharedCloudDiscoveryResult.  # noqa: E501
        :type err: str
        """

        self._err = err

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

        Project is the GCP project that was scanned.   # noqa: E501

        :return: The project of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: str
        """
        return self._project

    @project.setter
    def project(self, project):
        """Sets the project of this SharedCloudDiscoveryResult.

        Project is the GCP project that was scanned.   # noqa: E501

        :param project: The project of this SharedCloudDiscoveryResult.  # noqa: E501
        :type project: str
        """

        self._project = project

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


        :return: The provider of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: CommonCloudProvider
        """
        return self._provider

    @provider.setter
    def provider(self, provider):
        """Sets the provider of this SharedCloudDiscoveryResult.


        :param provider: The provider of this SharedCloudDiscoveryResult.  # noqa: E501
        :type provider: CommonCloudProvider
        """

        self._provider = provider

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

        Region is the region that was scanned, for example: GCP - \"us-east-1\", Azure - \"westus\".   # noqa: E501

        :return: The region of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: str
        """
        return self._region

    @region.setter
    def region(self, region):
        """Sets the region of this SharedCloudDiscoveryResult.

        Region is the region that was scanned, for example: GCP - \"us-east-1\", Azure - \"westus\".   # noqa: E501

        :param region: The region of this SharedCloudDiscoveryResult.  # noqa: E501
        :type region: str
        """

        self._region = region

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

        Registry is the Azure registry that was scanned, for example: testcloudscanregistry.azurecr.io.   # noqa: E501

        :return: The registry of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: str
        """
        return self._registry

    @registry.setter
    def registry(self, registry):
        """Sets the registry of this SharedCloudDiscoveryResult.

        Registry is the Azure registry that was scanned, for example: testcloudscanregistry.azurecr.io.   # noqa: E501

        :param registry: The registry of this SharedCloudDiscoveryResult.  # noqa: E501
        :type registry: str
        """

        self._registry = registry

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


        :return: The service_type of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: SharedScanResultType
        """
        return self._service_type

    @service_type.setter
    def service_type(self, service_type):
        """Sets the service_type of this SharedCloudDiscoveryResult.


        :param service_type: The service_type of this SharedCloudDiscoveryResult.  # noqa: E501
        :type service_type: SharedScanResultType
        """

        self._service_type = service_type

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

        Total is total number of entities found in cloud scan.   # noqa: E501

        :return: The total of this SharedCloudDiscoveryResult.  # noqa: E501
        :rtype: int
        """
        return self._total

    @total.setter
    def total(self, total):
        """Sets the total of this SharedCloudDiscoveryResult.

        Total is total number of entities found in cloud scan.   # noqa: E501

        :param total: The total of this SharedCloudDiscoveryResult.  # noqa: E501
        :type total: int
        """

        self._total = total

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, SharedCloudDiscoveryResult):
            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, SharedCloudDiscoveryResult):
            return True

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