huaweicloud-sdk-python-v3/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/model/publicip_create_resp.py

352 lines
12 KiB
Python
Raw Normal View History

# coding: utf-8
import re
import six
class PublicipCreateResp:
"""
Attributes:
openapi_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.
"""
sensitive_list = []
openapi_types = {
'bandwidth_size': 'int',
'create_time': 'datetime',
'id': 'str',
'public_ip_address': 'str',
'status': 'str',
'tenant_id': 'str',
'type': 'str',
'public_ipv6_address': 'str',
'ip_version': 'int',
'enterprise_project_id': 'str'
}
attribute_map = {
'bandwidth_size': 'bandwidth_size',
'create_time': 'create_time',
'id': 'id',
'public_ip_address': 'public_ip_address',
'status': 'status',
'tenant_id': 'tenant_id',
'type': 'type',
'public_ipv6_address': 'public_ipv6_address',
'ip_version': 'ip_version',
'enterprise_project_id': 'enterprise_project_id'
}
def __init__(self, bandwidth_size=None, create_time=None, id=None, public_ip_address=None, status=None, tenant_id=None, type=None, public_ipv6_address=None, ip_version=None, enterprise_project_id=None):
"""PublicipCreateResp - a model defined in huaweicloud sdk"""
self._bandwidth_size = None
self._create_time = None
self._id = None
self._public_ip_address = None
self._status = None
self._tenant_id = None
self._type = None
self._public_ipv6_address = None
self._ip_version = None
self._enterprise_project_id = None
self.discriminator = None
if bandwidth_size is not None:
self.bandwidth_size = bandwidth_size
if create_time is not None:
self.create_time = create_time
if id is not None:
self.id = id
if public_ip_address is not None:
self.public_ip_address = public_ip_address
if status is not None:
self.status = status
if tenant_id is not None:
self.tenant_id = tenant_id
if type is not None:
self.type = type
if public_ipv6_address is not None:
self.public_ipv6_address = public_ipv6_address
if ip_version is not None:
self.ip_version = ip_version
if enterprise_project_id is not None:
self.enterprise_project_id = enterprise_project_id
@property
def bandwidth_size(self):
"""Gets the bandwidth_size of this PublicipCreateResp.
带宽大小单位为Mbit/s
:return: The bandwidth_size of this PublicipCreateResp.
:rtype: int
"""
return self._bandwidth_size
@bandwidth_size.setter
def bandwidth_size(self, bandwidth_size):
"""Sets the bandwidth_size of this PublicipCreateResp.
带宽大小单位为Mbit/s
:param bandwidth_size: The bandwidth_size of this PublicipCreateResp.
:type: int
"""
self._bandwidth_size = bandwidth_size
@property
def create_time(self):
"""Gets the create_time of this PublicipCreateResp.
弹性公网IP申请时间UTC时间
:return: The create_time of this PublicipCreateResp.
:rtype: datetime
"""
return self._create_time
@create_time.setter
def create_time(self, create_time):
"""Sets the create_time of this PublicipCreateResp.
弹性公网IP申请时间UTC时间
:param create_time: The create_time of this PublicipCreateResp.
:type: datetime
"""
self._create_time = create_time
@property
def id(self):
"""Gets the id of this PublicipCreateResp.
弹性公网IP唯一标识
:return: The id of this PublicipCreateResp.
:rtype: str
"""
return self._id
@id.setter
def id(self, id):
"""Sets the id of this PublicipCreateResp.
弹性公网IP唯一标识
:param id: The id of this PublicipCreateResp.
:type: str
"""
self._id = id
@property
def public_ip_address(self):
"""Gets the public_ip_address of this PublicipCreateResp.
IPv4时是申请到的弹性公网IP地址IPv6时是IPv6地址对应的IPv4地址
:return: The public_ip_address of this PublicipCreateResp.
:rtype: str
"""
return self._public_ip_address
@public_ip_address.setter
def public_ip_address(self, public_ip_address):
"""Sets the public_ip_address of this PublicipCreateResp.
IPv4时是申请到的弹性公网IP地址IPv6时是IPv6地址对应的IPv4地址
:param public_ip_address: The public_ip_address of this PublicipCreateResp.
:type: str
"""
self._public_ip_address = public_ip_address
@property
def status(self):
"""Gets the status of this PublicipCreateResp.
功能说明弹性公网IP的状态 取值范围冻结FREEZED绑定失败BIND_ERROR绑定中BINDING释放中PENDING_DELETE 创建中PENDING_CREATE创建中NOTIFYING释放中NOTIFY_DELETE更新中PENDING_UPDATE 未绑定DOWN 绑定ACTIVE绑定ELB绑定VPN失败ERROR
:return: The status of this PublicipCreateResp.
:rtype: str
"""
return self._status
@status.setter
def status(self, status):
"""Sets the status of this PublicipCreateResp.
功能说明弹性公网IP的状态 取值范围冻结FREEZED绑定失败BIND_ERROR绑定中BINDING释放中PENDING_DELETE 创建中PENDING_CREATE创建中NOTIFYING释放中NOTIFY_DELETE更新中PENDING_UPDATE 未绑定DOWN 绑定ACTIVE绑定ELB绑定VPN失败ERROR
:param status: The status of this PublicipCreateResp.
:type: str
"""
self._status = status
@property
def tenant_id(self):
"""Gets the tenant_id of this PublicipCreateResp.
项目ID
:return: The tenant_id of this PublicipCreateResp.
:rtype: str
"""
return self._tenant_id
@tenant_id.setter
def tenant_id(self, tenant_id):
"""Sets the tenant_id of this PublicipCreateResp.
项目ID
:param tenant_id: The tenant_id of this PublicipCreateResp.
:type: str
"""
self._tenant_id = tenant_id
@property
def type(self):
"""Gets the type of this PublicipCreateResp.
功能说明弹性IP弹性公网IP的类型 取值范围5_telcom电信5_union联通5_bgp全动态BGP5_sbgp静态BGP5_ipv6 东北-大连5_telcom5_union 华南-广州5_bgp5_sbgp 华东-上海二5_bgp5_sbgp 华北-北京一5_bgp5_sbgp5_ipv6 亚太-香港5_bgp 亚太-曼谷5_bgp 亚太-新加坡5_bgp 非洲-约翰内斯堡5_bgp 西南-贵阳一5_bgp5_sbgp 华北-北京四5_bgp5_sbgp 约束必须是系统具体支持的类型publicip_id为IPv4端口所以\"publicip_type\"字段未给定时默认为5_bgp。
:return: The type of this PublicipCreateResp.
:rtype: str
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this PublicipCreateResp.
功能说明弹性IP弹性公网IP的类型 取值范围5_telcom电信5_union联通5_bgp全动态BGP5_sbgp静态BGP5_ipv6 东北-大连5_telcom5_union 华南-广州5_bgp5_sbgp 华东-上海二5_bgp5_sbgp 华北-北京一5_bgp5_sbgp5_ipv6 亚太-香港5_bgp 亚太-曼谷5_bgp 亚太-新加坡5_bgp 非洲-约翰内斯堡5_bgp 西南-贵阳一5_bgp5_sbgp 华北-北京四5_bgp5_sbgp 约束必须是系统具体支持的类型publicip_id为IPv4端口所以\"publicip_type\"字段未给定时默认为5_bgp。
:param type: The type of this PublicipCreateResp.
:type: str
"""
self._type = type
@property
def public_ipv6_address(self):
"""Gets the public_ipv6_address of this PublicipCreateResp.
IPv4时无此字段IPv6时为申请到的弹性公网IP地址
:return: The public_ipv6_address of this PublicipCreateResp.
:rtype: str
"""
return self._public_ipv6_address
@public_ipv6_address.setter
def public_ipv6_address(self, public_ipv6_address):
"""Sets the public_ipv6_address of this PublicipCreateResp.
IPv4时无此字段IPv6时为申请到的弹性公网IP地址
:param public_ipv6_address: The public_ipv6_address of this PublicipCreateResp.
:type: str
"""
self._public_ipv6_address = public_ipv6_address
@property
def ip_version(self):
"""Gets the ip_version of this PublicipCreateResp.
IP版本信息取值范围是4和6
:return: The ip_version of this PublicipCreateResp.
:rtype: int
"""
return self._ip_version
@ip_version.setter
def ip_version(self, ip_version):
"""Sets the ip_version of this PublicipCreateResp.
IP版本信息取值范围是4和6
:param ip_version: The ip_version of this PublicipCreateResp.
:type: int
"""
self._ip_version = ip_version
@property
def enterprise_project_id(self):
"""Gets the enterprise_project_id of this PublicipCreateResp.
企业项目ID最大长度36字节-连字符的UUID格式或者是字符串0 创建弹性公网IP时给弹性公网IP绑定企业项目ID
:return: The enterprise_project_id of this PublicipCreateResp.
:rtype: str
"""
return self._enterprise_project_id
@enterprise_project_id.setter
def enterprise_project_id(self, enterprise_project_id):
"""Sets the enterprise_project_id of this PublicipCreateResp.
企业项目ID最大长度36字节-连字符的UUID格式或者是字符串0 创建弹性公网IP时给弹性公网IP绑定企业项目ID
:param enterprise_project_id: The enterprise_project_id of this PublicipCreateResp.
:type: str
"""
self._enterprise_project_id = enterprise_project_id
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.openapi_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:
if attr in self.sensitive_list:
result[attr] = "****"
else:
result[attr] = value
return result
def to_str(self):
2021-07-09 10:57:08 +00:00
import simplejson as json
return json.dumps(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, PublicipCreateResp):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other