diff --git a/requirements.txt b/requirements.txt index 389a8f13..c16d996b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,5 @@ six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.23 -requests==2.26.0 +requests>=2.29.0 pyjwt==2.6.0 \ No newline at end of file diff --git a/tb_rest_client/models/models_ce/device_profile.py b/tb_rest_client/models/models_ce/device_profile.py index abd189ad..667adb48 100644 --- a/tb_rest_client/models/models_ce/device_profile.py +++ b/tb_rest_client/models/models_ce/device_profile.py @@ -45,7 +45,8 @@ class DeviceProfile(object): 'provision_type': 'str', 'profile_data': 'DeviceProfileData', 'type': 'str', - 'default_edge_rule_chain_id': 'RuleChainId' + 'default_edge_rule_chain_id': 'RuleChainId', + 'external_id': 'EntityId' } attribute_map = { @@ -66,10 +67,11 @@ class DeviceProfile(object): 'provision_type': 'provisionType', 'profile_data': 'profileData', 'type': 'type', - 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId' + 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId', + 'external_id': 'externalId' } - def __init__(self, id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, firmware_id=None, software_id=None, description=None, image=None, provision_device_key=None, transport_type=None, provision_type=None, profile_data=None, type=None, default_edge_rule_chain_id=None): # noqa: E501 + def __init__(self, id=None, external_id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, firmware_id=None, software_id=None, description=None, image=None, provision_device_key=None, transport_type=None, provision_type=None, profile_data=None, type=None, default_edge_rule_chain_id=None): # noqa: E501 """DeviceProfile - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -89,7 +91,9 @@ def __init__(self, id=None, created_time=None, tenant_id=None, name=None, defaul self._profile_data = None self._type = None self._default_edge_rule_chain_id = None + self._external_id = None self.discriminator = None + self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -110,16 +114,20 @@ def __init__(self, id=None, created_time=None, tenant_id=None, name=None, defaul self.firmware_id = firmware_id if software_id is not None: self.software_id = software_id - self.description = description or '' + if description is not None: + self.description = description if image is not None: self.image = image if provision_device_key is not None: self.provision_device_key = provision_device_key - self.transport_type = transport_type or 'DEFAULT' - self.provision_type = provision_type or 'DISABLED' + if transport_type is not None: + self.transport_type = transport_type + if provision_type is not None: + self.provision_type = provision_type if profile_data is not None: self.profile_data = profile_data - self.type = type or 'DEFAULT' + if type is not None: + self.type = type if default_edge_rule_chain_id is not None: self.default_edge_rule_chain_id = default_edge_rule_chain_id @@ -144,6 +152,14 @@ def id(self, id): self._id = id + @property + def external_id(self): + return self._external_id + + @external_id.setter + def external_id(self, external_id): + self._external_id = external_id + @property def created_time(self): """Gets the created_time of this DeviceProfile. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/notification_rule_trigger_config.py b/tb_rest_client/models/models_ce/notification_rule_trigger_config.py index d20dc510..83eb7f97 100644 --- a/tb_rest_client/models/models_ce/notification_rule_trigger_config.py +++ b/tb_rest_client/models/models_ce/notification_rule_trigger_config.py @@ -28,16 +28,32 @@ class NotificationRuleTriggerConfig(object): and the value is json key in definition. """ swagger_types = { - 'trigger_type': 'str' + 'trigger_type': 'str', + 'alarm_severities': 'list[str]', + 'clear_rule': 'bool', + 'notify_on': 'list[str]', + 'alarm_types': 'list[str]' } attribute_map = { - 'trigger_type': 'triggerType' + 'trigger_type': 'triggerType', + 'clear_rule': 'clearRule', + 'notify_on': 'notifyOn', + 'alarm_types': 'alarmTypes', + 'alarm_severities': 'alarmSeverities' } - def __init__(self, trigger_type=None): # noqa: E501 + def __init__(self, trigger_type=None, clear_rule=None, notify_on=None, alarm_types=None, alarm_severities=None): # noqa: E501 """NotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 self._trigger_type = None + self._clear_rule = None + self._notify_on = None + self._alarm_types = None + self._alarm_severities = None + self.clear_rule = clear_rule + self.notify_on = notify_on + self.alarm_types = alarm_types + self.alarm_severities = alarm_severities self.discriminator = None if trigger_type is not None: self.trigger_type = trigger_type @@ -69,6 +85,38 @@ def trigger_type(self, trigger_type): self._trigger_type = trigger_type + @property + def clear_rule(self): + return self._clear_rule + + @clear_rule.setter + def clear_rule(self, clear_rule): + self._clear_rule = clear_rule + + @property + def notify_on(self): + return self._notify_on + + @notify_on.setter + def notify_on(self, notify_on): + self._notify_on = notify_on + + @property + def alarm_types(self): + return self._alarm_types + + @alarm_types.setter + def alarm_types(self, alarm_types): + self._alarm_types = alarm_types + + @property + def alarm_severities(self): + return self._alarm_severities + + @alarm_severities.setter + def alarm_severities(self, alarm_severities): + self._alarm_severities = alarm_severities + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/tb_rest_client/models/models_ce/notification_target_config.py b/tb_rest_client/models/models_ce/notification_target_config.py index e6fdc324..5515c085 100644 --- a/tb_rest_client/models/models_ce/notification_target_config.py +++ b/tb_rest_client/models/models_ce/notification_target_config.py @@ -28,20 +28,44 @@ class NotificationTargetConfig(object): and the value is json key in definition. """ swagger_types = { - 'description': 'str' + 'description': 'str', + 'type': 'str', + 'users_filter': 'JsonNode' } attribute_map = { - 'description': 'description' + 'description': 'description', + 'type': 'type', + 'users_filter': 'usersFilter' } - def __init__(self, description=None): # noqa: E501 + def __init__(self, description=None, type=None, users_filter=None): # noqa: E501 """NotificationTargetConfig - a model defined in Swagger""" # noqa: E501 self._description = None + self._type = None + self._users_filter = None + self.type = type + self.users_filter = users_filter self.discriminator = None if description is not None: self.description = description + @property + def type(self): + return self._type + + @type.setter + def type(self, type): + self._type = type + + @property + def users_filter(self): + return self._users_filter + + @users_filter.setter + def users_filter(self, users_filter): + self._users_filter = users_filter + @property def description(self): """Gets the description of this NotificationTargetConfig. # noqa: E501 diff --git a/tb_rest_client/models/models_ce/widgets_bundle.py b/tb_rest_client/models/models_ce/widgets_bundle.py index 7b386740..e72c27a8 100644 --- a/tb_rest_client/models/models_ce/widgets_bundle.py +++ b/tb_rest_client/models/models_ce/widgets_bundle.py @@ -35,7 +35,8 @@ class WidgetsBundle(object): 'alias': 'str', 'title': 'str', 'image': 'str', - 'description': 'str' + 'description': 'str', + 'external_id': 'EntityId' } attribute_map = { @@ -46,10 +47,11 @@ class WidgetsBundle(object): 'alias': 'alias', 'title': 'title', 'image': 'image', - 'description': 'description' + 'description': 'description', + 'external_id': 'externalId' } - def __init__(self, id=None, created_time=None, name=None, tenant_id=None, alias=None, title=None, image=None, description=None): # noqa: E501 + def __init__(self, id=None, external_id=None, created_time=None, name=None, tenant_id=None, alias=None, title=None, image=None, description=None): # noqa: E501 """WidgetsBundle - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -59,6 +61,8 @@ def __init__(self, id=None, created_time=None, name=None, tenant_id=None, alias= self._title = None self._image = None self._description = None + self._external_id = None + self.external_id = external_id self.discriminator = None if id is not None: self.id = id @@ -98,6 +102,14 @@ def id(self, id): self._id = id + @property + def external_id(self): + return self._external_id + + @external_id.setter + def external_id(self, external_id): + self._external_id = external_id + @property def created_time(self): """Gets the created_time of this WidgetsBundle. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/__init__.py b/tb_rest_client/models/models_pe/__init__.py index 4685a4b7..edf834fb 100644 --- a/tb_rest_client/models/models_pe/__init__.py +++ b/tb_rest_client/models/models_pe/__init__.py @@ -3,13 +3,11 @@ from .merged_user_permissions import MergedUserPermissions from .page_data_edge import PageDataEdge from .tenant_solution_template_info import TenantSolutionTemplateInfo -from .tenant_info import TenantInfo from .debug_rule_node_event_filter import DebugRuleNodeEventFilter from .admin_settings_id import AdminSettingsId from .entity_data import EntityData from .server_security_config import ServerSecurityConfig from .login_response import LoginResponse -from .widget_type import WidgetType from .event_id import EventId from .scheduler_event_info import SchedulerEventInfo from .test_sms_request import TestSmsRequest @@ -39,10 +37,8 @@ from .device_search_query_filter import DeviceSearchQueryFilter from .dashboard_info import DashboardInfo from .byte_buffer import ByteBuffer -from .entity_info import EntityInfo from .edge import Edge from .scheduler_event_with_customer_info import SchedulerEventWithCustomerInfo -from .tenant import Tenant from .entity_relations_query import EntityRelationsQuery from .sms_provider_configuration import SmsProviderConfiguration from .entity_relation_info import EntityRelationInfo @@ -130,7 +126,6 @@ from .telemetry_mapping_configuration import TelemetryMappingConfiguration from .default_device_profile_configuration import DefaultDeviceProfileConfiguration from .any_time_schedule import AnyTimeSchedule -from .page_data_tenant import PageDataTenant from .allow_create_new_devices_device_profile_provision_configuration import \ AllowCreateNewDevicesDeviceProfileProvisionConfiguration from .to_device_rpc_request_snmp_communication_config import ToDeviceRpcRequestSnmpCommunicationConfig @@ -186,13 +181,10 @@ from .relations_search_parameters import RelationsSearchParameters from .thingsboard_credentials_expired_response import ThingsboardCredentialsExpiredResponse from .o_auth2_basic_mapper_config import OAuth2BasicMapperConfig -from .page_data_widgets_bundle import PageDataWidgetsBundle from .simple_alarm_condition_spec import SimpleAlarmConditionSpec from .rpc import Rpc from .group_permission_info import GroupPermissionInfo -from .widgets_bundle import WidgetsBundle from .rpc_id import RpcId -from .page_data_entity_info import PageDataEntityInfo from .page_data_alarm_data import PageDataAlarmData from .default_rule_chain_create_request import DefaultRuleChainCreateRequest from .transport_payload_type_configuration import TransportPayloadTypeConfiguration @@ -228,21 +220,17 @@ from .entity_view_type_filter import EntityViewTypeFilter from .page_data_entity_data import PageDataEntityData from .dynamic_valueboolean import DynamicValueboolean -from .page_data_tenant_info import PageDataTenantInfo -from .page_data_audit_log import PageDataAuditLog from .tenant_profile_configuration import TenantProfileConfiguration from .customer import Customer from .dynamic_valuelong import DynamicValuelong from .device_profile_transport_configuration import DeviceProfileTransportConfiguration from .tb_resource_info import TbResourceInfo -from .widget_type_details import WidgetTypeDetails from .object_attributes import ObjectAttributes from .relation_entity_type_filter import RelationEntityTypeFilter from .asset_search_query_filter import AssetSearchQueryFilter from .reset_password_email_request import ResetPasswordEmailRequest from .tenant_solution_template_details import TenantSolutionTemplateDetails from .tenant_profile_id import TenantProfileId -from .tenant_profile import TenantProfile from .blob_entity_id import BlobEntityId from .key_filter_predicate import KeyFilterPredicate from .o_auth2_mapper_config import OAuth2MapperConfig @@ -258,7 +246,6 @@ from .dynamic_valuestring import DynamicValuestring from .lw_m2m_instance import LwM2mInstance from .repeating_alarm_condition_spec import RepeatingAlarmConditionSpec -from .page_data_tenant_profile import PageDataTenantProfile from .custom_time_schedule_item import CustomTimeScheduleItem from .mapping import Mapping from .user_password_policy import UserPasswordPolicy @@ -331,7 +318,6 @@ from .two_fa_provider_info import TwoFaProviderInfo from .entity_load_error import EntityLoadError from .array_node import ArrayNode -from .asset_profile_info import AssetProfileInfo from .integration_info import IntegrationInfo from .page_data_integration_info import PageDataIntegrationInfo from .raw_data_event_filter import RawDataEventFilter @@ -350,7 +336,6 @@ from .all_users_filter import AllUsersFilter from .api_usage_limit_notification_rule_trigger_config import ApiUsageLimitNotificationRuleTriggerConfig from .asset_info import AssetInfo -from .asset_profile import AssetProfile from .asset_profile_id import AssetProfileId from .clear_rule import ClearRule from .comparison_ts_value import ComparisonTsValue @@ -359,7 +344,6 @@ from .delivery_method_notification_template import DeliveryMethodNotificationTemplate from .device_activity_notification_rule_trigger_config import DeviceActivityNotificationRuleTriggerConfig from .device_info import DeviceInfo -from .device_profile import DeviceProfile from .edge_info import EdgeInfo from .edge_install_instructions import EdgeInstallInstructions from .email_delivery_method_notification_template import EmailDeliveryMethodNotificationTemplate @@ -382,34 +366,18 @@ from .notification_request_config import NotificationRequestConfig from .notification_request_id import NotificationRequestId from .notification_request_preview import NotificationRequestPreview -from .notification_request_info import NotificationRequestInfo from .notification_request_stats import NotificationRequestStats -from .notification_rule import NotificationRule from .notification_rule_config import NotificationRuleConfig from .notification_rule_id import NotificationRuleId -from .notification_rule_info import NotificationRuleInfo from .notification_rule_recipients_config import NotificationRuleRecipientsConfig -from .notification_rule_trigger_config import NotificationRuleTriggerConfig -from .notification_settings import NotificationSettings -from .notification_template import NotificationTemplate -from .notification_target import NotificationTarget -from .notification_target_config import NotificationTargetConfig from .notification_target_id import NotificationTargetId from .notification_template_config import NotificationTemplateConfig from .notification_template_id import NotificationTemplateId from .originator_entity_owner_users_filter import OriginatorEntityOwnerUsersFilter -from .page_data_alarm_comment_info import PageDataAlarmCommentInfo -from .page_data_asset_profile import PageDataAssetProfile -from .page_data_asset_profile_info import PageDataAssetProfileInfo from .page_data_customer_info import PageDataCustomerInfo from .page_data_edge_info import PageDataEdgeInfo from .page_data_entity_view_info import PageDataEntityViewInfo from .page_data_event_info import PageDataEventInfo -from .page_data_notification import PageDataNotification -from .page_data_notification_request_info import PageDataNotificationRequestInfo -from .page_data_notification_rule_info import PageDataNotificationRuleInfo -from .page_data_notification_target import PageDataNotificationTarget -from .page_data_notification_template import PageDataNotificationTemplate from .page_data_user_email_info import PageDataUserEmailInfo from .page_data_user_info import PageDataUserInfo from .platform_users_notification_target_config import PlatformUsersNotificationTargetConfig @@ -428,7 +396,6 @@ from .system_info import SystemInfo from .system_info_data import SystemInfoData from .tenant_administrators_filter import TenantAdministratorsFilter -from .usage_info import UsageInfo from .user_dashboards_info import UserDashboardsInfo from .user_email_info import UserEmailInfo from .user_group_list_filter import UserGroupListFilter diff --git a/tb_rest_client/models/models_pe/api_usage_limit_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/api_usage_limit_notification_rule_trigger_config.py index 77d99f12..017727d9 100644 --- a/tb_rest_client/models/models_pe/api_usage_limit_notification_rule_trigger_config.py +++ b/tb_rest_client/models/models_pe/api_usage_limit_notification_rule_trigger_config.py @@ -14,7 +14,7 @@ import re # noqa: F401 import six -from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 class ApiUsageLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/tb_rest_client/models/models_pe/asset_profile.py b/tb_rest_client/models/models_pe/asset_profile.py deleted file mode 100644 index e57ceceb..00000000 --- a/tb_rest_client/models/models_pe/asset_profile.py +++ /dev/null @@ -1,382 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AssetProfile(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'AssetProfileId', - 'created_time': 'int', - 'tenant_id': 'TenantId', - 'name': 'str', - 'default': 'bool', - 'default_dashboard_id': 'DashboardId', - 'default_rule_chain_id': 'RuleChainId', - 'default_queue_name': 'str', - 'description': 'str', - 'image': 'str', - 'default_edge_rule_chain_id': 'RuleChainId' - } - - attribute_map = { - 'id': 'id', - 'created_time': 'createdTime', - 'tenant_id': 'tenantId', - 'name': 'name', - 'default': 'default', - 'default_dashboard_id': 'defaultDashboardId', - 'default_rule_chain_id': 'defaultRuleChainId', - 'default_queue_name': 'defaultQueueName', - 'description': 'description', - 'image': 'image', - 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId' - } - - def __init__(self, id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, description=None, image=None, default_edge_rule_chain_id=None): # noqa: E501 - """AssetProfile - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_time = None - self._tenant_id = None - self._name = None - self._default = None - self._default_dashboard_id = None - self._default_rule_chain_id = None - self._default_queue_name = None - self._description = None - self._image = None - self._default_edge_rule_chain_id = None - self.discriminator = None - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if tenant_id is not None: - self.tenant_id = tenant_id - if name is not None: - self.name = name - if default is not None: - self.default = default - if default_dashboard_id is not None: - self.default_dashboard_id = default_dashboard_id - if default_rule_chain_id is not None: - self.default_rule_chain_id = default_rule_chain_id - if default_queue_name is not None: - self.default_queue_name = default_queue_name - if description is not None: - self.description = description - if image is not None: - self.image = image - if default_edge_rule_chain_id is not None: - self.default_edge_rule_chain_id = default_edge_rule_chain_id - - @property - def id(self): - """Gets the id of this AssetProfile. # noqa: E501 - - - :return: The id of this AssetProfile. # noqa: E501 - :rtype: AssetProfileId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssetProfile. - - - :param id: The id of this AssetProfile. # noqa: E501 - :type: AssetProfileId - """ - - self._id = id - - @property - def created_time(self): - """Gets the created_time of this AssetProfile. # noqa: E501 - - Timestamp of the profile creation, in milliseconds # noqa: E501 - - :return: The created_time of this AssetProfile. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this AssetProfile. - - Timestamp of the profile creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this AssetProfile. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def tenant_id(self): - """Gets the tenant_id of this AssetProfile. # noqa: E501 - - - :return: The tenant_id of this AssetProfile. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this AssetProfile. - - - :param tenant_id: The tenant_id of this AssetProfile. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - @property - def name(self): - """Gets the name of this AssetProfile. # noqa: E501 - - Unique Asset Profile Name in scope of Tenant. # noqa: E501 - - :return: The name of this AssetProfile. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this AssetProfile. - - Unique Asset Profile Name in scope of Tenant. # noqa: E501 - - :param name: The name of this AssetProfile. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def default(self): - """Gets the default of this AssetProfile. # noqa: E501 - - Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation. # noqa: E501 - - :return: The default of this AssetProfile. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this AssetProfile. - - Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation. # noqa: E501 - - :param default: The default of this AssetProfile. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def default_dashboard_id(self): - """Gets the default_dashboard_id of this AssetProfile. # noqa: E501 - - - :return: The default_dashboard_id of this AssetProfile. # noqa: E501 - :rtype: DashboardId - """ - return self._default_dashboard_id - - @default_dashboard_id.setter - def default_dashboard_id(self, default_dashboard_id): - """Sets the default_dashboard_id of this AssetProfile. - - - :param default_dashboard_id: The default_dashboard_id of this AssetProfile. # noqa: E501 - :type: DashboardId - """ - - self._default_dashboard_id = default_dashboard_id - - @property - def default_rule_chain_id(self): - """Gets the default_rule_chain_id of this AssetProfile. # noqa: E501 - - - :return: The default_rule_chain_id of this AssetProfile. # noqa: E501 - :rtype: RuleChainId - """ - return self._default_rule_chain_id - - @default_rule_chain_id.setter - def default_rule_chain_id(self, default_rule_chain_id): - """Sets the default_rule_chain_id of this AssetProfile. - - - :param default_rule_chain_id: The default_rule_chain_id of this AssetProfile. # noqa: E501 - :type: RuleChainId - """ - - self._default_rule_chain_id = default_rule_chain_id - - @property - def default_queue_name(self): - """Gets the default_queue_name of this AssetProfile. # noqa: E501 - - Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 - - :return: The default_queue_name of this AssetProfile. # noqa: E501 - :rtype: str - """ - return self._default_queue_name - - @default_queue_name.setter - def default_queue_name(self, default_queue_name): - """Sets the default_queue_name of this AssetProfile. - - Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 - - :param default_queue_name: The default_queue_name of this AssetProfile. # noqa: E501 - :type: str - """ - - self._default_queue_name = default_queue_name - - @property - def description(self): - """Gets the description of this AssetProfile. # noqa: E501 - - Asset Profile description. # noqa: E501 - - :return: The description of this AssetProfile. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this AssetProfile. - - Asset Profile description. # noqa: E501 - - :param description: The description of this AssetProfile. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def image(self): - """Gets the image of this AssetProfile. # noqa: E501 - - Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 - - :return: The image of this AssetProfile. # noqa: E501 - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this AssetProfile. - - Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 - - :param image: The image of this AssetProfile. # noqa: E501 - :type: str - """ - - self._image = image - - @property - def default_edge_rule_chain_id(self): - """Gets the default_edge_rule_chain_id of this AssetProfile. # noqa: E501 - - - :return: The default_edge_rule_chain_id of this AssetProfile. # noqa: E501 - :rtype: RuleChainId - """ - return self._default_edge_rule_chain_id - - @default_edge_rule_chain_id.setter - def default_edge_rule_chain_id(self, default_edge_rule_chain_id): - """Sets the default_edge_rule_chain_id of this AssetProfile. - - - :param default_edge_rule_chain_id: The default_edge_rule_chain_id of this AssetProfile. # noqa: E501 - :type: RuleChainId - """ - - self._default_edge_rule_chain_id = default_edge_rule_chain_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(AssetProfile, dict): - for key, value in self.items(): - result[key] = 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, AssetProfile): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/asset_profile_info.py b/tb_rest_client/models/models_pe/asset_profile_info.py deleted file mode 100644 index 6ac30b4e..00000000 --- a/tb_rest_client/models/models_pe/asset_profile_info.py +++ /dev/null @@ -1,218 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class AssetProfileInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'EntityId', - 'name': 'str', - 'image': 'str', - 'default_dashboard_id': 'DashboardId', - 'tenant_id': 'TenantId' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'image': 'image', - 'default_dashboard_id': 'defaultDashboardId', - 'tenant_id': 'tenantId' - } - - def __init__(self, id=None, name=None, image=None, default_dashboard_id=None, tenant_id=None): # noqa: E501 - """AssetProfileInfo - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self._image = None - self._default_dashboard_id = None - self._tenant_id = None - self.discriminator = None - if id is not None: - self.id = id - if name is not None: - self.name = name - if image is not None: - self.image = image - if default_dashboard_id is not None: - self.default_dashboard_id = default_dashboard_id - if tenant_id is not None: - self.tenant_id = tenant_id - - @property - def id(self): - """Gets the id of this AssetProfileInfo. # noqa: E501 - - - :return: The id of this AssetProfileInfo. # noqa: E501 - :rtype: EntityId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this AssetProfileInfo. - - - :param id: The id of this AssetProfileInfo. # noqa: E501 - :type: EntityId - """ - - self._id = id - - @property - def name(self): - """Gets the name of this AssetProfileInfo. # noqa: E501 - - Entity Name # noqa: E501 - - :return: The name of this AssetProfileInfo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this AssetProfileInfo. - - Entity Name # noqa: E501 - - :param name: The name of this AssetProfileInfo. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def image(self): - """Gets the image of this AssetProfileInfo. # noqa: E501 - - Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 - - :return: The image of this AssetProfileInfo. # noqa: E501 - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this AssetProfileInfo. - - Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. # noqa: E501 - - :param image: The image of this AssetProfileInfo. # noqa: E501 - :type: str - """ - - self._image = image - - @property - def default_dashboard_id(self): - """Gets the default_dashboard_id of this AssetProfileInfo. # noqa: E501 - - - :return: The default_dashboard_id of this AssetProfileInfo. # noqa: E501 - :rtype: DashboardId - """ - return self._default_dashboard_id - - @default_dashboard_id.setter - def default_dashboard_id(self, default_dashboard_id): - """Sets the default_dashboard_id of this AssetProfileInfo. - - - :param default_dashboard_id: The default_dashboard_id of this AssetProfileInfo. # noqa: E501 - :type: DashboardId - """ - - self._default_dashboard_id = default_dashboard_id - - @property - def tenant_id(self): - """Gets the tenant_id of this AssetProfileInfo. # noqa: E501 - - - :return: The tenant_id of this AssetProfileInfo. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this AssetProfileInfo. - - - :param tenant_id: The tenant_id of this AssetProfileInfo. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(AssetProfileInfo, dict): - for key, value in self.items(): - result[key] = 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, AssetProfileInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/device_activity_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/device_activity_notification_rule_trigger_config.py index f73da183..2167e6ac 100644 --- a/tb_rest_client/models/models_pe/device_activity_notification_rule_trigger_config.py +++ b/tb_rest_client/models/models_pe/device_activity_notification_rule_trigger_config.py @@ -14,7 +14,7 @@ import re # noqa: F401 import six -from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 class DeviceActivityNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/tb_rest_client/models/models_pe/device_profile.py b/tb_rest_client/models/models_pe/device_profile.py deleted file mode 100644 index 4fa83aa4..00000000 --- a/tb_rest_client/models/models_pe/device_profile.py +++ /dev/null @@ -1,602 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class DeviceProfile(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'DeviceProfileId', - 'created_time': 'int', - 'tenant_id': 'TenantId', - 'name': 'str', - 'default': 'bool', - 'default_dashboard_id': 'DashboardId', - 'default_rule_chain_id': 'RuleChainId', - 'default_queue_name': 'str', - 'firmware_id': 'OtaPackageId', - 'software_id': 'OtaPackageId', - 'description': 'str', - 'image': 'str', - 'provision_device_key': 'str', - 'transport_type': 'str', - 'provision_type': 'str', - 'profile_data': 'DeviceProfileData', - 'type': 'str', - 'default_edge_rule_chain_id': 'RuleChainId', - 'external_id': 'EntityId' - } - - attribute_map = { - 'id': 'id', - 'created_time': 'createdTime', - 'tenant_id': 'tenantId', - 'name': 'name', - 'default': 'default', - 'default_dashboard_id': 'defaultDashboardId', - 'default_rule_chain_id': 'defaultRuleChainId', - 'default_queue_name': 'defaultQueueName', - 'firmware_id': 'firmwareId', - 'software_id': 'softwareId', - 'description': 'description', - 'image': 'image', - 'provision_device_key': 'provisionDeviceKey', - 'transport_type': 'transportType', - 'provision_type': 'provisionType', - 'profile_data': 'profileData', - 'type': 'type', - 'default_edge_rule_chain_id': 'defaultEdgeRuleChainId', - 'external_id': 'externalId' - } - - def __init__(self, id=None, external_id=None, created_time=None, tenant_id=None, name=None, default=None, default_dashboard_id=None, default_rule_chain_id=None, default_queue_name=None, firmware_id=None, software_id=None, description=None, image=None, provision_device_key=None, transport_type=None, provision_type=None, profile_data=None, type=None, default_edge_rule_chain_id=None): # noqa: E501 - """DeviceProfile - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_time = None - self._tenant_id = None - self._name = None - self._default = None - self._default_dashboard_id = None - self._default_rule_chain_id = None - self._default_queue_name = None - self._firmware_id = None - self._software_id = None - self._description = None - self._image = None - self._provision_device_key = None - self._transport_type = None - self._provision_type = None - self._profile_data = None - self._type = None - self._default_edge_rule_chain_id = None - self._external_id = None - self.discriminator = None - self.external_id = external_id - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if tenant_id is not None: - self.tenant_id = tenant_id - if name is not None: - self.name = name - if default is not None: - self.default = default - if default_dashboard_id is not None: - self.default_dashboard_id = default_dashboard_id - if default_rule_chain_id is not None: - self.default_rule_chain_id = default_rule_chain_id - if default_queue_name is not None: - self.default_queue_name = default_queue_name - if firmware_id is not None: - self.firmware_id = firmware_id - if software_id is not None: - self.software_id = software_id - if description is not None: - self.description = description - if image is not None: - self.image = image - if provision_device_key is not None: - self.provision_device_key = provision_device_key - if transport_type is not None: - self.transport_type = transport_type - if provision_type is not None: - self.provision_type = provision_type - if profile_data is not None: - self.profile_data = profile_data - if type is not None: - self.type = type - if default_edge_rule_chain_id is not None: - self.default_edge_rule_chain_id = default_edge_rule_chain_id - - @property - def id(self): - """Gets the id of this DeviceProfile. # noqa: E501 - - - :return: The id of this DeviceProfile. # noqa: E501 - :rtype: DeviceProfileId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this DeviceProfile. - - - :param id: The id of this DeviceProfile. # noqa: E501 - :type: DeviceProfileId - """ - - self._id = id - - @property - def external_id(self): - return self._external_id - - @external_id.setter - def external_id(self, external_id): - self._external_id = external_id - - @property - def created_time(self): - """Gets the created_time of this DeviceProfile. # noqa: E501 - - Timestamp of the profile creation, in milliseconds # noqa: E501 - - :return: The created_time of this DeviceProfile. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this DeviceProfile. - - Timestamp of the profile creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this DeviceProfile. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def tenant_id(self): - """Gets the tenant_id of this DeviceProfile. # noqa: E501 - - - :return: The tenant_id of this DeviceProfile. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this DeviceProfile. - - - :param tenant_id: The tenant_id of this DeviceProfile. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - @property - def name(self): - """Gets the name of this DeviceProfile. # noqa: E501 - - Unique Device Profile Name in scope of Tenant. # noqa: E501 - - :return: The name of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this DeviceProfile. - - Unique Device Profile Name in scope of Tenant. # noqa: E501 - - :param name: The name of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def default(self): - """Gets the default of this DeviceProfile. # noqa: E501 - - Used to mark the default profile. Default profile is used when the device profile is not specified during device creation. # noqa: E501 - - :return: The default of this DeviceProfile. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this DeviceProfile. - - Used to mark the default profile. Default profile is used when the device profile is not specified during device creation. # noqa: E501 - - :param default: The default of this DeviceProfile. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def default_dashboard_id(self): - """Gets the default_dashboard_id of this DeviceProfile. # noqa: E501 - - - :return: The default_dashboard_id of this DeviceProfile. # noqa: E501 - :rtype: DashboardId - """ - return self._default_dashboard_id - - @default_dashboard_id.setter - def default_dashboard_id(self, default_dashboard_id): - """Sets the default_dashboard_id of this DeviceProfile. - - - :param default_dashboard_id: The default_dashboard_id of this DeviceProfile. # noqa: E501 - :type: DashboardId - """ - - self._default_dashboard_id = default_dashboard_id - - @property - def default_rule_chain_id(self): - """Gets the default_rule_chain_id of this DeviceProfile. # noqa: E501 - - - :return: The default_rule_chain_id of this DeviceProfile. # noqa: E501 - :rtype: RuleChainId - """ - return self._default_rule_chain_id - - @default_rule_chain_id.setter - def default_rule_chain_id(self, default_rule_chain_id): - """Sets the default_rule_chain_id of this DeviceProfile. - - - :param default_rule_chain_id: The default_rule_chain_id of this DeviceProfile. # noqa: E501 - :type: RuleChainId - """ - - self._default_rule_chain_id = default_rule_chain_id - - @property - def default_queue_name(self): - """Gets the default_queue_name of this DeviceProfile. # noqa: E501 - - Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to device, including telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 - - :return: The default_queue_name of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._default_queue_name - - @default_queue_name.setter - def default_queue_name(self, default_queue_name): - """Sets the default_queue_name of this DeviceProfile. - - Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to device, including telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages. # noqa: E501 - - :param default_queue_name: The default_queue_name of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._default_queue_name = default_queue_name - - @property - def firmware_id(self): - """Gets the firmware_id of this DeviceProfile. # noqa: E501 - - - :return: The firmware_id of this DeviceProfile. # noqa: E501 - :rtype: OtaPackageId - """ - return self._firmware_id - - @firmware_id.setter - def firmware_id(self, firmware_id): - """Sets the firmware_id of this DeviceProfile. - - - :param firmware_id: The firmware_id of this DeviceProfile. # noqa: E501 - :type: OtaPackageId - """ - - self._firmware_id = firmware_id - - @property - def software_id(self): - """Gets the software_id of this DeviceProfile. # noqa: E501 - - - :return: The software_id of this DeviceProfile. # noqa: E501 - :rtype: OtaPackageId - """ - return self._software_id - - @software_id.setter - def software_id(self, software_id): - """Sets the software_id of this DeviceProfile. - - - :param software_id: The software_id of this DeviceProfile. # noqa: E501 - :type: OtaPackageId - """ - - self._software_id = software_id - - @property - def description(self): - """Gets the description of this DeviceProfile. # noqa: E501 - - Device Profile description. # noqa: E501 - - :return: The description of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this DeviceProfile. - - Device Profile description. # noqa: E501 - - :param description: The description of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def image(self): - """Gets the image of this DeviceProfile. # noqa: E501 - - Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. # noqa: E501 - - :return: The image of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this DeviceProfile. - - Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. # noqa: E501 - - :param image: The image of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._image = image - - @property - def provision_device_key(self): - """Gets the provision_device_key of this DeviceProfile. # noqa: E501 - - Unique provisioning key used by 'Device Provisioning' feature. # noqa: E501 - - :return: The provision_device_key of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._provision_device_key - - @provision_device_key.setter - def provision_device_key(self, provision_device_key): - """Sets the provision_device_key of this DeviceProfile. - - Unique provisioning key used by 'Device Provisioning' feature. # noqa: E501 - - :param provision_device_key: The provision_device_key of this DeviceProfile. # noqa: E501 - :type: str - """ - - self._provision_device_key = provision_device_key - - @property - def transport_type(self): - """Gets the transport_type of this DeviceProfile. # noqa: E501 - - Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT. # noqa: E501 - - :return: The transport_type of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._transport_type - - @transport_type.setter - def transport_type(self, transport_type): - """Sets the transport_type of this DeviceProfile. - - Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT. # noqa: E501 - - :param transport_type: The transport_type of this DeviceProfile. # noqa: E501 - :type: str - """ - allowed_values = ["COAP", "DEFAULT", "LWM2M", "MQTT", "SNMP"] # noqa: E501 - if transport_type not in allowed_values: - raise ValueError( - "Invalid value for `transport_type` ({0}), must be one of {1}" # noqa: E501 - .format(transport_type, allowed_values) - ) - - self._transport_type = transport_type - - @property - def provision_type(self): - """Gets the provision_type of this DeviceProfile. # noqa: E501 - - Provisioning strategy. # noqa: E501 - - :return: The provision_type of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._provision_type - - @provision_type.setter - def provision_type(self, provision_type): - """Sets the provision_type of this DeviceProfile. - - Provisioning strategy. # noqa: E501 - - :param provision_type: The provision_type of this DeviceProfile. # noqa: E501 - :type: str - """ - allowed_values = ["ALLOW_CREATE_NEW_DEVICES", "CHECK_PRE_PROVISIONED_DEVICES", "DISABLED", "X509_CERTIFICATE_CHAIN"] # noqa: E501 - if provision_type not in allowed_values: - raise ValueError( - "Invalid value for `provision_type` ({0}), must be one of {1}" # noqa: E501 - .format(provision_type, allowed_values) - ) - - self._provision_type = provision_type - - @property - def profile_data(self): - """Gets the profile_data of this DeviceProfile. # noqa: E501 - - - :return: The profile_data of this DeviceProfile. # noqa: E501 - :rtype: DeviceProfileData - """ - return self._profile_data - - @profile_data.setter - def profile_data(self, profile_data): - """Sets the profile_data of this DeviceProfile. - - - :param profile_data: The profile_data of this DeviceProfile. # noqa: E501 - :type: DeviceProfileData - """ - - self._profile_data = profile_data - - @property - def type(self): - """Gets the type of this DeviceProfile. # noqa: E501 - - Type of the profile. Always 'DEFAULT' for now. Reserved for future use. # noqa: E501 - - :return: The type of this DeviceProfile. # noqa: E501 - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this DeviceProfile. - - Type of the profile. Always 'DEFAULT' for now. Reserved for future use. # noqa: E501 - - :param type: The type of this DeviceProfile. # noqa: E501 - :type: str - """ - allowed_values = ["DEFAULT"] # noqa: E501 - if type not in allowed_values: - raise ValueError( - "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 - .format(type, allowed_values) - ) - - self._type = type - - @property - def default_edge_rule_chain_id(self): - """Gets the default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 - - - :return: The default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 - :rtype: RuleChainId - """ - return self._default_edge_rule_chain_id - - @default_edge_rule_chain_id.setter - def default_edge_rule_chain_id(self, default_edge_rule_chain_id): - """Sets the default_edge_rule_chain_id of this DeviceProfile. - - - :param default_edge_rule_chain_id: The default_edge_rule_chain_id of this DeviceProfile. # noqa: E501 - :type: RuleChainId - """ - - self._default_edge_rule_chain_id = default_edge_rule_chain_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(DeviceProfile, dict): - for key, value in self.items(): - result[key] = 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, DeviceProfile): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/entities_limit_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/entities_limit_notification_rule_trigger_config.py index 575e5535..afa7cbaf 100644 --- a/tb_rest_client/models/models_pe/entities_limit_notification_rule_trigger_config.py +++ b/tb_rest_client/models/models_pe/entities_limit_notification_rule_trigger_config.py @@ -14,7 +14,7 @@ import re # noqa: F401 import six -from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 class EntitiesLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/tb_rest_client/models/models_pe/entity_info.py b/tb_rest_client/models/models_pe/entity_info.py deleted file mode 100644 index 9ddea514..00000000 --- a/tb_rest_client/models/models_pe/entity_info.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class EntityInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'EntityId', - 'name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name' - } - - def __init__(self, id=None, name=None): # noqa: E501 - """EntityInfo - a model defined in Swagger""" # noqa: E501 - self._id = None - self._name = None - self.discriminator = None - if id is not None: - self.id = id - if name is not None: - self.name = name - - @property - def id(self): - """Gets the id of this EntityInfo. # noqa: E501 - - - :return: The id of this EntityInfo. # noqa: E501 - :rtype: EntityId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this EntityInfo. - - - :param id: The id of this EntityInfo. # noqa: E501 - :type: EntityId - """ - - self._id = id - - @property - def name(self): - """Gets the name of this EntityInfo. # noqa: E501 - - Entity Name # noqa: E501 - - :return: The name of this EntityInfo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this EntityInfo. - - Entity Name # noqa: E501 - - :param name: The name of this EntityInfo. # noqa: E501 - :type: str - """ - - self._name = name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(EntityInfo, dict): - for key, value in self.items(): - result[key] = 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, EntityInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/integration.py b/tb_rest_client/models/models_pe/integration.py index e39de016..91a8cf94 100644 --- a/tb_rest_client/models/models_pe/integration.py +++ b/tb_rest_client/models/models_pe/integration.py @@ -43,7 +43,8 @@ class Integration(object): 'configuration': 'JsonNode', 'additional_info': 'JsonNode', 'name': 'str', - 'edge_template': 'bool' + 'edge_template': 'bool', + 'external_id': 'EntityId' } attribute_map = { @@ -62,10 +63,11 @@ class Integration(object): 'configuration': 'configuration', 'additional_info': 'additionalInfo', 'name': 'name', - 'edge_template': 'edgeTemplate' + 'edge_template': 'edgeTemplate', + 'external_id': 'externalId' } - def __init__(self, id=None, created_time=None, tenant_id=None, default_converter_id=None, downlink_converter_id=None, routing_key=None, type=None, debug_mode=None, enabled=None, remote=None, allow_create_devices_or_assets=None, secret=None, configuration=None, additional_info=None, name=None, edge_template=None): # noqa: E501 + def __init__(self, id=None, external_id=None, created_time=None, tenant_id=None, default_converter_id=None, downlink_converter_id=None, routing_key=None, type=None, debug_mode=None, enabled=None, remote=None, allow_create_devices_or_assets=None, secret=None, configuration=None, additional_info=None, name=None, edge_template=None): # noqa: E501 """Integration - a model defined in Swagger""" # noqa: E501 self._id = None self._created_time = None @@ -83,7 +85,9 @@ def __init__(self, id=None, created_time=None, tenant_id=None, default_converter self._additional_info = None self._name = None self._edge_template = None + self._external_id = None self.discriminator = None + self.external_id = external_id if id is not None: self.id = id if created_time is not None: @@ -133,6 +137,14 @@ def id(self, id): self._id = id + @property + def external_id(self): + return self._external_id + + @external_id.setter + def external_id(self, external_id): + self._external_id = external_id + @property def created_time(self): """Gets the created_time of this Integration. # noqa: E501 diff --git a/tb_rest_client/models/models_pe/notification_request_info.py b/tb_rest_client/models/models_pe/notification_request_info.py deleted file mode 100644 index 2fc6b3a6..00000000 --- a/tb_rest_client/models/models_pe/notification_request_info.py +++ /dev/null @@ -1,461 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationRequestInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'additional_config': 'NotificationRequestConfig', - 'created_time': 'int', - 'delivery_methods': 'list[str]', - 'id': 'NotificationRequestId', - 'info': 'NotificationInfo', - 'originator_entity_id': 'EntityId', - 'rule_id': 'NotificationRuleId', - 'stats': 'NotificationRequestStats', - 'status': 'str', - 'targets': 'list[str]', - 'template': 'NotificationTemplate', - 'template_id': 'NotificationTemplateId', - 'template_name': 'str', - 'tenant_id': 'TenantId' - } - - attribute_map = { - 'additional_config': 'additionalConfig', - 'created_time': 'createdTime', - 'delivery_methods': 'deliveryMethods', - 'id': 'id', - 'info': 'info', - 'originator_entity_id': 'originatorEntityId', - 'rule_id': 'ruleId', - 'stats': 'stats', - 'status': 'status', - 'targets': 'targets', - 'template': 'template', - 'template_id': 'templateId', - 'template_name': 'templateName', - 'tenant_id': 'tenantId' - } - - def __init__(self, additional_config=None, created_time=None, delivery_methods=None, id=None, info=None, originator_entity_id=None, rule_id=None, stats=None, status=None, targets=None, template=None, template_id=None, template_name=None, tenant_id=None): # noqa: E501 - """NotificationRequestInfo - a model defined in Swagger""" # noqa: E501 - self._additional_config = None - self._created_time = None - self._delivery_methods = None - self._id = None - self._info = None - self._originator_entity_id = None - self._rule_id = None - self._stats = None - self._status = None - self._targets = None - self._template = None - self._template_id = None - self._template_name = None - self._tenant_id = None - self.discriminator = None - if additional_config is not None: - self.additional_config = additional_config - if created_time is not None: - self.created_time = created_time - if delivery_methods is not None: - self.delivery_methods = delivery_methods - if id is not None: - self.id = id - if info is not None: - self.info = info - if originator_entity_id is not None: - self.originator_entity_id = originator_entity_id - if rule_id is not None: - self.rule_id = rule_id - if stats is not None: - self.stats = stats - if status is not None: - self.status = status - if targets is not None: - self.targets = targets - if template is not None: - self.template = template - if template_id is not None: - self.template_id = template_id - if template_name is not None: - self.template_name = template_name - if tenant_id is not None: - self.tenant_id = tenant_id - - @property - def additional_config(self): - """Gets the additional_config of this NotificationRequestInfo. # noqa: E501 - - - :return: The additional_config of this NotificationRequestInfo. # noqa: E501 - :rtype: NotificationRequestConfig - """ - return self._additional_config - - @additional_config.setter - def additional_config(self, additional_config): - """Sets the additional_config of this NotificationRequestInfo. - - - :param additional_config: The additional_config of this NotificationRequestInfo. # noqa: E501 - :type: NotificationRequestConfig - """ - - self._additional_config = additional_config - - @property - def created_time(self): - """Gets the created_time of this NotificationRequestInfo. # noqa: E501 - - - :return: The created_time of this NotificationRequestInfo. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this NotificationRequestInfo. - - - :param created_time: The created_time of this NotificationRequestInfo. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def delivery_methods(self): - """Gets the delivery_methods of this NotificationRequestInfo. # noqa: E501 - - - :return: The delivery_methods of this NotificationRequestInfo. # noqa: E501 - :rtype: list[str] - """ - return self._delivery_methods - - @delivery_methods.setter - def delivery_methods(self, delivery_methods): - """Sets the delivery_methods of this NotificationRequestInfo. - - - :param delivery_methods: The delivery_methods of this NotificationRequestInfo. # noqa: E501 - :type: list[str] - """ - allowed_values = ["EMAIL", "SLACK", "SMS", "WEB"] # noqa: E501 - if not set(delivery_methods).issubset(set(allowed_values)): - raise ValueError( - "Invalid values for `delivery_methods` [{0}], must be a subset of [{1}]" # noqa: E501 - .format(", ".join(map(str, set(delivery_methods) - set(allowed_values))), # noqa: E501 - ", ".join(map(str, allowed_values))) - ) - - self._delivery_methods = delivery_methods - - @property - def id(self): - """Gets the id of this NotificationRequestInfo. # noqa: E501 - - - :return: The id of this NotificationRequestInfo. # noqa: E501 - :rtype: NotificationRequestId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this NotificationRequestInfo. - - - :param id: The id of this NotificationRequestInfo. # noqa: E501 - :type: NotificationRequestId - """ - - self._id = id - - @property - def info(self): - """Gets the info of this NotificationRequestInfo. # noqa: E501 - - - :return: The info of this NotificationRequestInfo. # noqa: E501 - :rtype: NotificationInfo - """ - return self._info - - @info.setter - def info(self, info): - """Sets the info of this NotificationRequestInfo. - - - :param info: The info of this NotificationRequestInfo. # noqa: E501 - :type: NotificationInfo - """ - - self._info = info - - @property - def originator_entity_id(self): - """Gets the originator_entity_id of this NotificationRequestInfo. # noqa: E501 - - - :return: The originator_entity_id of this NotificationRequestInfo. # noqa: E501 - :rtype: EntityId - """ - return self._originator_entity_id - - @originator_entity_id.setter - def originator_entity_id(self, originator_entity_id): - """Sets the originator_entity_id of this NotificationRequestInfo. - - - :param originator_entity_id: The originator_entity_id of this NotificationRequestInfo. # noqa: E501 - :type: EntityId - """ - - self._originator_entity_id = originator_entity_id - - @property - def rule_id(self): - """Gets the rule_id of this NotificationRequestInfo. # noqa: E501 - - - :return: The rule_id of this NotificationRequestInfo. # noqa: E501 - :rtype: NotificationRuleId - """ - return self._rule_id - - @rule_id.setter - def rule_id(self, rule_id): - """Sets the rule_id of this NotificationRequestInfo. - - - :param rule_id: The rule_id of this NotificationRequestInfo. # noqa: E501 - :type: NotificationRuleId - """ - - self._rule_id = rule_id - - @property - def stats(self): - """Gets the stats of this NotificationRequestInfo. # noqa: E501 - - - :return: The stats of this NotificationRequestInfo. # noqa: E501 - :rtype: NotificationRequestStats - """ - return self._stats - - @stats.setter - def stats(self, stats): - """Sets the stats of this NotificationRequestInfo. - - - :param stats: The stats of this NotificationRequestInfo. # noqa: E501 - :type: NotificationRequestStats - """ - - self._stats = stats - - @property - def status(self): - """Gets the status of this NotificationRequestInfo. # noqa: E501 - - - :return: The status of this NotificationRequestInfo. # noqa: E501 - :rtype: str - """ - return self._status - - @status.setter - def status(self, status): - """Sets the status of this NotificationRequestInfo. - - - :param status: The status of this NotificationRequestInfo. # noqa: E501 - :type: str - """ - allowed_values = ["PROCESSING", "SCHEDULED", "SENT"] # noqa: E501 - if status not in allowed_values: - raise ValueError( - "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 - .format(status, allowed_values) - ) - - self._status = status - - @property - def targets(self): - """Gets the targets of this NotificationRequestInfo. # noqa: E501 - - - :return: The targets of this NotificationRequestInfo. # noqa: E501 - :rtype: list[str] - """ - return self._targets - - @targets.setter - def targets(self, targets): - """Sets the targets of this NotificationRequestInfo. - - - :param targets: The targets of this NotificationRequestInfo. # noqa: E501 - :type: list[str] - """ - - self._targets = targets - - @property - def template(self): - """Gets the template of this NotificationRequestInfo. # noqa: E501 - - - :return: The template of this NotificationRequestInfo. # noqa: E501 - :rtype: NotificationTemplate - """ - return self._template - - @template.setter - def template(self, template): - """Sets the template of this NotificationRequestInfo. - - - :param template: The template of this NotificationRequestInfo. # noqa: E501 - :type: NotificationTemplate - """ - - self._template = template - - @property - def template_id(self): - """Gets the template_id of this NotificationRequestInfo. # noqa: E501 - - - :return: The template_id of this NotificationRequestInfo. # noqa: E501 - :rtype: NotificationTemplateId - """ - return self._template_id - - @template_id.setter - def template_id(self, template_id): - """Sets the template_id of this NotificationRequestInfo. - - - :param template_id: The template_id of this NotificationRequestInfo. # noqa: E501 - :type: NotificationTemplateId - """ - - self._template_id = template_id - - @property - def template_name(self): - """Gets the template_name of this NotificationRequestInfo. # noqa: E501 - - - :return: The template_name of this NotificationRequestInfo. # noqa: E501 - :rtype: str - """ - return self._template_name - - @template_name.setter - def template_name(self, template_name): - """Sets the template_name of this NotificationRequestInfo. - - - :param template_name: The template_name of this NotificationRequestInfo. # noqa: E501 - :type: str - """ - - self._template_name = template_name - - @property - def tenant_id(self): - """Gets the tenant_id of this NotificationRequestInfo. # noqa: E501 - - - :return: The tenant_id of this NotificationRequestInfo. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this NotificationRequestInfo. - - - :param tenant_id: The tenant_id of this NotificationRequestInfo. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationRequestInfo, dict): - for key, value in self.items(): - result[key] = 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, NotificationRequestInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule.py b/tb_rest_client/models/models_pe/notification_rule.py deleted file mode 100644 index 62c6945f..00000000 --- a/tb_rest_client/models/models_pe/notification_rule.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationRule(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'additional_config': 'NotificationRuleConfig', - 'created_time': 'int', - 'id': 'NotificationRuleId', - 'name': 'str', - 'recipients_config': 'NotificationRuleRecipientsConfig', - 'template_id': 'NotificationTemplateId', - 'tenant_id': 'TenantId', - 'trigger_config': 'NotificationRuleTriggerConfig', - 'trigger_type': 'str' - } - - attribute_map = { - 'additional_config': 'additionalConfig', - 'created_time': 'createdTime', - 'id': 'id', - 'name': 'name', - 'recipients_config': 'recipientsConfig', - 'template_id': 'templateId', - 'tenant_id': 'tenantId', - 'trigger_config': 'triggerConfig', - 'trigger_type': 'triggerType' - } - - def __init__(self, additional_config=None, created_time=None, id=None, name=None, recipients_config=None, template_id=None, tenant_id=None, trigger_config=None, trigger_type=None): # noqa: E501 - """NotificationRule - a model defined in Swagger""" # noqa: E501 - self._additional_config = None - self._created_time = None - self._id = None - self._name = None - self._recipients_config = None - self._template_id = None - self._tenant_id = None - self._trigger_config = None - self._trigger_type = None - self.discriminator = None - if additional_config is not None: - self.additional_config = additional_config - if created_time is not None: - self.created_time = created_time - if id is not None: - self.id = id - self.name = name - self.recipients_config = recipients_config - self.template_id = template_id - if tenant_id is not None: - self.tenant_id = tenant_id - self.trigger_config = trigger_config - self.trigger_type = trigger_type - - @property - def additional_config(self): - """Gets the additional_config of this NotificationRule. # noqa: E501 - - - :return: The additional_config of this NotificationRule. # noqa: E501 - :rtype: NotificationRuleConfig - """ - return self._additional_config - - @additional_config.setter - def additional_config(self, additional_config): - """Sets the additional_config of this NotificationRule. - - - :param additional_config: The additional_config of this NotificationRule. # noqa: E501 - :type: NotificationRuleConfig - """ - - self._additional_config = additional_config - - @property - def created_time(self): - """Gets the created_time of this NotificationRule. # noqa: E501 - - - :return: The created_time of this NotificationRule. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this NotificationRule. - - - :param created_time: The created_time of this NotificationRule. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def id(self): - """Gets the id of this NotificationRule. # noqa: E501 - - - :return: The id of this NotificationRule. # noqa: E501 - :rtype: NotificationRuleId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this NotificationRule. - - - :param id: The id of this NotificationRule. # noqa: E501 - :type: NotificationRuleId - """ - - self._id = id - - @property - def name(self): - """Gets the name of this NotificationRule. # noqa: E501 - - - :return: The name of this NotificationRule. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this NotificationRule. - - - :param name: The name of this NotificationRule. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def recipients_config(self): - """Gets the recipients_config of this NotificationRule. # noqa: E501 - - - :return: The recipients_config of this NotificationRule. # noqa: E501 - :rtype: NotificationRuleRecipientsConfig - """ - return self._recipients_config - - @recipients_config.setter - def recipients_config(self, recipients_config): - """Sets the recipients_config of this NotificationRule. - - - :param recipients_config: The recipients_config of this NotificationRule. # noqa: E501 - :type: NotificationRuleRecipientsConfig - """ - if recipients_config is None: - raise ValueError("Invalid value for `recipients_config`, must not be `None`") # noqa: E501 - - self._recipients_config = recipients_config - - @property - def template_id(self): - """Gets the template_id of this NotificationRule. # noqa: E501 - - - :return: The template_id of this NotificationRule. # noqa: E501 - :rtype: NotificationTemplateId - """ - return self._template_id - - @template_id.setter - def template_id(self, template_id): - """Sets the template_id of this NotificationRule. - - - :param template_id: The template_id of this NotificationRule. # noqa: E501 - :type: NotificationTemplateId - """ - if template_id is None: - raise ValueError("Invalid value for `template_id`, must not be `None`") # noqa: E501 - - self._template_id = template_id - - @property - def tenant_id(self): - """Gets the tenant_id of this NotificationRule. # noqa: E501 - - - :return: The tenant_id of this NotificationRule. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this NotificationRule. - - - :param tenant_id: The tenant_id of this NotificationRule. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - @property - def trigger_config(self): - """Gets the trigger_config of this NotificationRule. # noqa: E501 - - - :return: The trigger_config of this NotificationRule. # noqa: E501 - :rtype: NotificationRuleTriggerConfig - """ - return self._trigger_config - - @trigger_config.setter - def trigger_config(self, trigger_config): - """Sets the trigger_config of this NotificationRule. - - - :param trigger_config: The trigger_config of this NotificationRule. # noqa: E501 - :type: NotificationRuleTriggerConfig - """ - if trigger_config is None: - raise ValueError("Invalid value for `trigger_config`, must not be `None`") # noqa: E501 - - self._trigger_config = trigger_config - - @property - def trigger_type(self): - """Gets the trigger_type of this NotificationRule. # noqa: E501 - - - :return: The trigger_type of this NotificationRule. # noqa: E501 - :rtype: str - """ - return self._trigger_type - - @trigger_type.setter - def trigger_type(self, trigger_type): - """Sets the trigger_type of this NotificationRule. - - - :param trigger_type: The trigger_type of this NotificationRule. # noqa: E501 - :type: str - """ - if trigger_type is None: - raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 - if trigger_type not in allowed_values: - raise ValueError( - "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 - .format(trigger_type, allowed_values) - ) - - self._trigger_type = trigger_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationRule, dict): - for key, value in self.items(): - result[key] = 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, NotificationRule): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule_info.py b/tb_rest_client/models/models_pe/notification_rule_info.py deleted file mode 100644 index 109ce264..00000000 --- a/tb_rest_client/models/models_pe/notification_rule_info.py +++ /dev/null @@ -1,388 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationRuleInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'additional_config': 'NotificationRuleConfig', - 'created_time': 'int', - 'delivery_methods': 'list[str]', - 'id': 'NotificationRuleId', - 'name': 'str', - 'recipients_config': 'NotificationRuleRecipientsConfig', - 'template_id': 'NotificationTemplateId', - 'template_name': 'str', - 'tenant_id': 'TenantId', - 'trigger_config': 'NotificationRuleTriggerConfig', - 'trigger_type': 'str' - } - - attribute_map = { - 'additional_config': 'additionalConfig', - 'created_time': 'createdTime', - 'delivery_methods': 'deliveryMethods', - 'id': 'id', - 'name': 'name', - 'recipients_config': 'recipientsConfig', - 'template_id': 'templateId', - 'template_name': 'templateName', - 'tenant_id': 'tenantId', - 'trigger_config': 'triggerConfig', - 'trigger_type': 'triggerType' - } - - def __init__(self, additional_config=None, created_time=None, delivery_methods=None, id=None, name=None, recipients_config=None, template_id=None, template_name=None, tenant_id=None, trigger_config=None, trigger_type=None): # noqa: E501 - """NotificationRuleInfo - a model defined in Swagger""" # noqa: E501 - self._additional_config = None - self._created_time = None - self._delivery_methods = None - self._id = None - self._name = None - self._recipients_config = None - self._template_id = None - self._template_name = None - self._tenant_id = None - self._trigger_config = None - self._trigger_type = None - self.discriminator = None - if additional_config is not None: - self.additional_config = additional_config - if created_time is not None: - self.created_time = created_time - if delivery_methods is not None: - self.delivery_methods = delivery_methods - if id is not None: - self.id = id - self.name = name - self.recipients_config = recipients_config - self.template_id = template_id - if template_name is not None: - self.template_name = template_name - if tenant_id is not None: - self.tenant_id = tenant_id - self.trigger_config = trigger_config - self.trigger_type = trigger_type - - @property - def additional_config(self): - """Gets the additional_config of this NotificationRuleInfo. # noqa: E501 - - - :return: The additional_config of this NotificationRuleInfo. # noqa: E501 - :rtype: NotificationRuleConfig - """ - return self._additional_config - - @additional_config.setter - def additional_config(self, additional_config): - """Sets the additional_config of this NotificationRuleInfo. - - - :param additional_config: The additional_config of this NotificationRuleInfo. # noqa: E501 - :type: NotificationRuleConfig - """ - - self._additional_config = additional_config - - @property - def created_time(self): - """Gets the created_time of this NotificationRuleInfo. # noqa: E501 - - - :return: The created_time of this NotificationRuleInfo. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this NotificationRuleInfo. - - - :param created_time: The created_time of this NotificationRuleInfo. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def delivery_methods(self): - """Gets the delivery_methods of this NotificationRuleInfo. # noqa: E501 - - - :return: The delivery_methods of this NotificationRuleInfo. # noqa: E501 - :rtype: list[str] - """ - return self._delivery_methods - - @delivery_methods.setter - def delivery_methods(self, delivery_methods): - """Sets the delivery_methods of this NotificationRuleInfo. - - - :param delivery_methods: The delivery_methods of this NotificationRuleInfo. # noqa: E501 - :type: list[str] - """ - allowed_values = ["EMAIL", "SLACK", "SMS", "WEB"] # noqa: E501 - if not set(delivery_methods).issubset(set(allowed_values)): - raise ValueError( - "Invalid values for `delivery_methods` [{0}], must be a subset of [{1}]" # noqa: E501 - .format(", ".join(map(str, set(delivery_methods) - set(allowed_values))), # noqa: E501 - ", ".join(map(str, allowed_values))) - ) - - self._delivery_methods = delivery_methods - - @property - def id(self): - """Gets the id of this NotificationRuleInfo. # noqa: E501 - - - :return: The id of this NotificationRuleInfo. # noqa: E501 - :rtype: NotificationRuleId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this NotificationRuleInfo. - - - :param id: The id of this NotificationRuleInfo. # noqa: E501 - :type: NotificationRuleId - """ - - self._id = id - - @property - def name(self): - """Gets the name of this NotificationRuleInfo. # noqa: E501 - - - :return: The name of this NotificationRuleInfo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this NotificationRuleInfo. - - - :param name: The name of this NotificationRuleInfo. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def recipients_config(self): - """Gets the recipients_config of this NotificationRuleInfo. # noqa: E501 - - - :return: The recipients_config of this NotificationRuleInfo. # noqa: E501 - :rtype: NotificationRuleRecipientsConfig - """ - return self._recipients_config - - @recipients_config.setter - def recipients_config(self, recipients_config): - """Sets the recipients_config of this NotificationRuleInfo. - - - :param recipients_config: The recipients_config of this NotificationRuleInfo. # noqa: E501 - :type: NotificationRuleRecipientsConfig - """ - if recipients_config is None: - raise ValueError("Invalid value for `recipients_config`, must not be `None`") # noqa: E501 - - self._recipients_config = recipients_config - - @property - def template_id(self): - """Gets the template_id of this NotificationRuleInfo. # noqa: E501 - - - :return: The template_id of this NotificationRuleInfo. # noqa: E501 - :rtype: NotificationTemplateId - """ - return self._template_id - - @template_id.setter - def template_id(self, template_id): - """Sets the template_id of this NotificationRuleInfo. - - - :param template_id: The template_id of this NotificationRuleInfo. # noqa: E501 - :type: NotificationTemplateId - """ - if template_id is None: - raise ValueError("Invalid value for `template_id`, must not be `None`") # noqa: E501 - - self._template_id = template_id - - @property - def template_name(self): - """Gets the template_name of this NotificationRuleInfo. # noqa: E501 - - - :return: The template_name of this NotificationRuleInfo. # noqa: E501 - :rtype: str - """ - return self._template_name - - @template_name.setter - def template_name(self, template_name): - """Sets the template_name of this NotificationRuleInfo. - - - :param template_name: The template_name of this NotificationRuleInfo. # noqa: E501 - :type: str - """ - - self._template_name = template_name - - @property - def tenant_id(self): - """Gets the tenant_id of this NotificationRuleInfo. # noqa: E501 - - - :return: The tenant_id of this NotificationRuleInfo. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this NotificationRuleInfo. - - - :param tenant_id: The tenant_id of this NotificationRuleInfo. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - @property - def trigger_config(self): - """Gets the trigger_config of this NotificationRuleInfo. # noqa: E501 - - - :return: The trigger_config of this NotificationRuleInfo. # noqa: E501 - :rtype: NotificationRuleTriggerConfig - """ - return self._trigger_config - - @trigger_config.setter - def trigger_config(self, trigger_config): - """Sets the trigger_config of this NotificationRuleInfo. - - - :param trigger_config: The trigger_config of this NotificationRuleInfo. # noqa: E501 - :type: NotificationRuleTriggerConfig - """ - if trigger_config is None: - raise ValueError("Invalid value for `trigger_config`, must not be `None`") # noqa: E501 - - self._trigger_config = trigger_config - - @property - def trigger_type(self): - """Gets the trigger_type of this NotificationRuleInfo. # noqa: E501 - - - :return: The trigger_type of this NotificationRuleInfo. # noqa: E501 - :rtype: str - """ - return self._trigger_type - - @trigger_type.setter - def trigger_type(self, trigger_type): - """Sets the trigger_type of this NotificationRuleInfo. - - - :param trigger_type: The trigger_type of this NotificationRuleInfo. # noqa: E501 - :type: str - """ - if trigger_type is None: - raise ValueError("Invalid value for `trigger_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 - if trigger_type not in allowed_values: - raise ValueError( - "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 - .format(trigger_type, allowed_values) - ) - - self._trigger_type = trigger_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationRuleInfo, dict): - for key, value in self.items(): - result[key] = 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, NotificationRuleInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/notification_rule_trigger_config.py deleted file mode 100644 index e4f6a423..00000000 --- a/tb_rest_client/models/models_pe/notification_rule_trigger_config.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationRuleTriggerConfig(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'trigger_type': 'str' - } - - attribute_map = { - 'trigger_type': 'triggerType' - } - - def __init__(self, trigger_type=None): # noqa: E501 - """NotificationRuleTriggerConfig - a model defined in Swagger""" # noqa: E501 - self._trigger_type = None - self.discriminator = None - if trigger_type is not None: - self.trigger_type = trigger_type - - @property - def trigger_type(self): - """Gets the trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 - - - :return: The trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 - :rtype: str - """ - return self._trigger_type - - @trigger_type.setter - def trigger_type(self, trigger_type): - """Sets the trigger_type of this NotificationRuleTriggerConfig. - - - :param trigger_type: The trigger_type of this NotificationRuleTriggerConfig. # noqa: E501 - :type: str - """ - allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT"] # noqa: E501 - if trigger_type not in allowed_values: - raise ValueError( - "Invalid value for `trigger_type` ({0}), must be one of {1}" # noqa: E501 - .format(trigger_type, allowed_values) - ) - - self._trigger_type = trigger_type - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationRuleTriggerConfig, dict): - for key, value in self.items(): - result[key] = 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, NotificationRuleTriggerConfig): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/notification_settings.py b/tb_rest_client/models/models_pe/notification_settings.py deleted file mode 100644 index 2dea7a35..00000000 --- a/tb_rest_client/models/models_pe/notification_settings.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationSettings(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'delivery_methods_configs': 'dict(str, NotificationDeliveryMethodConfig)' - } - - attribute_map = { - 'delivery_methods_configs': 'deliveryMethodsConfigs' - } - - def __init__(self, delivery_methods_configs=None): # noqa: E501 - """NotificationSettings - a model defined in Swagger""" # noqa: E501 - self._delivery_methods_configs = None - self.discriminator = None - self.delivery_methods_configs = delivery_methods_configs - - @property - def delivery_methods_configs(self): - """Gets the delivery_methods_configs of this NotificationSettings. # noqa: E501 - - - :return: The delivery_methods_configs of this NotificationSettings. # noqa: E501 - :rtype: dict(str, NotificationDeliveryMethodConfig) - """ - return self._delivery_methods_configs - - @delivery_methods_configs.setter - def delivery_methods_configs(self, delivery_methods_configs): - """Sets the delivery_methods_configs of this NotificationSettings. - - - :param delivery_methods_configs: The delivery_methods_configs of this NotificationSettings. # noqa: E501 - :type: dict(str, NotificationDeliveryMethodConfig) - """ - if delivery_methods_configs is None: - raise ValueError("Invalid value for `delivery_methods_configs`, must not be `None`") # noqa: E501 - - self._delivery_methods_configs = delivery_methods_configs - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationSettings, dict): - for key, value in self.items(): - result[key] = 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, NotificationSettings): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/notification_target.py b/tb_rest_client/models/models_pe/notification_target.py deleted file mode 100644 index 7a8a7ced..00000000 --- a/tb_rest_client/models/models_pe/notification_target.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationTarget(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'configuration': 'NotificationTargetConfig', - 'created_time': 'int', - 'id': 'NotificationTargetId', - 'name': 'str', - 'tenant_id': 'TenantId' - } - - attribute_map = { - 'configuration': 'configuration', - 'created_time': 'createdTime', - 'id': 'id', - 'name': 'name', - 'tenant_id': 'tenantId' - } - - def __init__(self, configuration=None, created_time=None, id=None, name=None, tenant_id=None): # noqa: E501 - """NotificationTarget - a model defined in Swagger""" # noqa: E501 - self._configuration = None - self._created_time = None - self._id = None - self._name = None - self._tenant_id = None - self.discriminator = None - self.configuration = configuration - if created_time is not None: - self.created_time = created_time - if id is not None: - self.id = id - self.name = name - if tenant_id is not None: - self.tenant_id = tenant_id - - @property - def configuration(self): - """Gets the configuration of this NotificationTarget. # noqa: E501 - - - :return: The configuration of this NotificationTarget. # noqa: E501 - :rtype: NotificationTargetConfig - """ - return self._configuration - - @configuration.setter - def configuration(self, configuration): - """Sets the configuration of this NotificationTarget. - - - :param configuration: The configuration of this NotificationTarget. # noqa: E501 - :type: NotificationTargetConfig - """ - if configuration is None: - raise ValueError("Invalid value for `configuration`, must not be `None`") # noqa: E501 - - self._configuration = configuration - - @property - def created_time(self): - """Gets the created_time of this NotificationTarget. # noqa: E501 - - - :return: The created_time of this NotificationTarget. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this NotificationTarget. - - - :param created_time: The created_time of this NotificationTarget. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def id(self): - """Gets the id of this NotificationTarget. # noqa: E501 - - - :return: The id of this NotificationTarget. # noqa: E501 - :rtype: NotificationTargetId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this NotificationTarget. - - - :param id: The id of this NotificationTarget. # noqa: E501 - :type: NotificationTargetId - """ - - self._id = id - - @property - def name(self): - """Gets the name of this NotificationTarget. # noqa: E501 - - - :return: The name of this NotificationTarget. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this NotificationTarget. - - - :param name: The name of this NotificationTarget. # noqa: E501 - :type: str - """ - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - - self._name = name - - @property - def tenant_id(self): - """Gets the tenant_id of this NotificationTarget. # noqa: E501 - - - :return: The tenant_id of this NotificationTarget. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this NotificationTarget. - - - :param tenant_id: The tenant_id of this NotificationTarget. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationTarget, dict): - for key, value in self.items(): - result[key] = 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, NotificationTarget): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/notification_target_config.py b/tb_rest_client/models/models_pe/notification_target_config.py deleted file mode 100644 index fd6584e6..00000000 --- a/tb_rest_client/models/models_pe/notification_target_config.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationTargetConfig(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'description': 'str' - } - - attribute_map = { - 'description': 'description' - } - - def __init__(self, description=None): # noqa: E501 - """NotificationTargetConfig - a model defined in Swagger""" # noqa: E501 - self._description = None - self.discriminator = None - if description is not None: - self.description = description - - @property - def description(self): - """Gets the description of this NotificationTargetConfig. # noqa: E501 - - - :return: The description of this NotificationTargetConfig. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this NotificationTargetConfig. - - - :param description: The description of this NotificationTargetConfig. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationTargetConfig, dict): - for key, value in self.items(): - result[key] = 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, NotificationTargetConfig): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/notification_template.py b/tb_rest_client/models/models_pe/notification_template.py deleted file mode 100644 index 2f133e6b..00000000 --- a/tb_rest_client/models/models_pe/notification_template.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class NotificationTemplate(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'configuration': 'NotificationTemplateConfig', - 'created_time': 'int', - 'id': 'NotificationTemplateId', - 'name': 'str', - 'notification_type': 'str', - 'tenant_id': 'TenantId' - } - - attribute_map = { - 'configuration': 'configuration', - 'created_time': 'createdTime', - 'id': 'id', - 'name': 'name', - 'notification_type': 'notificationType', - 'tenant_id': 'tenantId' - } - - def __init__(self, configuration=None, created_time=None, id=None, name=None, notification_type=None, tenant_id=None): # noqa: E501 - """NotificationTemplate - a model defined in Swagger""" # noqa: E501 - self._configuration = None - self._created_time = None - self._id = None - self._name = None - self._notification_type = None - self._tenant_id = None - self.discriminator = None - self.configuration = configuration - if created_time is not None: - self.created_time = created_time - if id is not None: - self.id = id - if name is not None: - self.name = name - self.notification_type = notification_type - if tenant_id is not None: - self.tenant_id = tenant_id - - @property - def configuration(self): - """Gets the configuration of this NotificationTemplate. # noqa: E501 - - - :return: The configuration of this NotificationTemplate. # noqa: E501 - :rtype: NotificationTemplateConfig - """ - return self._configuration - - @configuration.setter - def configuration(self, configuration): - """Sets the configuration of this NotificationTemplate. - - - :param configuration: The configuration of this NotificationTemplate. # noqa: E501 - :type: NotificationTemplateConfig - """ - if configuration is None: - raise ValueError("Invalid value for `configuration`, must not be `None`") # noqa: E501 - - self._configuration = configuration - - @property - def created_time(self): - """Gets the created_time of this NotificationTemplate. # noqa: E501 - - - :return: The created_time of this NotificationTemplate. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this NotificationTemplate. - - - :param created_time: The created_time of this NotificationTemplate. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def id(self): - """Gets the id of this NotificationTemplate. # noqa: E501 - - - :return: The id of this NotificationTemplate. # noqa: E501 - :rtype: NotificationTemplateId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this NotificationTemplate. - - - :param id: The id of this NotificationTemplate. # noqa: E501 - :type: NotificationTemplateId - """ - - self._id = id - - @property - def name(self): - """Gets the name of this NotificationTemplate. # noqa: E501 - - - :return: The name of this NotificationTemplate. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this NotificationTemplate. - - - :param name: The name of this NotificationTemplate. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def notification_type(self): - """Gets the notification_type of this NotificationTemplate. # noqa: E501 - - - :return: The notification_type of this NotificationTemplate. # noqa: E501 - :rtype: str - """ - return self._notification_type - - @notification_type.setter - def notification_type(self, notification_type): - """Sets the notification_type of this NotificationTemplate. - - - :param notification_type: The notification_type of this NotificationTemplate. # noqa: E501 - :type: str - """ - if notification_type is None: - raise ValueError("Invalid value for `notification_type`, must not be `None`") # noqa: E501 - allowed_values = ["ALARM", "ALARM_ASSIGNMENT", "ALARM_COMMENT", "API_USAGE_LIMIT", "DEVICE_ACTIVITY", "ENTITIES_LIMIT", "ENTITY_ACTION", "GENERAL", "INTEGRATION_LIFECYCLE_EVENT", "NEW_PLATFORM_VERSION", "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", "RULE_NODE"] # noqa: E501 - if notification_type not in allowed_values: - raise ValueError( - "Invalid value for `notification_type` ({0}), must be one of {1}" # noqa: E501 - .format(notification_type, allowed_values) - ) - - self._notification_type = notification_type - - @property - def tenant_id(self): - """Gets the tenant_id of this NotificationTemplate. # noqa: E501 - - - :return: The tenant_id of this NotificationTemplate. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this NotificationTemplate. - - - :param tenant_id: The tenant_id of this NotificationTemplate. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(NotificationTemplate, dict): - for key, value in self.items(): - result[key] = 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, NotificationTemplate): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_alarm_comment_info.py b/tb_rest_client/models/models_pe/page_data_alarm_comment_info.py deleted file mode 100644 index 95525584..00000000 --- a/tb_rest_client/models/models_pe/page_data_alarm_comment_info.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataAlarmCommentInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[AlarmCommentInfo]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataAlarmCommentInfo - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataAlarmCommentInfo. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataAlarmCommentInfo. # noqa: E501 - :rtype: list[AlarmCommentInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataAlarmCommentInfo. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataAlarmCommentInfo. # noqa: E501 - :type: list[AlarmCommentInfo] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataAlarmCommentInfo. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataAlarmCommentInfo. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataAlarmCommentInfo. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataAlarmCommentInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataAlarmCommentInfo. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataAlarmCommentInfo. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataAlarmCommentInfo. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataAlarmCommentInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataAlarmCommentInfo. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataAlarmCommentInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataAlarmCommentInfo. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataAlarmCommentInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataAlarmCommentInfo, dict): - for key, value in self.items(): - result[key] = 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, PageDataAlarmCommentInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_asset_profile.py b/tb_rest_client/models/models_pe/page_data_asset_profile.py deleted file mode 100644 index ca3bd402..00000000 --- a/tb_rest_client/models/models_pe/page_data_asset_profile.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataAssetProfile(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[AssetProfile]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataAssetProfile - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataAssetProfile. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataAssetProfile. # noqa: E501 - :rtype: list[AssetProfile] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataAssetProfile. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataAssetProfile. # noqa: E501 - :type: list[AssetProfile] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataAssetProfile. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataAssetProfile. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataAssetProfile. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataAssetProfile. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataAssetProfile. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataAssetProfile. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataAssetProfile. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataAssetProfile. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataAssetProfile. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataAssetProfile. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataAssetProfile. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataAssetProfile. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataAssetProfile, dict): - for key, value in self.items(): - result[key] = 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, PageDataAssetProfile): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_asset_profile_info.py b/tb_rest_client/models/models_pe/page_data_asset_profile_info.py deleted file mode 100644 index 3d0d0efa..00000000 --- a/tb_rest_client/models/models_pe/page_data_asset_profile_info.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataAssetProfileInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[AssetProfileInfo]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataAssetProfileInfo - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataAssetProfileInfo. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataAssetProfileInfo. # noqa: E501 - :rtype: list[AssetProfileInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataAssetProfileInfo. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataAssetProfileInfo. # noqa: E501 - :type: list[AssetProfileInfo] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataAssetProfileInfo. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataAssetProfileInfo. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataAssetProfileInfo. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataAssetProfileInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataAssetProfileInfo. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataAssetProfileInfo. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataAssetProfileInfo. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataAssetProfileInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataAssetProfileInfo. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataAssetProfileInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataAssetProfileInfo. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataAssetProfileInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataAssetProfileInfo, dict): - for key, value in self.items(): - result[key] = 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, PageDataAssetProfileInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_audit_log.py b/tb_rest_client/models/models_pe/page_data_audit_log.py deleted file mode 100644 index 62c1b59a..00000000 --- a/tb_rest_client/models/models_pe/page_data_audit_log.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataAuditLog(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[AuditLog]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataAuditLog - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataAuditLog. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataAuditLog. # noqa: E501 - :rtype: list[AuditLog] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataAuditLog. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataAuditLog. # noqa: E501 - :type: list[AuditLog] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataAuditLog. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataAuditLog. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataAuditLog. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataAuditLog. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataAuditLog. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataAuditLog. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataAuditLog. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataAuditLog. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataAuditLog. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataAuditLog. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataAuditLog. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataAuditLog. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataAuditLog, dict): - for key, value in self.items(): - result[key] = 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, PageDataAuditLog): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_entity_info.py b/tb_rest_client/models/models_pe/page_data_entity_info.py deleted file mode 100644 index 26fb6fc3..00000000 --- a/tb_rest_client/models/models_pe/page_data_entity_info.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataEntityInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[EntityInfo]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataEntityInfo - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataEntityInfo. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataEntityInfo. # noqa: E501 - :rtype: list[EntityInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataEntityInfo. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataEntityInfo. # noqa: E501 - :type: list[EntityInfo] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataEntityInfo. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataEntityInfo. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataEntityInfo. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataEntityInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataEntityInfo. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataEntityInfo. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataEntityInfo. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataEntityInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataEntityInfo. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataEntityInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataEntityInfo. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataEntityInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataEntityInfo, dict): - for key, value in self.items(): - result[key] = 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, PageDataEntityInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification.py b/tb_rest_client/models/models_pe/page_data_notification.py deleted file mode 100644 index 3dd33e25..00000000 --- a/tb_rest_client/models/models_pe/page_data_notification.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataNotification(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[Notification]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataNotification - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataNotification. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataNotification. # noqa: E501 - :rtype: list[Notification] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataNotification. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataNotification. # noqa: E501 - :type: list[Notification] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataNotification. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataNotification. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataNotification. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataNotification. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataNotification. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataNotification. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataNotification. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataNotification. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataNotification. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataNotification. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataNotification. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataNotification. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataNotification, dict): - for key, value in self.items(): - result[key] = 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, PageDataNotification): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_request_info.py b/tb_rest_client/models/models_pe/page_data_notification_request_info.py deleted file mode 100644 index 9259e49d..00000000 --- a/tb_rest_client/models/models_pe/page_data_notification_request_info.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataNotificationRequestInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[NotificationRequestInfo]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataNotificationRequestInfo - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataNotificationRequestInfo. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataNotificationRequestInfo. # noqa: E501 - :rtype: list[NotificationRequestInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataNotificationRequestInfo. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataNotificationRequestInfo. # noqa: E501 - :type: list[NotificationRequestInfo] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataNotificationRequestInfo. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataNotificationRequestInfo. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataNotificationRequestInfo. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataNotificationRequestInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataNotificationRequestInfo. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataNotificationRequestInfo. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataNotificationRequestInfo. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataNotificationRequestInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataNotificationRequestInfo. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataNotificationRequestInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataNotificationRequestInfo. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataNotificationRequestInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataNotificationRequestInfo, dict): - for key, value in self.items(): - result[key] = 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, PageDataNotificationRequestInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_rule_info.py b/tb_rest_client/models/models_pe/page_data_notification_rule_info.py deleted file mode 100644 index 050789dc..00000000 --- a/tb_rest_client/models/models_pe/page_data_notification_rule_info.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataNotificationRuleInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[NotificationRuleInfo]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataNotificationRuleInfo - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataNotificationRuleInfo. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataNotificationRuleInfo. # noqa: E501 - :rtype: list[NotificationRuleInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataNotificationRuleInfo. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataNotificationRuleInfo. # noqa: E501 - :type: list[NotificationRuleInfo] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataNotificationRuleInfo. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataNotificationRuleInfo. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataNotificationRuleInfo. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataNotificationRuleInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataNotificationRuleInfo. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataNotificationRuleInfo. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataNotificationRuleInfo. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataNotificationRuleInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataNotificationRuleInfo. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataNotificationRuleInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataNotificationRuleInfo. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataNotificationRuleInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataNotificationRuleInfo, dict): - for key, value in self.items(): - result[key] = 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, PageDataNotificationRuleInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_target.py b/tb_rest_client/models/models_pe/page_data_notification_target.py deleted file mode 100644 index 64518bcb..00000000 --- a/tb_rest_client/models/models_pe/page_data_notification_target.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataNotificationTarget(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[NotificationTarget]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataNotificationTarget - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataNotificationTarget. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataNotificationTarget. # noqa: E501 - :rtype: list[NotificationTarget] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataNotificationTarget. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataNotificationTarget. # noqa: E501 - :type: list[NotificationTarget] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataNotificationTarget. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataNotificationTarget. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataNotificationTarget. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataNotificationTarget. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataNotificationTarget. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataNotificationTarget. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataNotificationTarget. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataNotificationTarget. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataNotificationTarget. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataNotificationTarget. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataNotificationTarget. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataNotificationTarget. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataNotificationTarget, dict): - for key, value in self.items(): - result[key] = 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, PageDataNotificationTarget): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_notification_template.py b/tb_rest_client/models/models_pe/page_data_notification_template.py deleted file mode 100644 index 23d9cb95..00000000 --- a/tb_rest_client/models/models_pe/page_data_notification_template.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataNotificationTemplate(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[NotificationTemplate]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataNotificationTemplate - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataNotificationTemplate. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataNotificationTemplate. # noqa: E501 - :rtype: list[NotificationTemplate] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataNotificationTemplate. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataNotificationTemplate. # noqa: E501 - :type: list[NotificationTemplate] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataNotificationTemplate. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataNotificationTemplate. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataNotificationTemplate. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataNotificationTemplate. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataNotificationTemplate. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataNotificationTemplate. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataNotificationTemplate. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataNotificationTemplate. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataNotificationTemplate. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataNotificationTemplate. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataNotificationTemplate. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataNotificationTemplate. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataNotificationTemplate, dict): - for key, value in self.items(): - result[key] = 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, PageDataNotificationTemplate): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_tenant.py b/tb_rest_client/models/models_pe/page_data_tenant.py deleted file mode 100644 index 92959537..00000000 --- a/tb_rest_client/models/models_pe/page_data_tenant.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataTenant(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[Tenant]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataTenant - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataTenant. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataTenant. # noqa: E501 - :rtype: list[Tenant] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataTenant. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataTenant. # noqa: E501 - :type: list[Tenant] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataTenant. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataTenant. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataTenant. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataTenant. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataTenant. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataTenant. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataTenant. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataTenant. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataTenant. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataTenant. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataTenant. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataTenant. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataTenant, dict): - for key, value in self.items(): - result[key] = 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, PageDataTenant): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_tenant_info.py b/tb_rest_client/models/models_pe/page_data_tenant_info.py deleted file mode 100644 index 620fff0c..00000000 --- a/tb_rest_client/models/models_pe/page_data_tenant_info.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataTenantInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[TenantInfo]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataTenantInfo - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataTenantInfo. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataTenantInfo. # noqa: E501 - :rtype: list[TenantInfo] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataTenantInfo. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataTenantInfo. # noqa: E501 - :type: list[TenantInfo] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataTenantInfo. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataTenantInfo. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataTenantInfo. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataTenantInfo. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataTenantInfo. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataTenantInfo. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataTenantInfo. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataTenantInfo. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataTenantInfo. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataTenantInfo. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataTenantInfo. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataTenantInfo. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataTenantInfo, dict): - for key, value in self.items(): - result[key] = 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, PageDataTenantInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_tenant_profile.py b/tb_rest_client/models/models_pe/page_data_tenant_profile.py deleted file mode 100644 index 736eee32..00000000 --- a/tb_rest_client/models/models_pe/page_data_tenant_profile.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataTenantProfile(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[TenantProfile]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataTenantProfile - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataTenantProfile. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataTenantProfile. # noqa: E501 - :rtype: list[TenantProfile] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataTenantProfile. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataTenantProfile. # noqa: E501 - :type: list[TenantProfile] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataTenantProfile. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataTenantProfile. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataTenantProfile. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataTenantProfile. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataTenantProfile. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataTenantProfile. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataTenantProfile. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataTenantProfile. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataTenantProfile. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataTenantProfile. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataTenantProfile. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataTenantProfile. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataTenantProfile, dict): - for key, value in self.items(): - result[key] = 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, PageDataTenantProfile): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/page_data_widgets_bundle.py b/tb_rest_client/models/models_pe/page_data_widgets_bundle.py deleted file mode 100644 index 221e8d28..00000000 --- a/tb_rest_client/models/models_pe/page_data_widgets_bundle.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class PageDataWidgetsBundle(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'data': 'list[WidgetsBundle]', - 'total_pages': 'int', - 'total_elements': 'int', - 'has_next': 'bool' - } - - attribute_map = { - 'data': 'data', - 'total_pages': 'totalPages', - 'total_elements': 'totalElements', - 'has_next': 'hasNext' - } - - def __init__(self, data=None, total_pages=None, total_elements=None, has_next=None): # noqa: E501 - """PageDataWidgetsBundle - a model defined in Swagger""" # noqa: E501 - self._data = None - self._total_pages = None - self._total_elements = None - self._has_next = None - self.discriminator = None - if data is not None: - self.data = data - if total_pages is not None: - self.total_pages = total_pages - if total_elements is not None: - self.total_elements = total_elements - if has_next is not None: - self.has_next = has_next - - @property - def data(self): - """Gets the data of this PageDataWidgetsBundle. # noqa: E501 - - Array of the entities # noqa: E501 - - :return: The data of this PageDataWidgetsBundle. # noqa: E501 - :rtype: list[WidgetsBundle] - """ - return self._data - - @data.setter - def data(self, data): - """Sets the data of this PageDataWidgetsBundle. - - Array of the entities # noqa: E501 - - :param data: The data of this PageDataWidgetsBundle. # noqa: E501 - :type: list[WidgetsBundle] - """ - - self._data = data - - @property - def total_pages(self): - """Gets the total_pages of this PageDataWidgetsBundle. # noqa: E501 - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :return: The total_pages of this PageDataWidgetsBundle. # noqa: E501 - :rtype: int - """ - return self._total_pages - - @total_pages.setter - def total_pages(self, total_pages): - """Sets the total_pages of this PageDataWidgetsBundle. - - Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria # noqa: E501 - - :param total_pages: The total_pages of this PageDataWidgetsBundle. # noqa: E501 - :type: int - """ - - self._total_pages = total_pages - - @property - def total_elements(self): - """Gets the total_elements of this PageDataWidgetsBundle. # noqa: E501 - - Total number of elements in all available pages # noqa: E501 - - :return: The total_elements of this PageDataWidgetsBundle. # noqa: E501 - :rtype: int - """ - return self._total_elements - - @total_elements.setter - def total_elements(self, total_elements): - """Sets the total_elements of this PageDataWidgetsBundle. - - Total number of elements in all available pages # noqa: E501 - - :param total_elements: The total_elements of this PageDataWidgetsBundle. # noqa: E501 - :type: int - """ - - self._total_elements = total_elements - - @property - def has_next(self): - """Gets the has_next of this PageDataWidgetsBundle. # noqa: E501 - - 'false' value indicates the end of the result set # noqa: E501 - - :return: The has_next of this PageDataWidgetsBundle. # noqa: E501 - :rtype: bool - """ - return self._has_next - - @has_next.setter - def has_next(self, has_next): - """Sets the has_next of this PageDataWidgetsBundle. - - 'false' value indicates the end of the result set # noqa: E501 - - :param has_next: The has_next of this PageDataWidgetsBundle. # noqa: E501 - :type: bool - """ - - self._has_next = has_next - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(PageDataWidgetsBundle, dict): - for key, value in self.items(): - result[key] = 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, PageDataWidgetsBundle): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/platform_users_notification_target_config.py b/tb_rest_client/models/models_pe/platform_users_notification_target_config.py index 1a0b46da..6c8b8bbf 100644 --- a/tb_rest_client/models/models_pe/platform_users_notification_target_config.py +++ b/tb_rest_client/models/models_pe/platform_users_notification_target_config.py @@ -14,7 +14,7 @@ import re # noqa: F401 import six -from tb_rest_client.models.models_pe.notification_target_config import NotificationTargetConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.notification_target_config import NotificationTargetConfig # noqa: F401,E501 class PlatformUsersNotificationTargetConfig(NotificationTargetConfig): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/tb_rest_client/models/models_pe/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py b/tb_rest_client/models/models_pe/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py index 3f412581..a9206b7b 100644 --- a/tb_rest_client/models/models_pe/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py +++ b/tb_rest_client/models/models_pe/rule_engine_component_lifecycle_event_notification_rule_trigger_config.py @@ -14,7 +14,7 @@ import re # noqa: F401 import six -from tb_rest_client.models.models_pe.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.notification_rule_trigger_config import NotificationRuleTriggerConfig # noqa: F401,E501 class RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/tb_rest_client/models/models_pe/slack_notification_target_config.py b/tb_rest_client/models/models_pe/slack_notification_target_config.py index 52a661e6..cae8313f 100644 --- a/tb_rest_client/models/models_pe/slack_notification_target_config.py +++ b/tb_rest_client/models/models_pe/slack_notification_target_config.py @@ -14,7 +14,7 @@ import re # noqa: F401 import six -from tb_rest_client.models.models_pe.notification_target_config import NotificationTargetConfig # noqa: F401,E501 +from tb_rest_client.models.models_ce.notification_target_config import NotificationTargetConfig # noqa: F401,E501 class SlackNotificationTargetConfig(NotificationTargetConfig): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/tb_rest_client/models/models_pe/tenant.py b/tb_rest_client/models/models_pe/tenant.py deleted file mode 100644 index 52407f30..00000000 --- a/tb_rest_client/models/models_pe/tenant.py +++ /dev/null @@ -1,491 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class Tenant(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'TenantId', - 'created_time': 'int', - 'title': 'str', - 'name': 'str', - 'region': 'str', - 'tenant_profile_id': 'TenantProfileId', - 'country': 'str', - 'state': 'str', - 'city': 'str', - 'address': 'str', - 'address2': 'str', - 'zip': 'str', - 'phone': 'str', - 'email': 'str', - 'additional_info': 'JsonNode' - } - - attribute_map = { - 'id': 'id', - 'created_time': 'createdTime', - 'title': 'title', - 'name': 'name', - 'region': 'region', - 'tenant_profile_id': 'tenantProfileId', - 'country': 'country', - 'state': 'state', - 'city': 'city', - 'address': 'address', - 'address2': 'address2', - 'zip': 'zip', - 'phone': 'phone', - 'email': 'email', - 'additional_info': 'additionalInfo' - } - - def __init__(self, id=None, created_time=None, title=None, name=None, region=None, tenant_profile_id=None, country=None, state=None, city=None, address=None, address2=None, zip=None, phone=None, email=None, additional_info=None): # noqa: E501 - """Tenant - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_time = None - self._title = None - self._name = None - self._region = None - self._tenant_profile_id = None - self._country = None - self._state = None - self._city = None - self._address = None - self._address2 = None - self._zip = None - self._phone = None - self._email = None - self._additional_info = None - self.discriminator = None - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if title is not None: - self.title = title - if name is not None: - self.name = name - if region is not None: - self.region = region - self.tenant_profile_id = tenant_profile_id - self.country = country - self.state = state - self.city = city - self.address = address - self.address2 = address2 - self.zip = zip - self.phone = phone - self.email = email - if additional_info is not None: - self.additional_info = additional_info - - @property - def id(self): - """Gets the id of this Tenant. # noqa: E501 - - - :return: The id of this Tenant. # noqa: E501 - :rtype: TenantId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this Tenant. - - - :param id: The id of this Tenant. # noqa: E501 - :type: TenantId - """ - - self._id = id - - @property - def created_time(self): - """Gets the created_time of this Tenant. # noqa: E501 - - Timestamp of the tenant creation, in milliseconds # noqa: E501 - - :return: The created_time of this Tenant. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this Tenant. - - Timestamp of the tenant creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this Tenant. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def title(self): - """Gets the title of this Tenant. # noqa: E501 - - Title of the tenant # noqa: E501 - - :return: The title of this Tenant. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this Tenant. - - Title of the tenant # noqa: E501 - - :param title: The title of this Tenant. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def name(self): - """Gets the name of this Tenant. # noqa: E501 - - Name of the tenant. Read-only, duplicated from title for backward compatibility # noqa: E501 - - :return: The name of this Tenant. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this Tenant. - - Name of the tenant. Read-only, duplicated from title for backward compatibility # noqa: E501 - - :param name: The name of this Tenant. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def region(self): - """Gets the region of this Tenant. # noqa: E501 - - Geo region of the tenant # noqa: E501 - - :return: The region of this Tenant. # noqa: E501 - :rtype: str - """ - return self._region - - @region.setter - def region(self, region): - """Sets the region of this Tenant. - - Geo region of the tenant # noqa: E501 - - :param region: The region of this Tenant. # noqa: E501 - :type: str - """ - - self._region = region - - @property - def tenant_profile_id(self): - """Gets the tenant_profile_id of this Tenant. # noqa: E501 - - - :return: The tenant_profile_id of this Tenant. # noqa: E501 - :rtype: TenantProfileId - """ - return self._tenant_profile_id - - @tenant_profile_id.setter - def tenant_profile_id(self, tenant_profile_id): - """Sets the tenant_profile_id of this Tenant. - - - :param tenant_profile_id: The tenant_profile_id of this Tenant. # noqa: E501 - :type: TenantProfileId - """ - if tenant_profile_id is None: - raise ValueError("Invalid value for `tenant_profile_id`, must not be `None`") # noqa: E501 - - self._tenant_profile_id = tenant_profile_id - - @property - def country(self): - """Gets the country of this Tenant. # noqa: E501 - - Country # noqa: E501 - - :return: The country of this Tenant. # noqa: E501 - :rtype: str - """ - return self._country - - @country.setter - def country(self, country): - """Sets the country of this Tenant. - - Country # noqa: E501 - - :param country: The country of this Tenant. # noqa: E501 - :type: str - """ - - self._country = country - - @property - def state(self): - """Gets the state of this Tenant. # noqa: E501 - - State # noqa: E501 - - :return: The state of this Tenant. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this Tenant. - - State # noqa: E501 - - :param state: The state of this Tenant. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def city(self): - """Gets the city of this Tenant. # noqa: E501 - - City # noqa: E501 - - :return: The city of this Tenant. # noqa: E501 - :rtype: str - """ - return self._city - - @city.setter - def city(self, city): - """Sets the city of this Tenant. - - City # noqa: E501 - - :param city: The city of this Tenant. # noqa: E501 - :type: str - """ - - self._city = city - - @property - def address(self): - """Gets the address of this Tenant. # noqa: E501 - - Address Line 1 # noqa: E501 - - :return: The address of this Tenant. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this Tenant. - - Address Line 1 # noqa: E501 - - :param address: The address of this Tenant. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def address2(self): - """Gets the address2 of this Tenant. # noqa: E501 - - Address Line 2 # noqa: E501 - - :return: The address2 of this Tenant. # noqa: E501 - :rtype: str - """ - return self._address2 - - @address2.setter - def address2(self, address2): - """Sets the address2 of this Tenant. - - Address Line 2 # noqa: E501 - - :param address2: The address2 of this Tenant. # noqa: E501 - :type: str - """ - - self._address2 = address2 - - @property - def zip(self): - """Gets the zip of this Tenant. # noqa: E501 - - Zip code # noqa: E501 - - :return: The zip of this Tenant. # noqa: E501 - :rtype: str - """ - return self._zip - - @zip.setter - def zip(self, zip): - """Sets the zip of this Tenant. - - Zip code # noqa: E501 - - :param zip: The zip of this Tenant. # noqa: E501 - :type: str - """ - - self._zip = zip - - @property - def phone(self): - """Gets the phone of this Tenant. # noqa: E501 - - Phone number # noqa: E501 - - :return: The phone of this Tenant. # noqa: E501 - :rtype: str - """ - return self._phone - - @phone.setter - def phone(self, phone): - """Sets the phone of this Tenant. - - Phone number # noqa: E501 - - :param phone: The phone of this Tenant. # noqa: E501 - :type: str - """ - - self._phone = phone - - @property - def email(self): - """Gets the email of this Tenant. # noqa: E501 - - Email # noqa: E501 - - :return: The email of this Tenant. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this Tenant. - - Email # noqa: E501 - - :param email: The email of this Tenant. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def additional_info(self): - """Gets the additional_info of this Tenant. # noqa: E501 - - - :return: The additional_info of this Tenant. # noqa: E501 - :rtype: JsonNode - """ - return self._additional_info - - @additional_info.setter - def additional_info(self, additional_info): - """Sets the additional_info of this Tenant. - - - :param additional_info: The additional_info of this Tenant. # noqa: E501 - :type: JsonNode - """ - - self._additional_info = additional_info - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(Tenant, dict): - for key, value in self.items(): - result[key] = 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, Tenant): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/tenant_info.py b/tb_rest_client/models/models_pe/tenant_info.py deleted file mode 100644 index feba17a9..00000000 --- a/tb_rest_client/models/models_pe/tenant_info.py +++ /dev/null @@ -1,519 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TenantInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'TenantId', - 'created_time': 'int', - 'title': 'str', - 'name': 'str', - 'region': 'str', - 'tenant_profile_id': 'TenantProfileId', - 'country': 'str', - 'state': 'str', - 'city': 'str', - 'address': 'str', - 'address2': 'str', - 'zip': 'str', - 'phone': 'str', - 'email': 'str', - 'additional_info': 'JsonNode', - 'tenant_profile_name': 'str' - } - - attribute_map = { - 'id': 'id', - 'created_time': 'createdTime', - 'title': 'title', - 'name': 'name', - 'region': 'region', - 'tenant_profile_id': 'tenantProfileId', - 'country': 'country', - 'state': 'state', - 'city': 'city', - 'address': 'address', - 'address2': 'address2', - 'zip': 'zip', - 'phone': 'phone', - 'email': 'email', - 'additional_info': 'additionalInfo', - 'tenant_profile_name': 'tenantProfileName' - } - - def __init__(self, id=None, created_time=None, title=None, name=None, region=None, tenant_profile_id=None, country=None, state=None, city=None, address=None, address2=None, zip=None, phone=None, email=None, additional_info=None, tenant_profile_name=None): # noqa: E501 - """TenantInfo - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_time = None - self._title = None - self._name = None - self._region = None - self._tenant_profile_id = None - self._country = None - self._state = None - self._city = None - self._address = None - self._address2 = None - self._zip = None - self._phone = None - self._email = None - self._additional_info = None - self._tenant_profile_name = None - self.discriminator = None - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if title is not None: - self.title = title - if name is not None: - self.name = name - if region is not None: - self.region = region - self.tenant_profile_id = tenant_profile_id - self.country = country - self.state = state - self.city = city - self.address = address - self.address2 = address2 - self.zip = zip - self.phone = phone - self.email = email - if additional_info is not None: - self.additional_info = additional_info - if tenant_profile_name is not None: - self.tenant_profile_name = tenant_profile_name - - @property - def id(self): - """Gets the id of this TenantInfo. # noqa: E501 - - - :return: The id of this TenantInfo. # noqa: E501 - :rtype: TenantId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TenantInfo. - - - :param id: The id of this TenantInfo. # noqa: E501 - :type: TenantId - """ - - self._id = id - - @property - def created_time(self): - """Gets the created_time of this TenantInfo. # noqa: E501 - - Timestamp of the tenant creation, in milliseconds # noqa: E501 - - :return: The created_time of this TenantInfo. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this TenantInfo. - - Timestamp of the tenant creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this TenantInfo. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def title(self): - """Gets the title of this TenantInfo. # noqa: E501 - - Title of the tenant # noqa: E501 - - :return: The title of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this TenantInfo. - - Title of the tenant # noqa: E501 - - :param title: The title of this TenantInfo. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def name(self): - """Gets the name of this TenantInfo. # noqa: E501 - - Name of the tenant. Read-only, duplicated from title for backward compatibility # noqa: E501 - - :return: The name of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TenantInfo. - - Name of the tenant. Read-only, duplicated from title for backward compatibility # noqa: E501 - - :param name: The name of this TenantInfo. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def region(self): - """Gets the region of this TenantInfo. # noqa: E501 - - Geo region of the tenant # noqa: E501 - - :return: The region of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._region - - @region.setter - def region(self, region): - """Sets the region of this TenantInfo. - - Geo region of the tenant # noqa: E501 - - :param region: The region of this TenantInfo. # noqa: E501 - :type: str - """ - - self._region = region - - @property - def tenant_profile_id(self): - """Gets the tenant_profile_id of this TenantInfo. # noqa: E501 - - - :return: The tenant_profile_id of this TenantInfo. # noqa: E501 - :rtype: TenantProfileId - """ - return self._tenant_profile_id - - @tenant_profile_id.setter - def tenant_profile_id(self, tenant_profile_id): - """Sets the tenant_profile_id of this TenantInfo. - - - :param tenant_profile_id: The tenant_profile_id of this TenantInfo. # noqa: E501 - :type: TenantProfileId - """ - if tenant_profile_id is None: - raise ValueError("Invalid value for `tenant_profile_id`, must not be `None`") # noqa: E501 - - self._tenant_profile_id = tenant_profile_id - - @property - def country(self): - """Gets the country of this TenantInfo. # noqa: E501 - - Country # noqa: E501 - - :return: The country of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._country - - @country.setter - def country(self, country): - """Sets the country of this TenantInfo. - - Country # noqa: E501 - - :param country: The country of this TenantInfo. # noqa: E501 - :type: str - """ - - self._country = country - - @property - def state(self): - """Gets the state of this TenantInfo. # noqa: E501 - - State # noqa: E501 - - :return: The state of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._state - - @state.setter - def state(self, state): - """Sets the state of this TenantInfo. - - State # noqa: E501 - - :param state: The state of this TenantInfo. # noqa: E501 - :type: str - """ - - self._state = state - - @property - def city(self): - """Gets the city of this TenantInfo. # noqa: E501 - - City # noqa: E501 - - :return: The city of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._city - - @city.setter - def city(self, city): - """Sets the city of this TenantInfo. - - City # noqa: E501 - - :param city: The city of this TenantInfo. # noqa: E501 - :type: str - """ - - self._city = city - - @property - def address(self): - """Gets the address of this TenantInfo. # noqa: E501 - - Address Line 1 # noqa: E501 - - :return: The address of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._address - - @address.setter - def address(self, address): - """Sets the address of this TenantInfo. - - Address Line 1 # noqa: E501 - - :param address: The address of this TenantInfo. # noqa: E501 - :type: str - """ - - self._address = address - - @property - def address2(self): - """Gets the address2 of this TenantInfo. # noqa: E501 - - Address Line 2 # noqa: E501 - - :return: The address2 of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._address2 - - @address2.setter - def address2(self, address2): - """Sets the address2 of this TenantInfo. - - Address Line 2 # noqa: E501 - - :param address2: The address2 of this TenantInfo. # noqa: E501 - :type: str - """ - - self._address2 = address2 - - @property - def zip(self): - """Gets the zip of this TenantInfo. # noqa: E501 - - Zip code # noqa: E501 - - :return: The zip of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._zip - - @zip.setter - def zip(self, zip): - """Sets the zip of this TenantInfo. - - Zip code # noqa: E501 - - :param zip: The zip of this TenantInfo. # noqa: E501 - :type: str - """ - - self._zip = zip - - @property - def phone(self): - """Gets the phone of this TenantInfo. # noqa: E501 - - Phone number # noqa: E501 - - :return: The phone of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._phone - - @phone.setter - def phone(self, phone): - """Sets the phone of this TenantInfo. - - Phone number # noqa: E501 - - :param phone: The phone of this TenantInfo. # noqa: E501 - :type: str - """ - - self._phone = phone - - @property - def email(self): - """Gets the email of this TenantInfo. # noqa: E501 - - Email # noqa: E501 - - :return: The email of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this TenantInfo. - - Email # noqa: E501 - - :param email: The email of this TenantInfo. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def additional_info(self): - """Gets the additional_info of this TenantInfo. # noqa: E501 - - - :return: The additional_info of this TenantInfo. # noqa: E501 - :rtype: JsonNode - """ - return self._additional_info - - @additional_info.setter - def additional_info(self, additional_info): - """Sets the additional_info of this TenantInfo. - - - :param additional_info: The additional_info of this TenantInfo. # noqa: E501 - :type: JsonNode - """ - - self._additional_info = additional_info - - @property - def tenant_profile_name(self): - """Gets the tenant_profile_name of this TenantInfo. # noqa: E501 - - Tenant Profile name # noqa: E501 - - :return: The tenant_profile_name of this TenantInfo. # noqa: E501 - :rtype: str - """ - return self._tenant_profile_name - - @tenant_profile_name.setter - def tenant_profile_name(self, tenant_profile_name): - """Sets the tenant_profile_name of this TenantInfo. - - Tenant Profile name # noqa: E501 - - :param tenant_profile_name: The tenant_profile_name of this TenantInfo. # noqa: E501 - :type: str - """ - - self._tenant_profile_name = tenant_profile_name - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(TenantInfo, dict): - for key, value in self.items(): - result[key] = 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, TenantInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/tenant_profile.py b/tb_rest_client/models/models_pe/tenant_profile.py deleted file mode 100644 index 11cc6a6d..00000000 --- a/tb_rest_client/models/models_pe/tenant_profile.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class TenantProfile(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'default': 'bool', - 'id': 'TenantProfileId', - 'created_time': 'int', - 'name': 'str', - 'description': 'str', - 'isolated_tb_rule_engine': 'bool', - 'profile_data': 'TenantProfileData' - } - - attribute_map = { - 'default': 'default', - 'id': 'id', - 'created_time': 'createdTime', - 'name': 'name', - 'description': 'description', - 'isolated_tb_rule_engine': 'isolatedTbRuleEngine', - 'profile_data': 'profileData' - } - - def __init__(self, default=None, id=None, created_time=None, name=None, description=None, isolated_tb_rule_engine=None, profile_data=None): # noqa: E501 - """TenantProfile - a model defined in Swagger""" # noqa: E501 - self._default = None - self._id = None - self._created_time = None - self._name = None - self._description = None - self._isolated_tb_rule_engine = None - self._profile_data = None - self.discriminator = None - if default is not None: - self.default = default - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if name is not None: - self.name = name - if description is not None: - self.description = description - if isolated_tb_rule_engine is not None: - self.isolated_tb_rule_engine = isolated_tb_rule_engine - if profile_data is not None: - self.profile_data = profile_data - - @property - def default(self): - """Gets the default of this TenantProfile. # noqa: E501 - - - :return: The default of this TenantProfile. # noqa: E501 - :rtype: bool - """ - return self._default - - @default.setter - def default(self, default): - """Sets the default of this TenantProfile. - - - :param default: The default of this TenantProfile. # noqa: E501 - :type: bool - """ - - self._default = default - - @property - def id(self): - """Gets the id of this TenantProfile. # noqa: E501 - - - :return: The id of this TenantProfile. # noqa: E501 - :rtype: TenantProfileId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this TenantProfile. - - - :param id: The id of this TenantProfile. # noqa: E501 - :type: TenantProfileId - """ - - self._id = id - - @property - def created_time(self): - """Gets the created_time of this TenantProfile. # noqa: E501 - - Timestamp of the tenant profile creation, in milliseconds # noqa: E501 - - :return: The created_time of this TenantProfile. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this TenantProfile. - - Timestamp of the tenant profile creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this TenantProfile. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def name(self): - """Gets the name of this TenantProfile. # noqa: E501 - - Name of the tenant profile # noqa: E501 - - :return: The name of this TenantProfile. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this TenantProfile. - - Name of the tenant profile # noqa: E501 - - :param name: The name of this TenantProfile. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def description(self): - """Gets the description of this TenantProfile. # noqa: E501 - - Description of the tenant profile # noqa: E501 - - :return: The description of this TenantProfile. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this TenantProfile. - - Description of the tenant profile # noqa: E501 - - :param description: The description of this TenantProfile. # noqa: E501 - :type: str - """ - - self._description = description - - @property - def isolated_tb_rule_engine(self): - """Gets the isolated_tb_rule_engine of this TenantProfile. # noqa: E501 - - If enabled, will push all messages related to this tenant and processed by the rule engine into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants # noqa: E501 - - :return: The isolated_tb_rule_engine of this TenantProfile. # noqa: E501 - :rtype: bool - """ - return self._isolated_tb_rule_engine - - @isolated_tb_rule_engine.setter - def isolated_tb_rule_engine(self, isolated_tb_rule_engine): - """Sets the isolated_tb_rule_engine of this TenantProfile. - - If enabled, will push all messages related to this tenant and processed by the rule engine into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants # noqa: E501 - - :param isolated_tb_rule_engine: The isolated_tb_rule_engine of this TenantProfile. # noqa: E501 - :type: bool - """ - - self._isolated_tb_rule_engine = isolated_tb_rule_engine - - @property - def profile_data(self): - """Gets the profile_data of this TenantProfile. # noqa: E501 - - - :return: The profile_data of this TenantProfile. # noqa: E501 - :rtype: TenantProfileData - """ - return self._profile_data - - @profile_data.setter - def profile_data(self, profile_data): - """Sets the profile_data of this TenantProfile. - - - :param profile_data: The profile_data of this TenantProfile. # noqa: E501 - :type: TenantProfileData - """ - - self._profile_data = profile_data - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(TenantProfile, dict): - for key, value in self.items(): - result[key] = 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, TenantProfile): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/usage_info.py b/tb_rest_client/models/models_pe/usage_info.py deleted file mode 100644 index 291e39bd..00000000 --- a/tb_rest_client/models/models_pe/usage_info.py +++ /dev/null @@ -1,604 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class UsageInfo(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'alarms': 'int', - 'assets': 'int', - 'customers': 'int', - 'dashboards': 'int', - 'devices': 'int', - 'emails': 'int', - 'js_executions': 'int', - 'max_alarms': 'int', - 'max_assets': 'int', - 'max_customers': 'int', - 'max_dashboards': 'int', - 'max_devices': 'int', - 'max_emails': 'int', - 'max_js_executions': 'int', - 'max_sms': 'int', - 'max_transport_messages': 'int', - 'max_users': 'int', - 'sms': 'int', - 'transport_messages': 'int', - 'users': 'int' - } - - attribute_map = { - 'alarms': 'alarms', - 'assets': 'assets', - 'customers': 'customers', - 'dashboards': 'dashboards', - 'devices': 'devices', - 'emails': 'emails', - 'js_executions': 'jsExecutions', - 'max_alarms': 'maxAlarms', - 'max_assets': 'maxAssets', - 'max_customers': 'maxCustomers', - 'max_dashboards': 'maxDashboards', - 'max_devices': 'maxDevices', - 'max_emails': 'maxEmails', - 'max_js_executions': 'maxJsExecutions', - 'max_sms': 'maxSms', - 'max_transport_messages': 'maxTransportMessages', - 'max_users': 'maxUsers', - 'sms': 'sms', - 'transport_messages': 'transportMessages', - 'users': 'users' - } - - def __init__(self, alarms=None, assets=None, customers=None, dashboards=None, devices=None, emails=None, js_executions=None, max_alarms=None, max_assets=None, max_customers=None, max_dashboards=None, max_devices=None, max_emails=None, max_js_executions=None, max_sms=None, max_transport_messages=None, max_users=None, sms=None, transport_messages=None, users=None): # noqa: E501 - """UsageInfo - a model defined in Swagger""" # noqa: E501 - self._alarms = None - self._assets = None - self._customers = None - self._dashboards = None - self._devices = None - self._emails = None - self._js_executions = None - self._max_alarms = None - self._max_assets = None - self._max_customers = None - self._max_dashboards = None - self._max_devices = None - self._max_emails = None - self._max_js_executions = None - self._max_sms = None - self._max_transport_messages = None - self._max_users = None - self._sms = None - self._transport_messages = None - self._users = None - self.discriminator = None - if alarms is not None: - self.alarms = alarms - if assets is not None: - self.assets = assets - if customers is not None: - self.customers = customers - if dashboards is not None: - self.dashboards = dashboards - if devices is not None: - self.devices = devices - if emails is not None: - self.emails = emails - if js_executions is not None: - self.js_executions = js_executions - if max_alarms is not None: - self.max_alarms = max_alarms - if max_assets is not None: - self.max_assets = max_assets - if max_customers is not None: - self.max_customers = max_customers - if max_dashboards is not None: - self.max_dashboards = max_dashboards - if max_devices is not None: - self.max_devices = max_devices - if max_emails is not None: - self.max_emails = max_emails - if max_js_executions is not None: - self.max_js_executions = max_js_executions - if max_sms is not None: - self.max_sms = max_sms - if max_transport_messages is not None: - self.max_transport_messages = max_transport_messages - if max_users is not None: - self.max_users = max_users - if sms is not None: - self.sms = sms - if transport_messages is not None: - self.transport_messages = transport_messages - if users is not None: - self.users = users - - @property - def alarms(self): - """Gets the alarms of this UsageInfo. # noqa: E501 - - - :return: The alarms of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._alarms - - @alarms.setter - def alarms(self, alarms): - """Sets the alarms of this UsageInfo. - - - :param alarms: The alarms of this UsageInfo. # noqa: E501 - :type: int - """ - - self._alarms = alarms - - @property - def assets(self): - """Gets the assets of this UsageInfo. # noqa: E501 - - - :return: The assets of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._assets - - @assets.setter - def assets(self, assets): - """Sets the assets of this UsageInfo. - - - :param assets: The assets of this UsageInfo. # noqa: E501 - :type: int - """ - - self._assets = assets - - @property - def customers(self): - """Gets the customers of this UsageInfo. # noqa: E501 - - - :return: The customers of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._customers - - @customers.setter - def customers(self, customers): - """Sets the customers of this UsageInfo. - - - :param customers: The customers of this UsageInfo. # noqa: E501 - :type: int - """ - - self._customers = customers - - @property - def dashboards(self): - """Gets the dashboards of this UsageInfo. # noqa: E501 - - - :return: The dashboards of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._dashboards - - @dashboards.setter - def dashboards(self, dashboards): - """Sets the dashboards of this UsageInfo. - - - :param dashboards: The dashboards of this UsageInfo. # noqa: E501 - :type: int - """ - - self._dashboards = dashboards - - @property - def devices(self): - """Gets the devices of this UsageInfo. # noqa: E501 - - - :return: The devices of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._devices - - @devices.setter - def devices(self, devices): - """Sets the devices of this UsageInfo. - - - :param devices: The devices of this UsageInfo. # noqa: E501 - :type: int - """ - - self._devices = devices - - @property - def emails(self): - """Gets the emails of this UsageInfo. # noqa: E501 - - - :return: The emails of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._emails - - @emails.setter - def emails(self, emails): - """Sets the emails of this UsageInfo. - - - :param emails: The emails of this UsageInfo. # noqa: E501 - :type: int - """ - - self._emails = emails - - @property - def js_executions(self): - """Gets the js_executions of this UsageInfo. # noqa: E501 - - - :return: The js_executions of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._js_executions - - @js_executions.setter - def js_executions(self, js_executions): - """Sets the js_executions of this UsageInfo. - - - :param js_executions: The js_executions of this UsageInfo. # noqa: E501 - :type: int - """ - - self._js_executions = js_executions - - @property - def max_alarms(self): - """Gets the max_alarms of this UsageInfo. # noqa: E501 - - - :return: The max_alarms of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_alarms - - @max_alarms.setter - def max_alarms(self, max_alarms): - """Sets the max_alarms of this UsageInfo. - - - :param max_alarms: The max_alarms of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_alarms = max_alarms - - @property - def max_assets(self): - """Gets the max_assets of this UsageInfo. # noqa: E501 - - - :return: The max_assets of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_assets - - @max_assets.setter - def max_assets(self, max_assets): - """Sets the max_assets of this UsageInfo. - - - :param max_assets: The max_assets of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_assets = max_assets - - @property - def max_customers(self): - """Gets the max_customers of this UsageInfo. # noqa: E501 - - - :return: The max_customers of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_customers - - @max_customers.setter - def max_customers(self, max_customers): - """Sets the max_customers of this UsageInfo. - - - :param max_customers: The max_customers of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_customers = max_customers - - @property - def max_dashboards(self): - """Gets the max_dashboards of this UsageInfo. # noqa: E501 - - - :return: The max_dashboards of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_dashboards - - @max_dashboards.setter - def max_dashboards(self, max_dashboards): - """Sets the max_dashboards of this UsageInfo. - - - :param max_dashboards: The max_dashboards of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_dashboards = max_dashboards - - @property - def max_devices(self): - """Gets the max_devices of this UsageInfo. # noqa: E501 - - - :return: The max_devices of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_devices - - @max_devices.setter - def max_devices(self, max_devices): - """Sets the max_devices of this UsageInfo. - - - :param max_devices: The max_devices of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_devices = max_devices - - @property - def max_emails(self): - """Gets the max_emails of this UsageInfo. # noqa: E501 - - - :return: The max_emails of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_emails - - @max_emails.setter - def max_emails(self, max_emails): - """Sets the max_emails of this UsageInfo. - - - :param max_emails: The max_emails of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_emails = max_emails - - @property - def max_js_executions(self): - """Gets the max_js_executions of this UsageInfo. # noqa: E501 - - - :return: The max_js_executions of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_js_executions - - @max_js_executions.setter - def max_js_executions(self, max_js_executions): - """Sets the max_js_executions of this UsageInfo. - - - :param max_js_executions: The max_js_executions of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_js_executions = max_js_executions - - @property - def max_sms(self): - """Gets the max_sms of this UsageInfo. # noqa: E501 - - - :return: The max_sms of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_sms - - @max_sms.setter - def max_sms(self, max_sms): - """Sets the max_sms of this UsageInfo. - - - :param max_sms: The max_sms of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_sms = max_sms - - @property - def max_transport_messages(self): - """Gets the max_transport_messages of this UsageInfo. # noqa: E501 - - - :return: The max_transport_messages of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_transport_messages - - @max_transport_messages.setter - def max_transport_messages(self, max_transport_messages): - """Sets the max_transport_messages of this UsageInfo. - - - :param max_transport_messages: The max_transport_messages of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_transport_messages = max_transport_messages - - @property - def max_users(self): - """Gets the max_users of this UsageInfo. # noqa: E501 - - - :return: The max_users of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._max_users - - @max_users.setter - def max_users(self, max_users): - """Sets the max_users of this UsageInfo. - - - :param max_users: The max_users of this UsageInfo. # noqa: E501 - :type: int - """ - - self._max_users = max_users - - @property - def sms(self): - """Gets the sms of this UsageInfo. # noqa: E501 - - - :return: The sms of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._sms - - @sms.setter - def sms(self, sms): - """Sets the sms of this UsageInfo. - - - :param sms: The sms of this UsageInfo. # noqa: E501 - :type: int - """ - - self._sms = sms - - @property - def transport_messages(self): - """Gets the transport_messages of this UsageInfo. # noqa: E501 - - - :return: The transport_messages of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._transport_messages - - @transport_messages.setter - def transport_messages(self, transport_messages): - """Sets the transport_messages of this UsageInfo. - - - :param transport_messages: The transport_messages of this UsageInfo. # noqa: E501 - :type: int - """ - - self._transport_messages = transport_messages - - @property - def users(self): - """Gets the users of this UsageInfo. # noqa: E501 - - - :return: The users of this UsageInfo. # noqa: E501 - :rtype: int - """ - return self._users - - @users.setter - def users(self, users): - """Sets the users of this UsageInfo. - - - :param users: The users of this UsageInfo. # noqa: E501 - :type: int - """ - - self._users = users - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(UsageInfo, dict): - for key, value in self.items(): - result[key] = 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, UsageInfo): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/widget_type.py b/tb_rest_client/models/models_pe/widget_type.py deleted file mode 100644 index bf87743a..00000000 --- a/tb_rest_client/models/models_pe/widget_type.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class WidgetType(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'WidgetTypeId', - 'created_time': 'int', - 'tenant_id': 'TenantId', - 'bundle_alias': 'str', - 'alias': 'str', - 'name': 'str', - 'descriptor': 'JsonNode' - } - - attribute_map = { - 'id': 'id', - 'created_time': 'createdTime', - 'tenant_id': 'tenantId', - 'bundle_alias': 'bundleAlias', - 'alias': 'alias', - 'name': 'name', - 'descriptor': 'descriptor' - } - - def __init__(self, id=None, created_time=None, tenant_id=None, bundle_alias=None, alias=None, name=None, descriptor=None): # noqa: E501 - """WidgetType - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_time = None - self._tenant_id = None - self._bundle_alias = None - self._alias = None - self._name = None - self._descriptor = None - self.discriminator = None - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if tenant_id is not None: - self.tenant_id = tenant_id - if bundle_alias is not None: - self.bundle_alias = bundle_alias - if alias is not None: - self.alias = alias - if name is not None: - self.name = name - if descriptor is not None: - self.descriptor = descriptor - - @property - def id(self): - """Gets the id of this WidgetType. # noqa: E501 - - - :return: The id of this WidgetType. # noqa: E501 - :rtype: WidgetTypeId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this WidgetType. - - - :param id: The id of this WidgetType. # noqa: E501 - :type: WidgetTypeId - """ - - self._id = id - - @property - def created_time(self): - """Gets the created_time of this WidgetType. # noqa: E501 - - Timestamp of the Widget Type creation, in milliseconds # noqa: E501 - - :return: The created_time of this WidgetType. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this WidgetType. - - Timestamp of the Widget Type creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this WidgetType. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def tenant_id(self): - """Gets the tenant_id of this WidgetType. # noqa: E501 - - - :return: The tenant_id of this WidgetType. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this WidgetType. - - - :param tenant_id: The tenant_id of this WidgetType. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - @property - def bundle_alias(self): - """Gets the bundle_alias of this WidgetType. # noqa: E501 - - Reference to widget bundle # noqa: E501 - - :return: The bundle_alias of this WidgetType. # noqa: E501 - :rtype: str - """ - return self._bundle_alias - - @bundle_alias.setter - def bundle_alias(self, bundle_alias): - """Sets the bundle_alias of this WidgetType. - - Reference to widget bundle # noqa: E501 - - :param bundle_alias: The bundle_alias of this WidgetType. # noqa: E501 - :type: str - """ - - self._bundle_alias = bundle_alias - - @property - def alias(self): - """Gets the alias of this WidgetType. # noqa: E501 - - Unique alias that is used in dashboards as a reference widget type # noqa: E501 - - :return: The alias of this WidgetType. # noqa: E501 - :rtype: str - """ - return self._alias - - @alias.setter - def alias(self, alias): - """Sets the alias of this WidgetType. - - Unique alias that is used in dashboards as a reference widget type # noqa: E501 - - :param alias: The alias of this WidgetType. # noqa: E501 - :type: str - """ - - self._alias = alias - - @property - def name(self): - """Gets the name of this WidgetType. # noqa: E501 - - Widget name used in search and UI # noqa: E501 - - :return: The name of this WidgetType. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this WidgetType. - - Widget name used in search and UI # noqa: E501 - - :param name: The name of this WidgetType. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def descriptor(self): - """Gets the descriptor of this WidgetType. # noqa: E501 - - - :return: The descriptor of this WidgetType. # noqa: E501 - :rtype: JsonNode - """ - return self._descriptor - - @descriptor.setter - def descriptor(self, descriptor): - """Sets the descriptor of this WidgetType. - - - :param descriptor: The descriptor of this WidgetType. # noqa: E501 - :type: JsonNode - """ - - self._descriptor = descriptor - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(WidgetType, dict): - for key, value in self.items(): - result[key] = 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, WidgetType): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/widget_type_details.py b/tb_rest_client/models/models_pe/widget_type_details.py deleted file mode 100644 index f9107629..00000000 --- a/tb_rest_client/models/models_pe/widget_type_details.py +++ /dev/null @@ -1,330 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class WidgetTypeDetails(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'WidgetTypeId', - 'created_time': 'int', - 'tenant_id': 'TenantId', - 'bundle_alias': 'str', - 'alias': 'str', - 'name': 'str', - 'descriptor': 'JsonNode', - 'image': 'str', - 'description': 'str' - } - - attribute_map = { - 'id': 'id', - 'created_time': 'createdTime', - 'tenant_id': 'tenantId', - 'bundle_alias': 'bundleAlias', - 'alias': 'alias', - 'name': 'name', - 'descriptor': 'descriptor', - 'image': 'image', - 'description': 'description' - } - - def __init__(self, id=None, created_time=None, tenant_id=None, bundle_alias=None, alias=None, name=None, descriptor=None, image=None, description=None): # noqa: E501 - """WidgetTypeDetails - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_time = None - self._tenant_id = None - self._bundle_alias = None - self._alias = None - self._name = None - self._descriptor = None - self._image = None - self._description = None - self.discriminator = None - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if tenant_id is not None: - self.tenant_id = tenant_id - if bundle_alias is not None: - self.bundle_alias = bundle_alias - if alias is not None: - self.alias = alias - if name is not None: - self.name = name - if descriptor is not None: - self.descriptor = descriptor - if image is not None: - self.image = image - if description is not None: - self.description = description - - @property - def id(self): - """Gets the id of this WidgetTypeDetails. # noqa: E501 - - - :return: The id of this WidgetTypeDetails. # noqa: E501 - :rtype: WidgetTypeId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this WidgetTypeDetails. - - - :param id: The id of this WidgetTypeDetails. # noqa: E501 - :type: WidgetTypeId - """ - - self._id = id - - @property - def created_time(self): - """Gets the created_time of this WidgetTypeDetails. # noqa: E501 - - Timestamp of the Widget Type creation, in milliseconds # noqa: E501 - - :return: The created_time of this WidgetTypeDetails. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this WidgetTypeDetails. - - Timestamp of the Widget Type creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this WidgetTypeDetails. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def tenant_id(self): - """Gets the tenant_id of this WidgetTypeDetails. # noqa: E501 - - - :return: The tenant_id of this WidgetTypeDetails. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this WidgetTypeDetails. - - - :param tenant_id: The tenant_id of this WidgetTypeDetails. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - @property - def bundle_alias(self): - """Gets the bundle_alias of this WidgetTypeDetails. # noqa: E501 - - Reference to widget bundle # noqa: E501 - - :return: The bundle_alias of this WidgetTypeDetails. # noqa: E501 - :rtype: str - """ - return self._bundle_alias - - @bundle_alias.setter - def bundle_alias(self, bundle_alias): - """Sets the bundle_alias of this WidgetTypeDetails. - - Reference to widget bundle # noqa: E501 - - :param bundle_alias: The bundle_alias of this WidgetTypeDetails. # noqa: E501 - :type: str - """ - - self._bundle_alias = bundle_alias - - @property - def alias(self): - """Gets the alias of this WidgetTypeDetails. # noqa: E501 - - Unique alias that is used in dashboards as a reference widget type # noqa: E501 - - :return: The alias of this WidgetTypeDetails. # noqa: E501 - :rtype: str - """ - return self._alias - - @alias.setter - def alias(self, alias): - """Sets the alias of this WidgetTypeDetails. - - Unique alias that is used in dashboards as a reference widget type # noqa: E501 - - :param alias: The alias of this WidgetTypeDetails. # noqa: E501 - :type: str - """ - - self._alias = alias - - @property - def name(self): - """Gets the name of this WidgetTypeDetails. # noqa: E501 - - Widget name used in search and UI # noqa: E501 - - :return: The name of this WidgetTypeDetails. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this WidgetTypeDetails. - - Widget name used in search and UI # noqa: E501 - - :param name: The name of this WidgetTypeDetails. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def descriptor(self): - """Gets the descriptor of this WidgetTypeDetails. # noqa: E501 - - - :return: The descriptor of this WidgetTypeDetails. # noqa: E501 - :rtype: JsonNode - """ - return self._descriptor - - @descriptor.setter - def descriptor(self, descriptor): - """Sets the descriptor of this WidgetTypeDetails. - - - :param descriptor: The descriptor of this WidgetTypeDetails. # noqa: E501 - :type: JsonNode - """ - - self._descriptor = descriptor - - @property - def image(self): - """Gets the image of this WidgetTypeDetails. # noqa: E501 - - Base64 encoded thumbnail # noqa: E501 - - :return: The image of this WidgetTypeDetails. # noqa: E501 - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this WidgetTypeDetails. - - Base64 encoded thumbnail # noqa: E501 - - :param image: The image of this WidgetTypeDetails. # noqa: E501 - :type: str - """ - - self._image = image - - @property - def description(self): - """Gets the description of this WidgetTypeDetails. # noqa: E501 - - Description of the widget # noqa: E501 - - :return: The description of this WidgetTypeDetails. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this WidgetTypeDetails. - - Description of the widget # noqa: E501 - - :param description: The description of this WidgetTypeDetails. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(WidgetTypeDetails, dict): - for key, value in self.items(): - result[key] = 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, WidgetTypeDetails): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/models/models_pe/widgets_bundle.py b/tb_rest_client/models/models_pe/widgets_bundle.py deleted file mode 100644 index 099b4fb7..00000000 --- a/tb_rest_client/models/models_pe/widgets_bundle.py +++ /dev/null @@ -1,304 +0,0 @@ -# coding: utf-8 - -""" - ThingsBoard REST API - - ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 - - OpenAPI spec version: 3.5.0PE - Contact: info@thingsboard.io - Generated by: https://github.com/swagger-api/swagger-codegen.git -""" - -import pprint -import re # noqa: F401 - -import six - -class WidgetsBundle(object): - """NOTE: This class is auto generated by the swagger code generator program. - - Do not edit the class manually. - """ - """ - Attributes: - swagger_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. - """ - swagger_types = { - 'id': 'WidgetsBundleId', - 'created_time': 'int', - 'name': 'str', - 'tenant_id': 'TenantId', - 'alias': 'str', - 'title': 'str', - 'image': 'str', - 'description': 'str' - } - - attribute_map = { - 'id': 'id', - 'created_time': 'createdTime', - 'name': 'name', - 'tenant_id': 'tenantId', - 'alias': 'alias', - 'title': 'title', - 'image': 'image', - 'description': 'description' - } - - def __init__(self, id=None, created_time=None, name=None, tenant_id=None, alias=None, title=None, image=None, description=None): # noqa: E501 - """WidgetsBundle - a model defined in Swagger""" # noqa: E501 - self._id = None - self._created_time = None - self._name = None - self._tenant_id = None - self._alias = None - self._title = None - self._image = None - self._description = None - self.discriminator = None - if id is not None: - self.id = id - if created_time is not None: - self.created_time = created_time - if name is not None: - self.name = name - if tenant_id is not None: - self.tenant_id = tenant_id - if alias is not None: - self.alias = alias - if title is not None: - self.title = title - if image is not None: - self.image = image - if description is not None: - self.description = description - - @property - def id(self): - """Gets the id of this WidgetsBundle. # noqa: E501 - - - :return: The id of this WidgetsBundle. # noqa: E501 - :rtype: WidgetsBundleId - """ - return self._id - - @id.setter - def id(self, id): - """Sets the id of this WidgetsBundle. - - - :param id: The id of this WidgetsBundle. # noqa: E501 - :type: WidgetsBundleId - """ - - self._id = id - - @property - def created_time(self): - """Gets the created_time of this WidgetsBundle. # noqa: E501 - - Timestamp of the Widget Bundle creation, in milliseconds # noqa: E501 - - :return: The created_time of this WidgetsBundle. # noqa: E501 - :rtype: int - """ - return self._created_time - - @created_time.setter - def created_time(self, created_time): - """Sets the created_time of this WidgetsBundle. - - Timestamp of the Widget Bundle creation, in milliseconds # noqa: E501 - - :param created_time: The created_time of this WidgetsBundle. # noqa: E501 - :type: int - """ - - self._created_time = created_time - - @property - def name(self): - """Gets the name of this WidgetsBundle. # noqa: E501 - - Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle. # noqa: E501 - - :return: The name of this WidgetsBundle. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this WidgetsBundle. - - Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle. # noqa: E501 - - :param name: The name of this WidgetsBundle. # noqa: E501 - :type: str - """ - - self._name = name - - @property - def tenant_id(self): - """Gets the tenant_id of this WidgetsBundle. # noqa: E501 - - - :return: The tenant_id of this WidgetsBundle. # noqa: E501 - :rtype: TenantId - """ - return self._tenant_id - - @tenant_id.setter - def tenant_id(self, tenant_id): - """Sets the tenant_id of this WidgetsBundle. - - - :param tenant_id: The tenant_id of this WidgetsBundle. # noqa: E501 - :type: TenantId - """ - - self._tenant_id = tenant_id - - @property - def alias(self): - """Gets the alias of this WidgetsBundle. # noqa: E501 - - Unique alias that is used in widget types as a reference widget bundle # noqa: E501 - - :return: The alias of this WidgetsBundle. # noqa: E501 - :rtype: str - """ - return self._alias - - @alias.setter - def alias(self, alias): - """Sets the alias of this WidgetsBundle. - - Unique alias that is used in widget types as a reference widget bundle # noqa: E501 - - :param alias: The alias of this WidgetsBundle. # noqa: E501 - :type: str - """ - - self._alias = alias - - @property - def title(self): - """Gets the title of this WidgetsBundle. # noqa: E501 - - Title used in search and UI # noqa: E501 - - :return: The title of this WidgetsBundle. # noqa: E501 - :rtype: str - """ - return self._title - - @title.setter - def title(self, title): - """Sets the title of this WidgetsBundle. - - Title used in search and UI # noqa: E501 - - :param title: The title of this WidgetsBundle. # noqa: E501 - :type: str - """ - - self._title = title - - @property - def image(self): - """Gets the image of this WidgetsBundle. # noqa: E501 - - Base64 encoded thumbnail # noqa: E501 - - :return: The image of this WidgetsBundle. # noqa: E501 - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this WidgetsBundle. - - Base64 encoded thumbnail # noqa: E501 - - :param image: The image of this WidgetsBundle. # noqa: E501 - :type: str - """ - - self._image = image - - @property - def description(self): - """Gets the description of this WidgetsBundle. # noqa: E501 - - Description # noqa: E501 - - :return: The description of this WidgetsBundle. # noqa: E501 - :rtype: str - """ - return self._description - - @description.setter - def description(self, description): - """Sets the description of this WidgetsBundle. - - Description # noqa: E501 - - :param description: The description of this WidgetsBundle. # noqa: E501 - :type: str - """ - - self._description = description - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.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 - if issubclass(WidgetsBundle, dict): - for key, value in self.items(): - result[key] = 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, WidgetsBundle): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other diff --git a/tb_rest_client/rest_client_base.py b/tb_rest_client/rest_client_base.py index a98c2ee2..97650005 100644 --- a/tb_rest_client/rest_client_base.py +++ b/tb_rest_client/rest_client_base.py @@ -1711,7 +1711,7 @@ def save_notification_rule(self, body: NotificationRule) -> NotificationRule: def delete_notification_target_by_id(self, id: str): return self.notification_target_controller.delete_notification_target_by_id_using_delete(id=id) - def get_notification_target_by_id(self, id: str): + def get_notification_target_by_id(self, id: str) -> NotificationTarget: return self.notification_target_controller.get_notification_target_by_id_using_get(id=id) def get_notification_targets_by_ids(self, ids: list) -> List[NotificationTarget]: @@ -1721,13 +1721,15 @@ def get_notification_targets_by_ids(self, ids: list) -> List[NotificationTarget] def get_notification_targets_by_supported_notification_type(self, notification_type: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None): + sort_order: Optional[ + str] = None) -> PageDataNotificationTarget: return self.notification_target_controller.get_notification_targets_by_supported_notification_type_using_get( - notification_type=notification_type, page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, sort_order=sort_order) + notification_type=notification_type, page_size=page_size, page=page, text_search=text_search, + sort_property=sort_property, sort_order=sort_order) def get_notification_targets(self, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, - sort_order: Optional[str] = None): + sort_order: Optional[str] = None) -> PageDataNotificationTarget: return self.notification_target_controller.get_notification_targets_using_get(page_size=page_size, page=page, text_search=text_search, sort_property=sort_property, diff --git a/tb_rest_client/rest_client_pe.py b/tb_rest_client/rest_client_pe.py index 7404699b..23af4337 100644 --- a/tb_rest_client/rest_client_pe.py +++ b/tb_rest_client/rest_client_pe.py @@ -1057,33 +1057,35 @@ def export_group_dashboards(self, entity_group_id: EntityGroupId, limit: int) -> entity_group_id = self.get_id(entity_group_id) return self.dashboard_controller.export_group_dashboards_using_get(entity_group_id=entity_group_id, limit=limit) - def check_integration_connection_post(self, body: Optional[Integration] = None) -> None: + def check_integration_connection(self, body: Optional[Integration] = None) -> None: return self.integration_controller.check_integration_connection_using_post(body=body) - def delete_integration_delete(self, integration_id: IntegrationId) -> None: + def delete_integration(self, integration_id: IntegrationId) -> None: integration_id = self.get_id(integration_id) return self.integration_controller.delete_integration_using_delete(integration_id=integration_id) - def get_integration_by_id_get(self, integration_id: IntegrationId) -> Integration: + def get_integration_by_id(self, integration_id: IntegrationId) -> Integration: integration_id = self.get_id(integration_id) return self.integration_controller.get_integration_by_id_using_get(integration_id=integration_id) - def get_integration_by_routing_key_get(self, routing_key: str) -> Integration: + def get_integration_by_routing_key(self, routing_key: str) -> Integration: return self.integration_controller.get_integration_by_routing_key_using_get(routing_key=routing_key) - def get_integrations_by_ids_get(self, integration_ids: list) -> List[Integration]: - return self.integration_controller.get_integrations_by_ids_using_get(integration_ids=str(integration_ids)) + def get_integrations_by_ids(self, integration_ids: list) -> List[Integration]: + integration_ids = ','.join(integration_ids) + return self.integration_controller.get_integrations_by_ids_using_get(integration_ids=integration_ids) def get_integration_infos(self, page_size: int, page: int, is_edge_template: Optional[bool], text_search: Optional[str] = None, - sort_property: Optional[str] = None, sort_order: Optional[str] = None): + sort_property: Optional[str] = None, + sort_order: Optional[str] = None) -> PageDataIntegrationInfo: return self.integration_controller.get_integration_infos_using_get(page_size=page_size, page=page, is_edge_template=is_edge_template, text_search=text_search, sort_property=sort_property, sort_order=sort_order) - def get_integrations_get(self, page_size: int, page: int, is_edge_template: Optional[bool], text_search: Optional[str] = None, + def get_integrations(self, page_size: int, page: int, is_edge_template: Optional[bool], text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None,) -> PageDataIntegration: return self.integration_controller.get_integrations_using_get(page_size=page_size, page=page, is_edge_template=is_edge_template, @@ -1091,7 +1093,7 @@ def get_integrations_get(self, page_size: int, page: int, is_edge_template: Opti sort_property=sort_property, sort_order=sort_order) - def save_integration_post(self, body: Optional[Integration] = None) -> Integration: + def save_integration(self, body: Optional[Integration] = None) -> Integration: return self.integration_controller.save_integration_using_post(body=body) def get_current_custom_menu(self, ) -> CustomMenu: diff --git a/test/tests_ce.py b/test/tests_ce.py index 5f996106..cd9ad34a 100644 --- a/test/tests_ce.py +++ b/test/tests_ce.py @@ -5,17 +5,26 @@ from tb_rest_client.models.models_ce import * +TB_URL_CE = 'http://127.0.0.1:8080' + +TB_TENANT_USERNAME_CE = 'tenant@thingsboard.org' +TB_TENANT_PASSWORD_CE = 'tenant' + +TB_SYSADMIN_USERNAME_CE = 'sysadmin@thingsboard.org' +TB_SYSADMIN_PASSWORD_CE = 'sysadmin' + + class TBClientCETests(unittest.TestCase): client = None @classmethod def setUpClass(cls) -> None: # ThingsBoard REST API URL - url = "https://demo.thingsboard.io" + url = TB_URL_CE # Default Tenant Administrator credentials - username = "***" - password = "***" + username = TB_TENANT_USERNAME_CE + password = TB_TENANT_PASSWORD_CE with RestClientCE(url) as cls.client: cls.client.login(username, password) @@ -65,6 +74,39 @@ def test_get_alarm_by_id(self): self.assertIsInstance(self.client.get_alarm_by_id(self.test_alarm.id), Alarm) +class AlarmCommentControllerTests(TBClientCETests): + alarm = None + alarm_comment = None + device_profile_id = None + device = None + + @classmethod + def setUpClass(cls) -> None: + super(AlarmCommentControllerTests, cls).setUpClass() + + cls.device_profile_id = cls.client.get_default_device_profile_info().id + + cls.device = Device(name='Test', label='Test', device_profile_id=cls.device_profile_id) + cls.device = cls.client.save_device(body=cls.device) + + cls.test_alarm = cls.client.save_alarm(Alarm(name='Test', type='default', + originator=cls.device.id, + severity='CRITICAL', status='CLEARED_UNACK', acknowledged=False, + cleared=False)) + cls.alarm = cls.client.get_all_alarms(10, 0).data[0] + cls.alarm_comment = cls.client.save_alarm_comment(cls.alarm.id, + AlarmComment(name='Test Comment', comment='Test comment')) + + def test_get_alarm_comments(self): + self.assertIsInstance(self.client.get_alarm_comments(self.alarm.id, 10, 0), PageDataAlarmCommentInfo) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_alarm_comment(cls.alarm.id, cls.alarm_comment.id) + cls.client.delete_alarm(cls.alarm.id) + cls.client.delete_device(cls.device.id) + + class AssetControllerTests(TBClientCETests): test_asset = None asset_profile_id = None @@ -110,6 +152,61 @@ def test_get_asset_by_id(self): self.assertIsInstance(self.client.get_asset_by_id(self.test_asset.id), Asset) +class AssetProfileControllerTests(TBClientCETests): + asset_profile = None + + @classmethod + def setUpClass(cls) -> None: + super(AssetProfileControllerTests, cls).setUpClass() + + cls.asset_profile = AssetProfile(name='Test Asset', default=False) + cls.asset_profile = cls.client.save_asset_profile(cls.asset_profile) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_asset_profile(cls.asset_profile.id) + + def test_get_asset_profile_by_id(self): + self.assertIsInstance(self.client.get_asset_profile_by_id(self.asset_profile.id), AssetProfile) + + def test_get_asset_profile_info_by_id(self): + self.assertIsInstance(self.client.get_asset_profile_info_by_id(self.asset_profile.id), AssetProfileInfo) + + def test_get_default_asset_profile_info(self): + self.assertIsInstance(self.client.get_default_asset_profile_info(), AssetProfileInfo) + + def test_get_asset_profile_infos(self): + self.assertIsInstance(self.client.get_asset_profile_infos(10, 0), PageDataAssetProfileInfo) + + def test_get_asset_profiles(self): + self.assertIsInstance(self.client.get_asset_profiles(10, 0), PageDataAssetProfile) + + +class AuditLogControllerTests(TBClientCETests): + customer = None + device = None + + @classmethod + def setUpClass(cls) -> None: + super(AuditLogControllerTests, cls).setUpClass() + + cls.customer = cls.client.get_customers(10, 0).data[0] + + def test_get_audit_logs(self): + self.assertIsInstance(self.client.get_audit_logs(10, 0), PageDataAuditLog) + + def test_get_audit_logs_by_customer_id(self): + self.assertIsInstance(self.client.get_audit_logs_by_customer_id(self.customer.id, 10, 0), PageDataAuditLog) + + def test_get_audit_logs_by_entity_id(self): + self.assertIsInstance(self.client.get_audit_logs_by_entity_id(EntityId(self.customer.id, 'CUSTOMER'), 10, 0), + PageDataAuditLog) + + def test_get_audit_logs_by_user_id(self): + self.assertIsInstance(self.client.get_audit_logs_by_user_id(UserId(self.customer.id, 'USER'), 10, 0), + PageDataAuditLog) + + class TelemetryControllerTests(TBClientCETests): device = None device_profile_id = None @@ -119,7 +216,7 @@ def setUpClass(cls) -> None: super(TelemetryControllerTests, cls).setUpClass() cls.device_profile_id = cls.client.get_default_device_profile_info().id - cls.device = Device(name='Test', device_profile_id=cls.device_profile_id) + cls.device = Device(name='Test CE', device_profile_id=cls.device_profile_id) cls.device = cls.client.save_device(cls.device) @classmethod @@ -397,6 +494,35 @@ def test_get_device_profile_by_id(self): self.assertIsInstance(self.client.get_device_profile_by_id(self.test_device_profile.id), DeviceProfile) +class EntityQueryControllerTests(TBClientCETests): + user = None + @classmethod + def setUpClass(cls) -> None: + super(EntityQueryControllerTests, cls).setUpClass() + + cls.user = cls.client.get_user() + + def test_count_alarms_by_query(self): + self.assertIsInstance(self.client.count_alarms_by_query(AlarmCountQuery(assignee_id=self.user.id, key_filters=[ + KeyFilter(key={'key': 'string', 'type': 'ALARM_FIELD'}, value_type='BOOLEAN')], + search_propagated_alarms=True, + severity_list=['CRITICAL'])), int) + + @unittest.skip('TB parsing bug') + def test_find_alarms_by_query(self): + alarm_query = AlarmDataQuery(alarm_fields=[{'key': 'ALARM_FIELD'}], + entity_fields=[{'key': 'string', 'type': 'ALARM_FIELD'}], + entity_filter={}, key_filters=[ + KeyFilter(key={'key': 'string', 'type': 'ALARM_FIELD'}, value_type='BOOLEAN', predicate={})], + latest_values=[{'key': 'string', 'type': 'ALARM_FIELD'}], + page_link=AlarmDataPageLink(assignee_id=self.user.id, + dynamic=True, + search_propagated_alarms=True, + severity_list=[ + 'CRITICAL'])) + self.assertIsInstance(self.client.find_alarm_data_by_query(alarm_query), PageDataAlarmData) + + class EntityRelationControllerTests(TBClientCETests): test_relation = None test_asset = None @@ -524,5 +650,278 @@ def test_get_customer_users(self): self.assertIsInstance(self.client.get_customer_users(self.customer.id, 10, 0), PageDataUser) +class NotificationControllerTests(TBClientCETests): + notification = None + template = None + notification_target = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationControllerTests, cls).setUpClass() + + cls.notification_target = NotificationTarget(name='Test CE', + configuration=NotificationTargetConfig(type='PLATFORM_USERS', + description='test', + users_filter={ + 'type': 'ALL_USERS'})) + cls.notification_target = cls.client.save_notification_target(cls.notification_target) + + cls.template = cls.client.get_notification_templates(10, 0).data[0] + + cls.notification = NotificationRequest(additional_config=NotificationRequestConfig(sending_delay_in_sec=0), + targets=[cls.notification_target.id.id], template_id=cls.template.id, + status='PROCESSING') + cls.notification = cls.client.create_notification_request(cls.notification) + + def test_get_available_delivery_methods(self): + self.assertIsInstance(self.client.get_available_delivery_methods(), list) + + def test_get_notification_request_by_id(self): + self.assertIsInstance(self.client.get_notification_request_by_id(self.notification.id), NotificationRequestInfo) + + def test_get_notification_requests(self): + self.assertIsInstance(self.client.get_notification_requests(10, 0), PageDataNotificationRequestInfo) + + def test_get_notification_settings(self): + self.assertIsInstance(self.client.get_notification_settings(), NotificationSettings) + + def test_get_notifications(self): + self.assertIsInstance(self.client.get_notifications(10, 0), PageDataNotification) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification(cls.notification.id) + cls.client.delete_notification_target_by_id(cls.notification_target.id) + + +class NotificationTemplateControllerTests(TBClientCETests): + template = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationTemplateControllerTests, cls).setUpClass() + + cls.template = NotificationTemplate(name='Hello to all my users', configuration=NotificationTemplateConfig( + delivery_methods_templates={ + 'WEB': {'method': 'WEB', 'subject': 'Hello', 'body': 'Hello', 'enabled': True}}), + notification_type='GENERAL') + cls.template = cls.client.save_notification_template(cls.template) + + def test_get_notification_template_by_id(self): + self.assertIsInstance(self.client.get_notification_template_by_id(self.template.id), NotificationTemplate) + + def test_get_notification_templates(self): + self.assertIsInstance(self.client.get_notification_templates(10, 0), PageDataNotificationTemplate) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification_template_by_id(cls.template.id) + + +class NotificationTargetControllerTests(TBClientCETests): + notification_target = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationTargetControllerTests, cls).setUpClass() + + cls.notification_target = NotificationTarget(name='Test CE', + configuration=NotificationTargetConfig(type='PLATFORM_USERS', + description='test', + users_filter={ + 'type': 'ALL_USERS'})) + cls.notification_target = cls.client.save_notification_target(cls.notification_target) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification_target_by_id(cls.notification_target.id) + + def test_get_notification_target_by_id(self): + self.assertIsInstance(self.client.get_notification_target_by_id(self.notification_target.id), + NotificationTarget) + + def test_get_notification_targets_by_ids(self): + self.assertIsInstance(self.client.get_notification_targets_by_ids([self.notification_target.id.id]), list) + + def test_get_notification_targets_by_supported_notification_type(self): + self.assertIsInstance(self.client.get_notification_targets_by_supported_notification_type('ALARM', 10, 0), + PageDataNotificationTarget) + + def test_get_notification_targets(self): + self.assertIsInstance(self.client.get_notification_targets(10, 0), PageDataNotificationTarget) + + +class NotificationRuleControllerTests(TBClientCETests): + rule = None + template = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationRuleControllerTests, cls).setUpClass() + + cls.template = NotificationTemplate(name='Hello to all my users', configuration=NotificationTemplateConfig( + delivery_methods_templates={ + 'WEB': {'method': 'WEB', 'subject': 'Hello', 'body': 'Hello', 'enabled': True}}), + notification_type='GENERAL') + cls.template = cls.client.save_notification_template(cls.template) + + cls.rule = NotificationRule(name='Test', trigger_type='ALARM', + recipients_config={'triggerType': 'ALARM', 'escalationTable': {'0': []}}, + trigger_config=NotificationRuleTriggerConfig(trigger_type='ALARM', notify_on=['CREATED']), + template_id=cls.template.id) + cls.rule = cls.client.save_notification_rule(cls.rule) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification_rule(cls.rule.id) + cls.client.delete_notification_template_by_id(cls.template.id) + + def test_get_notification_rule_by_id(self): + self.assertIsInstance(self.client.get_notification_rule_by_id(self.rule.id), NotificationRuleInfo) + + def test_get_notification_rules(self): + self.assertIsInstance(self.client.get_notification_rules(10, 0), PageDataNotificationRuleInfo) + + +class TenantControllerTests(TBClientCETests): + tenant = None + tenant_profile_id = None + + @classmethod + def setUpClass(cls) -> None: + # ThingsBoard REST API URL + url = TB_URL_CE + + # Default Tenant Administrator credentials + username = TB_SYSADMIN_USERNAME_CE + password = TB_SYSADMIN_PASSWORD_CE + + with RestClientCE(url) as cls.client: + cls.client.login(username, password) + + cls.tenant_profile_id = cls.client.get_default_tenant_profile_info().id + cls.tenant = Tenant(tenant_profile_id=cls.tenant_profile_id, email='test@test.org', title='Test') + cls.tenant = cls.client.save_tenant(cls.tenant) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_tenant(cls.tenant.id) + + def test_get_tenant_by_id(self): + self.assertIsInstance(self.client.get_tenant_by_id(self.tenant.id), Tenant) + + def test_get_tenant_info_by_id(self): + self.assertIsInstance(self.client.get_tenant_info_by_id(self.tenant.id), TenantInfo) + + def test_get_tenants(self): + self.assertIsInstance(self.client.get_tenants(10, 0), PageDataTenant) + + +class TenantProfileControllerTests(TBClientCETests): + tenant_profile = None + + @classmethod + def setUpClass(cls) -> None: + # ThingsBoard REST API URL + url = TB_URL_CE + + # Default Tenant Administrator credentials + username = TB_SYSADMIN_USERNAME_CE + password = TB_SYSADMIN_PASSWORD_CE + + with RestClientCE(url) as cls.client: + cls.client.login(username, password) + + cls.tenant_profile = TenantProfile(default=False, isolated_tb_rule_engine=False, name='Test') + cls.tenant_profile = cls.client.save_tenant_profile(cls.tenant_profile) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_tenant_profile(cls.tenant_profile.id) + + def test_get_tenant_profile_by_id(self): + self.assertIsInstance(self.client.get_tenant_profile_by_id(self.tenant_profile.id), TenantProfile) + + def test_get_tenant_profile_info_by_id(self): + self.assertIsInstance(self.client.get_tenant_profile_info_by_id(self.tenant_profile.id), EntityInfo) + + def test_get_default_tenant_profile_info(self): + self.assertIsInstance(self.client.get_default_tenant_profile_info(), EntityInfo) + + def test_get_tenant_profile_infos(self): + self.assertIsInstance(self.client.get_tenant_profile_infos(10, 0), PageDataEntityInfo) + + def test_get_tenant_profiles_by_ids(self): + self.assertIsInstance(self.client.get_tenant_profiles_by_ids([self.tenant_profile.id.id]), list) + + def test_get_tenant_profiles(self): + self.assertIsInstance(self.client.get_tenant_profiles(10, 0), PageDataTenantProfile) + + +class UiSettingsControllerTests(TBClientCETests): + def test_get_help_base_url(self): + self.assertIsInstance(self.client.get_help_base_url(), str) + + +class UsageInfoControllerTests(TBClientCETests): + def test_get_tenant_usage_info(self): + self.assertIsInstance(self.client.get_tenant_usage_info(), UsageInfo) + + +class WidgetBundleControllerTests(TBClientCETests): + widget_bundle = None + + @classmethod + def setUpClass(cls) -> None: + super(WidgetBundleControllerTests, cls).setUpClass() + + cls.widget_bundle = WidgetsBundle(name='Test', alias='test', title='Test') + cls.widget_bundle = cls.client.save_widgets_bundle(cls.widget_bundle) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_widgets_bundle(cls.widget_bundle.id) + + def test_get_widgets_bundle_by_id(self): + self.assertIsInstance(self.client.get_widgets_bundle_by_id(self.widget_bundle.id), WidgetsBundle) + + def test_get_all_widgets_bundles(self): + self.assertIsInstance(self.client.get_widgets_bundles(), list) + + def test_get_widget_bundles(self): + self.assertIsInstance(self.client.get_widgets_bundles_v1(10, 0), PageDataWidgetsBundle) + + +class WidgetTypeControllerTests(TBClientCETests): + widget_bundle = None + widget_type = None + + @classmethod + def setUpClass(cls) -> None: + super(WidgetTypeControllerTests, cls).setUpClass() + + cls.widget_bundle = WidgetsBundle(name='Test', alias='test', title='Test') + cls.widget_bundle = cls.client.save_widgets_bundle(cls.widget_bundle) + + cls.widget_type = WidgetType(descriptor={'controllerScript': '', 'dataKeySettingsSchema': {}, 'defaultConfig': {}}, name='Test', alias='test', bundle_alias='test') + cls.widget_type = cls.client.save_widget_type(cls.widget_type) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_widget_type(cls.widget_type.id) + + def test_get_widget_type_by_id(self): + self.assertIsInstance(self.client.get_widget_type_by_id(self.widget_type.id), WidgetTypeDetails) + + def test_get_widget_type(self): + self.assertIsInstance(self.client.get_widget_type(False, 'test', 'test'), WidgetType) + + def test_get_bundle_widget_types(self): + self.assertIsInstance(self.client.get_bundle_widget_types(False, 'test'), list) + + def test_get_bundle_widget_types_infos(self): + self.assertIsInstance(self.client.get_bundle_widget_types_infos(False, 'test'), list) + + if __name__ == '__main__': unittest.main() diff --git a/test/tests_pe.py b/test/tests_pe.py index fa81d091..85f4cdaa 100644 --- a/test/tests_pe.py +++ b/test/tests_pe.py @@ -11,16 +11,49 @@ class TBClientPETests(unittest.TestCase): @classmethod def setUpClass(cls) -> None: # ThingsBoard REST API URL - url = "https://thingsboard.cloud" + url = "https://127.0.0.1:8080" # Default Tenant Administrator credentials - username = "***" - password = "***" + username = "tenant@thingsboard.org" + password = "tenant" with RestClientPE(url) as cls.client: cls.client.login(username, password) +class AlarmCommentControllerTests(TBClientPETests): + alarm = None + alarm_comment = None + device_profile_id = None + device = None + + @classmethod + def setUpClass(cls) -> None: + super(AlarmCommentControllerTests, cls).setUpClass() + + cls.device_profile_id = cls.client.get_default_device_profile_info().id + + cls.device = Device(name='Test', label='Test', device_profile_id=cls.device_profile_id) + cls.device = cls.client.save_device(body=cls.device) + + cls.test_alarm = cls.client.save_alarm(Alarm(name='Test', type='default', + originator=cls.device.id, + severity='CRITICAL', status='CLEARED_UNACK', acknowledged=False, + cleared=False)) + cls.alarm = cls.client.get_all_alarms(10, 0).data[0] + cls.alarm_comment = cls.client.save_alarm_comment(cls.alarm.id, + AlarmComment(name='Test Comment', comment='Test comment')) + + def test_get_alarm_comments(self): + self.assertIsInstance(self.client.get_alarm_comments(self.alarm.id, 10, 0), PageDataAlarmCommentInfo) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_alarm_comment(cls.alarm.id, cls.alarm_comment.id) + cls.client.delete_alarm(cls.alarm.id) + cls.client.delete_device(cls.device.id) + + class TelemetryControllerTests(TBClientPETests): device = None device_profile_id = None @@ -247,6 +280,62 @@ def test_get_asset_by_id(self): self.assertIsInstance(self.client.get_asset_by_id(self.test_asset.id), Asset) +class AssetProfileControllerTests(TBClientPETests): + asset_profile = None + + @classmethod + def setUpClass(cls) -> None: + super(AssetProfileControllerTests, cls).setUpClass() + + cls.asset_profile = AssetProfile(name='Test Asset', default=False) + cls.asset_profile = cls.client.save_asset_profile(cls.asset_profile) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_asset_profile(cls.asset_profile.id) + + def test_get_asset_profile_by_id(self): + self.assertIsInstance(self.client.get_asset_profile_by_id(self.asset_profile.id), AssetProfile) + + def test_get_asset_profile_info_by_id(self): + self.assertIsInstance(self.client.get_asset_profile_info_by_id(self.asset_profile.id), AssetProfileInfo) + + def test_get_default_asset_profile_info(self): + self.assertIsInstance(self.client.get_default_asset_profile_info(), AssetProfileInfo) + + def test_get_asset_profile_infos(self): + self.assertIsInstance(self.client.get_asset_profile_infos(10, 0), PageDataAssetProfileInfo) + + def test_get_asset_profiles(self): + self.assertIsInstance(self.client.get_asset_profiles(10, 0), PageDataAssetProfile) + + +class AuditLogControllerTests(TBClientPETests): + customer = None + device = None + user = None + + @classmethod + def setUpClass(cls) -> None: + super(AuditLogControllerTests, cls).setUpClass() + + cls.customer = cls.client.get_customers(10, 0).data[0] + cls.user = cls.client.get_user() + + def test_get_audit_logs(self): + self.assertIsInstance(self.client.get_audit_logs(10, 0), PageDataAuditLog) + + def test_get_audit_logs_by_customer_id(self): + self.assertIsInstance(self.client.get_audit_logs_by_customer_id(self.customer.id, 10, 0), PageDataAuditLog) + + def test_get_audit_logs_by_entity_id(self): + self.assertIsInstance(self.client.get_audit_logs_by_entity_id(EntityId(self.customer.id, 'CUSTOMER'), 10, 0), + PageDataAuditLog) + + def test_get_audit_logs_by_user_id(self): + self.assertIsInstance(self.client.get_audit_logs_by_user_id(self.user.id, 10, 0), PageDataAuditLog) + + class EntityGroupControllerTests(TBClientPETests): test_entity_group = None test_asset = None @@ -486,6 +575,46 @@ def test_test_down_link_converter(self): }), dict) +class IntegrationControllerTests(TBClientPETests): + test_converter = None + integration = None + + @classmethod + def setUpClass(cls) -> None: + super(IntegrationControllerTests, cls).setUpClass() + + cls.test_converter = Converter(name='Test PE', type='UPLINK', configuration={ + "decoder": "// Decode an uplink message from a buffer\n// payload - array of bytes\n// metadata - key/value object\n\n/** Decoder **/\n\n// decode payload to string\nvar payloadStr = decodeToString(payload);\n\n// decode payload to JSON\n// var data = decodeToJson(payload);\n\nvar deviceName = 'Device A';\nvar deviceType = 'thermostat';\nvar customerName = 'customer';\nvar groupName = 'thermostat devices';\n// use assetName and assetType instead of deviceName and deviceType\n// to automatically create assets instead of devices.\n// var assetName = 'Asset A';\n// var assetType = 'building';\n\n// Result object with device/asset attributes/telemetry data\nvar result = {\n// Use deviceName and deviceType or assetName and assetType, but not both.\n deviceName: deviceName,\n deviceType: deviceType,\n// assetName: assetName,\n// assetType: assetType,\n customerName: customerName,\n groupName: groupName,\n attributes: {\n model: 'Model A',\n serialNumber: 'SN111',\n integrationName: metadata['integrationName']\n },\n telemetry: {\n temperature: 42,\n humidity: 80,\n rawData: payloadStr\n }\n};\n\n/** Helper functions **/\n\nfunction decodeToString(payload) {\n return String.fromCharCode.apply(String, payload);\n}\n\nfunction decodeToJson(payload) {\n // covert payload to string.\n var str = decodeToString(payload);\n\n // parse string to JSON\n var data = JSON.parse(str);\n return data;\n}\n\nreturn result;", + "encoder": None + }) + cls.test_converter = cls.client.save_converter(cls.test_converter) + cls.integration = Integration(name='HTTP Test', type='HTTP', enabled=True, debug_mode=True, + allow_create_devices_or_assets=True, default_converter_id=cls.test_converter.id, + secret='6uy2p5s0aspoqb6glhva', routing_key='ea150eb3-df46-1321-826c-9d924ed5d88a', + configuration={'baseUrl': 'https://thingsboard.cloud', 'enableSecurity': False}) + cls.integration = cls.client.save_integration(cls.integration) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_integration(cls.integration.id) + cls.client.delete_converter(cls.test_converter.id) + + def test_get_integration_by_id(self): + self.assertIsInstance(self.client.get_integration_by_id(self.integration.id), Integration) + + def test_get_integration_by_routing_key(self): + self.assertIsInstance(self.client.get_integration_by_routing_key(self.integration.routing_key), Integration) + + def test_get_integration_infos(self): + self.assertIsInstance(self.client.get_integration_infos(10, 0, False), PageDataIntegrationInfo) + + def test_get_integrations_by_ids(self): + self.assertIsInstance(self.client.get_integrations_by_ids([self.integration.id.id]), list) + + def test_get_integrations(self): + self.assertIsInstance(self.client.get_integrations(10, 0, False), PageDataIntegration) + + class AlarmControllerTests(TBClientPETests): test_alarm = None device = None @@ -726,5 +855,203 @@ def test_get_allowed_permissions(self): self.assertIsInstance(self.client.get_allowed_permissions(), AllowedPermissionsInfo) +class UiSettingsControllerTests(TBClientPETests): + def test_get_help_base_url(self): + self.assertIsInstance(self.client.get_help_base_url(), str) + + +class UsageInfoControllerTests(TBClientPETests): + def test_get_tenant_usage_info(self): + self.assertIsInstance(self.client.get_tenant_usage_info(), UsageInfo) + + +class WidgetBundleControllerTests(TBClientPETests): + widget_bundle = None + + @classmethod + def setUpClass(cls) -> None: + super(WidgetBundleControllerTests, cls).setUpClass() + + cls.widget_bundle = WidgetsBundle(name='Test', alias='test', title='Test') + cls.widget_bundle = cls.client.save_widgets_bundle(cls.widget_bundle) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_widgets_bundle(cls.widget_bundle.id) + + def test_get_widgets_bundle_by_id(self): + self.assertIsInstance(self.client.get_widgets_bundle_by_id(self.widget_bundle.id), WidgetsBundle) + + def test_get_all_widgets_bundles(self): + self.assertIsInstance(self.client.get_widgets_bundles(), list) + + def test_get_widget_bundles(self): + self.assertIsInstance(self.client.get_widgets_bundles_v1(10, 0), PageDataWidgetsBundle) + + +class WidgetTypeControllerTests(TBClientPETests): + widget_bundle = None + widget_type = None + + @classmethod + def setUpClass(cls) -> None: + super(WidgetTypeControllerTests, cls).setUpClass() + + cls.widget_bundle = WidgetsBundle(name='Test', alias='test', title='Test') + cls.widget_bundle = cls.client.save_widgets_bundle(cls.widget_bundle) + + cls.widget_type = WidgetType(descriptor={'controllerScript': '', 'dataKeySettingsSchema': {}, 'defaultConfig': {}}, name='Test', alias='test', bundle_alias='test') + cls.widget_type = cls.client.save_widget_type(cls.widget_type) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_widget_type(cls.widget_type.id) + + def test_get_widget_type_by_id(self): + self.assertIsInstance(self.client.get_widget_type_by_id(self.widget_type.id), WidgetTypeDetails) + + def test_get_widget_type(self): + self.assertIsInstance(self.client.get_widget_type(False, 'test', 'test'), WidgetType) + + def test_get_bundle_widget_types(self): + self.assertIsInstance(self.client.get_bundle_widget_types(False, 'test'), list) + + def test_get_bundle_widget_types_infos(self): + self.assertIsInstance(self.client.get_bundle_widget_types_infos(False, 'test'), list) + + +class NotificationControllerTests(TBClientPETests): + notification = None + template = None + notification_target = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationControllerTests, cls).setUpClass() + + cls.notification_target = NotificationTarget(name='Test CE', + configuration=NotificationTargetConfig(type='PLATFORM_USERS', + description='test', + users_filter={ + 'type': 'ALL_USERS'})) + cls.notification_target = cls.client.save_notification_target(cls.notification_target) + + cls.template = cls.client.get_notification_templates(10, 0).data[0] + + cls.notification = NotificationRequest(additional_config=NotificationRequestConfig(sending_delay_in_sec=0), + targets=[cls.notification_target.id.id], template_id=cls.template.id, + status='PROCESSING') + cls.notification = cls.client.create_notification_request(cls.notification) + + def test_get_available_delivery_methods(self): + self.assertIsInstance(self.client.get_available_delivery_methods(), list) + + def test_get_notification_request_by_id(self): + self.assertIsInstance(self.client.get_notification_request_by_id(self.notification.id), NotificationRequestInfo) + + def test_get_notification_requests(self): + self.assertIsInstance(self.client.get_notification_requests(10, 0), PageDataNotificationRequestInfo) + + def test_get_notification_settings(self): + self.assertIsInstance(self.client.get_notification_settings(), NotificationSettings) + + def test_get_notifications(self): + self.assertIsInstance(self.client.get_notifications(10, 0), PageDataNotification) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification(cls.notification.id) + cls.client.delete_notification_target_by_id(cls.notification_target.id) + + +class NotificationTemplateControllerTests(TBClientPETests): + template = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationTemplateControllerTests, cls).setUpClass() + + cls.template = NotificationTemplate(name='Hello to all my users', configuration=NotificationTemplateConfig( + delivery_methods_templates={ + 'WEB': {'method': 'WEB', 'subject': 'Hello', 'body': 'Hello', 'enabled': True}}), + notification_type='GENERAL') + cls.template = cls.client.save_notification_template(cls.template) + + def test_get_notification_template_by_id(self): + self.assertIsInstance(self.client.get_notification_template_by_id(self.template.id), NotificationTemplate) + + def test_get_notification_templates(self): + self.assertIsInstance(self.client.get_notification_templates(10, 0), PageDataNotificationTemplate) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification_template_by_id(cls.template.id) + + +class NotificationTargetControllerTests(TBClientPETests): + notification_target = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationTargetControllerTests, cls).setUpClass() + + cls.notification_target = NotificationTarget(name='Test CE', + configuration=NotificationTargetConfig(type='PLATFORM_USERS', + description='test', + users_filter={ + 'type': 'ALL_USERS'})) + cls.notification_target = cls.client.save_notification_target(cls.notification_target) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification_target_by_id(cls.notification_target.id) + + def test_get_notification_target_by_id(self): + self.assertIsInstance(self.client.get_notification_target_by_id(self.notification_target.id), + NotificationTarget) + + def test_get_notification_targets_by_ids(self): + self.assertIsInstance(self.client.get_notification_targets_by_ids([self.notification_target.id.id]), list) + + def test_get_notification_targets_by_supported_notification_type(self): + self.assertIsInstance(self.client.get_notification_targets_by_supported_notification_type('ALARM', 10, 0), + PageDataNotificationTarget) + + def test_get_notification_targets(self): + self.assertIsInstance(self.client.get_notification_targets(10, 0), PageDataNotificationTarget) + + +class NotificationRuleControllerTests(TBClientPETests): + rule = None + template = None + + @classmethod + def setUpClass(cls) -> None: + super(NotificationRuleControllerTests, cls).setUpClass() + + cls.template = NotificationTemplate(name='Hello to all my users', configuration=NotificationTemplateConfig( + delivery_methods_templates={ + 'WEB': {'method': 'WEB', 'subject': 'Hello', 'body': 'Hello', 'enabled': True}}), + notification_type='GENERAL') + cls.template = cls.client.save_notification_template(cls.template) + + cls.rule = NotificationRule(name='Test', trigger_type='ALARM', + recipients_config={'triggerType': 'ALARM', 'escalationTable': {'0': []}}, + trigger_config=NotificationRuleTriggerConfig(trigger_type='ALARM', notify_on=['CREATED']), + template_id=cls.template.id) + cls.rule = cls.client.save_notification_rule(cls.rule) + + @classmethod + def tearDownClass(cls) -> None: + cls.client.delete_notification_rule(cls.rule.id) + cls.client.delete_notification_template_by_id(cls.template.id) + + def test_get_notification_rule_by_id(self): + self.assertIsInstance(self.client.get_notification_rule_by_id(self.rule.id), NotificationRuleInfo) + + def test_get_notification_rules(self): + self.assertIsInstance(self.client.get_notification_rules(10, 0), PageDataNotificationRuleInfo) + + if __name__ == '__main__': unittest.main()