# coding: utf-8

"""
    Akeyless API

    The purpose of this application is to provide access to Akeyless API.  # noqa: E501

    The version of the OpenAPI document: 2.0
    Contact: support@akeyless.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from akeyless.configuration import Configuration


class Name(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 = {
        'country': 'list[str]',
        'extra_names': 'list[AttributeTypeAndValue]',
        'locality': 'list[str]',
        'names': 'list[AttributeTypeAndValue]',
        'serial_number': 'str',
        'street_address': 'list[str]'
    }

    attribute_map = {
        'country': 'Country',
        'extra_names': 'ExtraNames',
        'locality': 'Locality',
        'names': 'Names',
        'serial_number': 'SerialNumber',
        'street_address': 'StreetAddress'
    }

    def __init__(self, country=None, extra_names=None, locality=None, names=None, serial_number=None, street_address=None, local_vars_configuration=None):  # noqa: E501
        """Name - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._country = None
        self._extra_names = None
        self._locality = None
        self._names = None
        self._serial_number = None
        self._street_address = None
        self.discriminator = None

        if country is not None:
            self.country = country
        if extra_names is not None:
            self.extra_names = extra_names
        if locality is not None:
            self.locality = locality
        if names is not None:
            self.names = names
        if serial_number is not None:
            self.serial_number = serial_number
        if street_address is not None:
            self.street_address = street_address

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


        :return: The country of this Name.  # noqa: E501
        :rtype: list[str]
        """
        return self._country

    @country.setter
    def country(self, country):
        """Sets the country of this Name.


        :param country: The country of this Name.  # noqa: E501
        :type: list[str]
        """

        self._country = country

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

        ExtraNames contains attributes to be copied, raw, into any marshaled distinguished names. Values override any attributes with the same OID. The ExtraNames field is not populated when parsing, see Names.  # noqa: E501

        :return: The extra_names of this Name.  # noqa: E501
        :rtype: list[AttributeTypeAndValue]
        """
        return self._extra_names

    @extra_names.setter
    def extra_names(self, extra_names):
        """Sets the extra_names of this Name.

        ExtraNames contains attributes to be copied, raw, into any marshaled distinguished names. Values override any attributes with the same OID. The ExtraNames field is not populated when parsing, see Names.  # noqa: E501

        :param extra_names: The extra_names of this Name.  # noqa: E501
        :type: list[AttributeTypeAndValue]
        """

        self._extra_names = extra_names

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


        :return: The locality of this Name.  # noqa: E501
        :rtype: list[str]
        """
        return self._locality

    @locality.setter
    def locality(self, locality):
        """Sets the locality of this Name.


        :param locality: The locality of this Name.  # noqa: E501
        :type: list[str]
        """

        self._locality = locality

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

        Names contains all parsed attributes. When parsing distinguished names, this can be used to extract non-standard attributes that are not parsed by this package. When marshaling to RDNSequences, the Names field is ignored, see ExtraNames.  # noqa: E501

        :return: The names of this Name.  # noqa: E501
        :rtype: list[AttributeTypeAndValue]
        """
        return self._names

    @names.setter
    def names(self, names):
        """Sets the names of this Name.

        Names contains all parsed attributes. When parsing distinguished names, this can be used to extract non-standard attributes that are not parsed by this package. When marshaling to RDNSequences, the Names field is ignored, see ExtraNames.  # noqa: E501

        :param names: The names of this Name.  # noqa: E501
        :type: list[AttributeTypeAndValue]
        """

        self._names = names

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


        :return: The serial_number of this Name.  # noqa: E501
        :rtype: str
        """
        return self._serial_number

    @serial_number.setter
    def serial_number(self, serial_number):
        """Sets the serial_number of this Name.


        :param serial_number: The serial_number of this Name.  # noqa: E501
        :type: str
        """

        self._serial_number = serial_number

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


        :return: The street_address of this Name.  # noqa: E501
        :rtype: list[str]
        """
        return self._street_address

    @street_address.setter
    def street_address(self, street_address):
        """Sets the street_address of this Name.


        :param street_address: The street_address of this Name.  # noqa: E501
        :type: list[str]
        """

        self._street_address = street_address

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

        for attr, _ in six.iteritems(self.openapi_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

        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, Name):
            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, Name):
            return True

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