2
0
openapi-client-udm/openapi_client_udm/models/dhcp_service_policies.py

378 lines
16 KiB
Python
Raw Normal View History

# coding: utf-8
"""
Univention Directory Manager REST interface
Schema definition for the objects in the Univention Directory Manager REST interface. # noqa: E501
The version of the OpenAPI document: 1.0.2
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
from openapi_client_udm.configuration import Configuration
class DhcpServicePolicies(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
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.
"""
openapi_types = {
'policies_dhcp_dns': 'list[str]',
'policies_dhcp_scope': 'list[str]',
'policies_dhcp_dnsupdate': 'list[str]',
'policies_dhcp_boot': 'list[str]',
'policies_dhcp_statements': 'list[str]',
'policies_dhcp_netbios': 'list[str]',
'policies_dhcp_routing': 'list[str]',
'policies_dhcp_leasetime': 'list[str]'
}
attribute_map = {
'policies_dhcp_dns': 'policies/dhcp_dns',
'policies_dhcp_scope': 'policies/dhcp_scope',
'policies_dhcp_dnsupdate': 'policies/dhcp_dnsupdate',
'policies_dhcp_boot': 'policies/dhcp_boot',
'policies_dhcp_statements': 'policies/dhcp_statements',
'policies_dhcp_netbios': 'policies/dhcp_netbios',
'policies_dhcp_routing': 'policies/dhcp_routing',
'policies_dhcp_leasetime': 'policies/dhcp_leasetime'
}
def __init__(self, policies_dhcp_dns=None, policies_dhcp_scope=None, policies_dhcp_dnsupdate=None, policies_dhcp_boot=None, policies_dhcp_statements=None, policies_dhcp_netbios=None, policies_dhcp_routing=None, policies_dhcp_leasetime=None, local_vars_configuration=None): # noqa: E501
"""DhcpServicePolicies - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration.get_default_copy()
self.local_vars_configuration = local_vars_configuration
self._policies_dhcp_dns = None
self._policies_dhcp_scope = None
self._policies_dhcp_dnsupdate = None
self._policies_dhcp_boot = None
self._policies_dhcp_statements = None
self._policies_dhcp_netbios = None
self._policies_dhcp_routing = None
self._policies_dhcp_leasetime = None
self.discriminator = None
if policies_dhcp_dns is not None:
self.policies_dhcp_dns = policies_dhcp_dns
if policies_dhcp_scope is not None:
self.policies_dhcp_scope = policies_dhcp_scope
if policies_dhcp_dnsupdate is not None:
self.policies_dhcp_dnsupdate = policies_dhcp_dnsupdate
if policies_dhcp_boot is not None:
self.policies_dhcp_boot = policies_dhcp_boot
if policies_dhcp_statements is not None:
self.policies_dhcp_statements = policies_dhcp_statements
if policies_dhcp_netbios is not None:
self.policies_dhcp_netbios = policies_dhcp_netbios
if policies_dhcp_routing is not None:
self.policies_dhcp_routing = policies_dhcp_routing
if policies_dhcp_leasetime is not None:
self.policies_dhcp_leasetime = policies_dhcp_leasetime
@property
def policies_dhcp_dns(self):
"""Gets the policies_dhcp_dns of this DhcpServicePolicies. # noqa: E501
Policy: DHCP DNS # noqa: E501
:return: The policies_dhcp_dns of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_dns
@policies_dhcp_dns.setter
def policies_dhcp_dns(self, policies_dhcp_dns):
"""Sets the policies_dhcp_dns of this DhcpServicePolicies.
Policy: DHCP DNS # noqa: E501
:param policies_dhcp_dns: The policies_dhcp_dns of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_dns: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_dns is not None and len(policies_dhcp_dns) > 1):
raise ValueError("Invalid value for `policies_dhcp_dns`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_dns is not None and len(policies_dhcp_dns) < 0):
raise ValueError("Invalid value for `policies_dhcp_dns`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_dns = policies_dhcp_dns
@property
def policies_dhcp_scope(self):
"""Gets the policies_dhcp_scope of this DhcpServicePolicies. # noqa: E501
Policy: DHCP Allow/Deny # noqa: E501
:return: The policies_dhcp_scope of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_scope
@policies_dhcp_scope.setter
def policies_dhcp_scope(self, policies_dhcp_scope):
"""Sets the policies_dhcp_scope of this DhcpServicePolicies.
Policy: DHCP Allow/Deny # noqa: E501
:param policies_dhcp_scope: The policies_dhcp_scope of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_scope: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_scope is not None and len(policies_dhcp_scope) > 1):
raise ValueError("Invalid value for `policies_dhcp_scope`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_scope is not None and len(policies_dhcp_scope) < 0):
raise ValueError("Invalid value for `policies_dhcp_scope`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_scope = policies_dhcp_scope
@property
def policies_dhcp_dnsupdate(self):
"""Gets the policies_dhcp_dnsupdate of this DhcpServicePolicies. # noqa: E501
Policy: DHCP Dynamic DNS # noqa: E501
:return: The policies_dhcp_dnsupdate of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_dnsupdate
@policies_dhcp_dnsupdate.setter
def policies_dhcp_dnsupdate(self, policies_dhcp_dnsupdate):
"""Sets the policies_dhcp_dnsupdate of this DhcpServicePolicies.
Policy: DHCP Dynamic DNS # noqa: E501
:param policies_dhcp_dnsupdate: The policies_dhcp_dnsupdate of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_dnsupdate: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_dnsupdate is not None and len(policies_dhcp_dnsupdate) > 1):
raise ValueError("Invalid value for `policies_dhcp_dnsupdate`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_dnsupdate is not None and len(policies_dhcp_dnsupdate) < 0):
raise ValueError("Invalid value for `policies_dhcp_dnsupdate`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_dnsupdate = policies_dhcp_dnsupdate
@property
def policies_dhcp_boot(self):
"""Gets the policies_dhcp_boot of this DhcpServicePolicies. # noqa: E501
Policy: DHCP Boot # noqa: E501
:return: The policies_dhcp_boot of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_boot
@policies_dhcp_boot.setter
def policies_dhcp_boot(self, policies_dhcp_boot):
"""Sets the policies_dhcp_boot of this DhcpServicePolicies.
Policy: DHCP Boot # noqa: E501
:param policies_dhcp_boot: The policies_dhcp_boot of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_boot: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_boot is not None and len(policies_dhcp_boot) > 1):
raise ValueError("Invalid value for `policies_dhcp_boot`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_boot is not None and len(policies_dhcp_boot) < 0):
raise ValueError("Invalid value for `policies_dhcp_boot`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_boot = policies_dhcp_boot
@property
def policies_dhcp_statements(self):
"""Gets the policies_dhcp_statements of this DhcpServicePolicies. # noqa: E501
Policy: DHCP statements # noqa: E501
:return: The policies_dhcp_statements of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_statements
@policies_dhcp_statements.setter
def policies_dhcp_statements(self, policies_dhcp_statements):
"""Sets the policies_dhcp_statements of this DhcpServicePolicies.
Policy: DHCP statements # noqa: E501
:param policies_dhcp_statements: The policies_dhcp_statements of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_statements: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_statements is not None and len(policies_dhcp_statements) > 1):
raise ValueError("Invalid value for `policies_dhcp_statements`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_statements is not None and len(policies_dhcp_statements) < 0):
raise ValueError("Invalid value for `policies_dhcp_statements`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_statements = policies_dhcp_statements
@property
def policies_dhcp_netbios(self):
"""Gets the policies_dhcp_netbios of this DhcpServicePolicies. # noqa: E501
Policy: DHCP NetBIOS # noqa: E501
:return: The policies_dhcp_netbios of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_netbios
@policies_dhcp_netbios.setter
def policies_dhcp_netbios(self, policies_dhcp_netbios):
"""Sets the policies_dhcp_netbios of this DhcpServicePolicies.
Policy: DHCP NetBIOS # noqa: E501
:param policies_dhcp_netbios: The policies_dhcp_netbios of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_netbios: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_netbios is not None and len(policies_dhcp_netbios) > 1):
raise ValueError("Invalid value for `policies_dhcp_netbios`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_netbios is not None and len(policies_dhcp_netbios) < 0):
raise ValueError("Invalid value for `policies_dhcp_netbios`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_netbios = policies_dhcp_netbios
@property
def policies_dhcp_routing(self):
"""Gets the policies_dhcp_routing of this DhcpServicePolicies. # noqa: E501
Policy: DHCP routing # noqa: E501
:return: The policies_dhcp_routing of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_routing
@policies_dhcp_routing.setter
def policies_dhcp_routing(self, policies_dhcp_routing):
"""Sets the policies_dhcp_routing of this DhcpServicePolicies.
Policy: DHCP routing # noqa: E501
:param policies_dhcp_routing: The policies_dhcp_routing of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_routing: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_routing is not None and len(policies_dhcp_routing) > 1):
raise ValueError("Invalid value for `policies_dhcp_routing`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_routing is not None and len(policies_dhcp_routing) < 0):
raise ValueError("Invalid value for `policies_dhcp_routing`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_routing = policies_dhcp_routing
@property
def policies_dhcp_leasetime(self):
"""Gets the policies_dhcp_leasetime of this DhcpServicePolicies. # noqa: E501
Policy: DHCP lease time # noqa: E501
:return: The policies_dhcp_leasetime of this DhcpServicePolicies. # noqa: E501
:rtype: list[str]
"""
return self._policies_dhcp_leasetime
@policies_dhcp_leasetime.setter
def policies_dhcp_leasetime(self, policies_dhcp_leasetime):
"""Sets the policies_dhcp_leasetime of this DhcpServicePolicies.
Policy: DHCP lease time # noqa: E501
:param policies_dhcp_leasetime: The policies_dhcp_leasetime of this DhcpServicePolicies. # noqa: E501
:type policies_dhcp_leasetime: list[str]
"""
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_leasetime is not None and len(policies_dhcp_leasetime) > 1):
raise ValueError("Invalid value for `policies_dhcp_leasetime`, number of items must be less than or equal to `1`") # noqa: E501
if (self.local_vars_configuration.client_side_validation and
policies_dhcp_leasetime is not None and len(policies_dhcp_leasetime) < 0):
raise ValueError("Invalid value for `policies_dhcp_leasetime`, number of items must be greater than or equal to `0`") # noqa: E501
self._policies_dhcp_leasetime = policies_dhcp_leasetime
def to_dict(self, serialize=False):
"""Returns the model properties as a dict"""
result = {}
def convert(x):
if hasattr(x, "to_dict"):
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:
return x.to_dict(serialize)
else:
return x
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
attr = self.attribute_map.get(attr, attr) if serialize else attr
if isinstance(value, list):
result[attr] = list(map(
lambda x: convert(x),
value
))
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], convert(item[1])),
value.items()
))
else:
result[attr] = convert(value)
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(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, DhcpServicePolicies):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, DhcpServicePolicies):
return True
return self.to_dict() != other.to_dict()