Source code for netapp.santricity.models.symbol.internet_protocol_v4_data

# coding: utf-8

"""
InternetProtocolV4Data.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 InternetProtocolV4Data(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ InternetProtocolV4Data - 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 = { 'ipv4_address': 'str', # (required parameter) 'ipv4_address_config_method': 'str', # (required parameter) 'ipv4_outbound_packet_priority': 'SettingControl', # (required parameter) 'ipv4_vlan_id': 'SettingControl', # (required parameter) 'ipv4_address_data': 'IpV4AddressData' } self.attribute_map = { 'ipv4_address': 'ipv4Address', # (required parameter) 'ipv4_address_config_method': 'ipv4AddressConfigMethod', # (required parameter) 'ipv4_outbound_packet_priority': 'ipv4OutboundPacketPriority', # (required parameter) 'ipv4_vlan_id': 'ipv4VlanId', # (required parameter) 'ipv4_address_data': 'ipv4AddressData' } self._ipv4_address = None self._ipv4_address_config_method = None self._ipv4_outbound_packet_priority = None self._ipv4_vlan_id = None self._ipv4_address_data = None @property def ipv4_address(self): """ Gets the ipv4_address of this InternetProtocolV4Data. The various IPV4 address-related elements (IP address, gateway IP address, and subnet mask), along with the state of their configuration. :return: The ipv4_address of this InternetProtocolV4Data. :rtype: str :required/optional: required """ return self._ipv4_address @ipv4_address.setter def ipv4_address(self, ipv4_address): """ Sets the ipv4_address of this InternetProtocolV4Data. The various IPV4 address-related elements (IP address, gateway IP address, and subnet mask), along with the state of their configuration. :param ipv4_address: The ipv4_address of this InternetProtocolV4Data. :type: str """ self._ipv4_address = ipv4_address @property def ipv4_address_config_method(self): """ Gets the ipv4_address_config_method of this InternetProtocolV4Data. IPV4 configuration method for the endpoint; always STATIC for iSER interfaces. :return: The ipv4_address_config_method of this InternetProtocolV4Data. :rtype: str :required/optional: required """ return self._ipv4_address_config_method @ipv4_address_config_method.setter def ipv4_address_config_method(self, ipv4_address_config_method): """ Sets the ipv4_address_config_method of this InternetProtocolV4Data. IPV4 configuration method for the endpoint; always STATIC for iSER interfaces. :param ipv4_address_config_method: The ipv4_address_config_method of this InternetProtocolV4Data. :type: str """ allowed_values = ["configDhcp", "configStatic", "__UNDEFINED"] if ipv4_address_config_method not in allowed_values: raise ValueError( "Invalid value for `ipv4_address_config_method`, must be one of {0}" .format(allowed_values) ) self._ipv4_address_config_method = ipv4_address_config_method @property def ipv4_outbound_packet_priority(self): """ Gets the ipv4_outbound_packet_priority of this InternetProtocolV4Data. Priority associate with outbound IPV4 packets; always disabled for iSER interfaces. :return: The ipv4_outbound_packet_priority of this InternetProtocolV4Data. :rtype: SettingControl :required/optional: required """ return self._ipv4_outbound_packet_priority @ipv4_outbound_packet_priority.setter def ipv4_outbound_packet_priority(self, ipv4_outbound_packet_priority): """ Sets the ipv4_outbound_packet_priority of this InternetProtocolV4Data. Priority associate with outbound IPV4 packets; always disabled for iSER interfaces. :param ipv4_outbound_packet_priority: The ipv4_outbound_packet_priority of this InternetProtocolV4Data. :type: SettingControl """ self._ipv4_outbound_packet_priority = ipv4_outbound_packet_priority @property def ipv4_vlan_id(self): """ Gets the ipv4_vlan_id of this InternetProtocolV4Data. Value of IPV4 VLAN id for the interface; always disabled for iSER interfaces. :return: The ipv4_vlan_id of this InternetProtocolV4Data. :rtype: SettingControl :required/optional: required """ return self._ipv4_vlan_id @ipv4_vlan_id.setter def ipv4_vlan_id(self, ipv4_vlan_id): """ Sets the ipv4_vlan_id of this InternetProtocolV4Data. Value of IPV4 VLAN id for the interface; always disabled for iSER interfaces. :param ipv4_vlan_id: The ipv4_vlan_id of this InternetProtocolV4Data. :type: SettingControl """ self._ipv4_vlan_id = ipv4_vlan_id @property def ipv4_address_data(self): """ Gets the ipv4_address_data of this InternetProtocolV4Data. The various IPV4 address-related elements (IP address, gateway IP address, and subnet mask), along with the state of their configuration. :return: The ipv4_address_data of this InternetProtocolV4Data. :rtype: IpV4AddressData :required/optional: required """ return self._ipv4_address_data @ipv4_address_data.setter def ipv4_address_data(self, ipv4_address_data): """ Sets the ipv4_address_data of this InternetProtocolV4Data. The various IPV4 address-related elements (IP address, gateway IP address, and subnet mask), along with the state of their configuration. :param ipv4_address_data: The ipv4_address_data of this InternetProtocolV4Data. :type: IpV4AddressData """ self._ipv4_address_data = ipv4_address_data
[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