# coding: utf-8
"""
EthernetInterfaceData.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 EthernetInterfaceData(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
EthernetInterfaceData - 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 = {
'part_data': 'VendorPartData', # (required parameter)
'mac_address': 'str', # (required parameter)
'full_duplex': 'bool', # (required parameter)
'maximum_frame_payload_size': 'int', # (required parameter)
'current_interface_speed': 'str', # (required parameter)
'maximum_interface_speed': 'str', # (required parameter)
'link_status': 'str', # (required parameter)
'supported_interface_speeds': 'list[str]', # (required parameter)
'autoconfig_support': 'bool', # (required parameter)
'copper_cable_diagnostics_support': 'bool'
}
self.attribute_map = {
'part_data': 'partData', # (required parameter)
'mac_address': 'macAddress', # (required parameter)
'full_duplex': 'fullDuplex', # (required parameter)
'maximum_frame_payload_size': 'maximumFramePayloadSize', # (required parameter)
'current_interface_speed': 'currentInterfaceSpeed', # (required parameter)
'maximum_interface_speed': 'maximumInterfaceSpeed', # (required parameter)
'link_status': 'linkStatus', # (required parameter)
'supported_interface_speeds': 'supportedInterfaceSpeeds', # (required parameter)
'autoconfig_support': 'autoconfigSupport', # (required parameter)
'copper_cable_diagnostics_support': 'copperCableDiagnosticsSupport'
}
self._part_data = None
self._mac_address = None
self._full_duplex = None
self._maximum_frame_payload_size = None
self._current_interface_speed = None
self._maximum_interface_speed = None
self._link_status = None
self._supported_interface_speeds = None
self._autoconfig_support = None
self._copper_cable_diagnostics_support = None
@property
def part_data(self):
"""
Gets the part_data of this EthernetInterfaceData.
Vendor-supplied about the physical part.
:return: The part_data of this EthernetInterfaceData.
:rtype: VendorPartData
:required/optional: required
"""
return self._part_data
@part_data.setter
def part_data(self, part_data):
"""
Sets the part_data of this EthernetInterfaceData.
Vendor-supplied about the physical part.
:param part_data: The part_data of this EthernetInterfaceData.
:type: VendorPartData
"""
self._part_data = part_data
@property
def mac_address(self):
"""
Gets the mac_address of this EthernetInterfaceData.
The Ethernet MAC address associated with the interface.
:return: The mac_address of this EthernetInterfaceData.
:rtype: str
:required/optional: required
"""
return self._mac_address
@mac_address.setter
def mac_address(self, mac_address):
"""
Sets the mac_address of this EthernetInterfaceData.
The Ethernet MAC address associated with the interface.
:param mac_address: The mac_address of this EthernetInterfaceData.
:type: str
"""
self._mac_address = mac_address
@property
def full_duplex(self):
"""
Gets the full_duplex of this EthernetInterfaceData.
If set to true, the interface is operating in full duplex mode; otherwise, it is operating in half-duplex mode.
:return: The full_duplex of this EthernetInterfaceData.
:rtype: bool
:required/optional: required
"""
return self._full_duplex
@full_duplex.setter
def full_duplex(self, full_duplex):
"""
Sets the full_duplex of this EthernetInterfaceData.
If set to true, the interface is operating in full duplex mode; otherwise, it is operating in half-duplex mode.
:param full_duplex: The full_duplex of this EthernetInterfaceData.
:type: bool
"""
self._full_duplex = full_duplex
@property
def maximum_frame_payload_size(self):
"""
Gets the maximum_frame_payload_size of this EthernetInterfaceData.
The maximum size of the payload section in an Ethernet frame.
:return: The maximum_frame_payload_size of this EthernetInterfaceData.
:rtype: int
:required/optional: required
"""
return self._maximum_frame_payload_size
@maximum_frame_payload_size.setter
def maximum_frame_payload_size(self, maximum_frame_payload_size):
"""
Sets the maximum_frame_payload_size of this EthernetInterfaceData.
The maximum size of the payload section in an Ethernet frame.
:param maximum_frame_payload_size: The maximum_frame_payload_size of this EthernetInterfaceData.
:type: int
"""
self._maximum_frame_payload_size = maximum_frame_payload_size
@property
def current_interface_speed(self):
"""
Gets the current_interface_speed of this EthernetInterfaceData.
The speed of the interface, as currently configured.
:return: The current_interface_speed of this EthernetInterfaceData.
: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 EthernetInterfaceData.
The speed of the interface, as currently configured.
:param current_interface_speed: The current_interface_speed of this EthernetInterfaceData.
: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 EthernetInterfaceData.
The maximum speed supported by the interface.
:return: The maximum_interface_speed of this EthernetInterfaceData.
: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 EthernetInterfaceData.
The maximum speed supported by the interface.
:param maximum_interface_speed: The maximum_interface_speed of this EthernetInterfaceData.
: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 link_status(self):
"""
Gets the link_status of this EthernetInterfaceData.
The status of the network link for this interface.
:return: The link_status of this EthernetInterfaceData.
:rtype: str
:required/optional: required
"""
return self._link_status
@link_status.setter
def link_status(self, link_status):
"""
Sets the link_status of this EthernetInterfaceData.
The status of the network link for this interface.
:param link_status: The link_status of this EthernetInterfaceData.
:type: str
"""
allowed_values = ["none", "up", "down", "failed", "__UNDEFINED"]
if link_status not in allowed_values:
raise ValueError(
"Invalid value for `link_status`, must be one of {0}"
.format(allowed_values)
)
self._link_status = link_status
@property
def supported_interface_speeds(self):
"""
Gets the supported_interface_speeds of this EthernetInterfaceData.
A list of speeds supported by the Ethernet interface.
:return: The supported_interface_speeds of this EthernetInterfaceData.
:rtype: list[str]
:required/optional: required
"""
return self._supported_interface_speeds
@supported_interface_speeds.setter
def supported_interface_speeds(self, supported_interface_speeds):
"""
Sets the supported_interface_speeds of this EthernetInterfaceData.
A list of speeds supported by the Ethernet interface.
:param supported_interface_speeds: The supported_interface_speeds of this EthernetInterfaceData.
:type: list[str]
"""
self._supported_interface_speeds = supported_interface_speeds
@property
def autoconfig_support(self):
"""
Gets the autoconfig_support of this EthernetInterfaceData.
If set to true, autoconfiguration is supported.
:return: The autoconfig_support of this EthernetInterfaceData.
:rtype: bool
:required/optional: required
"""
return self._autoconfig_support
@autoconfig_support.setter
def autoconfig_support(self, autoconfig_support):
"""
Sets the autoconfig_support of this EthernetInterfaceData.
If set to true, autoconfiguration is supported.
:param autoconfig_support: The autoconfig_support of this EthernetInterfaceData.
:type: bool
"""
self._autoconfig_support = autoconfig_support
@property
def copper_cable_diagnostics_support(self):
"""
Gets the copper_cable_diagnostics_support of this EthernetInterfaceData.
If true, support is provided for copper cable diagnostics.
:return: The copper_cable_diagnostics_support of this EthernetInterfaceData.
:rtype: bool
:required/optional: required
"""
return self._copper_cable_diagnostics_support
@copper_cable_diagnostics_support.setter
def copper_cable_diagnostics_support(self, copper_cable_diagnostics_support):
"""
Sets the copper_cable_diagnostics_support of this EthernetInterfaceData.
If true, support is provided for copper cable diagnostics.
:param copper_cable_diagnostics_support: The copper_cable_diagnostics_support of this EthernetInterfaceData.
:type: bool
"""
self._copper_cable_diagnostics_support = copper_cable_diagnostics_support
[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