# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from kps_api.models.cloud_profile_info import CloudProfileInfo  # noqa: F401,E501
from kps_api.models.container_registry_info import ContainerRegistryInfo  # noqa: F401,E501


class ContainerRegistryV2(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 = {
        'cloud_profile_info': 'CloudProfileInfo',
        'container_registry_info': 'ContainerRegistryInfo',
        'description': 'str',
        'id': 'str',
        'name': 'str',
        'server': 'str',
        'type': 'str'
    }

    attribute_map = {
        'cloud_profile_info': 'CloudProfileInfo',
        'container_registry_info': 'ContainerRegistryInfo',
        'description': 'description',
        'id': 'id',
        'name': 'name',
        'server': 'server',
        'type': 'type'
    }

    def __init__(self, cloud_profile_info=None, container_registry_info=None, description=None, id=None, name=None, server=None, type=None):  # noqa: E501
        """ContainerRegistryV2 - a model defined in Swagger"""  # noqa: E501
        self._cloud_profile_info = None
        self._container_registry_info = None
        self._description = None
        self._id = None
        self._name = None
        self._server = None
        self._type = None
        self.discriminator = None
        if cloud_profile_info is not None:
            self.cloud_profile_info = cloud_profile_info
        if container_registry_info is not None:
            self.container_registry_info = container_registry_info
        if description is not None:
            self.description = description
        if id is not None:
            self.id = id
        self.name = name
        self.server = server
        self.type = type

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


        :return: The cloud_profile_info of this ContainerRegistryV2.  # noqa: E501
        :rtype: CloudProfileInfo
        """
        return self._cloud_profile_info

    @cloud_profile_info.setter
    def cloud_profile_info(self, cloud_profile_info):
        """Sets the cloud_profile_info of this ContainerRegistryV2.


        :param cloud_profile_info: The cloud_profile_info of this ContainerRegistryV2.  # noqa: E501
        :type: CloudProfileInfo
        """

        self._cloud_profile_info = cloud_profile_info

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


        :return: The container_registry_info of this ContainerRegistryV2.  # noqa: E501
        :rtype: ContainerRegistryInfo
        """
        return self._container_registry_info

    @container_registry_info.setter
    def container_registry_info(self, container_registry_info):
        """Sets the container_registry_info of this ContainerRegistryV2.


        :param container_registry_info: The container_registry_info of this ContainerRegistryV2.  # noqa: E501
        :type: ContainerRegistryInfo
        """

        self._container_registry_info = container_registry_info

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

        Description for the container registry.  # noqa: E501

        :return: The description of this ContainerRegistryV2.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ContainerRegistryV2.

        Description for the container registry.  # noqa: E501

        :param description: The description of this ContainerRegistryV2.  # noqa: E501
        :type: str
        """

        self._description = description

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

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

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

    @id.setter
    def id(self, id):
        """Sets the id of this ContainerRegistryV2.

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

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

        self._id = id

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

        Name for the container registry.  # noqa: E501

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

    @name.setter
    def name(self, name):
        """Sets the name of this ContainerRegistryV2.

        Name for the container registry.  # noqa: E501

        :param name: The name of this ContainerRegistryV2.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        Container registry server URL. For example, an Amazon AWS Elastic Container Registry (ECR) URL might be: https://aws_account_id.dkr.ecr.region.amazonaws.com  # noqa: E501

        :return: The server of this ContainerRegistryV2.  # noqa: E501
        :rtype: str
        """
        return self._server

    @server.setter
    def server(self, server):
        """Sets the server of this ContainerRegistryV2.

        Container registry server URL. For example, an Amazon AWS Elastic Container Registry (ECR) URL might be: https://aws_account_id.dkr.ecr.region.amazonaws.com  # noqa: E501

        :param server: The server of this ContainerRegistryV2.  # noqa: E501
        :type: str
        """
        if server is None:
            raise ValueError("Invalid value for `server`, must not be `None`")  # noqa: E501

        self._server = server

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

        Container registry type.  # noqa: E501

        :return: The type of this ContainerRegistryV2.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this ContainerRegistryV2.

        Container registry type.  # noqa: E501

        :param type: The type of this ContainerRegistryV2.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["AWS", "GCP", "Azure", "ContainerRegistry"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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

        return self.__dict__ == other.__dict__

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