# coding: utf-8

"""
ExtendedComponentLocation.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


class ExtendedComponentLocation(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        ExtendedComponentLocation - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'ext_loc_type': 'str',  # (required parameter)
            'comp_channel_loc': 'ChannelLocation',  
            'comp_minihub_loc': 'MinihubLocation',  
            'comp_tray': 'int',  
            'comp_tray_slot': 'TraySlot',  
            'comp_label': 'str',  
            'pit_sequence': 'int',  
            'comp_reference': 'str',  
            'controller_reference': 'str',  
            'location_label': 'str'
        }

        self.attribute_map = {
            'ext_loc_type': 'extLocType',  # (required parameter)
            'comp_channel_loc': 'compChannelLoc',  
            'comp_minihub_loc': 'compMinihubLoc',  
            'comp_tray': 'compTray',  
            'comp_tray_slot': 'compTraySlot',  
            'comp_label': 'compLabel',  
            'pit_sequence': 'pitSequence',  
            'comp_reference': 'compReference',  
            'controller_reference': 'controllerReference',  
            'location_label': 'locationLabel'
        }

        self._ext_loc_type = None
        self._comp_channel_loc = None
        self._comp_minihub_loc = None
        self._comp_tray = None
        self._comp_tray_slot = None
        self._comp_label = None
        self._pit_sequence = None
        self._comp_reference = None
        self._controller_reference = None
        self._location_label = None

    @property
    def ext_loc_type(self):
        """
        Gets the ext_loc_type of this ExtendedComponentLocation.
        This enumeration object contains a list of all possible extended component location types that can be returned in a MEL entry.

        :return: The ext_loc_type of this ExtendedComponentLocation.
        :rtype: str
        :required/optional: required
        """
        return self._ext_loc_type

    @ext_loc_type.setter
    def ext_loc_type(self, ext_loc_type):
        """
        Sets the ext_loc_type of this ExtendedComponentLocation.
        This enumeration object contains a list of all possible extended component location types that can be returned in a MEL entry.

        :param ext_loc_type: The ext_loc_type of this ExtendedComponentLocation.
        :type: str
        """
        allowed_values = ["unknown", "tray", "trayslot", "minihub", "channel", "volume", "pit", "controller", "ref", "label", "__UNDEFINED"]
        if ext_loc_type not in allowed_values:
            raise ValueError(
                "Invalid value for `ext_loc_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._ext_loc_type = ext_loc_type

    @property
    def comp_channel_loc(self):
        """
        Gets the comp_channel_loc of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_CHANNEL. This field is deprecated.

        :return: The comp_channel_loc of this ExtendedComponentLocation.
        :rtype: ChannelLocation
        :required/optional: optional
        """
        return self._comp_channel_loc

    @comp_channel_loc.setter
    def comp_channel_loc(self, comp_channel_loc):
        """
        Sets the comp_channel_loc of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_CHANNEL. This field is deprecated.

        :param comp_channel_loc: The comp_channel_loc of this ExtendedComponentLocation.
        :type: ChannelLocation
        """
        self._comp_channel_loc = comp_channel_loc

    @property
    def comp_minihub_loc(self):
        """
        Gets the comp_minihub_loc of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_MINIHUB. This field is deprecated.

        :return: The comp_minihub_loc of this ExtendedComponentLocation.
        :rtype: MinihubLocation
        :required/optional: optional
        """
        return self._comp_minihub_loc

    @comp_minihub_loc.setter
    def comp_minihub_loc(self, comp_minihub_loc):
        """
        Sets the comp_minihub_loc of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_MINIHUB. This field is deprecated.

        :param comp_minihub_loc: The comp_minihub_loc of this ExtendedComponentLocation.
        :type: MinihubLocation
        """
        self._comp_minihub_loc = comp_minihub_loc

    @property
    def comp_tray(self):
        """
        Gets the comp_tray of this ExtendedComponentLocation.
        This field is present only if the extLocType value is EXT_COMP_LOCTYPE_TRAY

        :return: The comp_tray of this ExtendedComponentLocation.
        :rtype: int
        :required/optional: optional
        """
        return self._comp_tray

    @comp_tray.setter
    def comp_tray(self, comp_tray):
        """
        Sets the comp_tray of this ExtendedComponentLocation.
        This field is present only if the extLocType value is EXT_COMP_LOCTYPE_TRAY

        :param comp_tray: The comp_tray of this ExtendedComponentLocation.
        :type: int
        """
        self._comp_tray = comp_tray

    @property
    def comp_tray_slot(self):
        """
        Gets the comp_tray_slot of this ExtendedComponentLocation.
        This field is present only if the extLocType value is EXT_COMP_LOCTYPE_TRAYSLOT

        :return: The comp_tray_slot of this ExtendedComponentLocation.
        :rtype: TraySlot
        :required/optional: optional
        """
        return self._comp_tray_slot

    @comp_tray_slot.setter
    def comp_tray_slot(self, comp_tray_slot):
        """
        Sets the comp_tray_slot of this ExtendedComponentLocation.
        This field is present only if the extLocType value is EXT_COMP_LOCTYPE_TRAYSLOT

        :param comp_tray_slot: The comp_tray_slot of this ExtendedComponentLocation.
        :type: TraySlot
        """
        self._comp_tray_slot = comp_tray_slot

    @property
    def comp_label(self):
        """
        Gets the comp_label of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_VOLUME. This field is deprecated.

        :return: The comp_label of this ExtendedComponentLocation.
        :rtype: str
        :required/optional: optional
        """
        return self._comp_label

    @comp_label.setter
    def comp_label(self, comp_label):
        """
        Sets the comp_label of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_VOLUME. This field is deprecated.

        :param comp_label: The comp_label of this ExtendedComponentLocation.
        :type: str
        """
        self._comp_label = comp_label

    @property
    def pit_sequence(self):
        """
        Gets the pit_sequence of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_PIT.

        :return: The pit_sequence of this ExtendedComponentLocation.
        :rtype: int
        :required/optional: optional
        """
        return self._pit_sequence

    @pit_sequence.setter
    def pit_sequence(self, pit_sequence):
        """
        Sets the pit_sequence of this ExtendedComponentLocation.
        This field is present only if the ExtendedComponentLocationType value is EXT_COMP_LOCTYPE_PIT.

        :param pit_sequence: The pit_sequence of this ExtendedComponentLocation.
        :type: int
        """
        self._pit_sequence = pit_sequence

    @property
    def comp_reference(self):
        """
        Gets the comp_reference of this ExtendedComponentLocation.
        SYMbolRef of the component or channelPort

        :return: The comp_reference of this ExtendedComponentLocation.
        :rtype: str
        :required/optional: optional
        """
        return self._comp_reference

    @comp_reference.setter
    def comp_reference(self, comp_reference):
        """
        Sets the comp_reference of this ExtendedComponentLocation.
        SYMbolRef of the component or channelPort

        :param comp_reference: The comp_reference of this ExtendedComponentLocation.
        :type: str
        """
        self._comp_reference = comp_reference

    @property
    def controller_reference(self):
        """
        Gets the controller_reference of this ExtendedComponentLocation.
        Controller Reference

        :return: The controller_reference of this ExtendedComponentLocation.
        :rtype: str
        :required/optional: optional
        """
        return self._controller_reference

    @controller_reference.setter
    def controller_reference(self, controller_reference):
        """
        Sets the controller_reference of this ExtendedComponentLocation.
        Controller Reference

        :param controller_reference: The controller_reference of this ExtendedComponentLocation.
        :type: str
        """
        self._controller_reference = controller_reference

    @property
    def location_label(self):
        """
        Gets the location_label of this ExtendedComponentLocation.
        Label associated with the physical location of the component or port.

        :return: The location_label of this ExtendedComponentLocation.
        :rtype: str
        :required/optional: optional
        """
        return self._location_label

    @location_label.setter
    def location_label(self, location_label):
        """
        Sets the location_label of this ExtendedComponentLocation.
        Label associated with the physical location of the component or port.

        :param location_label: The location_label of this ExtendedComponentLocation.
        :type: str
        """
        self._location_label = location_label

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        if self is None:
           return None
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if self is None or other is None:
            return None
        return self.__dict__ == other.__dict__

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

