diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e0c291e..8c1fb8f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 1.2.0 [unreleased] +### API +1. [#42](https://github.com/influxdata/influxdb-client-python/pull/42): Updated swagger to latest version + ## 1.1.0 [2019-11-19] ### Features diff --git a/influxdb_client/__init__.py b/influxdb_client/__init__.py index 857eca0c..841738e3 100644 --- a/influxdb_client/__init__.py +++ b/influxdb_client/__init__.py @@ -21,6 +21,7 @@ from influxdb_client.service.checks_service import ChecksService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService +from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService @@ -78,6 +79,7 @@ from influxdb_client.domain.check_base import CheckBase from influxdb_client.domain.check_base_links import CheckBaseLinks from influxdb_client.domain.check_base_tags import CheckBaseTags +from influxdb_client.domain.check_discriminator import CheckDiscriminator from influxdb_client.domain.check_patch import CheckPatch from influxdb_client.domain.check_status_level import CheckStatusLevel from influxdb_client.domain.check_view_properties import CheckViewProperties @@ -152,12 +154,14 @@ from influxdb_client.domain.notification_endpoint import NotificationEndpoint from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase from influxdb_client.domain.notification_endpoint_base_links import NotificationEndpointBaseLinks +from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator from influxdb_client.domain.notification_endpoint_type import NotificationEndpointType from influxdb_client.domain.notification_endpoint_update import NotificationEndpointUpdate from influxdb_client.domain.notification_endpoints import NotificationEndpoints from influxdb_client.domain.notification_rule import NotificationRule from influxdb_client.domain.notification_rule_base import NotificationRuleBase from influxdb_client.domain.notification_rule_base_links import NotificationRuleBaseLinks +from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator from influxdb_client.domain.notification_rule_update import NotificationRuleUpdate from influxdb_client.domain.notification_rules import NotificationRules from influxdb_client.domain.object_expression import ObjectExpression @@ -181,6 +185,28 @@ from influxdb_client.domain.permission_resource import PermissionResource from influxdb_client.domain.pipe_expression import PipeExpression from influxdb_client.domain.pipe_literal import PipeLiteral +from influxdb_client.domain.pkg import Pkg +from influxdb_client.domain.pkg_apply import PkgApply +from influxdb_client.domain.pkg_chart import PkgChart +from influxdb_client.domain.pkg_create import PkgCreate +from influxdb_client.domain.pkg_create_resources import PkgCreateResources +from influxdb_client.domain.pkg_meta import PkgMeta +from influxdb_client.domain.pkg_spec import PkgSpec +from influxdb_client.domain.pkg_summary import PkgSummary +from influxdb_client.domain.pkg_summary_diff import PkgSummaryDiff +from influxdb_client.domain.pkg_summary_diff_buckets import PkgSummaryDiffBuckets +from influxdb_client.domain.pkg_summary_diff_dashboards import PkgSummaryDiffDashboards +from influxdb_client.domain.pkg_summary_diff_label_mappings import PkgSummaryDiffLabelMappings +from influxdb_client.domain.pkg_summary_diff_labels import PkgSummaryDiffLabels +from influxdb_client.domain.pkg_summary_diff_variables import PkgSummaryDiffVariables +from influxdb_client.domain.pkg_summary_errors import PkgSummaryErrors +from influxdb_client.domain.pkg_summary_summary import PkgSummarySummary +from influxdb_client.domain.pkg_summary_summary_dashboards import PkgSummarySummaryDashboards +from influxdb_client.domain.pkg_summary_summary_label_mappings import PkgSummarySummaryLabelMappings +from influxdb_client.domain.post_bucket_request import PostBucketRequest +from influxdb_client.domain.post_check import PostCheck +from influxdb_client.domain.post_notification_endpoint import PostNotificationEndpoint +from influxdb_client.domain.post_notification_rule import PostNotificationRule from influxdb_client.domain.property_key import PropertyKey from influxdb_client.domain.query import Query from influxdb_client.domain.query_edit_mode import QueryEditMode @@ -282,6 +308,7 @@ from influxdb_client.domain.variable import Variable from influxdb_client.domain.variable_assignment import VariableAssignment from influxdb_client.domain.variable_links import VariableLinks +from influxdb_client.domain.variable_properties import VariableProperties from influxdb_client.domain.variables import Variables from influxdb_client.domain.view import View from influxdb_client.domain.view_links import ViewLinks diff --git a/influxdb_client/client/__init__.py b/influxdb_client/client/__init__.py index e198c658..02b84404 100644 --- a/influxdb_client/client/__init__.py +++ b/influxdb_client/client/__init__.py @@ -9,6 +9,7 @@ from influxdb_client.service.checks_service import ChecksService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService +from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService diff --git a/influxdb_client/client/bucket_api.py b/influxdb_client/client/bucket_api.py index 4d20bce0..966711a5 100644 --- a/influxdb_client/client/bucket_api.py +++ b/influxdb_client/client/bucket_api.py @@ -1,4 +1,4 @@ -from influxdb_client import BucketsService, Bucket +from influxdb_client import BucketsService, Bucket, PostBucketRequest class BucketsApi(object): @@ -34,13 +34,13 @@ def create_bucket(self, bucket=None, bucket_name=None, org_id=None, retention_ru if bucket is None: - bucket = Bucket(name=bucket_name, retention_rules=rules, description=description) + bucket = PostBucketRequest(name=bucket_name, retention_rules=rules, description=description) if org_id is None: org_id = self._influxdb_client.org bucket.org_id = org_id - return self._buckets_service.post_buckets(bucket=bucket) + return self._buckets_service.post_buckets(post_bucket_request=bucket) def delete_bucket(self, bucket): """Delete a bucket # noqa: E501 diff --git a/influxdb_client/client/write/__init__.py b/influxdb_client/client/write/__init__.py index e198c658..02b84404 100644 --- a/influxdb_client/client/write/__init__.py +++ b/influxdb_client/client/write/__init__.py @@ -9,6 +9,7 @@ from influxdb_client.service.checks_service import ChecksService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService +from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService diff --git a/influxdb_client/domain/__init__.py b/influxdb_client/domain/__init__.py index c78a591c..5515fe69 100644 --- a/influxdb_client/domain/__init__.py +++ b/influxdb_client/domain/__init__.py @@ -46,6 +46,7 @@ from influxdb_client.domain.check_base import CheckBase from influxdb_client.domain.check_base_links import CheckBaseLinks from influxdb_client.domain.check_base_tags import CheckBaseTags +from influxdb_client.domain.check_discriminator import CheckDiscriminator from influxdb_client.domain.check_patch import CheckPatch from influxdb_client.domain.check_status_level import CheckStatusLevel from influxdb_client.domain.check_view_properties import CheckViewProperties @@ -120,12 +121,14 @@ from influxdb_client.domain.notification_endpoint import NotificationEndpoint from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase from influxdb_client.domain.notification_endpoint_base_links import NotificationEndpointBaseLinks +from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator from influxdb_client.domain.notification_endpoint_type import NotificationEndpointType from influxdb_client.domain.notification_endpoint_update import NotificationEndpointUpdate from influxdb_client.domain.notification_endpoints import NotificationEndpoints from influxdb_client.domain.notification_rule import NotificationRule from influxdb_client.domain.notification_rule_base import NotificationRuleBase from influxdb_client.domain.notification_rule_base_links import NotificationRuleBaseLinks +from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator from influxdb_client.domain.notification_rule_update import NotificationRuleUpdate from influxdb_client.domain.notification_rules import NotificationRules from influxdb_client.domain.object_expression import ObjectExpression @@ -149,6 +152,28 @@ from influxdb_client.domain.permission_resource import PermissionResource from influxdb_client.domain.pipe_expression import PipeExpression from influxdb_client.domain.pipe_literal import PipeLiteral +from influxdb_client.domain.pkg import Pkg +from influxdb_client.domain.pkg_apply import PkgApply +from influxdb_client.domain.pkg_chart import PkgChart +from influxdb_client.domain.pkg_create import PkgCreate +from influxdb_client.domain.pkg_create_resources import PkgCreateResources +from influxdb_client.domain.pkg_meta import PkgMeta +from influxdb_client.domain.pkg_spec import PkgSpec +from influxdb_client.domain.pkg_summary import PkgSummary +from influxdb_client.domain.pkg_summary_diff import PkgSummaryDiff +from influxdb_client.domain.pkg_summary_diff_buckets import PkgSummaryDiffBuckets +from influxdb_client.domain.pkg_summary_diff_dashboards import PkgSummaryDiffDashboards +from influxdb_client.domain.pkg_summary_diff_label_mappings import PkgSummaryDiffLabelMappings +from influxdb_client.domain.pkg_summary_diff_labels import PkgSummaryDiffLabels +from influxdb_client.domain.pkg_summary_diff_variables import PkgSummaryDiffVariables +from influxdb_client.domain.pkg_summary_errors import PkgSummaryErrors +from influxdb_client.domain.pkg_summary_summary import PkgSummarySummary +from influxdb_client.domain.pkg_summary_summary_dashboards import PkgSummarySummaryDashboards +from influxdb_client.domain.pkg_summary_summary_label_mappings import PkgSummarySummaryLabelMappings +from influxdb_client.domain.post_bucket_request import PostBucketRequest +from influxdb_client.domain.post_check import PostCheck +from influxdb_client.domain.post_notification_endpoint import PostNotificationEndpoint +from influxdb_client.domain.post_notification_rule import PostNotificationRule from influxdb_client.domain.property_key import PropertyKey from influxdb_client.domain.query import Query from influxdb_client.domain.query_edit_mode import QueryEditMode @@ -250,6 +275,7 @@ from influxdb_client.domain.variable import Variable from influxdb_client.domain.variable_assignment import VariableAssignment from influxdb_client.domain.variable_links import VariableLinks +from influxdb_client.domain.variable_properties import VariableProperties from influxdb_client.domain.variables import Variables from influxdb_client.domain.view import View from influxdb_client.domain.view_links import ViewLinks diff --git a/influxdb_client/domain/authorization.py b/influxdb_client/domain/authorization.py index b1c98e40..de30414f 100644 --- a/influxdb_client/domain/authorization.py +++ b/influxdb_client/domain/authorization.py @@ -32,6 +32,8 @@ class Authorization(AuthorizationUpdateRequest): and the value is json key in definition. """ openapi_types = { + 'created_at': 'datetime', + 'updated_at': 'datetime', 'org_id': 'str', 'permissions': 'list[Permission]', 'id': 'str', @@ -45,6 +47,8 @@ class Authorization(AuthorizationUpdateRequest): } attribute_map = { + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', 'org_id': 'orgID', 'permissions': 'permissions', 'id': 'id', @@ -57,10 +61,12 @@ class Authorization(AuthorizationUpdateRequest): 'description': 'description' } - def __init__(self, org_id=None, permissions=None, id=None, token=None, user_id=None, user=None, org=None, links=None, status='active', description=None): # noqa: E501 + def __init__(self, created_at=None, updated_at=None, org_id=None, permissions=None, id=None, token=None, user_id=None, user=None, org=None, links=None, status='active', description=None): # noqa: E501 """Authorization - a model defined in OpenAPI""" # noqa: E501 AuthorizationUpdateRequest.__init__(self, status=status, description=description) + self._created_at = None + self._updated_at = None self._org_id = None self._permissions = None self._id = None @@ -71,6 +77,10 @@ def __init__(self, org_id=None, permissions=None, id=None, token=None, user_id=N self._links = None self.discriminator = None + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at if org_id is not None: self.org_id = org_id if permissions is not None: @@ -88,6 +98,48 @@ def __init__(self, org_id=None, permissions=None, id=None, token=None, user_id=N if links is not None: self.links = links + @property + def created_at(self): + """Gets the created_at of this Authorization. # noqa: E501 + + + :return: The created_at of this Authorization. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Authorization. + + + :param created_at: The created_at of this Authorization. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this Authorization. # noqa: E501 + + + :return: The updated_at of this Authorization. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Authorization. + + + :param updated_at: The updated_at of this Authorization. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + @property def org_id(self): """Gets the org_id of this Authorization. # noqa: E501 diff --git a/influxdb_client/domain/check.py b/influxdb_client/domain/check.py index 69559ec9..e226d7a1 100644 --- a/influxdb_client/domain/check.py +++ b/influxdb_client/domain/check.py @@ -67,20 +67,10 @@ class Check(CheckBase): 'links': 'links' } - discriminator_value_class_map = { - - } - def __init__(self, id=None, name=None, org_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, every=None, offset=None, tags=None, description=None, status_message_template=None, labels=None, links=None): # noqa: E501 """Check - a model defined in OpenAPI""" # noqa: E501 CheckBase.__init__(self, id=id, name=name, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, every=every, offset=offset, tags=tags, description=description, status_message_template=status_message_template, labels=labels, links=links) - self.discriminator = 'type' - - def get_real_child_model(self, data): - """Returns the real base class specified by the discriminator""" - discriminator_key = self.attribute_map[self.discriminator] - discriminator_value = data[discriminator_key] - return self.discriminator_value_class_map.get(discriminator_value) + self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" diff --git a/influxdb_client/domain/check_base.py b/influxdb_client/domain/check_base.py index fb9f86d5..031f90e5 100644 --- a/influxdb_client/domain/check_base.py +++ b/influxdb_client/domain/check_base.py @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.check_discriminator import CheckDiscriminator -class CheckBase(object): +class CheckBase(CheckDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -68,6 +69,7 @@ class CheckBase(object): def __init__(self, id=None, name=None, org_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, every=None, offset=None, tags=None, description=None, status_message_template=None, labels=None, links=None): # noqa: E501 """CheckBase - a model defined in OpenAPI""" # noqa: E501 + CheckDiscriminator.__init__(self) self._id = None self._name = None diff --git a/influxdb_client/domain/check_discriminator.py b/influxdb_client/domain/check_discriminator.py new file mode 100644 index 00000000..6cc006e1 --- /dev/null +++ b/influxdb_client/domain/check_discriminator.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.post_check import PostCheck + + +class CheckDiscriminator(PostCheck): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + discriminator_value_class_map = { + 'CheckBase': 'CheckBase', + 'Check': 'Check', + 'ThresholdCheck': 'ThresholdCheck', + 'DeadmanCheck': 'DeadmanCheck' + } + + def __init__(self): # noqa: E501 + """CheckDiscriminator - a model defined in OpenAPI""" # noqa: E501 + PostCheck.__init__(self) + self.discriminator = 'type' + + def get_real_child_model(self, data): + """Returns the real base class specified by the discriminator""" + discriminator_key = self.attribute_map[self.discriminator] + discriminator_value = data[discriminator_key] + return self.discriminator_value_class_map.get(discriminator_value) + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, CheckDiscriminator): + 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/influxdb_client/domain/deadman_check.py b/influxdb_client/domain/deadman_check.py index eec971e5..9ad3c904 100644 --- a/influxdb_client/domain/deadman_check.py +++ b/influxdb_client/domain/deadman_check.py @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.check_base import CheckBase +from influxdb_client.domain.check import Check -class DeadmanCheck(CheckBase): +class DeadmanCheck(Check): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -36,22 +36,7 @@ class DeadmanCheck(CheckBase): 'time_since': 'str', 'stale_time': 'str', 'report_zero': 'bool', - 'level': 'CheckStatusLevel', - 'id': 'str', - 'name': 'str', - 'org_id': 'str', - 'owner_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'query': 'DashboardQuery', - 'status': 'TaskStatusType', - 'every': 'str', - 'offset': 'str', - 'tags': 'list[CheckBaseTags]', - 'description': 'str', - 'status_message_template': 'str', - 'labels': 'list[Label]', - 'links': 'CheckBaseLinks' + 'level': 'CheckStatusLevel' } attribute_map = { @@ -59,27 +44,12 @@ class DeadmanCheck(CheckBase): 'time_since': 'timeSince', 'stale_time': 'staleTime', 'report_zero': 'reportZero', - 'level': 'level', - 'id': 'id', - 'name': 'name', - 'org_id': 'orgID', - 'owner_id': 'ownerID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'query': 'query', - 'status': 'status', - 'every': 'every', - 'offset': 'offset', - 'tags': 'tags', - 'description': 'description', - 'status_message_template': 'statusMessageTemplate', - 'labels': 'labels', - 'links': 'links' + 'level': 'level' } - def __init__(self, type=None, time_since=None, stale_time=None, report_zero=None, level=None, id=None, name=None, org_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, every=None, offset=None, tags=None, description=None, status_message_template=None, labels=None, links=None): # noqa: E501 + def __init__(self, type=None, time_since=None, stale_time=None, report_zero=None, level=None): # noqa: E501 """DeadmanCheck - a model defined in OpenAPI""" # noqa: E501 - CheckBase.__init__(self, id=id, name=name, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, every=every, offset=offset, tags=tags, description=description, status_message_template=status_message_template, labels=labels, links=links) + Check.__init__(self) self._type = None self._time_since = None diff --git a/influxdb_client/domain/http_notification_endpoint.py b/influxdb_client/domain/http_notification_endpoint.py index adcb6ec7..bfd41f6d 100644 --- a/influxdb_client/domain/http_notification_endpoint.py +++ b/influxdb_client/domain/http_notification_endpoint.py @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase +from influxdb_client.domain.notification_endpoint import NotificationEndpoint -class HTTPNotificationEndpoint(NotificationEndpointBase): +class HTTPNotificationEndpoint(NotificationEndpoint): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -39,18 +39,7 @@ class HTTPNotificationEndpoint(NotificationEndpointBase): 'method': 'str', 'auth_method': 'str', 'content_template': 'str', - 'headers': 'dict(str, str)', - 'id': 'str', - 'org_id': 'str', - 'user_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'description': 'str', - 'name': 'str', - 'status': 'str', - 'labels': 'list[Label]', - 'links': 'NotificationEndpointBaseLinks', - 'type': 'NotificationEndpointType' + 'headers': 'dict(str, str)' } attribute_map = { @@ -61,23 +50,12 @@ class HTTPNotificationEndpoint(NotificationEndpointBase): 'method': 'method', 'auth_method': 'authMethod', 'content_template': 'contentTemplate', - 'headers': 'headers', - 'id': 'id', - 'org_id': 'orgID', - 'user_id': 'userID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'description': 'description', - 'name': 'name', - 'status': 'status', - 'labels': 'labels', - 'links': 'links', - 'type': 'type' + 'headers': 'headers' } - def __init__(self, url=None, username=None, password=None, token=None, method=None, auth_method=None, content_template=None, headers=None, id=None, org_id=None, user_id=None, created_at=None, updated_at=None, description=None, name=None, status='active', labels=None, links=None, type=None): # noqa: E501 + def __init__(self, url=None, username=None, password=None, token=None, method=None, auth_method=None, content_template=None, headers=None): # noqa: E501 """HTTPNotificationEndpoint - a model defined in OpenAPI""" # noqa: E501 - NotificationEndpointBase.__init__(self, id=id, org_id=org_id, user_id=user_id, created_at=created_at, updated_at=updated_at, description=description, name=name, status=status, labels=labels, links=links, type=type) + NotificationEndpoint.__init__(self) self._url = None self._username = None diff --git a/influxdb_client/domain/notification_endpoint.py b/influxdb_client/domain/notification_endpoint.py index 98fe55a1..731415c3 100644 --- a/influxdb_client/domain/notification_endpoint.py +++ b/influxdb_client/domain/notification_endpoint.py @@ -59,20 +59,10 @@ class NotificationEndpoint(NotificationEndpointBase): 'type': 'type' } - discriminator_value_class_map = { - - } - def __init__(self, id=None, org_id=None, user_id=None, created_at=None, updated_at=None, description=None, name=None, status='active', labels=None, links=None, type=None): # noqa: E501 """NotificationEndpoint - a model defined in OpenAPI""" # noqa: E501 NotificationEndpointBase.__init__(self, id=id, org_id=org_id, user_id=user_id, created_at=created_at, updated_at=updated_at, description=description, name=name, status=status, labels=labels, links=links, type=type) - self.discriminator = 'type' - - def get_real_child_model(self, data): - """Returns the real base class specified by the discriminator""" - discriminator_key = self.attribute_map[self.discriminator] - discriminator_value = data[discriminator_key] - return self.discriminator_value_class_map.get(discriminator_value) + self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" diff --git a/influxdb_client/domain/notification_endpoint_base.py b/influxdb_client/domain/notification_endpoint_base.py index 108fe291..8ddc46ff 100644 --- a/influxdb_client/domain/notification_endpoint_base.py +++ b/influxdb_client/domain/notification_endpoint_base.py @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator -class NotificationEndpointBase(object): +class NotificationEndpointBase(NotificationEndpointDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -60,6 +61,7 @@ class NotificationEndpointBase(object): def __init__(self, id=None, org_id=None, user_id=None, created_at=None, updated_at=None, description=None, name=None, status='active', labels=None, links=None, type=None): # noqa: E501 """NotificationEndpointBase - a model defined in OpenAPI""" # noqa: E501 + NotificationEndpointDiscriminator.__init__(self) self._id = None self._org_id = None diff --git a/influxdb_client/domain/notification_endpoint_discriminator.py b/influxdb_client/domain/notification_endpoint_discriminator.py new file mode 100644 index 00000000..ea96914d --- /dev/null +++ b/influxdb_client/domain/notification_endpoint_discriminator.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.post_notification_endpoint import PostNotificationEndpoint + + +class NotificationEndpointDiscriminator(PostNotificationEndpoint): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + discriminator_value_class_map = { + 'SlackNotificationEndpoint': 'SlackNotificationEndpoint', + 'PagerDutyNotificationEndpoint': 'PagerDutyNotificationEndpoint', + 'HTTPNotificationEndpoint': 'HTTPNotificationEndpoint', + 'NotificationEndpoint': 'NotificationEndpoint', + 'NotificationEndpointBase': 'NotificationEndpointBase' + } + + def __init__(self): # noqa: E501 + """NotificationEndpointDiscriminator - a model defined in OpenAPI""" # noqa: E501 + PostNotificationEndpoint.__init__(self) + self.discriminator = 'type' + + def get_real_child_model(self, data): + """Returns the real base class specified by the discriminator""" + discriminator_key = self.attribute_map[self.discriminator] + discriminator_value = data[discriminator_key] + return self.discriminator_value_class_map.get(discriminator_value) + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, NotificationEndpointDiscriminator): + 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/influxdb_client/domain/notification_rule.py b/influxdb_client/domain/notification_rule.py index 342562c8..0ecd2e14 100644 --- a/influxdb_client/domain/notification_rule.py +++ b/influxdb_client/domain/notification_rule.py @@ -75,20 +75,10 @@ class NotificationRule(NotificationRuleBase): 'links': 'links' } - discriminator_value_class_map = { - - } - def __init__(self, id=None, endpoint_id=None, org_id=None, owner_id=None, created_at=None, updated_at=None, status=None, name=None, sleep_until=None, every=None, offset=None, runbook_link=None, limit_every=None, limit=None, tag_rules=None, description=None, status_rules=None, labels=None, links=None): # noqa: E501 """NotificationRule - a model defined in OpenAPI""" # noqa: E501 NotificationRuleBase.__init__(self, id=id, endpoint_id=endpoint_id, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, status=status, name=name, sleep_until=sleep_until, every=every, offset=offset, runbook_link=runbook_link, limit_every=limit_every, limit=limit, tag_rules=tag_rules, description=description, status_rules=status_rules, labels=labels, links=links) - self.discriminator = 'type' - - def get_real_child_model(self, data): - """Returns the real base class specified by the discriminator""" - discriminator_key = self.attribute_map[self.discriminator] - discriminator_value = data[discriminator_key] - return self.discriminator_value_class_map.get(discriminator_value) + self.discriminator = None def to_dict(self): """Returns the model properties as a dict""" diff --git a/influxdb_client/domain/notification_rule_base.py b/influxdb_client/domain/notification_rule_base.py index 647df431..5f69094a 100644 --- a/influxdb_client/domain/notification_rule_base.py +++ b/influxdb_client/domain/notification_rule_base.py @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.post_notification_rule import PostNotificationRule -class NotificationRuleBase(object): +class NotificationRuleBase(PostNotificationRule): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -76,6 +77,7 @@ class NotificationRuleBase(object): def __init__(self, id=None, endpoint_id=None, org_id=None, owner_id=None, created_at=None, updated_at=None, status=None, name=None, sleep_until=None, every=None, offset=None, runbook_link=None, limit_every=None, limit=None, tag_rules=None, description=None, status_rules=None, labels=None, links=None): # noqa: E501 """NotificationRuleBase - a model defined in OpenAPI""" # noqa: E501 + PostNotificationRule.__init__(self) self._id = None self._endpoint_id = None diff --git a/influxdb_client/domain/notification_rule_discriminator.py b/influxdb_client/domain/notification_rule_discriminator.py new file mode 100644 index 00000000..745fefd6 --- /dev/null +++ b/influxdb_client/domain/notification_rule_discriminator.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class NotificationRuleDiscriminator(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + discriminator_value_class_map = { + 'NotificationRuleBase': 'NotificationRuleBase', + 'PostNotificationRule': 'PostNotificationRule', + 'NotificationRule': 'NotificationRule' + } + + def __init__(self): # noqa: E501 + """NotificationRuleDiscriminator - a model defined in OpenAPI""" # noqa: E501 + self.discriminator = 'type' + + def get_real_child_model(self, data): + """Returns the real base class specified by the discriminator""" + discriminator_key = self.attribute_map[self.discriminator] + discriminator_value = data[discriminator_key] + return self.discriminator_value_class_map.get(discriminator_value) + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, NotificationRuleDiscriminator): + 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/influxdb_client/domain/pager_duty_notification_endpoint.py b/influxdb_client/domain/pager_duty_notification_endpoint.py index 7f39974a..5d8583df 100644 --- a/influxdb_client/domain/pager_duty_notification_endpoint.py +++ b/influxdb_client/domain/pager_duty_notification_endpoint.py @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase +from influxdb_client.domain.notification_endpoint import NotificationEndpoint -class PagerDutyNotificationEndpoint(NotificationEndpointBase): +class PagerDutyNotificationEndpoint(NotificationEndpoint): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,39 +33,17 @@ class PagerDutyNotificationEndpoint(NotificationEndpointBase): """ openapi_types = { 'client_url': 'str', - 'routing_key': 'str', - 'id': 'str', - 'org_id': 'str', - 'user_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'description': 'str', - 'name': 'str', - 'status': 'str', - 'labels': 'list[Label]', - 'links': 'NotificationEndpointBaseLinks', - 'type': 'NotificationEndpointType' + 'routing_key': 'str' } attribute_map = { 'client_url': 'clientURL', - 'routing_key': 'routingKey', - 'id': 'id', - 'org_id': 'orgID', - 'user_id': 'userID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'description': 'description', - 'name': 'name', - 'status': 'status', - 'labels': 'labels', - 'links': 'links', - 'type': 'type' + 'routing_key': 'routingKey' } - def __init__(self, client_url=None, routing_key=None, id=None, org_id=None, user_id=None, created_at=None, updated_at=None, description=None, name=None, status='active', labels=None, links=None, type=None): # noqa: E501 + def __init__(self, client_url=None, routing_key=None): # noqa: E501 """PagerDutyNotificationEndpoint - a model defined in OpenAPI""" # noqa: E501 - NotificationEndpointBase.__init__(self, id=id, org_id=org_id, user_id=user_id, created_at=created_at, updated_at=updated_at, description=description, name=name, status=status, labels=labels, links=links, type=type) + NotificationEndpoint.__init__(self) self._client_url = None self._routing_key = None diff --git a/influxdb_client/domain/pkg.py b/influxdb_client/domain/pkg.py new file mode 100644 index 00000000..582b2d98 --- /dev/null +++ b/influxdb_client/domain/pkg.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Pkg(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'meta': 'PkgMeta', + 'spec': 'PkgSpec' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'meta': 'meta', + 'spec': 'spec' + } + + def __init__(self, api_version=None, kind=None, meta=None, spec=None): # noqa: E501 + """Pkg - a model defined in OpenAPI""" # noqa: E501 + + self._api_version = None + self._kind = None + self._meta = None + self._spec = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if meta is not None: + self.meta = meta + if spec is not None: + self.spec = spec + + @property + def api_version(self): + """Gets the api_version of this Pkg. # noqa: E501 + + + :return: The api_version of this Pkg. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this Pkg. + + + :param api_version: The api_version of this Pkg. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this Pkg. # noqa: E501 + + + :return: The kind of this Pkg. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this Pkg. + + + :param kind: The kind of this Pkg. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def meta(self): + """Gets the meta of this Pkg. # noqa: E501 + + + :return: The meta of this Pkg. # noqa: E501 + :rtype: PkgMeta + """ + return self._meta + + @meta.setter + def meta(self, meta): + """Sets the meta of this Pkg. + + + :param meta: The meta of this Pkg. # noqa: E501 + :type: PkgMeta + """ + + self._meta = meta + + @property + def spec(self): + """Gets the spec of this Pkg. # noqa: E501 + + + :return: The spec of this Pkg. # noqa: E501 + :rtype: PkgSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this Pkg. + + + :param spec: The spec of this Pkg. # noqa: E501 + :type: PkgSpec + """ + + self._spec = spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, Pkg): + 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/influxdb_client/domain/pkg_apply.py b/influxdb_client/domain/pkg_apply.py new file mode 100644 index 00000000..95db04d7 --- /dev/null +++ b/influxdb_client/domain/pkg_apply.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgApply(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'apply': 'bool', + 'package': 'Pkg' + } + + attribute_map = { + 'apply': 'apply', + 'package': 'package' + } + + def __init__(self, apply=None, package=None): # noqa: E501 + """PkgApply - a model defined in OpenAPI""" # noqa: E501 + + self._apply = None + self._package = None + self.discriminator = None + + if apply is not None: + self.apply = apply + if package is not None: + self.package = package + + @property + def apply(self): + """Gets the apply of this PkgApply. # noqa: E501 + + + :return: The apply of this PkgApply. # noqa: E501 + :rtype: bool + """ + return self._apply + + @apply.setter + def apply(self, apply): + """Sets the apply of this PkgApply. + + + :param apply: The apply of this PkgApply. # noqa: E501 + :type: bool + """ + + self._apply = apply + + @property + def package(self): + """Gets the package of this PkgApply. # noqa: E501 + + + :return: The package of this PkgApply. # noqa: E501 + :rtype: Pkg + """ + return self._package + + @package.setter + def package(self, package): + """Sets the package of this PkgApply. + + + :param package: The package of this PkgApply. # noqa: E501 + :type: Pkg + """ + + self._package = package + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgApply): + 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/influxdb_client/domain/pkg_chart.py b/influxdb_client/domain/pkg_chart.py new file mode 100644 index 00000000..fc42b3ff --- /dev/null +++ b/influxdb_client/domain/pkg_chart.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgChart(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'x_pos': 'int', + 'y_pos': 'int', + 'height': 'int', + 'width': 'int', + 'properties': 'ViewProperties' + } + + attribute_map = { + 'x_pos': 'xPos', + 'y_pos': 'yPos', + 'height': 'height', + 'width': 'width', + 'properties': 'properties' + } + + def __init__(self, x_pos=None, y_pos=None, height=None, width=None, properties=None): # noqa: E501 + """PkgChart - a model defined in OpenAPI""" # noqa: E501 + + self._x_pos = None + self._y_pos = None + self._height = None + self._width = None + self._properties = None + self.discriminator = None + + if x_pos is not None: + self.x_pos = x_pos + if y_pos is not None: + self.y_pos = y_pos + if height is not None: + self.height = height + if width is not None: + self.width = width + if properties is not None: + self.properties = properties + + @property + def x_pos(self): + """Gets the x_pos of this PkgChart. # noqa: E501 + + + :return: The x_pos of this PkgChart. # noqa: E501 + :rtype: int + """ + return self._x_pos + + @x_pos.setter + def x_pos(self, x_pos): + """Sets the x_pos of this PkgChart. + + + :param x_pos: The x_pos of this PkgChart. # noqa: E501 + :type: int + """ + + self._x_pos = x_pos + + @property + def y_pos(self): + """Gets the y_pos of this PkgChart. # noqa: E501 + + + :return: The y_pos of this PkgChart. # noqa: E501 + :rtype: int + """ + return self._y_pos + + @y_pos.setter + def y_pos(self, y_pos): + """Sets the y_pos of this PkgChart. + + + :param y_pos: The y_pos of this PkgChart. # noqa: E501 + :type: int + """ + + self._y_pos = y_pos + + @property + def height(self): + """Gets the height of this PkgChart. # noqa: E501 + + + :return: The height of this PkgChart. # noqa: E501 + :rtype: int + """ + return self._height + + @height.setter + def height(self, height): + """Sets the height of this PkgChart. + + + :param height: The height of this PkgChart. # noqa: E501 + :type: int + """ + + self._height = height + + @property + def width(self): + """Gets the width of this PkgChart. # noqa: E501 + + + :return: The width of this PkgChart. # noqa: E501 + :rtype: int + """ + return self._width + + @width.setter + def width(self, width): + """Sets the width of this PkgChart. + + + :param width: The width of this PkgChart. # noqa: E501 + :type: int + """ + + self._width = width + + @property + def properties(self): + """Gets the properties of this PkgChart. # noqa: E501 + + + :return: The properties of this PkgChart. # noqa: E501 + :rtype: ViewProperties + """ + return self._properties + + @properties.setter + def properties(self, properties): + """Sets the properties of this PkgChart. + + + :param properties: The properties of this PkgChart. # noqa: E501 + :type: ViewProperties + """ + + self._properties = properties + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgChart): + 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/influxdb_client/domain/pkg_create.py b/influxdb_client/domain/pkg_create.py new file mode 100644 index 00000000..1a0f2603 --- /dev/null +++ b/influxdb_client/domain/pkg_create.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgCreate(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pkg_name': 'str', + 'pkg_description': 'str', + 'pkg_version': 'str', + 'resources': 'PkgCreateResources' + } + + attribute_map = { + 'pkg_name': 'pkgName', + 'pkg_description': 'pkgDescription', + 'pkg_version': 'pkgVersion', + 'resources': 'resources' + } + + def __init__(self, pkg_name=None, pkg_description=None, pkg_version=None, resources=None): # noqa: E501 + """PkgCreate - a model defined in OpenAPI""" # noqa: E501 + + self._pkg_name = None + self._pkg_description = None + self._pkg_version = None + self._resources = None + self.discriminator = None + + if pkg_name is not None: + self.pkg_name = pkg_name + if pkg_description is not None: + self.pkg_description = pkg_description + if pkg_version is not None: + self.pkg_version = pkg_version + if resources is not None: + self.resources = resources + + @property + def pkg_name(self): + """Gets the pkg_name of this PkgCreate. # noqa: E501 + + + :return: The pkg_name of this PkgCreate. # noqa: E501 + :rtype: str + """ + return self._pkg_name + + @pkg_name.setter + def pkg_name(self, pkg_name): + """Sets the pkg_name of this PkgCreate. + + + :param pkg_name: The pkg_name of this PkgCreate. # noqa: E501 + :type: str + """ + + self._pkg_name = pkg_name + + @property + def pkg_description(self): + """Gets the pkg_description of this PkgCreate. # noqa: E501 + + + :return: The pkg_description of this PkgCreate. # noqa: E501 + :rtype: str + """ + return self._pkg_description + + @pkg_description.setter + def pkg_description(self, pkg_description): + """Sets the pkg_description of this PkgCreate. + + + :param pkg_description: The pkg_description of this PkgCreate. # noqa: E501 + :type: str + """ + + self._pkg_description = pkg_description + + @property + def pkg_version(self): + """Gets the pkg_version of this PkgCreate. # noqa: E501 + + + :return: The pkg_version of this PkgCreate. # noqa: E501 + :rtype: str + """ + return self._pkg_version + + @pkg_version.setter + def pkg_version(self, pkg_version): + """Sets the pkg_version of this PkgCreate. + + + :param pkg_version: The pkg_version of this PkgCreate. # noqa: E501 + :type: str + """ + + self._pkg_version = pkg_version + + @property + def resources(self): + """Gets the resources of this PkgCreate. # noqa: E501 + + + :return: The resources of this PkgCreate. # noqa: E501 + :rtype: PkgCreateResources + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this PkgCreate. + + + :param resources: The resources of this PkgCreate. # noqa: E501 + :type: PkgCreateResources + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgCreate): + 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/influxdb_client/domain/pkg_create_resources.py b/influxdb_client/domain/pkg_create_resources.py new file mode 100644 index 00000000..2767ae7d --- /dev/null +++ b/influxdb_client/domain/pkg_create_resources.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgCreateResources(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'kind': 'str', + 'name': 'str' + } + + attribute_map = { + 'id': 'id', + 'kind': 'kind', + 'name': 'name' + } + + def __init__(self, id=None, kind=None, name=None): # noqa: E501 + """PkgCreateResources - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._kind = None + self._name = None + self.discriminator = None + + self.id = id + self.kind = kind + if name is not None: + self.name = name + + @property + def id(self): + """Gets the id of this PkgCreateResources. # noqa: E501 + + + :return: The id of this PkgCreateResources. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PkgCreateResources. + + + :param id: The id of this PkgCreateResources. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def kind(self): + """Gets the kind of this PkgCreateResources. # noqa: E501 + + + :return: The kind of this PkgCreateResources. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this PkgCreateResources. + + + :param kind: The kind of this PkgCreateResources. # noqa: E501 + :type: str + """ + if kind is None: + raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 + + self._kind = kind + + @property + def name(self): + """Gets the name of this PkgCreateResources. # noqa: E501 + + + :return: The name of this PkgCreateResources. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PkgCreateResources. + + + :param name: The name of this PkgCreateResources. # 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.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgCreateResources): + 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/influxdb_client/domain/pkg_meta.py b/influxdb_client/domain/pkg_meta.py new file mode 100644 index 00000000..042e6f3c --- /dev/null +++ b/influxdb_client/domain/pkg_meta.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgMeta(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'pkg_name': 'str', + 'pkg_version': 'str' + } + + attribute_map = { + 'description': 'description', + 'pkg_name': 'pkgName', + 'pkg_version': 'pkgVersion' + } + + def __init__(self, description=None, pkg_name=None, pkg_version=None): # noqa: E501 + """PkgMeta - a model defined in OpenAPI""" # noqa: E501 + + self._description = None + self._pkg_name = None + self._pkg_version = None + self.discriminator = None + + if description is not None: + self.description = description + if pkg_name is not None: + self.pkg_name = pkg_name + if pkg_version is not None: + self.pkg_version = pkg_version + + @property + def description(self): + """Gets the description of this PkgMeta. # noqa: E501 + + + :return: The description of this PkgMeta. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this PkgMeta. + + + :param description: The description of this PkgMeta. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def pkg_name(self): + """Gets the pkg_name of this PkgMeta. # noqa: E501 + + + :return: The pkg_name of this PkgMeta. # noqa: E501 + :rtype: str + """ + return self._pkg_name + + @pkg_name.setter + def pkg_name(self, pkg_name): + """Sets the pkg_name of this PkgMeta. + + + :param pkg_name: The pkg_name of this PkgMeta. # noqa: E501 + :type: str + """ + + self._pkg_name = pkg_name + + @property + def pkg_version(self): + """Gets the pkg_version of this PkgMeta. # noqa: E501 + + + :return: The pkg_version of this PkgMeta. # noqa: E501 + :rtype: str + """ + return self._pkg_version + + @pkg_version.setter + def pkg_version(self, pkg_version): + """Sets the pkg_version of this PkgMeta. + + + :param pkg_version: The pkg_version of this PkgMeta. # noqa: E501 + :type: str + """ + + self._pkg_version = pkg_version + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgMeta): + 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/influxdb_client/domain/pkg_spec.py b/influxdb_client/domain/pkg_spec.py new file mode 100644 index 00000000..1d7ceb00 --- /dev/null +++ b/influxdb_client/domain/pkg_spec.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'resources': 'list[object]' + } + + attribute_map = { + 'resources': 'resources' + } + + def __init__(self, resources=None): # noqa: E501 + """PkgSpec - a model defined in OpenAPI""" # noqa: E501 + + self._resources = None + self.discriminator = None + + if resources is not None: + self.resources = resources + + @property + def resources(self): + """Gets the resources of this PkgSpec. # noqa: E501 + + + :return: The resources of this PkgSpec. # noqa: E501 + :rtype: list[object] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this PkgSpec. + + + :param resources: The resources of this PkgSpec. # noqa: E501 + :type: list[object] + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSpec): + 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/influxdb_client/domain/pkg_summary.py b/influxdb_client/domain/pkg_summary.py new file mode 100644 index 00000000..be98063c --- /dev/null +++ b/influxdb_client/domain/pkg_summary.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummary(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'summary': 'PkgSummarySummary', + 'diff': 'PkgSummaryDiff', + 'errors': 'list[PkgSummaryErrors]' + } + + attribute_map = { + 'summary': 'summary', + 'diff': 'diff', + 'errors': 'errors' + } + + def __init__(self, summary=None, diff=None, errors=None): # noqa: E501 + """PkgSummary - a model defined in OpenAPI""" # noqa: E501 + + self._summary = None + self._diff = None + self._errors = None + self.discriminator = None + + if summary is not None: + self.summary = summary + if diff is not None: + self.diff = diff + if errors is not None: + self.errors = errors + + @property + def summary(self): + """Gets the summary of this PkgSummary. # noqa: E501 + + + :return: The summary of this PkgSummary. # noqa: E501 + :rtype: PkgSummarySummary + """ + return self._summary + + @summary.setter + def summary(self, summary): + """Sets the summary of this PkgSummary. + + + :param summary: The summary of this PkgSummary. # noqa: E501 + :type: PkgSummarySummary + """ + + self._summary = summary + + @property + def diff(self): + """Gets the diff of this PkgSummary. # noqa: E501 + + + :return: The diff of this PkgSummary. # noqa: E501 + :rtype: PkgSummaryDiff + """ + return self._diff + + @diff.setter + def diff(self, diff): + """Sets the diff of this PkgSummary. + + + :param diff: The diff of this PkgSummary. # noqa: E501 + :type: PkgSummaryDiff + """ + + self._diff = diff + + @property + def errors(self): + """Gets the errors of this PkgSummary. # noqa: E501 + + + :return: The errors of this PkgSummary. # noqa: E501 + :rtype: list[PkgSummaryErrors] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this PkgSummary. + + + :param errors: The errors of this PkgSummary. # noqa: E501 + :type: list[PkgSummaryErrors] + """ + + self._errors = errors + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummary): + 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/influxdb_client/domain/pkg_summary_diff.py b/influxdb_client/domain/pkg_summary_diff.py new file mode 100644 index 00000000..f220de3a --- /dev/null +++ b/influxdb_client/domain/pkg_summary_diff.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummaryDiff(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'buckets': 'list[PkgSummaryDiffBuckets]', + 'dashboards': 'list[PkgSummaryDiffDashboards]', + 'labels': 'list[PkgSummaryDiffLabels]', + 'label_mappings': 'list[PkgSummaryDiffLabelMappings]', + 'variables': 'list[PkgSummaryDiffVariables]' + } + + attribute_map = { + 'buckets': 'buckets', + 'dashboards': 'dashboards', + 'labels': 'labels', + 'label_mappings': 'labelMappings', + 'variables': 'variables' + } + + def __init__(self, buckets=None, dashboards=None, labels=None, label_mappings=None, variables=None): # noqa: E501 + """PkgSummaryDiff - a model defined in OpenAPI""" # noqa: E501 + + self._buckets = None + self._dashboards = None + self._labels = None + self._label_mappings = None + self._variables = None + self.discriminator = None + + if buckets is not None: + self.buckets = buckets + if dashboards is not None: + self.dashboards = dashboards + if labels is not None: + self.labels = labels + if label_mappings is not None: + self.label_mappings = label_mappings + if variables is not None: + self.variables = variables + + @property + def buckets(self): + """Gets the buckets of this PkgSummaryDiff. # noqa: E501 + + + :return: The buckets of this PkgSummaryDiff. # noqa: E501 + :rtype: list[PkgSummaryDiffBuckets] + """ + return self._buckets + + @buckets.setter + def buckets(self, buckets): + """Sets the buckets of this PkgSummaryDiff. + + + :param buckets: The buckets of this PkgSummaryDiff. # noqa: E501 + :type: list[PkgSummaryDiffBuckets] + """ + + self._buckets = buckets + + @property + def dashboards(self): + """Gets the dashboards of this PkgSummaryDiff. # noqa: E501 + + + :return: The dashboards of this PkgSummaryDiff. # noqa: E501 + :rtype: list[PkgSummaryDiffDashboards] + """ + return self._dashboards + + @dashboards.setter + def dashboards(self, dashboards): + """Sets the dashboards of this PkgSummaryDiff. + + + :param dashboards: The dashboards of this PkgSummaryDiff. # noqa: E501 + :type: list[PkgSummaryDiffDashboards] + """ + + self._dashboards = dashboards + + @property + def labels(self): + """Gets the labels of this PkgSummaryDiff. # noqa: E501 + + + :return: The labels of this PkgSummaryDiff. # noqa: E501 + :rtype: list[PkgSummaryDiffLabels] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this PkgSummaryDiff. + + + :param labels: The labels of this PkgSummaryDiff. # noqa: E501 + :type: list[PkgSummaryDiffLabels] + """ + + self._labels = labels + + @property + def label_mappings(self): + """Gets the label_mappings of this PkgSummaryDiff. # noqa: E501 + + + :return: The label_mappings of this PkgSummaryDiff. # noqa: E501 + :rtype: list[PkgSummaryDiffLabelMappings] + """ + return self._label_mappings + + @label_mappings.setter + def label_mappings(self, label_mappings): + """Sets the label_mappings of this PkgSummaryDiff. + + + :param label_mappings: The label_mappings of this PkgSummaryDiff. # noqa: E501 + :type: list[PkgSummaryDiffLabelMappings] + """ + + self._label_mappings = label_mappings + + @property + def variables(self): + """Gets the variables of this PkgSummaryDiff. # noqa: E501 + + + :return: The variables of this PkgSummaryDiff. # noqa: E501 + :rtype: list[PkgSummaryDiffVariables] + """ + return self._variables + + @variables.setter + def variables(self, variables): + """Sets the variables of this PkgSummaryDiff. + + + :param variables: The variables of this PkgSummaryDiff. # noqa: E501 + :type: list[PkgSummaryDiffVariables] + """ + + self._variables = variables + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummaryDiff): + 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/influxdb_client/domain/pkg_summary_diff_buckets.py b/influxdb_client/domain/pkg_summary_diff_buckets.py new file mode 100644 index 00000000..337c59af --- /dev/null +++ b/influxdb_client/domain/pkg_summary_diff_buckets.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummaryDiffBuckets(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'old_description': 'str', + 'new_description': 'str', + 'old_rp': 'str', + 'new_rp': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'old_description': 'oldDescription', + 'new_description': 'newDescription', + 'old_rp': 'oldRP', + 'new_rp': 'newRP' + } + + def __init__(self, id=None, name=None, old_description=None, new_description=None, old_rp=None, new_rp=None): # noqa: E501 + """PkgSummaryDiffBuckets - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._name = None + self._old_description = None + self._new_description = None + self._old_rp = None + self._new_rp = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if old_description is not None: + self.old_description = old_description + if new_description is not None: + self.new_description = new_description + if old_rp is not None: + self.old_rp = old_rp + if new_rp is not None: + self.new_rp = new_rp + + @property + def id(self): + """Gets the id of this PkgSummaryDiffBuckets. # noqa: E501 + + + :return: The id of this PkgSummaryDiffBuckets. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PkgSummaryDiffBuckets. + + + :param id: The id of this PkgSummaryDiffBuckets. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this PkgSummaryDiffBuckets. # noqa: E501 + + + :return: The name of this PkgSummaryDiffBuckets. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PkgSummaryDiffBuckets. + + + :param name: The name of this PkgSummaryDiffBuckets. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def old_description(self): + """Gets the old_description of this PkgSummaryDiffBuckets. # noqa: E501 + + + :return: The old_description of this PkgSummaryDiffBuckets. # noqa: E501 + :rtype: str + """ + return self._old_description + + @old_description.setter + def old_description(self, old_description): + """Sets the old_description of this PkgSummaryDiffBuckets. + + + :param old_description: The old_description of this PkgSummaryDiffBuckets. # noqa: E501 + :type: str + """ + + self._old_description = old_description + + @property + def new_description(self): + """Gets the new_description of this PkgSummaryDiffBuckets. # noqa: E501 + + + :return: The new_description of this PkgSummaryDiffBuckets. # noqa: E501 + :rtype: str + """ + return self._new_description + + @new_description.setter + def new_description(self, new_description): + """Sets the new_description of this PkgSummaryDiffBuckets. + + + :param new_description: The new_description of this PkgSummaryDiffBuckets. # noqa: E501 + :type: str + """ + + self._new_description = new_description + + @property + def old_rp(self): + """Gets the old_rp of this PkgSummaryDiffBuckets. # noqa: E501 + + + :return: The old_rp of this PkgSummaryDiffBuckets. # noqa: E501 + :rtype: str + """ + return self._old_rp + + @old_rp.setter + def old_rp(self, old_rp): + """Sets the old_rp of this PkgSummaryDiffBuckets. + + + :param old_rp: The old_rp of this PkgSummaryDiffBuckets. # noqa: E501 + :type: str + """ + + self._old_rp = old_rp + + @property + def new_rp(self): + """Gets the new_rp of this PkgSummaryDiffBuckets. # noqa: E501 + + + :return: The new_rp of this PkgSummaryDiffBuckets. # noqa: E501 + :rtype: str + """ + return self._new_rp + + @new_rp.setter + def new_rp(self, new_rp): + """Sets the new_rp of this PkgSummaryDiffBuckets. + + + :param new_rp: The new_rp of this PkgSummaryDiffBuckets. # noqa: E501 + :type: str + """ + + self._new_rp = new_rp + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummaryDiffBuckets): + 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/influxdb_client/domain/pkg_summary_diff_dashboards.py b/influxdb_client/domain/pkg_summary_diff_dashboards.py new file mode 100644 index 00000000..fc318c31 --- /dev/null +++ b/influxdb_client/domain/pkg_summary_diff_dashboards.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummaryDiffDashboards(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'description': 'str', + 'charts': 'list[PkgChart]' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'charts': 'charts' + } + + def __init__(self, name=None, description=None, charts=None): # noqa: E501 + """PkgSummaryDiffDashboards - a model defined in OpenAPI""" # noqa: E501 + + self._name = None + self._description = None + self._charts = None + self.discriminator = None + + if name is not None: + self.name = name + if description is not None: + self.description = description + if charts is not None: + self.charts = charts + + @property + def name(self): + """Gets the name of this PkgSummaryDiffDashboards. # noqa: E501 + + + :return: The name of this PkgSummaryDiffDashboards. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PkgSummaryDiffDashboards. + + + :param name: The name of this PkgSummaryDiffDashboards. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this PkgSummaryDiffDashboards. # noqa: E501 + + + :return: The description of this PkgSummaryDiffDashboards. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this PkgSummaryDiffDashboards. + + + :param description: The description of this PkgSummaryDiffDashboards. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def charts(self): + """Gets the charts of this PkgSummaryDiffDashboards. # noqa: E501 + + + :return: The charts of this PkgSummaryDiffDashboards. # noqa: E501 + :rtype: list[PkgChart] + """ + return self._charts + + @charts.setter + def charts(self, charts): + """Sets the charts of this PkgSummaryDiffDashboards. + + + :param charts: The charts of this PkgSummaryDiffDashboards. # noqa: E501 + :type: list[PkgChart] + """ + + self._charts = charts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummaryDiffDashboards): + 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/influxdb_client/domain/pkg_summary_diff_label_mappings.py b/influxdb_client/domain/pkg_summary_diff_label_mappings.py new file mode 100644 index 00000000..1848a7e8 --- /dev/null +++ b/influxdb_client/domain/pkg_summary_diff_label_mappings.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummaryDiffLabelMappings(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'is_new': 'bool', + 'resource_type': 'str', + 'resource_id': 'str', + 'resource_name': 'str', + 'label_id': 'str', + 'label_name': 'str' + } + + attribute_map = { + 'is_new': 'isNew', + 'resource_type': 'resourceType', + 'resource_id': 'resourceID', + 'resource_name': 'resourceName', + 'label_id': 'labelID', + 'label_name': 'labelName' + } + + def __init__(self, is_new=None, resource_type=None, resource_id=None, resource_name=None, label_id=None, label_name=None): # noqa: E501 + """PkgSummaryDiffLabelMappings - a model defined in OpenAPI""" # noqa: E501 + + self._is_new = None + self._resource_type = None + self._resource_id = None + self._resource_name = None + self._label_id = None + self._label_name = None + self.discriminator = None + + if is_new is not None: + self.is_new = is_new + if resource_type is not None: + self.resource_type = resource_type + if resource_id is not None: + self.resource_id = resource_id + if resource_name is not None: + self.resource_name = resource_name + if label_id is not None: + self.label_id = label_id + if label_name is not None: + self.label_name = label_name + + @property + def is_new(self): + """Gets the is_new of this PkgSummaryDiffLabelMappings. # noqa: E501 + + + :return: The is_new of this PkgSummaryDiffLabelMappings. # noqa: E501 + :rtype: bool + """ + return self._is_new + + @is_new.setter + def is_new(self, is_new): + """Sets the is_new of this PkgSummaryDiffLabelMappings. + + + :param is_new: The is_new of this PkgSummaryDiffLabelMappings. # noqa: E501 + :type: bool + """ + + self._is_new = is_new + + @property + def resource_type(self): + """Gets the resource_type of this PkgSummaryDiffLabelMappings. # noqa: E501 + + + :return: The resource_type of this PkgSummaryDiffLabelMappings. # noqa: E501 + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """Sets the resource_type of this PkgSummaryDiffLabelMappings. + + + :param resource_type: The resource_type of this PkgSummaryDiffLabelMappings. # noqa: E501 + :type: str + """ + + self._resource_type = resource_type + + @property + def resource_id(self): + """Gets the resource_id of this PkgSummaryDiffLabelMappings. # noqa: E501 + + + :return: The resource_id of this PkgSummaryDiffLabelMappings. # noqa: E501 + :rtype: str + """ + return self._resource_id + + @resource_id.setter + def resource_id(self, resource_id): + """Sets the resource_id of this PkgSummaryDiffLabelMappings. + + + :param resource_id: The resource_id of this PkgSummaryDiffLabelMappings. # noqa: E501 + :type: str + """ + + self._resource_id = resource_id + + @property + def resource_name(self): + """Gets the resource_name of this PkgSummaryDiffLabelMappings. # noqa: E501 + + + :return: The resource_name of this PkgSummaryDiffLabelMappings. # noqa: E501 + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """Sets the resource_name of this PkgSummaryDiffLabelMappings. + + + :param resource_name: The resource_name of this PkgSummaryDiffLabelMappings. # noqa: E501 + :type: str + """ + + self._resource_name = resource_name + + @property + def label_id(self): + """Gets the label_id of this PkgSummaryDiffLabelMappings. # noqa: E501 + + + :return: The label_id of this PkgSummaryDiffLabelMappings. # noqa: E501 + :rtype: str + """ + return self._label_id + + @label_id.setter + def label_id(self, label_id): + """Sets the label_id of this PkgSummaryDiffLabelMappings. + + + :param label_id: The label_id of this PkgSummaryDiffLabelMappings. # noqa: E501 + :type: str + """ + + self._label_id = label_id + + @property + def label_name(self): + """Gets the label_name of this PkgSummaryDiffLabelMappings. # noqa: E501 + + + :return: The label_name of this PkgSummaryDiffLabelMappings. # noqa: E501 + :rtype: str + """ + return self._label_name + + @label_name.setter + def label_name(self, label_name): + """Sets the label_name of this PkgSummaryDiffLabelMappings. + + + :param label_name: The label_name of this PkgSummaryDiffLabelMappings. # noqa: E501 + :type: str + """ + + self._label_name = label_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummaryDiffLabelMappings): + 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/influxdb_client/domain/pkg_summary_diff_labels.py b/influxdb_client/domain/pkg_summary_diff_labels.py new file mode 100644 index 00000000..a75cfd2e --- /dev/null +++ b/influxdb_client/domain/pkg_summary_diff_labels.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummaryDiffLabels(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'old_description': 'str', + 'new_description': 'str', + 'old_color': 'str', + 'new_color': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'old_description': 'oldDescription', + 'new_description': 'newDescription', + 'old_color': 'oldColor', + 'new_color': 'newColor' + } + + def __init__(self, id=None, name=None, old_description=None, new_description=None, old_color=None, new_color=None): # noqa: E501 + """PkgSummaryDiffLabels - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._name = None + self._old_description = None + self._new_description = None + self._old_color = None + self._new_color = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if old_description is not None: + self.old_description = old_description + if new_description is not None: + self.new_description = new_description + if old_color is not None: + self.old_color = old_color + if new_color is not None: + self.new_color = new_color + + @property + def id(self): + """Gets the id of this PkgSummaryDiffLabels. # noqa: E501 + + + :return: The id of this PkgSummaryDiffLabels. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PkgSummaryDiffLabels. + + + :param id: The id of this PkgSummaryDiffLabels. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this PkgSummaryDiffLabels. # noqa: E501 + + + :return: The name of this PkgSummaryDiffLabels. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PkgSummaryDiffLabels. + + + :param name: The name of this PkgSummaryDiffLabels. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def old_description(self): + """Gets the old_description of this PkgSummaryDiffLabels. # noqa: E501 + + + :return: The old_description of this PkgSummaryDiffLabels. # noqa: E501 + :rtype: str + """ + return self._old_description + + @old_description.setter + def old_description(self, old_description): + """Sets the old_description of this PkgSummaryDiffLabels. + + + :param old_description: The old_description of this PkgSummaryDiffLabels. # noqa: E501 + :type: str + """ + + self._old_description = old_description + + @property + def new_description(self): + """Gets the new_description of this PkgSummaryDiffLabels. # noqa: E501 + + + :return: The new_description of this PkgSummaryDiffLabels. # noqa: E501 + :rtype: str + """ + return self._new_description + + @new_description.setter + def new_description(self, new_description): + """Sets the new_description of this PkgSummaryDiffLabels. + + + :param new_description: The new_description of this PkgSummaryDiffLabels. # noqa: E501 + :type: str + """ + + self._new_description = new_description + + @property + def old_color(self): + """Gets the old_color of this PkgSummaryDiffLabels. # noqa: E501 + + + :return: The old_color of this PkgSummaryDiffLabels. # noqa: E501 + :rtype: str + """ + return self._old_color + + @old_color.setter + def old_color(self, old_color): + """Sets the old_color of this PkgSummaryDiffLabels. + + + :param old_color: The old_color of this PkgSummaryDiffLabels. # noqa: E501 + :type: str + """ + + self._old_color = old_color + + @property + def new_color(self): + """Gets the new_color of this PkgSummaryDiffLabels. # noqa: E501 + + + :return: The new_color of this PkgSummaryDiffLabels. # noqa: E501 + :rtype: str + """ + return self._new_color + + @new_color.setter + def new_color(self, new_color): + """Sets the new_color of this PkgSummaryDiffLabels. + + + :param new_color: The new_color of this PkgSummaryDiffLabels. # noqa: E501 + :type: str + """ + + self._new_color = new_color + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummaryDiffLabels): + 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/influxdb_client/domain/pkg_summary_diff_variables.py b/influxdb_client/domain/pkg_summary_diff_variables.py new file mode 100644 index 00000000..f134d0f7 --- /dev/null +++ b/influxdb_client/domain/pkg_summary_diff_variables.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummaryDiffVariables(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'old_description': 'str', + 'new_description': 'str', + 'old_args': 'VariableProperties', + 'new_args': 'VariableProperties' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'old_description': 'oldDescription', + 'new_description': 'newDescription', + 'old_args': 'oldArgs', + 'new_args': 'newArgs' + } + + def __init__(self, id=None, name=None, old_description=None, new_description=None, old_args=None, new_args=None): # noqa: E501 + """PkgSummaryDiffVariables - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._name = None + self._old_description = None + self._new_description = None + self._old_args = None + self._new_args = None + self.discriminator = None + + if id is not None: + self.id = id + if name is not None: + self.name = name + if old_description is not None: + self.old_description = old_description + if new_description is not None: + self.new_description = new_description + if old_args is not None: + self.old_args = old_args + if new_args is not None: + self.new_args = new_args + + @property + def id(self): + """Gets the id of this PkgSummaryDiffVariables. # noqa: E501 + + + :return: The id of this PkgSummaryDiffVariables. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PkgSummaryDiffVariables. + + + :param id: The id of this PkgSummaryDiffVariables. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def name(self): + """Gets the name of this PkgSummaryDiffVariables. # noqa: E501 + + + :return: The name of this PkgSummaryDiffVariables. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PkgSummaryDiffVariables. + + + :param name: The name of this PkgSummaryDiffVariables. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def old_description(self): + """Gets the old_description of this PkgSummaryDiffVariables. # noqa: E501 + + + :return: The old_description of this PkgSummaryDiffVariables. # noqa: E501 + :rtype: str + """ + return self._old_description + + @old_description.setter + def old_description(self, old_description): + """Sets the old_description of this PkgSummaryDiffVariables. + + + :param old_description: The old_description of this PkgSummaryDiffVariables. # noqa: E501 + :type: str + """ + + self._old_description = old_description + + @property + def new_description(self): + """Gets the new_description of this PkgSummaryDiffVariables. # noqa: E501 + + + :return: The new_description of this PkgSummaryDiffVariables. # noqa: E501 + :rtype: str + """ + return self._new_description + + @new_description.setter + def new_description(self, new_description): + """Sets the new_description of this PkgSummaryDiffVariables. + + + :param new_description: The new_description of this PkgSummaryDiffVariables. # noqa: E501 + :type: str + """ + + self._new_description = new_description + + @property + def old_args(self): + """Gets the old_args of this PkgSummaryDiffVariables. # noqa: E501 + + + :return: The old_args of this PkgSummaryDiffVariables. # noqa: E501 + :rtype: VariableProperties + """ + return self._old_args + + @old_args.setter + def old_args(self, old_args): + """Sets the old_args of this PkgSummaryDiffVariables. + + + :param old_args: The old_args of this PkgSummaryDiffVariables. # noqa: E501 + :type: VariableProperties + """ + + self._old_args = old_args + + @property + def new_args(self): + """Gets the new_args of this PkgSummaryDiffVariables. # noqa: E501 + + + :return: The new_args of this PkgSummaryDiffVariables. # noqa: E501 + :rtype: VariableProperties + """ + return self._new_args + + @new_args.setter + def new_args(self, new_args): + """Sets the new_args of this PkgSummaryDiffVariables. + + + :param new_args: The new_args of this PkgSummaryDiffVariables. # noqa: E501 + :type: VariableProperties + """ + + self._new_args = new_args + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummaryDiffVariables): + 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/influxdb_client/domain/pkg_summary_errors.py b/influxdb_client/domain/pkg_summary_errors.py new file mode 100644 index 00000000..0b957483 --- /dev/null +++ b/influxdb_client/domain/pkg_summary_errors.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummaryErrors(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'kind': 'str', + 'reason': 'str', + 'fields': 'list[str]', + 'indexes': 'list[int]' + } + + attribute_map = { + 'kind': 'kind', + 'reason': 'reason', + 'fields': 'fields', + 'indexes': 'indexes' + } + + def __init__(self, kind=None, reason=None, fields=None, indexes=None): # noqa: E501 + """PkgSummaryErrors - a model defined in OpenAPI""" # noqa: E501 + + self._kind = None + self._reason = None + self._fields = None + self._indexes = None + self.discriminator = None + + if kind is not None: + self.kind = kind + if reason is not None: + self.reason = reason + if fields is not None: + self.fields = fields + if indexes is not None: + self.indexes = indexes + + @property + def kind(self): + """Gets the kind of this PkgSummaryErrors. # noqa: E501 + + + :return: The kind of this PkgSummaryErrors. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this PkgSummaryErrors. + + + :param kind: The kind of this PkgSummaryErrors. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def reason(self): + """Gets the reason of this PkgSummaryErrors. # noqa: E501 + + + :return: The reason of this PkgSummaryErrors. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this PkgSummaryErrors. + + + :param reason: The reason of this PkgSummaryErrors. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def fields(self): + """Gets the fields of this PkgSummaryErrors. # noqa: E501 + + + :return: The fields of this PkgSummaryErrors. # noqa: E501 + :rtype: list[str] + """ + return self._fields + + @fields.setter + def fields(self, fields): + """Sets the fields of this PkgSummaryErrors. + + + :param fields: The fields of this PkgSummaryErrors. # noqa: E501 + :type: list[str] + """ + + self._fields = fields + + @property + def indexes(self): + """Gets the indexes of this PkgSummaryErrors. # noqa: E501 + + + :return: The indexes of this PkgSummaryErrors. # noqa: E501 + :rtype: list[int] + """ + return self._indexes + + @indexes.setter + def indexes(self, indexes): + """Sets the indexes of this PkgSummaryErrors. + + + :param indexes: The indexes of this PkgSummaryErrors. # noqa: E501 + :type: list[int] + """ + + self._indexes = indexes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummaryErrors): + 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/influxdb_client/domain/pkg_summary_summary.py b/influxdb_client/domain/pkg_summary_summary.py new file mode 100644 index 00000000..30b844af --- /dev/null +++ b/influxdb_client/domain/pkg_summary_summary.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummarySummary(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'buckets': 'list[Bucket]', + 'labels': 'list[Label]', + 'dashboards': 'list[PkgSummarySummaryDashboards]', + 'label_mappings': 'list[PkgSummarySummaryLabelMappings]', + 'variables': 'list[Variable]' + } + + attribute_map = { + 'buckets': 'buckets', + 'labels': 'labels', + 'dashboards': 'dashboards', + 'label_mappings': 'labelMappings', + 'variables': 'variables' + } + + def __init__(self, buckets=None, labels=None, dashboards=None, label_mappings=None, variables=None): # noqa: E501 + """PkgSummarySummary - a model defined in OpenAPI""" # noqa: E501 + + self._buckets = None + self._labels = None + self._dashboards = None + self._label_mappings = None + self._variables = None + self.discriminator = None + + if buckets is not None: + self.buckets = buckets + if labels is not None: + self.labels = labels + if dashboards is not None: + self.dashboards = dashboards + if label_mappings is not None: + self.label_mappings = label_mappings + if variables is not None: + self.variables = variables + + @property + def buckets(self): + """Gets the buckets of this PkgSummarySummary. # noqa: E501 + + + :return: The buckets of this PkgSummarySummary. # noqa: E501 + :rtype: list[Bucket] + """ + return self._buckets + + @buckets.setter + def buckets(self, buckets): + """Sets the buckets of this PkgSummarySummary. + + + :param buckets: The buckets of this PkgSummarySummary. # noqa: E501 + :type: list[Bucket] + """ + + self._buckets = buckets + + @property + def labels(self): + """Gets the labels of this PkgSummarySummary. # noqa: E501 + + + :return: The labels of this PkgSummarySummary. # noqa: E501 + :rtype: list[Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this PkgSummarySummary. + + + :param labels: The labels of this PkgSummarySummary. # noqa: E501 + :type: list[Label] + """ + + self._labels = labels + + @property + def dashboards(self): + """Gets the dashboards of this PkgSummarySummary. # noqa: E501 + + + :return: The dashboards of this PkgSummarySummary. # noqa: E501 + :rtype: list[PkgSummarySummaryDashboards] + """ + return self._dashboards + + @dashboards.setter + def dashboards(self, dashboards): + """Sets the dashboards of this PkgSummarySummary. + + + :param dashboards: The dashboards of this PkgSummarySummary. # noqa: E501 + :type: list[PkgSummarySummaryDashboards] + """ + + self._dashboards = dashboards + + @property + def label_mappings(self): + """Gets the label_mappings of this PkgSummarySummary. # noqa: E501 + + + :return: The label_mappings of this PkgSummarySummary. # noqa: E501 + :rtype: list[PkgSummarySummaryLabelMappings] + """ + return self._label_mappings + + @label_mappings.setter + def label_mappings(self, label_mappings): + """Sets the label_mappings of this PkgSummarySummary. + + + :param label_mappings: The label_mappings of this PkgSummarySummary. # noqa: E501 + :type: list[PkgSummarySummaryLabelMappings] + """ + + self._label_mappings = label_mappings + + @property + def variables(self): + """Gets the variables of this PkgSummarySummary. # noqa: E501 + + + :return: The variables of this PkgSummarySummary. # noqa: E501 + :rtype: list[Variable] + """ + return self._variables + + @variables.setter + def variables(self, variables): + """Sets the variables of this PkgSummarySummary. + + + :param variables: The variables of this PkgSummarySummary. # noqa: E501 + :type: list[Variable] + """ + + self._variables = variables + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummarySummary): + 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/influxdb_client/domain/pkg_summary_summary_dashboards.py b/influxdb_client/domain/pkg_summary_summary_dashboards.py new file mode 100644 index 00000000..5cc2fc41 --- /dev/null +++ b/influxdb_client/domain/pkg_summary_summary_dashboards.py @@ -0,0 +1,242 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummarySummaryDashboards(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'org_id': 'str', + 'name': 'str', + 'description': 'str', + 'label_associations': 'list[Label]', + 'charts': 'list[PkgChart]' + } + + attribute_map = { + 'id': 'id', + 'org_id': 'orgID', + 'name': 'name', + 'description': 'description', + 'label_associations': 'labelAssociations', + 'charts': 'charts' + } + + def __init__(self, id=None, org_id=None, name=None, description=None, label_associations=None, charts=None): # noqa: E501 + """PkgSummarySummaryDashboards - a model defined in OpenAPI""" # noqa: E501 + + self._id = None + self._org_id = None + self._name = None + self._description = None + self._label_associations = None + self._charts = None + self.discriminator = None + + if id is not None: + self.id = id + if org_id is not None: + self.org_id = org_id + if name is not None: + self.name = name + if description is not None: + self.description = description + if label_associations is not None: + self.label_associations = label_associations + if charts is not None: + self.charts = charts + + @property + def id(self): + """Gets the id of this PkgSummarySummaryDashboards. # noqa: E501 + + + :return: The id of this PkgSummarySummaryDashboards. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PkgSummarySummaryDashboards. + + + :param id: The id of this PkgSummarySummaryDashboards. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def org_id(self): + """Gets the org_id of this PkgSummarySummaryDashboards. # noqa: E501 + + + :return: The org_id of this PkgSummarySummaryDashboards. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id): + """Sets the org_id of this PkgSummarySummaryDashboards. + + + :param org_id: The org_id of this PkgSummarySummaryDashboards. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + @property + def name(self): + """Gets the name of this PkgSummarySummaryDashboards. # noqa: E501 + + + :return: The name of this PkgSummarySummaryDashboards. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PkgSummarySummaryDashboards. + + + :param name: The name of this PkgSummarySummaryDashboards. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this PkgSummarySummaryDashboards. # noqa: E501 + + + :return: The description of this PkgSummarySummaryDashboards. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this PkgSummarySummaryDashboards. + + + :param description: The description of this PkgSummarySummaryDashboards. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def label_associations(self): + """Gets the label_associations of this PkgSummarySummaryDashboards. # noqa: E501 + + + :return: The label_associations of this PkgSummarySummaryDashboards. # noqa: E501 + :rtype: list[Label] + """ + return self._label_associations + + @label_associations.setter + def label_associations(self, label_associations): + """Sets the label_associations of this PkgSummarySummaryDashboards. + + + :param label_associations: The label_associations of this PkgSummarySummaryDashboards. # noqa: E501 + :type: list[Label] + """ + + self._label_associations = label_associations + + @property + def charts(self): + """Gets the charts of this PkgSummarySummaryDashboards. # noqa: E501 + + + :return: The charts of this PkgSummarySummaryDashboards. # noqa: E501 + :rtype: list[PkgChart] + """ + return self._charts + + @charts.setter + def charts(self, charts): + """Sets the charts of this PkgSummarySummaryDashboards. + + + :param charts: The charts of this PkgSummarySummaryDashboards. # noqa: E501 + :type: list[PkgChart] + """ + + self._charts = charts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummarySummaryDashboards): + 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/influxdb_client/domain/pkg_summary_summary_label_mappings.py b/influxdb_client/domain/pkg_summary_summary_label_mappings.py new file mode 100644 index 00000000..67f0df22 --- /dev/null +++ b/influxdb_client/domain/pkg_summary_summary_label_mappings.py @@ -0,0 +1,216 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PkgSummarySummaryLabelMappings(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'resource_name': 'str', + 'resource_id': 'str', + 'resource_type': 'str', + 'label_name': 'str', + 'label_id': 'str' + } + + attribute_map = { + 'resource_name': 'resourceName', + 'resource_id': 'resourceID', + 'resource_type': 'resourceType', + 'label_name': 'labelName', + 'label_id': 'labelID' + } + + def __init__(self, resource_name=None, resource_id=None, resource_type=None, label_name=None, label_id=None): # noqa: E501 + """PkgSummarySummaryLabelMappings - a model defined in OpenAPI""" # noqa: E501 + + self._resource_name = None + self._resource_id = None + self._resource_type = None + self._label_name = None + self._label_id = None + self.discriminator = None + + if resource_name is not None: + self.resource_name = resource_name + if resource_id is not None: + self.resource_id = resource_id + if resource_type is not None: + self.resource_type = resource_type + if label_name is not None: + self.label_name = label_name + if label_id is not None: + self.label_id = label_id + + @property + def resource_name(self): + """Gets the resource_name of this PkgSummarySummaryLabelMappings. # noqa: E501 + + + :return: The resource_name of this PkgSummarySummaryLabelMappings. # noqa: E501 + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """Sets the resource_name of this PkgSummarySummaryLabelMappings. + + + :param resource_name: The resource_name of this PkgSummarySummaryLabelMappings. # noqa: E501 + :type: str + """ + + self._resource_name = resource_name + + @property + def resource_id(self): + """Gets the resource_id of this PkgSummarySummaryLabelMappings. # noqa: E501 + + + :return: The resource_id of this PkgSummarySummaryLabelMappings. # noqa: E501 + :rtype: str + """ + return self._resource_id + + @resource_id.setter + def resource_id(self, resource_id): + """Sets the resource_id of this PkgSummarySummaryLabelMappings. + + + :param resource_id: The resource_id of this PkgSummarySummaryLabelMappings. # noqa: E501 + :type: str + """ + + self._resource_id = resource_id + + @property + def resource_type(self): + """Gets the resource_type of this PkgSummarySummaryLabelMappings. # noqa: E501 + + + :return: The resource_type of this PkgSummarySummaryLabelMappings. # noqa: E501 + :rtype: str + """ + return self._resource_type + + @resource_type.setter + def resource_type(self, resource_type): + """Sets the resource_type of this PkgSummarySummaryLabelMappings. + + + :param resource_type: The resource_type of this PkgSummarySummaryLabelMappings. # noqa: E501 + :type: str + """ + + self._resource_type = resource_type + + @property + def label_name(self): + """Gets the label_name of this PkgSummarySummaryLabelMappings. # noqa: E501 + + + :return: The label_name of this PkgSummarySummaryLabelMappings. # noqa: E501 + :rtype: str + """ + return self._label_name + + @label_name.setter + def label_name(self, label_name): + """Sets the label_name of this PkgSummarySummaryLabelMappings. + + + :param label_name: The label_name of this PkgSummarySummaryLabelMappings. # noqa: E501 + :type: str + """ + + self._label_name = label_name + + @property + def label_id(self): + """Gets the label_id of this PkgSummarySummaryLabelMappings. # noqa: E501 + + + :return: The label_id of this PkgSummarySummaryLabelMappings. # noqa: E501 + :rtype: str + """ + return self._label_id + + @label_id.setter + def label_id(self, label_id): + """Sets the label_id of this PkgSummarySummaryLabelMappings. + + + :param label_id: The label_id of this PkgSummarySummaryLabelMappings. # noqa: E501 + :type: str + """ + + self._label_id = label_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PkgSummarySummaryLabelMappings): + 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/influxdb_client/domain/post_bucket_request.py b/influxdb_client/domain/post_bucket_request.py new file mode 100644 index 00000000..e045fa2d --- /dev/null +++ b/influxdb_client/domain/post_bucket_request.py @@ -0,0 +1,220 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PostBucketRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'org_id': 'str', + 'name': 'str', + 'description': 'str', + 'rp': 'str', + 'retention_rules': 'list[BucketRetentionRules]' + } + + attribute_map = { + 'org_id': 'orgID', + 'name': 'name', + 'description': 'description', + 'rp': 'rp', + 'retention_rules': 'retentionRules' + } + + def __init__(self, org_id=None, name=None, description=None, rp=None, retention_rules=None): # noqa: E501 + """PostBucketRequest - a model defined in OpenAPI""" # noqa: E501 + + self._org_id = None + self._name = None + self._description = None + self._rp = None + self._retention_rules = None + self.discriminator = None + + if org_id is not None: + self.org_id = org_id + self.name = name + if description is not None: + self.description = description + if rp is not None: + self.rp = rp + self.retention_rules = retention_rules + + @property + def org_id(self): + """Gets the org_id of this PostBucketRequest. # noqa: E501 + + + :return: The org_id of this PostBucketRequest. # noqa: E501 + :rtype: str + """ + return self._org_id + + @org_id.setter + def org_id(self, org_id): + """Sets the org_id of this PostBucketRequest. + + + :param org_id: The org_id of this PostBucketRequest. # noqa: E501 + :type: str + """ + + self._org_id = org_id + + @property + def name(self): + """Gets the name of this PostBucketRequest. # noqa: E501 + + + :return: The name of this PostBucketRequest. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this PostBucketRequest. + + + :param name: The name of this PostBucketRequest. # 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 description(self): + """Gets the description of this PostBucketRequest. # noqa: E501 + + + :return: The description of this PostBucketRequest. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this PostBucketRequest. + + + :param description: The description of this PostBucketRequest. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def rp(self): + """Gets the rp of this PostBucketRequest. # noqa: E501 + + + :return: The rp of this PostBucketRequest. # noqa: E501 + :rtype: str + """ + return self._rp + + @rp.setter + def rp(self, rp): + """Sets the rp of this PostBucketRequest. + + + :param rp: The rp of this PostBucketRequest. # noqa: E501 + :type: str + """ + + self._rp = rp + + @property + def retention_rules(self): + """Gets the retention_rules of this PostBucketRequest. # noqa: E501 + + Rules to expire or retain data. No rules means data never expires. # noqa: E501 + + :return: The retention_rules of this PostBucketRequest. # noqa: E501 + :rtype: list[BucketRetentionRules] + """ + return self._retention_rules + + @retention_rules.setter + def retention_rules(self, retention_rules): + """Sets the retention_rules of this PostBucketRequest. + + Rules to expire or retain data. No rules means data never expires. # noqa: E501 + + :param retention_rules: The retention_rules of this PostBucketRequest. # noqa: E501 + :type: list[BucketRetentionRules] + """ + if retention_rules is None: + raise ValueError("Invalid value for `retention_rules`, must not be `None`") # noqa: E501 + + self._retention_rules = retention_rules + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PostBucketRequest): + 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/influxdb_client/domain/post_check.py b/influxdb_client/domain/post_check.py new file mode 100644 index 00000000..26d56a17 --- /dev/null +++ b/influxdb_client/domain/post_check.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PostCheck(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """PostCheck - a model defined in OpenAPI""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PostCheck): + 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/influxdb_client/domain/post_notification_endpoint.py b/influxdb_client/domain/post_notification_endpoint.py new file mode 100644 index 00000000..b3c929bf --- /dev/null +++ b/influxdb_client/domain/post_notification_endpoint.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PostNotificationEndpoint(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """PostNotificationEndpoint - a model defined in OpenAPI""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PostNotificationEndpoint): + 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/influxdb_client/domain/post_notification_rule.py b/influxdb_client/domain/post_notification_rule.py new file mode 100644 index 00000000..73869478 --- /dev/null +++ b/influxdb_client/domain/post_notification_rule.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator + + +class PostNotificationRule(NotificationRuleDiscriminator): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """PostNotificationRule - a model defined in OpenAPI""" # noqa: E501 + NotificationRuleDiscriminator.__init__(self) + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, PostNotificationRule): + 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/influxdb_client/domain/slack_notification_endpoint.py b/influxdb_client/domain/slack_notification_endpoint.py index 740f7bde..d9761bd8 100644 --- a/influxdb_client/domain/slack_notification_endpoint.py +++ b/influxdb_client/domain/slack_notification_endpoint.py @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase +from influxdb_client.domain.notification_endpoint import NotificationEndpoint -class SlackNotificationEndpoint(NotificationEndpointBase): +class SlackNotificationEndpoint(NotificationEndpoint): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,39 +33,17 @@ class SlackNotificationEndpoint(NotificationEndpointBase): """ openapi_types = { 'url': 'str', - 'token': 'str', - 'id': 'str', - 'org_id': 'str', - 'user_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'description': 'str', - 'name': 'str', - 'status': 'str', - 'labels': 'list[Label]', - 'links': 'NotificationEndpointBaseLinks', - 'type': 'NotificationEndpointType' + 'token': 'str' } attribute_map = { 'url': 'url', - 'token': 'token', - 'id': 'id', - 'org_id': 'orgID', - 'user_id': 'userID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'description': 'description', - 'name': 'name', - 'status': 'status', - 'labels': 'labels', - 'links': 'links', - 'type': 'type' + 'token': 'token' } - def __init__(self, url=None, token=None, id=None, org_id=None, user_id=None, created_at=None, updated_at=None, description=None, name=None, status='active', labels=None, links=None, type=None): # noqa: E501 + def __init__(self, url=None, token=None): # noqa: E501 """SlackNotificationEndpoint - a model defined in OpenAPI""" # noqa: E501 - NotificationEndpointBase.__init__(self, id=id, org_id=org_id, user_id=user_id, created_at=created_at, updated_at=updated_at, description=description, name=name, status=status, labels=labels, links=links, type=type) + NotificationEndpoint.__init__(self) self._url = None self._token = None diff --git a/influxdb_client/domain/task.py b/influxdb_client/domain/task.py index bfeeec73..5b4bee53 100644 --- a/influxdb_client/domain/task.py +++ b/influxdb_client/domain/task.py @@ -45,6 +45,8 @@ class Task(object): 'cron': 'str', 'offset': 'str', 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', 'created_at': 'datetime', 'updated_at': 'datetime', 'links': 'TaskLinks' @@ -65,12 +67,14 @@ class Task(object): 'cron': 'cron', 'offset': 'offset', 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', 'created_at': 'createdAt', 'updated_at': 'updatedAt', 'links': 'links' } - def __init__(self, id=None, type=None, org_id=None, org=None, name=None, description=None, status=None, labels=None, authorization_id=None, flux=None, every=None, cron=None, offset=None, latest_completed=None, created_at=None, updated_at=None, links=None): # noqa: E501 + def __init__(self, id=None, type=None, org_id=None, org=None, name=None, description=None, status=None, labels=None, authorization_id=None, flux=None, every=None, cron=None, offset=None, latest_completed=None, last_run_status=None, last_run_error=None, created_at=None, updated_at=None, links=None): # noqa: E501 """Task - a model defined in OpenAPI""" # noqa: E501 self._id = None @@ -87,6 +91,8 @@ def __init__(self, id=None, type=None, org_id=None, org=None, name=None, descrip self._cron = None self._offset = None self._latest_completed = None + self._last_run_status = None + self._last_run_error = None self._created_at = None self._updated_at = None self._links = None @@ -116,6 +122,10 @@ def __init__(self, id=None, type=None, org_id=None, org=None, name=None, descrip self.offset = offset if latest_completed is not None: self.latest_completed = latest_completed + if last_run_status is not None: + self.last_run_status = last_run_status + if last_run_error is not None: + self.last_run_error = last_run_error if created_at is not None: self.created_at = created_at if updated_at is not None: @@ -447,6 +457,48 @@ def latest_completed(self, latest_completed): self._latest_completed = latest_completed + @property + def last_run_status(self): + """Gets the last_run_status of this Task. # noqa: E501 + + + :return: The last_run_status of this Task. # noqa: E501 + :rtype: str + """ + return self._last_run_status + + @last_run_status.setter + def last_run_status(self, last_run_status): + """Sets the last_run_status of this Task. + + + :param last_run_status: The last_run_status of this Task. # noqa: E501 + :type: str + """ + + self._last_run_status = last_run_status + + @property + def last_run_error(self): + """Gets the last_run_error of this Task. # noqa: E501 + + + :return: The last_run_error of this Task. # noqa: E501 + :rtype: str + """ + return self._last_run_error + + @last_run_error.setter + def last_run_error(self, last_run_error): + """Sets the last_run_error of this Task. + + + :param last_run_error: The last_run_error of this Task. # noqa: E501 + :type: str + """ + + self._last_run_error = last_run_error + @property def created_at(self): """Gets the created_at of this Task. # noqa: E501 diff --git a/influxdb_client/domain/threshold_check.py b/influxdb_client/domain/threshold_check.py index bf8ac510..3321036a 100644 --- a/influxdb_client/domain/threshold_check.py +++ b/influxdb_client/domain/threshold_check.py @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.check_base import CheckBase +from influxdb_client.domain.check import Check -class ThresholdCheck(CheckBase): +class ThresholdCheck(Check): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,47 +33,17 @@ class ThresholdCheck(CheckBase): """ openapi_types = { 'type': 'str', - 'thresholds': 'list[Threshold]', - 'id': 'str', - 'name': 'str', - 'org_id': 'str', - 'owner_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'query': 'DashboardQuery', - 'status': 'TaskStatusType', - 'every': 'str', - 'offset': 'str', - 'tags': 'list[CheckBaseTags]', - 'description': 'str', - 'status_message_template': 'str', - 'labels': 'list[Label]', - 'links': 'CheckBaseLinks' + 'thresholds': 'list[Threshold]' } attribute_map = { 'type': 'type', - 'thresholds': 'thresholds', - 'id': 'id', - 'name': 'name', - 'org_id': 'orgID', - 'owner_id': 'ownerID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'query': 'query', - 'status': 'status', - 'every': 'every', - 'offset': 'offset', - 'tags': 'tags', - 'description': 'description', - 'status_message_template': 'statusMessageTemplate', - 'labels': 'labels', - 'links': 'links' + 'thresholds': 'thresholds' } - def __init__(self, type=None, thresholds=None, id=None, name=None, org_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, every=None, offset=None, tags=None, description=None, status_message_template=None, labels=None, links=None): # noqa: E501 + def __init__(self, type=None, thresholds=None): # noqa: E501 """ThresholdCheck - a model defined in OpenAPI""" # noqa: E501 - CheckBase.__init__(self, id=id, name=name, org_id=org_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, every=every, offset=offset, tags=tags, description=description, status_message_template=status_message_template, labels=labels, links=links) + Check.__init__(self) self._type = None self._thresholds = None diff --git a/influxdb_client/domain/variable.py b/influxdb_client/domain/variable.py index ec53280f..48d1f544 100644 --- a/influxdb_client/domain/variable.py +++ b/influxdb_client/domain/variable.py @@ -38,7 +38,7 @@ class Variable(object): 'description': 'str', 'selected': 'list[str]', 'labels': 'list[Label]', - 'arguments': 'object', + 'arguments': 'VariableProperties', 'created_at': 'datetime', 'updated_at': 'datetime' } @@ -246,7 +246,7 @@ def arguments(self): :return: The arguments of this Variable. # noqa: E501 - :rtype: object + :rtype: VariableProperties """ return self._arguments @@ -256,7 +256,7 @@ def arguments(self, arguments): :param arguments: The arguments of this Variable. # noqa: E501 - :type: object + :type: VariableProperties """ if arguments is None: raise ValueError("Invalid value for `arguments`, must not be `None`") # noqa: E501 diff --git a/influxdb_client/domain/variable_properties.py b/influxdb_client/domain/variable_properties.py new file mode 100644 index 00000000..ed242dbc --- /dev/null +++ b/influxdb_client/domain/variable_properties.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class VariableProperties(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """VariableProperties - a model defined in OpenAPI""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = 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, VariableProperties): + 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/influxdb_client/service/__init__.py b/influxdb_client/service/__init__.py index e198c658..02b84404 100644 --- a/influxdb_client/service/__init__.py +++ b/influxdb_client/service/__init__.py @@ -9,6 +9,7 @@ from influxdb_client.service.checks_service import ChecksService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService +from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService diff --git a/influxdb_client/service/buckets_service.py b/influxdb_client/service/buckets_service.py index 0c7ec4c5..6adb70e2 100644 --- a/influxdb_client/service/buckets_service.py +++ b/influxdb_client/service/buckets_service.py @@ -1280,16 +1280,16 @@ def patch_buckets_id_with_http_info(self, bucket_id, bucket, **kwargs): # noqa: _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats) - def post_buckets(self, bucket, **kwargs): # noqa: E501 + def post_buckets(self, post_bucket_request, **kwargs): # noqa: E501 """Create a bucket # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets(bucket, async_req=True) + >>> thread = api.post_buckets(post_bucket_request, async_req=True) >>> result = thread.get() :param async_req bool - :param Bucket bucket: Bucket to create (required) + :param PostBucketRequest post_bucket_request: Bucket to create (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, @@ -1297,21 +1297,21 @@ def post_buckets(self, bucket, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.post_buckets_with_http_info(bucket, **kwargs) # noqa: E501 + return self.post_buckets_with_http_info(post_bucket_request, **kwargs) # noqa: E501 else: - (data) = self.post_buckets_with_http_info(bucket, **kwargs) # noqa: E501 + (data) = self.post_buckets_with_http_info(post_bucket_request, **kwargs) # noqa: E501 return data - def post_buckets_with_http_info(self, bucket, **kwargs): # noqa: E501 + def post_buckets_with_http_info(self, post_bucket_request, **kwargs): # noqa: E501 """Create a bucket # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets_with_http_info(bucket, async_req=True) + >>> thread = api.post_buckets_with_http_info(post_bucket_request, async_req=True) >>> result = thread.get() :param async_req bool - :param Bucket bucket: Bucket to create (required) + :param PostBucketRequest post_bucket_request: Bucket to create (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, @@ -1320,7 +1320,7 @@ def post_buckets_with_http_info(self, bucket, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['bucket', 'zap_trace_span'] # noqa: E501 + all_params = ['post_bucket_request', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1334,10 +1334,10 @@ def post_buckets_with_http_info(self, bucket, **kwargs): # noqa: E501 ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'bucket' is set - if ('bucket' not in local_var_params or - local_var_params['bucket'] is None): - raise ValueError("Missing the required parameter `bucket` when calling `post_buckets`") # noqa: E501 + # verify the required parameter 'post_bucket_request' is set + if ('post_bucket_request' not in local_var_params or + local_var_params['post_bucket_request'] is None): + raise ValueError("Missing the required parameter `post_bucket_request` when calling `post_buckets`") # noqa: E501 collection_formats = {} @@ -1353,8 +1353,8 @@ def post_buckets_with_http_info(self, bucket, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'bucket' in local_var_params: - body_params = local_var_params['bucket'] + if 'post_bucket_request' in local_var_params: + body_params = local_var_params['post_bucket_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/influxdb_client/service/checks_service.py b/influxdb_client/service/checks_service.py index a0c2347f..92a1897a 100644 --- a/influxdb_client/service/checks_service.py +++ b/influxdb_client/service/checks_service.py @@ -32,37 +32,37 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_check(self, check, **kwargs): # noqa: E501 + def create_check(self, post_check, **kwargs): # noqa: E501 """Add new check # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_check(check, async_req=True) + >>> thread = api.create_check(post_check, async_req=True) >>> result = thread.get() :param async_req bool - :param Check check: Check to create (required) + :param PostCheck post_check: Check to create (required) :return: Check If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_check_with_http_info(check, **kwargs) # noqa: E501 + return self.create_check_with_http_info(post_check, **kwargs) # noqa: E501 else: - (data) = self.create_check_with_http_info(check, **kwargs) # noqa: E501 + (data) = self.create_check_with_http_info(post_check, **kwargs) # noqa: E501 return data - def create_check_with_http_info(self, check, **kwargs): # noqa: E501 + def create_check_with_http_info(self, post_check, **kwargs): # noqa: E501 """Add new check # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_check_with_http_info(check, async_req=True) + >>> thread = api.create_check_with_http_info(post_check, async_req=True) >>> result = thread.get() :param async_req bool - :param Check check: Check to create (required) + :param PostCheck post_check: Check to create (required) :return: Check If the method is called asynchronously, returns the request thread. @@ -70,7 +70,7 @@ def create_check_with_http_info(self, check, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['check'] # noqa: E501 + all_params = ['post_check'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -84,10 +84,10 @@ def create_check_with_http_info(self, check, **kwargs): # noqa: E501 ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'check' is set - if ('check' not in local_var_params or - local_var_params['check'] is None): - raise ValueError("Missing the required parameter `check` when calling `create_check`") # noqa: E501 + # verify the required parameter 'post_check' is set + if ('post_check' not in local_var_params or + local_var_params['post_check'] is None): + raise ValueError("Missing the required parameter `post_check` when calling `create_check`") # noqa: E501 collection_formats = {} @@ -101,8 +101,8 @@ def create_check_with_http_info(self, check, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'check' in local_var_params: - body_params = local_var_params['check'] + if 'post_check' in local_var_params: + body_params = local_var_params['post_check'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/influxdb_client/service/influx_packages_service.py b/influxdb_client/service/influx_packages_service.py new file mode 100644 index 00000000..1097832c --- /dev/null +++ b/influxdb_client/service/influx_packages_service.py @@ -0,0 +1,225 @@ +# coding: utf-8 + +""" + Influx API Service + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + + OpenAPI spec version: 0.1.0 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from influxdb_client.api_client import ApiClient + + +class InfluxPackagesService(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def apply_pkg(self, pkg_apply, **kwargs): # noqa: E501 + """Apply or dry run an influx package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_pkg(pkg_apply, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PkgApply pkg_apply: (required) + :return: PkgSummary + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.apply_pkg_with_http_info(pkg_apply, **kwargs) # noqa: E501 + else: + (data) = self.apply_pkg_with_http_info(pkg_apply, **kwargs) # noqa: E501 + return data + + def apply_pkg_with_http_info(self, pkg_apply, **kwargs): # noqa: E501 + """Apply or dry run an influx package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_pkg_with_http_info(pkg_apply, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PkgApply pkg_apply: (required) + :return: PkgSummary + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['pkg_apply'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method apply_pkg" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'pkg_apply' is set + if ('pkg_apply' not in local_var_params or + local_var_params['pkg_apply'] is None): + raise ValueError("Missing the required parameter `pkg_apply` when calling `apply_pkg`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'pkg_apply' in local_var_params: + body_params = local_var_params['pkg_apply'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/yml']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/packages/apply', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PkgSummary', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_pkg(self, **kwargs): # noqa: E501 + """Create a new Influx package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_pkg(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PkgCreate pkg_create: Influx package to create + :return: Pkg + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_pkg_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.create_pkg_with_http_info(**kwargs) # noqa: E501 + return data + + def create_pkg_with_http_info(self, **kwargs): # noqa: E501 + """Create a new Influx package # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_pkg_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param PkgCreate pkg_create: Influx package to create + :return: Pkg + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = ['pkg_create'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_pkg" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'pkg_create' in local_var_params: + body_params = local_var_params['pkg_create'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = [] # noqa: E501 + + return self.api_client.call_api( + '/api/v2/packages', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Pkg', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/influxdb_client/service/notification_endpoints_service.py b/influxdb_client/service/notification_endpoints_service.py index b3effdb0..18f2a511 100644 --- a/influxdb_client/service/notification_endpoints_service.py +++ b/influxdb_client/service/notification_endpoints_service.py @@ -32,37 +32,37 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_notification_endpoint(self, notification_endpoint, **kwargs): # noqa: E501 + def create_notification_endpoint(self, post_notification_endpoint, **kwargs): # noqa: E501 """Add a notification endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_endpoint(notification_endpoint, async_req=True) + >>> thread = api.create_notification_endpoint(post_notification_endpoint, async_req=True) >>> result = thread.get() :param async_req bool - :param NotificationEndpoint notification_endpoint: Notification endpoint to create (required) + :param PostNotificationEndpoint post_notification_endpoint: Notification endpoint to create (required) :return: NotificationEndpoint If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_notification_endpoint_with_http_info(notification_endpoint, **kwargs) # noqa: E501 + return self.create_notification_endpoint_with_http_info(post_notification_endpoint, **kwargs) # noqa: E501 else: - (data) = self.create_notification_endpoint_with_http_info(notification_endpoint, **kwargs) # noqa: E501 + (data) = self.create_notification_endpoint_with_http_info(post_notification_endpoint, **kwargs) # noqa: E501 return data - def create_notification_endpoint_with_http_info(self, notification_endpoint, **kwargs): # noqa: E501 + def create_notification_endpoint_with_http_info(self, post_notification_endpoint, **kwargs): # noqa: E501 """Add a notification endpoint # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_endpoint_with_http_info(notification_endpoint, async_req=True) + >>> thread = api.create_notification_endpoint_with_http_info(post_notification_endpoint, async_req=True) >>> result = thread.get() :param async_req bool - :param NotificationEndpoint notification_endpoint: Notification endpoint to create (required) + :param PostNotificationEndpoint post_notification_endpoint: Notification endpoint to create (required) :return: NotificationEndpoint If the method is called asynchronously, returns the request thread. @@ -70,7 +70,7 @@ def create_notification_endpoint_with_http_info(self, notification_endpoint, **k local_var_params = locals() - all_params = ['notification_endpoint'] # noqa: E501 + all_params = ['post_notification_endpoint'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -84,10 +84,10 @@ def create_notification_endpoint_with_http_info(self, notification_endpoint, **k ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'notification_endpoint' is set - if ('notification_endpoint' not in local_var_params or - local_var_params['notification_endpoint'] is None): - raise ValueError("Missing the required parameter `notification_endpoint` when calling `create_notification_endpoint`") # noqa: E501 + # verify the required parameter 'post_notification_endpoint' is set + if ('post_notification_endpoint' not in local_var_params or + local_var_params['post_notification_endpoint'] is None): + raise ValueError("Missing the required parameter `post_notification_endpoint` when calling `create_notification_endpoint`") # noqa: E501 collection_formats = {} @@ -101,8 +101,8 @@ def create_notification_endpoint_with_http_info(self, notification_endpoint, **k local_var_files = {} body_params = None - if 'notification_endpoint' in local_var_params: - body_params = local_var_params['notification_endpoint'] + if 'post_notification_endpoint' in local_var_params: + body_params = local_var_params['post_notification_endpoint'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/influxdb_client/service/notification_rules_service.py b/influxdb_client/service/notification_rules_service.py index fd535208..9d01d533 100644 --- a/influxdb_client/service/notification_rules_service.py +++ b/influxdb_client/service/notification_rules_service.py @@ -32,37 +32,37 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_notification_rule(self, notification_rule, **kwargs): # noqa: E501 + def create_notification_rule(self, post_notification_rule, **kwargs): # noqa: E501 """Add a notification rule # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_rule(notification_rule, async_req=True) + >>> thread = api.create_notification_rule(post_notification_rule, async_req=True) >>> result = thread.get() :param async_req bool - :param NotificationRule notification_rule: Notification rule to create (required) + :param PostNotificationRule post_notification_rule: Notification rule to create (required) :return: NotificationRule If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_notification_rule_with_http_info(notification_rule, **kwargs) # noqa: E501 + return self.create_notification_rule_with_http_info(post_notification_rule, **kwargs) # noqa: E501 else: - (data) = self.create_notification_rule_with_http_info(notification_rule, **kwargs) # noqa: E501 + (data) = self.create_notification_rule_with_http_info(post_notification_rule, **kwargs) # noqa: E501 return data - def create_notification_rule_with_http_info(self, notification_rule, **kwargs): # noqa: E501 + def create_notification_rule_with_http_info(self, post_notification_rule, **kwargs): # noqa: E501 """Add a notification rule # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_rule_with_http_info(notification_rule, async_req=True) + >>> thread = api.create_notification_rule_with_http_info(post_notification_rule, async_req=True) >>> result = thread.get() :param async_req bool - :param NotificationRule notification_rule: Notification rule to create (required) + :param PostNotificationRule post_notification_rule: Notification rule to create (required) :return: NotificationRule If the method is called asynchronously, returns the request thread. @@ -70,7 +70,7 @@ def create_notification_rule_with_http_info(self, notification_rule, **kwargs): local_var_params = locals() - all_params = ['notification_rule'] # noqa: E501 + all_params = ['post_notification_rule'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -84,10 +84,10 @@ def create_notification_rule_with_http_info(self, notification_rule, **kwargs): ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'notification_rule' is set - if ('notification_rule' not in local_var_params or - local_var_params['notification_rule'] is None): - raise ValueError("Missing the required parameter `notification_rule` when calling `create_notification_rule`") # noqa: E501 + # verify the required parameter 'post_notification_rule' is set + if ('post_notification_rule' not in local_var_params or + local_var_params['post_notification_rule'] is None): + raise ValueError("Missing the required parameter `post_notification_rule` when calling `create_notification_rule`") # noqa: E501 collection_formats = {} @@ -101,8 +101,8 @@ def create_notification_rule_with_http_info(self, notification_rule, **kwargs): local_var_files = {} body_params = None - if 'notification_rule' in local_var_params: - body_params = local_var_params['notification_rule'] + if 'post_notification_rule' in local_var_params: + body_params = local_var_params['post_notification_rule'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java b/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java index 15b00f23..71274118 100644 --- a/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java +++ b/openapi-generator/src/main/java/org/influxdata/codegen/InfluxPythonGenerator.java @@ -112,6 +112,53 @@ public CodegenModel fromModel(final String name, final Schema model, final Map + Influx package dry run successful, no new resources created. + The provided diff and summary will not have IDs for resources + that do not exist at the time of the dry run. + content: + application/json: + schema: + $ref: "#/components/schemas/PkgSummary" + '201': + description: > + Influx package applied successfully. Newly created resources created + available in summary. The diff compares the state of the world before + the package is applied with the changes the application will impose. + This corresponds to `"dryRun": true` + content: + application/json: + schema: + $ref: "#/components/schemas/PkgSummary" + default: + description: Unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" /tasks: get: operationId: GetTasks @@ -5200,7 +5267,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Check" + $ref: "#/components/schemas/PostCheck" responses: '201': description: Check created @@ -5494,7 +5561,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NotificationRule" + $ref: "#/components/schemas/PostNotificationRule" responses: '201': description: Notification rule created @@ -5854,7 +5921,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NotificationEndpoint" + $ref: "#/components/schemas/PostNotificationEndpoint" responses: '201': description: Notification endpoint created @@ -6249,7 +6316,7 @@ components: format: date-time predicate: description: sql where like delete statement - example: tag1="value1" and (tag2="value2" and tag3="value3") + example: tag1="value1" and (tag2="value2" and tag3!="value3") type: string Node: oneOf: @@ -6714,6 +6781,14 @@ components: - $ref: "#/components/schemas/AuthorizationUpdateRequest" - type: object properties: + createdAt: + type: string + format: date-time + readOnly: true + updatedAt: + type: string + format: date-time + readOnly: true orgID: type: string description: ID of org that authorization is scoped to. @@ -6765,6 +6840,34 @@ components: type: array items: $ref: "#/components/schemas/Authorization" + PostBucketRequest: + properties: + orgID: + type: string + name: + type: string + description: + type: string + rp: + type: string + retentionRules: + type: array + description: Rules to expire or retain data. No rules means data never expires. + items: + type: object + properties: + type: + type: string + default: expire + enum: + - expire + everySeconds: + type: integer + description: Duration in seconds for how long data will be kept in the database. + example: 86400 + minimum: 1 + required: [type, everySeconds] + required: [name, retentionRules] Bucket: properties: links: @@ -6987,6 +7090,244 @@ components: type: array items: $ref: "#/components/schemas/Organization" + PkgApply: + type: object + properties: + apply: + type: boolean + package: + $ref: "#/components/schemas/Pkg" + PkgCreate: + type: object + properties: + pkgName: + type: string + pkgDescription: + type: string + pkgVersion: + type: string + resources: + type: object + properties: + id: + type: string + kind: + type: string + enum: + - bucket + - dashboard + - label + - variable + name: + type: string + required: [id, kind] + Pkg: + type: object + properties: + apiVersion: + type: string + kind: + type: string + enum: + - package + meta: + type: object + properties: + description: + type: string + pkgName: + type: string + pkgVersion: + type: string + spec: + type: object + properties: + resources: + type: array + items: + type: object + PkgSummary: + type: object + properties: + summary: + type: object + properties: + buckets: + type: array + items: + allOf: + - $ref: "#/components/schemas/Bucket" + - type: object + properties: + labelAssociations: + type: array + items: + $ref: "#/components/schemas/Label" + labels: + type: array + items: + $ref: "#/components/schemas/Label" + dashboards: + type: array + items: + type: object + properties: + id: + type: "string" + orgID: + type: "string" + name: + type: "string" + description: + type: "string" + labelAssociations: + type: array + items: + $ref: "#/components/schemas/Label" + charts: + type: array + items: + $ref: "#/components/schemas/PkgChart" + labelMappings: + type: array + items: + type: object + properties: + resourceName: + type: string + resourceID: + type: string + resourceType: + type: string + labelName: + type: string + labelID: + type: string + variables: + type: array + items: + allOf: + - $ref: "#/components/schemas/Variable" + - type: object + properties: + labelAssociations: + type: array + items: + $ref: "#/components/schemas/Label" + diff: + type: object + properties: + buckets: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + oldDescription: + type: string + newDescription: + type: string + oldRP: + type: string + newRP: + type: string + dashboards: + type: array + items: + type: object + properties: + name: + type: string + description: + type: string + charts: + type: array + items: + $ref: "#/components/schemas/PkgChart" + labels: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + oldDescription: + type: string + newDescription: + type: string + oldColor: + type: string + newColor: + type: string + labelMappings: + type: array + items: + type: object + properties: + isNew: + type: boolean + resourceType: + type: string + resourceID: + type: string + resourceName: + type: string + labelID: + type: string + labelName: + type: string + variables: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + oldDescription: + type: string + newDescription: + type: string + oldArgs: + $ref: "#/components/schemas/VariableProperties" + newArgs: + $ref: "#/components/schemas/VariableProperties" + errors: + type: array + items: + type: object + properties: + kind: + type: string + reason: + type: string + fields: + type: array + items: + type: string + indexes: + type: array + items: + type: integer + PkgChart: + type: object + properties: + xPos: + type: integer + yPos: + type: integer + height: + type: integer + width: + type: integer + properties: # field name is properties + $ref: "#/components/schemas/ViewProperties" Runs: type: object properties: @@ -7129,6 +7470,16 @@ components: type: string format: date-time readOnly: true + lastRunStatus: + readOnly: true + type: string + enum: + - failed + - success + - canceled + lastRunError: + readOnly: true + type: string createdAt: type: string format: date-time @@ -8172,11 +8523,7 @@ components: labels: $ref: "#/components/schemas/Labels" arguments: - type: object - oneOf: - - $ref: "#/components/schemas/QueryVariableProperties" - - $ref: "#/components/schemas/ConstantVariableProperties" - - $ref: "#/components/schemas/MapVariableProperties" + $ref: "#/components/schemas/VariableProperties" createdAt: type: string format: date-time @@ -8222,6 +8569,12 @@ components: type: array items: $ref: "#/components/schemas/Variable" + VariableProperties: + type: object + oneOf: + - $ref: "#/components/schemas/QueryVariableProperties" + - $ref: "#/components/schemas/ConstantVariableProperties" + - $ref: "#/components/schemas/MapVariableProperties" ViewProperties: oneOf: - $ref: "#/components/schemas/LinePlusSingleStatProperties" @@ -9410,7 +9763,7 @@ components: enum: - active - inactive - Check: + CheckDiscriminator: oneOf: - $ref: "#/components/schemas/DeadmanCheck" - $ref: "#/components/schemas/ThresholdCheck" @@ -9419,6 +9772,12 @@ components: mapping: deadman: "#/components/schemas/DeadmanCheck" threshold: "#/components/schemas/ThresholdCheck" + Check: + allOf: + - $ref: "#/components/schemas/CheckDiscriminator" + PostCheck: + allOf: + - $ref: "#/components/schemas/CheckDiscriminator" Checks: properties: checks: @@ -9609,7 +9968,7 @@ components: enum: - active - inactive - NotificationRule: + NotificationRuleDiscriminator: oneOf: - $ref: "#/components/schemas/SlackNotificationRule" - $ref: "#/components/schemas/SMTPNotificationRule" @@ -9622,6 +9981,12 @@ components: smtp: "#/components/schemas/SMTPNotificationRule" pagerduty: "#/components/schemas/PagerDutyNotificationRule" http: "#/components/schemas/HTTPNotificationRule" + NotificationRule: + allOf: + - $ref: "#/components/schemas/NotificationRuleDiscriminator" + PostNotificationRule: + allOf: + - $ref: "#/components/schemas/NotificationRuleDiscriminator" NotificationRules: properties: notificationRules: @@ -9810,7 +10175,7 @@ components: enum: - active - inactive - NotificationEndpoint: + NotificationEndpointDiscriminator: oneOf: - $ref: "#/components/schemas/SlackNotificationEndpoint" - $ref: "#/components/schemas/PagerDutyNotificationEndpoint" @@ -9821,6 +10186,12 @@ components: slack: "#/components/schemas/SlackNotificationEndpoint" pagerduty: "#/components/schemas/PagerDutyNotificationEndpoint" http: "#/components/schemas/HTTPNotificationEndpoint" + NotificationEndpoint: + allOf: + - $ref: "#/components/schemas/NotificationEndpointDiscriminator" + PostNotificationEndpoint: + allOf: + - $ref: "#/components/schemas/NotificationEndpointDiscriminator" NotificationEndpoints: properties: notificationEndpoints: diff --git a/tests/__init__.py b/tests/__init__.py index e198c658..02b84404 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -9,6 +9,7 @@ from influxdb_client.service.checks_service import ChecksService from influxdb_client.service.dashboards_service import DashboardsService from influxdb_client.service.health_service import HealthService +from influxdb_client.service.influx_packages_service import InfluxPackagesService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService from influxdb_client.service.notification_rules_service import NotificationRulesService pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy