# coding: utf-8

"""
    NVDB API LES V3

    API for å lese vegobjekter, vegnett og transaksjoner fra NVDB  # noqa: E501

    OpenAPI spec version: 0.0.1
    Contact: nvdb@vegvesen.no
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from swagger_client.models.veglenkesegment_base import VeglenkesegmentBase  # noqa: F401,E501

class Veglenkesegment(VeglenkesegmentBase):
    """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 = {
        'segmentnummer': 'int',
        'referanse': 'str',
        'mledato': 'date',
        'mlemetode': 'str'
    }
    if hasattr(VeglenkesegmentBase, "swagger_types"):
        swagger_types.update(VeglenkesegmentBase.swagger_types)

    attribute_map = {
        'segmentnummer': 'segmentnummer',
        'referanse': 'referanse',
        'mledato': 'måledato',
        'mlemetode': 'målemetode'
    }
    if hasattr(VeglenkesegmentBase, "attribute_map"):
        attribute_map.update(VeglenkesegmentBase.attribute_map)

    def __init__(self, segmentnummer=None, referanse=None, mledato=None, mlemetode=None, *args, **kwargs):  # noqa: E501
        """Veglenkesegment - a model defined in Swagger"""  # noqa: E501
        self._segmentnummer = None
        self._referanse = None
        self._mledato = None
        self._mlemetode = None
        self.discriminator = None
        if segmentnummer is not None:
            self.segmentnummer = segmentnummer
        if referanse is not None:
            self.referanse = referanse
        if mledato is not None:
            self.mledato = mledato
        if mlemetode is not None:
            self.mlemetode = mlemetode
        VeglenkesegmentBase.__init__(self, *args, **kwargs)

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


        :return: The segmentnummer of this Veglenkesegment.  # noqa: E501
        :rtype: int
        """
        return self._segmentnummer

    @segmentnummer.setter
    def segmentnummer(self, segmentnummer):
        """Sets the segmentnummer of this Veglenkesegment.


        :param segmentnummer: The segmentnummer of this Veglenkesegment.  # noqa: E501
        :type: int
        """

        self._segmentnummer = segmentnummer

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


        :return: The referanse of this Veglenkesegment.  # noqa: E501
        :rtype: str
        """
        return self._referanse

    @referanse.setter
    def referanse(self, referanse):
        """Sets the referanse of this Veglenkesegment.


        :param referanse: The referanse of this Veglenkesegment.  # noqa: E501
        :type: str
        """

        self._referanse = referanse

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


        :return: The mledato of this Veglenkesegment.  # noqa: E501
        :rtype: date
        """
        return self._mledato

    @mledato.setter
    def mledato(self, mledato):
        """Sets the mledato of this Veglenkesegment.


        :param mledato: The mledato of this Veglenkesegment.  # noqa: E501
        :type: date
        """

        self._mledato = mledato

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


        :return: The mlemetode of this Veglenkesegment.  # noqa: E501
        :rtype: str
        """
        return self._mlemetode

    @mlemetode.setter
    def mlemetode(self, mlemetode):
        """Sets the mlemetode of this Veglenkesegment.


        :param mlemetode: The mlemetode of this Veglenkesegment.  # noqa: E501
        :type: str
        """
        allowed_values = ["Metrert", "Geometrisk"]  # noqa: E501
        if mlemetode not in allowed_values:
            raise ValueError(
                "Invalid value for `mlemetode` ({0}), must be one of {1}"  # noqa: E501
                .format(mlemetode, allowed_values)
            )

        self._mlemetode = mlemetode

    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(Veglenkesegment, 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, Veglenkesegment):
            return False

        return self.__dict__ == other.__dict__

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