# coding: utf-8
"""
SATAInterface.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
[docs]class SATAInterface(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
SATAInterface - 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 = {
'channel': 'int', # (required parameter)
'current_interface_speed': 'str', # (required parameter)
'maximum_interface_speed': 'str', # (required parameter)
'speed_control': 'str', # (required parameter)
'part': 'str', # (required parameter)
'revision': 'int', # (required parameter)
'interface_ref': 'str', # (required parameter)
'physical_location': 'Location', # (required parameter)
'protection_information_capable': 'bool', # (required parameter)
'id': 'str'
}
self.attribute_map = {
'channel': 'channel', # (required parameter)
'current_interface_speed': 'currentInterfaceSpeed', # (required parameter)
'maximum_interface_speed': 'maximumInterfaceSpeed', # (required parameter)
'speed_control': 'speedControl', # (required parameter)
'part': 'part', # (required parameter)
'revision': 'revision', # (required parameter)
'interface_ref': 'interfaceRef', # (required parameter)
'physical_location': 'physicalLocation', # (required parameter)
'protection_information_capable': 'protectionInformationCapable', # (required parameter)
'id': 'id'
}
self._channel = None
self._current_interface_speed = None
self._maximum_interface_speed = None
self._speed_control = None
self._part = None
self._revision = None
self._interface_ref = None
self._physical_location = None
self._protection_information_capable = None
self._id = None
@property
def channel(self):
"""
Gets the channel of this SATAInterface.
The channel number of this channel
:return: The channel of this SATAInterface.
:rtype: int
:required/optional: required
"""
return self._channel
@channel.setter
def channel(self, channel):
"""
Sets the channel of this SATAInterface.
The channel number of this channel
:param channel: The channel of this SATAInterface.
:type: int
"""
self._channel = channel
@property
def current_interface_speed(self):
"""
Gets the current_interface_speed of this SATAInterface.
The current interface speed of the SATA interface.
:return: The current_interface_speed of this SATAInterface.
:rtype: str
:required/optional: required
"""
return self._current_interface_speed
@current_interface_speed.setter
def current_interface_speed(self, current_interface_speed):
"""
Sets the current_interface_speed of this SATAInterface.
The current interface speed of the SATA interface.
:param current_interface_speed: The current_interface_speed of this SATAInterface.
:type: str
"""
allowed_values = ["speedUnknown", "speed1gig", "speed2gig", "speed4gig", "speed10gig", "speed15gig", "speed3gig", "speed10meg", "speed100meg", "speed2pt5Gig", "speed5gig", "speed20gig", "speed30gig", "speed60gig", "speed8gig", "speed6gig", "speed40gig", "speed16gig", "speed56gig", "speed12gig", "__UNDEFINED"]
if current_interface_speed not in allowed_values:
raise ValueError(
"Invalid value for `current_interface_speed`, must be one of {0}"
.format(allowed_values)
)
self._current_interface_speed = current_interface_speed
@property
def maximum_interface_speed(self):
"""
Gets the maximum_interface_speed of this SATAInterface.
The maximum interface speed of the SATA interface.
:return: The maximum_interface_speed of this SATAInterface.
:rtype: str
:required/optional: required
"""
return self._maximum_interface_speed
@maximum_interface_speed.setter
def maximum_interface_speed(self, maximum_interface_speed):
"""
Sets the maximum_interface_speed of this SATAInterface.
The maximum interface speed of the SATA interface.
:param maximum_interface_speed: The maximum_interface_speed of this SATAInterface.
:type: str
"""
allowed_values = ["speedUnknown", "speed1gig", "speed2gig", "speed4gig", "speed10gig", "speed15gig", "speed3gig", "speed10meg", "speed100meg", "speed2pt5Gig", "speed5gig", "speed20gig", "speed30gig", "speed60gig", "speed8gig", "speed6gig", "speed40gig", "speed16gig", "speed56gig", "speed12gig", "__UNDEFINED"]
if maximum_interface_speed not in allowed_values:
raise ValueError(
"Invalid value for `maximum_interface_speed`, must be one of {0}"
.format(allowed_values)
)
self._maximum_interface_speed = maximum_interface_speed
@property
def speed_control(self):
"""
Gets the speed_control of this SATAInterface.
An indicator of how the device speed is controlled.
:return: The speed_control of this SATAInterface.
:rtype: str
:required/optional: required
"""
return self._speed_control
@speed_control.setter
def speed_control(self, speed_control):
"""
Sets the speed_control of this SATAInterface.
An indicator of how the device speed is controlled.
:param speed_control: The speed_control of this SATAInterface.
:type: str
"""
allowed_values = ["unknown", "fixed", "switched", "auto", "__UNDEFINED"]
if speed_control not in allowed_values:
raise ValueError(
"Invalid value for `speed_control`, must be one of {0}"
.format(allowed_values)
)
self._speed_control = speed_control
@property
def part(self):
"""
Gets the part of this SATAInterface.
A string indicating the chip type.
:return: The part of this SATAInterface.
:rtype: str
:required/optional: required
"""
return self._part
@part.setter
def part(self, part):
"""
Sets the part of this SATAInterface.
A string indicating the chip type.
:param part: The part of this SATAInterface.
:type: str
"""
self._part = part
@property
def revision(self):
"""
Gets the revision of this SATAInterface.
The revision level of the SATA part.
:return: The revision of this SATAInterface.
:rtype: int
:required/optional: required
"""
return self._revision
@revision.setter
def revision(self, revision):
"""
Sets the revision of this SATAInterface.
The revision level of the SATA part.
:param revision: The revision of this SATAInterface.
:type: int
"""
self._revision = revision
@property
def interface_ref(self):
"""
Gets the interface_ref of this SATAInterface.
The unique identifier for a given instance of this structure.
:return: The interface_ref of this SATAInterface.
:rtype: str
:required/optional: required
"""
return self._interface_ref
@interface_ref.setter
def interface_ref(self, interface_ref):
"""
Sets the interface_ref of this SATAInterface.
The unique identifier for a given instance of this structure.
:param interface_ref: The interface_ref of this SATAInterface.
:type: str
"""
self._interface_ref = interface_ref
@property
def physical_location(self):
"""
Gets the physical_location of this SATAInterface.
The physical location of the SATA interface. The parent reference in Location identifies the physical component (e.g., controller or host card) where the interface circuitry is located, and the position field is a firmware-assigned 1-relative number signifying \"1st SATA interface relative to the parent,\" \"2nd SATA interface relative to the parent,\" etc. This \"interface number\" is independent of the interface's channel association.
:return: The physical_location of this SATAInterface.
:rtype: Location
:required/optional: required
"""
return self._physical_location
@physical_location.setter
def physical_location(self, physical_location):
"""
Sets the physical_location of this SATAInterface.
The physical location of the SATA interface. The parent reference in Location identifies the physical component (e.g., controller or host card) where the interface circuitry is located, and the position field is a firmware-assigned 1-relative number signifying \"1st SATA interface relative to the parent,\" \"2nd SATA interface relative to the parent,\" etc. This \"interface number\" is independent of the interface's channel association.
:param physical_location: The physical_location of this SATAInterface.
:type: Location
"""
self._physical_location = physical_location
@property
def protection_information_capable(self):
"""
Gets the protection_information_capable of this SATAInterface.
This field indicates whether or not the I/O interface is PI capable.
:return: The protection_information_capable of this SATAInterface.
:rtype: bool
:required/optional: required
"""
return self._protection_information_capable
@protection_information_capable.setter
def protection_information_capable(self, protection_information_capable):
"""
Sets the protection_information_capable of this SATAInterface.
This field indicates whether or not the I/O interface is PI capable.
:param protection_information_capable: The protection_information_capable of this SATAInterface.
:type: bool
"""
self._protection_information_capable = protection_information_capable
@property
def id(self):
"""
Gets the id of this SATAInterface.
:return: The id of this SATAInterface.
:rtype: str
:required/optional: optional
"""
return self._id
@id.setter
def id(self, id):
"""
Sets the id of this SATAInterface.
:param id: The id of this SATAInterface.
:type: str
"""
self._id = id
[docs] 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
[docs] 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