diff --git a/.circleci/config.yml b/.circleci/config.yml index af986815..d9ea1d2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ jobs: default: &default-python "circleci/python:3.6-buster" influxdb-image: type: string - default: "influxdb:latest" + default: &default-influxdb "influxdb:latest" enabled-ciso-8601: type: boolean default: true @@ -108,6 +108,23 @@ jobs: command: | pip install pydocstyle --user pydocstyle --count influxdb_client + check-examples: + docker: + - image: *default-python + environment: + PIPENV_VENV_IN_PROJECT: true + - image: *default-influxdb + environment: + INFLUXD_HTTP_BIND_ADDRESS: :8086 + steps: + - prepare + - run: + name: Checks that examples are runnable + command: | + pip install -e . --user + export PYTHONPATH="$PWD" + python examples/monitoring_and_alerting.py + python examples/buckets_management.py check-aws-lambda-layer: docker: - image: docker:19 @@ -129,6 +146,7 @@ workflows: - check-code-style - check-docstyle - check-twine + - check-examples - tests-python: name: test-3.6 - tests-python: diff --git a/CHANGELOG.md b/CHANGELOG.md index bf7506b8..cf4e8af2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ ## 1.18.0 [unreleased] +### Breaking Changes + +This release introduces a support for new InfluxDB OSS API definitions - [oss.yml](https://github.com/influxdata/openapi/blob/master/contracts/oss.yml). The following breaking changes are in underlying API services and doesn't affect common apis such as - `WriteApi`, `QueryApi`, `BucketsApi`, `OrganizationsApi`... +- `AuthorizationsService` uses `AuthorizationPostRequest` to create `Authorization` +- `BucketsService` uses `PatchBucketRequest` to update `Bucket` +- `DashboardsService` uses `PatchDashboardRequest` to update `Dashboard` +- `DeleteService` is used to delete tome series date instead of `DefaultService` +- `DBRPs` contains list of `DBRP` in `content` property +- `OrganizationsService` uses `PostOrganizationRequest` to create `Organization` +- `Run` contains list of `LogEvent` in `log` property +- `OrganizationsService` uses `PatchOrganizationRequest` to update `Organization` +- `OnboardingResponse` uses `UserResponse` as `user` property +- `ResourceMember` and `ResourceOwner` inherits from `UserResponse` +- `Users` contains list of `UserResponse` in `users` property +- `UsersService` uses `UserResponse` as a response to requests + ### Features 1. [#237](https://github.com/influxdata/influxdb-client-python/pull/237): Use kwargs to pass query parameters into API list call - useful for the ability to use pagination. 1. [#241](https://github.com/influxdata/influxdb-client-python/pull/241): Add detail error message for not supported type of `Point.field` @@ -8,6 +24,9 @@ ### Documentation 1. [#255](https://github.com/influxdata/influxdb-client-python/pull/255): Fix invalid description for env var `INFLUXDB_V2_CONNECTION_POOL_MAXSIZE` +### API +1. [#261](https://github.com/influxdata/influxdb-client-python/pull/261): Use InfluxDB OSS API definitions to generated APIs + ## 1.17.0 [2021-04-30] ### Features diff --git a/examples/README.md b/examples/README.md index c46e7861..cafef218 100644 --- a/examples/README.md +++ b/examples/README.md @@ -14,6 +14,7 @@ ## Management API - [buckets_management.py](buckets_management.py) - How to create, list and delete Buckets +- [monitoring_and_alerting.py](monitoring_and_alerting.py) - How to create the Check with Slack notification. ## Others - [influx_cloud.py](influx_cloud.py) - How to connect to InfluxDB 2 Cloud diff --git a/examples/monitoring_and_alerting.py b/examples/monitoring_and_alerting.py new file mode 100644 index 00000000..7cd80f11 --- /dev/null +++ b/examples/monitoring_and_alerting.py @@ -0,0 +1,121 @@ +""" +How to create a check with Slack notification. +""" +import datetime + +from influxdb_client.service.notification_rules_service import NotificationRulesService + +from influxdb_client.domain.rule_status_level import RuleStatusLevel + +from influxdb_client.domain.status_rule import StatusRule + +from influxdb_client.domain.slack_notification_rule import SlackNotificationRule + +from influxdb_client import InfluxDBClient +from influxdb_client.client.write_api import SYNCHRONOUS +from influxdb_client.domain.check_status_level import CheckStatusLevel +from influxdb_client.domain.dashboard_query import DashboardQuery +from influxdb_client.domain.lesser_threshold import LesserThreshold +from influxdb_client.domain.query_edit_mode import QueryEditMode +from influxdb_client.domain.slack_notification_endpoint import SlackNotificationEndpoint +from influxdb_client.domain.task_status_type import TaskStatusType +from influxdb_client.domain.threshold_check import ThresholdCheck +from influxdb_client.service.checks_service import ChecksService +from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService + +""" +Define credentials +""" +url = "http://localhost:8086" +token = "my-token" +org_name = "my-org" +bucket_name = "my-bucket" + + +with InfluxDBClient(url=url, token=token, org=org_name, debug=False) as client: + uniqueId = str(datetime.datetime.now()) + + """ + Find Organization ID by Organization API. + """ + org = client.organizations_api().find_organizations(org=org_name)[0] + + """ + Prepare data + """ + client.write_api(write_options=SYNCHRONOUS).write(record="mem,production=true free=40", bucket=bucket_name) + + """ + Create Threshold Check - set status to `Critical` if the current value is lesser than `35`. + """ + threshold = LesserThreshold(value=35.0, + level=CheckStatusLevel.CRIT) + query = f''' + from(bucket:"{bucket_name}") + |> range(start: v.timeRangeStart, stop: v.timeRangeStop) + |> filter(fn: (r) => r["_measurement"] == "mem") + |> filter(fn: (r) => r["_field"] == "free") + |> aggregateWindow(every: 1m, fn: mean, createEmpty: false) + |> yield(name: "mean") + ''' + + check = ThresholdCheck(name=f"Check created by Remote API_{uniqueId}", + status_message_template="The value is on: ${ r._level } level!", + every="5s", + offset="0s", + query=DashboardQuery(edit_mode=QueryEditMode.ADVANCED, text=query), + thresholds=[threshold], + org_id=org.id, + status=TaskStatusType.ACTIVE) + + checks_service = ChecksService(api_client=client.api_client) + checks_service.create_check(check) + + """ + Create Slack Notification endpoint + """ + notification_endpoint = SlackNotificationEndpoint(name=f"Slack Dev Channel_{uniqueId}", + url="https://hooks.slack.com/services/x/y/z", + org_id=org.id) + notification_endpoint_service = NotificationEndpointsService(api_client=client.api_client) + notification_endpoint = notification_endpoint_service.create_notification_endpoint(notification_endpoint) + + """ + Create Notification Rule to notify critical value to Slack Channel + """ + notification_rule = SlackNotificationRule(name=f"Critical status to Slack_{uniqueId}", + every="10s", + offset="0s", + message_template="${ r._message }", + status_rules=[StatusRule(current_level=RuleStatusLevel.CRIT)], + tag_rules=[], + endpoint_id=notification_endpoint.id, + org_id=org.id, + status=TaskStatusType.ACTIVE) + + notification_rules_service = NotificationRulesService(api_client=client.api_client) + notification_rules_service.create_notification_rule(notification_rule) + + """ + List all Checks + """ + print(f"\n------- Checks: -------\n") + checks = checks_service.get_checks(org_id=org.id).checks + print("\n".join([f" ---\n ID: {it.id}\n Name: {it.name}\n Type: {type(it)}" for it in checks])) + print("---") + + """ + List all Endpoints + """ + print(f"\n------- Notification Endpoints: -------\n") + notification_endpoints = notification_endpoint_service.get_notification_endpoints(org_id=org.id).notification_endpoints + print("\n".join([f" ---\n ID: {it.id}\n Name: {it.name}\n Type: {type(it)}" for it in notification_endpoints])) + print("---") + + """ + List all Notification Rules + """ + print(f"\n------- Notification Rules: -------\n") + notification_rules = notification_rules_service.get_notification_rules(org_id=org.id).notification_rules + print("\n".join([f" ---\n ID: {it.id}\n Name: {it.name}\n Type: {type(it)}" for it in notification_rules])) + print("---") diff --git a/influxdb_client/__init__.py b/influxdb_client/__init__.py index 2149412c..9026b928 100644 --- a/influxdb_client/__init__.py +++ b/influxdb_client/__init__.py @@ -3,11 +3,11 @@ # flake8: noqa """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -21,6 +21,7 @@ from influxdb_client.service.checks_service import ChecksService from influxdb_client.service.dbr_ps_service import DBRPsService from influxdb_client.service.dashboards_service import DashboardsService +from influxdb_client.service.delete_service import DeleteService from influxdb_client.service.health_service import HealthService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService @@ -52,12 +53,14 @@ from influxdb_client.domain.analyze_query_response_errors import AnalyzeQueryResponseErrors from influxdb_client.domain.array_expression import ArrayExpression from influxdb_client.domain.authorization import Authorization +from influxdb_client.domain.authorization_post_request import AuthorizationPostRequest from influxdb_client.domain.authorization_update_request import AuthorizationUpdateRequest from influxdb_client.domain.authorizations import Authorizations from influxdb_client.domain.axes import Axes from influxdb_client.domain.axis import Axis from influxdb_client.domain.axis_scale import AxisScale from influxdb_client.domain.bad_statement import BadStatement +from influxdb_client.domain.band_view_properties import BandViewProperties from influxdb_client.domain.binary_expression import BinaryExpression from influxdb_client.domain.block import Block from influxdb_client.domain.boolean_literal import BooleanLiteral @@ -65,6 +68,7 @@ from influxdb_client.domain.bucket_links import BucketLinks from influxdb_client.domain.bucket_retention_rules import BucketRetentionRules from influxdb_client.domain.buckets import Buckets +from influxdb_client.domain.builder_aggregate_function_type import BuilderAggregateFunctionType from influxdb_client.domain.builder_config import BuilderConfig from influxdb_client.domain.builder_config_aggregate_window import BuilderConfigAggregateWindow from influxdb_client.domain.builder_functions_type import BuilderFunctionsType @@ -74,10 +78,10 @@ from influxdb_client.domain.cell import Cell from influxdb_client.domain.cell_links import CellLinks from influxdb_client.domain.cell_update import CellUpdate +from influxdb_client.domain.cell_with_view_properties import CellWithViewProperties from influxdb_client.domain.check import Check 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 @@ -87,18 +91,22 @@ from influxdb_client.domain.constant_variable_properties import ConstantVariableProperties from influxdb_client.domain.create_cell import CreateCell from influxdb_client.domain.create_dashboard_request import CreateDashboardRequest +from influxdb_client.domain.custom_check import CustomCheck from influxdb_client.domain.dbrp import DBRP from influxdb_client.domain.dbrp_update import DBRPUpdate from influxdb_client.domain.dbr_ps import DBRPs from influxdb_client.domain.dashboard import Dashboard from influxdb_client.domain.dashboard_color import DashboardColor from influxdb_client.domain.dashboard_query import DashboardQuery +from influxdb_client.domain.dashboard_with_view_properties import DashboardWithViewProperties from influxdb_client.domain.dashboards import Dashboards from influxdb_client.domain.date_time_literal import DateTimeLiteral from influxdb_client.domain.deadman_check import DeadmanCheck from influxdb_client.domain.decimal_places import DecimalPlaces from influxdb_client.domain.delete_predicate_request import DeletePredicateRequest from influxdb_client.domain.dialect import Dialect +from influxdb_client.domain.dict_expression import DictExpression +from influxdb_client.domain.dict_item import DictItem from influxdb_client.domain.document import Document from influxdb_client.domain.document_create import DocumentCreate from influxdb_client.domain.document_links import DocumentLinks @@ -138,7 +146,6 @@ from influxdb_client.domain.label_update import LabelUpdate from influxdb_client.domain.labels_response import LabelsResponse from influxdb_client.domain.language_request import LanguageRequest -from influxdb_client.domain.legend import Legend from influxdb_client.domain.lesser_threshold import LesserThreshold from influxdb_client.domain.line_plus_single_stat_properties import LinePlusSingleStatProperties from influxdb_client.domain.line_protocol_error import LineProtocolError @@ -152,6 +159,7 @@ from influxdb_client.domain.member_assignment import MemberAssignment from influxdb_client.domain.member_expression import MemberExpression from influxdb_client.domain.model_property import ModelProperty +from influxdb_client.domain.mosaic_view_properties import MosaicViewProperties from influxdb_client.domain.node import Node from influxdb_client.domain.notification_endpoint import NotificationEndpoint from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase @@ -180,6 +188,10 @@ from influxdb_client.domain.pager_duty_notification_rule_base import PagerDutyNotificationRuleBase from influxdb_client.domain.paren_expression import ParenExpression from influxdb_client.domain.password_reset_body import PasswordResetBody +from influxdb_client.domain.patch_bucket_request import PatchBucketRequest +from influxdb_client.domain.patch_dashboard_request import PatchDashboardRequest +from influxdb_client.domain.patch_organization_request import PatchOrganizationRequest +from influxdb_client.domain.patch_retention_rule import PatchRetentionRule from influxdb_client.domain.permission import Permission from influxdb_client.domain.permission_resource import PermissionResource from influxdb_client.domain.pipe_expression import PipeExpression @@ -188,6 +200,7 @@ 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.post_organization_request import PostOrganizationRequest from influxdb_client.domain.property_key import PropertyKey from influxdb_client.domain.query import Query from influxdb_client.domain.query_edit_mode import QueryEditMode @@ -199,6 +212,7 @@ from influxdb_client.domain.renamable_field import RenamableField from influxdb_client.domain.resource_member import ResourceMember from influxdb_client.domain.resource_members import ResourceMembers +from influxdb_client.domain.resource_members_links import ResourceMembersLinks from influxdb_client.domain.resource_owner import ResourceOwner from influxdb_client.domain.resource_owners import ResourceOwners from influxdb_client.domain.return_statement import ReturnStatement @@ -209,12 +223,12 @@ from influxdb_client.domain.rule_status_level import RuleStatusLevel from influxdb_client.domain.run import Run from influxdb_client.domain.run_links import RunLinks -from influxdb_client.domain.run_log import RunLog from influxdb_client.domain.run_manually import RunManually from influxdb_client.domain.runs import Runs from influxdb_client.domain.smtp_notification_rule import SMTPNotificationRule from influxdb_client.domain.smtp_notification_rule_base import SMTPNotificationRuleBase from influxdb_client.domain.scatter_view_properties import ScatterViewProperties +from influxdb_client.domain.schema_type import SchemaType from influxdb_client.domain.scraper_target_request import ScraperTargetRequest from influxdb_client.domain.scraper_target_response import ScraperTargetResponse from influxdb_client.domain.scraper_target_responses import ScraperTargetResponses @@ -228,9 +242,11 @@ from influxdb_client.domain.source_links import SourceLinks from influxdb_client.domain.sources import Sources from influxdb_client.domain.statement import Statement +from influxdb_client.domain.static_legend import StaticLegend from influxdb_client.domain.status_rule import StatusRule from influxdb_client.domain.string_literal import StringLiteral from influxdb_client.domain.table_view_properties import TableViewProperties +from influxdb_client.domain.table_view_properties_table_options import TableViewPropertiesTableOptions from influxdb_client.domain.tag_rule import TagRule from influxdb_client.domain.task import Task from influxdb_client.domain.task_create_request import TaskCreateRequest @@ -240,9 +256,13 @@ from influxdb_client.domain.tasks import Tasks from influxdb_client.domain.telegraf import Telegraf from influxdb_client.domain.telegraf_plugin import TelegrafPlugin +from influxdb_client.domain.telegraf_plugins import TelegrafPlugins from influxdb_client.domain.telegraf_request import TelegrafRequest from influxdb_client.domain.telegraf_request_metadata import TelegrafRequestMetadata from influxdb_client.domain.telegrafs import Telegrafs +from influxdb_client.domain.telegram_notification_endpoint import TelegramNotificationEndpoint +from influxdb_client.domain.telegram_notification_rule import TelegramNotificationRule +from influxdb_client.domain.telegram_notification_rule_base import TelegramNotificationRuleBase from influxdb_client.domain.test_statement import TestStatement from influxdb_client.domain.threshold import Threshold from influxdb_client.domain.threshold_base import ThresholdBase @@ -250,9 +270,9 @@ from influxdb_client.domain.unary_expression import UnaryExpression from influxdb_client.domain.unsigned_integer_literal import UnsignedIntegerLiteral from influxdb_client.domain.user import User -from influxdb_client.domain.user_links import UserLinks +from influxdb_client.domain.user_response import UserResponse +from influxdb_client.domain.user_response_links import UserResponseLinks from influxdb_client.domain.users import Users -from influxdb_client.domain.users_links import UsersLinks from influxdb_client.domain.variable import Variable from influxdb_client.domain.variable_assignment import VariableAssignment from influxdb_client.domain.variable_links import VariableLinks diff --git a/influxdb_client/api_client.py b/influxdb_client/api_client.py index 6727e2b7..b1f80f91 100644 --- a/influxdb_client/api_client.py +++ b/influxdb_client/api_client.py @@ -1,10 +1,10 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/client/authorizations_api.py b/influxdb_client/client/authorizations_api.py index 9c5bfe84..b7179b62 100644 --- a/influxdb_client/client/authorizations_api.py +++ b/influxdb_client/client/authorizations_api.py @@ -23,11 +23,11 @@ def create_authorization(self, org_id=None, permissions: list = None, """ if authorization is not None: - return self._authorizations_service.post_authorizations(authorization=authorization) + return self._authorizations_service.post_authorizations(authorization_post_request=authorization) # if org_id is not None and permissions is not None: authorization = Authorization(org_id=org_id, permissions=permissions) - return self._authorizations_service.post_authorizations(authorization=authorization) + return self._authorizations_service.post_authorizations(authorization_post_request=authorization) def find_authorization_by_id(self, auth_id: str) -> Authorization: """ diff --git a/influxdb_client/client/bucket_api.py b/influxdb_client/client/bucket_api.py index c20e6c59..4ffa5114 100644 --- a/influxdb_client/client/bucket_api.py +++ b/influxdb_client/client/bucket_api.py @@ -42,12 +42,10 @@ def create_bucket(self, bucket=None, bucket_name=None, org_id=None, retention_ru rules.append(retention_rules) if bucket is None: - - 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 + bucket = PostBucketRequest(name=bucket_name, + retention_rules=rules, + description=description, + org_id=self._influxdb_client.org if org_id is None else org_id) return self._buckets_service.post_buckets(post_bucket_request=bucket) diff --git a/influxdb_client/client/delete_api.py b/influxdb_client/client/delete_api.py index 35af7e55..fda69252 100644 --- a/influxdb_client/client/delete_api.py +++ b/influxdb_client/client/delete_api.py @@ -2,7 +2,7 @@ import datetime -from influxdb_client import DefaultService, DeletePredicateRequest +from influxdb_client import DeleteService, DeletePredicateRequest class DeleteApi(object): @@ -11,7 +11,7 @@ class DeleteApi(object): def __init__(self, influxdb_client): """Initialize defaults.""" self._influxdb_client = influxdb_client - self._service = DefaultService(influxdb_client.api_client) + self._service = DeleteService(influxdb_client.api_client) def delete(self, start: datetime, stop: object, predicate: object, bucket: str, org: str) -> None: """ @@ -25,4 +25,4 @@ def delete(self, start: datetime, stop: object, predicate: object, bucket: str, :return: """ predicate_request = DeletePredicateRequest(start=start, stop=stop, predicate=predicate) - return self._service.delete_post(delete_predicate_request=predicate_request, bucket=bucket, org=org) + return self._service.post_delete(delete_predicate_request=predicate_request, bucket=bucket, org=org) diff --git a/influxdb_client/client/organizations_api.py b/influxdb_client/client/organizations_api.py index 6c1301e0..3a2531bb 100644 --- a/influxdb_client/client/organizations_api.py +++ b/influxdb_client/client/organizations_api.py @@ -43,7 +43,7 @@ def create_organization(self, name: str = None, organization: Organization = Non """Create an organization.""" if organization is None: organization = Organization(name=name) - return self._organizations_service.post_orgs(organization=organization) + return self._organizations_service.post_orgs(post_organization_request=organization) def delete_organization(self, org_id: str): """Delete an organization.""" diff --git a/influxdb_client/configuration.py b/influxdb_client/configuration.py index c0f4f0f1..f8b663ee 100644 --- a/influxdb_client/configuration.py +++ b/influxdb_client/configuration.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -242,7 +242,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 0.1.0\n"\ + "Version of the API: 2.0.0\n"\ "SDK Package Version: 1.18.0dev".\ format(env=sys.platform, pyversion=sys.version) diff --git a/influxdb_client/domain/__init__.py b/influxdb_client/domain/__init__.py index d8864244..d1f3b363 100644 --- a/influxdb_client/domain/__init__.py +++ b/influxdb_client/domain/__init__.py @@ -2,11 +2,11 @@ # flake8: noqa """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -20,12 +20,14 @@ from influxdb_client.domain.analyze_query_response_errors import AnalyzeQueryResponseErrors from influxdb_client.domain.array_expression import ArrayExpression from influxdb_client.domain.authorization import Authorization +from influxdb_client.domain.authorization_post_request import AuthorizationPostRequest from influxdb_client.domain.authorization_update_request import AuthorizationUpdateRequest from influxdb_client.domain.authorizations import Authorizations from influxdb_client.domain.axes import Axes from influxdb_client.domain.axis import Axis from influxdb_client.domain.axis_scale import AxisScale from influxdb_client.domain.bad_statement import BadStatement +from influxdb_client.domain.band_view_properties import BandViewProperties from influxdb_client.domain.binary_expression import BinaryExpression from influxdb_client.domain.block import Block from influxdb_client.domain.boolean_literal import BooleanLiteral @@ -33,6 +35,7 @@ from influxdb_client.domain.bucket_links import BucketLinks from influxdb_client.domain.bucket_retention_rules import BucketRetentionRules from influxdb_client.domain.buckets import Buckets +from influxdb_client.domain.builder_aggregate_function_type import BuilderAggregateFunctionType from influxdb_client.domain.builder_config import BuilderConfig from influxdb_client.domain.builder_config_aggregate_window import BuilderConfigAggregateWindow from influxdb_client.domain.builder_functions_type import BuilderFunctionsType @@ -42,10 +45,10 @@ from influxdb_client.domain.cell import Cell from influxdb_client.domain.cell_links import CellLinks from influxdb_client.domain.cell_update import CellUpdate +from influxdb_client.domain.cell_with_view_properties import CellWithViewProperties from influxdb_client.domain.check import Check 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 @@ -55,18 +58,22 @@ from influxdb_client.domain.constant_variable_properties import ConstantVariableProperties from influxdb_client.domain.create_cell import CreateCell from influxdb_client.domain.create_dashboard_request import CreateDashboardRequest +from influxdb_client.domain.custom_check import CustomCheck from influxdb_client.domain.dbrp import DBRP from influxdb_client.domain.dbrp_update import DBRPUpdate from influxdb_client.domain.dbr_ps import DBRPs from influxdb_client.domain.dashboard import Dashboard from influxdb_client.domain.dashboard_color import DashboardColor from influxdb_client.domain.dashboard_query import DashboardQuery +from influxdb_client.domain.dashboard_with_view_properties import DashboardWithViewProperties from influxdb_client.domain.dashboards import Dashboards from influxdb_client.domain.date_time_literal import DateTimeLiteral from influxdb_client.domain.deadman_check import DeadmanCheck from influxdb_client.domain.decimal_places import DecimalPlaces from influxdb_client.domain.delete_predicate_request import DeletePredicateRequest from influxdb_client.domain.dialect import Dialect +from influxdb_client.domain.dict_expression import DictExpression +from influxdb_client.domain.dict_item import DictItem from influxdb_client.domain.document import Document from influxdb_client.domain.document_create import DocumentCreate from influxdb_client.domain.document_links import DocumentLinks @@ -106,7 +113,6 @@ from influxdb_client.domain.label_update import LabelUpdate from influxdb_client.domain.labels_response import LabelsResponse from influxdb_client.domain.language_request import LanguageRequest -from influxdb_client.domain.legend import Legend from influxdb_client.domain.lesser_threshold import LesserThreshold from influxdb_client.domain.line_plus_single_stat_properties import LinePlusSingleStatProperties from influxdb_client.domain.line_protocol_error import LineProtocolError @@ -120,6 +126,7 @@ from influxdb_client.domain.member_assignment import MemberAssignment from influxdb_client.domain.member_expression import MemberExpression from influxdb_client.domain.model_property import ModelProperty +from influxdb_client.domain.mosaic_view_properties import MosaicViewProperties from influxdb_client.domain.node import Node from influxdb_client.domain.notification_endpoint import NotificationEndpoint from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase @@ -148,6 +155,10 @@ from influxdb_client.domain.pager_duty_notification_rule_base import PagerDutyNotificationRuleBase from influxdb_client.domain.paren_expression import ParenExpression from influxdb_client.domain.password_reset_body import PasswordResetBody +from influxdb_client.domain.patch_bucket_request import PatchBucketRequest +from influxdb_client.domain.patch_dashboard_request import PatchDashboardRequest +from influxdb_client.domain.patch_organization_request import PatchOrganizationRequest +from influxdb_client.domain.patch_retention_rule import PatchRetentionRule from influxdb_client.domain.permission import Permission from influxdb_client.domain.permission_resource import PermissionResource from influxdb_client.domain.pipe_expression import PipeExpression @@ -156,6 +167,7 @@ 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.post_organization_request import PostOrganizationRequest from influxdb_client.domain.property_key import PropertyKey from influxdb_client.domain.query import Query from influxdb_client.domain.query_edit_mode import QueryEditMode @@ -167,6 +179,7 @@ from influxdb_client.domain.renamable_field import RenamableField from influxdb_client.domain.resource_member import ResourceMember from influxdb_client.domain.resource_members import ResourceMembers +from influxdb_client.domain.resource_members_links import ResourceMembersLinks from influxdb_client.domain.resource_owner import ResourceOwner from influxdb_client.domain.resource_owners import ResourceOwners from influxdb_client.domain.return_statement import ReturnStatement @@ -177,12 +190,12 @@ from influxdb_client.domain.rule_status_level import RuleStatusLevel from influxdb_client.domain.run import Run from influxdb_client.domain.run_links import RunLinks -from influxdb_client.domain.run_log import RunLog from influxdb_client.domain.run_manually import RunManually from influxdb_client.domain.runs import Runs from influxdb_client.domain.smtp_notification_rule import SMTPNotificationRule from influxdb_client.domain.smtp_notification_rule_base import SMTPNotificationRuleBase from influxdb_client.domain.scatter_view_properties import ScatterViewProperties +from influxdb_client.domain.schema_type import SchemaType from influxdb_client.domain.scraper_target_request import ScraperTargetRequest from influxdb_client.domain.scraper_target_response import ScraperTargetResponse from influxdb_client.domain.scraper_target_responses import ScraperTargetResponses @@ -196,9 +209,11 @@ from influxdb_client.domain.source_links import SourceLinks from influxdb_client.domain.sources import Sources from influxdb_client.domain.statement import Statement +from influxdb_client.domain.static_legend import StaticLegend from influxdb_client.domain.status_rule import StatusRule from influxdb_client.domain.string_literal import StringLiteral from influxdb_client.domain.table_view_properties import TableViewProperties +from influxdb_client.domain.table_view_properties_table_options import TableViewPropertiesTableOptions from influxdb_client.domain.tag_rule import TagRule from influxdb_client.domain.task import Task from influxdb_client.domain.task_create_request import TaskCreateRequest @@ -208,9 +223,13 @@ from influxdb_client.domain.tasks import Tasks from influxdb_client.domain.telegraf import Telegraf from influxdb_client.domain.telegraf_plugin import TelegrafPlugin +from influxdb_client.domain.telegraf_plugins import TelegrafPlugins from influxdb_client.domain.telegraf_request import TelegrafRequest from influxdb_client.domain.telegraf_request_metadata import TelegrafRequestMetadata from influxdb_client.domain.telegrafs import Telegrafs +from influxdb_client.domain.telegram_notification_endpoint import TelegramNotificationEndpoint +from influxdb_client.domain.telegram_notification_rule import TelegramNotificationRule +from influxdb_client.domain.telegram_notification_rule_base import TelegramNotificationRuleBase from influxdb_client.domain.test_statement import TestStatement from influxdb_client.domain.threshold import Threshold from influxdb_client.domain.threshold_base import ThresholdBase @@ -218,9 +237,9 @@ from influxdb_client.domain.unary_expression import UnaryExpression from influxdb_client.domain.unsigned_integer_literal import UnsignedIntegerLiteral from influxdb_client.domain.user import User -from influxdb_client.domain.user_links import UserLinks +from influxdb_client.domain.user_response import UserResponse +from influxdb_client.domain.user_response_links import UserResponseLinks from influxdb_client.domain.users import Users -from influxdb_client.domain.users_links import UsersLinks from influxdb_client.domain.variable import Variable from influxdb_client.domain.variable_assignment import VariableAssignment from influxdb_client.domain.variable_links import VariableLinks diff --git a/influxdb_client/domain/add_resource_member_request_body.py b/influxdb_client/domain/add_resource_member_request_body.py index 658ae6f6..6424c1b5 100644 --- a/influxdb_client/domain/add_resource_member_request_body.py +++ b/influxdb_client/domain/add_resource_member_request_body.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/analyze_query_response.py b/influxdb_client/domain/analyze_query_response.py index e1eefc91..da1f36a9 100644 --- a/influxdb_client/domain/analyze_query_response.py +++ b/influxdb_client/domain/analyze_query_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/analyze_query_response_errors.py b/influxdb_client/domain/analyze_query_response_errors.py index 62ed92d0..eb51ddad 100644 --- a/influxdb_client/domain/analyze_query_response_errors.py +++ b/influxdb_client/domain/analyze_query_response_errors.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/array_expression.py b/influxdb_client/domain/array_expression.py index a9db861e..d282dcef 100644 --- a/influxdb_client/domain/array_expression.py +++ b/influxdb_client/domain/array_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class ArrayExpression(object): +class ArrayExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class ArrayExpression(object): def __init__(self, type=None, elements=None): # noqa: E501,D401,D403 """ArrayExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._elements = None self.discriminator = None diff --git a/influxdb_client/domain/ast_response.py b/influxdb_client/domain/ast_response.py index 4f665b07..fd622531 100644 --- a/influxdb_client/domain/ast_response.py +++ b/influxdb_client/domain/ast_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/authorization.py b/influxdb_client/domain/authorization.py index 3859dc0c..45b2e75c 100644 --- a/influxdb_client/domain/authorization.py +++ b/influxdb_client/domain/authorization.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/authorization_post_request.py b/influxdb_client/domain/authorization_post_request.py new file mode 100644 index 00000000..d4ac6f4d --- /dev/null +++ b/influxdb_client/domain/authorization_post_request.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.authorization_update_request import AuthorizationUpdateRequest + + +class AuthorizationPostRequest(AuthorizationUpdateRequest): + """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', + 'user_id': 'str', + 'permissions': 'list[Permission]', + 'status': 'str', + 'description': 'str' + } + + attribute_map = { + 'org_id': 'orgID', + 'user_id': 'userID', + 'permissions': 'permissions', + 'status': 'status', + 'description': 'description' + } + + def __init__(self, org_id=None, user_id=None, permissions=None, status='active', description=None): # noqa: E501,D401,D403 + """AuthorizationPostRequest - a model defined in OpenAPI.""" # noqa: E501 + AuthorizationUpdateRequest.__init__(self, status=status, description=description) # noqa: E501 + + self._org_id = None + self._user_id = None + self._permissions = None + self.discriminator = None + + if org_id is not None: + self.org_id = org_id + if user_id is not None: + self.user_id = user_id + if permissions is not None: + self.permissions = permissions + + @property + def org_id(self): + """Get the org_id of this AuthorizationPostRequest. + + ID of org that authorization is scoped to. + + :return: The org_id of this AuthorizationPostRequest. + :rtype: str + """ # noqa: E501 + return self._org_id + + @org_id.setter + def org_id(self, org_id): + """Set the org_id of this AuthorizationPostRequest. + + ID of org that authorization is scoped to. + + :param org_id: The org_id of this AuthorizationPostRequest. + :type: str + """ # noqa: E501 + self._org_id = org_id + + @property + def user_id(self): + """Get the user_id of this AuthorizationPostRequest. + + ID of user that authorization is scoped to. + + :return: The user_id of this AuthorizationPostRequest. + :rtype: str + """ # noqa: E501 + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Set the user_id of this AuthorizationPostRequest. + + ID of user that authorization is scoped to. + + :param user_id: The user_id of this AuthorizationPostRequest. + :type: str + """ # noqa: E501 + self._user_id = user_id + + @property + def permissions(self): + """Get the permissions of this AuthorizationPostRequest. + + List of permissions for an auth. An auth must have at least one Permission. + + :return: The permissions of this AuthorizationPostRequest. + :rtype: list[Permission] + """ # noqa: E501 + return self._permissions + + @permissions.setter + def permissions(self, permissions): + """Set the permissions of this AuthorizationPostRequest. + + List of permissions for an auth. An auth must have at least one Permission. + + :param permissions: The permissions of this AuthorizationPostRequest. + :type: list[Permission] + """ # noqa: E501 + self._permissions = permissions + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, AuthorizationPostRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/authorization_update_request.py b/influxdb_client/domain/authorization_update_request.py index 0d90d582..6a03f442 100644 --- a/influxdb_client/domain/authorization_update_request.py +++ b/influxdb_client/domain/authorization_update_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/authorizations.py b/influxdb_client/domain/authorizations.py index a641b8af..0081ce71 100644 --- a/influxdb_client/domain/authorizations.py +++ b/influxdb_client/domain/authorizations.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/axes.py b/influxdb_client/domain/axes.py index 68216208..38784fbb 100644 --- a/influxdb_client/domain/axes.py +++ b/influxdb_client/domain/axes.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/axis.py b/influxdb_client/domain/axis.py index 2adafdaa..a822bfe2 100644 --- a/influxdb_client/domain/axis.py +++ b/influxdb_client/domain/axis.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/axis_scale.py b/influxdb_client/domain/axis_scale.py index 24f54160..e6652b7c 100644 --- a/influxdb_client/domain/axis_scale.py +++ b/influxdb_client/domain/axis_scale.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/bad_statement.py b/influxdb_client/domain/bad_statement.py index 88337554..71df966f 100644 --- a/influxdb_client/domain/bad_statement.py +++ b/influxdb_client/domain/bad_statement.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class BadStatement(object): +class BadStatement(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class BadStatement(object): def __init__(self, type=None, text=None): # noqa: E501,D401,D403 """BadStatement - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._text = None self.discriminator = None diff --git a/influxdb_client/domain/band_view_properties.py b/influxdb_client/domain/band_view_properties.py new file mode 100644 index 00000000..ab8d9f98 --- /dev/null +++ b/influxdb_client/domain/band_view_properties.py @@ -0,0 +1,749 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.view_properties import ViewProperties + + +class BandViewProperties(ViewProperties): + """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 = { + 'time_format': 'str', + 'type': 'str', + 'queries': 'list[DashboardQuery]', + 'colors': 'list[DashboardColor]', + 'shape': 'str', + 'note': 'str', + 'show_note_when_empty': 'bool', + 'axes': 'Axes', + 'static_legend': 'StaticLegend', + 'x_column': 'str', + 'generate_x_axis_ticks': 'list[str]', + 'x_total_ticks': 'int', + 'x_tick_start': 'float', + 'x_tick_step': 'float', + 'y_column': 'str', + 'generate_y_axis_ticks': 'list[str]', + 'y_total_ticks': 'int', + 'y_tick_start': 'float', + 'y_tick_step': 'float', + 'upper_column': 'str', + 'main_column': 'str', + 'lower_column': 'str', + 'hover_dimension': 'str', + 'geom': 'XYGeom', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' + } + + attribute_map = { + 'time_format': 'timeFormat', + 'type': 'type', + 'queries': 'queries', + 'colors': 'colors', + 'shape': 'shape', + 'note': 'note', + 'show_note_when_empty': 'showNoteWhenEmpty', + 'axes': 'axes', + 'static_legend': 'staticLegend', + 'x_column': 'xColumn', + 'generate_x_axis_ticks': 'generateXAxisTicks', + 'x_total_ticks': 'xTotalTicks', + 'x_tick_start': 'xTickStart', + 'x_tick_step': 'xTickStep', + 'y_column': 'yColumn', + 'generate_y_axis_ticks': 'generateYAxisTicks', + 'y_total_ticks': 'yTotalTicks', + 'y_tick_start': 'yTickStart', + 'y_tick_step': 'yTickStep', + 'upper_column': 'upperColumn', + 'main_column': 'mainColumn', + 'lower_column': 'lowerColumn', + 'hover_dimension': 'hoverDimension', + 'geom': 'geom', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' + } + + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, upper_column=None, main_column=None, lower_column=None, hover_dimension=None, geom=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + """BandViewProperties - a model defined in OpenAPI.""" # noqa: E501 + ViewProperties.__init__(self) # noqa: E501 + + self._time_format = None + self._type = None + self._queries = None + self._colors = None + self._shape = None + self._note = None + self._show_note_when_empty = None + self._axes = None + self._static_legend = None + self._x_column = None + self._generate_x_axis_ticks = None + self._x_total_ticks = None + self._x_tick_start = None + self._x_tick_step = None + self._y_column = None + self._generate_y_axis_ticks = None + self._y_total_ticks = None + self._y_tick_start = None + self._y_tick_step = None + self._upper_column = None + self._main_column = None + self._lower_column = None + self._hover_dimension = None + self._geom = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None + self.discriminator = None + + if time_format is not None: + self.time_format = time_format + self.type = type + self.queries = queries + self.colors = colors + self.shape = shape + self.note = note + self.show_note_when_empty = show_note_when_empty + self.axes = axes + if static_legend is not None: + self.static_legend = static_legend + if x_column is not None: + self.x_column = x_column + if generate_x_axis_ticks is not None: + self.generate_x_axis_ticks = generate_x_axis_ticks + if x_total_ticks is not None: + self.x_total_ticks = x_total_ticks + if x_tick_start is not None: + self.x_tick_start = x_tick_start + if x_tick_step is not None: + self.x_tick_step = x_tick_step + if y_column is not None: + self.y_column = y_column + if generate_y_axis_ticks is not None: + self.generate_y_axis_ticks = generate_y_axis_ticks + if y_total_ticks is not None: + self.y_total_ticks = y_total_ticks + if y_tick_start is not None: + self.y_tick_start = y_tick_start + if y_tick_step is not None: + self.y_tick_step = y_tick_step + if upper_column is not None: + self.upper_column = upper_column + if main_column is not None: + self.main_column = main_column + if lower_column is not None: + self.lower_column = lower_column + if hover_dimension is not None: + self.hover_dimension = hover_dimension + self.geom = geom + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold + + @property + def time_format(self): + """Get the time_format of this BandViewProperties. + + :return: The time_format of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._time_format + + @time_format.setter + def time_format(self, time_format): + """Set the time_format of this BandViewProperties. + + :param time_format: The time_format of this BandViewProperties. + :type: str + """ # noqa: E501 + self._time_format = time_format + + @property + def type(self): + """Get the type of this BandViewProperties. + + :return: The type of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this BandViewProperties. + + :param type: The type of this BandViewProperties. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + @property + def queries(self): + """Get the queries of this BandViewProperties. + + :return: The queries of this BandViewProperties. + :rtype: list[DashboardQuery] + """ # noqa: E501 + return self._queries + + @queries.setter + def queries(self, queries): + """Set the queries of this BandViewProperties. + + :param queries: The queries of this BandViewProperties. + :type: list[DashboardQuery] + """ # noqa: E501 + if queries is None: + raise ValueError("Invalid value for `queries`, must not be `None`") # noqa: E501 + self._queries = queries + + @property + def colors(self): + """Get the colors of this BandViewProperties. + + Colors define color encoding of data into a visualization + + :return: The colors of this BandViewProperties. + :rtype: list[DashboardColor] + """ # noqa: E501 + return self._colors + + @colors.setter + def colors(self, colors): + """Set the colors of this BandViewProperties. + + Colors define color encoding of data into a visualization + + :param colors: The colors of this BandViewProperties. + :type: list[DashboardColor] + """ # noqa: E501 + if colors is None: + raise ValueError("Invalid value for `colors`, must not be `None`") # noqa: E501 + self._colors = colors + + @property + def shape(self): + """Get the shape of this BandViewProperties. + + :return: The shape of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._shape + + @shape.setter + def shape(self, shape): + """Set the shape of this BandViewProperties. + + :param shape: The shape of this BandViewProperties. + :type: str + """ # noqa: E501 + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + self._shape = shape + + @property + def note(self): + """Get the note of this BandViewProperties. + + :return: The note of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._note + + @note.setter + def note(self, note): + """Set the note of this BandViewProperties. + + :param note: The note of this BandViewProperties. + :type: str + """ # noqa: E501 + if note is None: + raise ValueError("Invalid value for `note`, must not be `None`") # noqa: E501 + self._note = note + + @property + def show_note_when_empty(self): + """Get the show_note_when_empty of this BandViewProperties. + + If true, will display note when empty + + :return: The show_note_when_empty of this BandViewProperties. + :rtype: bool + """ # noqa: E501 + return self._show_note_when_empty + + @show_note_when_empty.setter + def show_note_when_empty(self, show_note_when_empty): + """Set the show_note_when_empty of this BandViewProperties. + + If true, will display note when empty + + :param show_note_when_empty: The show_note_when_empty of this BandViewProperties. + :type: bool + """ # noqa: E501 + if show_note_when_empty is None: + raise ValueError("Invalid value for `show_note_when_empty`, must not be `None`") # noqa: E501 + self._show_note_when_empty = show_note_when_empty + + @property + def axes(self): + """Get the axes of this BandViewProperties. + + :return: The axes of this BandViewProperties. + :rtype: Axes + """ # noqa: E501 + return self._axes + + @axes.setter + def axes(self, axes): + """Set the axes of this BandViewProperties. + + :param axes: The axes of this BandViewProperties. + :type: Axes + """ # noqa: E501 + if axes is None: + raise ValueError("Invalid value for `axes`, must not be `None`") # noqa: E501 + self._axes = axes + + @property + def static_legend(self): + """Get the static_legend of this BandViewProperties. + + :return: The static_legend of this BandViewProperties. + :rtype: StaticLegend + """ # noqa: E501 + return self._static_legend + + @static_legend.setter + def static_legend(self, static_legend): + """Set the static_legend of this BandViewProperties. + + :param static_legend: The static_legend of this BandViewProperties. + :type: StaticLegend + """ # noqa: E501 + self._static_legend = static_legend + + @property + def x_column(self): + """Get the x_column of this BandViewProperties. + + :return: The x_column of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._x_column + + @x_column.setter + def x_column(self, x_column): + """Set the x_column of this BandViewProperties. + + :param x_column: The x_column of this BandViewProperties. + :type: str + """ # noqa: E501 + self._x_column = x_column + + @property + def generate_x_axis_ticks(self): + """Get the generate_x_axis_ticks of this BandViewProperties. + + :return: The generate_x_axis_ticks of this BandViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_x_axis_ticks + + @generate_x_axis_ticks.setter + def generate_x_axis_ticks(self, generate_x_axis_ticks): + """Set the generate_x_axis_ticks of this BandViewProperties. + + :param generate_x_axis_ticks: The generate_x_axis_ticks of this BandViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_x_axis_ticks = generate_x_axis_ticks + + @property + def x_total_ticks(self): + """Get the x_total_ticks of this BandViewProperties. + + :return: The x_total_ticks of this BandViewProperties. + :rtype: int + """ # noqa: E501 + return self._x_total_ticks + + @x_total_ticks.setter + def x_total_ticks(self, x_total_ticks): + """Set the x_total_ticks of this BandViewProperties. + + :param x_total_ticks: The x_total_ticks of this BandViewProperties. + :type: int + """ # noqa: E501 + self._x_total_ticks = x_total_ticks + + @property + def x_tick_start(self): + """Get the x_tick_start of this BandViewProperties. + + :return: The x_tick_start of this BandViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_start + + @x_tick_start.setter + def x_tick_start(self, x_tick_start): + """Set the x_tick_start of this BandViewProperties. + + :param x_tick_start: The x_tick_start of this BandViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_start = x_tick_start + + @property + def x_tick_step(self): + """Get the x_tick_step of this BandViewProperties. + + :return: The x_tick_step of this BandViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_step + + @x_tick_step.setter + def x_tick_step(self, x_tick_step): + """Set the x_tick_step of this BandViewProperties. + + :param x_tick_step: The x_tick_step of this BandViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_step = x_tick_step + + @property + def y_column(self): + """Get the y_column of this BandViewProperties. + + :return: The y_column of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._y_column + + @y_column.setter + def y_column(self, y_column): + """Set the y_column of this BandViewProperties. + + :param y_column: The y_column of this BandViewProperties. + :type: str + """ # noqa: E501 + self._y_column = y_column + + @property + def generate_y_axis_ticks(self): + """Get the generate_y_axis_ticks of this BandViewProperties. + + :return: The generate_y_axis_ticks of this BandViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_y_axis_ticks + + @generate_y_axis_ticks.setter + def generate_y_axis_ticks(self, generate_y_axis_ticks): + """Set the generate_y_axis_ticks of this BandViewProperties. + + :param generate_y_axis_ticks: The generate_y_axis_ticks of this BandViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_y_axis_ticks = generate_y_axis_ticks + + @property + def y_total_ticks(self): + """Get the y_total_ticks of this BandViewProperties. + + :return: The y_total_ticks of this BandViewProperties. + :rtype: int + """ # noqa: E501 + return self._y_total_ticks + + @y_total_ticks.setter + def y_total_ticks(self, y_total_ticks): + """Set the y_total_ticks of this BandViewProperties. + + :param y_total_ticks: The y_total_ticks of this BandViewProperties. + :type: int + """ # noqa: E501 + self._y_total_ticks = y_total_ticks + + @property + def y_tick_start(self): + """Get the y_tick_start of this BandViewProperties. + + :return: The y_tick_start of this BandViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_start + + @y_tick_start.setter + def y_tick_start(self, y_tick_start): + """Set the y_tick_start of this BandViewProperties. + + :param y_tick_start: The y_tick_start of this BandViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_start = y_tick_start + + @property + def y_tick_step(self): + """Get the y_tick_step of this BandViewProperties. + + :return: The y_tick_step of this BandViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_step + + @y_tick_step.setter + def y_tick_step(self, y_tick_step): + """Set the y_tick_step of this BandViewProperties. + + :param y_tick_step: The y_tick_step of this BandViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_step = y_tick_step + + @property + def upper_column(self): + """Get the upper_column of this BandViewProperties. + + :return: The upper_column of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._upper_column + + @upper_column.setter + def upper_column(self, upper_column): + """Set the upper_column of this BandViewProperties. + + :param upper_column: The upper_column of this BandViewProperties. + :type: str + """ # noqa: E501 + self._upper_column = upper_column + + @property + def main_column(self): + """Get the main_column of this BandViewProperties. + + :return: The main_column of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._main_column + + @main_column.setter + def main_column(self, main_column): + """Set the main_column of this BandViewProperties. + + :param main_column: The main_column of this BandViewProperties. + :type: str + """ # noqa: E501 + self._main_column = main_column + + @property + def lower_column(self): + """Get the lower_column of this BandViewProperties. + + :return: The lower_column of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._lower_column + + @lower_column.setter + def lower_column(self, lower_column): + """Set the lower_column of this BandViewProperties. + + :param lower_column: The lower_column of this BandViewProperties. + :type: str + """ # noqa: E501 + self._lower_column = lower_column + + @property + def hover_dimension(self): + """Get the hover_dimension of this BandViewProperties. + + :return: The hover_dimension of this BandViewProperties. + :rtype: str + """ # noqa: E501 + return self._hover_dimension + + @hover_dimension.setter + def hover_dimension(self, hover_dimension): + """Set the hover_dimension of this BandViewProperties. + + :param hover_dimension: The hover_dimension of this BandViewProperties. + :type: str + """ # noqa: E501 + self._hover_dimension = hover_dimension + + @property + def geom(self): + """Get the geom of this BandViewProperties. + + :return: The geom of this BandViewProperties. + :rtype: XYGeom + """ # noqa: E501 + return self._geom + + @geom.setter + def geom(self, geom): + """Set the geom of this BandViewProperties. + + :param geom: The geom of this BandViewProperties. + :type: XYGeom + """ # noqa: E501 + if geom is None: + raise ValueError("Invalid value for `geom`, must not be `None`") # noqa: E501 + self._geom = geom + + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this BandViewProperties. + + :return: The legend_colorize_rows of this BandViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this BandViewProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this BandViewProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this BandViewProperties. + + :return: The legend_hide of this BandViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this BandViewProperties. + + :param legend_hide: The legend_hide of this BandViewProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this BandViewProperties. + + :return: The legend_opacity of this BandViewProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this BandViewProperties. + + :param legend_opacity: The legend_opacity of this BandViewProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this BandViewProperties. + + :return: The legend_orientation_threshold of this BandViewProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this BandViewProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this BandViewProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, BandViewProperties): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/binary_expression.py b/influxdb_client/domain/binary_expression.py index bbfcf181..4a1803fd 100644 --- a/influxdb_client/domain/binary_expression.py +++ b/influxdb_client/domain/binary_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class BinaryExpression(object): +class BinaryExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -47,6 +48,8 @@ class BinaryExpression(object): def __init__(self, type=None, operator=None, left=None, right=None): # noqa: E501,D401,D403 """BinaryExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._operator = None self._left = None diff --git a/influxdb_client/domain/block.py b/influxdb_client/domain/block.py index c53eaff6..b8c20e91 100644 --- a/influxdb_client/domain/block.py +++ b/influxdb_client/domain/block.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.node import Node -class Block(object): +class Block(Node): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class Block(object): def __init__(self, type=None, body=None): # noqa: E501,D401,D403 """Block - a model defined in OpenAPI.""" # noqa: E501 + Node.__init__(self) # noqa: E501 + self._type = None self._body = None self.discriminator = None diff --git a/influxdb_client/domain/boolean_literal.py b/influxdb_client/domain/boolean_literal.py index f66cf4a5..9d183a70 100644 --- a/influxdb_client/domain/boolean_literal.py +++ b/influxdb_client/domain/boolean_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class BooleanLiteral(object): +class BooleanLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class BooleanLiteral(object): def __init__(self, type=None, value=None): # noqa: E501,D401,D403 """BooleanLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._value = None self.discriminator = None diff --git a/influxdb_client/domain/bucket.py b/influxdb_client/domain/bucket.py index aad4b6c0..8df0e898 100644 --- a/influxdb_client/domain/bucket.py +++ b/influxdb_client/domain/bucket.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -39,6 +39,7 @@ class Bucket(object): 'description': 'str', 'org_id': 'str', 'rp': 'str', + 'schema_type': 'SchemaType', 'created_at': 'datetime', 'updated_at': 'datetime', 'retention_rules': 'list[BucketRetentionRules]', @@ -53,13 +54,14 @@ class Bucket(object): 'description': 'description', 'org_id': 'orgID', 'rp': 'rp', + 'schema_type': 'schemaType', 'created_at': 'createdAt', 'updated_at': 'updatedAt', 'retention_rules': 'retentionRules', 'labels': 'labels' } - def __init__(self, links=None, id=None, type='user', name=None, description=None, org_id=None, rp=None, created_at=None, updated_at=None, retention_rules=None, labels=None): # noqa: E501,D401,D403 + def __init__(self, links=None, id=None, type='user', name=None, description=None, org_id=None, rp=None, schema_type=None, created_at=None, updated_at=None, retention_rules=None, labels=None): # noqa: E501,D401,D403 """Bucket - a model defined in OpenAPI.""" # noqa: E501 self._links = None self._id = None @@ -68,6 +70,7 @@ def __init__(self, links=None, id=None, type='user', name=None, description=None self._description = None self._org_id = None self._rp = None + self._schema_type = None self._created_at = None self._updated_at = None self._retention_rules = None @@ -87,6 +90,8 @@ def __init__(self, links=None, id=None, type='user', name=None, description=None self.org_id = org_id if rp is not None: self.rp = rp + if schema_type is not None: + self.schema_type = schema_type if created_at is not None: self.created_at = created_at if updated_at is not None: @@ -223,6 +228,24 @@ def rp(self, rp): """ # noqa: E501 self._rp = rp + @property + def schema_type(self): + """Get the schema_type of this Bucket. + + :return: The schema_type of this Bucket. + :rtype: SchemaType + """ # noqa: E501 + return self._schema_type + + @schema_type.setter + def schema_type(self, schema_type): + """Set the schema_type of this Bucket. + + :param schema_type: The schema_type of this Bucket. + :type: SchemaType + """ # noqa: E501 + self._schema_type = schema_type + @property def created_at(self): """Get the created_at of this Bucket. diff --git a/influxdb_client/domain/bucket_links.py b/influxdb_client/domain/bucket_links.py index c80a7435..f3f627ab 100644 --- a/influxdb_client/domain/bucket_links.py +++ b/influxdb_client/domain/bucket_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/bucket_retention_rules.py b/influxdb_client/domain/bucket_retention_rules.py index 6ada69af..266621d7 100644 --- a/influxdb_client/domain/bucket_retention_rules.py +++ b/influxdb_client/domain/bucket_retention_rules.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/buckets.py b/influxdb_client/domain/buckets.py index a7f61e8e..d6aa6a8f 100644 --- a/influxdb_client/domain/buckets.py +++ b/influxdb_client/domain/buckets.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/builder_aggregate_function_type.py b/influxdb_client/domain/builder_aggregate_function_type.py new file mode 100644 index 00000000..0fe68f36 --- /dev/null +++ b/influxdb_client/domain/builder_aggregate_function_type.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class BuilderAggregateFunctionType(object): + """NOTE: This class is auto generated by OpenAPI Generator. + + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + FILTER = "filter" + GROUP = "group" + + """ + 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,D401,D403 + """BuilderAggregateFunctionType - a model defined in OpenAPI.""" # noqa: E501 self.discriminator = None + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, BuilderAggregateFunctionType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/builder_config.py b/influxdb_client/domain/builder_config.py index f6ef036c..9c5e9376 100644 --- a/influxdb_client/domain/builder_config.py +++ b/influxdb_client/domain/builder_config.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/builder_config_aggregate_window.py b/influxdb_client/domain/builder_config_aggregate_window.py index 1b6dccc5..4e22f25b 100644 --- a/influxdb_client/domain/builder_config_aggregate_window.py +++ b/influxdb_client/domain/builder_config_aggregate_window.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,20 +32,25 @@ class BuilderConfigAggregateWindow(object): and the value is json key in definition. """ openapi_types = { - 'period': 'str' + 'period': 'str', + 'fill_values': 'bool' } attribute_map = { - 'period': 'period' + 'period': 'period', + 'fill_values': 'fillValues' } - def __init__(self, period=None): # noqa: E501,D401,D403 + def __init__(self, period=None, fill_values=None): # noqa: E501,D401,D403 """BuilderConfigAggregateWindow - a model defined in OpenAPI.""" # noqa: E501 self._period = None + self._fill_values = None self.discriminator = None if period is not None: self.period = period + if fill_values is not None: + self.fill_values = fill_values @property def period(self): @@ -65,6 +70,24 @@ def period(self, period): """ # noqa: E501 self._period = period + @property + def fill_values(self): + """Get the fill_values of this BuilderConfigAggregateWindow. + + :return: The fill_values of this BuilderConfigAggregateWindow. + :rtype: bool + """ # noqa: E501 + return self._fill_values + + @fill_values.setter + def fill_values(self, fill_values): + """Set the fill_values of this BuilderConfigAggregateWindow. + + :param fill_values: The fill_values of this BuilderConfigAggregateWindow. + :type: bool + """ # noqa: E501 + self._fill_values = fill_values + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/builder_functions_type.py b/influxdb_client/domain/builder_functions_type.py index fe4e77bc..cd8f86e7 100644 --- a/influxdb_client/domain/builder_functions_type.py +++ b/influxdb_client/domain/builder_functions_type.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/builder_tags_type.py b/influxdb_client/domain/builder_tags_type.py index e33a6a1a..c929b703 100644 --- a/influxdb_client/domain/builder_tags_type.py +++ b/influxdb_client/domain/builder_tags_type.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -33,24 +33,29 @@ class BuilderTagsType(object): """ openapi_types = { 'key': 'str', - 'values': 'list[str]' + 'values': 'list[str]', + 'aggregate_function_type': 'BuilderAggregateFunctionType' } attribute_map = { 'key': 'key', - 'values': 'values' + 'values': 'values', + 'aggregate_function_type': 'aggregateFunctionType' } - def __init__(self, key=None, values=None): # noqa: E501,D401,D403 + def __init__(self, key=None, values=None, aggregate_function_type=None): # noqa: E501,D401,D403 """BuilderTagsType - a model defined in OpenAPI.""" # noqa: E501 self._key = None self._values = None + self._aggregate_function_type = None self.discriminator = None if key is not None: self.key = key if values is not None: self.values = values + if aggregate_function_type is not None: + self.aggregate_function_type = aggregate_function_type @property def key(self): @@ -88,6 +93,24 @@ def values(self, values): """ # noqa: E501 self._values = values + @property + def aggregate_function_type(self): + """Get the aggregate_function_type of this BuilderTagsType. + + :return: The aggregate_function_type of this BuilderTagsType. + :rtype: BuilderAggregateFunctionType + """ # noqa: E501 + return self._aggregate_function_type + + @aggregate_function_type.setter + def aggregate_function_type(self, aggregate_function_type): + """Set the aggregate_function_type of this BuilderTagsType. + + :param aggregate_function_type: The aggregate_function_type of this BuilderTagsType. + :type: BuilderAggregateFunctionType + """ # noqa: E501 + self._aggregate_function_type = aggregate_function_type + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/builtin_statement.py b/influxdb_client/domain/builtin_statement.py index 75d68d8b..20861765 100644 --- a/influxdb_client/domain/builtin_statement.py +++ b/influxdb_client/domain/builtin_statement.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class BuiltinStatement(object): +class BuiltinStatement(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class BuiltinStatement(object): def __init__(self, type=None, id=None): # noqa: E501,D401,D403 """BuiltinStatement - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._id = None self.discriminator = None diff --git a/influxdb_client/domain/call_expression.py b/influxdb_client/domain/call_expression.py index 85f936dc..eb57f54d 100644 --- a/influxdb_client/domain/call_expression.py +++ b/influxdb_client/domain/call_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class CallExpression(object): +class CallExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class CallExpression(object): def __init__(self, type=None, callee=None, arguments=None): # noqa: E501,D401,D403 """CallExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._callee = None self._arguments = None diff --git a/influxdb_client/domain/cell.py b/influxdb_client/domain/cell.py index f802f0aa..a03c7b71 100644 --- a/influxdb_client/domain/cell.py +++ b/influxdb_client/domain/cell.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/cell_links.py b/influxdb_client/domain/cell_links.py index eb0feb47..f551d58c 100644 --- a/influxdb_client/domain/cell_links.py +++ b/influxdb_client/domain/cell_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/cell_update.py b/influxdb_client/domain/cell_update.py index eac833a8..0c5fe25d 100644 --- a/influxdb_client/domain/cell_update.py +++ b/influxdb_client/domain/cell_update.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/cell_with_view_properties.py b/influxdb_client/domain/cell_with_view_properties.py new file mode 100644 index 00000000..421b309e --- /dev/null +++ b/influxdb_client/domain/cell_with_view_properties.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.cell import Cell + + +class CellWithViewProperties(Cell): + """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', + 'properties': 'ViewProperties', + 'id': 'str', + 'links': 'CellLinks', + 'x': 'int', + 'y': 'int', + 'w': 'int', + 'h': 'int', + 'view_id': 'str' + } + + attribute_map = { + 'name': 'name', + 'properties': 'properties', + 'id': 'id', + 'links': 'links', + 'x': 'x', + 'y': 'y', + 'w': 'w', + 'h': 'h', + 'view_id': 'viewID' + } + + def __init__(self, name=None, properties=None, id=None, links=None, x=None, y=None, w=None, h=None, view_id=None): # noqa: E501,D401,D403 + """CellWithViewProperties - a model defined in OpenAPI.""" # noqa: E501 + Cell.__init__(self, id=id, links=links, x=x, y=y, w=w, h=h, view_id=view_id) # noqa: E501 + + self._name = None + self._properties = None + self.discriminator = None + + if name is not None: + self.name = name + if properties is not None: + self.properties = properties + + @property + def name(self): + """Get the name of this CellWithViewProperties. + + :return: The name of this CellWithViewProperties. + :rtype: str + """ # noqa: E501 + return self._name + + @name.setter + def name(self, name): + """Set the name of this CellWithViewProperties. + + :param name: The name of this CellWithViewProperties. + :type: str + """ # noqa: E501 + self._name = name + + @property + def properties(self): + """Get the properties of this CellWithViewProperties. + + :return: The properties of this CellWithViewProperties. + :rtype: ViewProperties + """ # noqa: E501 + return self._properties + + @properties.setter + def properties(self, properties): + """Set the properties of this CellWithViewProperties. + + :param properties: The properties of this CellWithViewProperties. + :type: ViewProperties + """ # noqa: E501 + self._properties = properties + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, CellWithViewProperties): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/check.py b/influxdb_client/domain/check.py index a28b0be6..365a0484 100644 --- a/influxdb_client/domain/check.py +++ b/influxdb_client/domain/check.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,9 @@ import re # noqa: F401 import six -from influxdb_client.domain.check_base import CheckBase -class Check(CheckBase): +class Check(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,45 +32,51 @@ class Check(CheckBase): and the value is json key in definition. """ openapi_types = { - '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' + 'type': 'str', } attribute_map = { - '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' + 'type': 'type', } - 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,D401,D403 + discriminator_value_class_map = { + 'deadman': 'DeadmanCheck', + 'custom': 'CustomCheck', + 'threshold': 'ThresholdCheck' + } + + def __init__(self, type=None): # noqa: E501,D401,D403 """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) # noqa: E501 - self.discriminator = None + self._type = None + self.discriminator = 'type' + + self.type = type + + @property + def type(self): + """Get the type of this Check. + + :return: The type of this Check. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this Check. + + :param type: The type of this Check. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + def get_real_child_model(self, data): + """Return 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): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/check_base.py b/influxdb_client/domain/check_base.py index a18dbb37..fde5b082 100644 --- a/influxdb_client/domain/check_base.py +++ b/influxdb_client/domain/check_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,9 @@ import re # noqa: F401 import six -from influxdb_client.domain.check_discriminator import CheckDiscriminator -class CheckBase(CheckDiscriminator): +class CheckBase(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -36,16 +35,16 @@ class CheckBase(CheckDiscriminator): 'id': 'str', 'name': 'str', 'org_id': 'str', + 'task_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', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', 'labels': 'list[Label]', 'links': 'CheckBaseLinks' } @@ -54,37 +53,35 @@ class CheckBase(CheckDiscriminator): 'id': 'id', 'name': 'name', 'org_id': 'orgID', + 'task_id': 'taskID', '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', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', 'labels': 'labels', 'links': 'links' } - 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,D401,D403 + def __init__(self, id=None, name=None, org_id=None, task_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, description=None, latest_completed=None, last_run_status=None, last_run_error=None, labels=None, links=None): # noqa: E501,D401,D403 """CheckBase - a model defined in OpenAPI.""" # noqa: E501 - CheckDiscriminator.__init__(self) # noqa: E501 - self._id = None self._name = None self._org_id = None + self._task_id = None self._owner_id = None self._created_at = None self._updated_at = None self._query = None self._status = None - self._every = None - self._offset = None - self._tags = None self._description = None - self._status_message_template = None + self._latest_completed = None + self._last_run_status = None + self._last_run_error = None self._labels = None self._links = None self.discriminator = None @@ -93,6 +90,8 @@ def __init__(self, id=None, name=None, org_id=None, owner_id=None, created_at=No self.id = id self.name = name self.org_id = org_id + if task_id is not None: + self.task_id = task_id if owner_id is not None: self.owner_id = owner_id if created_at is not None: @@ -102,16 +101,14 @@ def __init__(self, id=None, name=None, org_id=None, owner_id=None, created_at=No self.query = query if status is not None: self.status = status - if every is not None: - self.every = every - if offset is not None: - self.offset = offset - if tags is not None: - self.tags = tags if description is not None: self.description = description - if status_message_template is not None: - self.status_message_template = status_message_template + 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 labels is not None: self.labels = labels if links is not None: @@ -179,6 +176,28 @@ def org_id(self, org_id): raise ValueError("Invalid value for `org_id`, must not be `None`") # noqa: E501 self._org_id = org_id + @property + def task_id(self): + """Get the task_id of this CheckBase. + + The ID of the task associated with this check. + + :return: The task_id of this CheckBase. + :rtype: str + """ # noqa: E501 + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Set the task_id of this CheckBase. + + The ID of the task associated with this check. + + :param task_id: The task_id of this CheckBase. + :type: str + """ # noqa: E501 + self._task_id = task_id + @property def owner_id(self): """Get the owner_id of this CheckBase. @@ -276,114 +295,84 @@ def status(self, status): self._status = status @property - def every(self): - """Get the every of this CheckBase. - - Check repetition interval. - - :return: The every of this CheckBase. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this CheckBase. - - Check repetition interval. - - :param every: The every of this CheckBase. - :type: str - """ # noqa: E501 - self._every = every - - @property - def offset(self): - """Get the offset of this CheckBase. + def description(self): + """Get the description of this CheckBase. - Duration to delay after the schedule, before executing check. + An optional description of the check. - :return: The offset of this CheckBase. + :return: The description of this CheckBase. :rtype: str """ # noqa: E501 - return self._offset + return self._description - @offset.setter - def offset(self, offset): - """Set the offset of this CheckBase. + @description.setter + def description(self, description): + """Set the description of this CheckBase. - Duration to delay after the schedule, before executing check. + An optional description of the check. - :param offset: The offset of this CheckBase. + :param description: The description of this CheckBase. :type: str """ # noqa: E501 - self._offset = offset + self._description = description @property - def tags(self): - """Get the tags of this CheckBase. + def latest_completed(self): + """Get the latest_completed of this CheckBase. - List of tags to write to each status. + Timestamp of latest scheduled, completed run, RFC3339. - :return: The tags of this CheckBase. - :rtype: list[CheckBaseTags] + :return: The latest_completed of this CheckBase. + :rtype: datetime """ # noqa: E501 - return self._tags + return self._latest_completed - @tags.setter - def tags(self, tags): - """Set the tags of this CheckBase. + @latest_completed.setter + def latest_completed(self, latest_completed): + """Set the latest_completed of this CheckBase. - List of tags to write to each status. + Timestamp of latest scheduled, completed run, RFC3339. - :param tags: The tags of this CheckBase. - :type: list[CheckBaseTags] + :param latest_completed: The latest_completed of this CheckBase. + :type: datetime """ # noqa: E501 - self._tags = tags + self._latest_completed = latest_completed @property - def description(self): - """Get the description of this CheckBase. + def last_run_status(self): + """Get the last_run_status of this CheckBase. - An optional description of the check. - - :return: The description of this CheckBase. + :return: The last_run_status of this CheckBase. :rtype: str """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this CheckBase. + return self._last_run_status - An optional description of the check. + @last_run_status.setter + def last_run_status(self, last_run_status): + """Set the last_run_status of this CheckBase. - :param description: The description of this CheckBase. + :param last_run_status: The last_run_status of this CheckBase. :type: str """ # noqa: E501 - self._description = description + self._last_run_status = last_run_status @property - def status_message_template(self): - """Get the status_message_template of this CheckBase. - - The template used to generate and write a status message. + def last_run_error(self): + """Get the last_run_error of this CheckBase. - :return: The status_message_template of this CheckBase. + :return: The last_run_error of this CheckBase. :rtype: str """ # noqa: E501 - return self._status_message_template - - @status_message_template.setter - def status_message_template(self, status_message_template): - """Set the status_message_template of this CheckBase. + return self._last_run_error - The template used to generate and write a status message. + @last_run_error.setter + def last_run_error(self, last_run_error): + """Set the last_run_error of this CheckBase. - :param status_message_template: The status_message_template of this CheckBase. + :param last_run_error: The last_run_error of this CheckBase. :type: str """ # noqa: E501 - self._status_message_template = status_message_template + self._last_run_error = last_run_error @property def labels(self): diff --git a/influxdb_client/domain/check_base_links.py b/influxdb_client/domain/check_base_links.py index 2b5b6da2..eb02a7cb 100644 --- a/influxdb_client/domain/check_base_links.py +++ b/influxdb_client/domain/check_base_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -35,22 +35,25 @@ class CheckBaseLinks(object): '_self': 'str', 'labels': 'str', 'members': 'str', - 'owners': 'str' + 'owners': 'str', + 'query': 'str' } attribute_map = { '_self': 'self', 'labels': 'labels', 'members': 'members', - 'owners': 'owners' + 'owners': 'owners', + 'query': 'query' } - def __init__(self, _self=None, labels=None, members=None, owners=None): # noqa: E501,D401,D403 + def __init__(self, _self=None, labels=None, members=None, owners=None, query=None): # noqa: E501,D401,D403 """CheckBaseLinks - a model defined in OpenAPI.""" # noqa: E501 self.__self = None self._labels = None self._members = None self._owners = None + self._query = None self.discriminator = None if _self is not None: @@ -61,6 +64,8 @@ def __init__(self, _self=None, labels=None, members=None, owners=None): # noqa: self.members = members if owners is not None: self.owners = owners + if query is not None: + self.query = query @property def _self(self): @@ -150,6 +155,28 @@ def owners(self, owners): """ # noqa: E501 self._owners = owners + @property + def query(self): + """Get the query of this CheckBaseLinks. + + URI of resource. + + :return: The query of this CheckBaseLinks. + :rtype: str + """ # noqa: E501 + return self._query + + @query.setter + def query(self, query): + """Set the query of this CheckBaseLinks. + + URI of resource. + + :param query: The query of this CheckBaseLinks. + :type: str + """ # noqa: E501 + self._query = query + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/check_discriminator.py b/influxdb_client/domain/check_discriminator.py index c2c24b0b..c2a1ecf2 100644 --- a/influxdb_client/domain/check_discriminator.py +++ b/influxdb_client/domain/check_discriminator.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.post_check import PostCheck +from influxdb_client.domain.check_base import CheckBase -class CheckDiscriminator(PostCheck): +class CheckDiscriminator(CheckBase): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,28 +33,45 @@ class CheckDiscriminator(PostCheck): and the value is json key in definition. """ openapi_types = { + 'id': 'str', + 'name': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'query': 'DashboardQuery', + 'status': 'TaskStatusType', + 'description': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'labels': 'list[Label]', + 'links': 'CheckBaseLinks' } attribute_map = { + 'id': 'id', + 'name': 'name', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'query': 'query', + 'status': 'status', + 'description': 'description', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'labels': 'labels', + 'links': 'links' } - discriminator_value_class_map = { - 'CheckBase': 'CheckBase', - 'Check': 'Check', - 'ThresholdCheck': 'ThresholdCheck', - 'DeadmanCheck': 'DeadmanCheck' - } - - def __init__(self): # noqa: E501,D401,D403 + def __init__(self, id=None, name=None, org_id=None, task_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, description=None, latest_completed=None, last_run_status=None, last_run_error=None, labels=None, links=None): # noqa: E501,D401,D403 """CheckDiscriminator - a model defined in OpenAPI.""" # noqa: E501 - PostCheck.__init__(self) # noqa: E501 - self.discriminator = 'type' - - def get_real_child_model(self, data): - """Return 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) + CheckBase.__init__(self, id=id, name=name, org_id=org_id, task_id=task_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, description=description, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, labels=labels, links=links) # noqa: E501 + self.discriminator = None def to_dict(self): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/check_patch.py b/influxdb_client/domain/check_patch.py index 28388ca8..316945ba 100644 --- a/influxdb_client/domain/check_patch.py +++ b/influxdb_client/domain/check_patch.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/check_status_level.py b/influxdb_client/domain/check_status_level.py index 16a901f4..321dcc59 100644 --- a/influxdb_client/domain/check_status_level.py +++ b/influxdb_client/domain/check_status_level.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/check_view_properties.py b/influxdb_client/domain/check_view_properties.py index 04c87e4f..7fbc3ef2 100644 --- a/influxdb_client/domain/check_view_properties.py +++ b/influxdb_client/domain/check_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -38,7 +38,11 @@ class CheckViewProperties(ViewProperties): 'check_id': 'str', 'check': 'Check', 'queries': 'list[DashboardQuery]', - 'colors': 'list[str]' + 'colors': 'list[DashboardColor]', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' } attribute_map = { @@ -47,10 +51,14 @@ class CheckViewProperties(ViewProperties): 'check_id': 'checkID', 'check': 'check', 'queries': 'queries', - 'colors': 'colors' + 'colors': 'colors', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, type=None, shape=None, check_id=None, check=None, queries=None, colors=None): # noqa: E501,D401,D403 + def __init__(self, type=None, shape=None, check_id=None, check=None, queries=None, colors=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """CheckViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 @@ -60,6 +68,10 @@ def __init__(self, type=None, shape=None, check_id=None, check=None, queries=Non self._check = None self._queries = None self._colors = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None self.discriminator = None self.type = type @@ -69,6 +81,14 @@ def __init__(self, type=None, shape=None, check_id=None, check=None, queries=Non self.check = check self.queries = queries self.colors = colors + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold @property def type(self): @@ -175,7 +195,7 @@ def colors(self): Colors define color encoding of data into a visualization :return: The colors of this CheckViewProperties. - :rtype: list[str] + :rtype: list[DashboardColor] """ # noqa: E501 return self._colors @@ -186,12 +206,84 @@ def colors(self, colors): Colors define color encoding of data into a visualization :param colors: The colors of this CheckViewProperties. - :type: list[str] + :type: list[DashboardColor] """ # noqa: E501 if colors is None: raise ValueError("Invalid value for `colors`, must not be `None`") # noqa: E501 self._colors = colors + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this CheckViewProperties. + + :return: The legend_colorize_rows of this CheckViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this CheckViewProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this CheckViewProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this CheckViewProperties. + + :return: The legend_hide of this CheckViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this CheckViewProperties. + + :param legend_hide: The legend_hide of this CheckViewProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this CheckViewProperties. + + :return: The legend_opacity of this CheckViewProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this CheckViewProperties. + + :param legend_opacity: The legend_opacity of this CheckViewProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this CheckViewProperties. + + :return: The legend_orientation_threshold of this CheckViewProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this CheckViewProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this CheckViewProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/checks.py b/influxdb_client/domain/checks.py index 9732b47f..27c8f428 100644 --- a/influxdb_client/domain/checks.py +++ b/influxdb_client/domain/checks.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/conditional_expression.py b/influxdb_client/domain/conditional_expression.py index a7257f06..1da9837f 100644 --- a/influxdb_client/domain/conditional_expression.py +++ b/influxdb_client/domain/conditional_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class ConditionalExpression(object): +class ConditionalExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -47,6 +48,8 @@ class ConditionalExpression(object): def __init__(self, type=None, test=None, alternate=None, consequent=None): # noqa: E501,D401,D403 """ConditionalExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._test = None self._alternate = None diff --git a/influxdb_client/domain/constant_variable_properties.py b/influxdb_client/domain/constant_variable_properties.py index 19f6cbb3..65a9aab9 100644 --- a/influxdb_client/domain/constant_variable_properties.py +++ b/influxdb_client/domain/constant_variable_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.variable_properties import VariableProperties -class ConstantVariableProperties(object): +class ConstantVariableProperties(VariableProperties): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class ConstantVariableProperties(object): def __init__(self, type=None, values=None): # noqa: E501,D401,D403 """ConstantVariableProperties - a model defined in OpenAPI.""" # noqa: E501 + VariableProperties.__init__(self) # noqa: E501 + self._type = None self._values = None self.discriminator = None diff --git a/influxdb_client/domain/create_cell.py b/influxdb_client/domain/create_cell.py index 1ffd531a..01390714 100644 --- a/influxdb_client/domain/create_cell.py +++ b/influxdb_client/domain/create_cell.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/create_dashboard_request.py b/influxdb_client/domain/create_dashboard_request.py index 59f2a52d..8af0b139 100644 --- a/influxdb_client/domain/create_dashboard_request.py +++ b/influxdb_client/domain/create_dashboard_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/custom_check.py b/influxdb_client/domain/custom_check.py new file mode 100644 index 00000000..bab58872 --- /dev/null +++ b/influxdb_client/domain/custom_check.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.check_discriminator import CheckDiscriminator + + +class CustomCheck(CheckDiscriminator): + """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 = { + 'type': 'str', + 'id': 'str', + 'name': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'query': 'DashboardQuery', + 'status': 'TaskStatusType', + 'description': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'labels': 'list[Label]', + 'links': 'CheckBaseLinks' + } + + attribute_map = { + 'type': 'type', + 'id': 'id', + 'name': 'name', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'query': 'query', + 'status': 'status', + 'description': 'description', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'labels': 'labels', + 'links': 'links' + } + + def __init__(self, type="custom", id=None, name=None, org_id=None, task_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, description=None, latest_completed=None, last_run_status=None, last_run_error=None, labels=None, links=None): # noqa: E501,D401,D403 + """CustomCheck - a model defined in OpenAPI.""" # noqa: E501 + CheckDiscriminator.__init__(self, id=id, name=name, org_id=org_id, task_id=task_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, description=description, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, labels=labels, links=links) # noqa: E501 + + self._type = None + self.discriminator = None + + self.type = type + + @property + def type(self): + """Get the type of this CustomCheck. + + :return: The type of this CustomCheck. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this CustomCheck. + + :param type: The type of this CustomCheck. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, CustomCheck): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/dashboard.py b/influxdb_client/domain/dashboard.py index c949b0c0..61edaf01 100644 --- a/influxdb_client/domain/dashboard.py +++ b/influxdb_client/domain/dashboard.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/dashboard_color.py b/influxdb_client/domain/dashboard_color.py index f3bc9fcf..9348ff6c 100644 --- a/influxdb_client/domain/dashboard_color.py +++ b/influxdb_client/domain/dashboard_color.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/dashboard_query.py b/influxdb_client/domain/dashboard_query.py index 6951ba8f..1521aaab 100644 --- a/influxdb_client/domain/dashboard_query.py +++ b/influxdb_client/domain/dashboard_query.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/dashboard_with_view_properties.py b/influxdb_client/domain/dashboard_with_view_properties.py new file mode 100644 index 00000000..a222051c --- /dev/null +++ b/influxdb_client/domain/dashboard_with_view_properties.py @@ -0,0 +1,210 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.create_dashboard_request import CreateDashboardRequest + + +class DashboardWithViewProperties(CreateDashboardRequest): + """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 = { + 'links': 'object', + 'id': 'str', + 'meta': 'object', + 'cells': 'list[CellWithViewProperties]', + 'labels': 'list[Label]', + 'org_id': 'str', + 'name': 'str', + 'description': 'str' + } + + attribute_map = { + 'links': 'links', + 'id': 'id', + 'meta': 'meta', + 'cells': 'cells', + 'labels': 'labels', + 'org_id': 'orgID', + 'name': 'name', + 'description': 'description' + } + + def __init__(self, links=None, id=None, meta=None, cells=None, labels=None, org_id=None, name=None, description=None): # noqa: E501,D401,D403 + """DashboardWithViewProperties - a model defined in OpenAPI.""" # noqa: E501 + CreateDashboardRequest.__init__(self, org_id=org_id, name=name, description=description) # noqa: E501 + + self._links = None + self._id = None + self._meta = None + self._cells = None + self._labels = None + self.discriminator = None + + if links is not None: + self.links = links + if id is not None: + self.id = id + if meta is not None: + self.meta = meta + if cells is not None: + self.cells = cells + if labels is not None: + self.labels = labels + + @property + def links(self): + """Get the links of this DashboardWithViewProperties. + + :return: The links of this DashboardWithViewProperties. + :rtype: object + """ # noqa: E501 + return self._links + + @links.setter + def links(self, links): + """Set the links of this DashboardWithViewProperties. + + :param links: The links of this DashboardWithViewProperties. + :type: object + """ # noqa: E501 + self._links = links + + @property + def id(self): + """Get the id of this DashboardWithViewProperties. + + :return: The id of this DashboardWithViewProperties. + :rtype: str + """ # noqa: E501 + return self._id + + @id.setter + def id(self, id): + """Set the id of this DashboardWithViewProperties. + + :param id: The id of this DashboardWithViewProperties. + :type: str + """ # noqa: E501 + self._id = id + + @property + def meta(self): + """Get the meta of this DashboardWithViewProperties. + + :return: The meta of this DashboardWithViewProperties. + :rtype: object + """ # noqa: E501 + return self._meta + + @meta.setter + def meta(self, meta): + """Set the meta of this DashboardWithViewProperties. + + :param meta: The meta of this DashboardWithViewProperties. + :type: object + """ # noqa: E501 + self._meta = meta + + @property + def cells(self): + """Get the cells of this DashboardWithViewProperties. + + :return: The cells of this DashboardWithViewProperties. + :rtype: list[CellWithViewProperties] + """ # noqa: E501 + return self._cells + + @cells.setter + def cells(self, cells): + """Set the cells of this DashboardWithViewProperties. + + :param cells: The cells of this DashboardWithViewProperties. + :type: list[CellWithViewProperties] + """ # noqa: E501 + self._cells = cells + + @property + def labels(self): + """Get the labels of this DashboardWithViewProperties. + + :return: The labels of this DashboardWithViewProperties. + :rtype: list[Label] + """ # noqa: E501 + return self._labels + + @labels.setter + def labels(self, labels): + """Set the labels of this DashboardWithViewProperties. + + :param labels: The labels of this DashboardWithViewProperties. + :type: list[Label] + """ # noqa: E501 + self._labels = labels + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, DashboardWithViewProperties): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/dashboards.py b/influxdb_client/domain/dashboards.py index 64ab89c9..739cab89 100644 --- a/influxdb_client/domain/dashboards.py +++ b/influxdb_client/domain/dashboards.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/date_time_literal.py b/influxdb_client/domain/date_time_literal.py index bf995257..71b8b803 100644 --- a/influxdb_client/domain/date_time_literal.py +++ b/influxdb_client/domain/date_time_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class DateTimeLiteral(object): +class DateTimeLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class DateTimeLiteral(object): def __init__(self, type=None, value=None): # noqa: E501,D401,D403 """DateTimeLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._value = None self.discriminator = None diff --git a/influxdb_client/domain/dbr_ps.py b/influxdb_client/domain/dbr_ps.py index 3ea0aadc..a35d7eb3 100644 --- a/influxdb_client/domain/dbr_ps.py +++ b/influxdb_client/domain/dbr_ps.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,61 +32,38 @@ class DBRPs(object): and the value is json key in definition. """ openapi_types = { - 'notification_endpoints': 'list[DBRP]', - 'links': 'Links' + 'content': 'list[DBRP]' } attribute_map = { - 'notification_endpoints': 'notificationEndpoints', - 'links': 'links' + 'content': 'content' } - def __init__(self, notification_endpoints=None, links=None): # noqa: E501,D401,D403 + def __init__(self, content=None): # noqa: E501,D401,D403 """DBRPs - a model defined in OpenAPI.""" # noqa: E501 - self._notification_endpoints = None - self._links = None + self._content = None self.discriminator = None - if notification_endpoints is not None: - self.notification_endpoints = notification_endpoints - if links is not None: - self.links = links + if content is not None: + self.content = content @property - def notification_endpoints(self): - """Get the notification_endpoints of this DBRPs. + def content(self): + """Get the content of this DBRPs. - :return: The notification_endpoints of this DBRPs. + :return: The content of this DBRPs. :rtype: list[DBRP] """ # noqa: E501 - return self._notification_endpoints + return self._content - @notification_endpoints.setter - def notification_endpoints(self, notification_endpoints): - """Set the notification_endpoints of this DBRPs. + @content.setter + def content(self, content): + """Set the content of this DBRPs. - :param notification_endpoints: The notification_endpoints of this DBRPs. + :param content: The content of this DBRPs. :type: list[DBRP] """ # noqa: E501 - self._notification_endpoints = notification_endpoints - - @property - def links(self): - """Get the links of this DBRPs. - - :return: The links of this DBRPs. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this DBRPs. - - :param links: The links of this DBRPs. - :type: Links - """ # noqa: E501 - self._links = links + self._content = content def to_dict(self): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/dbrp.py b/influxdb_client/domain/dbrp.py index c4d52682..a3ae158b 100644 --- a/influxdb_client/domain/dbrp.py +++ b/influxdb_client/domain/dbrp.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -68,7 +68,8 @@ def __init__(self, id=None, org_id=None, org=None, bucket_id=None, database=None if id is not None: self.id = id self.org_id = org_id - self.org = org + if org is not None: + self.org = org self.bucket_id = bucket_id self.database = database self.retention_policy = retention_policy @@ -143,8 +144,6 @@ def org(self, org): :param org: The org of this DBRP. :type: str """ # noqa: E501 - if org is None: - raise ValueError("Invalid value for `org`, must not be `None`") # noqa: E501 self._org = org @property diff --git a/influxdb_client/domain/dbrp_update.py b/influxdb_client/domain/dbrp_update.py index c0b89c81..28ee6086 100644 --- a/influxdb_client/domain/dbrp_update.py +++ b/influxdb_client/domain/dbrp_update.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/deadman_check.py b/influxdb_client/domain/deadman_check.py index ce2755e5..d4c7efc7 100644 --- a/influxdb_client/domain/deadman_check.py +++ b/influxdb_client/domain/deadman_check.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.check import Check +from influxdb_client.domain.check_discriminator import CheckDiscriminator -class DeadmanCheck(Check): +class DeadmanCheck(CheckDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -37,7 +37,26 @@ class DeadmanCheck(Check): 'time_since': 'str', 'stale_time': 'str', 'report_zero': 'bool', - 'level': 'CheckStatusLevel' + 'level': 'CheckStatusLevel', + 'every': 'str', + 'offset': 'str', + 'tags': 'list[object]', + 'status_message_template': 'str', + 'id': 'str', + 'name': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'query': 'DashboardQuery', + 'status': 'TaskStatusType', + 'description': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'labels': 'list[Label]', + 'links': 'CheckBaseLinks' } attribute_map = { @@ -45,22 +64,44 @@ class DeadmanCheck(Check): 'time_since': 'timeSince', 'stale_time': 'staleTime', 'report_zero': 'reportZero', - 'level': 'level' + 'level': 'level', + 'every': 'every', + 'offset': 'offset', + 'tags': 'tags', + 'status_message_template': 'statusMessageTemplate', + 'id': 'id', + 'name': 'name', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'query': 'query', + 'status': 'status', + 'description': 'description', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, time_since=None, stale_time=None, report_zero=None, level=None): # noqa: E501,D401,D403 + def __init__(self, type="deadman", time_since=None, stale_time=None, report_zero=None, level=None, every=None, offset=None, tags=None, status_message_template=None, id=None, name=None, org_id=None, task_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, description=None, latest_completed=None, last_run_status=None, last_run_error=None, labels=None, links=None): # noqa: E501,D401,D403 """DeadmanCheck - a model defined in OpenAPI.""" # noqa: E501 - Check.__init__(self) # noqa: E501 + CheckDiscriminator.__init__(self, id=id, name=name, org_id=org_id, task_id=task_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, description=description, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, labels=labels, links=links) # noqa: E501 self._type = None self._time_since = None self._stale_time = None self._report_zero = None self._level = None + self._every = None + self._offset = None + self._tags = None + self._status_message_template = None self.discriminator = None - if type is not None: - self.type = type + self.type = type if time_since is not None: self.time_since = time_since if stale_time is not None: @@ -69,6 +110,14 @@ def __init__(self, type=None, time_since=None, stale_time=None, report_zero=None self.report_zero = report_zero if level is not None: self.level = level + if every is not None: + self.every = every + if offset is not None: + self.offset = offset + if tags is not None: + self.tags = tags + if status_message_template is not None: + self.status_message_template = status_message_template @property def type(self): @@ -86,6 +135,8 @@ def type(self, type): :param type: The type of this DeadmanCheck. :type: str """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @property @@ -172,6 +223,94 @@ def level(self, level): """ # noqa: E501 self._level = level + @property + def every(self): + """Get the every of this DeadmanCheck. + + Check repetition interval. + + :return: The every of this DeadmanCheck. + :rtype: str + """ # noqa: E501 + return self._every + + @every.setter + def every(self, every): + """Set the every of this DeadmanCheck. + + Check repetition interval. + + :param every: The every of this DeadmanCheck. + :type: str + """ # noqa: E501 + self._every = every + + @property + def offset(self): + """Get the offset of this DeadmanCheck. + + Duration to delay after the schedule, before executing check. + + :return: The offset of this DeadmanCheck. + :rtype: str + """ # noqa: E501 + return self._offset + + @offset.setter + def offset(self, offset): + """Set the offset of this DeadmanCheck. + + Duration to delay after the schedule, before executing check. + + :param offset: The offset of this DeadmanCheck. + :type: str + """ # noqa: E501 + self._offset = offset + + @property + def tags(self): + """Get the tags of this DeadmanCheck. + + List of tags to write to each status. + + :return: The tags of this DeadmanCheck. + :rtype: list[object] + """ # noqa: E501 + return self._tags + + @tags.setter + def tags(self, tags): + """Set the tags of this DeadmanCheck. + + List of tags to write to each status. + + :param tags: The tags of this DeadmanCheck. + :type: list[object] + """ # noqa: E501 + self._tags = tags + + @property + def status_message_template(self): + """Get the status_message_template of this DeadmanCheck. + + The template used to generate and write a status message. + + :return: The status_message_template of this DeadmanCheck. + :rtype: str + """ # noqa: E501 + return self._status_message_template + + @status_message_template.setter + def status_message_template(self, status_message_template): + """Set the status_message_template of this DeadmanCheck. + + The template used to generate and write a status message. + + :param status_message_template: The status_message_template of this DeadmanCheck. + :type: str + """ # noqa: E501 + self._status_message_template = status_message_template + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/decimal_places.py b/influxdb_client/domain/decimal_places.py index 57cbf580..9e758b09 100644 --- a/influxdb_client/domain/decimal_places.py +++ b/influxdb_client/domain/decimal_places.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/delete_predicate_request.py b/influxdb_client/domain/delete_predicate_request.py index 342d768b..0255c4f6 100644 --- a/influxdb_client/domain/delete_predicate_request.py +++ b/influxdb_client/domain/delete_predicate_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/dialect.py b/influxdb_client/domain/dialect.py index 719c1036..b8c8859f 100644 --- a/influxdb_client/domain/dialect.py +++ b/influxdb_client/domain/dialect.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -119,7 +119,7 @@ def delimiter(self, delimiter): def annotations(self): """Get the annotations of this Dialect. - Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns :return: The annotations of this Dialect. :rtype: list[str] @@ -130,7 +130,7 @@ def annotations(self): def annotations(self, annotations): """Set the annotations of this Dialect. - Https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns + https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns :param annotations: The annotations of this Dialect. :type: list[str] diff --git a/influxdb_client/domain/legend.py b/influxdb_client/domain/dict_expression.py similarity index 65% rename from influxdb_client/domain/legend.py rename to influxdb_client/domain/dict_expression.py index 89be03fb..8e92b237 100644 --- a/influxdb_client/domain/legend.py +++ b/influxdb_client/domain/dict_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class Legend(object): +class DictExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,68 +34,70 @@ class Legend(object): """ openapi_types = { 'type': 'str', - 'orientation': 'str' + 'elements': 'list[DictItem]' } attribute_map = { 'type': 'type', - 'orientation': 'orientation' + 'elements': 'elements' } - def __init__(self, type=None, orientation=None): # noqa: E501,D401,D403 - """Legend - a model defined in OpenAPI.""" # noqa: E501 + def __init__(self, type=None, elements=None): # noqa: E501,D401,D403 + """DictExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None - self._orientation = None + self._elements = None self.discriminator = None if type is not None: self.type = type - if orientation is not None: - self.orientation = orientation + if elements is not None: + self.elements = elements @property def type(self): - """Get the type of this Legend. + """Get the type of this DictExpression. - The style of the legend. + Type of AST node - :return: The type of this Legend. + :return: The type of this DictExpression. :rtype: str """ # noqa: E501 return self._type @type.setter def type(self, type): - """Set the type of this Legend. + """Set the type of this DictExpression. - The style of the legend. + Type of AST node - :param type: The type of this Legend. + :param type: The type of this DictExpression. :type: str """ # noqa: E501 self._type = type @property - def orientation(self): - """Get the orientation of this Legend. + def elements(self): + """Get the elements of this DictExpression. - orientation is the location of the legend with respect to the view graph + Elements of the dictionary - :return: The orientation of this Legend. - :rtype: str + :return: The elements of this DictExpression. + :rtype: list[DictItem] """ # noqa: E501 - return self._orientation + return self._elements - @orientation.setter - def orientation(self, orientation): - """Set the orientation of this Legend. + @elements.setter + def elements(self, elements): + """Set the elements of this DictExpression. - orientation is the location of the legend with respect to the view graph + Elements of the dictionary - :param orientation: The orientation of this Legend. - :type: str + :param elements: The elements of this DictExpression. + :type: list[DictItem] """ # noqa: E501 - self._orientation = orientation + self._elements = elements def to_dict(self): """Return the model properties as a dict.""" @@ -130,7 +133,7 @@ def __repr__(self): def __eq__(self, other): """Return true if both objects are equal.""" - if not isinstance(other, Legend): + if not isinstance(other, DictExpression): return False return self.__dict__ == other.__dict__ diff --git a/influxdb_client/domain/check_base_tags.py b/influxdb_client/domain/dict_item.py similarity index 61% rename from influxdb_client/domain/check_base_tags.py rename to influxdb_client/domain/dict_item.py index eba5645f..de2a3e10 100644 --- a/influxdb_client/domain/check_base_tags.py +++ b/influxdb_client/domain/dict_item.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -16,7 +16,7 @@ import six -class CheckBaseTags(object): +class DictItem(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,61 +32,88 @@ class CheckBaseTags(object): and the value is json key in definition. """ openapi_types = { - 'key': 'str', - 'value': 'str' + 'type': 'str', + 'key': 'Expression', + 'val': 'Expression' } attribute_map = { + 'type': 'type', 'key': 'key', - 'value': 'value' + 'val': 'val' } - def __init__(self, key=None, value=None): # noqa: E501,D401,D403 - """CheckBaseTags - a model defined in OpenAPI.""" # noqa: E501 + def __init__(self, type=None, key=None, val=None): # noqa: E501,D401,D403 + """DictItem - a model defined in OpenAPI.""" # noqa: E501 + self._type = None self._key = None - self._value = None + self._val = None self.discriminator = None + if type is not None: + self.type = type if key is not None: self.key = key - if value is not None: - self.value = value + if val is not None: + self.val = val @property - def key(self): - """Get the key of this CheckBaseTags. + def type(self): + """Get the type of this DictItem. + + Type of AST node - :return: The key of this CheckBaseTags. + :return: The type of this DictItem. :rtype: str """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this DictItem. + + Type of AST node + + :param type: The type of this DictItem. + :type: str + """ # noqa: E501 + self._type = type + + @property + def key(self): + """Get the key of this DictItem. + + :return: The key of this DictItem. + :rtype: Expression + """ # noqa: E501 return self._key @key.setter def key(self, key): - """Set the key of this CheckBaseTags. + """Set the key of this DictItem. - :param key: The key of this CheckBaseTags. - :type: str + :param key: The key of this DictItem. + :type: Expression """ # noqa: E501 self._key = key @property - def value(self): - """Get the value of this CheckBaseTags. + def val(self): + """Get the val of this DictItem. - :return: The value of this CheckBaseTags. - :rtype: str + :return: The val of this DictItem. + :rtype: Expression """ # noqa: E501 - return self._value + return self._val - @value.setter - def value(self, value): - """Set the value of this CheckBaseTags. + @val.setter + def val(self, val): + """Set the val of this DictItem. - :param value: The value of this CheckBaseTags. - :type: str + :param val: The val of this DictItem. + :type: Expression """ # noqa: E501 - self._value = value + self._val = val def to_dict(self): """Return the model properties as a dict.""" @@ -122,7 +149,7 @@ def __repr__(self): def __eq__(self, other): """Return true if both objects are equal.""" - if not isinstance(other, CheckBaseTags): + if not isinstance(other, DictItem): return False return self.__dict__ == other.__dict__ diff --git a/influxdb_client/domain/document.py b/influxdb_client/domain/document.py index f36d5920..9b3fa7fe 100644 --- a/influxdb_client/domain/document.py +++ b/influxdb_client/domain/document.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/document_create.py b/influxdb_client/domain/document_create.py index 2066fea0..9d07e41f 100644 --- a/influxdb_client/domain/document_create.py +++ b/influxdb_client/domain/document_create.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/document_links.py b/influxdb_client/domain/document_links.py index 3f21b461..6495c417 100644 --- a/influxdb_client/domain/document_links.py +++ b/influxdb_client/domain/document_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/document_list_entry.py b/influxdb_client/domain/document_list_entry.py index eec19439..086380a5 100644 --- a/influxdb_client/domain/document_list_entry.py +++ b/influxdb_client/domain/document_list_entry.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/document_meta.py b/influxdb_client/domain/document_meta.py index 47a86036..1492175c 100644 --- a/influxdb_client/domain/document_meta.py +++ b/influxdb_client/domain/document_meta.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/document_update.py b/influxdb_client/domain/document_update.py index 324ddb43..9a7af36c 100644 --- a/influxdb_client/domain/document_update.py +++ b/influxdb_client/domain/document_update.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/documents.py b/influxdb_client/domain/documents.py index e59cff9b..f6146ba0 100644 --- a/influxdb_client/domain/documents.py +++ b/influxdb_client/domain/documents.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/duration.py b/influxdb_client/domain/duration.py index 244a685f..4c147392 100644 --- a/influxdb_client/domain/duration.py +++ b/influxdb_client/domain/duration.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/duration_literal.py b/influxdb_client/domain/duration_literal.py index 036a9612..76b2c131 100644 --- a/influxdb_client/domain/duration_literal.py +++ b/influxdb_client/domain/duration_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class DurationLiteral(object): +class DurationLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class DurationLiteral(object): def __init__(self, type=None, values=None): # noqa: E501,D401,D403 """DurationLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._values = None self.discriminator = None diff --git a/influxdb_client/domain/error.py b/influxdb_client/domain/error.py index 2c8bdd56..97edecda 100644 --- a/influxdb_client/domain/error.py +++ b/influxdb_client/domain/error.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -33,28 +33,38 @@ class Error(object): """ openapi_types = { 'code': 'str', - 'message': 'str' + 'message': 'str', + 'op': 'str', + 'err': 'str' } attribute_map = { 'code': 'code', - 'message': 'message' + 'message': 'message', + 'op': 'op', + 'err': 'err' } - def __init__(self, code=None, message=None): # noqa: E501,D401,D403 + def __init__(self, code=None, message=None, op=None, err=None): # noqa: E501,D401,D403 """Error - a model defined in OpenAPI.""" # noqa: E501 self._code = None self._message = None + self._op = None + self._err = None self.discriminator = None self.code = code self.message = message + if op is not None: + self.op = op + if err is not None: + self.err = err @property def code(self): """Get the code of this Error. - Code is the machine-readable error code. + code is the machine-readable error code. :return: The code of this Error. :rtype: str @@ -65,7 +75,7 @@ def code(self): def code(self, code): """Set the code of this Error. - Code is the machine-readable error code. + code is the machine-readable error code. :param code: The code of this Error. :type: str @@ -78,7 +88,7 @@ def code(self, code): def message(self): """Get the message of this Error. - Message is a human-readable message. + message is a human-readable message. :return: The message of this Error. :rtype: str @@ -89,7 +99,7 @@ def message(self): def message(self, message): """Set the message of this Error. - Message is a human-readable message. + message is a human-readable message. :param message: The message of this Error. :type: str @@ -98,6 +108,50 @@ def message(self, message): raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 self._message = message + @property + def op(self): + """Get the op of this Error. + + op describes the logical code operation during error. Useful for debugging. + + :return: The op of this Error. + :rtype: str + """ # noqa: E501 + return self._op + + @op.setter + def op(self, op): + """Set the op of this Error. + + op describes the logical code operation during error. Useful for debugging. + + :param op: The op of this Error. + :type: str + """ # noqa: E501 + self._op = op + + @property + def err(self): + """Get the err of this Error. + + err is a stack of errors that occurred during processing of the request. Useful for debugging. + + :return: The err of this Error. + :rtype: str + """ # noqa: E501 + return self._err + + @err.setter + def err(self, err): + """Set the err of this Error. + + err is a stack of errors that occurred during processing of the request. Useful for debugging. + + :param err: The err of this Error. + :type: str + """ # noqa: E501 + self._err = err + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/expression.py b/influxdb_client/domain/expression.py index 0eebfc20..71a50e56 100644 --- a/influxdb_client/domain/expression.py +++ b/influxdb_client/domain/expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.node import Node -class Expression(object): +class Expression(Node): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -38,7 +39,9 @@ class Expression(object): } def __init__(self): # noqa: E501,D401,D403 - """Expression - a model defined in OpenAPI.""" # noqa: E501 self.discriminator = None + """Expression - a model defined in OpenAPI.""" # noqa: E501 + Node.__init__(self) # noqa: E501 + self.discriminator = None def to_dict(self): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/expression_statement.py b/influxdb_client/domain/expression_statement.py index 1ae68d7d..5c4d1d47 100644 --- a/influxdb_client/domain/expression_statement.py +++ b/influxdb_client/domain/expression_statement.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class ExpressionStatement(object): +class ExpressionStatement(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class ExpressionStatement(object): def __init__(self, type=None, expression=None): # noqa: E501,D401,D403 """ExpressionStatement - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._expression = None self.discriminator = None diff --git a/influxdb_client/domain/field.py b/influxdb_client/domain/field.py index 61d5bc1d..db2fa020 100644 --- a/influxdb_client/domain/field.py +++ b/influxdb_client/domain/field.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/file.py b/influxdb_client/domain/file.py index d7190f16..f7b7df1a 100644 --- a/influxdb_client/domain/file.py +++ b/influxdb_client/domain/file.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/float_literal.py b/influxdb_client/domain/float_literal.py index 6f604cd9..53c25303 100644 --- a/influxdb_client/domain/float_literal.py +++ b/influxdb_client/domain/float_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class FloatLiteral(object): +class FloatLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class FloatLiteral(object): def __init__(self, type=None, value=None): # noqa: E501,D401,D403 """FloatLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._value = None self.discriminator = None diff --git a/influxdb_client/domain/flux_response.py b/influxdb_client/domain/flux_response.py index 6e1ae7e4..0f67f865 100644 --- a/influxdb_client/domain/flux_response.py +++ b/influxdb_client/domain/flux_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/flux_suggestion.py b/influxdb_client/domain/flux_suggestion.py index 0a5776b4..4579a342 100644 --- a/influxdb_client/domain/flux_suggestion.py +++ b/influxdb_client/domain/flux_suggestion.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/flux_suggestions.py b/influxdb_client/domain/flux_suggestions.py index b1e14bd7..234b89c3 100644 --- a/influxdb_client/domain/flux_suggestions.py +++ b/influxdb_client/domain/flux_suggestions.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/function_expression.py b/influxdb_client/domain/function_expression.py index 9dd56bff..14a3508e 100644 --- a/influxdb_client/domain/function_expression.py +++ b/influxdb_client/domain/function_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class FunctionExpression(object): +class FunctionExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class FunctionExpression(object): def __init__(self, type=None, params=None, body=None): # noqa: E501,D401,D403 """FunctionExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._params = None self._body = None diff --git a/influxdb_client/domain/gauge_view_properties.py b/influxdb_client/domain/gauge_view_properties.py index 39a9826c..ce8b2773 100644 --- a/influxdb_client/domain/gauge_view_properties.py +++ b/influxdb_client/domain/gauge_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -43,7 +43,6 @@ class GaugeViewProperties(ViewProperties): 'tick_prefix': 'str', 'suffix': 'str', 'tick_suffix': 'str', - 'legend': 'Legend', 'decimal_places': 'DecimalPlaces' } @@ -58,11 +57,10 @@ class GaugeViewProperties(ViewProperties): 'tick_prefix': 'tickPrefix', 'suffix': 'suffix', 'tick_suffix': 'tickSuffix', - 'legend': 'legend', 'decimal_places': 'decimalPlaces' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, legend=None, decimal_places=None): # noqa: E501,D401,D403 + def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, decimal_places=None): # noqa: E501,D401,D403 """GaugeViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 @@ -76,7 +74,6 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._tick_prefix = None self._suffix = None self._tick_suffix = None - self._legend = None self._decimal_places = None self.discriminator = None @@ -90,7 +87,6 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.tick_prefix = tick_prefix self.suffix = suffix self.tick_suffix = tick_suffix - self.legend = legend self.decimal_places = decimal_places @property @@ -301,26 +297,6 @@ def tick_suffix(self, tick_suffix): raise ValueError("Invalid value for `tick_suffix`, must not be `None`") # noqa: E501 self._tick_suffix = tick_suffix - @property - def legend(self): - """Get the legend of this GaugeViewProperties. - - :return: The legend of this GaugeViewProperties. - :rtype: Legend - """ # noqa: E501 - return self._legend - - @legend.setter - def legend(self, legend): - """Set the legend of this GaugeViewProperties. - - :param legend: The legend of this GaugeViewProperties. - :type: Legend - """ # noqa: E501 - if legend is None: - raise ValueError("Invalid value for `legend`, must not be `None`") # noqa: E501 - self._legend = legend - @property def decimal_places(self): """Get the decimal_places of this GaugeViewProperties. diff --git a/influxdb_client/domain/greater_threshold.py b/influxdb_client/domain/greater_threshold.py index ca92bd7b..6ce01bd5 100644 --- a/influxdb_client/domain/greater_threshold.py +++ b/influxdb_client/domain/greater_threshold.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -34,17 +34,21 @@ class GreaterThreshold(Threshold): """ openapi_types = { 'type': 'str', - 'value': 'float' + 'value': 'float', + 'level': 'CheckStatusLevel', + 'all_values': 'bool' } attribute_map = { 'type': 'type', - 'value': 'value' + 'value': 'value', + 'level': 'level', + 'all_values': 'allValues' } - def __init__(self, type=None, value=None): # noqa: E501,D401,D403 + def __init__(self, type="greater", value=None, level=None, all_values=None): # noqa: E501,D401,D403 """GreaterThreshold - a model defined in OpenAPI.""" # noqa: E501 - Threshold.__init__(self) # noqa: E501 + Threshold.__init__(self, level=level, all_values=all_values) # noqa: E501 self._type = None self._value = None diff --git a/influxdb_client/domain/health_check.py b/influxdb_client/domain/health_check.py index b18344d8..656549b2 100644 --- a/influxdb_client/domain/health_check.py +++ b/influxdb_client/domain/health_check.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/heatmap_view_properties.py b/influxdb_client/domain/heatmap_view_properties.py index aae442eb..43f5e873 100644 --- a/influxdb_client/domain/heatmap_view_properties.py +++ b/influxdb_client/domain/heatmap_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -41,7 +41,15 @@ class HeatmapViewProperties(ViewProperties): 'note': 'str', 'show_note_when_empty': 'bool', 'x_column': 'str', + 'generate_x_axis_ticks': 'list[str]', + 'x_total_ticks': 'int', + 'x_tick_start': 'float', + 'x_tick_step': 'float', 'y_column': 'str', + 'generate_y_axis_ticks': 'list[str]', + 'y_total_ticks': 'int', + 'y_tick_start': 'float', + 'y_tick_step': 'float', 'x_domain': 'list[float]', 'y_domain': 'list[float]', 'x_axis_label': 'str', @@ -50,7 +58,11 @@ class HeatmapViewProperties(ViewProperties): 'x_suffix': 'str', 'y_prefix': 'str', 'y_suffix': 'str', - 'bin_size': 'float' + 'bin_size': 'float', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' } attribute_map = { @@ -62,7 +74,15 @@ class HeatmapViewProperties(ViewProperties): 'note': 'note', 'show_note_when_empty': 'showNoteWhenEmpty', 'x_column': 'xColumn', + 'generate_x_axis_ticks': 'generateXAxisTicks', + 'x_total_ticks': 'xTotalTicks', + 'x_tick_start': 'xTickStart', + 'x_tick_step': 'xTickStep', 'y_column': 'yColumn', + 'generate_y_axis_ticks': 'generateYAxisTicks', + 'y_total_ticks': 'yTotalTicks', + 'y_tick_start': 'yTickStart', + 'y_tick_step': 'yTickStep', 'x_domain': 'xDomain', 'y_domain': 'yDomain', 'x_axis_label': 'xAxisLabel', @@ -71,10 +91,14 @@ class HeatmapViewProperties(ViewProperties): 'x_suffix': 'xSuffix', 'y_prefix': 'yPrefix', 'y_suffix': 'ySuffix', - 'bin_size': 'binSize' + 'bin_size': 'binSize', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, bin_size=None): # noqa: E501,D401,D403 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, bin_size=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """HeatmapViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 @@ -86,7 +110,15 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._note = None self._show_note_when_empty = None self._x_column = None + self._generate_x_axis_ticks = None + self._x_total_ticks = None + self._x_tick_start = None + self._x_tick_step = None self._y_column = None + self._generate_y_axis_ticks = None + self._y_total_ticks = None + self._y_tick_start = None + self._y_tick_step = None self._x_domain = None self._y_domain = None self._x_axis_label = None @@ -96,6 +128,10 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._y_prefix = None self._y_suffix = None self._bin_size = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None self.discriminator = None if time_format is not None: @@ -107,7 +143,23 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self.note = note self.show_note_when_empty = show_note_when_empty self.x_column = x_column + if generate_x_axis_ticks is not None: + self.generate_x_axis_ticks = generate_x_axis_ticks + if x_total_ticks is not None: + self.x_total_ticks = x_total_ticks + if x_tick_start is not None: + self.x_tick_start = x_tick_start + if x_tick_step is not None: + self.x_tick_step = x_tick_step self.y_column = y_column + if generate_y_axis_ticks is not None: + self.generate_y_axis_ticks = generate_y_axis_ticks + if y_total_ticks is not None: + self.y_total_ticks = y_total_ticks + if y_tick_start is not None: + self.y_tick_start = y_tick_start + if y_tick_step is not None: + self.y_tick_step = y_tick_step self.x_domain = x_domain self.y_domain = y_domain self.x_axis_label = x_axis_label @@ -117,6 +169,14 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self.y_prefix = y_prefix self.y_suffix = y_suffix self.bin_size = bin_size + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold @property def time_format(self): @@ -284,6 +344,78 @@ def x_column(self, x_column): raise ValueError("Invalid value for `x_column`, must not be `None`") # noqa: E501 self._x_column = x_column + @property + def generate_x_axis_ticks(self): + """Get the generate_x_axis_ticks of this HeatmapViewProperties. + + :return: The generate_x_axis_ticks of this HeatmapViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_x_axis_ticks + + @generate_x_axis_ticks.setter + def generate_x_axis_ticks(self, generate_x_axis_ticks): + """Set the generate_x_axis_ticks of this HeatmapViewProperties. + + :param generate_x_axis_ticks: The generate_x_axis_ticks of this HeatmapViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_x_axis_ticks = generate_x_axis_ticks + + @property + def x_total_ticks(self): + """Get the x_total_ticks of this HeatmapViewProperties. + + :return: The x_total_ticks of this HeatmapViewProperties. + :rtype: int + """ # noqa: E501 + return self._x_total_ticks + + @x_total_ticks.setter + def x_total_ticks(self, x_total_ticks): + """Set the x_total_ticks of this HeatmapViewProperties. + + :param x_total_ticks: The x_total_ticks of this HeatmapViewProperties. + :type: int + """ # noqa: E501 + self._x_total_ticks = x_total_ticks + + @property + def x_tick_start(self): + """Get the x_tick_start of this HeatmapViewProperties. + + :return: The x_tick_start of this HeatmapViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_start + + @x_tick_start.setter + def x_tick_start(self, x_tick_start): + """Set the x_tick_start of this HeatmapViewProperties. + + :param x_tick_start: The x_tick_start of this HeatmapViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_start = x_tick_start + + @property + def x_tick_step(self): + """Get the x_tick_step of this HeatmapViewProperties. + + :return: The x_tick_step of this HeatmapViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_step + + @x_tick_step.setter + def x_tick_step(self, x_tick_step): + """Set the x_tick_step of this HeatmapViewProperties. + + :param x_tick_step: The x_tick_step of this HeatmapViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_step = x_tick_step + @property def y_column(self): """Get the y_column of this HeatmapViewProperties. @@ -304,6 +436,78 @@ def y_column(self, y_column): raise ValueError("Invalid value for `y_column`, must not be `None`") # noqa: E501 self._y_column = y_column + @property + def generate_y_axis_ticks(self): + """Get the generate_y_axis_ticks of this HeatmapViewProperties. + + :return: The generate_y_axis_ticks of this HeatmapViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_y_axis_ticks + + @generate_y_axis_ticks.setter + def generate_y_axis_ticks(self, generate_y_axis_ticks): + """Set the generate_y_axis_ticks of this HeatmapViewProperties. + + :param generate_y_axis_ticks: The generate_y_axis_ticks of this HeatmapViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_y_axis_ticks = generate_y_axis_ticks + + @property + def y_total_ticks(self): + """Get the y_total_ticks of this HeatmapViewProperties. + + :return: The y_total_ticks of this HeatmapViewProperties. + :rtype: int + """ # noqa: E501 + return self._y_total_ticks + + @y_total_ticks.setter + def y_total_ticks(self, y_total_ticks): + """Set the y_total_ticks of this HeatmapViewProperties. + + :param y_total_ticks: The y_total_ticks of this HeatmapViewProperties. + :type: int + """ # noqa: E501 + self._y_total_ticks = y_total_ticks + + @property + def y_tick_start(self): + """Get the y_tick_start of this HeatmapViewProperties. + + :return: The y_tick_start of this HeatmapViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_start + + @y_tick_start.setter + def y_tick_start(self, y_tick_start): + """Set the y_tick_start of this HeatmapViewProperties. + + :param y_tick_start: The y_tick_start of this HeatmapViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_start = y_tick_start + + @property + def y_tick_step(self): + """Get the y_tick_step of this HeatmapViewProperties. + + :return: The y_tick_step of this HeatmapViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_step + + @y_tick_step.setter + def y_tick_step(self, y_tick_step): + """Set the y_tick_step of this HeatmapViewProperties. + + :param y_tick_step: The y_tick_step of this HeatmapViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_step = y_tick_step + @property def x_domain(self): """Get the x_domain of this HeatmapViewProperties. @@ -484,6 +688,78 @@ def bin_size(self, bin_size): raise ValueError("Invalid value for `bin_size`, must not be `None`") # noqa: E501 self._bin_size = bin_size + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this HeatmapViewProperties. + + :return: The legend_colorize_rows of this HeatmapViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this HeatmapViewProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this HeatmapViewProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this HeatmapViewProperties. + + :return: The legend_hide of this HeatmapViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this HeatmapViewProperties. + + :param legend_hide: The legend_hide of this HeatmapViewProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this HeatmapViewProperties. + + :return: The legend_opacity of this HeatmapViewProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this HeatmapViewProperties. + + :param legend_opacity: The legend_opacity of this HeatmapViewProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this HeatmapViewProperties. + + :return: The legend_orientation_threshold of this HeatmapViewProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this HeatmapViewProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this HeatmapViewProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/histogram_view_properties.py b/influxdb_client/domain/histogram_view_properties.py index 5f1b307e..b40dc412 100644 --- a/influxdb_client/domain/histogram_view_properties.py +++ b/influxdb_client/domain/histogram_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -44,7 +44,11 @@ class HistogramViewProperties(ViewProperties): 'x_domain': 'list[float]', 'x_axis_label': 'str', 'position': 'str', - 'bin_count': 'int' + 'bin_count': 'int', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' } attribute_map = { @@ -59,10 +63,14 @@ class HistogramViewProperties(ViewProperties): 'x_domain': 'xDomain', 'x_axis_label': 'xAxisLabel', 'position': 'position', - 'bin_count': 'binCount' + 'bin_count': 'binCount', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, fill_columns=None, x_domain=None, x_axis_label=None, position=None, bin_count=None): # noqa: E501,D401,D403 + def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, fill_columns=None, x_domain=None, x_axis_label=None, position=None, bin_count=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """HistogramViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 @@ -78,6 +86,10 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._x_axis_label = None self._position = None self._bin_count = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None self.discriminator = None self.type = type @@ -92,6 +104,14 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.x_axis_label = x_axis_label self.position = position self.bin_count = bin_count + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold @property def type(self): @@ -341,6 +361,78 @@ def bin_count(self, bin_count): raise ValueError("Invalid value for `bin_count`, must not be `None`") # noqa: E501 self._bin_count = bin_count + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this HistogramViewProperties. + + :return: The legend_colorize_rows of this HistogramViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this HistogramViewProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this HistogramViewProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this HistogramViewProperties. + + :return: The legend_hide of this HistogramViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this HistogramViewProperties. + + :param legend_hide: The legend_hide of this HistogramViewProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this HistogramViewProperties. + + :return: The legend_opacity of this HistogramViewProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this HistogramViewProperties. + + :param legend_opacity: The legend_opacity of this HistogramViewProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this HistogramViewProperties. + + :return: The legend_orientation_threshold of this HistogramViewProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this HistogramViewProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this HistogramViewProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/http_notification_endpoint.py b/influxdb_client/domain/http_notification_endpoint.py index c3d52d7f..cdabc19b 100644 --- a/influxdb_client/domain/http_notification_endpoint.py +++ b/influxdb_client/domain/http_notification_endpoint.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint import NotificationEndpoint +from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator -class HTTPNotificationEndpoint(NotificationEndpoint): +class HTTPNotificationEndpoint(NotificationEndpointDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -40,7 +40,18 @@ class HTTPNotificationEndpoint(NotificationEndpoint): 'method': 'str', 'auth_method': 'str', 'content_template': 'str', - 'headers': 'dict(str, 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' } attribute_map = { @@ -51,12 +62,23 @@ class HTTPNotificationEndpoint(NotificationEndpoint): 'method': 'method', 'auth_method': 'authMethod', 'content_template': 'contentTemplate', - 'headers': 'headers' + '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' } - def __init__(self, url=None, username=None, password=None, token=None, method=None, auth_method=None, content_template=None, headers=None): # noqa: E501,D401,D403 + 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="http"): # noqa: E501,D401,D403 """HTTPNotificationEndpoint - a model defined in OpenAPI.""" # noqa: E501 - NotificationEndpoint.__init__(self) # noqa: E501 + NotificationEndpointDiscriminator.__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) # noqa: E501 self._url = None self._username = None diff --git a/influxdb_client/domain/http_notification_rule.py b/influxdb_client/domain/http_notification_rule.py index 8fa977d8..b0abcd6f 100644 --- a/influxdb_client/domain/http_notification_rule.py +++ b/influxdb_client/domain/http_notification_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -34,17 +34,63 @@ class HTTPNotificationRule(HTTPNotificationRuleBase): """ openapi_types = { 'type': 'str', - 'url': 'str' + 'url': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', - 'url': 'url' + 'url': 'url', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, url=None): # noqa: E501,D401,D403 + def __init__(self, type="http", url=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """HTTPNotificationRule - a model defined in OpenAPI.""" # noqa: E501 - HTTPNotificationRuleBase.__init__(self, type=type, url=url) # noqa: E501 + HTTPNotificationRuleBase.__init__(self, type=type, url=url, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 self.discriminator = None def to_dict(self): diff --git a/influxdb_client/domain/http_notification_rule_base.py b/influxdb_client/domain/http_notification_rule_base.py index 72b14a56..a35019b3 100644 --- a/influxdb_client/domain/http_notification_rule_base.py +++ b/influxdb_client/domain/http_notification_rule_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator -class HTTPNotificationRuleBase(object): +class HTTPNotificationRuleBase(NotificationRuleDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,16 +34,64 @@ class HTTPNotificationRuleBase(object): """ openapi_types = { 'type': 'str', - 'url': 'str' + 'url': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', - 'url': 'url' + 'url': 'url', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, url=None): # noqa: E501,D401,D403 + def __init__(self, type=None, url=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """HTTPNotificationRuleBase - a model defined in OpenAPI.""" # noqa: E501 + NotificationRuleDiscriminator.__init__(self, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 + self._type = None self._url = None self.discriminator = None diff --git a/influxdb_client/domain/identifier.py b/influxdb_client/domain/identifier.py index 1cf0dbb6..b7465bfe 100644 --- a/influxdb_client/domain/identifier.py +++ b/influxdb_client/domain/identifier.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.property_key import PropertyKey -class Identifier(object): +class Identifier(PropertyKey): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class Identifier(object): def __init__(self, type=None, name=None): # noqa: E501,D401,D403 """Identifier - a model defined in OpenAPI.""" # noqa: E501 + PropertyKey.__init__(self) # noqa: E501 + self._type = None self._name = None self.discriminator = None diff --git a/influxdb_client/domain/import_declaration.py b/influxdb_client/domain/import_declaration.py index 084d591e..f4ae7722 100644 --- a/influxdb_client/domain/import_declaration.py +++ b/influxdb_client/domain/import_declaration.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/index_expression.py b/influxdb_client/domain/index_expression.py index d7ad55e4..90bcf25d 100644 --- a/influxdb_client/domain/index_expression.py +++ b/influxdb_client/domain/index_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class IndexExpression(object): +class IndexExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class IndexExpression(object): def __init__(self, type=None, array=None, index=None): # noqa: E501,D401,D403 """IndexExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._array = None self._index = None diff --git a/influxdb_client/domain/integer_literal.py b/influxdb_client/domain/integer_literal.py index c4ec2389..015d1058 100644 --- a/influxdb_client/domain/integer_literal.py +++ b/influxdb_client/domain/integer_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class IntegerLiteral(object): +class IntegerLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class IntegerLiteral(object): def __init__(self, type=None, value=None): # noqa: E501,D401,D403 """IntegerLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._value = None self.discriminator = None diff --git a/influxdb_client/domain/is_onboarding.py b/influxdb_client/domain/is_onboarding.py index 089fe232..125dea98 100644 --- a/influxdb_client/domain/is_onboarding.py +++ b/influxdb_client/domain/is_onboarding.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/label.py b/influxdb_client/domain/label.py index 6169fe11..3be4fc3c 100644 --- a/influxdb_client/domain/label.py +++ b/influxdb_client/domain/label.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/label_create_request.py b/influxdb_client/domain/label_create_request.py index 5b0d0518..80fcf71c 100644 --- a/influxdb_client/domain/label_create_request.py +++ b/influxdb_client/domain/label_create_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -51,8 +51,7 @@ def __init__(self, org_id=None, name=None, properties=None): # noqa: E501,D401, self.discriminator = None self.org_id = org_id - if name is not None: - self.name = name + self.name = name if properties is not None: self.properties = properties @@ -92,6 +91,8 @@ def name(self, name): :param name: The name of this LabelCreateRequest. :type: str """ # noqa: E501 + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @property diff --git a/influxdb_client/domain/label_mapping.py b/influxdb_client/domain/label_mapping.py index f0f520bb..8aec87a1 100644 --- a/influxdb_client/domain/label_mapping.py +++ b/influxdb_client/domain/label_mapping.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/label_response.py b/influxdb_client/domain/label_response.py index 32b01c05..08620409 100644 --- a/influxdb_client/domain/label_response.py +++ b/influxdb_client/domain/label_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/label_update.py b/influxdb_client/domain/label_update.py index 02e8d559..875e417e 100644 --- a/influxdb_client/domain/label_update.py +++ b/influxdb_client/domain/label_update.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -33,7 +33,7 @@ class LabelUpdate(object): """ openapi_types = { 'name': 'str', - 'properties': 'object' + 'properties': 'dict(str, str)' } attribute_map = { @@ -77,7 +77,7 @@ def properties(self): Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. :return: The properties of this LabelUpdate. - :rtype: object + :rtype: dict(str, str) """ # noqa: E501 return self._properties @@ -88,7 +88,7 @@ def properties(self, properties): Key/Value pairs associated with this label. Keys can be removed by sending an update with an empty value. :param properties: The properties of this LabelUpdate. - :type: object + :type: dict(str, str) """ # noqa: E501 self._properties = properties diff --git a/influxdb_client/domain/labels_response.py b/influxdb_client/domain/labels_response.py index edbd5fb0..e94221d3 100644 --- a/influxdb_client/domain/labels_response.py +++ b/influxdb_client/domain/labels_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/language_request.py b/influxdb_client/domain/language_request.py index b4e7988a..6c3ffa8e 100644 --- a/influxdb_client/domain/language_request.py +++ b/influxdb_client/domain/language_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/lesser_threshold.py b/influxdb_client/domain/lesser_threshold.py index 45779f82..3756b37d 100644 --- a/influxdb_client/domain/lesser_threshold.py +++ b/influxdb_client/domain/lesser_threshold.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -34,17 +34,21 @@ class LesserThreshold(Threshold): """ openapi_types = { 'type': 'str', - 'value': 'float' + 'value': 'float', + 'level': 'CheckStatusLevel', + 'all_values': 'bool' } attribute_map = { 'type': 'type', - 'value': 'value' + 'value': 'value', + 'level': 'level', + 'all_values': 'allValues' } - def __init__(self, type=None, value=None): # noqa: E501,D401,D403 + def __init__(self, type="lesser", value=None, level=None, all_values=None): # noqa: E501,D401,D403 """LesserThreshold - a model defined in OpenAPI.""" # noqa: E501 - Threshold.__init__(self) # noqa: E501 + Threshold.__init__(self, level=level, all_values=all_values) # noqa: E501 self._type = None self._value = None diff --git a/influxdb_client/domain/line_plus_single_stat_properties.py b/influxdb_client/domain/line_plus_single_stat_properties.py index f8ba2106..849d6f57 100644 --- a/influxdb_client/domain/line_plus_single_stat_properties.py +++ b/influxdb_client/domain/line_plus_single_stat_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.view_properties import ViewProperties -class LinePlusSingleStatProperties(object): +class LinePlusSingleStatProperties(ViewProperties): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -40,14 +41,27 @@ class LinePlusSingleStatProperties(object): 'note': 'str', 'show_note_when_empty': 'bool', 'axes': 'Axes', - 'legend': 'Legend', + 'static_legend': 'StaticLegend', 'x_column': 'str', + 'generate_x_axis_ticks': 'list[str]', + 'x_total_ticks': 'int', + 'x_tick_start': 'float', + 'x_tick_step': 'float', 'y_column': 'str', + 'generate_y_axis_ticks': 'list[str]', + 'y_total_ticks': 'int', + 'y_tick_start': 'float', + 'y_tick_step': 'float', 'shade_below': 'bool', + 'hover_dimension': 'str', 'position': 'str', 'prefix': 'str', 'suffix': 'str', - 'decimal_places': 'DecimalPlaces' + 'decimal_places': 'DecimalPlaces', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' } attribute_map = { @@ -59,18 +73,33 @@ class LinePlusSingleStatProperties(object): 'note': 'note', 'show_note_when_empty': 'showNoteWhenEmpty', 'axes': 'axes', - 'legend': 'legend', + 'static_legend': 'staticLegend', 'x_column': 'xColumn', + 'generate_x_axis_ticks': 'generateXAxisTicks', + 'x_total_ticks': 'xTotalTicks', + 'x_tick_start': 'xTickStart', + 'x_tick_step': 'xTickStep', 'y_column': 'yColumn', + 'generate_y_axis_ticks': 'generateYAxisTicks', + 'y_total_ticks': 'yTotalTicks', + 'y_tick_start': 'yTickStart', + 'y_tick_step': 'yTickStep', 'shade_below': 'shadeBelow', + 'hover_dimension': 'hoverDimension', 'position': 'position', 'prefix': 'prefix', 'suffix': 'suffix', - 'decimal_places': 'decimalPlaces' + 'decimal_places': 'decimalPlaces', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, legend=None, x_column=None, y_column=None, shade_below=None, position=None, prefix=None, suffix=None, decimal_places=None): # noqa: E501,D401,D403 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, shade_below=None, hover_dimension=None, position=None, prefix=None, suffix=None, decimal_places=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """LinePlusSingleStatProperties - a model defined in OpenAPI.""" # noqa: E501 + ViewProperties.__init__(self) # noqa: E501 + self._time_format = None self._type = None self._queries = None @@ -79,14 +108,27 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._note = None self._show_note_when_empty = None self._axes = None - self._legend = None + self._static_legend = None self._x_column = None + self._generate_x_axis_ticks = None + self._x_total_ticks = None + self._x_tick_start = None + self._x_tick_step = None self._y_column = None + self._generate_y_axis_ticks = None + self._y_total_ticks = None + self._y_tick_start = None + self._y_tick_step = None self._shade_below = None + self._hover_dimension = None self._position = None self._prefix = None self._suffix = None self._decimal_places = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None self.discriminator = None if time_format is not None: @@ -98,17 +140,44 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self.note = note self.show_note_when_empty = show_note_when_empty self.axes = axes - self.legend = legend + if static_legend is not None: + self.static_legend = static_legend if x_column is not None: self.x_column = x_column + if generate_x_axis_ticks is not None: + self.generate_x_axis_ticks = generate_x_axis_ticks + if x_total_ticks is not None: + self.x_total_ticks = x_total_ticks + if x_tick_start is not None: + self.x_tick_start = x_tick_start + if x_tick_step is not None: + self.x_tick_step = x_tick_step if y_column is not None: self.y_column = y_column + if generate_y_axis_ticks is not None: + self.generate_y_axis_ticks = generate_y_axis_ticks + if y_total_ticks is not None: + self.y_total_ticks = y_total_ticks + if y_tick_start is not None: + self.y_tick_start = y_tick_start + if y_tick_step is not None: + self.y_tick_step = y_tick_step if shade_below is not None: self.shade_below = shade_below + if hover_dimension is not None: + self.hover_dimension = hover_dimension self.position = position self.prefix = prefix self.suffix = suffix self.decimal_places = decimal_places + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold @property def time_format(self): @@ -277,24 +346,22 @@ def axes(self, axes): self._axes = axes @property - def legend(self): - """Get the legend of this LinePlusSingleStatProperties. + def static_legend(self): + """Get the static_legend of this LinePlusSingleStatProperties. - :return: The legend of this LinePlusSingleStatProperties. - :rtype: Legend + :return: The static_legend of this LinePlusSingleStatProperties. + :rtype: StaticLegend """ # noqa: E501 - return self._legend + return self._static_legend - @legend.setter - def legend(self, legend): - """Set the legend of this LinePlusSingleStatProperties. + @static_legend.setter + def static_legend(self, static_legend): + """Set the static_legend of this LinePlusSingleStatProperties. - :param legend: The legend of this LinePlusSingleStatProperties. - :type: Legend + :param static_legend: The static_legend of this LinePlusSingleStatProperties. + :type: StaticLegend """ # noqa: E501 - if legend is None: - raise ValueError("Invalid value for `legend`, must not be `None`") # noqa: E501 - self._legend = legend + self._static_legend = static_legend @property def x_column(self): @@ -314,6 +381,78 @@ def x_column(self, x_column): """ # noqa: E501 self._x_column = x_column + @property + def generate_x_axis_ticks(self): + """Get the generate_x_axis_ticks of this LinePlusSingleStatProperties. + + :return: The generate_x_axis_ticks of this LinePlusSingleStatProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_x_axis_ticks + + @generate_x_axis_ticks.setter + def generate_x_axis_ticks(self, generate_x_axis_ticks): + """Set the generate_x_axis_ticks of this LinePlusSingleStatProperties. + + :param generate_x_axis_ticks: The generate_x_axis_ticks of this LinePlusSingleStatProperties. + :type: list[str] + """ # noqa: E501 + self._generate_x_axis_ticks = generate_x_axis_ticks + + @property + def x_total_ticks(self): + """Get the x_total_ticks of this LinePlusSingleStatProperties. + + :return: The x_total_ticks of this LinePlusSingleStatProperties. + :rtype: int + """ # noqa: E501 + return self._x_total_ticks + + @x_total_ticks.setter + def x_total_ticks(self, x_total_ticks): + """Set the x_total_ticks of this LinePlusSingleStatProperties. + + :param x_total_ticks: The x_total_ticks of this LinePlusSingleStatProperties. + :type: int + """ # noqa: E501 + self._x_total_ticks = x_total_ticks + + @property + def x_tick_start(self): + """Get the x_tick_start of this LinePlusSingleStatProperties. + + :return: The x_tick_start of this LinePlusSingleStatProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_start + + @x_tick_start.setter + def x_tick_start(self, x_tick_start): + """Set the x_tick_start of this LinePlusSingleStatProperties. + + :param x_tick_start: The x_tick_start of this LinePlusSingleStatProperties. + :type: float + """ # noqa: E501 + self._x_tick_start = x_tick_start + + @property + def x_tick_step(self): + """Get the x_tick_step of this LinePlusSingleStatProperties. + + :return: The x_tick_step of this LinePlusSingleStatProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_step + + @x_tick_step.setter + def x_tick_step(self, x_tick_step): + """Set the x_tick_step of this LinePlusSingleStatProperties. + + :param x_tick_step: The x_tick_step of this LinePlusSingleStatProperties. + :type: float + """ # noqa: E501 + self._x_tick_step = x_tick_step + @property def y_column(self): """Get the y_column of this LinePlusSingleStatProperties. @@ -332,6 +471,78 @@ def y_column(self, y_column): """ # noqa: E501 self._y_column = y_column + @property + def generate_y_axis_ticks(self): + """Get the generate_y_axis_ticks of this LinePlusSingleStatProperties. + + :return: The generate_y_axis_ticks of this LinePlusSingleStatProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_y_axis_ticks + + @generate_y_axis_ticks.setter + def generate_y_axis_ticks(self, generate_y_axis_ticks): + """Set the generate_y_axis_ticks of this LinePlusSingleStatProperties. + + :param generate_y_axis_ticks: The generate_y_axis_ticks of this LinePlusSingleStatProperties. + :type: list[str] + """ # noqa: E501 + self._generate_y_axis_ticks = generate_y_axis_ticks + + @property + def y_total_ticks(self): + """Get the y_total_ticks of this LinePlusSingleStatProperties. + + :return: The y_total_ticks of this LinePlusSingleStatProperties. + :rtype: int + """ # noqa: E501 + return self._y_total_ticks + + @y_total_ticks.setter + def y_total_ticks(self, y_total_ticks): + """Set the y_total_ticks of this LinePlusSingleStatProperties. + + :param y_total_ticks: The y_total_ticks of this LinePlusSingleStatProperties. + :type: int + """ # noqa: E501 + self._y_total_ticks = y_total_ticks + + @property + def y_tick_start(self): + """Get the y_tick_start of this LinePlusSingleStatProperties. + + :return: The y_tick_start of this LinePlusSingleStatProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_start + + @y_tick_start.setter + def y_tick_start(self, y_tick_start): + """Set the y_tick_start of this LinePlusSingleStatProperties. + + :param y_tick_start: The y_tick_start of this LinePlusSingleStatProperties. + :type: float + """ # noqa: E501 + self._y_tick_start = y_tick_start + + @property + def y_tick_step(self): + """Get the y_tick_step of this LinePlusSingleStatProperties. + + :return: The y_tick_step of this LinePlusSingleStatProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_step + + @y_tick_step.setter + def y_tick_step(self, y_tick_step): + """Set the y_tick_step of this LinePlusSingleStatProperties. + + :param y_tick_step: The y_tick_step of this LinePlusSingleStatProperties. + :type: float + """ # noqa: E501 + self._y_tick_step = y_tick_step + @property def shade_below(self): """Get the shade_below of this LinePlusSingleStatProperties. @@ -350,6 +561,24 @@ def shade_below(self, shade_below): """ # noqa: E501 self._shade_below = shade_below + @property + def hover_dimension(self): + """Get the hover_dimension of this LinePlusSingleStatProperties. + + :return: The hover_dimension of this LinePlusSingleStatProperties. + :rtype: str + """ # noqa: E501 + return self._hover_dimension + + @hover_dimension.setter + def hover_dimension(self, hover_dimension): + """Set the hover_dimension of this LinePlusSingleStatProperties. + + :param hover_dimension: The hover_dimension of this LinePlusSingleStatProperties. + :type: str + """ # noqa: E501 + self._hover_dimension = hover_dimension + @property def position(self): """Get the position of this LinePlusSingleStatProperties. @@ -430,6 +659,78 @@ def decimal_places(self, decimal_places): raise ValueError("Invalid value for `decimal_places`, must not be `None`") # noqa: E501 self._decimal_places = decimal_places + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this LinePlusSingleStatProperties. + + :return: The legend_colorize_rows of this LinePlusSingleStatProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this LinePlusSingleStatProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this LinePlusSingleStatProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this LinePlusSingleStatProperties. + + :return: The legend_hide of this LinePlusSingleStatProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this LinePlusSingleStatProperties. + + :param legend_hide: The legend_hide of this LinePlusSingleStatProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this LinePlusSingleStatProperties. + + :return: The legend_opacity of this LinePlusSingleStatProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this LinePlusSingleStatProperties. + + :param legend_opacity: The legend_opacity of this LinePlusSingleStatProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this LinePlusSingleStatProperties. + + :return: The legend_orientation_threshold of this LinePlusSingleStatProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this LinePlusSingleStatProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this LinePlusSingleStatProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/line_protocol_error.py b/influxdb_client/domain/line_protocol_error.py index 667c9784..9c055e48 100644 --- a/influxdb_client/domain/line_protocol_error.py +++ b/influxdb_client/domain/line_protocol_error.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/line_protocol_length_error.py b/influxdb_client/domain/line_protocol_length_error.py index a4664cd2..a94da2ab 100644 --- a/influxdb_client/domain/line_protocol_length_error.py +++ b/influxdb_client/domain/line_protocol_length_error.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/links.py b/influxdb_client/domain/links.py index 4b758a37..369149f0 100644 --- a/influxdb_client/domain/links.py +++ b/influxdb_client/domain/links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/log_event.py b/influxdb_client/domain/log_event.py index 57b8186f..0de87139 100644 --- a/influxdb_client/domain/log_event.py +++ b/influxdb_client/domain/log_event.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -33,24 +33,29 @@ class LogEvent(object): """ openapi_types = { 'time': 'datetime', - 'message': 'str' + 'message': 'str', + 'run_id': 'str' } attribute_map = { 'time': 'time', - 'message': 'message' + 'message': 'message', + 'run_id': 'runID' } - def __init__(self, time=None, message=None): # noqa: E501,D401,D403 + def __init__(self, time=None, message=None, run_id=None): # noqa: E501,D401,D403 """LogEvent - a model defined in OpenAPI.""" # noqa: E501 self._time = None self._message = None + self._run_id = None self.discriminator = None if time is not None: self.time = time if message is not None: self.message = message + if run_id is not None: + self.run_id = run_id @property def time(self): @@ -96,6 +101,28 @@ def message(self, message): """ # noqa: E501 self._message = message + @property + def run_id(self): + """Get the run_id of this LogEvent. + + the ID of the task that logged + + :return: The run_id of this LogEvent. + :rtype: str + """ # noqa: E501 + return self._run_id + + @run_id.setter + def run_id(self, run_id): + """Set the run_id of this LogEvent. + + the ID of the task that logged + + :param run_id: The run_id of this LogEvent. + :type: str + """ # noqa: E501 + self._run_id = run_id + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/logical_expression.py b/influxdb_client/domain/logical_expression.py index f54cc811..1bfb4f03 100644 --- a/influxdb_client/domain/logical_expression.py +++ b/influxdb_client/domain/logical_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class LogicalExpression(object): +class LogicalExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -47,6 +48,8 @@ class LogicalExpression(object): def __init__(self, type=None, operator=None, left=None, right=None): # noqa: E501,D401,D403 """LogicalExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._operator = None self._left = None diff --git a/influxdb_client/domain/logs.py b/influxdb_client/domain/logs.py index 1108f0a9..09f534f4 100644 --- a/influxdb_client/domain/logs.py +++ b/influxdb_client/domain/logs.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/map_variable_properties.py b/influxdb_client/domain/map_variable_properties.py index c693e73a..16ae1056 100644 --- a/influxdb_client/domain/map_variable_properties.py +++ b/influxdb_client/domain/map_variable_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.variable_properties import VariableProperties -class MapVariableProperties(object): +class MapVariableProperties(VariableProperties): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class MapVariableProperties(object): def __init__(self, type=None, values=None): # noqa: E501,D401,D403 """MapVariableProperties - a model defined in OpenAPI.""" # noqa: E501 + VariableProperties.__init__(self) # noqa: E501 + self._type = None self._values = None self.discriminator = None diff --git a/influxdb_client/domain/markdown_view_properties.py b/influxdb_client/domain/markdown_view_properties.py index d0a93017..4a57bc9c 100644 --- a/influxdb_client/domain/markdown_view_properties.py +++ b/influxdb_client/domain/markdown_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/member_assignment.py b/influxdb_client/domain/member_assignment.py index c8af3785..d3e4fcf3 100644 --- a/influxdb_client/domain/member_assignment.py +++ b/influxdb_client/domain/member_assignment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class MemberAssignment(object): +class MemberAssignment(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class MemberAssignment(object): def __init__(self, type=None, member=None, init=None): # noqa: E501,D401,D403 """MemberAssignment - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._member = None self._init = None diff --git a/influxdb_client/domain/member_expression.py b/influxdb_client/domain/member_expression.py index de656705..3b7c0b5d 100644 --- a/influxdb_client/domain/member_expression.py +++ b/influxdb_client/domain/member_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class MemberExpression(object): +class MemberExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class MemberExpression(object): def __init__(self, type=None, object=None, _property=None): # noqa: E501,D401,D403 """MemberExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._object = None self.__property = None diff --git a/influxdb_client/domain/model_property.py b/influxdb_client/domain/model_property.py index 9a20839a..d00af210 100644 --- a/influxdb_client/domain/model_property.py +++ b/influxdb_client/domain/model_property.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/mosaic_view_properties.py b/influxdb_client/domain/mosaic_view_properties.py new file mode 100644 index 00000000..7b54191b --- /dev/null +++ b/influxdb_client/domain/mosaic_view_properties.py @@ -0,0 +1,781 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.view_properties import ViewProperties + + +class MosaicViewProperties(ViewProperties): + """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 = { + 'time_format': 'str', + 'type': 'str', + 'queries': 'list[DashboardQuery]', + 'colors': 'list[str]', + 'shape': 'str', + 'note': 'str', + 'show_note_when_empty': 'bool', + 'x_column': 'str', + 'generate_x_axis_ticks': 'list[str]', + 'x_total_ticks': 'int', + 'x_tick_start': 'float', + 'x_tick_step': 'float', + 'y_label_column_separator': 'str', + 'y_label_columns': 'list[str]', + 'y_series_columns': 'list[str]', + 'fill_columns': 'list[str]', + 'x_domain': 'list[float]', + 'y_domain': 'list[float]', + 'x_axis_label': 'str', + 'y_axis_label': 'str', + 'x_prefix': 'str', + 'x_suffix': 'str', + 'y_prefix': 'str', + 'y_suffix': 'str', + 'hover_dimension': 'str', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' + } + + attribute_map = { + 'time_format': 'timeFormat', + 'type': 'type', + 'queries': 'queries', + 'colors': 'colors', + 'shape': 'shape', + 'note': 'note', + 'show_note_when_empty': 'showNoteWhenEmpty', + 'x_column': 'xColumn', + 'generate_x_axis_ticks': 'generateXAxisTicks', + 'x_total_ticks': 'xTotalTicks', + 'x_tick_start': 'xTickStart', + 'x_tick_step': 'xTickStep', + 'y_label_column_separator': 'yLabelColumnSeparator', + 'y_label_columns': 'yLabelColumns', + 'y_series_columns': 'ySeriesColumns', + 'fill_columns': 'fillColumns', + 'x_domain': 'xDomain', + 'y_domain': 'yDomain', + 'x_axis_label': 'xAxisLabel', + 'y_axis_label': 'yAxisLabel', + 'x_prefix': 'xPrefix', + 'x_suffix': 'xSuffix', + 'y_prefix': 'yPrefix', + 'y_suffix': 'ySuffix', + 'hover_dimension': 'hoverDimension', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' + } + + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_label_column_separator=None, y_label_columns=None, y_series_columns=None, fill_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, hover_dimension=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 + """MosaicViewProperties - a model defined in OpenAPI.""" # noqa: E501 + ViewProperties.__init__(self) # noqa: E501 + + self._time_format = None + self._type = None + self._queries = None + self._colors = None + self._shape = None + self._note = None + self._show_note_when_empty = None + self._x_column = None + self._generate_x_axis_ticks = None + self._x_total_ticks = None + self._x_tick_start = None + self._x_tick_step = None + self._y_label_column_separator = None + self._y_label_columns = None + self._y_series_columns = None + self._fill_columns = None + self._x_domain = None + self._y_domain = None + self._x_axis_label = None + self._y_axis_label = None + self._x_prefix = None + self._x_suffix = None + self._y_prefix = None + self._y_suffix = None + self._hover_dimension = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None + self.discriminator = None + + if time_format is not None: + self.time_format = time_format + self.type = type + self.queries = queries + self.colors = colors + self.shape = shape + self.note = note + self.show_note_when_empty = show_note_when_empty + self.x_column = x_column + if generate_x_axis_ticks is not None: + self.generate_x_axis_ticks = generate_x_axis_ticks + if x_total_ticks is not None: + self.x_total_ticks = x_total_ticks + if x_tick_start is not None: + self.x_tick_start = x_tick_start + if x_tick_step is not None: + self.x_tick_step = x_tick_step + if y_label_column_separator is not None: + self.y_label_column_separator = y_label_column_separator + if y_label_columns is not None: + self.y_label_columns = y_label_columns + self.y_series_columns = y_series_columns + self.fill_columns = fill_columns + self.x_domain = x_domain + self.y_domain = y_domain + self.x_axis_label = x_axis_label + self.y_axis_label = y_axis_label + self.x_prefix = x_prefix + self.x_suffix = x_suffix + self.y_prefix = y_prefix + self.y_suffix = y_suffix + if hover_dimension is not None: + self.hover_dimension = hover_dimension + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold + + @property + def time_format(self): + """Get the time_format of this MosaicViewProperties. + + :return: The time_format of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._time_format + + @time_format.setter + def time_format(self, time_format): + """Set the time_format of this MosaicViewProperties. + + :param time_format: The time_format of this MosaicViewProperties. + :type: str + """ # noqa: E501 + self._time_format = time_format + + @property + def type(self): + """Get the type of this MosaicViewProperties. + + :return: The type of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this MosaicViewProperties. + + :param type: The type of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + @property + def queries(self): + """Get the queries of this MosaicViewProperties. + + :return: The queries of this MosaicViewProperties. + :rtype: list[DashboardQuery] + """ # noqa: E501 + return self._queries + + @queries.setter + def queries(self, queries): + """Set the queries of this MosaicViewProperties. + + :param queries: The queries of this MosaicViewProperties. + :type: list[DashboardQuery] + """ # noqa: E501 + if queries is None: + raise ValueError("Invalid value for `queries`, must not be `None`") # noqa: E501 + self._queries = queries + + @property + def colors(self): + """Get the colors of this MosaicViewProperties. + + Colors define color encoding of data into a visualization + + :return: The colors of this MosaicViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._colors + + @colors.setter + def colors(self, colors): + """Set the colors of this MosaicViewProperties. + + Colors define color encoding of data into a visualization + + :param colors: The colors of this MosaicViewProperties. + :type: list[str] + """ # noqa: E501 + if colors is None: + raise ValueError("Invalid value for `colors`, must not be `None`") # noqa: E501 + self._colors = colors + + @property + def shape(self): + """Get the shape of this MosaicViewProperties. + + :return: The shape of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._shape + + @shape.setter + def shape(self, shape): + """Set the shape of this MosaicViewProperties. + + :param shape: The shape of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if shape is None: + raise ValueError("Invalid value for `shape`, must not be `None`") # noqa: E501 + self._shape = shape + + @property + def note(self): + """Get the note of this MosaicViewProperties. + + :return: The note of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._note + + @note.setter + def note(self, note): + """Set the note of this MosaicViewProperties. + + :param note: The note of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if note is None: + raise ValueError("Invalid value for `note`, must not be `None`") # noqa: E501 + self._note = note + + @property + def show_note_when_empty(self): + """Get the show_note_when_empty of this MosaicViewProperties. + + If true, will display note when empty + + :return: The show_note_when_empty of this MosaicViewProperties. + :rtype: bool + """ # noqa: E501 + return self._show_note_when_empty + + @show_note_when_empty.setter + def show_note_when_empty(self, show_note_when_empty): + """Set the show_note_when_empty of this MosaicViewProperties. + + If true, will display note when empty + + :param show_note_when_empty: The show_note_when_empty of this MosaicViewProperties. + :type: bool + """ # noqa: E501 + if show_note_when_empty is None: + raise ValueError("Invalid value for `show_note_when_empty`, must not be `None`") # noqa: E501 + self._show_note_when_empty = show_note_when_empty + + @property + def x_column(self): + """Get the x_column of this MosaicViewProperties. + + :return: The x_column of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._x_column + + @x_column.setter + def x_column(self, x_column): + """Set the x_column of this MosaicViewProperties. + + :param x_column: The x_column of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if x_column is None: + raise ValueError("Invalid value for `x_column`, must not be `None`") # noqa: E501 + self._x_column = x_column + + @property + def generate_x_axis_ticks(self): + """Get the generate_x_axis_ticks of this MosaicViewProperties. + + :return: The generate_x_axis_ticks of this MosaicViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_x_axis_ticks + + @generate_x_axis_ticks.setter + def generate_x_axis_ticks(self, generate_x_axis_ticks): + """Set the generate_x_axis_ticks of this MosaicViewProperties. + + :param generate_x_axis_ticks: The generate_x_axis_ticks of this MosaicViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_x_axis_ticks = generate_x_axis_ticks + + @property + def x_total_ticks(self): + """Get the x_total_ticks of this MosaicViewProperties. + + :return: The x_total_ticks of this MosaicViewProperties. + :rtype: int + """ # noqa: E501 + return self._x_total_ticks + + @x_total_ticks.setter + def x_total_ticks(self, x_total_ticks): + """Set the x_total_ticks of this MosaicViewProperties. + + :param x_total_ticks: The x_total_ticks of this MosaicViewProperties. + :type: int + """ # noqa: E501 + self._x_total_ticks = x_total_ticks + + @property + def x_tick_start(self): + """Get the x_tick_start of this MosaicViewProperties. + + :return: The x_tick_start of this MosaicViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_start + + @x_tick_start.setter + def x_tick_start(self, x_tick_start): + """Set the x_tick_start of this MosaicViewProperties. + + :param x_tick_start: The x_tick_start of this MosaicViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_start = x_tick_start + + @property + def x_tick_step(self): + """Get the x_tick_step of this MosaicViewProperties. + + :return: The x_tick_step of this MosaicViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_step + + @x_tick_step.setter + def x_tick_step(self, x_tick_step): + """Set the x_tick_step of this MosaicViewProperties. + + :param x_tick_step: The x_tick_step of this MosaicViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_step = x_tick_step + + @property + def y_label_column_separator(self): + """Get the y_label_column_separator of this MosaicViewProperties. + + :return: The y_label_column_separator of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._y_label_column_separator + + @y_label_column_separator.setter + def y_label_column_separator(self, y_label_column_separator): + """Set the y_label_column_separator of this MosaicViewProperties. + + :param y_label_column_separator: The y_label_column_separator of this MosaicViewProperties. + :type: str + """ # noqa: E501 + self._y_label_column_separator = y_label_column_separator + + @property + def y_label_columns(self): + """Get the y_label_columns of this MosaicViewProperties. + + :return: The y_label_columns of this MosaicViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._y_label_columns + + @y_label_columns.setter + def y_label_columns(self, y_label_columns): + """Set the y_label_columns of this MosaicViewProperties. + + :param y_label_columns: The y_label_columns of this MosaicViewProperties. + :type: list[str] + """ # noqa: E501 + self._y_label_columns = y_label_columns + + @property + def y_series_columns(self): + """Get the y_series_columns of this MosaicViewProperties. + + :return: The y_series_columns of this MosaicViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._y_series_columns + + @y_series_columns.setter + def y_series_columns(self, y_series_columns): + """Set the y_series_columns of this MosaicViewProperties. + + :param y_series_columns: The y_series_columns of this MosaicViewProperties. + :type: list[str] + """ # noqa: E501 + if y_series_columns is None: + raise ValueError("Invalid value for `y_series_columns`, must not be `None`") # noqa: E501 + self._y_series_columns = y_series_columns + + @property + def fill_columns(self): + """Get the fill_columns of this MosaicViewProperties. + + :return: The fill_columns of this MosaicViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._fill_columns + + @fill_columns.setter + def fill_columns(self, fill_columns): + """Set the fill_columns of this MosaicViewProperties. + + :param fill_columns: The fill_columns of this MosaicViewProperties. + :type: list[str] + """ # noqa: E501 + if fill_columns is None: + raise ValueError("Invalid value for `fill_columns`, must not be `None`") # noqa: E501 + self._fill_columns = fill_columns + + @property + def x_domain(self): + """Get the x_domain of this MosaicViewProperties. + + :return: The x_domain of this MosaicViewProperties. + :rtype: list[float] + """ # noqa: E501 + return self._x_domain + + @x_domain.setter + def x_domain(self, x_domain): + """Set the x_domain of this MosaicViewProperties. + + :param x_domain: The x_domain of this MosaicViewProperties. + :type: list[float] + """ # noqa: E501 + if x_domain is None: + raise ValueError("Invalid value for `x_domain`, must not be `None`") # noqa: E501 + self._x_domain = x_domain + + @property + def y_domain(self): + """Get the y_domain of this MosaicViewProperties. + + :return: The y_domain of this MosaicViewProperties. + :rtype: list[float] + """ # noqa: E501 + return self._y_domain + + @y_domain.setter + def y_domain(self, y_domain): + """Set the y_domain of this MosaicViewProperties. + + :param y_domain: The y_domain of this MosaicViewProperties. + :type: list[float] + """ # noqa: E501 + if y_domain is None: + raise ValueError("Invalid value for `y_domain`, must not be `None`") # noqa: E501 + self._y_domain = y_domain + + @property + def x_axis_label(self): + """Get the x_axis_label of this MosaicViewProperties. + + :return: The x_axis_label of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._x_axis_label + + @x_axis_label.setter + def x_axis_label(self, x_axis_label): + """Set the x_axis_label of this MosaicViewProperties. + + :param x_axis_label: The x_axis_label of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if x_axis_label is None: + raise ValueError("Invalid value for `x_axis_label`, must not be `None`") # noqa: E501 + self._x_axis_label = x_axis_label + + @property + def y_axis_label(self): + """Get the y_axis_label of this MosaicViewProperties. + + :return: The y_axis_label of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._y_axis_label + + @y_axis_label.setter + def y_axis_label(self, y_axis_label): + """Set the y_axis_label of this MosaicViewProperties. + + :param y_axis_label: The y_axis_label of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if y_axis_label is None: + raise ValueError("Invalid value for `y_axis_label`, must not be `None`") # noqa: E501 + self._y_axis_label = y_axis_label + + @property + def x_prefix(self): + """Get the x_prefix of this MosaicViewProperties. + + :return: The x_prefix of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._x_prefix + + @x_prefix.setter + def x_prefix(self, x_prefix): + """Set the x_prefix of this MosaicViewProperties. + + :param x_prefix: The x_prefix of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if x_prefix is None: + raise ValueError("Invalid value for `x_prefix`, must not be `None`") # noqa: E501 + self._x_prefix = x_prefix + + @property + def x_suffix(self): + """Get the x_suffix of this MosaicViewProperties. + + :return: The x_suffix of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._x_suffix + + @x_suffix.setter + def x_suffix(self, x_suffix): + """Set the x_suffix of this MosaicViewProperties. + + :param x_suffix: The x_suffix of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if x_suffix is None: + raise ValueError("Invalid value for `x_suffix`, must not be `None`") # noqa: E501 + self._x_suffix = x_suffix + + @property + def y_prefix(self): + """Get the y_prefix of this MosaicViewProperties. + + :return: The y_prefix of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._y_prefix + + @y_prefix.setter + def y_prefix(self, y_prefix): + """Set the y_prefix of this MosaicViewProperties. + + :param y_prefix: The y_prefix of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if y_prefix is None: + raise ValueError("Invalid value for `y_prefix`, must not be `None`") # noqa: E501 + self._y_prefix = y_prefix + + @property + def y_suffix(self): + """Get the y_suffix of this MosaicViewProperties. + + :return: The y_suffix of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._y_suffix + + @y_suffix.setter + def y_suffix(self, y_suffix): + """Set the y_suffix of this MosaicViewProperties. + + :param y_suffix: The y_suffix of this MosaicViewProperties. + :type: str + """ # noqa: E501 + if y_suffix is None: + raise ValueError("Invalid value for `y_suffix`, must not be `None`") # noqa: E501 + self._y_suffix = y_suffix + + @property + def hover_dimension(self): + """Get the hover_dimension of this MosaicViewProperties. + + :return: The hover_dimension of this MosaicViewProperties. + :rtype: str + """ # noqa: E501 + return self._hover_dimension + + @hover_dimension.setter + def hover_dimension(self, hover_dimension): + """Set the hover_dimension of this MosaicViewProperties. + + :param hover_dimension: The hover_dimension of this MosaicViewProperties. + :type: str + """ # noqa: E501 + self._hover_dimension = hover_dimension + + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this MosaicViewProperties. + + :return: The legend_colorize_rows of this MosaicViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this MosaicViewProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this MosaicViewProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this MosaicViewProperties. + + :return: The legend_hide of this MosaicViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this MosaicViewProperties. + + :param legend_hide: The legend_hide of this MosaicViewProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this MosaicViewProperties. + + :return: The legend_opacity of this MosaicViewProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this MosaicViewProperties. + + :param legend_opacity: The legend_opacity of this MosaicViewProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this MosaicViewProperties. + + :return: The legend_orientation_threshold of this MosaicViewProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this MosaicViewProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this MosaicViewProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, MosaicViewProperties): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/node.py b/influxdb_client/domain/node.py index afc8c73a..52e40e70 100644 --- a/influxdb_client/domain/node.py +++ b/influxdb_client/domain/node.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/notification_endpoint.py b/influxdb_client/domain/notification_endpoint.py index d645d6b7..b3056d03 100644 --- a/influxdb_client/domain/notification_endpoint.py +++ b/influxdb_client/domain/notification_endpoint.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,9 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase -class NotificationEndpoint(NotificationEndpointBase): +class NotificationEndpoint(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,37 +32,52 @@ class NotificationEndpoint(NotificationEndpointBase): and the value is json key in definition. """ openapi_types = { - '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' + 'type': 'NotificationEndpointType', } attribute_map = { - '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' + 'type': 'type', } - 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,D401,D403 + discriminator_value_class_map = { + 'slack': 'SlackNotificationEndpoint', + 'pagerduty': 'PagerDutyNotificationEndpoint', + 'http': 'HTTPNotificationEndpoint', + 'telegram': 'TelegramNotificationEndpoint' + } + + def __init__(self, type=None): # noqa: E501,D401,D403 """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) # noqa: E501 - self.discriminator = None + self._type = None + self.discriminator = 'type' + + self.type = type + + @property + def type(self): + """Get the type of this NotificationEndpoint. + + :return: The type of this NotificationEndpoint. + :rtype: NotificationEndpointType + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this NotificationEndpoint. + + :param type: The type of this NotificationEndpoint. + :type: NotificationEndpointType + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + def get_real_child_model(self, data): + """Return 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): """Return 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 f77eca56..3269a944 100644 --- a/influxdb_client/domain/notification_endpoint_base.py +++ b/influxdb_client/domain/notification_endpoint_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,9 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator -class NotificationEndpointBase(NotificationEndpointDiscriminator): +class NotificationEndpointBase(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -62,8 +61,6 @@ class NotificationEndpointBase(NotificationEndpointDiscriminator): 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,D401,D403 """NotificationEndpointBase - a model defined in OpenAPI.""" # noqa: E501 - NotificationEndpointDiscriminator.__init__(self) # noqa: E501 - self._id = None self._org_id = None self._user_id = None diff --git a/influxdb_client/domain/notification_endpoint_base_links.py b/influxdb_client/domain/notification_endpoint_base_links.py index 5f93a421..bf5de070 100644 --- a/influxdb_client/domain/notification_endpoint_base_links.py +++ b/influxdb_client/domain/notification_endpoint_base_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/notification_endpoint_discriminator.py b/influxdb_client/domain/notification_endpoint_discriminator.py index 1252f2a2..7a1d4671 100644 --- a/influxdb_client/domain/notification_endpoint_discriminator.py +++ b/influxdb_client/domain/notification_endpoint_discriminator.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.post_notification_endpoint import PostNotificationEndpoint +from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase -class NotificationEndpointDiscriminator(PostNotificationEndpoint): +class NotificationEndpointDiscriminator(NotificationEndpointBase): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,29 +33,37 @@ class NotificationEndpointDiscriminator(PostNotificationEndpoint): and the value is json key in definition. """ openapi_types = { + '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' } attribute_map = { + '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' } - discriminator_value_class_map = { - 'SlackNotificationEndpoint': 'SlackNotificationEndpoint', - 'PagerDutyNotificationEndpoint': 'PagerDutyNotificationEndpoint', - 'HTTPNotificationEndpoint': 'HTTPNotificationEndpoint', - 'NotificationEndpoint': 'NotificationEndpoint', - 'NotificationEndpointBase': 'NotificationEndpointBase' - } - - def __init__(self): # noqa: E501,D401,D403 + 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,D401,D403 """NotificationEndpointDiscriminator - a model defined in OpenAPI.""" # noqa: E501 - PostNotificationEndpoint.__init__(self) # noqa: E501 - self.discriminator = 'type' - - def get_real_child_model(self, data): - """Return 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) + 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) # noqa: E501 + self.discriminator = None def to_dict(self): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/notification_endpoint_type.py b/influxdb_client/domain/notification_endpoint_type.py index e63116ac..ce504969 100644 --- a/influxdb_client/domain/notification_endpoint_type.py +++ b/influxdb_client/domain/notification_endpoint_type.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -30,6 +30,7 @@ class NotificationEndpointType(object): SLACK = "slack" PAGERDUTY = "pagerduty" HTTP = "http" + TELEGRAM = "telegram" """ Attributes: diff --git a/influxdb_client/domain/notification_endpoint_update.py b/influxdb_client/domain/notification_endpoint_update.py index cce0a0ea..ffbf5fcf 100644 --- a/influxdb_client/domain/notification_endpoint_update.py +++ b/influxdb_client/domain/notification_endpoint_update.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/notification_endpoints.py b/influxdb_client/domain/notification_endpoints.py index 313653cd..f5b2a9ee 100644 --- a/influxdb_client/domain/notification_endpoints.py +++ b/influxdb_client/domain/notification_endpoints.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/notification_rule.py b/influxdb_client/domain/notification_rule.py index fd050313..aad3e9a9 100644 --- a/influxdb_client/domain/notification_rule.py +++ b/influxdb_client/domain/notification_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,9 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_rule_base import NotificationRuleBase -class NotificationRule(NotificationRuleBase): +class NotificationRule(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,53 +32,57 @@ class NotificationRule(NotificationRuleBase): and the value is json key in definition. """ openapi_types = { - 'id': 'str', - 'endpoint_id': 'str', - 'org_id': 'str', - 'owner_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'status': 'TaskStatusType', - 'name': 'str', - 'sleep_until': 'str', - 'every': 'str', - 'offset': 'str', - 'runbook_link': 'str', - 'limit_every': 'int', - 'limit': 'int', - 'tag_rules': 'list[TagRule]', - 'description': 'str', - 'status_rules': 'list[StatusRule]', - 'labels': 'list[Label]', - 'links': 'NotificationRuleBaseLinks' + 'type': 'str', } attribute_map = { - 'id': 'id', - 'endpoint_id': 'endpointID', - 'org_id': 'orgID', - 'owner_id': 'ownerID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'status': 'status', - 'name': 'name', - 'sleep_until': 'sleepUntil', - 'every': 'every', - 'offset': 'offset', - 'runbook_link': 'runbookLink', - 'limit_every': 'limitEvery', - 'limit': 'limit', - 'tag_rules': 'tagRules', - 'description': 'description', - 'status_rules': 'statusRules', - 'labels': 'labels', - 'links': 'links' + 'type': 'type', } - 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,D401,D403 + discriminator_value_class_map = { + 'slack': 'SlackNotificationRule', + 'pagerduty': 'PagerDutyNotificationRule', + 'smtp': 'SMTPNotificationRule', + 'http': 'HTTPNotificationRule', + 'telegram': 'TelegramNotificationRule' + } + + def __init__(self, type=None): # noqa: E501,D401,D403 """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) # noqa: E501 - self.discriminator = None + self._type = None + self.discriminator = 'type' + + self.type = type + + @property + def type(self): + """Get the type of this NotificationRule. + + The discriminator between other types of notification rules is "telegram". + + :return: The type of this NotificationRule. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this NotificationRule. + + The discriminator between other types of notification rules is "telegram". + + :param type: The type of this NotificationRule. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + def get_real_child_model(self, data): + """Return 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): """Return 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 84f68eea..ed55bee4 100644 --- a/influxdb_client/domain/notification_rule_base.py +++ b/influxdb_client/domain/notification_rule_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,9 @@ import re # noqa: F401 import six -from influxdb_client.domain.post_notification_rule import PostNotificationRule -class NotificationRuleBase(PostNotificationRule): +class NotificationRuleBase(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,9 +32,13 @@ class NotificationRuleBase(PostNotificationRule): and the value is json key in definition. """ openapi_types = { + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', 'id': 'str', 'endpoint_id': 'str', 'org_id': 'str', + 'task_id': 'str', 'owner_id': 'str', 'created_at': 'datetime', 'updated_at': 'datetime', @@ -55,9 +58,13 @@ class NotificationRuleBase(PostNotificationRule): } attribute_map = { + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', 'id': 'id', 'endpoint_id': 'endpointID', 'org_id': 'orgID', + 'task_id': 'taskID', 'owner_id': 'ownerID', 'created_at': 'createdAt', 'updated_at': 'updatedAt', @@ -76,13 +83,15 @@ class NotificationRuleBase(PostNotificationRule): 'links': 'links' } - 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,D401,D403 + def __init__(self, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """NotificationRuleBase - a model defined in OpenAPI.""" # noqa: E501 - PostNotificationRule.__init__(self) # noqa: E501 - + self._latest_completed = None + self._last_run_status = None + self._last_run_error = None self._id = None self._endpoint_id = None self._org_id = None + self._task_id = None self._owner_id = None self._created_at = None self._updated_at = None @@ -101,9 +110,18 @@ def __init__(self, id=None, endpoint_id=None, org_id=None, owner_id=None, create self._links = None self.discriminator = None - self.id = id + 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 id is not None: + self.id = id self.endpoint_id = endpoint_id self.org_id = org_id + if task_id is not None: + self.task_id = task_id if owner_id is not None: self.owner_id = owner_id if created_at is not None: @@ -124,7 +142,8 @@ def __init__(self, id=None, endpoint_id=None, org_id=None, owner_id=None, create self.limit_every = limit_every if limit is not None: self.limit = limit - self.tag_rules = tag_rules + if tag_rules is not None: + self.tag_rules = tag_rules if description is not None: self.description = description self.status_rules = status_rules @@ -133,6 +152,64 @@ def __init__(self, id=None, endpoint_id=None, org_id=None, owner_id=None, create if links is not None: self.links = links + @property + def latest_completed(self): + """Get the latest_completed of this NotificationRuleBase. + + Timestamp of latest scheduled, completed run, RFC3339. + + :return: The latest_completed of this NotificationRuleBase. + :rtype: datetime + """ # noqa: E501 + return self._latest_completed + + @latest_completed.setter + def latest_completed(self, latest_completed): + """Set the latest_completed of this NotificationRuleBase. + + Timestamp of latest scheduled, completed run, RFC3339. + + :param latest_completed: The latest_completed of this NotificationRuleBase. + :type: datetime + """ # noqa: E501 + self._latest_completed = latest_completed + + @property + def last_run_status(self): + """Get the last_run_status of this NotificationRuleBase. + + :return: The last_run_status of this NotificationRuleBase. + :rtype: str + """ # noqa: E501 + return self._last_run_status + + @last_run_status.setter + def last_run_status(self, last_run_status): + """Set the last_run_status of this NotificationRuleBase. + + :param last_run_status: The last_run_status of this NotificationRuleBase. + :type: str + """ # noqa: E501 + self._last_run_status = last_run_status + + @property + def last_run_error(self): + """Get the last_run_error of this NotificationRuleBase. + + :return: The last_run_error of this NotificationRuleBase. + :rtype: str + """ # noqa: E501 + return self._last_run_error + + @last_run_error.setter + def last_run_error(self, last_run_error): + """Set the last_run_error of this NotificationRuleBase. + + :param last_run_error: The last_run_error of this NotificationRuleBase. + :type: str + """ # noqa: E501 + self._last_run_error = last_run_error + @property def id(self): """Get the id of this NotificationRuleBase. @@ -149,8 +226,6 @@ def id(self, id): :param id: The id of this NotificationRuleBase. :type: str """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @property @@ -197,6 +272,28 @@ def org_id(self, org_id): raise ValueError("Invalid value for `org_id`, must not be `None`") # noqa: E501 self._org_id = org_id + @property + def task_id(self): + """Get the task_id of this NotificationRuleBase. + + The ID of the task associated with this notification rule. + + :return: The task_id of this NotificationRuleBase. + :rtype: str + """ # noqa: E501 + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Set the task_id of this NotificationRuleBase. + + The ID of the task associated with this notification rule. + + :param task_id: The task_id of this NotificationRuleBase. + :type: str + """ # noqa: E501 + self._task_id = task_id + @property def owner_id(self): """Get the owner_id of this NotificationRuleBase. @@ -443,8 +540,6 @@ def tag_rules(self, tag_rules): :param tag_rules: The tag_rules of this NotificationRuleBase. :type: list[TagRule] """ # noqa: E501 - if tag_rules is None: - raise ValueError("Invalid value for `tag_rules`, must not be `None`") # noqa: E501 self._tag_rules = tag_rules @property diff --git a/influxdb_client/domain/notification_rule_base_links.py b/influxdb_client/domain/notification_rule_base_links.py index a356191f..2d504d60 100644 --- a/influxdb_client/domain/notification_rule_base_links.py +++ b/influxdb_client/domain/notification_rule_base_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -35,22 +35,25 @@ class NotificationRuleBaseLinks(object): '_self': 'str', 'labels': 'str', 'members': 'str', - 'owners': 'str' + 'owners': 'str', + 'query': 'str' } attribute_map = { '_self': 'self', 'labels': 'labels', 'members': 'members', - 'owners': 'owners' + 'owners': 'owners', + 'query': 'query' } - def __init__(self, _self=None, labels=None, members=None, owners=None): # noqa: E501,D401,D403 + def __init__(self, _self=None, labels=None, members=None, owners=None, query=None): # noqa: E501,D401,D403 """NotificationRuleBaseLinks - a model defined in OpenAPI.""" # noqa: E501 self.__self = None self._labels = None self._members = None self._owners = None + self._query = None self.discriminator = None if _self is not None: @@ -61,6 +64,8 @@ def __init__(self, _self=None, labels=None, members=None, owners=None): # noqa: self.members = members if owners is not None: self.owners = owners + if query is not None: + self.query = query @property def _self(self): @@ -150,6 +155,28 @@ def owners(self, owners): """ # noqa: E501 self._owners = owners + @property + def query(self): + """Get the query of this NotificationRuleBaseLinks. + + URI of resource. + + :return: The query of this NotificationRuleBaseLinks. + :rtype: str + """ # noqa: E501 + return self._query + + @query.setter + def query(self, query): + """Set the query of this NotificationRuleBaseLinks. + + URI of resource. + + :param query: The query of this NotificationRuleBaseLinks. + :type: str + """ # noqa: E501 + self._query = query + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/notification_rule_discriminator.py b/influxdb_client/domain/notification_rule_discriminator.py index 7c4ce31a..852c04be 100644 --- a/influxdb_client/domain/notification_rule_discriminator.py +++ b/influxdb_client/domain/notification_rule_discriminator.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.notification_rule_base import NotificationRuleBase -class NotificationRuleDiscriminator(object): +class NotificationRuleDiscriminator(NotificationRuleBase): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,25 +33,61 @@ class NotificationRuleDiscriminator(object): and the value is json key in definition. """ openapi_types = { + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - discriminator_value_class_map = { - 'NotificationRuleBase': 'NotificationRuleBase', - 'PostNotificationRule': 'PostNotificationRule', - 'NotificationRule': 'NotificationRule' - } - - def __init__(self): # noqa: E501,D401,D403 - """NotificationRuleDiscriminator - a model defined in OpenAPI.""" # noqa: E501 self.discriminator = 'type' - - def get_real_child_model(self, data): - """Return 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 __init__(self, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 + """NotificationRuleDiscriminator - a model defined in OpenAPI.""" # noqa: E501 + NotificationRuleBase.__init__(self, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 + self.discriminator = None def to_dict(self): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/notification_rule_update.py b/influxdb_client/domain/notification_rule_update.py index fb15b870..6a174ea1 100644 --- a/influxdb_client/domain/notification_rule_update.py +++ b/influxdb_client/domain/notification_rule_update.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/notification_rules.py b/influxdb_client/domain/notification_rules.py index 8de6719b..de4b756f 100644 --- a/influxdb_client/domain/notification_rules.py +++ b/influxdb_client/domain/notification_rules.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/object_expression.py b/influxdb_client/domain/object_expression.py index d99889c3..65789eda 100644 --- a/influxdb_client/domain/object_expression.py +++ b/influxdb_client/domain/object_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class ObjectExpression(object): +class ObjectExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class ObjectExpression(object): def __init__(self, type=None, properties=None): # noqa: E501,D401,D403 """ObjectExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._properties = None self.discriminator = None diff --git a/influxdb_client/domain/onboarding_request.py b/influxdb_client/domain/onboarding_request.py index 1b030d41..f9793cb6 100644 --- a/influxdb_client/domain/onboarding_request.py +++ b/influxdb_client/domain/onboarding_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -36,7 +36,9 @@ class OnboardingRequest(object): 'password': 'str', 'org': 'str', 'bucket': 'str', - 'retention_period_hrs': 'int' + 'retention_period_seconds': 'int', + 'retention_period_hrs': 'int', + 'token': 'str' } attribute_map = { @@ -44,24 +46,33 @@ class OnboardingRequest(object): 'password': 'password', 'org': 'org', 'bucket': 'bucket', - 'retention_period_hrs': 'retentionPeriodHrs' + 'retention_period_seconds': 'retentionPeriodSeconds', + 'retention_period_hrs': 'retentionPeriodHrs', + 'token': 'token' } - def __init__(self, username=None, password=None, org=None, bucket=None, retention_period_hrs=None): # noqa: E501,D401,D403 + def __init__(self, username=None, password=None, org=None, bucket=None, retention_period_seconds=None, retention_period_hrs=None, token=None): # noqa: E501,D401,D403 """OnboardingRequest - a model defined in OpenAPI.""" # noqa: E501 self._username = None self._password = None self._org = None self._bucket = None + self._retention_period_seconds = None self._retention_period_hrs = None + self._token = None self.discriminator = None self.username = username - self.password = password + if password is not None: + self.password = password self.org = org self.bucket = bucket + if retention_period_seconds is not None: + self.retention_period_seconds = retention_period_seconds if retention_period_hrs is not None: self.retention_period_hrs = retention_period_hrs + if token is not None: + self.token = token @property def username(self): @@ -99,8 +110,6 @@ def password(self, password): :param password: The password of this OnboardingRequest. :type: str """ # noqa: E501 - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 self._password = password @property @@ -143,10 +152,30 @@ def bucket(self, bucket): raise ValueError("Invalid value for `bucket`, must not be `None`") # noqa: E501 self._bucket = bucket + @property + def retention_period_seconds(self): + """Get the retention_period_seconds of this OnboardingRequest. + + :return: The retention_period_seconds of this OnboardingRequest. + :rtype: int + """ # noqa: E501 + return self._retention_period_seconds + + @retention_period_seconds.setter + def retention_period_seconds(self, retention_period_seconds): + """Set the retention_period_seconds of this OnboardingRequest. + + :param retention_period_seconds: The retention_period_seconds of this OnboardingRequest. + :type: int + """ # noqa: E501 + self._retention_period_seconds = retention_period_seconds + @property def retention_period_hrs(self): """Get the retention_period_hrs of this OnboardingRequest. + Retention period *in nanoseconds* for the new bucket. This key's name has been misleading since OSS 2.0 GA, please transition to use `retentionPeriodSeconds` + :return: The retention_period_hrs of this OnboardingRequest. :rtype: int """ # noqa: E501 @@ -156,11 +185,35 @@ def retention_period_hrs(self): def retention_period_hrs(self, retention_period_hrs): """Set the retention_period_hrs of this OnboardingRequest. + Retention period *in nanoseconds* for the new bucket. This key's name has been misleading since OSS 2.0 GA, please transition to use `retentionPeriodSeconds` + :param retention_period_hrs: The retention_period_hrs of this OnboardingRequest. :type: int """ # noqa: E501 self._retention_period_hrs = retention_period_hrs + @property + def token(self): + """Get the token of this OnboardingRequest. + + Authentication token to set on the initial user. If not specified, the server will generate a token. + + :return: The token of this OnboardingRequest. + :rtype: str + """ # noqa: E501 + return self._token + + @token.setter + def token(self, token): + """Set the token of this OnboardingRequest. + + Authentication token to set on the initial user. If not specified, the server will generate a token. + + :param token: The token of this OnboardingRequest. + :type: str + """ # noqa: E501 + self._token = token + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/onboarding_response.py b/influxdb_client/domain/onboarding_response.py index aac7df33..ed4d3e82 100644 --- a/influxdb_client/domain/onboarding_response.py +++ b/influxdb_client/domain/onboarding_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,7 +32,7 @@ class OnboardingResponse(object): and the value is json key in definition. """ openapi_types = { - 'user': 'User', + 'user': 'UserResponse', 'org': 'Organization', 'bucket': 'Bucket', 'auth': 'Authorization' @@ -67,7 +67,7 @@ def user(self): """Get the user of this OnboardingResponse. :return: The user of this OnboardingResponse. - :rtype: User + :rtype: UserResponse """ # noqa: E501 return self._user @@ -76,7 +76,7 @@ def user(self, user): """Set the user of this OnboardingResponse. :param user: The user of this OnboardingResponse. - :type: User + :type: UserResponse """ # noqa: E501 self._user = user diff --git a/influxdb_client/domain/option_statement.py b/influxdb_client/domain/option_statement.py index 0b04b16a..1538b3a9 100644 --- a/influxdb_client/domain/option_statement.py +++ b/influxdb_client/domain/option_statement.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class OptionStatement(object): +class OptionStatement(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class OptionStatement(object): def __init__(self, type=None, assignment=None): # noqa: E501,D401,D403 """OptionStatement - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._assignment = None self.discriminator = None diff --git a/influxdb_client/domain/organization.py b/influxdb_client/domain/organization.py index a3593d5c..bc918780 100644 --- a/influxdb_client/domain/organization.py +++ b/influxdb_client/domain/organization.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/organization_links.py b/influxdb_client/domain/organization_links.py index 4bfadf2c..5bb180c1 100644 --- a/influxdb_client/domain/organization_links.py +++ b/influxdb_client/domain/organization_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/organizations.py b/influxdb_client/domain/organizations.py index 52a8b63b..3adaaca6 100644 --- a/influxdb_client/domain/organizations.py +++ b/influxdb_client/domain/organizations.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/package.py b/influxdb_client/domain/package.py index c065fde9..eeb6d85f 100644 --- a/influxdb_client/domain/package.py +++ b/influxdb_client/domain/package.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/package_clause.py b/influxdb_client/domain/package_clause.py index 745a8abf..ec33b1ad 100644 --- a/influxdb_client/domain/package_clause.py +++ b/influxdb_client/domain/package_clause.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/pager_duty_notification_endpoint.py b/influxdb_client/domain/pager_duty_notification_endpoint.py index 8b9042be..7e6c4f28 100644 --- a/influxdb_client/domain/pager_duty_notification_endpoint.py +++ b/influxdb_client/domain/pager_duty_notification_endpoint.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint import NotificationEndpoint +from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator -class PagerDutyNotificationEndpoint(NotificationEndpoint): +class PagerDutyNotificationEndpoint(NotificationEndpointDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,23 +34,46 @@ class PagerDutyNotificationEndpoint(NotificationEndpoint): """ openapi_types = { 'client_url': 'str', - 'routing_key': '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' } attribute_map = { 'client_url': 'clientURL', - 'routing_key': 'routingKey' + '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' } - def __init__(self, client_url=None, routing_key=None): # noqa: E501,D401,D403 + 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="pagerduty"): # noqa: E501,D401,D403 """PagerDutyNotificationEndpoint - a model defined in OpenAPI.""" # noqa: E501 - NotificationEndpoint.__init__(self) # noqa: E501 + NotificationEndpointDiscriminator.__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) # noqa: E501 self._client_url = None self._routing_key = None self.discriminator = None - self.client_url = client_url + if client_url is not None: + self.client_url = client_url self.routing_key = routing_key @property @@ -69,8 +92,6 @@ def client_url(self, client_url): :param client_url: The client_url of this PagerDutyNotificationEndpoint. :type: str """ # noqa: E501 - if client_url is None: - raise ValueError("Invalid value for `client_url`, must not be `None`") # noqa: E501 self._client_url = client_url @property diff --git a/influxdb_client/domain/pager_duty_notification_rule.py b/influxdb_client/domain/pager_duty_notification_rule.py index 7d73bbac..bacda826 100644 --- a/influxdb_client/domain/pager_duty_notification_rule.py +++ b/influxdb_client/domain/pager_duty_notification_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -34,17 +34,63 @@ class PagerDutyNotificationRule(PagerDutyNotificationRuleBase): """ openapi_types = { 'type': 'str', - 'message_template': 'str' + 'message_template': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', - 'message_template': 'messageTemplate' + 'message_template': 'messageTemplate', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, message_template=None): # noqa: E501,D401,D403 + def __init__(self, type="pagerduty", message_template=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """PagerDutyNotificationRule - a model defined in OpenAPI.""" # noqa: E501 - PagerDutyNotificationRuleBase.__init__(self, type=type, message_template=message_template) # noqa: E501 + PagerDutyNotificationRuleBase.__init__(self, type=type, message_template=message_template, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 self.discriminator = None def to_dict(self): diff --git a/influxdb_client/domain/pager_duty_notification_rule_base.py b/influxdb_client/domain/pager_duty_notification_rule_base.py index 5407a637..028fd06c 100644 --- a/influxdb_client/domain/pager_duty_notification_rule_base.py +++ b/influxdb_client/domain/pager_duty_notification_rule_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator -class PagerDutyNotificationRuleBase(object): +class PagerDutyNotificationRuleBase(NotificationRuleDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,16 +34,64 @@ class PagerDutyNotificationRuleBase(object): """ openapi_types = { 'type': 'str', - 'message_template': 'str' + 'message_template': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', - 'message_template': 'messageTemplate' + 'message_template': 'messageTemplate', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, message_template=None): # noqa: E501,D401,D403 + def __init__(self, type=None, message_template=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """PagerDutyNotificationRuleBase - a model defined in OpenAPI.""" # noqa: E501 + NotificationRuleDiscriminator.__init__(self, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 + self._type = None self._message_template = None self.discriminator = None diff --git a/influxdb_client/domain/paren_expression.py b/influxdb_client/domain/paren_expression.py index d98f8e5f..09f4e889 100644 --- a/influxdb_client/domain/paren_expression.py +++ b/influxdb_client/domain/paren_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class ParenExpression(object): +class ParenExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class ParenExpression(object): def __init__(self, type=None, expression=None): # noqa: E501,D401,D403 """ParenExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._expression = None self.discriminator = None diff --git a/influxdb_client/domain/password_reset_body.py b/influxdb_client/domain/password_reset_body.py index 7a4b7855..7f117eff 100644 --- a/influxdb_client/domain/password_reset_body.py +++ b/influxdb_client/domain/password_reset_body.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/patch_bucket_request.py b/influxdb_client/domain/patch_bucket_request.py new file mode 100644 index 00000000..922e2cb1 --- /dev/null +++ b/influxdb_client/domain/patch_bucket_request.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PatchBucketRequest(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', + 'retention_rules': 'list[PatchRetentionRule]' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'retention_rules': 'retentionRules' + } + + def __init__(self, name=None, description=None, retention_rules=None): # noqa: E501,D401,D403 + """PatchBucketRequest - a model defined in OpenAPI.""" # noqa: E501 + self._name = None + self._description = None + self._retention_rules = None + self.discriminator = None + + if name is not None: + self.name = name + if description is not None: + self.description = description + if retention_rules is not None: + self.retention_rules = retention_rules + + @property + def name(self): + """Get the name of this PatchBucketRequest. + + :return: The name of this PatchBucketRequest. + :rtype: str + """ # noqa: E501 + return self._name + + @name.setter + def name(self, name): + """Set the name of this PatchBucketRequest. + + :param name: The name of this PatchBucketRequest. + :type: str + """ # noqa: E501 + self._name = name + + @property + def description(self): + """Get the description of this PatchBucketRequest. + + :return: The description of this PatchBucketRequest. + :rtype: str + """ # noqa: E501 + return self._description + + @description.setter + def description(self, description): + """Set the description of this PatchBucketRequest. + + :param description: The description of this PatchBucketRequest. + :type: str + """ # noqa: E501 + self._description = description + + @property + def retention_rules(self): + """Get the retention_rules of this PatchBucketRequest. + + Updates to rules to expire or retain data. No rules means no updates. + + :return: The retention_rules of this PatchBucketRequest. + :rtype: list[PatchRetentionRule] + """ # noqa: E501 + return self._retention_rules + + @retention_rules.setter + def retention_rules(self, retention_rules): + """Set the retention_rules of this PatchBucketRequest. + + Updates to rules to expire or retain data. No rules means no updates. + + :param retention_rules: The retention_rules of this PatchBucketRequest. + :type: list[PatchRetentionRule] + """ # noqa: E501 + self._retention_rules = retention_rules + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, PatchBucketRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/patch_dashboard_request.py b/influxdb_client/domain/patch_dashboard_request.py new file mode 100644 index 00000000..0472fb23 --- /dev/null +++ b/influxdb_client/domain/patch_dashboard_request.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PatchDashboardRequest(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', + 'cells': 'CellWithViewProperties' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'cells': 'cells' + } + + def __init__(self, name=None, description=None, cells=None): # noqa: E501,D401,D403 + """PatchDashboardRequest - a model defined in OpenAPI.""" # noqa: E501 + self._name = None + self._description = None + self._cells = None + self.discriminator = None + + if name is not None: + self.name = name + if description is not None: + self.description = description + if cells is not None: + self.cells = cells + + @property + def name(self): + """Get the name of this PatchDashboardRequest. + + optional, when provided will replace the name + + :return: The name of this PatchDashboardRequest. + :rtype: str + """ # noqa: E501 + return self._name + + @name.setter + def name(self, name): + """Set the name of this PatchDashboardRequest. + + optional, when provided will replace the name + + :param name: The name of this PatchDashboardRequest. + :type: str + """ # noqa: E501 + self._name = name + + @property + def description(self): + """Get the description of this PatchDashboardRequest. + + optional, when provided will replace the description + + :return: The description of this PatchDashboardRequest. + :rtype: str + """ # noqa: E501 + return self._description + + @description.setter + def description(self, description): + """Set the description of this PatchDashboardRequest. + + optional, when provided will replace the description + + :param description: The description of this PatchDashboardRequest. + :type: str + """ # noqa: E501 + self._description = description + + @property + def cells(self): + """Get the cells of this PatchDashboardRequest. + + :return: The cells of this PatchDashboardRequest. + :rtype: CellWithViewProperties + """ # noqa: E501 + return self._cells + + @cells.setter + def cells(self, cells): + """Set the cells of this PatchDashboardRequest. + + :param cells: The cells of this PatchDashboardRequest. + :type: CellWithViewProperties + """ # noqa: E501 + self._cells = cells + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, PatchDashboardRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/run_log.py b/influxdb_client/domain/patch_organization_request.py similarity index 57% rename from influxdb_client/domain/run_log.py rename to influxdb_client/domain/patch_organization_request.py index 2d81e13e..b04d55c4 100644 --- a/influxdb_client/domain/run_log.py +++ b/influxdb_client/domain/patch_organization_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -16,7 +16,7 @@ import six -class RunLog(object): +class PatchOrganizationRequest(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -32,84 +32,69 @@ class RunLog(object): and the value is json key in definition. """ openapi_types = { - 'run_id': 'str', - 'time': 'str', - 'message': 'str' + 'name': 'str', + 'description': 'str' } attribute_map = { - 'run_id': 'runID', - 'time': 'time', - 'message': 'message' + 'name': 'name', + 'description': 'description' } - def __init__(self, run_id=None, time=None, message=None): # noqa: E501,D401,D403 - """RunLog - a model defined in OpenAPI.""" # noqa: E501 - self._run_id = None - self._time = None - self._message = None + def __init__(self, name=None, description=None): # noqa: E501,D401,D403 + """PatchOrganizationRequest - a model defined in OpenAPI.""" # noqa: E501 + self._name = None + self._description = None self.discriminator = None - if run_id is not None: - self.run_id = run_id - if time is not None: - self.time = time - if message is not None: - self.message = message + if name is not None: + self.name = name + if description is not None: + self.description = description @property - def run_id(self): - """Get the run_id of this RunLog. + def name(self): + """Get the name of this PatchOrganizationRequest. - :return: The run_id of this RunLog. - :rtype: str - """ # noqa: E501 - return self._run_id - - @run_id.setter - def run_id(self, run_id): - """Set the run_id of this RunLog. - - :param run_id: The run_id of this RunLog. - :type: str - """ # noqa: E501 - self._run_id = run_id + New name to set on the organization - @property - def time(self): - """Get the time of this RunLog. - - :return: The time of this RunLog. + :return: The name of this PatchOrganizationRequest. :rtype: str """ # noqa: E501 - return self._time + return self._name + + @name.setter + def name(self, name): + """Set the name of this PatchOrganizationRequest. - @time.setter - def time(self, time): - """Set the time of this RunLog. + New name to set on the organization - :param time: The time of this RunLog. + :param name: The name of this PatchOrganizationRequest. :type: str """ # noqa: E501 - self._time = time + self._name = name @property - def message(self): - """Get the message of this RunLog. + def description(self): + """Get the description of this PatchOrganizationRequest. - :return: The message of this RunLog. + New description to set on the organization + + :return: The description of this PatchOrganizationRequest. :rtype: str """ # noqa: E501 - return self._message + return self._description + + @description.setter + def description(self, description): + """Set the description of this PatchOrganizationRequest. - @message.setter - def message(self, message): - """Set the message of this RunLog. + New description to set on the organization - :param message: The message of this RunLog. + :param description: The description of this PatchOrganizationRequest. :type: str """ # noqa: E501 - self._message = message + self._description = description def to_dict(self): """Return the model properties as a dict.""" @@ -145,7 +130,7 @@ def __repr__(self): def __eq__(self, other): """Return true if both objects are equal.""" - if not isinstance(other, RunLog): + if not isinstance(other, PatchOrganizationRequest): return False return self.__dict__ == other.__dict__ diff --git a/influxdb_client/domain/patch_retention_rule.py b/influxdb_client/domain/patch_retention_rule.py new file mode 100644 index 00000000..0df66bba --- /dev/null +++ b/influxdb_client/domain/patch_retention_rule.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PatchRetentionRule(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 = { + 'type': 'str', + 'every_seconds': 'int', + 'shard_group_duration_seconds': 'int' + } + + attribute_map = { + 'type': 'type', + 'every_seconds': 'everySeconds', + 'shard_group_duration_seconds': 'shardGroupDurationSeconds' + } + + def __init__(self, type='expire', every_seconds=None, shard_group_duration_seconds=None): # noqa: E501,D401,D403 + """PatchRetentionRule - a model defined in OpenAPI.""" # noqa: E501 + self._type = None + self._every_seconds = None + self._shard_group_duration_seconds = None + self.discriminator = None + + self.type = type + if every_seconds is not None: + self.every_seconds = every_seconds + if shard_group_duration_seconds is not None: + self.shard_group_duration_seconds = shard_group_duration_seconds + + @property + def type(self): + """Get the type of this PatchRetentionRule. + + :return: The type of this PatchRetentionRule. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this PatchRetentionRule. + + :param type: The type of this PatchRetentionRule. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + @property + def every_seconds(self): + """Get the every_seconds of this PatchRetentionRule. + + Duration in seconds for how long data will be kept in the database. 0 means infinite. + + :return: The every_seconds of this PatchRetentionRule. + :rtype: int + """ # noqa: E501 + return self._every_seconds + + @every_seconds.setter + def every_seconds(self, every_seconds): + """Set the every_seconds of this PatchRetentionRule. + + Duration in seconds for how long data will be kept in the database. 0 means infinite. + + :param every_seconds: The every_seconds of this PatchRetentionRule. + :type: int + """ # noqa: E501 + if every_seconds is not None and every_seconds < 0: # noqa: E501 + raise ValueError("Invalid value for `every_seconds`, must be a value greater than or equal to `0`") # noqa: E501 + self._every_seconds = every_seconds + + @property + def shard_group_duration_seconds(self): + """Get the shard_group_duration_seconds of this PatchRetentionRule. + + Shard duration measured in seconds. + + :return: The shard_group_duration_seconds of this PatchRetentionRule. + :rtype: int + """ # noqa: E501 + return self._shard_group_duration_seconds + + @shard_group_duration_seconds.setter + def shard_group_duration_seconds(self, shard_group_duration_seconds): + """Set the shard_group_duration_seconds of this PatchRetentionRule. + + Shard duration measured in seconds. + + :param shard_group_duration_seconds: The shard_group_duration_seconds of this PatchRetentionRule. + :type: int + """ # noqa: E501 + self._shard_group_duration_seconds = shard_group_duration_seconds + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, PatchRetentionRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/permission.py b/influxdb_client/domain/permission.py index 97938983..f448701f 100644 --- a/influxdb_client/domain/permission.py +++ b/influxdb_client/domain/permission.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/permission_resource.py b/influxdb_client/domain/permission_resource.py index f4d1ab93..1539c7d4 100644 --- a/influxdb_client/domain/permission_resource.py +++ b/influxdb_client/domain/permission_resource.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/pipe_expression.py b/influxdb_client/domain/pipe_expression.py index c06177df..1e7a2976 100644 --- a/influxdb_client/domain/pipe_expression.py +++ b/influxdb_client/domain/pipe_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class PipeExpression(object): +class PipeExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class PipeExpression(object): def __init__(self, type=None, argument=None, call=None): # noqa: E501,D401,D403 """PipeExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._argument = None self._call = None diff --git a/influxdb_client/domain/pipe_literal.py b/influxdb_client/domain/pipe_literal.py index f77b1236..74ab6591 100644 --- a/influxdb_client/domain/pipe_literal.py +++ b/influxdb_client/domain/pipe_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class PipeLiteral(object): +class PipeLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -41,6 +42,8 @@ class PipeLiteral(object): def __init__(self, type=None): # noqa: E501,D401,D403 """PipeLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self.discriminator = None diff --git a/influxdb_client/domain/post_bucket_request.py b/influxdb_client/domain/post_bucket_request.py index 0d799670..8520c069 100644 --- a/influxdb_client/domain/post_bucket_request.py +++ b/influxdb_client/domain/post_bucket_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -36,7 +36,8 @@ class PostBucketRequest(object): 'name': 'str', 'description': 'str', 'rp': 'str', - 'retention_rules': 'list[BucketRetentionRules]' + 'retention_rules': 'list[BucketRetentionRules]', + 'schema_type': 'SchemaType' } attribute_map = { @@ -44,26 +45,29 @@ class PostBucketRequest(object): 'name': 'name', 'description': 'description', 'rp': 'rp', - 'retention_rules': 'retentionRules' + 'retention_rules': 'retentionRules', + 'schema_type': 'schemaType' } - def __init__(self, org_id=None, name=None, description=None, rp=None, retention_rules=None): # noqa: E501,D401,D403 + def __init__(self, org_id=None, name=None, description=None, rp=None, retention_rules=None, schema_type=None): # noqa: E501,D401,D403 """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._schema_type = None self.discriminator = None - if org_id is not None: - self.org_id = org_id + 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 + if schema_type is not None: + self.schema_type = schema_type @property def org_id(self): @@ -81,6 +85,8 @@ def org_id(self, org_id): :param org_id: The org_id of this PostBucketRequest. :type: str """ # noqa: E501 + if org_id is None: + raise ValueError("Invalid value for `org_id`, must not be `None`") # noqa: E501 self._org_id = org_id @property @@ -163,6 +169,24 @@ def retention_rules(self, retention_rules): raise ValueError("Invalid value for `retention_rules`, must not be `None`") # noqa: E501 self._retention_rules = retention_rules + @property + def schema_type(self): + """Get the schema_type of this PostBucketRequest. + + :return: The schema_type of this PostBucketRequest. + :rtype: SchemaType + """ # noqa: E501 + return self._schema_type + + @schema_type.setter + def schema_type(self, schema_type): + """Set the schema_type of this PostBucketRequest. + + :param schema_type: The schema_type of this PostBucketRequest. + :type: SchemaType + """ # noqa: E501 + self._schema_type = schema_type + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/post_check.py b/influxdb_client/domain/post_check.py index 41f90c91..2a323e80 100644 --- a/influxdb_client/domain/post_check.py +++ b/influxdb_client/domain/post_check.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,13 +32,51 @@ class PostCheck(object): and the value is json key in definition. """ openapi_types = { + 'type': 'str', } attribute_map = { + 'type': 'type', } - def __init__(self): # noqa: E501,D401,D403 - """PostCheck - a model defined in OpenAPI.""" # noqa: E501 self.discriminator = None + discriminator_value_class_map = { + 'deadman': 'DeadmanCheck', + 'custom': 'CustomCheck', + 'threshold': 'ThresholdCheck' + } + + def __init__(self, type=None): # noqa: E501,D401,D403 + """PostCheck - a model defined in OpenAPI.""" # noqa: E501 + self._type = None + self.discriminator = 'type' + + self.type = type + + @property + def type(self): + """Get the type of this PostCheck. + + :return: The type of this PostCheck. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this PostCheck. + + :param type: The type of this PostCheck. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + def get_real_child_model(self, data): + """Return 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): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/post_notification_endpoint.py b/influxdb_client/domain/post_notification_endpoint.py index 518de843..c65e90a6 100644 --- a/influxdb_client/domain/post_notification_endpoint.py +++ b/influxdb_client/domain/post_notification_endpoint.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,13 +32,52 @@ class PostNotificationEndpoint(object): and the value is json key in definition. """ openapi_types = { + 'type': 'NotificationEndpointType', } attribute_map = { + 'type': 'type', } - def __init__(self): # noqa: E501,D401,D403 - """PostNotificationEndpoint - a model defined in OpenAPI.""" # noqa: E501 self.discriminator = None + discriminator_value_class_map = { + 'slack': 'SlackNotificationEndpoint', + 'pagerduty': 'PagerDutyNotificationEndpoint', + 'http': 'HTTPNotificationEndpoint', + 'telegram': 'TelegramNotificationEndpoint' + } + + def __init__(self, type=None): # noqa: E501,D401,D403 + """PostNotificationEndpoint - a model defined in OpenAPI.""" # noqa: E501 + self._type = None + self.discriminator = 'type' + + self.type = type + + @property + def type(self): + """Get the type of this PostNotificationEndpoint. + + :return: The type of this PostNotificationEndpoint. + :rtype: NotificationEndpointType + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this PostNotificationEndpoint. + + :param type: The type of this PostNotificationEndpoint. + :type: NotificationEndpointType + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + def get_real_child_model(self, data): + """Return 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): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/post_notification_rule.py b/influxdb_client/domain/post_notification_rule.py index 77ed32dd..bf476642 100644 --- a/influxdb_client/domain/post_notification_rule.py +++ b/influxdb_client/domain/post_notification_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,9 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator -class PostNotificationRule(NotificationRuleDiscriminator): +class PostNotificationRule(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -33,15 +32,57 @@ class PostNotificationRule(NotificationRuleDiscriminator): and the value is json key in definition. """ openapi_types = { + 'type': 'str', } attribute_map = { + 'type': 'type', } - def __init__(self): # noqa: E501,D401,D403 + discriminator_value_class_map = { + 'slack': 'SlackNotificationRule', + 'pagerduty': 'PagerDutyNotificationRule', + 'smtp': 'SMTPNotificationRule', + 'http': 'HTTPNotificationRule', + 'telegram': 'TelegramNotificationRule' + } + + def __init__(self, type=None): # noqa: E501,D401,D403 """PostNotificationRule - a model defined in OpenAPI.""" # noqa: E501 - NotificationRuleDiscriminator.__init__(self) # noqa: E501 - self.discriminator = None + self._type = None + self.discriminator = 'type' + + self.type = type + + @property + def type(self): + """Get the type of this PostNotificationRule. + + The discriminator between other types of notification rules is "telegram". + + :return: The type of this PostNotificationRule. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this PostNotificationRule. + + The discriminator between other types of notification rules is "telegram". + + :param type: The type of this PostNotificationRule. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + def get_real_child_model(self, data): + """Return 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): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/post_organization_request.py b/influxdb_client/domain/post_organization_request.py new file mode 100644 index 00000000..2b567f50 --- /dev/null +++ b/influxdb_client/domain/post_organization_request.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PostOrganizationRequest(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' + } + + attribute_map = { + 'name': 'name', + 'description': 'description' + } + + def __init__(self, name=None, description=None): # noqa: E501,D401,D403 + """PostOrganizationRequest - a model defined in OpenAPI.""" # noqa: E501 + self._name = None + self._description = None + self.discriminator = None + + self.name = name + if description is not None: + self.description = description + + @property + def name(self): + """Get the name of this PostOrganizationRequest. + + :return: The name of this PostOrganizationRequest. + :rtype: str + """ # noqa: E501 + return self._name + + @name.setter + def name(self, name): + """Set the name of this PostOrganizationRequest. + + :param name: The name of this PostOrganizationRequest. + :type: str + """ # noqa: E501 + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + self._name = name + + @property + def description(self): + """Get the description of this PostOrganizationRequest. + + :return: The description of this PostOrganizationRequest. + :rtype: str + """ # noqa: E501 + return self._description + + @description.setter + def description(self, description): + """Set the description of this PostOrganizationRequest. + + :param description: The description of this PostOrganizationRequest. + :type: str + """ # noqa: E501 + self._description = description + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, PostOrganizationRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/property_key.py b/influxdb_client/domain/property_key.py index 809a7499..496b3c4c 100644 --- a/influxdb_client/domain/property_key.py +++ b/influxdb_client/domain/property_key.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/query.py b/influxdb_client/domain/query.py index 1d86dec6..9c7474e0 100644 --- a/influxdb_client/domain/query.py +++ b/influxdb_client/domain/query.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -35,6 +35,7 @@ class Query(object): 'extern': 'File', 'query': 'str', 'type': 'str', + 'params': 'dict(str, object)', 'dialect': 'Dialect', 'now': 'datetime' } @@ -43,15 +44,17 @@ class Query(object): 'extern': 'extern', 'query': 'query', 'type': 'type', + 'params': 'params', 'dialect': 'dialect', 'now': 'now' } - def __init__(self, extern=None, query=None, type=None, dialect=None, now=None): # noqa: E501,D401,D403 + def __init__(self, extern=None, query=None, type=None, params=None, dialect=None, now=None): # noqa: E501,D401,D403 """Query - a model defined in OpenAPI.""" # noqa: E501 self._extern = None self._query = None self._type = None + self._params = None self._dialect = None self._now = None self.discriminator = None @@ -61,6 +64,8 @@ def __init__(self, extern=None, query=None, type=None, dialect=None, now=None): self.query = query if type is not None: self.type = type + if params is not None: + self.params = params if dialect is not None: self.dialect = dialect if now is not None: @@ -130,6 +135,28 @@ def type(self, type): """ # noqa: E501 self._type = type + @property + def params(self): + """Get the params of this Query. + + Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both) + + :return: The params of this Query. + :rtype: dict(str, object) + """ # noqa: E501 + return self._params + + @params.setter + def params(self, params): + """Set the params of this Query. + + Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both) + + :param params: The params of this Query. + :type: dict(str, object) + """ # noqa: E501 + self._params = params + @property def dialect(self): """Get the dialect of this Query. diff --git a/influxdb_client/domain/query_edit_mode.py b/influxdb_client/domain/query_edit_mode.py index 94f50032..4cf03e47 100644 --- a/influxdb_client/domain/query_edit_mode.py +++ b/influxdb_client/domain/query_edit_mode.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/query_variable_properties.py b/influxdb_client/domain/query_variable_properties.py index c9410959..4fedf51f 100644 --- a/influxdb_client/domain/query_variable_properties.py +++ b/influxdb_client/domain/query_variable_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.variable_properties import VariableProperties -class QueryVariableProperties(object): +class QueryVariableProperties(VariableProperties): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class QueryVariableProperties(object): def __init__(self, type=None, values=None): # noqa: E501,D401,D403 """QueryVariableProperties - a model defined in OpenAPI.""" # noqa: E501 + VariableProperties.__init__(self) # noqa: E501 + self._type = None self._values = None self.discriminator = None diff --git a/influxdb_client/domain/query_variable_properties_values.py b/influxdb_client/domain/query_variable_properties_values.py index aaa78cf5..623ea261 100644 --- a/influxdb_client/domain/query_variable_properties_values.py +++ b/influxdb_client/domain/query_variable_properties_values.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/range_threshold.py b/influxdb_client/domain/range_threshold.py index 2c3e8f90..89ec4263 100644 --- a/influxdb_client/domain/range_threshold.py +++ b/influxdb_client/domain/range_threshold.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -36,19 +36,23 @@ class RangeThreshold(Threshold): 'type': 'str', 'min': 'float', 'max': 'float', - 'within': 'bool' + 'within': 'bool', + 'level': 'CheckStatusLevel', + 'all_values': 'bool' } attribute_map = { 'type': 'type', 'min': 'min', 'max': 'max', - 'within': 'within' + 'within': 'within', + 'level': 'level', + 'all_values': 'allValues' } - def __init__(self, type=None, min=None, max=None, within=None): # noqa: E501,D401,D403 + def __init__(self, type="range", min=None, max=None, within=None, level=None, all_values=None): # noqa: E501,D401,D403 """RangeThreshold - a model defined in OpenAPI.""" # noqa: E501 - Threshold.__init__(self) # noqa: E501 + Threshold.__init__(self, level=level, all_values=all_values) # noqa: E501 self._type = None self._min = None diff --git a/influxdb_client/domain/ready.py b/influxdb_client/domain/ready.py index 6bdf7410..cbb50961 100644 --- a/influxdb_client/domain/ready.py +++ b/influxdb_client/domain/ready.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/regexp_literal.py b/influxdb_client/domain/regexp_literal.py index aee69b35..f547b258 100644 --- a/influxdb_client/domain/regexp_literal.py +++ b/influxdb_client/domain/regexp_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class RegexpLiteral(object): +class RegexpLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class RegexpLiteral(object): def __init__(self, type=None, value=None): # noqa: E501,D401,D403 """RegexpLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._value = None self.discriminator = None diff --git a/influxdb_client/domain/renamable_field.py b/influxdb_client/domain/renamable_field.py index 7ffb2b6c..adfaad3a 100644 --- a/influxdb_client/domain/renamable_field.py +++ b/influxdb_client/domain/renamable_field.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/resource_member.py b/influxdb_client/domain/resource_member.py index 47435359..e1a0f9ff 100644 --- a/influxdb_client/domain/resource_member.py +++ b/influxdb_client/domain/resource_member.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.user import User +from influxdb_client.domain.user_response import UserResponse -class ResourceMember(User): +class ResourceMember(UserResponse): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -38,7 +38,7 @@ class ResourceMember(User): 'oauth_id': 'str', 'name': 'str', 'status': 'str', - 'links': 'UserLinks' + 'links': 'UserResponseLinks' } attribute_map = { @@ -52,7 +52,7 @@ class ResourceMember(User): def __init__(self, role='member', id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 """ResourceMember - a model defined in OpenAPI.""" # noqa: E501 - User.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501 + UserResponse.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501 self._role = None self.discriminator = None diff --git a/influxdb_client/domain/resource_members.py b/influxdb_client/domain/resource_members.py index e02d3289..69bf2b7d 100644 --- a/influxdb_client/domain/resource_members.py +++ b/influxdb_client/domain/resource_members.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,7 +32,7 @@ class ResourceMembers(object): and the value is json key in definition. """ openapi_types = { - 'links': 'UsersLinks', + 'links': 'ResourceMembersLinks', 'users': 'list[ResourceMember]' } @@ -57,7 +57,7 @@ def links(self): """Get the links of this ResourceMembers. :return: The links of this ResourceMembers. - :rtype: UsersLinks + :rtype: ResourceMembersLinks """ # noqa: E501 return self._links @@ -66,7 +66,7 @@ def links(self, links): """Set the links of this ResourceMembers. :param links: The links of this ResourceMembers. - :type: UsersLinks + :type: ResourceMembersLinks """ # noqa: E501 self._links = links diff --git a/influxdb_client/domain/user_links.py b/influxdb_client/domain/resource_members_links.py similarity index 84% rename from influxdb_client/domain/user_links.py rename to influxdb_client/domain/resource_members_links.py index 1f8112f2..d3fd0447 100644 --- a/influxdb_client/domain/user_links.py +++ b/influxdb_client/domain/resource_members_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -16,7 +16,7 @@ import six -class UserLinks(object): +class ResourceMembersLinks(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -40,7 +40,7 @@ class UserLinks(object): } def __init__(self, _self=None): # noqa: E501,D401,D403 - """UserLinks - a model defined in OpenAPI.""" # noqa: E501 + """ResourceMembersLinks - a model defined in OpenAPI.""" # noqa: E501 self.__self = None self.discriminator = None @@ -49,18 +49,18 @@ def __init__(self, _self=None): # noqa: E501,D401,D403 @property def _self(self): - """Get the _self of this UserLinks. + """Get the _self of this ResourceMembersLinks. - :return: The _self of this UserLinks. + :return: The _self of this ResourceMembersLinks. :rtype: str """ # noqa: E501 return self.__self @_self.setter def _self(self, _self): - """Set the _self of this UserLinks. + """Set the _self of this ResourceMembersLinks. - :param _self: The _self of this UserLinks. + :param _self: The _self of this ResourceMembersLinks. :type: str """ # noqa: E501 self.__self = _self @@ -99,7 +99,7 @@ def __repr__(self): def __eq__(self, other): """Return true if both objects are equal.""" - if not isinstance(other, UserLinks): + if not isinstance(other, ResourceMembersLinks): return False return self.__dict__ == other.__dict__ diff --git a/influxdb_client/domain/resource_owner.py b/influxdb_client/domain/resource_owner.py index 09dd8c45..579e16cd 100644 --- a/influxdb_client/domain/resource_owner.py +++ b/influxdb_client/domain/resource_owner.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.user import User +from influxdb_client.domain.user_response import UserResponse -class ResourceOwner(User): +class ResourceOwner(UserResponse): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -38,7 +38,7 @@ class ResourceOwner(User): 'oauth_id': 'str', 'name': 'str', 'status': 'str', - 'links': 'UserLinks' + 'links': 'UserResponseLinks' } attribute_map = { @@ -52,7 +52,7 @@ class ResourceOwner(User): def __init__(self, role='owner', id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 """ResourceOwner - a model defined in OpenAPI.""" # noqa: E501 - User.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501 + UserResponse.__init__(self, id=id, oauth_id=oauth_id, name=name, status=status, links=links) # noqa: E501 self._role = None self.discriminator = None diff --git a/influxdb_client/domain/resource_owners.py b/influxdb_client/domain/resource_owners.py index 48fbf309..14c36970 100644 --- a/influxdb_client/domain/resource_owners.py +++ b/influxdb_client/domain/resource_owners.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,7 +32,7 @@ class ResourceOwners(object): and the value is json key in definition. """ openapi_types = { - 'links': 'UsersLinks', + 'links': 'ResourceMembersLinks', 'users': 'list[ResourceOwner]' } @@ -57,7 +57,7 @@ def links(self): """Get the links of this ResourceOwners. :return: The links of this ResourceOwners. - :rtype: UsersLinks + :rtype: ResourceMembersLinks """ # noqa: E501 return self._links @@ -66,7 +66,7 @@ def links(self, links): """Set the links of this ResourceOwners. :param links: The links of this ResourceOwners. - :type: UsersLinks + :type: ResourceMembersLinks """ # noqa: E501 self._links = links diff --git a/influxdb_client/domain/return_statement.py b/influxdb_client/domain/return_statement.py index 5b5f5a11..43307668 100644 --- a/influxdb_client/domain/return_statement.py +++ b/influxdb_client/domain/return_statement.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class ReturnStatement(object): +class ReturnStatement(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class ReturnStatement(object): def __init__(self, type=None, argument=None): # noqa: E501,D401,D403 """ReturnStatement - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._argument = None self.discriminator = None diff --git a/influxdb_client/domain/routes.py b/influxdb_client/domain/routes.py index 497a9476..90b6c23e 100644 --- a/influxdb_client/domain/routes.py +++ b/influxdb_client/domain/routes.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -38,6 +38,7 @@ class Routes(object): 'external': 'RoutesExternal', 'variables': 'str', 'me': 'str', + 'flags': 'str', 'orgs': 'str', 'query': 'RoutesQuery', 'setup': 'str', @@ -58,6 +59,7 @@ class Routes(object): 'external': 'external', 'variables': 'variables', 'me': 'me', + 'flags': 'flags', 'orgs': 'orgs', 'query': 'query', 'setup': 'setup', @@ -71,7 +73,7 @@ class Routes(object): 'write': 'write' } - def __init__(self, authorizations=None, buckets=None, dashboards=None, external=None, variables=None, me=None, orgs=None, query=None, setup=None, signin=None, signout=None, sources=None, system=None, tasks=None, telegrafs=None, users=None, write=None): # noqa: E501,D401,D403 + def __init__(self, authorizations=None, buckets=None, dashboards=None, external=None, variables=None, me=None, flags=None, orgs=None, query=None, setup=None, signin=None, signout=None, sources=None, system=None, tasks=None, telegrafs=None, users=None, write=None): # noqa: E501,D401,D403 """Routes - a model defined in OpenAPI.""" # noqa: E501 self._authorizations = None self._buckets = None @@ -79,6 +81,7 @@ def __init__(self, authorizations=None, buckets=None, dashboards=None, external= self._external = None self._variables = None self._me = None + self._flags = None self._orgs = None self._query = None self._setup = None @@ -104,6 +107,8 @@ def __init__(self, authorizations=None, buckets=None, dashboards=None, external= self.variables = variables if me is not None: self.me = me + if flags is not None: + self.flags = flags if orgs is not None: self.orgs = orgs if query is not None: @@ -235,6 +240,24 @@ def me(self, me): """ # noqa: E501 self._me = me + @property + def flags(self): + """Get the flags of this Routes. + + :return: The flags of this Routes. + :rtype: str + """ # noqa: E501 + return self._flags + + @flags.setter + def flags(self, flags): + """Set the flags of this Routes. + + :param flags: The flags of this Routes. + :type: str + """ # noqa: E501 + self._flags = flags + @property def orgs(self): """Get the orgs of this Routes. diff --git a/influxdb_client/domain/routes_external.py b/influxdb_client/domain/routes_external.py index a35ce10b..9757214f 100644 --- a/influxdb_client/domain/routes_external.py +++ b/influxdb_client/domain/routes_external.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/routes_query.py b/influxdb_client/domain/routes_query.py index 7bfa239e..721068b3 100644 --- a/influxdb_client/domain/routes_query.py +++ b/influxdb_client/domain/routes_query.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/routes_system.py b/influxdb_client/domain/routes_system.py index 66f46601..cc6ad351 100644 --- a/influxdb_client/domain/routes_system.py +++ b/influxdb_client/domain/routes_system.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/rule_status_level.py b/influxdb_client/domain/rule_status_level.py index 6f62b432..92bb75a6 100644 --- a/influxdb_client/domain/rule_status_level.py +++ b/influxdb_client/domain/rule_status_level.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/run.py b/influxdb_client/domain/run.py index 7f6c3170..a0316121 100644 --- a/influxdb_client/domain/run.py +++ b/influxdb_client/domain/run.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -36,7 +36,7 @@ class Run(object): 'task_id': 'str', 'status': 'str', 'scheduled_for': 'datetime', - 'log': 'list[RunLog]', + 'log': 'list[LogEvent]', 'started_at': 'datetime', 'finished_at': 'datetime', 'requested_at': 'datetime', @@ -170,7 +170,7 @@ def log(self): An array of logs associated with the run. :return: The log of this Run. - :rtype: list[RunLog] + :rtype: list[LogEvent] """ # noqa: E501 return self._log @@ -181,7 +181,7 @@ def log(self, log): An array of logs associated with the run. :param log: The log of this Run. - :type: list[RunLog] + :type: list[LogEvent] """ # noqa: E501 self._log = log diff --git a/influxdb_client/domain/run_links.py b/influxdb_client/domain/run_links.py index 65715151..861fd9b3 100644 --- a/influxdb_client/domain/run_links.py +++ b/influxdb_client/domain/run_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/run_manually.py b/influxdb_client/domain/run_manually.py index c867391d..ce93eaa1 100644 --- a/influxdb_client/domain/run_manually.py +++ b/influxdb_client/domain/run_manually.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/runs.py b/influxdb_client/domain/runs.py index 5b1f1ffc..d914989d 100644 --- a/influxdb_client/domain/runs.py +++ b/influxdb_client/domain/runs.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/scatter_view_properties.py b/influxdb_client/domain/scatter_view_properties.py index dea2ccc0..a858b832 100644 --- a/influxdb_client/domain/scatter_view_properties.py +++ b/influxdb_client/domain/scatter_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -41,7 +41,15 @@ class ScatterViewProperties(ViewProperties): 'note': 'str', 'show_note_when_empty': 'bool', 'x_column': 'str', + 'generate_x_axis_ticks': 'list[str]', + 'x_total_ticks': 'int', + 'x_tick_start': 'float', + 'x_tick_step': 'float', 'y_column': 'str', + 'generate_y_axis_ticks': 'list[str]', + 'y_total_ticks': 'int', + 'y_tick_start': 'float', + 'y_tick_step': 'float', 'fill_columns': 'list[str]', 'symbol_columns': 'list[str]', 'x_domain': 'list[float]', @@ -51,7 +59,11 @@ class ScatterViewProperties(ViewProperties): 'x_prefix': 'str', 'x_suffix': 'str', 'y_prefix': 'str', - 'y_suffix': 'str' + 'y_suffix': 'str', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' } attribute_map = { @@ -63,7 +75,15 @@ class ScatterViewProperties(ViewProperties): 'note': 'note', 'show_note_when_empty': 'showNoteWhenEmpty', 'x_column': 'xColumn', + 'generate_x_axis_ticks': 'generateXAxisTicks', + 'x_total_ticks': 'xTotalTicks', + 'x_tick_start': 'xTickStart', + 'x_tick_step': 'xTickStep', 'y_column': 'yColumn', + 'generate_y_axis_ticks': 'generateYAxisTicks', + 'y_total_ticks': 'yTotalTicks', + 'y_tick_start': 'yTickStart', + 'y_tick_step': 'yTickStep', 'fill_columns': 'fillColumns', 'symbol_columns': 'symbolColumns', 'x_domain': 'xDomain', @@ -73,10 +93,14 @@ class ScatterViewProperties(ViewProperties): 'x_prefix': 'xPrefix', 'x_suffix': 'xSuffix', 'y_prefix': 'yPrefix', - 'y_suffix': 'ySuffix' + 'y_suffix': 'ySuffix', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, y_column=None, fill_columns=None, symbol_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None): # noqa: E501,D401,D403 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, fill_columns=None, symbol_columns=None, x_domain=None, y_domain=None, x_axis_label=None, y_axis_label=None, x_prefix=None, x_suffix=None, y_prefix=None, y_suffix=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """ScatterViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 @@ -88,7 +112,15 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._note = None self._show_note_when_empty = None self._x_column = None + self._generate_x_axis_ticks = None + self._x_total_ticks = None + self._x_tick_start = None + self._x_tick_step = None self._y_column = None + self._generate_y_axis_ticks = None + self._y_total_ticks = None + self._y_tick_start = None + self._y_tick_step = None self._fill_columns = None self._symbol_columns = None self._x_domain = None @@ -99,6 +131,10 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._x_suffix = None self._y_prefix = None self._y_suffix = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None self.discriminator = None if time_format is not None: @@ -110,7 +146,23 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self.note = note self.show_note_when_empty = show_note_when_empty self.x_column = x_column + if generate_x_axis_ticks is not None: + self.generate_x_axis_ticks = generate_x_axis_ticks + if x_total_ticks is not None: + self.x_total_ticks = x_total_ticks + if x_tick_start is not None: + self.x_tick_start = x_tick_start + if x_tick_step is not None: + self.x_tick_step = x_tick_step self.y_column = y_column + if generate_y_axis_ticks is not None: + self.generate_y_axis_ticks = generate_y_axis_ticks + if y_total_ticks is not None: + self.y_total_ticks = y_total_ticks + if y_tick_start is not None: + self.y_tick_start = y_tick_start + if y_tick_step is not None: + self.y_tick_step = y_tick_step self.fill_columns = fill_columns self.symbol_columns = symbol_columns self.x_domain = x_domain @@ -121,6 +173,14 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self.x_suffix = x_suffix self.y_prefix = y_prefix self.y_suffix = y_suffix + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold @property def time_format(self): @@ -288,6 +348,78 @@ def x_column(self, x_column): raise ValueError("Invalid value for `x_column`, must not be `None`") # noqa: E501 self._x_column = x_column + @property + def generate_x_axis_ticks(self): + """Get the generate_x_axis_ticks of this ScatterViewProperties. + + :return: The generate_x_axis_ticks of this ScatterViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_x_axis_ticks + + @generate_x_axis_ticks.setter + def generate_x_axis_ticks(self, generate_x_axis_ticks): + """Set the generate_x_axis_ticks of this ScatterViewProperties. + + :param generate_x_axis_ticks: The generate_x_axis_ticks of this ScatterViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_x_axis_ticks = generate_x_axis_ticks + + @property + def x_total_ticks(self): + """Get the x_total_ticks of this ScatterViewProperties. + + :return: The x_total_ticks of this ScatterViewProperties. + :rtype: int + """ # noqa: E501 + return self._x_total_ticks + + @x_total_ticks.setter + def x_total_ticks(self, x_total_ticks): + """Set the x_total_ticks of this ScatterViewProperties. + + :param x_total_ticks: The x_total_ticks of this ScatterViewProperties. + :type: int + """ # noqa: E501 + self._x_total_ticks = x_total_ticks + + @property + def x_tick_start(self): + """Get the x_tick_start of this ScatterViewProperties. + + :return: The x_tick_start of this ScatterViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_start + + @x_tick_start.setter + def x_tick_start(self, x_tick_start): + """Set the x_tick_start of this ScatterViewProperties. + + :param x_tick_start: The x_tick_start of this ScatterViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_start = x_tick_start + + @property + def x_tick_step(self): + """Get the x_tick_step of this ScatterViewProperties. + + :return: The x_tick_step of this ScatterViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_step + + @x_tick_step.setter + def x_tick_step(self, x_tick_step): + """Set the x_tick_step of this ScatterViewProperties. + + :param x_tick_step: The x_tick_step of this ScatterViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_step = x_tick_step + @property def y_column(self): """Get the y_column of this ScatterViewProperties. @@ -308,6 +440,78 @@ def y_column(self, y_column): raise ValueError("Invalid value for `y_column`, must not be `None`") # noqa: E501 self._y_column = y_column + @property + def generate_y_axis_ticks(self): + """Get the generate_y_axis_ticks of this ScatterViewProperties. + + :return: The generate_y_axis_ticks of this ScatterViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_y_axis_ticks + + @generate_y_axis_ticks.setter + def generate_y_axis_ticks(self, generate_y_axis_ticks): + """Set the generate_y_axis_ticks of this ScatterViewProperties. + + :param generate_y_axis_ticks: The generate_y_axis_ticks of this ScatterViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_y_axis_ticks = generate_y_axis_ticks + + @property + def y_total_ticks(self): + """Get the y_total_ticks of this ScatterViewProperties. + + :return: The y_total_ticks of this ScatterViewProperties. + :rtype: int + """ # noqa: E501 + return self._y_total_ticks + + @y_total_ticks.setter + def y_total_ticks(self, y_total_ticks): + """Set the y_total_ticks of this ScatterViewProperties. + + :param y_total_ticks: The y_total_ticks of this ScatterViewProperties. + :type: int + """ # noqa: E501 + self._y_total_ticks = y_total_ticks + + @property + def y_tick_start(self): + """Get the y_tick_start of this ScatterViewProperties. + + :return: The y_tick_start of this ScatterViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_start + + @y_tick_start.setter + def y_tick_start(self, y_tick_start): + """Set the y_tick_start of this ScatterViewProperties. + + :param y_tick_start: The y_tick_start of this ScatterViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_start = y_tick_start + + @property + def y_tick_step(self): + """Get the y_tick_step of this ScatterViewProperties. + + :return: The y_tick_step of this ScatterViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_step + + @y_tick_step.setter + def y_tick_step(self, y_tick_step): + """Set the y_tick_step of this ScatterViewProperties. + + :param y_tick_step: The y_tick_step of this ScatterViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_step = y_tick_step + @property def fill_columns(self): """Get the fill_columns of this ScatterViewProperties. @@ -508,6 +712,78 @@ def y_suffix(self, y_suffix): raise ValueError("Invalid value for `y_suffix`, must not be `None`") # noqa: E501 self._y_suffix = y_suffix + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this ScatterViewProperties. + + :return: The legend_colorize_rows of this ScatterViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this ScatterViewProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this ScatterViewProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this ScatterViewProperties. + + :return: The legend_hide of this ScatterViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this ScatterViewProperties. + + :param legend_hide: The legend_hide of this ScatterViewProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this ScatterViewProperties. + + :return: The legend_opacity of this ScatterViewProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this ScatterViewProperties. + + :param legend_opacity: The legend_opacity of this ScatterViewProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this ScatterViewProperties. + + :return: The legend_orientation_threshold of this ScatterViewProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this ScatterViewProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this ScatterViewProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/schema_type.py b/influxdb_client/domain/schema_type.py new file mode 100644 index 00000000..d4633f69 --- /dev/null +++ b/influxdb_client/domain/schema_type.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SchemaType(object): + """NOTE: This class is auto generated by OpenAPI Generator. + + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + IMPLICIT = "implicit" + EXPLICIT = "explicit" + + """ + 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,D401,D403 + """SchemaType - a model defined in OpenAPI.""" # noqa: E501 self.discriminator = None + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, SchemaType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/scraper_target_request.py b/influxdb_client/domain/scraper_target_request.py index 79a8dd77..eee45931 100644 --- a/influxdb_client/domain/scraper_target_request.py +++ b/influxdb_client/domain/scraper_target_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -36,7 +36,8 @@ class ScraperTargetRequest(object): 'type': 'str', 'url': 'str', 'org_id': 'str', - 'bucket_id': 'str' + 'bucket_id': 'str', + 'allow_insecure': 'bool' } attribute_map = { @@ -44,16 +45,18 @@ class ScraperTargetRequest(object): 'type': 'type', 'url': 'url', 'org_id': 'orgID', - 'bucket_id': 'bucketID' + 'bucket_id': 'bucketID', + 'allow_insecure': 'allowInsecure' } - def __init__(self, name=None, type=None, url=None, org_id=None, bucket_id=None): # noqa: E501,D401,D403 + def __init__(self, name=None, type=None, url=None, org_id=None, bucket_id=None, allow_insecure=False): # noqa: E501,D401,D403 """ScraperTargetRequest - a model defined in OpenAPI.""" # noqa: E501 self._name = None self._type = None self._url = None self._org_id = None self._bucket_id = None + self._allow_insecure = None self.discriminator = None if name is not None: @@ -66,6 +69,8 @@ def __init__(self, name=None, type=None, url=None, org_id=None, bucket_id=None): self.org_id = org_id if bucket_id is not None: self.bucket_id = bucket_id + if allow_insecure is not None: + self.allow_insecure = allow_insecure @property def name(self): @@ -177,6 +182,28 @@ def bucket_id(self, bucket_id): """ # noqa: E501 self._bucket_id = bucket_id + @property + def allow_insecure(self): + """Get the allow_insecure of this ScraperTargetRequest. + + Skip TLS verification on endpoint. + + :return: The allow_insecure of this ScraperTargetRequest. + :rtype: bool + """ # noqa: E501 + return self._allow_insecure + + @allow_insecure.setter + def allow_insecure(self, allow_insecure): + """Set the allow_insecure of this ScraperTargetRequest. + + Skip TLS verification on endpoint. + + :param allow_insecure: The allow_insecure of this ScraperTargetRequest. + :type: bool + """ # noqa: E501 + self._allow_insecure = allow_insecure + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/scraper_target_response.py b/influxdb_client/domain/scraper_target_response.py index 79403b71..0a716238 100644 --- a/influxdb_client/domain/scraper_target_response.py +++ b/influxdb_client/domain/scraper_target_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -41,7 +41,8 @@ class ScraperTargetResponse(ScraperTargetRequest): 'type': 'str', 'url': 'str', 'org_id': 'str', - 'bucket_id': 'str' + 'bucket_id': 'str', + 'allow_insecure': 'bool' } attribute_map = { @@ -53,12 +54,13 @@ class ScraperTargetResponse(ScraperTargetRequest): 'type': 'type', 'url': 'url', 'org_id': 'orgID', - 'bucket_id': 'bucketID' + 'bucket_id': 'bucketID', + 'allow_insecure': 'allowInsecure' } - def __init__(self, id=None, org=None, bucket=None, links=None, name=None, type=None, url=None, org_id=None, bucket_id=None): # noqa: E501,D401,D403 + def __init__(self, id=None, org=None, bucket=None, links=None, name=None, type=None, url=None, org_id=None, bucket_id=None, allow_insecure=False): # noqa: E501,D401,D403 """ScraperTargetResponse - a model defined in OpenAPI.""" # noqa: E501 - ScraperTargetRequest.__init__(self, name=name, type=type, url=url, org_id=org_id, bucket_id=bucket_id) # noqa: E501 + ScraperTargetRequest.__init__(self, name=name, type=type, url=url, org_id=org_id, bucket_id=bucket_id, allow_insecure=allow_insecure) # noqa: E501 self._id = None self._org = None diff --git a/influxdb_client/domain/scraper_target_responses.py b/influxdb_client/domain/scraper_target_responses.py index f875e983..620eac1b 100644 --- a/influxdb_client/domain/scraper_target_responses.py +++ b/influxdb_client/domain/scraper_target_responses.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/secret_keys.py b/influxdb_client/domain/secret_keys.py index 139e0044..54bd5b6c 100644 --- a/influxdb_client/domain/secret_keys.py +++ b/influxdb_client/domain/secret_keys.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/secret_keys_response.py b/influxdb_client/domain/secret_keys_response.py index 0207c69e..39bc31de 100644 --- a/influxdb_client/domain/secret_keys_response.py +++ b/influxdb_client/domain/secret_keys_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/single_stat_view_properties.py b/influxdb_client/domain/single_stat_view_properties.py index a4f6c6c8..cf822a49 100644 --- a/influxdb_client/domain/single_stat_view_properties.py +++ b/influxdb_client/domain/single_stat_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -43,7 +43,7 @@ class SingleStatViewProperties(ViewProperties): 'tick_prefix': 'str', 'suffix': 'str', 'tick_suffix': 'str', - 'legend': 'Legend', + 'static_legend': 'StaticLegend', 'decimal_places': 'DecimalPlaces' } @@ -58,11 +58,11 @@ class SingleStatViewProperties(ViewProperties): 'tick_prefix': 'tickPrefix', 'suffix': 'suffix', 'tick_suffix': 'tickSuffix', - 'legend': 'legend', + 'static_legend': 'staticLegend', 'decimal_places': 'decimalPlaces' } - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, legend=None, decimal_places=None): # noqa: E501,D401,D403 + def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, prefix=None, tick_prefix=None, suffix=None, tick_suffix=None, static_legend=None, decimal_places=None): # noqa: E501,D401,D403 """SingleStatViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 @@ -76,7 +76,7 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self._tick_prefix = None self._suffix = None self._tick_suffix = None - self._legend = None + self._static_legend = None self._decimal_places = None self.discriminator = None @@ -90,7 +90,8 @@ def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, self.tick_prefix = tick_prefix self.suffix = suffix self.tick_suffix = tick_suffix - self.legend = legend + if static_legend is not None: + self.static_legend = static_legend self.decimal_places = decimal_places @property @@ -302,24 +303,22 @@ def tick_suffix(self, tick_suffix): self._tick_suffix = tick_suffix @property - def legend(self): - """Get the legend of this SingleStatViewProperties. + def static_legend(self): + """Get the static_legend of this SingleStatViewProperties. - :return: The legend of this SingleStatViewProperties. - :rtype: Legend + :return: The static_legend of this SingleStatViewProperties. + :rtype: StaticLegend """ # noqa: E501 - return self._legend + return self._static_legend - @legend.setter - def legend(self, legend): - """Set the legend of this SingleStatViewProperties. + @static_legend.setter + def static_legend(self, static_legend): + """Set the static_legend of this SingleStatViewProperties. - :param legend: The legend of this SingleStatViewProperties. - :type: Legend + :param static_legend: The static_legend of this SingleStatViewProperties. + :type: StaticLegend """ # noqa: E501 - if legend is None: - raise ValueError("Invalid value for `legend`, must not be `None`") # noqa: E501 - self._legend = legend + self._static_legend = static_legend @property def decimal_places(self): diff --git a/influxdb_client/domain/slack_notification_endpoint.py b/influxdb_client/domain/slack_notification_endpoint.py index aac2fb92..96204236 100644 --- a/influxdb_client/domain/slack_notification_endpoint.py +++ b/influxdb_client/domain/slack_notification_endpoint.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.notification_endpoint import NotificationEndpoint +from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator -class SlackNotificationEndpoint(NotificationEndpoint): +class SlackNotificationEndpoint(NotificationEndpointDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,23 +34,46 @@ class SlackNotificationEndpoint(NotificationEndpoint): """ openapi_types = { 'url': 'str', - 'token': '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' } attribute_map = { 'url': 'url', - 'token': 'token' + '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' } - def __init__(self, url=None, token=None): # noqa: E501,D401,D403 + 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="slack"): # noqa: E501,D401,D403 """SlackNotificationEndpoint - a model defined in OpenAPI.""" # noqa: E501 - NotificationEndpoint.__init__(self) # noqa: E501 + NotificationEndpointDiscriminator.__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) # noqa: E501 self._url = None self._token = None self.discriminator = None - self.url = url + if url is not None: + self.url = url if token is not None: self.token = token @@ -74,8 +97,6 @@ def url(self, url): :param url: The url of this SlackNotificationEndpoint. :type: str """ # noqa: E501 - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 self._url = url @property diff --git a/influxdb_client/domain/slack_notification_rule.py b/influxdb_client/domain/slack_notification_rule.py index bb0e7f6a..b455eab8 100644 --- a/influxdb_client/domain/slack_notification_rule.py +++ b/influxdb_client/domain/slack_notification_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -35,18 +35,64 @@ class SlackNotificationRule(SlackNotificationRuleBase): openapi_types = { 'type': 'str', 'channel': 'str', - 'message_template': 'str' + 'message_template': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', 'channel': 'channel', - 'message_template': 'messageTemplate' + 'message_template': 'messageTemplate', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, channel=None, message_template=None): # noqa: E501,D401,D403 + def __init__(self, type="slack", channel=None, message_template=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """SlackNotificationRule - a model defined in OpenAPI.""" # noqa: E501 - SlackNotificationRuleBase.__init__(self, type=type, channel=channel, message_template=message_template) # noqa: E501 + SlackNotificationRuleBase.__init__(self, type=type, channel=channel, message_template=message_template, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 self.discriminator = None def to_dict(self): diff --git a/influxdb_client/domain/slack_notification_rule_base.py b/influxdb_client/domain/slack_notification_rule_base.py index e04a1fe8..0506b7e1 100644 --- a/influxdb_client/domain/slack_notification_rule_base.py +++ b/influxdb_client/domain/slack_notification_rule_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator -class SlackNotificationRuleBase(object): +class SlackNotificationRuleBase(NotificationRuleDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,17 +35,65 @@ class SlackNotificationRuleBase(object): openapi_types = { 'type': 'str', 'channel': 'str', - 'message_template': 'str' + 'message_template': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', 'channel': 'channel', - 'message_template': 'messageTemplate' + 'message_template': 'messageTemplate', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, channel=None, message_template=None): # noqa: E501,D401,D403 + def __init__(self, type=None, channel=None, message_template=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """SlackNotificationRuleBase - a model defined in OpenAPI.""" # noqa: E501 + NotificationRuleDiscriminator.__init__(self, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 + self._type = None self._channel = None self._message_template = None diff --git a/influxdb_client/domain/smtp_notification_rule.py b/influxdb_client/domain/smtp_notification_rule.py index f0a98217..53a57c26 100644 --- a/influxdb_client/domain/smtp_notification_rule.py +++ b/influxdb_client/domain/smtp_notification_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -36,19 +36,65 @@ class SMTPNotificationRule(SMTPNotificationRuleBase): 'type': 'str', 'subject_template': 'str', 'body_template': 'str', - 'to': 'str' + 'to': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', 'subject_template': 'subjectTemplate', 'body_template': 'bodyTemplate', - 'to': 'to' + 'to': 'to', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, subject_template=None, body_template=None, to=None): # noqa: E501,D401,D403 + def __init__(self, type="smtp", subject_template=None, body_template=None, to=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """SMTPNotificationRule - a model defined in OpenAPI.""" # noqa: E501 - SMTPNotificationRuleBase.__init__(self, type=type, subject_template=subject_template, body_template=body_template, to=to) # noqa: E501 + SMTPNotificationRuleBase.__init__(self, type=type, subject_template=subject_template, body_template=body_template, to=to, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 self.discriminator = None def to_dict(self): diff --git a/influxdb_client/domain/smtp_notification_rule_base.py b/influxdb_client/domain/smtp_notification_rule_base.py index 01103350..c32c1dd4 100644 --- a/influxdb_client/domain/smtp_notification_rule_base.py +++ b/influxdb_client/domain/smtp_notification_rule_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator -class SMTPNotificationRuleBase(object): +class SMTPNotificationRuleBase(NotificationRuleDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -35,18 +36,66 @@ class SMTPNotificationRuleBase(object): 'type': 'str', 'subject_template': 'str', 'body_template': 'str', - 'to': 'str' + 'to': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' } attribute_map = { 'type': 'type', 'subject_template': 'subjectTemplate', 'body_template': 'bodyTemplate', - 'to': 'to' + 'to': 'to', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, subject_template=None, body_template=None, to=None): # noqa: E501,D401,D403 + def __init__(self, type=None, subject_template=None, body_template=None, to=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 """SMTPNotificationRuleBase - a model defined in OpenAPI.""" # noqa: E501 + NotificationRuleDiscriminator.__init__(self, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 + self._type = None self._subject_template = None self._body_template = None diff --git a/influxdb_client/domain/source.py b/influxdb_client/domain/source.py index d3e626df..ec61331c 100644 --- a/influxdb_client/domain/source.py +++ b/influxdb_client/domain/source.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/source_links.py b/influxdb_client/domain/source_links.py index d0ca4765..cd0292cc 100644 --- a/influxdb_client/domain/source_links.py +++ b/influxdb_client/domain/source_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/sources.py b/influxdb_client/domain/sources.py index bf856826..1e7f9e7c 100644 --- a/influxdb_client/domain/sources.py +++ b/influxdb_client/domain/sources.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,7 +32,7 @@ class Sources(object): and the value is json key in definition. """ openapi_types = { - 'links': 'UsersLinks', + 'links': 'ResourceMembersLinks', 'sources': 'list[Source]' } @@ -57,7 +57,7 @@ def links(self): """Get the links of this Sources. :return: The links of this Sources. - :rtype: UsersLinks + :rtype: ResourceMembersLinks """ # noqa: E501 return self._links @@ -66,7 +66,7 @@ def links(self, links): """Set the links of this Sources. :param links: The links of this Sources. - :type: UsersLinks + :type: ResourceMembersLinks """ # noqa: E501 self._links = links diff --git a/influxdb_client/domain/statement.py b/influxdb_client/domain/statement.py index 96930971..c2924843 100644 --- a/influxdb_client/domain/statement.py +++ b/influxdb_client/domain/statement.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/static_legend.py b/influxdb_client/domain/static_legend.py new file mode 100644 index 00000000..e357dde5 --- /dev/null +++ b/influxdb_client/domain/static_legend.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class StaticLegend(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 = { + 'colorize_rows': 'bool', + 'height_ratio': 'float', + 'hide': 'bool', + 'opacity': 'float', + 'orientation_threshold': 'int', + 'value_axis': 'str', + 'width_ratio': 'float' + } + + attribute_map = { + 'colorize_rows': 'colorizeRows', + 'height_ratio': 'heightRatio', + 'hide': 'hide', + 'opacity': 'opacity', + 'orientation_threshold': 'orientationThreshold', + 'value_axis': 'valueAxis', + 'width_ratio': 'widthRatio' + } + + def __init__(self, colorize_rows=None, height_ratio=None, hide=None, opacity=None, orientation_threshold=None, value_axis=None, width_ratio=None): # noqa: E501,D401,D403 + """StaticLegend - a model defined in OpenAPI.""" # noqa: E501 + self._colorize_rows = None + self._height_ratio = None + self._hide = None + self._opacity = None + self._orientation_threshold = None + self._value_axis = None + self._width_ratio = None + self.discriminator = None + + if colorize_rows is not None: + self.colorize_rows = colorize_rows + if height_ratio is not None: + self.height_ratio = height_ratio + if hide is not None: + self.hide = hide + if opacity is not None: + self.opacity = opacity + if orientation_threshold is not None: + self.orientation_threshold = orientation_threshold + if value_axis is not None: + self.value_axis = value_axis + if width_ratio is not None: + self.width_ratio = width_ratio + + @property + def colorize_rows(self): + """Get the colorize_rows of this StaticLegend. + + :return: The colorize_rows of this StaticLegend. + :rtype: bool + """ # noqa: E501 + return self._colorize_rows + + @colorize_rows.setter + def colorize_rows(self, colorize_rows): + """Set the colorize_rows of this StaticLegend. + + :param colorize_rows: The colorize_rows of this StaticLegend. + :type: bool + """ # noqa: E501 + self._colorize_rows = colorize_rows + + @property + def height_ratio(self): + """Get the height_ratio of this StaticLegend. + + :return: The height_ratio of this StaticLegend. + :rtype: float + """ # noqa: E501 + return self._height_ratio + + @height_ratio.setter + def height_ratio(self, height_ratio): + """Set the height_ratio of this StaticLegend. + + :param height_ratio: The height_ratio of this StaticLegend. + :type: float + """ # noqa: E501 + self._height_ratio = height_ratio + + @property + def hide(self): + """Get the hide of this StaticLegend. + + :return: The hide of this StaticLegend. + :rtype: bool + """ # noqa: E501 + return self._hide + + @hide.setter + def hide(self, hide): + """Set the hide of this StaticLegend. + + :param hide: The hide of this StaticLegend. + :type: bool + """ # noqa: E501 + self._hide = hide + + @property + def opacity(self): + """Get the opacity of this StaticLegend. + + :return: The opacity of this StaticLegend. + :rtype: float + """ # noqa: E501 + return self._opacity + + @opacity.setter + def opacity(self, opacity): + """Set the opacity of this StaticLegend. + + :param opacity: The opacity of this StaticLegend. + :type: float + """ # noqa: E501 + self._opacity = opacity + + @property + def orientation_threshold(self): + """Get the orientation_threshold of this StaticLegend. + + :return: The orientation_threshold of this StaticLegend. + :rtype: int + """ # noqa: E501 + return self._orientation_threshold + + @orientation_threshold.setter + def orientation_threshold(self, orientation_threshold): + """Set the orientation_threshold of this StaticLegend. + + :param orientation_threshold: The orientation_threshold of this StaticLegend. + :type: int + """ # noqa: E501 + self._orientation_threshold = orientation_threshold + + @property + def value_axis(self): + """Get the value_axis of this StaticLegend. + + :return: The value_axis of this StaticLegend. + :rtype: str + """ # noqa: E501 + return self._value_axis + + @value_axis.setter + def value_axis(self, value_axis): + """Set the value_axis of this StaticLegend. + + :param value_axis: The value_axis of this StaticLegend. + :type: str + """ # noqa: E501 + self._value_axis = value_axis + + @property + def width_ratio(self): + """Get the width_ratio of this StaticLegend. + + :return: The width_ratio of this StaticLegend. + :rtype: float + """ # noqa: E501 + return self._width_ratio + + @width_ratio.setter + def width_ratio(self, width_ratio): + """Set the width_ratio of this StaticLegend. + + :param width_ratio: The width_ratio of this StaticLegend. + :type: float + """ # noqa: E501 + self._width_ratio = width_ratio + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, StaticLegend): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/status_rule.py b/influxdb_client/domain/status_rule.py index 6779f52f..ed05f142 100644 --- a/influxdb_client/domain/status_rule.py +++ b/influxdb_client/domain/status_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/string_literal.py b/influxdb_client/domain/string_literal.py index d923c49b..38a949de 100644 --- a/influxdb_client/domain/string_literal.py +++ b/influxdb_client/domain/string_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.property_key import PropertyKey -class StringLiteral(object): +class StringLiteral(PropertyKey): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class StringLiteral(object): def __init__(self, type=None, value=None): # noqa: E501,D401,D403 """StringLiteral - a model defined in OpenAPI.""" # noqa: E501 + PropertyKey.__init__(self) # noqa: E501 + self._type = None self._value = None self.discriminator = None diff --git a/influxdb_client/domain/table_view_properties.py b/influxdb_client/domain/table_view_properties.py index ee79fc75..4125fdf4 100644 --- a/influxdb_client/domain/table_view_properties.py +++ b/influxdb_client/domain/table_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -39,7 +39,7 @@ class TableViewProperties(ViewProperties): 'shape': 'str', 'note': 'str', 'show_note_when_empty': 'bool', - 'table_options': 'object', + 'table_options': 'TableViewPropertiesTableOptions', 'field_options': 'list[RenamableField]', 'time_format': 'str', 'decimal_places': 'DecimalPlaces' @@ -218,7 +218,7 @@ def table_options(self): """Get the table_options of this TableViewProperties. :return: The table_options of this TableViewProperties. - :rtype: object + :rtype: TableViewPropertiesTableOptions """ # noqa: E501 return self._table_options @@ -227,7 +227,7 @@ def table_options(self, table_options): """Set the table_options of this TableViewProperties. :param table_options: The table_options of this TableViewProperties. - :type: object + :type: TableViewPropertiesTableOptions """ # noqa: E501 if table_options is None: raise ValueError("Invalid value for `table_options`, must not be `None`") # noqa: E501 diff --git a/influxdb_client/domain/table_view_properties_table_options.py b/influxdb_client/domain/table_view_properties_table_options.py new file mode 100644 index 00000000..c5cf66af --- /dev/null +++ b/influxdb_client/domain/table_view_properties_table_options.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TableViewPropertiesTableOptions(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 = { + 'vertical_time_axis': 'bool', + 'sort_by': 'RenamableField', + 'wrapping': 'str', + 'fix_first_column': 'bool' + } + + attribute_map = { + 'vertical_time_axis': 'verticalTimeAxis', + 'sort_by': 'sortBy', + 'wrapping': 'wrapping', + 'fix_first_column': 'fixFirstColumn' + } + + def __init__(self, vertical_time_axis=None, sort_by=None, wrapping=None, fix_first_column=None): # noqa: E501,D401,D403 + """TableViewPropertiesTableOptions - a model defined in OpenAPI.""" # noqa: E501 + self._vertical_time_axis = None + self._sort_by = None + self._wrapping = None + self._fix_first_column = None + self.discriminator = None + + if vertical_time_axis is not None: + self.vertical_time_axis = vertical_time_axis + if sort_by is not None: + self.sort_by = sort_by + if wrapping is not None: + self.wrapping = wrapping + if fix_first_column is not None: + self.fix_first_column = fix_first_column + + @property + def vertical_time_axis(self): + """Get the vertical_time_axis of this TableViewPropertiesTableOptions. + + verticalTimeAxis describes the orientation of the table by indicating whether the time axis will be displayed vertically + + :return: The vertical_time_axis of this TableViewPropertiesTableOptions. + :rtype: bool + """ # noqa: E501 + return self._vertical_time_axis + + @vertical_time_axis.setter + def vertical_time_axis(self, vertical_time_axis): + """Set the vertical_time_axis of this TableViewPropertiesTableOptions. + + verticalTimeAxis describes the orientation of the table by indicating whether the time axis will be displayed vertically + + :param vertical_time_axis: The vertical_time_axis of this TableViewPropertiesTableOptions. + :type: bool + """ # noqa: E501 + self._vertical_time_axis = vertical_time_axis + + @property + def sort_by(self): + """Get the sort_by of this TableViewPropertiesTableOptions. + + :return: The sort_by of this TableViewPropertiesTableOptions. + :rtype: RenamableField + """ # noqa: E501 + return self._sort_by + + @sort_by.setter + def sort_by(self, sort_by): + """Set the sort_by of this TableViewPropertiesTableOptions. + + :param sort_by: The sort_by of this TableViewPropertiesTableOptions. + :type: RenamableField + """ # noqa: E501 + self._sort_by = sort_by + + @property + def wrapping(self): + """Get the wrapping of this TableViewPropertiesTableOptions. + + Wrapping describes the text wrapping style to be used in table views + + :return: The wrapping of this TableViewPropertiesTableOptions. + :rtype: str + """ # noqa: E501 + return self._wrapping + + @wrapping.setter + def wrapping(self, wrapping): + """Set the wrapping of this TableViewPropertiesTableOptions. + + Wrapping describes the text wrapping style to be used in table views + + :param wrapping: The wrapping of this TableViewPropertiesTableOptions. + :type: str + """ # noqa: E501 + self._wrapping = wrapping + + @property + def fix_first_column(self): + """Get the fix_first_column of this TableViewPropertiesTableOptions. + + fixFirstColumn indicates whether the first column of the table should be locked + + :return: The fix_first_column of this TableViewPropertiesTableOptions. + :rtype: bool + """ # noqa: E501 + return self._fix_first_column + + @fix_first_column.setter + def fix_first_column(self, fix_first_column): + """Set the fix_first_column of this TableViewPropertiesTableOptions. + + fixFirstColumn indicates whether the first column of the table should be locked + + :param fix_first_column: The fix_first_column of this TableViewPropertiesTableOptions. + :type: bool + """ # noqa: E501 + self._fix_first_column = fix_first_column + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, TableViewPropertiesTableOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/tag_rule.py b/influxdb_client/domain/tag_rule.py index 3624fc40..eaf4f7e5 100644 --- a/influxdb_client/domain/tag_rule.py +++ b/influxdb_client/domain/tag_rule.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/task.py b/influxdb_client/domain/task.py index a2c371e1..b4a2ccde 100644 --- a/influxdb_client/domain/task.py +++ b/influxdb_client/domain/task.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/task_create_request.py b/influxdb_client/domain/task_create_request.py index 031864bf..7c030670 100644 --- a/influxdb_client/domain/task_create_request.py +++ b/influxdb_client/domain/task_create_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,7 +32,6 @@ class TaskCreateRequest(object): and the value is json key in definition. """ openapi_types = { - 'type': 'str', 'org_id': 'str', 'org': 'str', 'status': 'TaskStatusType', @@ -41,7 +40,6 @@ class TaskCreateRequest(object): } attribute_map = { - 'type': 'type', 'org_id': 'orgID', 'org': 'org', 'status': 'status', @@ -49,9 +47,8 @@ class TaskCreateRequest(object): 'description': 'description' } - def __init__(self, type=None, org_id=None, org=None, status=None, flux=None, description=None): # noqa: E501,D401,D403 + def __init__(self, org_id=None, org=None, status=None, flux=None, description=None): # noqa: E501,D401,D403 """TaskCreateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._type = None self._org_id = None self._org = None self._status = None @@ -59,8 +56,6 @@ def __init__(self, type=None, org_id=None, org=None, status=None, flux=None, des self._description = None self.discriminator = None - if type is not None: - self.type = type if org_id is not None: self.org_id = org_id if org is not None: @@ -71,28 +66,6 @@ def __init__(self, type=None, org_id=None, org=None, status=None, flux=None, des if description is not None: self.description = description - @property - def type(self): - """Get the type of this TaskCreateRequest. - - The type of task, this can be used for filtering tasks on list actions. - - :return: The type of this TaskCreateRequest. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this TaskCreateRequest. - - The type of task, this can be used for filtering tasks on list actions. - - :param type: The type of this TaskCreateRequest. - :type: str - """ # noqa: E501 - self._type = type - @property def org_id(self): """Get the org_id of this TaskCreateRequest. diff --git a/influxdb_client/domain/task_links.py b/influxdb_client/domain/task_links.py index 3a302390..b5c8251f 100644 --- a/influxdb_client/domain/task_links.py +++ b/influxdb_client/domain/task_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/task_status_type.py b/influxdb_client/domain/task_status_type.py index 93d123ca..8c64d638 100644 --- a/influxdb_client/domain/task_status_type.py +++ b/influxdb_client/domain/task_status_type.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/task_update_request.py b/influxdb_client/domain/task_update_request.py index f344ae3b..e43c24f3 100644 --- a/influxdb_client/domain/task_update_request.py +++ b/influxdb_client/domain/task_update_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/tasks.py b/influxdb_client/domain/tasks.py index dc898b39..be4f321a 100644 --- a/influxdb_client/domain/tasks.py +++ b/influxdb_client/domain/tasks.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/telegraf.py b/influxdb_client/domain/telegraf.py index ff245c14..2248a917 100644 --- a/influxdb_client/domain/telegraf.py +++ b/influxdb_client/domain/telegraf.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/telegraf_plugin.py b/influxdb_client/domain/telegraf_plugin.py index 1d8f1540..8c73202b 100644 --- a/influxdb_client/domain/telegraf_plugin.py +++ b/influxdb_client/domain/telegraf_plugin.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/telegraf_plugins.py b/influxdb_client/domain/telegraf_plugins.py new file mode 100644 index 00000000..6beb4fa4 --- /dev/null +++ b/influxdb_client/domain/telegraf_plugins.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TelegrafPlugins(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 = { + 'version': 'str', + 'os': 'str', + 'plugins': 'list[TelegrafPlugin]' + } + + attribute_map = { + 'version': 'version', + 'os': 'os', + 'plugins': 'plugins' + } + + def __init__(self, version=None, os=None, plugins=None): # noqa: E501,D401,D403 + """TelegrafPlugins - a model defined in OpenAPI.""" # noqa: E501 + self._version = None + self._os = None + self._plugins = None + self.discriminator = None + + if version is not None: + self.version = version + if os is not None: + self.os = os + if plugins is not None: + self.plugins = plugins + + @property + def version(self): + """Get the version of this TelegrafPlugins. + + :return: The version of this TelegrafPlugins. + :rtype: str + """ # noqa: E501 + return self._version + + @version.setter + def version(self, version): + """Set the version of this TelegrafPlugins. + + :param version: The version of this TelegrafPlugins. + :type: str + """ # noqa: E501 + self._version = version + + @property + def os(self): + """Get the os of this TelegrafPlugins. + + :return: The os of this TelegrafPlugins. + :rtype: str + """ # noqa: E501 + return self._os + + @os.setter + def os(self, os): + """Set the os of this TelegrafPlugins. + + :param os: The os of this TelegrafPlugins. + :type: str + """ # noqa: E501 + self._os = os + + @property + def plugins(self): + """Get the plugins of this TelegrafPlugins. + + :return: The plugins of this TelegrafPlugins. + :rtype: list[TelegrafPlugin] + """ # noqa: E501 + return self._plugins + + @plugins.setter + def plugins(self, plugins): + """Set the plugins of this TelegrafPlugins. + + :param plugins: The plugins of this TelegrafPlugins. + :type: list[TelegrafPlugin] + """ # noqa: E501 + self._plugins = plugins + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, TelegrafPlugins): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/telegraf_request.py b/influxdb_client/domain/telegraf_request.py index 3b161e28..256d9db9 100644 --- a/influxdb_client/domain/telegraf_request.py +++ b/influxdb_client/domain/telegraf_request.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/telegraf_request_metadata.py b/influxdb_client/domain/telegraf_request_metadata.py index bed40102..06fa4012 100644 --- a/influxdb_client/domain/telegraf_request_metadata.py +++ b/influxdb_client/domain/telegraf_request_metadata.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/telegrafs.py b/influxdb_client/domain/telegrafs.py index 59abf07f..1856ad16 100644 --- a/influxdb_client/domain/telegrafs.py +++ b/influxdb_client/domain/telegrafs.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/telegram_notification_endpoint.py b/influxdb_client/domain/telegram_notification_endpoint.py new file mode 100644 index 00000000..8b6231c1 --- /dev/null +++ b/influxdb_client/domain/telegram_notification_endpoint.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator + + +class TelegramNotificationEndpoint(NotificationEndpointDiscriminator): + """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 = { + 'token': 'str', + 'channel': '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' + } + + attribute_map = { + 'token': 'token', + 'channel': 'channel', + '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' + } + + def __init__(self, token=None, channel=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="telegram"): # noqa: E501,D401,D403 + """TelegramNotificationEndpoint - a model defined in OpenAPI.""" # noqa: E501 + NotificationEndpointDiscriminator.__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) # noqa: E501 + + self._token = None + self._channel = None + self.discriminator = None + + self.token = token + self.channel = channel + + @property + def token(self): + """Get the token of this TelegramNotificationEndpoint. + + Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot . + + :return: The token of this TelegramNotificationEndpoint. + :rtype: str + """ # noqa: E501 + return self._token + + @token.setter + def token(self, token): + """Set the token of this TelegramNotificationEndpoint. + + Specifies the Telegram bot token. See https://core.telegram.org/bots#creating-a-new-bot . + + :param token: The token of this TelegramNotificationEndpoint. + :type: str + """ # noqa: E501 + if token is None: + raise ValueError("Invalid value for `token`, must not be `None`") # noqa: E501 + self._token = token + + @property + def channel(self): + """Get the channel of this TelegramNotificationEndpoint. + + ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage . + + :return: The channel of this TelegramNotificationEndpoint. + :rtype: str + """ # noqa: E501 + return self._channel + + @channel.setter + def channel(self, channel): + """Set the channel of this TelegramNotificationEndpoint. + + ID of the telegram channel, a chat_id in https://core.telegram.org/bots/api#sendmessage . + + :param channel: The channel of this TelegramNotificationEndpoint. + :type: str + """ # noqa: E501 + if channel is None: + raise ValueError("Invalid value for `channel`, must not be `None`") # noqa: E501 + self._channel = channel + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, TelegramNotificationEndpoint): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/telegram_notification_rule.py b/influxdb_client/domain/telegram_notification_rule.py new file mode 100644 index 00000000..c641980e --- /dev/null +++ b/influxdb_client/domain/telegram_notification_rule.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six +from influxdb_client.domain.telegram_notification_rule_base import TelegramNotificationRuleBase + + +class TelegramNotificationRule(TelegramNotificationRuleBase): + """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 = { + 'type': 'str', + 'message_template': 'str', + 'parse_mode': 'str', + 'disable_web_page_preview': 'bool', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' + } + + attribute_map = { + 'type': 'type', + 'message_template': 'messageTemplate', + 'parse_mode': 'parseMode', + 'disable_web_page_preview': 'disableWebPagePreview', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' + } + + def __init__(self, type="telegram", message_template=None, parse_mode=None, disable_web_page_preview=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 + """TelegramNotificationRule - a model defined in OpenAPI.""" # noqa: E501 + TelegramNotificationRuleBase.__init__(self, type=type, message_template=message_template, parse_mode=parse_mode, disable_web_page_preview=disable_web_page_preview, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, TelegramNotificationRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/telegram_notification_rule_base.py b/influxdb_client/domain/telegram_notification_rule_base.py new file mode 100644 index 00000000..34871f2b --- /dev/null +++ b/influxdb_client/domain/telegram_notification_rule_base.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.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 TelegramNotificationRuleBase(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 = { + 'type': 'str', + 'message_template': 'str', + 'parse_mode': 'str', + 'disable_web_page_preview': 'bool', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'id': 'str', + 'endpoint_id': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'status': 'TaskStatusType', + 'name': 'str', + 'sleep_until': 'str', + 'every': 'str', + 'offset': 'str', + 'runbook_link': 'str', + 'limit_every': 'int', + 'limit': 'int', + 'tag_rules': 'list[TagRule]', + 'description': 'str', + 'status_rules': 'list[StatusRule]', + 'labels': 'list[Label]', + 'links': 'NotificationRuleBaseLinks' + } + + attribute_map = { + 'type': 'type', + 'message_template': 'messageTemplate', + 'parse_mode': 'parseMode', + 'disable_web_page_preview': 'disableWebPagePreview', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'id': 'id', + 'endpoint_id': 'endpointID', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'status': 'status', + 'name': 'name', + 'sleep_until': 'sleepUntil', + 'every': 'every', + 'offset': 'offset', + 'runbook_link': 'runbookLink', + 'limit_every': 'limitEvery', + 'limit': 'limit', + 'tag_rules': 'tagRules', + 'description': 'description', + 'status_rules': 'statusRules', + 'labels': 'labels', + 'links': 'links' + } + + def __init__(self, type=None, message_template=None, parse_mode=None, disable_web_page_preview=None, latest_completed=None, last_run_status=None, last_run_error=None, id=None, endpoint_id=None, org_id=None, task_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,D401,D403 + """TelegramNotificationRuleBase - a model defined in OpenAPI.""" # noqa: E501 + NotificationRuleDiscriminator.__init__(self, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, id=id, endpoint_id=endpoint_id, org_id=org_id, task_id=task_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) # noqa: E501 + + self._type = None + self._message_template = None + self._parse_mode = None + self._disable_web_page_preview = None + self.discriminator = None + + self.type = type + self.message_template = message_template + if parse_mode is not None: + self.parse_mode = parse_mode + if disable_web_page_preview is not None: + self.disable_web_page_preview = disable_web_page_preview + + @property + def type(self): + """Get the type of this TelegramNotificationRuleBase. + + The discriminator between other types of notification rules is "telegram". + + :return: The type of this TelegramNotificationRuleBase. + :rtype: str + """ # noqa: E501 + return self._type + + @type.setter + def type(self, type): + """Set the type of this TelegramNotificationRuleBase. + + The discriminator between other types of notification rules is "telegram". + + :param type: The type of this TelegramNotificationRuleBase. + :type: str + """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + self._type = type + + @property + def message_template(self): + """Get the message_template of this TelegramNotificationRuleBase. + + The message template as a flux interpolated string. + + :return: The message_template of this TelegramNotificationRuleBase. + :rtype: str + """ # noqa: E501 + return self._message_template + + @message_template.setter + def message_template(self, message_template): + """Set the message_template of this TelegramNotificationRuleBase. + + The message template as a flux interpolated string. + + :param message_template: The message_template of this TelegramNotificationRuleBase. + :type: str + """ # noqa: E501 + if message_template is None: + raise ValueError("Invalid value for `message_template`, must not be `None`") # noqa: E501 + self._message_template = message_template + + @property + def parse_mode(self): + """Get the parse_mode of this TelegramNotificationRuleBase. + + Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" . + + :return: The parse_mode of this TelegramNotificationRuleBase. + :rtype: str + """ # noqa: E501 + return self._parse_mode + + @parse_mode.setter + def parse_mode(self, parse_mode): + """Set the parse_mode of this TelegramNotificationRuleBase. + + Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options . Defaults to "MarkdownV2" . + + :param parse_mode: The parse_mode of this TelegramNotificationRuleBase. + :type: str + """ # noqa: E501 + self._parse_mode = parse_mode + + @property + def disable_web_page_preview(self): + """Get the disable_web_page_preview of this TelegramNotificationRuleBase. + + Disables preview of web links in the sent messages when "true". Defaults to "false" . + + :return: The disable_web_page_preview of this TelegramNotificationRuleBase. + :rtype: bool + """ # noqa: E501 + return self._disable_web_page_preview + + @disable_web_page_preview.setter + def disable_web_page_preview(self, disable_web_page_preview): + """Set the disable_web_page_preview of this TelegramNotificationRuleBase. + + Disables preview of web links in the sent messages when "true". Defaults to "false" . + + :param disable_web_page_preview: The disable_web_page_preview of this TelegramNotificationRuleBase. + :type: bool + """ # noqa: E501 + self._disable_web_page_preview = disable_web_page_preview + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, TelegramNotificationRuleBase): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/test_statement.py b/influxdb_client/domain/test_statement.py index 33c431c9..ab40cfb5 100644 --- a/influxdb_client/domain/test_statement.py +++ b/influxdb_client/domain/test_statement.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class TestStatement(object): +class TestStatement(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class TestStatement(object): def __init__(self, type=None, assignment=None): # noqa: E501,D401,D403 """TestStatement - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._assignment = None self.discriminator = None diff --git a/influxdb_client/domain/threshold.py b/influxdb_client/domain/threshold.py index 0a3df1a3..1a806cf0 100644 --- a/influxdb_client/domain/threshold.py +++ b/influxdb_client/domain/threshold.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -42,22 +42,10 @@ class Threshold(ThresholdBase): 'all_values': 'allValues' } - discriminator_value_class_map = { - 'RangeThreshold': 'RangeThreshold', - 'LesserThreshold': 'LesserThreshold', - 'GreaterThreshold': 'GreaterThreshold' - } - def __init__(self, level=None, all_values=None): # noqa: E501,D401,D403 """Threshold - a model defined in OpenAPI.""" # noqa: E501 ThresholdBase.__init__(self, level=level, all_values=all_values) # noqa: E501 - self.discriminator = 'type' - - def get_real_child_model(self, data): - """Return 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): """Return the model properties as a dict.""" diff --git a/influxdb_client/domain/threshold_base.py b/influxdb_client/domain/threshold_base.py index f1398b35..df9a570c 100644 --- a/influxdb_client/domain/threshold_base.py +++ b/influxdb_client/domain/threshold_base.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/threshold_check.py b/influxdb_client/domain/threshold_check.py index d460490c..2c3590f8 100644 --- a/influxdb_client/domain/threshold_check.py +++ b/influxdb_client/domain/threshold_check.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,10 +14,10 @@ import re # noqa: F401 import six -from influxdb_client.domain.check import Check +from influxdb_client.domain.check_discriminator import CheckDiscriminator -class ThresholdCheck(Check): +class ThresholdCheck(CheckDiscriminator): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -34,26 +34,75 @@ class ThresholdCheck(Check): """ openapi_types = { 'type': 'str', - 'thresholds': 'list[Threshold]' + 'thresholds': 'list[Threshold]', + 'every': 'str', + 'offset': 'str', + 'tags': 'list[object]', + 'status_message_template': 'str', + 'id': 'str', + 'name': 'str', + 'org_id': 'str', + 'task_id': 'str', + 'owner_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'query': 'DashboardQuery', + 'status': 'TaskStatusType', + 'description': 'str', + 'latest_completed': 'datetime', + 'last_run_status': 'str', + 'last_run_error': 'str', + 'labels': 'list[Label]', + 'links': 'CheckBaseLinks' } attribute_map = { 'type': 'type', - 'thresholds': 'thresholds' + 'thresholds': 'thresholds', + 'every': 'every', + 'offset': 'offset', + 'tags': 'tags', + 'status_message_template': 'statusMessageTemplate', + 'id': 'id', + 'name': 'name', + 'org_id': 'orgID', + 'task_id': 'taskID', + 'owner_id': 'ownerID', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'query': 'query', + 'status': 'status', + 'description': 'description', + 'latest_completed': 'latestCompleted', + 'last_run_status': 'lastRunStatus', + 'last_run_error': 'lastRunError', + 'labels': 'labels', + 'links': 'links' } - def __init__(self, type=None, thresholds=None): # noqa: E501,D401,D403 + def __init__(self, type="threshold", thresholds=None, every=None, offset=None, tags=None, status_message_template=None, id=None, name=None, org_id=None, task_id=None, owner_id=None, created_at=None, updated_at=None, query=None, status=None, description=None, latest_completed=None, last_run_status=None, last_run_error=None, labels=None, links=None): # noqa: E501,D401,D403 """ThresholdCheck - a model defined in OpenAPI.""" # noqa: E501 - Check.__init__(self) # noqa: E501 + CheckDiscriminator.__init__(self, id=id, name=name, org_id=org_id, task_id=task_id, owner_id=owner_id, created_at=created_at, updated_at=updated_at, query=query, status=status, description=description, latest_completed=latest_completed, last_run_status=last_run_status, last_run_error=last_run_error, labels=labels, links=links) # noqa: E501 self._type = None self._thresholds = None + self._every = None + self._offset = None + self._tags = None + self._status_message_template = None self.discriminator = None - if type is not None: - self.type = type + self.type = type if thresholds is not None: self.thresholds = thresholds + if every is not None: + self.every = every + if offset is not None: + self.offset = offset + if tags is not None: + self.tags = tags + if status_message_template is not None: + self.status_message_template = status_message_template @property def type(self): @@ -71,6 +120,8 @@ def type(self, type): :param type: The type of this ThresholdCheck. :type: str """ # noqa: E501 + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @property @@ -91,6 +142,94 @@ def thresholds(self, thresholds): """ # noqa: E501 self._thresholds = thresholds + @property + def every(self): + """Get the every of this ThresholdCheck. + + Check repetition interval. + + :return: The every of this ThresholdCheck. + :rtype: str + """ # noqa: E501 + return self._every + + @every.setter + def every(self, every): + """Set the every of this ThresholdCheck. + + Check repetition interval. + + :param every: The every of this ThresholdCheck. + :type: str + """ # noqa: E501 + self._every = every + + @property + def offset(self): + """Get the offset of this ThresholdCheck. + + Duration to delay after the schedule, before executing check. + + :return: The offset of this ThresholdCheck. + :rtype: str + """ # noqa: E501 + return self._offset + + @offset.setter + def offset(self, offset): + """Set the offset of this ThresholdCheck. + + Duration to delay after the schedule, before executing check. + + :param offset: The offset of this ThresholdCheck. + :type: str + """ # noqa: E501 + self._offset = offset + + @property + def tags(self): + """Get the tags of this ThresholdCheck. + + List of tags to write to each status. + + :return: The tags of this ThresholdCheck. + :rtype: list[object] + """ # noqa: E501 + return self._tags + + @tags.setter + def tags(self, tags): + """Set the tags of this ThresholdCheck. + + List of tags to write to each status. + + :param tags: The tags of this ThresholdCheck. + :type: list[object] + """ # noqa: E501 + self._tags = tags + + @property + def status_message_template(self): + """Get the status_message_template of this ThresholdCheck. + + The template used to generate and write a status message. + + :return: The status_message_template of this ThresholdCheck. + :rtype: str + """ # noqa: E501 + return self._status_message_template + + @status_message_template.setter + def status_message_template(self, status_message_template): + """Set the status_message_template of this ThresholdCheck. + + The template used to generate and write a status message. + + :param status_message_template: The status_message_template of this ThresholdCheck. + :type: str + """ # noqa: E501 + self._status_message_template = status_message_template + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/unary_expression.py b/influxdb_client/domain/unary_expression.py index 72b555db..699f49b3 100644 --- a/influxdb_client/domain/unary_expression.py +++ b/influxdb_client/domain/unary_expression.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class UnaryExpression(object): +class UnaryExpression(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class UnaryExpression(object): def __init__(self, type=None, operator=None, argument=None): # noqa: E501,D401,D403 """UnaryExpression - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._operator = None self._argument = None diff --git a/influxdb_client/domain/unsigned_integer_literal.py b/influxdb_client/domain/unsigned_integer_literal.py index 3dee88a2..89c11b61 100644 --- a/influxdb_client/domain/unsigned_integer_literal.py +++ b/influxdb_client/domain/unsigned_integer_literal.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.expression import Expression -class UnsignedIntegerLiteral(object): +class UnsignedIntegerLiteral(Expression): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -43,6 +44,8 @@ class UnsignedIntegerLiteral(object): def __init__(self, type=None, value=None): # noqa: E501,D401,D403 """UnsignedIntegerLiteral - a model defined in OpenAPI.""" # noqa: E501 + Expression.__init__(self) # noqa: E501 + self._type = None self._value = None self.discriminator = None diff --git a/influxdb_client/domain/user.py b/influxdb_client/domain/user.py index 33770b1e..c5bd079c 100644 --- a/influxdb_client/domain/user.py +++ b/influxdb_client/domain/user.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -35,25 +35,22 @@ class User(object): 'id': 'str', 'oauth_id': 'str', 'name': 'str', - 'status': 'str', - 'links': 'UserLinks' + 'status': 'str' } attribute_map = { 'id': 'id', 'oauth_id': 'oauthID', 'name': 'name', - 'status': 'status', - 'links': 'links' + 'status': 'status' } - def __init__(self, id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 + def __init__(self, id=None, oauth_id=None, name=None, status='active'): # noqa: E501,D401,D403 """User - a model defined in OpenAPI.""" # noqa: E501 self._id = None self._oauth_id = None self._name = None self._status = None - self._links = None self.discriminator = None if id is not None: @@ -63,8 +60,6 @@ def __init__(self, id=None, oauth_id=None, name=None, status='active', links=Non self.name = name if status is not None: self.status = status - if links is not None: - self.links = links @property def id(self): @@ -144,24 +139,6 @@ def status(self, status): """ # noqa: E501 self._status = status - @property - def links(self): - """Get the links of this User. - - :return: The links of this User. - :rtype: UserLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this User. - - :param links: The links of this User. - :type: UserLinks - """ # noqa: E501 - self._links = links - def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/domain/user_response.py b/influxdb_client/domain/user_response.py new file mode 100644 index 00000000..31c12d95 --- /dev/null +++ b/influxdb_client/domain/user_response.py @@ -0,0 +1,206 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.0 +Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + + +class UserResponse(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', + 'oauth_id': 'str', + 'name': 'str', + 'status': 'str', + 'links': 'UserResponseLinks' + } + + attribute_map = { + 'id': 'id', + 'oauth_id': 'oauthID', + 'name': 'name', + 'status': 'status', + 'links': 'links' + } + + def __init__(self, id=None, oauth_id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 + """UserResponse - a model defined in OpenAPI.""" # noqa: E501 + self._id = None + self._oauth_id = None + self._name = None + self._status = None + self._links = None + self.discriminator = None + + if id is not None: + self.id = id + if oauth_id is not None: + self.oauth_id = oauth_id + self.name = name + if status is not None: + self.status = status + if links is not None: + self.links = links + + @property + def id(self): + """Get the id of this UserResponse. + + :return: The id of this UserResponse. + :rtype: str + """ # noqa: E501 + return self._id + + @id.setter + def id(self, id): + """Set the id of this UserResponse. + + :param id: The id of this UserResponse. + :type: str + """ # noqa: E501 + self._id = id + + @property + def oauth_id(self): + """Get the oauth_id of this UserResponse. + + :return: The oauth_id of this UserResponse. + :rtype: str + """ # noqa: E501 + return self._oauth_id + + @oauth_id.setter + def oauth_id(self, oauth_id): + """Set the oauth_id of this UserResponse. + + :param oauth_id: The oauth_id of this UserResponse. + :type: str + """ # noqa: E501 + self._oauth_id = oauth_id + + @property + def name(self): + """Get the name of this UserResponse. + + :return: The name of this UserResponse. + :rtype: str + """ # noqa: E501 + return self._name + + @name.setter + def name(self, name): + """Set the name of this UserResponse. + + :param name: The name of this UserResponse. + :type: str + """ # noqa: E501 + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + self._name = name + + @property + def status(self): + """Get the status of this UserResponse. + + If inactive the user is inactive. + + :return: The status of this UserResponse. + :rtype: str + """ # noqa: E501 + return self._status + + @status.setter + def status(self, status): + """Set the status of this UserResponse. + + If inactive the user is inactive. + + :param status: The status of this UserResponse. + :type: str + """ # noqa: E501 + self._status = status + + @property + def links(self): + """Get the links of this UserResponse. + + :return: The links of this UserResponse. + :rtype: UserResponseLinks + """ # noqa: E501 + return self._links + + @links.setter + def links(self, links): + """Set the links of this UserResponse. + + :param links: The links of this UserResponse. + :type: UserResponseLinks + """ # noqa: E501 + self._links = links + + def to_dict(self): + """Return 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): + """Return 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): + """Return true if both objects are equal.""" + if not isinstance(other, UserResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Return true if both objects are not equal.""" + return not self == other diff --git a/influxdb_client/domain/users_links.py b/influxdb_client/domain/user_response_links.py similarity index 85% rename from influxdb_client/domain/users_links.py rename to influxdb_client/domain/user_response_links.py index 719d20b7..be75d208 100644 --- a/influxdb_client/domain/users_links.py +++ b/influxdb_client/domain/user_response_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -16,7 +16,7 @@ import six -class UsersLinks(object): +class UserResponseLinks(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -40,7 +40,7 @@ class UsersLinks(object): } def __init__(self, _self=None): # noqa: E501,D401,D403 - """UsersLinks - a model defined in OpenAPI.""" # noqa: E501 + """UserResponseLinks - a model defined in OpenAPI.""" # noqa: E501 self.__self = None self.discriminator = None @@ -49,18 +49,18 @@ def __init__(self, _self=None): # noqa: E501,D401,D403 @property def _self(self): - """Get the _self of this UsersLinks. + """Get the _self of this UserResponseLinks. - :return: The _self of this UsersLinks. + :return: The _self of this UserResponseLinks. :rtype: str """ # noqa: E501 return self.__self @_self.setter def _self(self, _self): - """Set the _self of this UsersLinks. + """Set the _self of this UserResponseLinks. - :param _self: The _self of this UsersLinks. + :param _self: The _self of this UserResponseLinks. :type: str """ # noqa: E501 self.__self = _self @@ -99,7 +99,7 @@ def __repr__(self): def __eq__(self, other): """Return true if both objects are equal.""" - if not isinstance(other, UsersLinks): + if not isinstance(other, UserResponseLinks): return False return self.__dict__ == other.__dict__ diff --git a/influxdb_client/domain/users.py b/influxdb_client/domain/users.py index f3774bae..68771418 100644 --- a/influxdb_client/domain/users.py +++ b/influxdb_client/domain/users.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -32,8 +32,8 @@ class Users(object): and the value is json key in definition. """ openapi_types = { - 'links': 'UsersLinks', - 'users': 'list[User]' + 'links': 'ResourceMembersLinks', + 'users': 'list[UserResponse]' } attribute_map = { @@ -57,7 +57,7 @@ def links(self): """Get the links of this Users. :return: The links of this Users. - :rtype: UsersLinks + :rtype: ResourceMembersLinks """ # noqa: E501 return self._links @@ -66,7 +66,7 @@ def links(self, links): """Set the links of this Users. :param links: The links of this Users. - :type: UsersLinks + :type: ResourceMembersLinks """ # noqa: E501 self._links = links @@ -75,7 +75,7 @@ def users(self): """Get the users of this Users. :return: The users of this Users. - :rtype: list[User] + :rtype: list[UserResponse] """ # noqa: E501 return self._users @@ -84,7 +84,7 @@ def users(self, users): """Set the users of this Users. :param users: The users of this Users. - :type: list[User] + :type: list[UserResponse] """ # noqa: E501 self._users = users diff --git a/influxdb_client/domain/variable.py b/influxdb_client/domain/variable.py index f2d8841f..0b49d631 100644 --- a/influxdb_client/domain/variable.py +++ b/influxdb_client/domain/variable.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/variable_assignment.py b/influxdb_client/domain/variable_assignment.py index 12ecffba..f36ac8c6 100644 --- a/influxdb_client/domain/variable_assignment.py +++ b/influxdb_client/domain/variable_assignment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -14,9 +14,10 @@ import re # noqa: F401 import six +from influxdb_client.domain.statement import Statement -class VariableAssignment(object): +class VariableAssignment(Statement): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -45,6 +46,8 @@ class VariableAssignment(object): def __init__(self, type=None, id=None, init=None): # noqa: E501,D401,D403 """VariableAssignment - a model defined in OpenAPI.""" # noqa: E501 + Statement.__init__(self) # noqa: E501 + self._type = None self._id = None self._init = None diff --git a/influxdb_client/domain/variable_links.py b/influxdb_client/domain/variable_links.py index ef4abb92..91e5f39c 100644 --- a/influxdb_client/domain/variable_links.py +++ b/influxdb_client/domain/variable_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/variable_properties.py b/influxdb_client/domain/variable_properties.py index 1b485e5d..d5dfa43c 100644 --- a/influxdb_client/domain/variable_properties.py +++ b/influxdb_client/domain/variable_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/variables.py b/influxdb_client/domain/variables.py index 460e4a5b..799e60a1 100644 --- a/influxdb_client/domain/variables.py +++ b/influxdb_client/domain/variables.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/view.py b/influxdb_client/domain/view.py index bf74c666..5ce28231 100644 --- a/influxdb_client/domain/view.py +++ b/influxdb_client/domain/view.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/view_links.py b/influxdb_client/domain/view_links.py index 3c4c353c..703f0558 100644 --- a/influxdb_client/domain/view_links.py +++ b/influxdb_client/domain/view_links.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/view_properties.py b/influxdb_client/domain/view_properties.py index 8414b40b..f58b9fa9 100644 --- a/influxdb_client/domain/view_properties.py +++ b/influxdb_client/domain/view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/views.py b/influxdb_client/domain/views.py index a36a5c98..b3481b70 100644 --- a/influxdb_client/domain/views.py +++ b/influxdb_client/domain/views.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/write_precision.py b/influxdb_client/domain/write_precision.py index 7471f365..ac8bae0e 100644 --- a/influxdb_client/domain/write_precision.py +++ b/influxdb_client/domain/write_precision.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/xy_geom.py b/influxdb_client/domain/xy_geom.py index a781d77b..b1801e0d 100644 --- a/influxdb_client/domain/xy_geom.py +++ b/influxdb_client/domain/xy_geom.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/domain/xy_view_properties.py b/influxdb_client/domain/xy_view_properties.py index a45ea103..31924d54 100644 --- a/influxdb_client/domain/xy_view_properties.py +++ b/influxdb_client/domain/xy_view_properties.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -41,12 +41,25 @@ class XYViewProperties(ViewProperties): 'note': 'str', 'show_note_when_empty': 'bool', 'axes': 'Axes', - 'legend': 'Legend', + 'static_legend': 'StaticLegend', 'x_column': 'str', + 'generate_x_axis_ticks': 'list[str]', + 'x_total_ticks': 'int', + 'x_tick_start': 'float', + 'x_tick_step': 'float', 'y_column': 'str', + 'generate_y_axis_ticks': 'list[str]', + 'y_total_ticks': 'int', + 'y_tick_start': 'float', + 'y_tick_step': 'float', 'shade_below': 'bool', + 'hover_dimension': 'str', 'position': 'str', - 'geom': 'XYGeom' + 'geom': 'XYGeom', + 'legend_colorize_rows': 'bool', + 'legend_hide': 'bool', + 'legend_opacity': 'float', + 'legend_orientation_threshold': 'int' } attribute_map = { @@ -58,15 +71,28 @@ class XYViewProperties(ViewProperties): 'note': 'note', 'show_note_when_empty': 'showNoteWhenEmpty', 'axes': 'axes', - 'legend': 'legend', + 'static_legend': 'staticLegend', 'x_column': 'xColumn', + 'generate_x_axis_ticks': 'generateXAxisTicks', + 'x_total_ticks': 'xTotalTicks', + 'x_tick_start': 'xTickStart', + 'x_tick_step': 'xTickStep', 'y_column': 'yColumn', + 'generate_y_axis_ticks': 'generateYAxisTicks', + 'y_total_ticks': 'yTotalTicks', + 'y_tick_start': 'yTickStart', + 'y_tick_step': 'yTickStep', 'shade_below': 'shadeBelow', + 'hover_dimension': 'hoverDimension', 'position': 'position', - 'geom': 'geom' + 'geom': 'geom', + 'legend_colorize_rows': 'legendColorizeRows', + 'legend_hide': 'legendHide', + 'legend_opacity': 'legendOpacity', + 'legend_orientation_threshold': 'legendOrientationThreshold' } - def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, legend=None, x_column=None, y_column=None, shade_below=None, position=None, geom=None): # noqa: E501,D401,D403 + def __init__(self, time_format=None, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, axes=None, static_legend=None, x_column=None, generate_x_axis_ticks=None, x_total_ticks=None, x_tick_start=None, x_tick_step=None, y_column=None, generate_y_axis_ticks=None, y_total_ticks=None, y_tick_start=None, y_tick_step=None, shade_below=None, hover_dimension=None, position=None, geom=None, legend_colorize_rows=None, legend_hide=None, legend_opacity=None, legend_orientation_threshold=None): # noqa: E501,D401,D403 """XYViewProperties - a model defined in OpenAPI.""" # noqa: E501 ViewProperties.__init__(self) # noqa: E501 @@ -78,12 +104,25 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self._note = None self._show_note_when_empty = None self._axes = None - self._legend = None + self._static_legend = None self._x_column = None + self._generate_x_axis_ticks = None + self._x_total_ticks = None + self._x_tick_start = None + self._x_tick_step = None self._y_column = None + self._generate_y_axis_ticks = None + self._y_total_ticks = None + self._y_tick_start = None + self._y_tick_step = None self._shade_below = None + self._hover_dimension = None self._position = None self._geom = None + self._legend_colorize_rows = None + self._legend_hide = None + self._legend_opacity = None + self._legend_orientation_threshold = None self.discriminator = None if time_format is not None: @@ -95,15 +134,42 @@ def __init__(self, time_format=None, type=None, queries=None, colors=None, shape self.note = note self.show_note_when_empty = show_note_when_empty self.axes = axes - self.legend = legend + if static_legend is not None: + self.static_legend = static_legend if x_column is not None: self.x_column = x_column + if generate_x_axis_ticks is not None: + self.generate_x_axis_ticks = generate_x_axis_ticks + if x_total_ticks is not None: + self.x_total_ticks = x_total_ticks + if x_tick_start is not None: + self.x_tick_start = x_tick_start + if x_tick_step is not None: + self.x_tick_step = x_tick_step if y_column is not None: self.y_column = y_column + if generate_y_axis_ticks is not None: + self.generate_y_axis_ticks = generate_y_axis_ticks + if y_total_ticks is not None: + self.y_total_ticks = y_total_ticks + if y_tick_start is not None: + self.y_tick_start = y_tick_start + if y_tick_step is not None: + self.y_tick_step = y_tick_step if shade_below is not None: self.shade_below = shade_below + if hover_dimension is not None: + self.hover_dimension = hover_dimension self.position = position self.geom = geom + if legend_colorize_rows is not None: + self.legend_colorize_rows = legend_colorize_rows + if legend_hide is not None: + self.legend_hide = legend_hide + if legend_opacity is not None: + self.legend_opacity = legend_opacity + if legend_orientation_threshold is not None: + self.legend_orientation_threshold = legend_orientation_threshold @property def time_format(self): @@ -272,24 +338,22 @@ def axes(self, axes): self._axes = axes @property - def legend(self): - """Get the legend of this XYViewProperties. + def static_legend(self): + """Get the static_legend of this XYViewProperties. - :return: The legend of this XYViewProperties. - :rtype: Legend + :return: The static_legend of this XYViewProperties. + :rtype: StaticLegend """ # noqa: E501 - return self._legend + return self._static_legend - @legend.setter - def legend(self, legend): - """Set the legend of this XYViewProperties. + @static_legend.setter + def static_legend(self, static_legend): + """Set the static_legend of this XYViewProperties. - :param legend: The legend of this XYViewProperties. - :type: Legend + :param static_legend: The static_legend of this XYViewProperties. + :type: StaticLegend """ # noqa: E501 - if legend is None: - raise ValueError("Invalid value for `legend`, must not be `None`") # noqa: E501 - self._legend = legend + self._static_legend = static_legend @property def x_column(self): @@ -309,6 +373,78 @@ def x_column(self, x_column): """ # noqa: E501 self._x_column = x_column + @property + def generate_x_axis_ticks(self): + """Get the generate_x_axis_ticks of this XYViewProperties. + + :return: The generate_x_axis_ticks of this XYViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_x_axis_ticks + + @generate_x_axis_ticks.setter + def generate_x_axis_ticks(self, generate_x_axis_ticks): + """Set the generate_x_axis_ticks of this XYViewProperties. + + :param generate_x_axis_ticks: The generate_x_axis_ticks of this XYViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_x_axis_ticks = generate_x_axis_ticks + + @property + def x_total_ticks(self): + """Get the x_total_ticks of this XYViewProperties. + + :return: The x_total_ticks of this XYViewProperties. + :rtype: int + """ # noqa: E501 + return self._x_total_ticks + + @x_total_ticks.setter + def x_total_ticks(self, x_total_ticks): + """Set the x_total_ticks of this XYViewProperties. + + :param x_total_ticks: The x_total_ticks of this XYViewProperties. + :type: int + """ # noqa: E501 + self._x_total_ticks = x_total_ticks + + @property + def x_tick_start(self): + """Get the x_tick_start of this XYViewProperties. + + :return: The x_tick_start of this XYViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_start + + @x_tick_start.setter + def x_tick_start(self, x_tick_start): + """Set the x_tick_start of this XYViewProperties. + + :param x_tick_start: The x_tick_start of this XYViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_start = x_tick_start + + @property + def x_tick_step(self): + """Get the x_tick_step of this XYViewProperties. + + :return: The x_tick_step of this XYViewProperties. + :rtype: float + """ # noqa: E501 + return self._x_tick_step + + @x_tick_step.setter + def x_tick_step(self, x_tick_step): + """Set the x_tick_step of this XYViewProperties. + + :param x_tick_step: The x_tick_step of this XYViewProperties. + :type: float + """ # noqa: E501 + self._x_tick_step = x_tick_step + @property def y_column(self): """Get the y_column of this XYViewProperties. @@ -327,6 +463,78 @@ def y_column(self, y_column): """ # noqa: E501 self._y_column = y_column + @property + def generate_y_axis_ticks(self): + """Get the generate_y_axis_ticks of this XYViewProperties. + + :return: The generate_y_axis_ticks of this XYViewProperties. + :rtype: list[str] + """ # noqa: E501 + return self._generate_y_axis_ticks + + @generate_y_axis_ticks.setter + def generate_y_axis_ticks(self, generate_y_axis_ticks): + """Set the generate_y_axis_ticks of this XYViewProperties. + + :param generate_y_axis_ticks: The generate_y_axis_ticks of this XYViewProperties. + :type: list[str] + """ # noqa: E501 + self._generate_y_axis_ticks = generate_y_axis_ticks + + @property + def y_total_ticks(self): + """Get the y_total_ticks of this XYViewProperties. + + :return: The y_total_ticks of this XYViewProperties. + :rtype: int + """ # noqa: E501 + return self._y_total_ticks + + @y_total_ticks.setter + def y_total_ticks(self, y_total_ticks): + """Set the y_total_ticks of this XYViewProperties. + + :param y_total_ticks: The y_total_ticks of this XYViewProperties. + :type: int + """ # noqa: E501 + self._y_total_ticks = y_total_ticks + + @property + def y_tick_start(self): + """Get the y_tick_start of this XYViewProperties. + + :return: The y_tick_start of this XYViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_start + + @y_tick_start.setter + def y_tick_start(self, y_tick_start): + """Set the y_tick_start of this XYViewProperties. + + :param y_tick_start: The y_tick_start of this XYViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_start = y_tick_start + + @property + def y_tick_step(self): + """Get the y_tick_step of this XYViewProperties. + + :return: The y_tick_step of this XYViewProperties. + :rtype: float + """ # noqa: E501 + return self._y_tick_step + + @y_tick_step.setter + def y_tick_step(self, y_tick_step): + """Set the y_tick_step of this XYViewProperties. + + :param y_tick_step: The y_tick_step of this XYViewProperties. + :type: float + """ # noqa: E501 + self._y_tick_step = y_tick_step + @property def shade_below(self): """Get the shade_below of this XYViewProperties. @@ -345,6 +553,24 @@ def shade_below(self, shade_below): """ # noqa: E501 self._shade_below = shade_below + @property + def hover_dimension(self): + """Get the hover_dimension of this XYViewProperties. + + :return: The hover_dimension of this XYViewProperties. + :rtype: str + """ # noqa: E501 + return self._hover_dimension + + @hover_dimension.setter + def hover_dimension(self, hover_dimension): + """Set the hover_dimension of this XYViewProperties. + + :param hover_dimension: The hover_dimension of this XYViewProperties. + :type: str + """ # noqa: E501 + self._hover_dimension = hover_dimension + @property def position(self): """Get the position of this XYViewProperties. @@ -385,6 +611,78 @@ def geom(self, geom): raise ValueError("Invalid value for `geom`, must not be `None`") # noqa: E501 self._geom = geom + @property + def legend_colorize_rows(self): + """Get the legend_colorize_rows of this XYViewProperties. + + :return: The legend_colorize_rows of this XYViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_colorize_rows + + @legend_colorize_rows.setter + def legend_colorize_rows(self, legend_colorize_rows): + """Set the legend_colorize_rows of this XYViewProperties. + + :param legend_colorize_rows: The legend_colorize_rows of this XYViewProperties. + :type: bool + """ # noqa: E501 + self._legend_colorize_rows = legend_colorize_rows + + @property + def legend_hide(self): + """Get the legend_hide of this XYViewProperties. + + :return: The legend_hide of this XYViewProperties. + :rtype: bool + """ # noqa: E501 + return self._legend_hide + + @legend_hide.setter + def legend_hide(self, legend_hide): + """Set the legend_hide of this XYViewProperties. + + :param legend_hide: The legend_hide of this XYViewProperties. + :type: bool + """ # noqa: E501 + self._legend_hide = legend_hide + + @property + def legend_opacity(self): + """Get the legend_opacity of this XYViewProperties. + + :return: The legend_opacity of this XYViewProperties. + :rtype: float + """ # noqa: E501 + return self._legend_opacity + + @legend_opacity.setter + def legend_opacity(self, legend_opacity): + """Set the legend_opacity of this XYViewProperties. + + :param legend_opacity: The legend_opacity of this XYViewProperties. + :type: float + """ # noqa: E501 + self._legend_opacity = legend_opacity + + @property + def legend_orientation_threshold(self): + """Get the legend_orientation_threshold of this XYViewProperties. + + :return: The legend_orientation_threshold of this XYViewProperties. + :rtype: int + """ # noqa: E501 + return self._legend_orientation_threshold + + @legend_orientation_threshold.setter + def legend_orientation_threshold(self, legend_orientation_threshold): + """Set the legend_orientation_threshold of this XYViewProperties. + + :param legend_orientation_threshold: The legend_orientation_threshold of this XYViewProperties. + :type: int + """ # noqa: E501 + self._legend_orientation_threshold = legend_orientation_threshold + def to_dict(self): """Return the model properties as a dict.""" result = {} diff --git a/influxdb_client/rest.py b/influxdb_client/rest.py index 0d79ae2d..c77f5f7a 100644 --- a/influxdb_client/rest.py +++ b/influxdb_client/rest.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/__init__.py b/influxdb_client/service/__init__.py index 1545ae8c..3ce3d1f6 100644 --- a/influxdb_client/service/__init__.py +++ b/influxdb_client/service/__init__.py @@ -1,11 +1,11 @@ # flake8: noqa """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -19,6 +19,7 @@ from influxdb_client.service.checks_service import ChecksService from influxdb_client.service.dbr_ps_service import DBRPsService from influxdb_client.service.dashboards_service import DashboardsService +from influxdb_client.service.delete_service import DeleteService from influxdb_client.service.health_service import HealthService from influxdb_client.service.labels_service import LabelsService from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService diff --git a/influxdb_client/service/authorizations_service.py b/influxdb_client/service/authorizations_service.py index f0b28825..502f6ff6 100644 --- a/influxdb_client/service/authorizations_service.py +++ b/influxdb_client/service/authorizations_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -35,7 +35,7 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 self.api_client = api_client def delete_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete a authorization. + """Delete an authorization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -57,7 +57,7 @@ def delete_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 return data def delete_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete a authorization. + """Delete an authorization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -470,16 +470,16 @@ def patch_authorizations_id_with_http_info(self, auth_id, authorization_update_r collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def post_authorizations(self, authorization, **kwargs): # noqa: E501,D401,D403 + def post_authorizations(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 """Create an authorization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_authorizations(authorization, async_req=True) + >>> thread = api.post_authorizations(authorization_post_request, async_req=True) >>> result = thread.get() :param async_req bool - :param Authorization authorization: Authorization to create (required) + :param AuthorizationPostRequest authorization_post_request: Authorization to create (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, @@ -487,21 +487,21 @@ def post_authorizations(self, authorization, **kwargs): # noqa: E501,D401,D403 """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.post_authorizations_with_http_info(authorization, **kwargs) # noqa: E501 + return self.post_authorizations_with_http_info(authorization_post_request, **kwargs) # noqa: E501 else: - (data) = self.post_authorizations_with_http_info(authorization, **kwargs) # noqa: E501 + (data) = self.post_authorizations_with_http_info(authorization_post_request, **kwargs) # noqa: E501 return data - def post_authorizations_with_http_info(self, authorization, **kwargs): # noqa: E501,D401,D403 + def post_authorizations_with_http_info(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 """Create an authorization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_authorizations_with_http_info(authorization, async_req=True) + >>> thread = api.post_authorizations_with_http_info(authorization_post_request, async_req=True) >>> result = thread.get() :param async_req bool - :param Authorization authorization: Authorization to create (required) + :param AuthorizationPostRequest authorization_post_request: Authorization to create (required) :param str zap_trace_span: OpenTracing span context :return: Authorization If the method is called asynchronously, @@ -509,7 +509,7 @@ def post_authorizations_with_http_info(self, authorization, **kwargs): # noqa: """ # noqa: E501 local_var_params = locals() - all_params = ['authorization', 'zap_trace_span'] # noqa: E501 + all_params = ['authorization_post_request', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -524,10 +524,10 @@ def post_authorizations_with_http_info(self, authorization, **kwargs): # noqa: ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'authorization' is set - if ('authorization' not in local_var_params or - local_var_params['authorization'] is None): - raise ValueError("Missing the required parameter `authorization` when calling `post_authorizations`") # noqa: E501 + # verify the required parameter 'authorization_post_request' is set + if ('authorization_post_request' not in local_var_params or + local_var_params['authorization_post_request'] is None): + raise ValueError("Missing the required parameter `authorization_post_request` when calling `post_authorizations`") # noqa: E501 collection_formats = {} @@ -543,8 +543,8 @@ def post_authorizations_with_http_info(self, authorization, **kwargs): # noqa: local_var_files = {} body_params = None - if 'authorization' in local_var_params: - body_params = local_var_params['authorization'] + if 'authorization_post_request' in local_var_params: + body_params = local_var_params['authorization_post_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/influxdb_client/service/buckets_service.py b/influxdb_client/service/buckets_service.py index dc3cf35b..c0bfda4f 100644 --- a/influxdb_client/service/buckets_service.py +++ b/influxdb_client/service/buckets_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -139,7 +139,7 @@ def delete_buckets_id_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D urlopen_kw=urlopen_kw) def delete_buckets_id_labels_id(self, bucket_id, label_id, **kwargs): # noqa: E501,D401,D403 - """delete a label from a bucket. + """Delete a label from a bucket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -162,7 +162,7 @@ def delete_buckets_id_labels_id(self, bucket_id, label_id, **kwargs): # noqa: E return data def delete_buckets_id_labels_id_with_http_info(self, bucket_id, label_id, **kwargs): # noqa: E501,D401,D403 - """delete a label from a bucket. + """Delete a label from a bucket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -490,6 +490,7 @@ def get_buckets(self, **kwargs): # noqa: E501,D401,D403 :param str org: The organization name. :param str org_id: The organization ID. :param str name: Only returns buckets with a specific name. + :param str id: Only returns buckets with a specific ID. :return: Buckets If the method is called asynchronously, returns the request thread. @@ -517,13 +518,14 @@ def get_buckets_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param str org: The organization name. :param str org_id: The organization ID. :param str name: Only returns buckets with a specific name. + :param str id: Only returns buckets with a specific ID. :return: Buckets If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['zap_trace_span', 'offset', 'limit', 'after', 'org', 'org_id', 'name'] # noqa: E501 + all_params = ['zap_trace_span', 'offset', 'limit', 'after', 'org', 'org_id', 'name', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -562,6 +564,8 @@ def get_buckets_with_http_info(self, **kwargs): # noqa: E501,D401,D403 query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 if 'name' in local_var_params: query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'id' in local_var_params: + query_params.append(('id', local_var_params['id'])) # noqa: E501 header_params = {} if 'zap_trace_span' in local_var_params: @@ -1124,17 +1128,17 @@ def get_sources_id_buckets_with_http_info(self, source_id, **kwargs): # noqa: E collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def patch_buckets_id(self, bucket_id, bucket, **kwargs): # noqa: E501,D401,D403 + def patch_buckets_id(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 """Update a bucket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_buckets_id(bucket_id, bucket, async_req=True) + >>> thread = api.patch_buckets_id(bucket_id, patch_bucket_request, async_req=True) >>> result = thread.get() :param async_req bool :param str bucket_id: The bucket ID. (required) - :param Bucket bucket: Bucket update to apply (required) + :param PatchBucketRequest patch_bucket_request: Bucket update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, @@ -1142,22 +1146,22 @@ def patch_buckets_id(self, bucket_id, bucket, **kwargs): # noqa: E501,D401,D403 """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.patch_buckets_id_with_http_info(bucket_id, bucket, **kwargs) # noqa: E501 + return self.patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, **kwargs) # noqa: E501 else: - (data) = self.patch_buckets_id_with_http_info(bucket_id, bucket, **kwargs) # noqa: E501 + (data) = self.patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, **kwargs) # noqa: E501 return data - def patch_buckets_id_with_http_info(self, bucket_id, bucket, **kwargs): # noqa: E501,D401,D403 + def patch_buckets_id_with_http_info(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 """Update a bucket. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_buckets_id_with_http_info(bucket_id, bucket, async_req=True) + >>> thread = api.patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, async_req=True) >>> result = thread.get() :param async_req bool :param str bucket_id: The bucket ID. (required) - :param Bucket bucket: Bucket update to apply (required) + :param PatchBucketRequest patch_bucket_request: Bucket update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Bucket If the method is called asynchronously, @@ -1165,7 +1169,7 @@ def patch_buckets_id_with_http_info(self, bucket_id, bucket, **kwargs): # noqa: """ # noqa: E501 local_var_params = locals() - all_params = ['bucket_id', 'bucket', 'zap_trace_span'] # noqa: E501 + all_params = ['bucket_id', 'patch_bucket_request', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1184,10 +1188,10 @@ def patch_buckets_id_with_http_info(self, bucket_id, bucket, **kwargs): # noqa: if ('bucket_id' not in local_var_params or local_var_params['bucket_id'] is None): raise ValueError("Missing the required parameter `bucket_id` when calling `patch_buckets_id`") # noqa: E501 - # 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 `patch_buckets_id`") # noqa: E501 + # verify the required parameter 'patch_bucket_request' is set + if ('patch_bucket_request' not in local_var_params or + local_var_params['patch_bucket_request'] is None): + raise ValueError("Missing the required parameter `patch_bucket_request` when calling `patch_buckets_id`") # noqa: E501 collection_formats = {} @@ -1205,8 +1209,8 @@ def patch_buckets_id_with_http_info(self, bucket_id, bucket, **kwargs): # noqa: local_var_files = {} body_params = None - if 'bucket' in local_var_params: - body_params = local_var_params['bucket'] + if 'patch_bucket_request' in local_var_params: + body_params = local_var_params['patch_bucket_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/influxdb_client/service/cells_service.py b/influxdb_client/service/cells_service.py index 1f818962..ee9622d0 100644 --- a/influxdb_client/service/cells_service.py +++ b/influxdb_client/service/cells_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/checks_service.py b/influxdb_client/service/checks_service.py index 587b2d50..717c4263 100644 --- a/influxdb_client/service/checks_service.py +++ b/influxdb_client/service/checks_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/dashboards_service.py b/influxdb_client/service/dashboards_service.py index 67182f36..5a219a78 100644 --- a/influxdb_client/service/dashboards_service.py +++ b/influxdb_client/service/dashboards_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -596,9 +596,12 @@ def get_dashboards(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context + :param int offset: + :param int limit: + :param bool descending: :param str owner: The owner ID. :param str sort_by: The column to sort by. - :param list[str] id: List of dashboard IDs to return. If both `id and `owner` are specified, only `id` is used. + :param list[str] id: List of dashboard IDs to return. If both `id` and `owner` are specified, only `id` is used. :param str org_id: The organization ID. :param str org: The organization name. :return: Dashboards @@ -622,9 +625,12 @@ def get_dashboards_with_http_info(self, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param str zap_trace_span: OpenTracing span context + :param int offset: + :param int limit: + :param bool descending: :param str owner: The owner ID. :param str sort_by: The column to sort by. - :param list[str] id: List of dashboard IDs to return. If both `id and `owner` are specified, only `id` is used. + :param list[str] id: List of dashboard IDs to return. If both `id` and `owner` are specified, only `id` is used. :param str org_id: The organization ID. :param str org: The organization name. :return: Dashboards @@ -633,7 +639,7 @@ def get_dashboards_with_http_info(self, **kwargs): # noqa: E501,D401,D403 """ # noqa: E501 local_var_params = locals() - all_params = ['zap_trace_span', 'owner', 'sort_by', 'id', 'org_id', 'org'] # noqa: E501 + all_params = ['zap_trace_span', 'offset', 'limit', 'descending', 'owner', 'sort_by', 'id', 'org_id', 'org'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -649,11 +655,23 @@ def get_dashboards_with_http_info(self, **kwargs): # noqa: E501,D401,D403 local_var_params[key] = val del local_var_params['kwargs'] + if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ValueError("Invalid value for parameter `offset` when calling `get_dashboards`, must be a value greater than or equal to `0`") # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `get_dashboards`, must be a value less than or equal to `100`") # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `get_dashboards`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'descending' in local_var_params: + query_params.append(('descending', local_var_params['descending'])) # noqa: E501 if 'owner' in local_var_params: query_params.append(('owner', local_var_params['owner'])) # noqa: E501 if 'sort_by' in local_var_params: @@ -715,7 +733,7 @@ def get_dashboards_id(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 :param str dashboard_id: The ID of the dashboard to update. (required) :param str zap_trace_span: OpenTracing span context :param str include: Includes the cell view properties in the response if set to `properties` - :return: Dashboard + :return: object If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -738,7 +756,7 @@ def get_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E50 :param str dashboard_id: The ID of the dashboard to update. (required) :param str zap_trace_span: OpenTracing span context :param str include: Includes the cell view properties in the response if set to `properties` - :return: Dashboard + :return: object If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -802,7 +820,7 @@ def get_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E50 body=body_params, post_params=form_params, files=local_var_files, - response_type='Dashboard', # noqa: E501 + response_type='object', # 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 @@ -924,7 +942,7 @@ def get_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, urlopen_kw=urlopen_kw) def get_dashboards_id_labels(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """list all labels for a dashboard. + """List all labels for a dashboard. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -946,7 +964,7 @@ def get_dashboards_id_labels(self, dashboard_id, **kwargs): # noqa: E501,D401,D return data def get_dashboards_id_labels_with_http_info(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """list all labels for a dashboard. + """List all labels for a dashboard. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1235,48 +1253,48 @@ def get_dashboards_id_owners_with_http_info(self, dashboard_id, **kwargs): # no collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def patch_dashboards_id(self, dashboard_id, dashboard, **kwargs): # noqa: E501,D401,D403 + def patch_dashboards_id(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 """Update a dashboard. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_dashboards_id(dashboard_id, dashboard, async_req=True) + >>> thread = api.patch_dashboards_id(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dashboard_id: The ID of the dashboard to update. (required) - :param Dashboard dashboard: Patching of a dashboard (required) :param str zap_trace_span: OpenTracing span context + :param PatchDashboardRequest patch_dashboard_request: :return: Dashboard If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.patch_dashboards_id_with_http_info(dashboard_id, dashboard, **kwargs) # noqa: E501 + return self.patch_dashboards_id_with_http_info(dashboard_id, **kwargs) # noqa: E501 else: - (data) = self.patch_dashboards_id_with_http_info(dashboard_id, dashboard, **kwargs) # noqa: E501 + (data) = self.patch_dashboards_id_with_http_info(dashboard_id, **kwargs) # noqa: E501 return data - def patch_dashboards_id_with_http_info(self, dashboard_id, dashboard, **kwargs): # noqa: E501,D401,D403 + def patch_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 """Update a dashboard. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_dashboards_id_with_http_info(dashboard_id, dashboard, async_req=True) + >>> thread = api.patch_dashboards_id_with_http_info(dashboard_id, async_req=True) >>> result = thread.get() :param async_req bool :param str dashboard_id: The ID of the dashboard to update. (required) - :param Dashboard dashboard: Patching of a dashboard (required) :param str zap_trace_span: OpenTracing span context + :param PatchDashboardRequest patch_dashboard_request: :return: Dashboard If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['dashboard_id', 'dashboard', 'zap_trace_span'] # noqa: E501 + all_params = ['dashboard_id', 'zap_trace_span', 'patch_dashboard_request'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1295,10 +1313,6 @@ def patch_dashboards_id_with_http_info(self, dashboard_id, dashboard, **kwargs): if ('dashboard_id' not in local_var_params or local_var_params['dashboard_id'] is None): raise ValueError("Missing the required parameter `dashboard_id` when calling `patch_dashboards_id`") # noqa: E501 - # verify the required parameter 'dashboard' is set - if ('dashboard' not in local_var_params or - local_var_params['dashboard'] is None): - raise ValueError("Missing the required parameter `dashboard` when calling `patch_dashboards_id`") # noqa: E501 collection_formats = {} @@ -1316,8 +1330,8 @@ def patch_dashboards_id_with_http_info(self, dashboard_id, dashboard, **kwargs): local_var_files = {} body_params = None - if 'dashboard' in local_var_params: - body_params = local_var_params['dashboard'] + if 'patch_dashboard_request' in local_var_params: + body_params = local_var_params['patch_dashboard_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1612,7 +1626,7 @@ def post_dashboards(self, create_dashboard_request, **kwargs): # noqa: E501,D40 :param async_req bool :param CreateDashboardRequest create_dashboard_request: Dashboard to create (required) :param str zap_trace_span: OpenTracing span context - :return: Dashboard + :return: object If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -1634,7 +1648,7 @@ def post_dashboards_with_http_info(self, create_dashboard_request, **kwargs): # :param async_req bool :param CreateDashboardRequest create_dashboard_request: Dashboard to create (required) :param str zap_trace_span: OpenTracing span context - :return: Dashboard + :return: object If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -1700,7 +1714,7 @@ def post_dashboards_with_http_info(self, create_dashboard_request, **kwargs): # body=body_params, post_params=form_params, files=local_var_files, - response_type='Dashboard', # noqa: E501 + response_type='object', # 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 diff --git a/influxdb_client/service/dbr_ps_service.py b/influxdb_client/service/dbr_ps_service.py index a017ad98..83290744 100644 --- a/influxdb_client/service/dbr_ps_service.py +++ b/influxdb_client/service/dbr_ps_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/default_service.py b/influxdb_client/service/default_service.py index edb315d6..74d3cab0 100644 --- a/influxdb_client/service/default_service.py +++ b/influxdb_client/service/default_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -34,54 +34,44 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 api_client = ApiClient() self.api_client = api_client - def delete_post(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 - """Delete time series data from InfluxDB. + def get_routes(self, **kwargs): # noqa: E501,D401,D403 + """Map of all top level routes available. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_post(delete_predicate_request, async_req=True) + >>> thread = api.get_routes(async_req=True) >>> result = thread.get() :param async_req bool - :param DeletePredicateRequest delete_predicate_request: Predicate delete request (required) :param str zap_trace_span: OpenTracing span context - :param str org: Specifies the organization to delete data from. - :param str bucket: Specifies the bucket to delete data from. - :param str org_id: Specifies the organization ID of the resource. - :param str bucket_id: Specifies the bucket ID to delete data from. - :return: None + :return: Routes If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_post_with_http_info(delete_predicate_request, **kwargs) # noqa: E501 + return self.get_routes_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.delete_post_with_http_info(delete_predicate_request, **kwargs) # noqa: E501 + (data) = self.get_routes_with_http_info(**kwargs) # noqa: E501 return data - def delete_post_with_http_info(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 - """Delete time series data from InfluxDB. + def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 + """Map of all top level routes available. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_post_with_http_info(delete_predicate_request, async_req=True) + >>> thread = api.get_routes_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param DeletePredicateRequest delete_predicate_request: Predicate delete request (required) :param str zap_trace_span: OpenTracing span context - :param str org: Specifies the organization to delete data from. - :param str bucket: Specifies the bucket to delete data from. - :param str org_id: Specifies the organization ID of the resource. - :param str bucket_id: Specifies the bucket ID to delete data from. - :return: None + :return: Routes If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['delete_predicate_request', 'zap_trace_span', 'org', 'bucket', 'org_id', 'bucket_id'] # noqa: E501 + all_params = ['zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -92,28 +82,16 @@ def delete_post_with_http_info(self, delete_predicate_request, **kwargs): # noq if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_post" % key + " to method get_routes" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'delete_predicate_request' is set - if ('delete_predicate_request' not in local_var_params or - local_var_params['delete_predicate_request'] is None): - raise ValueError("Missing the required parameter `delete_predicate_request` when calling `delete_post`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'bucket' in local_var_params: - query_params.append(('bucket', local_var_params['bucket'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'bucket_id' in local_var_params: - query_params.append(('bucketID', local_var_params['bucket_id'])) # noqa: E501 header_params = {} if 'zap_trace_span' in local_var_params: @@ -123,16 +101,10 @@ def delete_post_with_http_info(self, delete_predicate_request, **kwargs): # noq local_var_files = {} body_params = None - if 'delete_predicate_request' in local_var_params: - body_params = local_var_params['delete_predicate_request'] # 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 @@ -142,14 +114,14 @@ def delete_post_with_http_info(self, delete_predicate_request, **kwargs): # noq urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/delete', 'POST', + '/api/v2/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Routes', # 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 @@ -158,44 +130,46 @@ def delete_post_with_http_info(self, delete_predicate_request, **kwargs): # noq collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def get_routes(self, **kwargs): # noqa: E501,D401,D403 - """Map of all top level routes available. + def get_telegraf_plugins(self, **kwargs): # noqa: E501,D401,D403 + """get_telegraf_plugins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_routes(async_req=True) + >>> thread = api.get_telegraf_plugins(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context - :return: Routes + :param str type: The type of plugin desired. + :return: TelegrafPlugins If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.get_routes_with_http_info(**kwargs) # noqa: E501 + return self.get_telegraf_plugins_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.get_routes_with_http_info(**kwargs) # noqa: E501 + (data) = self.get_telegraf_plugins_with_http_info(**kwargs) # noqa: E501 return data - def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Map of all top level routes available. + def get_telegraf_plugins_with_http_info(self, **kwargs): # noqa: E501,D401,D403 + """get_telegraf_plugins. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_routes_with_http_info(async_req=True) + >>> thread = api.get_telegraf_plugins_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context - :return: Routes + :param str type: The type of plugin desired. + :return: TelegrafPlugins If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['zap_trace_span'] # noqa: E501 + all_params = ['zap_trace_span', 'type'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -206,7 +180,7 @@ def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_routes" % key + " to method get_telegraf_plugins" % key ) local_var_params[key] = val del local_var_params['kwargs'] @@ -216,6 +190,8 @@ def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 path_params = {} query_params = [] + if 'type' in local_var_params: + query_params.append(('type', local_var_params['type'])) # noqa: E501 header_params = {} if 'zap_trace_span' in local_var_params: @@ -238,14 +214,14 @@ def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/', 'GET', + '/api/v2/telegraf/plugins', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Routes', # noqa: E501 + response_type='TelegrafPlugins', # 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 diff --git a/influxdb_client/service/delete_service.py b/influxdb_client/service/delete_service.py new file mode 100644 index 00000000..7ff51de7 --- /dev/null +++ b/influxdb_client/service/delete_service.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" +Influx OSS API Service. + +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 + +OpenAPI spec version: 2.0.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 DeleteService(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): # noqa: E501,D401,D403 + """DeleteService - a operation defined in OpenAPI.""" + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def post_delete(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 + """Delete time series data from InfluxDB. + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_delete(delete_predicate_request, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeletePredicateRequest delete_predicate_request: Predicate delete request (required) + :param str zap_trace_span: OpenTracing span context + :param str org: Specifies the organization to delete data from. + :param str bucket: Specifies the bucket to delete data from. + :param str org_id: Specifies the organization ID of the resource. + :param str bucket_id: Specifies the bucket ID to delete data from. + :return: None + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.post_delete_with_http_info(delete_predicate_request, **kwargs) # noqa: E501 + else: + (data) = self.post_delete_with_http_info(delete_predicate_request, **kwargs) # noqa: E501 + return data + + def post_delete_with_http_info(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 + """Delete time series data from InfluxDB. + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.post_delete_with_http_info(delete_predicate_request, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param DeletePredicateRequest delete_predicate_request: Predicate delete request (required) + :param str zap_trace_span: OpenTracing span context + :param str org: Specifies the organization to delete data from. + :param str bucket: Specifies the bucket to delete data from. + :param str org_id: Specifies the organization ID of the resource. + :param str bucket_id: Specifies the bucket ID to delete data from. + :return: None + If the method is called asynchronously, + returns the request thread. + """ # noqa: E501 + local_var_params = locals() + + all_params = ['delete_predicate_request', 'zap_trace_span', 'org', 'bucket', 'org_id', 'bucket_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + all_params.append('urlopen_kw') + + 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 post_delete" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'delete_predicate_request' is set + if ('delete_predicate_request' not in local_var_params or + local_var_params['delete_predicate_request'] is None): + raise ValueError("Missing the required parameter `delete_predicate_request` when calling `post_delete`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'org' in local_var_params: + query_params.append(('org', local_var_params['org'])) # noqa: E501 + if 'bucket' in local_var_params: + query_params.append(('bucket', local_var_params['bucket'])) # noqa: E501 + if 'org_id' in local_var_params: + query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 + if 'bucket_id' in local_var_params: + query_params.append(('bucketID', local_var_params['bucket_id'])) # noqa: E501 + + header_params = {} + if 'zap_trace_span' in local_var_params: + header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'delete_predicate_request' in local_var_params: + body_params = local_var_params['delete_predicate_request'] + # 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 + + # urlopen optional setting + urlopen_kw = None + if 'urlopen_kw' in kwargs: + urlopen_kw = kwargs['urlopen_kw'] + + return self.api_client.call_api( + '/api/v2/delete', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # 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, + urlopen_kw=urlopen_kw) diff --git a/influxdb_client/service/health_service.py b/influxdb_client/service/health_service.py index b34b9edd..3843366b 100644 --- a/influxdb_client/service/health_service.py +++ b/influxdb_client/service/health_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/labels_service.py b/influxdb_client/service/labels_service.py index 91341273..6453a4bc 100644 --- a/influxdb_client/service/labels_service.py +++ b/influxdb_client/service/labels_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/notification_endpoints_service.py b/influxdb_client/service/notification_endpoints_service.py index b07371e4..8594c31d 100644 --- a/influxdb_client/service/notification_endpoints_service.py +++ b/influxdb_client/service/notification_endpoints_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/notification_rules_service.py b/influxdb_client/service/notification_rules_service.py index 1b090c20..3ae278f1 100644 --- a/influxdb_client/service/notification_rules_service.py +++ b/influxdb_client/service/notification_rules_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/organizations_service.py b/influxdb_client/service/organizations_service.py index 77253bee..c07cd340 100644 --- a/influxdb_client/service/organizations_service.py +++ b/influxdb_client/service/organizations_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -904,17 +904,17 @@ def get_orgs_id_secrets_with_http_info(self, org_id, **kwargs): # noqa: E501,D4 collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def patch_orgs_id(self, org_id, organization, **kwargs): # noqa: E501,D401,D403 + def patch_orgs_id(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 """Update an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_orgs_id(org_id, organization, async_req=True) + >>> thread = api.patch_orgs_id(org_id, patch_organization_request, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to get. (required) - :param Organization organization: Organization update to apply (required) + :param PatchOrganizationRequest patch_organization_request: Organization update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, @@ -922,22 +922,22 @@ def patch_orgs_id(self, org_id, organization, **kwargs): # noqa: E501,D401,D403 """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.patch_orgs_id_with_http_info(org_id, organization, **kwargs) # noqa: E501 + return self.patch_orgs_id_with_http_info(org_id, patch_organization_request, **kwargs) # noqa: E501 else: - (data) = self.patch_orgs_id_with_http_info(org_id, organization, **kwargs) # noqa: E501 + (data) = self.patch_orgs_id_with_http_info(org_id, patch_organization_request, **kwargs) # noqa: E501 return data - def patch_orgs_id_with_http_info(self, org_id, organization, **kwargs): # noqa: E501,D401,D403 + def patch_orgs_id_with_http_info(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 """Update an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_orgs_id_with_http_info(org_id, organization, async_req=True) + >>> thread = api.patch_orgs_id_with_http_info(org_id, patch_organization_request, async_req=True) >>> result = thread.get() :param async_req bool :param str org_id: The ID of the organization to get. (required) - :param Organization organization: Organization update to apply (required) + :param PatchOrganizationRequest patch_organization_request: Organization update to apply (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, @@ -945,7 +945,7 @@ def patch_orgs_id_with_http_info(self, org_id, organization, **kwargs): # noqa: """ # noqa: E501 local_var_params = locals() - all_params = ['org_id', 'organization', 'zap_trace_span'] # noqa: E501 + all_params = ['org_id', 'patch_organization_request', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -964,10 +964,10 @@ def patch_orgs_id_with_http_info(self, org_id, organization, **kwargs): # noqa: if ('org_id' not in local_var_params or local_var_params['org_id'] is None): raise ValueError("Missing the required parameter `org_id` when calling `patch_orgs_id`") # noqa: E501 - # verify the required parameter 'organization' is set - if ('organization' not in local_var_params or - local_var_params['organization'] is None): - raise ValueError("Missing the required parameter `organization` when calling `patch_orgs_id`") # noqa: E501 + # verify the required parameter 'patch_organization_request' is set + if ('patch_organization_request' not in local_var_params or + local_var_params['patch_organization_request'] is None): + raise ValueError("Missing the required parameter `patch_organization_request` when calling `patch_orgs_id`") # noqa: E501 collection_formats = {} @@ -985,8 +985,8 @@ def patch_orgs_id_with_http_info(self, org_id, organization, **kwargs): # noqa: local_var_files = {} body_params = None - if 'organization' in local_var_params: - body_params = local_var_params['organization'] + if 'patch_organization_request' in local_var_params: + body_params = local_var_params['patch_organization_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1136,16 +1136,16 @@ def patch_orgs_id_secrets_with_http_info(self, org_id, request_body, **kwargs): collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def post_orgs(self, organization, **kwargs): # noqa: E501,D401,D403 + def post_orgs(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 """Create an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_orgs(organization, async_req=True) + >>> thread = api.post_orgs(post_organization_request, async_req=True) >>> result = thread.get() :param async_req bool - :param Organization organization: Organization to create (required) + :param PostOrganizationRequest post_organization_request: Organization to create (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, @@ -1153,21 +1153,21 @@ def post_orgs(self, organization, **kwargs): # noqa: E501,D401,D403 """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.post_orgs_with_http_info(organization, **kwargs) # noqa: E501 + return self.post_orgs_with_http_info(post_organization_request, **kwargs) # noqa: E501 else: - (data) = self.post_orgs_with_http_info(organization, **kwargs) # noqa: E501 + (data) = self.post_orgs_with_http_info(post_organization_request, **kwargs) # noqa: E501 return data - def post_orgs_with_http_info(self, organization, **kwargs): # noqa: E501,D401,D403 + def post_orgs_with_http_info(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 """Create an organization. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_orgs_with_http_info(organization, async_req=True) + >>> thread = api.post_orgs_with_http_info(post_organization_request, async_req=True) >>> result = thread.get() :param async_req bool - :param Organization organization: Organization to create (required) + :param PostOrganizationRequest post_organization_request: Organization to create (required) :param str zap_trace_span: OpenTracing span context :return: Organization If the method is called asynchronously, @@ -1175,7 +1175,7 @@ def post_orgs_with_http_info(self, organization, **kwargs): # noqa: E501,D401,D """ # noqa: E501 local_var_params = locals() - all_params = ['organization', 'zap_trace_span'] # noqa: E501 + all_params = ['post_organization_request', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1190,10 +1190,10 @@ def post_orgs_with_http_info(self, organization, **kwargs): # noqa: E501,D401,D ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'organization' is set - if ('organization' not in local_var_params or - local_var_params['organization'] is None): - raise ValueError("Missing the required parameter `organization` when calling `post_orgs`") # noqa: E501 + # verify the required parameter 'post_organization_request' is set + if ('post_organization_request' not in local_var_params or + local_var_params['post_organization_request'] is None): + raise ValueError("Missing the required parameter `post_organization_request` when calling `post_orgs`") # noqa: E501 collection_formats = {} @@ -1209,8 +1209,8 @@ def post_orgs_with_http_info(self, organization, **kwargs): # noqa: E501,D401,D local_var_files = {} body_params = None - if 'organization' in local_var_params: - body_params = local_var_params['organization'] + if 'post_organization_request' in local_var_params: + body_params = local_var_params['post_organization_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/influxdb_client/service/query_service.py b/influxdb_client/service/query_service.py index 8ec7d125..45625471 100644 --- a/influxdb_client/service/query_service.py +++ b/influxdb_client/service/query_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/ready_service.py b/influxdb_client/service/ready_service.py index 5b9fd761..81edeb37 100644 --- a/influxdb_client/service/ready_service.py +++ b/influxdb_client/service/ready_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/rules_service.py b/influxdb_client/service/rules_service.py index 221fac54..0ae274d6 100644 --- a/influxdb_client/service/rules_service.py +++ b/influxdb_client/service/rules_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/scraper_targets_service.py b/influxdb_client/service/scraper_targets_service.py index 28f3aee0..39bfbd3c 100644 --- a/influxdb_client/service/scraper_targets_service.py +++ b/influxdb_client/service/scraper_targets_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/secrets_service.py b/influxdb_client/service/secrets_service.py index 57790122..26df30fb 100644 --- a/influxdb_client/service/secrets_service.py +++ b/influxdb_client/service/secrets_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/setup_service.py b/influxdb_client/service/setup_service.py index ce0572f6..f28b913f 100644 --- a/influxdb_client/service/setup_service.py +++ b/influxdb_client/service/setup_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -241,113 +241,3 @@ def post_setup_with_http_info(self, onboarding_request, **kwargs): # noqa: E501 _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, urlopen_kw=urlopen_kw) - - def post_setup_user(self, onboarding_request, **kwargs): # noqa: E501,D401,D403 - """Set up a new user, org and bucket. - - Post an onboarding request to set up a new user, org and bucket. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_setup_user(onboarding_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OnboardingRequest onboarding_request: Source to create (required) - :param str zap_trace_span: OpenTracing span context - :return: OnboardingResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_setup_user_with_http_info(onboarding_request, **kwargs) # noqa: E501 - else: - (data) = self.post_setup_user_with_http_info(onboarding_request, **kwargs) # noqa: E501 - return data - - def post_setup_user_with_http_info(self, onboarding_request, **kwargs): # noqa: E501,D401,D403 - """Set up a new user, org and bucket. - - Post an onboarding request to set up a new user, org and bucket. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_setup_user_with_http_info(onboarding_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param OnboardingRequest onboarding_request: Source to create (required) - :param str zap_trace_span: OpenTracing span context - :return: OnboardingResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['onboarding_request', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_setup_user" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'onboarding_request' is set - if ('onboarding_request' not in local_var_params or - local_var_params['onboarding_request'] is None): - raise ValueError("Missing the required parameter `onboarding_request` when calling `post_setup_user`") # noqa: E501 - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'onboarding_request' in local_var_params: - body_params = local_var_params['onboarding_request'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/setup/user', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='OnboardingResponse', # 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, - urlopen_kw=urlopen_kw) diff --git a/influxdb_client/service/sources_service.py b/influxdb_client/service/sources_service.py index d1836a78..e83eb013 100644 --- a/influxdb_client/service/sources_service.py +++ b/influxdb_client/service/sources_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -671,7 +671,7 @@ def patch_sources_id_with_http_info(self, source_id, source, **kwargs): # noqa: urlopen_kw=urlopen_kw) def post_sources(self, source, **kwargs): # noqa: E501,D401,D403 - """Creates a source. + """Create a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -693,7 +693,7 @@ def post_sources(self, source, **kwargs): # noqa: E501,D401,D403 return data def post_sources_with_http_info(self, source, **kwargs): # noqa: E501,D401,D403 - """Creates a source. + """Create a source. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/influxdb_client/service/tasks_service.py b/influxdb_client/service/tasks_service.py index 4ecc4387..309756c2 100644 --- a/influxdb_client/service/tasks_service.py +++ b/influxdb_client/service/tasks_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -2282,6 +2282,7 @@ def post_tasks_id_runs_id_retry(self, task_id, run_id, **kwargs): # noqa: E501, :param str task_id: The task ID. (required) :param str run_id: The run ID. (required) :param str zap_trace_span: OpenTracing span context + :param str body: :return: Run If the method is called asynchronously, returns the request thread. @@ -2305,13 +2306,14 @@ def post_tasks_id_runs_id_retry_with_http_info(self, task_id, run_id, **kwargs): :param str task_id: The task ID. (required) :param str run_id: The run ID. (required) :param str zap_trace_span: OpenTracing span context + :param str body: :return: Run If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['task_id', 'run_id', 'zap_trace_span'] # noqa: E501 + all_params = ['task_id', 'run_id', 'zap_trace_span', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2353,10 +2355,16 @@ def post_tasks_id_runs_id_retry_with_http_info(self, task_id, run_id, **kwargs): local_var_files = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] # 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; charset=utf-8']) # noqa: E501 + # Authentication setting auth_settings = [] # noqa: E501 diff --git a/influxdb_client/service/telegrafs_service.py b/influxdb_client/service/telegrafs_service.py index 4e8caaec..5fca177a 100644 --- a/influxdb_client/service/telegrafs_service.py +++ b/influxdb_client/service/telegrafs_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/templates_service.py b/influxdb_client/service/templates_service.py index 0fa7a77e..e5583bc3 100644 --- a/influxdb_client/service/templates_service.py +++ b/influxdb_client/service/templates_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/users_service.py b/influxdb_client/service/users_service.py index c44e5744..2abe47ff 100644 --- a/influxdb_client/service/users_service.py +++ b/influxdb_client/service/users_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ @@ -34,17 +34,16 @@ def __init__(self, api_client=None): # noqa: E501,D401,D403 api_client = ApiClient() self.api_client = api_client - def delete_buckets_id_members_id(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a bucket. + def delete_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 + """Delete a user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_buckets_id_members_id(user_id, bucket_id, async_req=True) + >>> thread = api.delete_users_id(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str bucket_id: The bucket ID. (required) + :param str user_id: The ID of the user to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -52,22 +51,21 @@ def delete_buckets_id_members_id(self, user_id, bucket_id, **kwargs): # noqa: E """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_buckets_id_members_id_with_http_info(user_id, bucket_id, **kwargs) # noqa: E501 + return self.delete_users_id_with_http_info(user_id, **kwargs) # noqa: E501 else: - (data) = self.delete_buckets_id_members_id_with_http_info(user_id, bucket_id, **kwargs) # noqa: E501 + (data) = self.delete_users_id_with_http_info(user_id, **kwargs) # noqa: E501 return data - def delete_buckets_id_members_id_with_http_info(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a bucket. + def delete_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401,D403 + """Delete a user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_buckets_id_members_id_with_http_info(user_id, bucket_id, async_req=True) + >>> thread = api.delete_users_id_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str bucket_id: The bucket ID. (required) + :param str user_id: The ID of the user to delete. (required) :param str zap_trace_span: OpenTracing span context :return: None If the method is called asynchronously, @@ -75,7 +73,7 @@ def delete_buckets_id_members_id_with_http_info(self, user_id, bucket_id, **kwar """ # noqa: E501 local_var_params = locals() - all_params = ['user_id', 'bucket_id', 'zap_trace_span'] # noqa: E501 + all_params = ['user_id', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -86,26 +84,20 @@ def delete_buckets_id_members_id_with_http_info(self, user_id, bucket_id, **kwar if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_buckets_id_members_id" % key + " to method delete_users_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if ('user_id' not in local_var_params or local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_buckets_id_members_id`") # noqa: E501 - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `delete_buckets_id_members_id`") # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `delete_users_id`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 query_params = [] @@ -130,7 +122,7 @@ def delete_buckets_id_members_id_with_http_info(self, user_id, bucket_id, **kwar urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members/{userID}', 'DELETE', + '/api/v2/users/{userID}', 'DELETE', path_params, query_params, header_params, @@ -146,48 +138,44 @@ def delete_buckets_id_members_id_with_http_info(self, user_id, bucket_id, **kwar collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def delete_buckets_id_owners_id(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a bucket. + def get_flags(self, **kwargs): # noqa: E501,D401,D403 + """Return the feature flags for the currently authenticated user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_buckets_id_owners_id(user_id, bucket_id, async_req=True) + >>> thread = api.get_flags(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str bucket_id: The bucket ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: Flags If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, **kwargs) # noqa: E501 + return self.get_flags_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, **kwargs) # noqa: E501 + (data) = self.get_flags_with_http_info(**kwargs) # noqa: E501 return data - def delete_buckets_id_owners_id_with_http_info(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a bucket. + def get_flags_with_http_info(self, **kwargs): # noqa: E501,D401,D403 + """Return the feature flags for the currently authenticated user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, async_req=True) + >>> thread = api.get_flags_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str bucket_id: The bucket ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: Flags If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['user_id', 'bucket_id', 'zap_trace_span'] # noqa: E501 + all_params = ['zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -198,26 +186,14 @@ def delete_buckets_id_owners_id_with_http_info(self, user_id, bucket_id, **kwarg if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_buckets_id_owners_id" % key + " to method get_flags" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_buckets_id_owners_id`") # noqa: E501 - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `delete_buckets_id_owners_id`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 query_params = [] @@ -242,14 +218,14 @@ def delete_buckets_id_owners_id_with_http_info(self, user_id, bucket_id, **kwarg urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners/{userID}', 'DELETE', + '/api/v2/flags', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Flags', # 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 @@ -258,48 +234,44 @@ def delete_buckets_id_owners_id_with_http_info(self, user_id, bucket_id, **kwarg collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def delete_dashboards_id_members_id(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a dashboard. + def get_me(self, **kwargs): # noqa: E501,D401,D403 + """Return the current authenticated user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_dashboards_id_members_id(user_id, dashboard_id, async_req=True) + >>> thread = api.get_me(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str dashboard_id: The dashboard ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_dashboards_id_members_id_with_http_info(user_id, dashboard_id, **kwargs) # noqa: E501 + return self.get_me_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.delete_dashboards_id_members_id_with_http_info(user_id, dashboard_id, **kwargs) # noqa: E501 + (data) = self.get_me_with_http_info(**kwargs) # noqa: E501 return data - def delete_dashboards_id_members_id_with_http_info(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a dashboard. + def get_me_with_http_info(self, **kwargs): # noqa: E501,D401,D403 + """Return the current authenticated user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_dashboards_id_members_id_with_http_info(user_id, dashboard_id, async_req=True) + >>> thread = api.get_me_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str dashboard_id: The dashboard ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['user_id', 'dashboard_id', 'zap_trace_span'] # noqa: E501 + all_params = ['zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -310,26 +282,14 @@ def delete_dashboards_id_members_id_with_http_info(self, user_id, dashboard_id, if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_dashboards_id_members_id" % key + " to method get_me" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_dashboards_id_members_id`") # noqa: E501 - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `delete_dashboards_id_members_id`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 query_params = [] @@ -354,14 +314,14 @@ def delete_dashboards_id_members_id_with_http_info(self, user_id, dashboard_id, urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members/{userID}', 'DELETE', + '/api/v2/me', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='UserResponse', # 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 @@ -370,48 +330,54 @@ def delete_dashboards_id_members_id_with_http_info(self, user_id, dashboard_id, collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def delete_dashboards_id_owners_id(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a dashboard. + def get_users(self, **kwargs): # noqa: E501,D401,D403 + """List all users. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_dashboards_id_owners_id(user_id, dashboard_id, async_req=True) + >>> thread = api.get_users(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str dashboard_id: The dashboard ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :param int offset: + :param int limit: + :param str after: The last resource ID from which to seek from (but not including). This is to be used instead of `offset`. + :param str name: + :param str id: + :return: Users If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_dashboards_id_owners_id_with_http_info(user_id, dashboard_id, **kwargs) # noqa: E501 + return self.get_users_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.delete_dashboards_id_owners_id_with_http_info(user_id, dashboard_id, **kwargs) # noqa: E501 + (data) = self.get_users_with_http_info(**kwargs) # noqa: E501 return data - def delete_dashboards_id_owners_id_with_http_info(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a dashboard. + def get_users_with_http_info(self, **kwargs): # noqa: E501,D401,D403 + """List all users. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_dashboards_id_owners_id_with_http_info(user_id, dashboard_id, async_req=True) + >>> thread = api.get_users_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str dashboard_id: The dashboard ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :param int offset: + :param int limit: + :param str after: The last resource ID from which to seek from (but not including). This is to be used instead of `offset`. + :param str name: + :param str id: + :return: Users If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['user_id', 'dashboard_id', 'zap_trace_span'] # noqa: E501 + all_params = ['zap_trace_span', 'offset', 'limit', 'after', 'name', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -422,28 +388,32 @@ def delete_dashboards_id_owners_id_with_http_info(self, user_id, dashboard_id, * if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_dashboards_id_owners_id" % key + " to method get_users" % key ) local_var_params[key] = val del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_dashboards_id_owners_id`") # noqa: E501 - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `delete_dashboards_id_owners_id`") # noqa: E501 + if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 + raise ValueError("Invalid value for parameter `offset` when calling `get_users`, must be a value greater than or equal to `0`") # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `get_users`, must be a value less than or equal to `100`") # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] < 1: # noqa: E501 + raise ValueError("Invalid value for parameter `limit` when calling `get_users`, must be a value greater than or equal to `1`") # noqa: E501 collection_formats = {} path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) # noqa: E501 + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'after' in local_var_params: + query_params.append(('after', local_var_params['after'])) # noqa: E501 + if 'name' in local_var_params: + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'id' in local_var_params: + query_params.append(('id', local_var_params['id'])) # noqa: E501 header_params = {} if 'zap_trace_span' in local_var_params: @@ -466,14 +436,14 @@ def delete_dashboards_id_owners_id_with_http_info(self, user_id, dashboard_id, * urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners/{userID}', 'DELETE', + '/api/v2/users', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Users', # 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 @@ -482,48 +452,46 @@ def delete_dashboards_id_owners_id_with_http_info(self, user_id, dashboard_id, * collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def delete_orgs_id_members_id(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from an organization. + def get_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 + """Retrieve a user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_orgs_id_members_id(user_id, org_id, async_req=True) + >>> thread = api.get_users_id(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str org_id: The organization ID. (required) + :param str user_id: The user ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_orgs_id_members_id_with_http_info(user_id, org_id, **kwargs) # noqa: E501 + return self.get_users_id_with_http_info(user_id, **kwargs) # noqa: E501 else: - (data) = self.delete_orgs_id_members_id_with_http_info(user_id, org_id, **kwargs) # noqa: E501 + (data) = self.get_users_id_with_http_info(user_id, **kwargs) # noqa: E501 return data - def delete_orgs_id_members_id_with_http_info(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from an organization. + def get_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401,D403 + """Retrieve a user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_orgs_id_members_id_with_http_info(user_id, org_id, async_req=True) + >>> thread = api.get_users_id_with_http_info(user_id, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str org_id: The organization ID. (required) + :param str user_id: The user ID. (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['user_id', 'org_id', 'zap_trace_span'] # noqa: E501 + all_params = ['user_id', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -534,26 +502,20 @@ def delete_orgs_id_members_id_with_http_info(self, user_id, org_id, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_orgs_id_members_id" % key + " to method get_users_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if ('user_id' not in local_var_params or local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_orgs_id_members_id`") # noqa: E501 - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `delete_orgs_id_members_id`") # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `get_users_id`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 query_params = [] @@ -578,14 +540,14 @@ def delete_orgs_id_members_id_with_http_info(self, user_id, org_id, **kwargs): urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/orgs/{orgID}/members/{userID}', 'DELETE', + '/api/v2/users/{userID}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='UserResponse', # 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 @@ -594,48 +556,48 @@ def delete_orgs_id_members_id_with_http_info(self, user_id, org_id, **kwargs): collection_formats=collection_formats, urlopen_kw=urlopen_kw) - def delete_orgs_id_owners_id(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from an organization. + def patch_users_id(self, user_id, user, **kwargs): # noqa: E501,D401,D403 + """Update a user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_orgs_id_owners_id(user_id, org_id, async_req=True) + >>> thread = api.patch_users_id(user_id, user, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str org_id: The organization ID. (required) + :param str user_id: The ID of the user to update. (required) + :param User user: User update to apply (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.delete_orgs_id_owners_id_with_http_info(user_id, org_id, **kwargs) # noqa: E501 + return self.patch_users_id_with_http_info(user_id, user, **kwargs) # noqa: E501 else: - (data) = self.delete_orgs_id_owners_id_with_http_info(user_id, org_id, **kwargs) # noqa: E501 + (data) = self.patch_users_id_with_http_info(user_id, user, **kwargs) # noqa: E501 return data - def delete_orgs_id_owners_id_with_http_info(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from an organization. + def patch_users_id_with_http_info(self, user_id, user, **kwargs): # noqa: E501,D401,D403 + """Update a user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_orgs_id_owners_id_with_http_info(user_id, org_id, async_req=True) + >>> thread = api.patch_users_id_with_http_info(user_id, user, async_req=True) >>> result = thread.get() :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str org_id: The organization ID. (required) + :param str user_id: The ID of the user to update. (required) + :param User user: User update to apply (required) :param str zap_trace_span: OpenTracing span context - :return: None + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 local_var_params = locals() - all_params = ['user_id', 'org_id', 'zap_trace_span'] # noqa: E501 + all_params = ['user_id', 'user', 'zap_trace_span'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -646,26 +608,24 @@ def delete_orgs_id_owners_id_with_http_info(self, user_id, org_id, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method delete_orgs_id_owners_id" % key + " to method patch_users_id" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'user_id' is set if ('user_id' not in local_var_params or local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_orgs_id_owners_id`") # noqa: E501 - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `delete_orgs_id_owners_id`") # noqa: E501 + raise ValueError("Missing the required parameter `user_id` when calling `patch_users_id`") # noqa: E501 + # verify the required parameter 'user' is set + if ('user' not in local_var_params or + local_var_params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `patch_users_id`") # noqa: E501 collection_formats = {} path_params = {} if 'user_id' in local_var_params: path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 query_params = [] @@ -677,120 +637,14 @@ def delete_orgs_id_owners_id_with_http_info(self, user_id, org_id, **kwargs): # local_var_files = {} body_params = None + if 'user' in local_var_params: + body_params = local_var_params['user'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def delete_scrapers_id_members_id(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_scrapers_id_members_id(user_id, scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of member to remove. (required) - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_scrapers_id_members_id_with_http_info(user_id, scraper_target_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_scrapers_id_members_id_with_http_info(user_id, scraper_target_id, **kwargs) # noqa: E501 - return data - - def delete_scrapers_id_members_id_with_http_info(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_scrapers_id_members_id_with_http_info(user_id, scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of member to remove. (required) - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'scraper_target_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 delete_scrapers_id_members_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_scrapers_id_members_id`") # noqa: E501 - # verify the required parameter 'scraper_target_id' is set - if ('scraper_target_id' not in local_var_params or - local_var_params['scraper_target_id'] is None): - raise ValueError("Missing the required parameter `scraper_target_id` when calling `delete_scrapers_id_members_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'scraper_target_id' in local_var_params: - path_params['scraperTargetID'] = local_var_params['scraper_target_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting @@ -802,3730 +656,14 @@ def delete_scrapers_id_members_id_with_http_info(self, user_id, scraper_target_i urlopen_kw = kwargs['urlopen_kw'] return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def delete_scrapers_id_owners_id(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_scrapers_id_owners_id(user_id, scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of owner to remove. (required) - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_scrapers_id_owners_id_with_http_info(user_id, scraper_target_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_scrapers_id_owners_id_with_http_info(user_id, scraper_target_id, **kwargs) # noqa: E501 - return data - - def delete_scrapers_id_owners_id_with_http_info(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_scrapers_id_owners_id_with_http_info(user_id, scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of owner to remove. (required) - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'scraper_target_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 delete_scrapers_id_owners_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_scrapers_id_owners_id`") # noqa: E501 - # verify the required parameter 'scraper_target_id' is set - if ('scraper_target_id' not in local_var_params or - local_var_params['scraper_target_id'] is None): - raise ValueError("Missing the required parameter `scraper_target_id` when calling `delete_scrapers_id_owners_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'scraper_target_id' in local_var_params: - path_params['scraperTargetID'] = local_var_params['scraper_target_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def delete_tasks_id_members_id(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tasks_id_members_id(user_id, task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_tasks_id_members_id_with_http_info(user_id, task_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_tasks_id_members_id_with_http_info(user_id, task_id, **kwargs) # noqa: E501 - return data - - def delete_tasks_id_members_id_with_http_info(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tasks_id_members_id_with_http_info(user_id, task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'task_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 delete_tasks_id_members_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_tasks_id_members_id`") # noqa: E501 - # verify the required parameter 'task_id' is set - if ('task_id' not in local_var_params or - local_var_params['task_id'] is None): - raise ValueError("Missing the required parameter `task_id` when calling `delete_tasks_id_members_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def delete_tasks_id_owners_id(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tasks_id_owners_id(user_id, task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_tasks_id_owners_id_with_http_info(user_id, task_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_tasks_id_owners_id_with_http_info(user_id, task_id, **kwargs) # noqa: E501 - return data - - def delete_tasks_id_owners_id_with_http_info(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_tasks_id_owners_id_with_http_info(user_id, task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'task_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 delete_tasks_id_owners_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_tasks_id_owners_id`") # noqa: E501 - # verify the required parameter 'task_id' is set - if ('task_id' not in local_var_params or - local_var_params['task_id'] is None): - raise ValueError("Missing the required parameter `task_id` when calling `delete_tasks_id_owners_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def delete_telegrafs_id_members_id(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_telegrafs_id_members_id(user_id, telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_telegrafs_id_members_id_with_http_info(user_id, telegraf_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_telegrafs_id_members_id_with_http_info(user_id, telegraf_id, **kwargs) # noqa: E501 - return data - - def delete_telegrafs_id_members_id_with_http_info(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_telegrafs_id_members_id_with_http_info(user_id, telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the member to remove. (required) - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'telegraf_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 delete_telegrafs_id_members_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_telegrafs_id_members_id`") # noqa: E501 - # verify the required parameter 'telegraf_id' is set - if ('telegraf_id' not in local_var_params or - local_var_params['telegraf_id'] is None): - raise ValueError("Missing the required parameter `telegraf_id` when calling `delete_telegrafs_id_members_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'telegraf_id' in local_var_params: - path_params['telegrafID'] = local_var_params['telegraf_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def delete_telegrafs_id_owners_id(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_telegrafs_id_owners_id(user_id, telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_telegrafs_id_owners_id_with_http_info(user_id, telegraf_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_telegrafs_id_owners_id_with_http_info(user_id, telegraf_id, **kwargs) # noqa: E501 - return data - - def delete_telegrafs_id_owners_id_with_http_info(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_telegrafs_id_owners_id_with_http_info(user_id, telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'telegraf_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 delete_telegrafs_id_owners_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_telegrafs_id_owners_id`") # noqa: E501 - # verify the required parameter 'telegraf_id' is set - if ('telegraf_id' not in local_var_params or - local_var_params['telegraf_id'] is None): - raise ValueError("Missing the required parameter `telegraf_id` when calling `delete_telegrafs_id_owners_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - if 'telegraf_id' in local_var_params: - path_params['telegrafID'] = local_var_params['telegraf_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def delete_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Delete a user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_users_id(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to delete. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.delete_users_id_with_http_info(user_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_users_id_with_http_info(user_id, **kwargs) # noqa: E501 - return data - - def delete_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Delete a user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_users_id_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to delete. (required) - :param str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 delete_users_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `delete_users_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/users/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type=None, # 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, - urlopen_kw=urlopen_kw) - - def get_buckets_id_members(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_members(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_buckets_id_members_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.get_buckets_id_members_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def get_buckets_id_members_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_members_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_buckets_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `get_buckets_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMembers', # 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, - urlopen_kw=urlopen_kw) - - def get_buckets_id_owners(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_owners(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_buckets_id_owners_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.get_buckets_id_owners_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def get_buckets_id_owners_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_id_owners_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_buckets_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `get_buckets_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwners', # 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, - urlopen_kw=urlopen_kw) - - def get_dashboards_id_members(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """List all dashboard members. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_members(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_dashboards_id_members_with_http_info(dashboard_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_members_with_http_info(dashboard_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_members_with_http_info(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """List all dashboard members. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_members_with_http_info(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_dashboards_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `get_dashboards_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMembers', # 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, - urlopen_kw=urlopen_kw) - - def get_dashboards_id_owners(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """List all dashboard owners. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_owners(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_dashboards_id_owners_with_http_info(dashboard_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_owners_with_http_info(dashboard_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_owners_with_http_info(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """List all dashboard owners. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_id_owners_with_http_info(dashboard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_dashboards_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `get_dashboards_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwners', # 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, - urlopen_kw=urlopen_kw) - - def get_me(self, **kwargs): # noqa: E501,D401,D403 - """Return the current authenticated user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_me(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: User - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_me_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_me_with_http_info(**kwargs) # noqa: E501 - return data - - def get_me_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Return the current authenticated user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_me_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: User - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_me" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/me', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='User', # 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, - urlopen_kw=urlopen_kw) - - def get_orgs_id_members(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all members of an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_members(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_orgs_id_members_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_orgs_id_members_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_orgs_id_members_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all members of an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_members_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_orgs_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `get_orgs_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMembers', # 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, - urlopen_kw=urlopen_kw) - - def get_orgs_id_owners(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_owners(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_orgs_id_owners_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_orgs_id_owners_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_orgs_id_owners_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_id_owners_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_orgs_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `get_orgs_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwners', # 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, - urlopen_kw=urlopen_kw) - - def get_scrapers_id_members(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scrapers_id_members(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_scrapers_id_members_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - else: - (data) = self.get_scrapers_id_members_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - return data - - def get_scrapers_id_members_with_http_info(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scrapers_id_members_with_http_info(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['scraper_target_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_scrapers_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'scraper_target_id' is set - if ('scraper_target_id' not in local_var_params or - local_var_params['scraper_target_id'] is None): - raise ValueError("Missing the required parameter `scraper_target_id` when calling `get_scrapers_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'scraper_target_id' in local_var_params: - path_params['scraperTargetID'] = local_var_params['scraper_target_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMembers', # 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, - urlopen_kw=urlopen_kw) - - def get_scrapers_id_owners(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scrapers_id_owners(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_scrapers_id_owners_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - else: - (data) = self.get_scrapers_id_owners_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - return data - - def get_scrapers_id_owners_with_http_info(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scrapers_id_owners_with_http_info(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['scraper_target_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_scrapers_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'scraper_target_id' is set - if ('scraper_target_id' not in local_var_params or - local_var_params['scraper_target_id'] is None): - raise ValueError("Missing the required parameter `scraper_target_id` when calling `get_scrapers_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'scraper_target_id' in local_var_params: - path_params['scraperTargetID'] = local_var_params['scraper_target_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwners', # 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, - urlopen_kw=urlopen_kw) - - def get_tasks_id_members(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all task members. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tasks_id_members(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_tasks_id_members_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_members_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_members_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all task members. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tasks_id_members_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_tasks_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task_id' is set - if ('task_id' not in local_var_params or - local_var_params['task_id'] is None): - raise ValueError("Missing the required parameter `task_id` when calling `get_tasks_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMembers', # 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, - urlopen_kw=urlopen_kw) - - def get_tasks_id_owners(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tasks_id_owners(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_tasks_id_owners_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_owners_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_owners_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tasks_id_owners_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_tasks_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task_id' is set - if ('task_id' not in local_var_params or - local_var_params['task_id'] is None): - raise ValueError("Missing the required parameter `task_id` when calling `get_tasks_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwners', # 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, - urlopen_kw=urlopen_kw) - - def get_telegrafs_id_members(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_telegrafs_id_members(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_telegrafs_id_members_with_http_info(telegraf_id, **kwargs) # noqa: E501 - else: - (data) = self.get_telegrafs_id_members_with_http_info(telegraf_id, **kwargs) # noqa: E501 - return data - - def get_telegrafs_id_members_with_http_info(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_telegrafs_id_members_with_http_info(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMembers - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['telegraf_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_telegrafs_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'telegraf_id' is set - if ('telegraf_id' not in local_var_params or - local_var_params['telegraf_id'] is None): - raise ValueError("Missing the required parameter `telegraf_id` when calling `get_telegrafs_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'telegraf_id' in local_var_params: - path_params['telegrafID'] = local_var_params['telegraf_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMembers', # 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, - urlopen_kw=urlopen_kw) - - def get_telegrafs_id_owners(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_telegrafs_id_owners(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_telegrafs_id_owners_with_http_info(telegraf_id, **kwargs) # noqa: E501 - else: - (data) = self.get_telegrafs_id_owners_with_http_info(telegraf_id, **kwargs) # noqa: E501 - return data - - def get_telegrafs_id_owners_with_http_info(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_telegrafs_id_owners_with_http_info(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwners - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['telegraf_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_telegrafs_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'telegraf_id' is set - if ('telegraf_id' not in local_var_params or - local_var_params['telegraf_id'] is None): - raise ValueError("Missing the required parameter `telegraf_id` when calling `get_telegrafs_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'telegraf_id' in local_var_params: - path_params['telegrafID'] = local_var_params['telegraf_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwners', # 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, - urlopen_kw=urlopen_kw) - - def get_users(self, **kwargs): # noqa: E501,D401,D403 - """List all users. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Users - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_users_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_users_with_http_info(**kwargs) # noqa: E501 - return data - - def get_users_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all users. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Users - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_users" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/users', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='Users', # 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, - urlopen_kw=urlopen_kw) - - def get_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_id(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The user ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: User - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.get_users_id_with_http_info(user_id, **kwargs) # noqa: E501 - else: - (data) = self.get_users_id_with_http_info(user_id, **kwargs) # noqa: E501 - return data - - def get_users_id_with_http_info(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_users_id_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The user ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: User - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 get_users_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `get_users_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # Authentication setting - auth_settings = [] # noqa: E501 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/users/{userID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='User', # 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, - urlopen_kw=urlopen_kw) - - def patch_users_id(self, user_id, user, **kwargs): # noqa: E501,D401,D403 - """Update a user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_users_id(user_id, user, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to update. (required) - :param User user: User update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: User - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.patch_users_id_with_http_info(user_id, user, **kwargs) # noqa: E501 - else: - (data) = self.patch_users_id_with_http_info(user_id, user, **kwargs) # noqa: E501 - return data - - def patch_users_id_with_http_info(self, user_id, user, **kwargs): # noqa: E501,D401,D403 - """Update a user. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_users_id_with_http_info(user_id, user, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to update. (required) - :param User user: User update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: User - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['user_id', 'user', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 patch_users_id" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'user_id' is set - if ('user_id' not in local_var_params or - local_var_params['user_id'] is None): - raise ValueError("Missing the required parameter `user_id` when calling `patch_users_id`") # noqa: E501 - # verify the required parameter 'user' is set - if ('user' not in local_var_params or - local_var_params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `patch_users_id`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'user_id' in local_var_params: - path_params['userID'] = local_var_params['user_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'user' in local_var_params: - body_params = local_var_params['user'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/users/{userID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='User', # 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, - urlopen_kw=urlopen_kw) - - def post_buckets_id_members(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets_id_members(bucket_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_buckets_id_members_with_http_info(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['bucket_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_buckets_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `post_buckets_id_members`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_buckets_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMember', # 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, - urlopen_kw=urlopen_kw) - - def post_buckets_id_owners(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets_id_owners(bucket_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_buckets_id_owners_with_http_info(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a bucket. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['bucket_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_buckets_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'bucket_id' is set - if ('bucket_id' not in local_var_params or - local_var_params['bucket_id'] is None): - raise ValueError("Missing the required parameter `bucket_id` when calling `post_buckets_id_owners`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_buckets_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwner', # 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, - urlopen_kw=urlopen_kw) - - def post_dashboards_id_members(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a dashboard. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_dashboards_id_members(dashboard_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_dashboards_id_members_with_http_info(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_dashboards_id_members_with_http_info(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_dashboards_id_members_with_http_info(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a dashboard. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_dashboards_id_members_with_http_info(dashboard_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['dashboard_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_dashboards_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `post_dashboards_id_members`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_dashboards_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMember', # 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, - urlopen_kw=urlopen_kw) - - def post_dashboards_id_owners(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a dashboard. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_dashboards_id_owners(dashboard_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_dashboards_id_owners_with_http_info(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_dashboards_id_owners_with_http_info(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_dashboards_id_owners_with_http_info(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a dashboard. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_dashboards_id_owners_with_http_info(dashboard_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['dashboard_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_dashboards_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'dashboard_id' is set - if ('dashboard_id' not in local_var_params or - local_var_params['dashboard_id'] is None): - raise ValueError("Missing the required parameter `dashboard_id` when calling `post_dashboards_id_owners`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_dashboards_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwner', # 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, - urlopen_kw=urlopen_kw) - - def post_orgs_id_members(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_orgs_id_members(org_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_orgs_id_members_with_http_info(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_orgs_id_members_with_http_info(org_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['org_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_orgs_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `post_orgs_id_members`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_orgs_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMember', # 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, - urlopen_kw=urlopen_kw) - - def post_orgs_id_owners(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_orgs_id_owners(org_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_orgs_id_owners_with_http_info(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to an organization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_orgs_id_owners_with_http_info(org_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['org_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_orgs_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'org_id' is set - if ('org_id' not in local_var_params or - local_var_params['org_id'] is None): - raise ValueError("Missing the required parameter `org_id` when calling `post_orgs_id_owners`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_orgs_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwner', # 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, - urlopen_kw=urlopen_kw) - - def post_scrapers_id_members(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scrapers_id_members(scraper_target_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_scrapers_id_members_with_http_info(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_scrapers_id_members_with_http_info(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_scrapers_id_members_with_http_info(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scrapers_id_members_with_http_info(scraper_target_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['scraper_target_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_scrapers_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'scraper_target_id' is set - if ('scraper_target_id' not in local_var_params or - local_var_params['scraper_target_id'] is None): - raise ValueError("Missing the required parameter `scraper_target_id` when calling `post_scrapers_id_members`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_scrapers_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'scraper_target_id' in local_var_params: - path_params['scraperTargetID'] = local_var_params['scraper_target_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMember', # 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, - urlopen_kw=urlopen_kw) - - def post_scrapers_id_owners(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scrapers_id_owners(scraper_target_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_scrapers_id_owners_with_http_info(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_scrapers_id_owners_with_http_info(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_scrapers_id_owners_with_http_info(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a scraper target. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scrapers_id_owners_with_http_info(scraper_target_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['scraper_target_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_scrapers_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'scraper_target_id' is set - if ('scraper_target_id' not in local_var_params or - local_var_params['scraper_target_id'] is None): - raise ValueError("Missing the required parameter `scraper_target_id` when calling `post_scrapers_id_owners`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_scrapers_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'scraper_target_id' in local_var_params: - path_params['scraperTargetID'] = local_var_params['scraper_target_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwner', # 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, - urlopen_kw=urlopen_kw) - - def post_tasks_id_members(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_tasks_id_members(task_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_tasks_id_members_with_http_info(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_tasks_id_members_with_http_info(task_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['task_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_tasks_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task_id' is set - if ('task_id' not in local_var_params or - local_var_params['task_id'] is None): - raise ValueError("Missing the required parameter `task_id` when calling `post_tasks_id_members`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_tasks_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMember', # 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, - urlopen_kw=urlopen_kw) - - def post_tasks_id_owners(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_tasks_id_owners(task_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_tasks_id_owners_with_http_info(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a task. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_tasks_id_owners_with_http_info(task_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['task_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_tasks_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'task_id' is set - if ('task_id' not in local_var_params or - local_var_params['task_id'] is None): - raise ValueError("Missing the required parameter `task_id` when calling `post_tasks_id_owners`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_tasks_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceOwner', # 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, - urlopen_kw=urlopen_kw) - - def post_telegrafs_id_members(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_telegrafs_id_members(telegraf_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_telegrafs_id_members_with_http_info(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_telegrafs_id_members_with_http_info(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_telegrafs_id_members_with_http_info(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_telegrafs_id_members_with_http_info(telegraf_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as member (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceMember - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['telegraf_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_telegrafs_id_members" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'telegraf_id' is set - if ('telegraf_id' not in local_var_params or - local_var_params['telegraf_id'] is None): - raise ValueError("Missing the required parameter `telegraf_id` when calling `post_telegrafs_id_members`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_telegrafs_id_members`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'telegraf_id' in local_var_params: - path_params['telegrafID'] = local_var_params['telegraf_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=form_params, - files=local_var_files, - response_type='ResourceMember', # 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, - urlopen_kw=urlopen_kw) - - def post_telegrafs_id_owners(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_telegrafs_id_owners(telegraf_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_telegrafs_id_owners_with_http_info(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - else: - (data) = self.post_telegrafs_id_owners_with_http_info(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - return data - - def post_telegrafs_id_owners_with_http_info(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a Telegraf config. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_telegrafs_id_owners_with_http_info(telegraf_id, add_resource_member_request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: User to add as owner (required) - :param str zap_trace_span: OpenTracing span context - :return: ResourceOwner - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params = locals() - - all_params = ['telegraf_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') - all_params.append('urlopen_kw') - - 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 post_telegrafs_id_owners" % key - ) - local_var_params[key] = val - del local_var_params['kwargs'] - # verify the required parameter 'telegraf_id' is set - if ('telegraf_id' not in local_var_params or - local_var_params['telegraf_id'] is None): - raise ValueError("Missing the required parameter `telegraf_id` when calling `post_telegrafs_id_owners`") # noqa: E501 - # verify the required parameter 'add_resource_member_request_body' is set - if ('add_resource_member_request_body' not in local_var_params or - local_var_params['add_resource_member_request_body'] is None): - raise ValueError("Missing the required parameter `add_resource_member_request_body` when calling `post_telegrafs_id_owners`") # noqa: E501 - - collection_formats = {} - - path_params = {} - if 'telegraf_id' in local_var_params: - path_params['telegrafID'] = local_var_params['telegraf_id'] # noqa: E501 - - query_params = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - form_params = [] - local_var_files = {} - - body_params = None - if 'add_resource_member_request_body' in local_var_params: - body_params = local_var_params['add_resource_member_request_body'] - # 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 - - # urlopen optional setting - urlopen_kw = None - if 'urlopen_kw' in kwargs: - urlopen_kw = kwargs['urlopen_kw'] - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners', 'POST', + '/api/v2/users/{userID}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ResourceOwner', # noqa: E501 + response_type='UserResponse', # 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 @@ -4545,7 +683,7 @@ def post_users(self, user, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param User user: User to create (required) :param str zap_trace_span: OpenTracing span context - :return: User + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -4567,7 +705,7 @@ def post_users_with_http_info(self, user, **kwargs): # noqa: E501,D401,D403 :param async_req bool :param User user: User to create (required) :param str zap_trace_span: OpenTracing span context - :return: User + :return: UserResponse If the method is called asynchronously, returns the request thread. """ # noqa: E501 @@ -4633,7 +771,7 @@ def post_users_with_http_info(self, user, **kwargs): # noqa: E501,D401,D403 body=body_params, post_params=form_params, files=local_var_files, - response_type='User', # noqa: E501 + response_type='UserResponse', # 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 diff --git a/influxdb_client/service/variables_service.py b/influxdb_client/service/variables_service.py index 192a3140..f1705a32 100644 --- a/influxdb_client/service/variables_service.py +++ b/influxdb_client/service/variables_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/views_service.py b/influxdb_client/service/views_service.py index 0b388be1..47a2ee5e 100644 --- a/influxdb_client/service/views_service.py +++ b/influxdb_client/service/views_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ diff --git a/influxdb_client/service/write_service.py b/influxdb_client/service/write_service.py index 15fd030a..eca85b09 100644 --- a/influxdb_client/service/write_service.py +++ b/influxdb_client/service/write_service.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -Influx API Service. +Influx OSS API Service. No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 -OpenAPI spec version: 0.1.0 +OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """