diff --git a/README.md b/README.md index 82d43c9a3..63c13b79f 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,8 @@ We have detailed instructions for [how to install the harness and device in a ca [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/FrogAi/FrogPilot) [![Discord](https://img.shields.io/discord/1137853399715549214?label=Discord)](https://discord.frogpilot.com) -[![Last Updated](https://img.shields.io/badge/Last%20Updated-December%2020th%2C%202025-brightgreen)](https://github.com/FrogAi/FrogPilot/releases/latest) -[![Wiki](https://img.shields.io/badge/Wiki-FrogPilot-blue?logo=wiki)](https://frogpilot.wiki.gg/) +[![Last Updated](https://img.shields.io/badge/Last%20Updated-February%2028th%2C%202025-brightgreen)](https://github.com/FrogAi/FrogPilot/releases/latest) +[![Wiki](https://img.shields.io/badge/Wiki-FrogPilot-blue?logo=wiki)](https://frogpilot.com/wiki/) diff --git a/cereal/custom.capnp b/cereal/custom.capnp index 8876020eb..f05d3297c 100644 --- a/cereal/custom.capnp +++ b/cereal/custom.capnp @@ -123,10 +123,11 @@ struct FrogPilotCarState @0xda96579883444c35 { distanceVeryLongPressed @8 :Bool; ecoGear @9 :Bool; forceCoast @10 :Bool; - pauseLateral @11 :Bool; - pauseLongitudinal @12 :Bool; - sportGear @13 :Bool; - trafficModeEnabled @14 :Bool; + isParked @11 :Bool; + pauseLateral @12 :Bool; + pauseLongitudinal @13 :Bool; + sportGear @14 :Bool; + trafficModeEnabled @15 :Bool; struct ButtonEvent { enum Type { diff --git a/common/params.cc b/common/params.cc index 2d412419c..241065e91 100644 --- a/common/params.cc +++ b/common/params.cc @@ -333,6 +333,7 @@ std::unordered_map keys = { {"ForceStops", PERSISTENT}, {"ForceTorqueController", PERSISTENT}, {"FPSCounter", PERSISTENT}, + {"FrogPilotApiToken", PERSISTENT | DONT_LOG}, {"FrogPilotCarParams", CLEAR_ON_MANAGER_START | CLEAR_ON_ONROAD_TRANSITION}, {"FrogPilotCarParamsPersistent", PERSISTENT}, {"FrogPilotDongleId", PERSISTENT | DONT_LOG}, diff --git a/common/params_pyx.pyx b/common/params_pyx.pyx index ddce5103b..9362015df 100644 --- a/common/params_pyx.pyx +++ b/common/params_pyx.pyx @@ -13,6 +13,9 @@ cdef extern from "common/params.h": DEVELOPMENT_ONLY ALL + # FrogPilot variables + DONT_LOG + cdef cppclass c_Params "Params": c_Params(string) except + nogil string get(string, bool) nogil @@ -33,6 +36,9 @@ cdef extern from "common/params.h": void clearAll(ParamKeyType) vector[string] allKeys() + # FrogPilot variables + ParamKeyType getKeyType(string) nogil + def ensure_bytes(v): return v.encode() if isinstance(v, str) else v @@ -156,3 +162,7 @@ cdef class Params: def all_keys(self): return self.p.allKeys() + + # FrogPilot variables + def get_key_flag(self, key): + return self.p.getKeyType(self.check_key(key)) diff --git a/frogpilot/assets/theme_manager.py b/frogpilot/assets/theme_manager.py index d7ddfa4c4..014743809 100644 --- a/frogpilot/assets/theme_manager.py +++ b/frogpilot/assets/theme_manager.py @@ -262,13 +262,8 @@ class ThemeManager: if "~" in base: base, creator = base.split("~", 1) - parts = base.replace("_", "-").split("-") - capitalized_parts = [part.capitalize() for part in parts if part] - - if len(capitalized_parts) > 1 and component != "steering_wheels": - display = f"{capitalized_parts[0]} ({' '.join(capitalized_parts[1:])})" - else: - display = " ".join(capitalized_parts) + parts = base.replace("_", " ").replace("-", " ").split() + display = " ".join(part.capitalize() for part in parts) if creator: return f"{display} - by: {creator}" diff --git a/frogpilot/common/frogpilot_functions.py b/frogpilot/common/frogpilot_functions.py index 1dbf5a242..49c0acd98 100644 --- a/frogpilot/common/frogpilot_functions.py +++ b/frogpilot/common/frogpilot_functions.py @@ -1,12 +1,11 @@ #!/usr/bin/env python3 +import dataclasses import datetime import filecmp import glob import json -import os -import random +import requests import shutil -import string import subprocess import tarfile import threading @@ -23,9 +22,9 @@ from openpilot.system.hardware import HARDWARE from openpilot.frogpilot.assets.model_manager import ModelManager from openpilot.frogpilot.assets.theme_manager import ThemeManager -from openpilot.frogpilot.common.frogpilot_utilities import delete_file, run_cmd, use_konik_server +from openpilot.frogpilot.common.frogpilot_utilities import delete_file, is_url_pingable, run_cmd, run_thread_with_lock, use_konik_server from openpilot.frogpilot.common.frogpilot_variables import ( - ERROR_LOGS_PATH, EXCLUDED_KEYS, HD_LOGS_PATH, KONIK_LOGS_PATH, MODELS_PATH, SCREEN_RECORDINGS_PATH, + ERROR_LOGS_PATH, EXCLUDED_KEYS, FROGPILOT_API, HD_LOGS_PATH, KONIK_LOGS_PATH, MODELS_PATH, SCREEN_RECORDINGS_PATH, THEME_SAVE_PATH, VIDEO_CACHE_PATH, FrogPilotVariables, frogpilot_default_params, get_frogpilot_toggles, params ) from openpilot.frogpilot.system.frogpilot_stats import send_stats @@ -112,7 +111,8 @@ def backup_toggles(params_cache): params_backup.put(key, new_value) params_cache.put(key, new_value) - changes_found = key not in EXCLUDED_KEYS + if key not in EXCLUDED_KEYS: + changes_found = True backup_path = Path("/data/toggle_backups") maximum_backups = 5 @@ -166,10 +166,7 @@ def frogpilot_boot_functions(build_metadata, params_cache): elif params.get("DongleId", encoding="utf8") == params.get("KonikDongleId", encoding="utf8"): params.remove("DongleId") - if params.get("FrogPilotDongleId", encoding="utf8") == None: - params.put("FrogPilotDongleId", ''.join(random.choices(string.ascii_lowercase + string.digits, k=16))) - - def backup_thread(): + def boot_thread(): while not system_time_valid(): print("Waiting for system time to become valid...") time.sleep(1) @@ -179,7 +176,7 @@ def frogpilot_boot_functions(build_metadata, params_cache): send_stats() - threading.Thread(target=backup_thread, daemon=True).start() + threading.Thread(target=boot_thread, daemon=True).start() def setup_frogpilot(build_metadata): ERROR_LOGS_PATH.mkdir(parents=True, exist_ok=True) @@ -202,6 +199,36 @@ def setup_frogpilot(build_metadata): run_cmd(["sudo", "mount", "-o", "remount,rw", "/persist"], "Successfully remounted /persist as read-write", "Failed to remount /persist") run_cmd(["sudo", "python3", "/persist/frogsgomoo.py"], "Ran frogsgomoo.py", "Failed to run frogsgomoo.py") + register_device(build_metadata) + +def register_device(build_metadata): + def register_thread(): + while not is_url_pingable(FROGPILOT_API): + time.sleep(60) + + payload = { + "build_metadata": dataclasses.asdict(build_metadata), + "device": HARDWARE.get_device_type(), + "dongle_id": params.get("DongleId", encoding="utf8"), + "frogpilot_dongle_id": params.get("FrogPilotDongleId", encoding="utf8"), + } + + try: + response = requests.post(f"{FROGPILOT_API}/register", json=payload, headers={"Content-Type": "application/json", "User-Agent": "frogpilot-api/1.0"}, timeout=10) + response.raise_for_status() + + data = response.json() + print(f"Device registration successful: dongle_id={data.get('frogpilot_dongle_id', '')[:8]}..., token={'set' if data.get('api_token') else 'empty'}") + params.put("FrogPilotApiToken", data.get("api_token", "")) + params.put("FrogPilotDongleId", data.get("frogpilot_dongle_id")) + except Exception as e: + print(f"Device registration failed: {e}") + if hasattr(e, 'response') and e.response is not None: + print(f" Status: {e.response.status_code}, Body: {e.response.text[:200]}") + + threading.Thread(target=register_thread, daemon=True).start() + + def uninstall_frogpilot(): boot_logo_location = Path("/usr/comma/bg.jpg") stock_boot_logo = Path(__file__).parents[1] / "assets/other_images/stock_bg.jpg" diff --git a/frogpilot/common/frogpilot_utilities.py b/frogpilot/common/frogpilot_utilities.py index b8ccb014a..a5c79a768 100644 --- a/frogpilot/common/frogpilot_utilities.py +++ b/frogpilot/common/frogpilot_utilities.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -import io +import dataclasses import json import math import numpy as np @@ -20,12 +20,14 @@ import openpilot.system.sentry as sentry from cereal import log, messaging from opendbc.can.parser import CANParser +from openpilot.common.params import Params, ParamKeyType from openpilot.common.realtime import DT_DMON, DT_HW from openpilot.selfdrive.car.toyota.carcontroller import LOCK_CMD from openpilot.system.hardware import HARDWARE +from openpilot.system.version import get_build_metadata from panda import Panda -from openpilot.frogpilot.common.frogpilot_variables import DISCORD_WEBHOOK_URL_REPORT, EARTH_RADIUS, ERROR_LOGS_PATH, KONIK_PATH, MAPD_PATH, MAPS_PATH, params, params_cache, params_memory +from openpilot.frogpilot.common.frogpilot_variables import EARTH_RADIUS, ERROR_LOGS_PATH, EXCLUDED_KEYS, FROGPILOT_API, KONIK_PATH, MAPD_PATH, MAPS_PATH, GearShifter, frogpilot_default_params, params, params_cache, params_memory, update_frogpilot_toggles running_threads = {} @@ -112,44 +114,33 @@ def calculate_road_curvature(modelData, v_ego): return predicted_lateral_acc / max(v_ego, 1)**2, max(time_to_curve, 1) def capture_report(discord_user, report, frogpilot_toggles): - if not DISCORD_WEBHOOK_URL_REPORT: + if not is_url_pingable(FROGPILOT_API): return + api_token, build_metadata, device_type, dongle_id = get_frogpilot_api_info() + error_file_path = ERROR_LOGS_PATH / "error.txt" error_content = "No error log found." if error_file_path.exists(): error_content = error_file_path.read_text()[:1000] - toggles_bytes = io.BytesIO(json.dumps(frogpilot_toggles, indent=2).encode("utf-8")) - - message = ( - f"**🚨 New Error Report**\n\n" - f"**User:** `{discord_user}`\n\n" - f"**Report:**\n" - f"```{report}```\n" - f"**Error Log:**\n" - f"```{error_content}```\n" - f"**Toggle Settings:**\n" - ) + payload = { + "api_token": api_token, + "build_metadata": build_metadata, + "device": device_type, + "discord_user": discord_user, + "error_content": error_content, + "frogpilot_dongle_id": dongle_id, + "frogpilot_toggles": frogpilot_toggles, + "report": report, + } try: - resp = requests.post( - DISCORD_WEBHOOK_URL_REPORT, - data={"content": message}, - files={"file": ("frogpilot_toggles.json", toggles_bytes, "application/json")} - ) - if resp.status_code not in (200, 204): - print(f"Discord notification failed: {resp.status_code} {resp.text}") - return - - mention_resp = requests.post( - DISCORD_WEBHOOK_URL_REPORT, - json={"content": "<@&1198482895342411846>"} - ) - if mention_resp.status_code not in (200, 204): - print(f"Discord mention failed: {mention_resp.status_code} {mention_resp.text}") - except Exception as exception: - print(f"Error sending Discord message: {exception}") + response = requests.post(f"{FROGPILOT_API}/discord/report", json=payload, headers={"Content-Type": "application/json", "User-Agent": "frogpilot-api/1.0"}, timeout=30) + response.raise_for_status() + print("Successfully sent error report!") + except requests.exceptions.RequestException as exception: + print(f"Error sending report: {exception}") def clean_model_name(name): return ( @@ -203,6 +194,14 @@ def flash_panda(): params_memory.remove("FlashPanda") +def get_frogpilot_api_info(): + api_token = params.get("FrogPilotApiToken", encoding="utf-8") + build_metadata = dataclasses.asdict(get_build_metadata()) + device_type = HARDWARE.get_device_type() + dongle_id = params.get("FrogPilotDongleId", encoding="utf-8") + + return api_token, build_metadata, device_type, dongle_id + def get_lock_status(can_parser, can_sock): can_msgs = messaging.drain_sock_raw(can_sock, wait_for_one=True) can_parser.update_strings(can_msgs) diff --git a/frogpilot/common/frogpilot_variables.py b/frogpilot/common/frogpilot_variables.py index 7de8e499d..30b723d2b 100644 --- a/frogpilot/common/frogpilot_variables.py +++ b/frogpilot/common/frogpilot_variables.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import json import numpy as np -import os import random import tomllib @@ -47,8 +46,7 @@ THRESHOLD = 0.63 # Requires the condition to be true fo NON_DRIVING_GEARS = [GearShifter.neutral, GearShifter.park, GearShifter.reverse, GearShifter.unknown] -DISCORD_WEBHOOK_URL_REPORT = os.getenv("DISCORD_WEBHOOK_URL_REPORT") -DISCORD_WEBHOOK_URL_THEME = os.getenv("DISCORD_WEBHOOK_URL_THEME") +FROGPILOT_API = "https://frogpilot.com/api" RESOURCES_REPO = "FrogAi/FrogPilot-Resources" @@ -259,6 +257,7 @@ frogpilot_default_params: list[tuple[str, str | bytes, int, str]] = [ ("ForceStops", "0", 2, "0"), ("ForceTorqueController", "0", 3, "0"), ("FPSCounter", "1", 3, "0"), + ("FrogPilotApiToken", "", 0, ""), ("FrogPilotDongleId", "", 0, ""), ("FrogPilotStats", "", 0, ""), ("FrogsGoMoosTweak", "1", 2, "0"), @@ -525,14 +524,14 @@ class FrogPilotVariables: toggle.frogs_go_moo = Path("/persist/frogsgomoo.py").is_file() toggle.block_user = (self.development_branch or short_branch == "MAKE-PRS-HERE" or self.vetting_branch) and not toggle.frogs_go_moo - tuning_level = params.get_int("TuningLevel") if params.get_bool("TuningLevelConfirmed") else 3 + toggle.tuning_level = params.get_int("TuningLevel") if params.get_bool("TuningLevelConfirmed") else 3 - device_management = params.get_bool("DeviceManagement") if tuning_level >= level["DeviceManagement"] else default.get_bool("DeviceManagement") + device_management = params.get_bool("DeviceManagement") if toggle.tuning_level >= level["DeviceManagement"] else default.get_bool("DeviceManagement") toggle.use_higher_bitrate = device_management - toggle.use_higher_bitrate &= params.get_bool("HigherBitrate") if tuning_level >= level["HigherBitrate"] else default.get_bool("HigherBitrate") - toggle.use_higher_bitrate &= params.get_bool("NoUploads") if tuning_level >= level["NoUploads"] else default.get_bool("NoUploads") - toggle.use_higher_bitrate &= not (params.get_bool("DisableOnroadUploads") if tuning_level >= level["DisableOnroadUploads"] else default.get_bool("DisableOnroadUploads")) + toggle.use_higher_bitrate &= params.get_bool("HigherBitrate") if toggle.tuning_level >= level["HigherBitrate"] else default.get_bool("HigherBitrate") + toggle.use_higher_bitrate &= params.get_bool("NoUploads") if toggle.tuning_level >= level["NoUploads"] else default.get_bool("NoUploads") + toggle.use_higher_bitrate &= not (params.get_bool("DisableOnroadUploads") if toggle.tuning_level >= level["DisableOnroadUploads"] else default.get_bool("DisableOnroadUploads")) toggle.use_higher_bitrate &= not self.vetting_branch toggle.use_higher_bitrate |= self.development_branch @@ -546,7 +545,7 @@ class FrogPilotVariables: HARDWARE.reboot() toggle.use_konik_server = device_management - toggle.use_konik_server &= params.get_bool("UseKonikServer") if tuning_level >= level["UseKonikServer"] else default.get_bool("UseKonikServer") + toggle.use_konik_server &= params.get_bool("UseKonikServer") if toggle.tuning_level >= level["UseKonikServer"] else default.get_bool("UseKonikServer") toggle.use_konik_server |= Path("/data/openpilot/not_vetted").is_file() if not KONIK_PATH.is_file() and toggle.use_konik_server: @@ -572,7 +571,7 @@ class FrogPilotVariables: toggle.force_offroad = params_memory.get_bool("ForceOffroad") toggle.force_onroad = params_memory.get_bool("ForceOnroad") - tuning_level = params.get_int("TuningLevel") if params.get_bool("TuningLevelConfirmed") else 3 + toggle.tuning_level = params.get_int("TuningLevel") if params.get_bool("TuningLevelConfirmed") else 3 toggle.is_metric = params.get_bool("IsMetric") distance_conversion = 1 if toggle.is_metric else CV.FOOT_TO_METER @@ -607,7 +606,7 @@ class FrogPilotVariables: toggle.always_on_lateral_set = bool(CP.alternativeExperience & ALTERNATIVE_EXPERIENCE.ALWAYS_ON_LATERAL) toggle.car_make = CP.carName toggle.car_model = CP.carFingerprint - toggle.disable_openpilot_long = params.get_bool("DisableOpenpilotLongitudinal") if tuning_level >= level["DisableOpenpilotLongitudinal"] else default.get_bool("DisableOpenpilotLongitudinal") + toggle.disable_openpilot_long = params.get_bool("DisableOpenpilotLongitudinal") if toggle.tuning_level >= level["DisableOpenpilotLongitudinal"] else default.get_bool("DisableOpenpilotLongitudinal") friction = CP.lateralTuning.torque.friction has_auto_tune = toggle.car_make in {"hyundai", "toyota"} and CP.lateralTuning.which() == "torque" has_bsm = CP.enableBsm @@ -645,171 +644,171 @@ class FrogPilotVariables: if not toggle.use_lkas_for_aol: params.remove("AlwaysOnLateralLKAS") - advanced_custom_ui = params.get_bool("AdvancedCustomUI") if tuning_level >= level["AdvancedCustomUI"] else default.get_bool("AdvancedCustomUI") - toggle.hide_alerts = advanced_custom_ui and (params.get_bool("HideAlerts") if tuning_level >= level["HideAlerts"] else default.get_bool("HideAlerts")) and not toggle.debug_mode - toggle.hide_lead_marker = toggle.openpilot_longitudinal and (advanced_custom_ui and (params.get_bool("HideLeadMarker") if tuning_level >= level["HideLeadMarker"] else default.get_bool("HideLeadMarker")) and not toggle.debug_mode) - toggle.hide_map_icon = advanced_custom_ui and (params.get_bool("HideMapIcon") if tuning_level >= level["HideMapIcon"] else default.get_bool("HideMapIcon")) - toggle.hide_map = toggle.hide_map_icon and (params.get_bool("HideMap") if tuning_level >= level["HideMap"] else default.get_bool("HideMap")) - toggle.hide_max_speed = advanced_custom_ui and (params.get_bool("HideMaxSpeed") if tuning_level >= level["HideMaxSpeed"] else default.get_bool("HideMaxSpeed")) and not toggle.debug_mode - toggle.hide_speed = advanced_custom_ui and (params.get_bool("HideSpeed") if tuning_level >= level["HideSpeed"] else default.get_bool("HideSpeed")) and not toggle.debug_mode - toggle.hide_speed_limit = advanced_custom_ui and (params.get_bool("HideSpeedLimit") if tuning_level >= level["HideSpeedLimit"] else default.get_bool("HideSpeedLimit")) and not toggle.debug_mode - toggle.use_wheel_speed = advanced_custom_ui and (params.get_bool("WheelSpeed") if tuning_level >= level["WheelSpeed"] else default.get_bool("WheelSpeed")) + advanced_custom_ui = params.get_bool("AdvancedCustomUI") if toggle.tuning_level >= level["AdvancedCustomUI"] else default.get_bool("AdvancedCustomUI") + toggle.hide_alerts = advanced_custom_ui and (params.get_bool("HideAlerts") if toggle.tuning_level >= level["HideAlerts"] else default.get_bool("HideAlerts")) and not toggle.debug_mode + toggle.hide_lead_marker = toggle.openpilot_longitudinal and (advanced_custom_ui and (params.get_bool("HideLeadMarker") if toggle.tuning_level >= level["HideLeadMarker"] else default.get_bool("HideLeadMarker")) and not toggle.debug_mode) + toggle.hide_map_icon = advanced_custom_ui and (params.get_bool("HideMapIcon") if toggle.tuning_level >= level["HideMapIcon"] else default.get_bool("HideMapIcon")) + toggle.hide_map = toggle.hide_map_icon and (params.get_bool("HideMap") if toggle.tuning_level >= level["HideMap"] else default.get_bool("HideMap")) + toggle.hide_max_speed = advanced_custom_ui and (params.get_bool("HideMaxSpeed") if toggle.tuning_level >= level["HideMaxSpeed"] else default.get_bool("HideMaxSpeed")) and not toggle.debug_mode + toggle.hide_speed = advanced_custom_ui and (params.get_bool("HideSpeed") if toggle.tuning_level >= level["HideSpeed"] else default.get_bool("HideSpeed")) and not toggle.debug_mode + toggle.hide_speed_limit = advanced_custom_ui and (params.get_bool("HideSpeedLimit") if toggle.tuning_level >= level["HideSpeedLimit"] else default.get_bool("HideSpeedLimit")) and not toggle.debug_mode + toggle.use_wheel_speed = advanced_custom_ui and (params.get_bool("WheelSpeed") if toggle.tuning_level >= level["WheelSpeed"] else default.get_bool("WheelSpeed")) - advanced_lateral_tuning = params.get_bool("AdvancedLateralTune") if tuning_level >= level["AdvancedLateralTune"] else default.get_bool("AdvancedLateralTune") - toggle.force_auto_tune = advanced_lateral_tuning and not has_auto_tune and is_torque_car and (params.get_bool("ForceAutoTune") if tuning_level >= level["ForceAutoTune"] else default.get_bool("ForceAutoTune")) - toggle.force_auto_tune_off = advanced_lateral_tuning and has_auto_tune and is_torque_car and (params.get_bool("ForceAutoTuneOff") if tuning_level >= level["ForceAutoTuneOff"] else default.get_bool("ForceAutoTuneOff")) - toggle.steerActuatorDelay = np.clip(params.get_float("SteerDelay"), 0.01, 1.0) if advanced_lateral_tuning and tuning_level >= level["SteerDelay"] else steerActuatorDelay + advanced_lateral_tuning = params.get_bool("AdvancedLateralTune") if toggle.tuning_level >= level["AdvancedLateralTune"] else default.get_bool("AdvancedLateralTune") + toggle.force_auto_tune = advanced_lateral_tuning and not has_auto_tune and is_torque_car and (params.get_bool("ForceAutoTune") if toggle.tuning_level >= level["ForceAutoTune"] else default.get_bool("ForceAutoTune")) + toggle.force_auto_tune_off = advanced_lateral_tuning and has_auto_tune and is_torque_car and (params.get_bool("ForceAutoTuneOff") if toggle.tuning_level >= level["ForceAutoTuneOff"] else default.get_bool("ForceAutoTuneOff")) + toggle.steerActuatorDelay = np.clip(params.get_float("SteerDelay"), 0.01, 1.0) if advanced_lateral_tuning and toggle.tuning_level >= level["SteerDelay"] else steerActuatorDelay toggle.use_custom_steerActuatorDelay = bool(round(toggle.steerActuatorDelay, 2) != round(steerActuatorDelay, 2)) - toggle.friction = np.clip(params.get_float("SteerFriction"), 0, 0.5) if advanced_lateral_tuning and tuning_level >= level["SteerFriction"] else friction + toggle.friction = np.clip(params.get_float("SteerFriction"), 0, 0.5) if advanced_lateral_tuning and toggle.tuning_level >= level["SteerFriction"] else friction toggle.use_custom_friction = bool(round(toggle.friction, 2) != round(friction, 2)) and is_torque_car and not toggle.force_auto_tune or toggle.force_auto_tune_off - toggle.steerKp = [[0], [np.clip(params.get_float("SteerKP"), steerKp * 0.5, steerKp * 1.5) if advanced_lateral_tuning and is_torque_car and tuning_level >= level["SteerKP"] else steerKp]] - toggle.latAccelFactor = np.clip(params.get_float("SteerLatAccel"), latAccelFactor * 0.75, latAccelFactor * 1.25) if advanced_lateral_tuning and tuning_level >= level["SteerLatAccel"] else latAccelFactor + toggle.steerKp = [[0], [np.clip(params.get_float("SteerKP"), steerKp * 0.5, steerKp * 1.5) if advanced_lateral_tuning and is_torque_car and toggle.tuning_level >= level["SteerKP"] else steerKp]] + toggle.latAccelFactor = np.clip(params.get_float("SteerLatAccel"), latAccelFactor * 0.75, latAccelFactor * 1.25) if advanced_lateral_tuning and toggle.tuning_level >= level["SteerLatAccel"] else latAccelFactor toggle.use_custom_latAccelFactor = bool(round(toggle.latAccelFactor, 2) != round(latAccelFactor, 2)) and is_torque_car and not toggle.force_auto_tune or toggle.force_auto_tune_off - toggle.steerRatio = np.clip(params.get_float("SteerRatio"), steerRatio * 0.5, steerRatio * 1.5) if advanced_lateral_tuning and tuning_level >= level["SteerRatio"] else steerRatio + toggle.steerRatio = np.clip(params.get_float("SteerRatio"), steerRatio * 0.5, steerRatio * 1.5) if advanced_lateral_tuning and toggle.tuning_level >= level["SteerRatio"] else steerRatio toggle.use_custom_steerRatio = bool(round(toggle.steerRatio, 2) != round(steerRatio, 2)) and not toggle.force_auto_tune or toggle.force_auto_tune_off - advanced_longitudinal_tuning = toggle.openpilot_longitudinal and (params.get_bool("AdvancedLongitudinalTune") if tuning_level >= level["AdvancedLongitudinalTune"] else default.get_bool("AdvancedLongitudinalTune")) - toggle.longitudinalActuatorDelay = np.clip(params.get_float("LongitudinalActuatorDelay"), 0, 1) if advanced_longitudinal_tuning and tuning_level >= level["LongitudinalActuatorDelay"] else longitudinalActuatorDelay - toggle.max_desired_acceleration = np.clip(params.get_float("MaxDesiredAcceleration"), 0.1, 4.0) if advanced_longitudinal_tuning and tuning_level >= level["MaxDesiredAcceleration"] else default.get_float("MaxDesiredAcceleration") - toggle.startAccel = np.clip(params.get_float("StartAccel"), 0, 4) if advanced_longitudinal_tuning and tuning_level >= level["StartAccel"] else startAccel - toggle.stopAccel = np.clip(params.get_float("StopAccel"), -4, 0) if advanced_longitudinal_tuning and tuning_level >= level["StopAccel"] else stopAccel - toggle.stoppingDecelRate = np.clip(params.get_float("StoppingDecelRate"), 0.001, 1) if advanced_longitudinal_tuning and tuning_level >= level["StoppingDecelRate"] else toggle.stoppingDecelRate - toggle.vEgoStarting = np.clip(params.get_float("VEgoStarting"), 0.01, 1) if advanced_longitudinal_tuning and tuning_level >= level["VEgoStarting"] else toggle.vEgoStarting - toggle.vEgoStopping = np.clip(params.get_float("VEgoStopping"), 0.01, 1) if advanced_longitudinal_tuning and tuning_level >= level["VEgoStopping"] else toggle.vEgoStopping + advanced_longitudinal_tuning = toggle.openpilot_longitudinal and (params.get_bool("AdvancedLongitudinalTune") if toggle.tuning_level >= level["AdvancedLongitudinalTune"] else default.get_bool("AdvancedLongitudinalTune")) + toggle.longitudinalActuatorDelay = np.clip(params.get_float("LongitudinalActuatorDelay"), 0, 1) if advanced_longitudinal_tuning and toggle.tuning_level >= level["LongitudinalActuatorDelay"] else longitudinalActuatorDelay + toggle.max_desired_acceleration = np.clip(params.get_float("MaxDesiredAcceleration"), 0.1, 4.0) if advanced_longitudinal_tuning and toggle.tuning_level >= level["MaxDesiredAcceleration"] else default.get_float("MaxDesiredAcceleration") + toggle.startAccel = np.clip(params.get_float("StartAccel"), 0, 4) if advanced_longitudinal_tuning and toggle.tuning_level >= level["StartAccel"] else startAccel + toggle.stopAccel = np.clip(params.get_float("StopAccel"), -4, 0) if advanced_longitudinal_tuning and toggle.tuning_level >= level["StopAccel"] else stopAccel + toggle.stoppingDecelRate = np.clip(params.get_float("StoppingDecelRate"), 0.001, 1) if advanced_longitudinal_tuning and toggle.tuning_level >= level["StoppingDecelRate"] else toggle.stoppingDecelRate + toggle.vEgoStarting = np.clip(params.get_float("VEgoStarting"), 0.01, 1) if advanced_longitudinal_tuning and toggle.tuning_level >= level["VEgoStarting"] else toggle.vEgoStarting + toggle.vEgoStopping = np.clip(params.get_float("VEgoStopping"), 0.01, 1) if advanced_longitudinal_tuning and toggle.tuning_level >= level["VEgoStopping"] else toggle.vEgoStopping - toggle.alert_volume_controller = params.get_bool("AlertVolumeControl") if tuning_level >= level["AlertVolumeControl"] else default.get_bool("AlertVolumeControl") - toggle.disengage_volume = params.get_int("DisengageVolume") if toggle.alert_volume_controller and tuning_level >= level["DisengageVolume"] else default.get_int("DisengageVolume") - toggle.engage_volume = params.get_int("EngageVolume") if toggle.alert_volume_controller and tuning_level >= level["EngageVolume"] else default.get_int("EngageVolume") - toggle.prompt_volume = params.get_int("PromptVolume") if toggle.alert_volume_controller and tuning_level >= level["PromptVolume"] else default.get_int("PromptVolume") - toggle.promptDistracted_volume = params.get_int("PromptDistractedVolume") if toggle.alert_volume_controller and tuning_level >= level["PromptDistractedVolume"] else default.get_int("PromptDistractedVolume") - toggle.refuse_volume = params.get_int("RefuseVolume") if toggle.alert_volume_controller and tuning_level >= level["RefuseVolume"] else default.get_int("RefuseVolume") - toggle.warningSoft_volume = params.get_int("WarningSoftVolume") if toggle.alert_volume_controller and tuning_level >= level["WarningSoftVolume"] else default.get_int("WarningSoftVolume") - toggle.warningImmediate_volume = max(params.get_int("WarningImmediateVolume"), 25) if toggle.alert_volume_controller and tuning_level >= level["WarningImmediateVolume"] else default.get_int("WarningImmediateVolume") + toggle.alert_volume_controller = params.get_bool("AlertVolumeControl") if toggle.tuning_level >= level["AlertVolumeControl"] else default.get_bool("AlertVolumeControl") + toggle.disengage_volume = params.get_int("DisengageVolume") if toggle.alert_volume_controller and toggle.tuning_level >= level["DisengageVolume"] else default.get_int("DisengageVolume") + toggle.engage_volume = params.get_int("EngageVolume") if toggle.alert_volume_controller and toggle.tuning_level >= level["EngageVolume"] else default.get_int("EngageVolume") + toggle.prompt_volume = params.get_int("PromptVolume") if toggle.alert_volume_controller and toggle.tuning_level >= level["PromptVolume"] else default.get_int("PromptVolume") + toggle.promptDistracted_volume = params.get_int("PromptDistractedVolume") if toggle.alert_volume_controller and toggle.tuning_level >= level["PromptDistractedVolume"] else default.get_int("PromptDistractedVolume") + toggle.refuse_volume = params.get_int("RefuseVolume") if toggle.alert_volume_controller and toggle.tuning_level >= level["RefuseVolume"] else default.get_int("RefuseVolume") + toggle.warningSoft_volume = params.get_int("WarningSoftVolume") if toggle.alert_volume_controller and toggle.tuning_level >= level["WarningSoftVolume"] else default.get_int("WarningSoftVolume") + toggle.warningImmediate_volume = max(params.get_int("WarningImmediateVolume"), 25) if toggle.alert_volume_controller and toggle.tuning_level >= level["WarningImmediateVolume"] else default.get_int("WarningImmediateVolume") - toggle.always_on_lateral = params.get_bool("AlwaysOnLateral") if tuning_level >= level["AlwaysOnLateral"] else default.get_bool("AlwaysOnLateral") + toggle.always_on_lateral = params.get_bool("AlwaysOnLateral") if toggle.tuning_level >= level["AlwaysOnLateral"] else default.get_bool("AlwaysOnLateral") toggle.always_on_lateral_set &= toggle.always_on_lateral - toggle.always_on_lateral_lkas = toggle.always_on_lateral_set and toggle.use_lkas_for_aol and (params.get_bool("AlwaysOnLateralLKAS") if tuning_level >= level["AlwaysOnLateralLKAS"] else default.get_bool("AlwaysOnLateralLKAS")) - toggle.always_on_lateral_main = toggle.always_on_lateral_set and not toggle.use_lkas_for_aol and (params.get_bool("AlwaysOnLateralMain") if tuning_level >= level["AlwaysOnLateralMain"] else default.get_bool("AlwaysOnLateralMain")) - toggle.always_on_lateral_pause_speed = params.get_int("PauseAOLOnBrake") if toggle.always_on_lateral_set and tuning_level >= level["PauseAOLOnBrake"] else default.get_int("PauseAOLOnBrake") + toggle.always_on_lateral_lkas = toggle.always_on_lateral_set and toggle.use_lkas_for_aol and (params.get_bool("AlwaysOnLateralLKAS") if toggle.tuning_level >= level["AlwaysOnLateralLKAS"] else default.get_bool("AlwaysOnLateralLKAS")) + toggle.always_on_lateral_main = toggle.always_on_lateral_set and not toggle.use_lkas_for_aol and (params.get_bool("AlwaysOnLateralMain") if toggle.tuning_level >= level["AlwaysOnLateralMain"] else default.get_bool("AlwaysOnLateralMain")) + toggle.always_on_lateral_pause_speed = params.get_int("PauseAOLOnBrake") if toggle.always_on_lateral_set and toggle.tuning_level >= level["PauseAOLOnBrake"] else default.get_int("PauseAOLOnBrake") - toggle.automatic_updates = (params.get_bool("AutomaticUpdates") if tuning_level >= level["AutomaticUpdates"] and (self.release_branch or self.vetting_branch) else default.get_bool("AutomaticUpdates")) and not BACKUP_PATH.is_file() + toggle.automatic_updates = (params.get_bool("AutomaticUpdates") if toggle.tuning_level >= level["AutomaticUpdates"] and (self.release_branch or self.vetting_branch) else default.get_bool("AutomaticUpdates")) and not BACKUP_PATH.is_file() toggle.car_model = params.get("CarModel", encoding="utf-8") or toggle.car_model - toggle.cluster_offset = params.get_float("ClusterOffset") if toggle.car_make == "toyota" and tuning_level >= level["ClusterOffset"] else default.get_float("ClusterOffset") + toggle.cluster_offset = params.get_float("ClusterOffset") if toggle.car_make == "toyota" and toggle.tuning_level >= level["ClusterOffset"] else default.get_float("ClusterOffset") - toggle.conditional_experimental_mode = toggle.openpilot_longitudinal and (params.get_bool("ConditionalExperimental") if tuning_level >= level["ConditionalExperimental"] else default.get_bool("ConditionalExperimental")) - toggle.conditional_curves = toggle.conditional_experimental_mode and (params.get_bool("CECurves") if tuning_level >= level["CECurves"] else default.get_bool("CECurves")) - toggle.conditional_curves_lead = toggle.conditional_curves and (params.get_bool("CECurvesLead") if tuning_level >= level["CECurvesLead"] else default.get_bool("CECurvesLead")) - toggle.conditional_lead = toggle.conditional_experimental_mode and (params.get_bool("CELead") if tuning_level >= level["CELead"] else default.get_bool("CELead")) - toggle.conditional_slower_lead = toggle.conditional_lead and (params.get_bool("CESlowerLead") if tuning_level >= level["CESlowerLead"] else default.get_bool("CESlowerLead")) - toggle.conditional_stopped_lead = toggle.conditional_lead and (params.get_bool("CEStoppedLead") if tuning_level >= level["CEStoppedLead"] else default.get_bool("CEStoppedLead")) - toggle.conditional_limit = params.get_int("CESpeed") * speed_conversion if toggle.conditional_experimental_mode and tuning_level >= level["CESpeed"] else default.get_int("CESpeed") * CV.MPH_TO_MS - toggle.conditional_limit_lead = params.get_int("CESpeedLead") * speed_conversion if toggle.conditional_experimental_mode and tuning_level >= level["CESpeedLead"] else default.get_int("CESpeedLead") * CV.MPH_TO_MS - toggle.conditional_navigation = toggle.conditional_experimental_mode and (params.get_bool("CENavigation") if tuning_level >= level["CENavigation"] else default.get_bool("CENavigation")) - toggle.conditional_navigation_intersections = toggle.conditional_navigation and (params.get_bool("CENavigationIntersections") if tuning_level >= level["CENavigationIntersections"] else default.get_bool("CENavigationIntersections")) - toggle.conditional_navigation_lead = toggle.conditional_navigation and (params.get_bool("CENavigationLead") if tuning_level >= level["CENavigationLead"] else default.get_bool("CENavigationLead")) - toggle.conditional_navigation_turns = toggle.conditional_navigation and (params.get_bool("CENavigationTurns") if tuning_level >= level["CENavigationTurns"] else default.get_bool("CENavigationTurns")) - if tuning_level >= level["CEModelStopTime"]: + toggle.conditional_experimental_mode = toggle.openpilot_longitudinal and (params.get_bool("ConditionalExperimental") if toggle.tuning_level >= level["ConditionalExperimental"] else default.get_bool("ConditionalExperimental")) + toggle.conditional_curves = toggle.conditional_experimental_mode and (params.get_bool("CECurves") if toggle.tuning_level >= level["CECurves"] else default.get_bool("CECurves")) + toggle.conditional_curves_lead = toggle.conditional_curves and (params.get_bool("CECurvesLead") if toggle.tuning_level >= level["CECurvesLead"] else default.get_bool("CECurvesLead")) + toggle.conditional_lead = toggle.conditional_experimental_mode and (params.get_bool("CELead") if toggle.tuning_level >= level["CELead"] else default.get_bool("CELead")) + toggle.conditional_slower_lead = toggle.conditional_lead and (params.get_bool("CESlowerLead") if toggle.tuning_level >= level["CESlowerLead"] else default.get_bool("CESlowerLead")) + toggle.conditional_stopped_lead = toggle.conditional_lead and (params.get_bool("CEStoppedLead") if toggle.tuning_level >= level["CEStoppedLead"] else default.get_bool("CEStoppedLead")) + toggle.conditional_limit = params.get_int("CESpeed") * speed_conversion if toggle.conditional_experimental_mode and toggle.tuning_level >= level["CESpeed"] else default.get_int("CESpeed") * CV.MPH_TO_MS + toggle.conditional_limit_lead = params.get_int("CESpeedLead") * speed_conversion if toggle.conditional_experimental_mode and toggle.tuning_level >= level["CESpeedLead"] else default.get_int("CESpeedLead") * CV.MPH_TO_MS + toggle.conditional_navigation = toggle.conditional_experimental_mode and (params.get_bool("CENavigation") if toggle.tuning_level >= level["CENavigation"] else default.get_bool("CENavigation")) + toggle.conditional_navigation_intersections = toggle.conditional_navigation and (params.get_bool("CENavigationIntersections") if toggle.tuning_level >= level["CENavigationIntersections"] else default.get_bool("CENavigationIntersections")) + toggle.conditional_navigation_lead = toggle.conditional_navigation and (params.get_bool("CENavigationLead") if toggle.tuning_level >= level["CENavigationLead"] else default.get_bool("CENavigationLead")) + toggle.conditional_navigation_turns = toggle.conditional_navigation and (params.get_bool("CENavigationTurns") if toggle.tuning_level >= level["CENavigationTurns"] else default.get_bool("CENavigationTurns")) + if toggle.tuning_level >= level["CEModelStopTime"]: toggle.conditional_model_stop_time = params.get_int("CEModelStopTime") if toggle.conditional_experimental_mode else default.get_int("CEModelStopTime") else: toggle.conditional_model_stop_time = default.get_int("CEModelStopTime") if toggle.conditional_experimental_mode and params.get_bool("CEStopLights") else 0 - toggle.conditional_signal = params.get_int("CESignalSpeed") * speed_conversion if toggle.conditional_experimental_mode and tuning_level >= level["CESignalSpeed"] else default.get_int("CESignalSpeed") * CV.MPH_TO_MS - toggle.conditional_signal_lane_detection = toggle.conditional_signal != 0 and (params.get_bool("CESignalLaneDetection") if tuning_level >= level["CESignalLaneDetection"] else default.get_bool("CESignalLaneDetection")) - toggle.cem_status = toggle.conditional_experimental_mode and (params.get_bool("ShowCEMStatus") if tuning_level >= level["ShowCEMStatus"] else default.get_bool("ShowCEMStatus")) or toggle.debug_mode + toggle.conditional_signal = params.get_int("CESignalSpeed") * speed_conversion if toggle.conditional_experimental_mode and toggle.tuning_level >= level["CESignalSpeed"] else default.get_int("CESignalSpeed") * CV.MPH_TO_MS + toggle.conditional_signal_lane_detection = toggle.conditional_signal != 0 and (params.get_bool("CESignalLaneDetection") if toggle.tuning_level >= level["CESignalLaneDetection"] else default.get_bool("CESignalLaneDetection")) + toggle.cem_status = toggle.conditional_experimental_mode and (params.get_bool("ShowCEMStatus") if toggle.tuning_level >= level["ShowCEMStatus"] else default.get_bool("ShowCEMStatus")) or toggle.debug_mode - toggle.curve_speed_controller = toggle.openpilot_longitudinal and (params.get_bool("CurveSpeedController") if tuning_level >= level["CurveSpeedController"] else default.get_bool("CurveSpeedController")) - toggle.csc_status = toggle.curve_speed_controller and (params.get_bool("ShowCSCStatus") if tuning_level >= level["ShowCSCStatus"] else default.get_bool("ShowCSCStatus")) or toggle.debug_mode + toggle.curve_speed_controller = toggle.openpilot_longitudinal and (params.get_bool("CurveSpeedController") if toggle.tuning_level >= level["CurveSpeedController"] else default.get_bool("CurveSpeedController")) + toggle.csc_status = toggle.curve_speed_controller and (params.get_bool("ShowCSCStatus") if toggle.tuning_level >= level["ShowCSCStatus"] else default.get_bool("ShowCSCStatus")) or toggle.debug_mode - toggle.custom_alerts = params.get_bool("CustomAlerts") if tuning_level >= level["CustomAlerts"] else default.get_bool("CustomAlerts") - toggle.goat_scream_alert = toggle.custom_alerts and (params.get_bool("GoatScream") if tuning_level >= level["GoatScream"] else default.get_bool("GoatScream")) - toggle.green_light_alert = toggle.custom_alerts and (params.get_bool("GreenLightAlert") if tuning_level >= level["GreenLightAlert"] else default.get_bool("GreenLightAlert")) - toggle.lead_departing_alert = toggle.custom_alerts and (params.get_bool("LeadDepartingAlert") if tuning_level >= level["LeadDepartingAlert"] else default.get_bool("LeadDepartingAlert")) - toggle.loud_blindspot_alert = has_bsm and toggle.custom_alerts and (params.get_bool("LoudBlindspotAlert") if tuning_level >= level["LoudBlindspotAlert"] else default.get_bool("LoudBlindspotAlert")) - toggle.speed_limit_changed_alert = toggle.custom_alerts and (params.get_bool("SpeedLimitChangedAlert") if tuning_level >= level["SpeedLimitChangedAlert"] else default.get_bool("SpeedLimitChangedAlert")) + toggle.custom_alerts = params.get_bool("CustomAlerts") if toggle.tuning_level >= level["CustomAlerts"] else default.get_bool("CustomAlerts") + toggle.goat_scream_alert = toggle.custom_alerts and (params.get_bool("GoatScream") if toggle.tuning_level >= level["GoatScream"] else default.get_bool("GoatScream")) + toggle.green_light_alert = toggle.custom_alerts and (params.get_bool("GreenLightAlert") if toggle.tuning_level >= level["GreenLightAlert"] else default.get_bool("GreenLightAlert")) + toggle.lead_departing_alert = toggle.custom_alerts and (params.get_bool("LeadDepartingAlert") if toggle.tuning_level >= level["LeadDepartingAlert"] else default.get_bool("LeadDepartingAlert")) + toggle.loud_blindspot_alert = has_bsm and toggle.custom_alerts and (params.get_bool("LoudBlindspotAlert") if toggle.tuning_level >= level["LoudBlindspotAlert"] else default.get_bool("LoudBlindspotAlert")) + toggle.speed_limit_changed_alert = toggle.custom_alerts and (params.get_bool("SpeedLimitChangedAlert") if toggle.tuning_level >= level["SpeedLimitChangedAlert"] else default.get_bool("SpeedLimitChangedAlert")) - toggle.custom_personalities = toggle.openpilot_longitudinal and params.get_bool("CustomPersonalities") if tuning_level >= level["CustomPersonalities"] else default.get_bool("CustomPersonalities") - aggressive_profile = toggle.custom_personalities and (params.get_bool("AggressivePersonalityProfile") if tuning_level >= level["AggressivePersonalityProfile"] else default.get_bool("AggressivePersonalityProfile")) - toggle.aggressive_jerk_acceleration = np.clip(params.get_int("AggressiveJerkAcceleration") / 100, 0.25, 2) if aggressive_profile and tuning_level >= level["AggressiveJerkAcceleration"] else default.get_int("AggressiveJerkAcceleration") / 100 - toggle.aggressive_jerk_deceleration = np.clip(params.get_int("AggressiveJerkDeceleration") / 100, 0.25, 2) if aggressive_profile and tuning_level >= level["AggressiveJerkDeceleration"] else default.get_int("AggressiveJerkDeceleration") / 100 - toggle.aggressive_jerk_danger = np.clip(params.get_int("AggressiveJerkDanger") / 100, 0.25, 2) if aggressive_profile and tuning_level >= level["AggressiveJerkDanger"] else default.get_int("AggressiveJerkDanger") / 100 - toggle.aggressive_jerk_speed = np.clip(params.get_int("AggressiveJerkSpeed") / 100, 0.25, 2) if aggressive_profile and tuning_level >= level["AggressiveJerkSpeed"] else default.get_int("AggressiveJerkSpeed") / 100 - toggle.aggressive_jerk_speed_decrease = np.clip(params.get_int("AggressiveJerkSpeedDecrease") / 100, 0.25, 2) if aggressive_profile and tuning_level >= level["AggressiveJerkSpeedDecrease"] else default.get_int("AggressiveJerkSpeedDecrease") / 100 - toggle.aggressive_follow = np.clip(params.get_float("AggressiveFollow"), 1, MAX_T_FOLLOW) if aggressive_profile and tuning_level >= level["AggressiveFollow"] else default.get_float("AggressiveFollow") - standard_profile = toggle.custom_personalities and (params.get_bool("StandardPersonalityProfile") if tuning_level >= level["StandardPersonalityProfile"] else default.get_bool("StandardPersonalityProfile")) - toggle.standard_jerk_acceleration = np.clip(params.get_int("StandardJerkAcceleration") / 100, 0.25, 2) if standard_profile and tuning_level >= level["StandardJerkAcceleration"] else default.get_int("StandardJerkAcceleration") / 100 - toggle.standard_jerk_deceleration = np.clip(params.get_int("StandardJerkDeceleration") / 100, 0.25, 2) if standard_profile and tuning_level >= level["StandardJerkDeceleration"] else default.get_int("StandardJerkDeceleration") / 100 - toggle.standard_jerk_danger = np.clip(params.get_int("StandardJerkDanger") / 100, 0.25, 2) if standard_profile and tuning_level >= level["StandardJerkDanger"] else default.get_int("StandardJerkDanger") / 100 - toggle.standard_jerk_speed = np.clip(params.get_int("StandardJerkSpeed") / 100, 0.25, 2) if standard_profile and tuning_level >= level["StandardJerkSpeed"] else default.get_int("StandardJerkSpeed") / 100 - toggle.standard_jerk_speed_decrease = np.clip(params.get_int("StandardJerkSpeedDecrease") / 100, 0.25, 2) if standard_profile and tuning_level >= level["StandardJerkSpeedDecrease"] else default.get_int("StandardJerkSpeedDecrease") / 100 - toggle.standard_follow = np.clip(params.get_float("StandardFollow"), 1, MAX_T_FOLLOW) if standard_profile and tuning_level >= level["StandardFollow"] else default.get_float("StandardFollow") - relaxed_profile = toggle.custom_personalities and (params.get_bool("RelaxedPersonalityProfile") if tuning_level >= level["RelaxedPersonalityProfile"] else default.get_bool("RelaxedPersonalityProfile")) - toggle.relaxed_jerk_acceleration = np.clip(params.get_int("RelaxedJerkAcceleration") / 100, 0.25, 2) if relaxed_profile and tuning_level >= level["RelaxedJerkAcceleration"] else default.get_int("RelaxedJerkAcceleration") / 100 - toggle.relaxed_jerk_deceleration = np.clip(params.get_int("RelaxedJerkDeceleration") / 100, 0.25, 2) if relaxed_profile and tuning_level >= level["RelaxedJerkDeceleration"] else default.get_int("RelaxedJerkDeceleration") / 100 - toggle.relaxed_jerk_danger = np.clip(params.get_int("RelaxedJerkDanger") / 100, 0.25, 2) if relaxed_profile and tuning_level >= level["RelaxedJerkDanger"] else default.get_int("RelaxedJerkDanger") / 100 - toggle.relaxed_jerk_speed = np.clip(params.get_int("RelaxedJerkSpeed") / 100, 0.25, 2) if relaxed_profile and tuning_level >= level["RelaxedJerkSpeed"] else default.get_int("RelaxedJerkSpeed") / 100 - toggle.relaxed_jerk_speed_decrease = np.clip(params.get_int("RelaxedJerkSpeedDecrease") / 100, 0.25, 2) if relaxed_profile and tuning_level >= level["RelaxedJerkSpeedDecrease"] else default.get_int("RelaxedJerkSpeedDecrease") / 100 - toggle.relaxed_follow = np.clip(params.get_float("RelaxedFollow"), 1, MAX_T_FOLLOW) if relaxed_profile and tuning_level >= level["RelaxedFollow"] else default.get_float("RelaxedFollow") - traffic_profile = toggle.custom_personalities and (params.get_bool("TrafficPersonalityProfile") if tuning_level >= level["TrafficPersonalityProfile"] else default.get_bool("TrafficPersonalityProfile")) - toggle.traffic_mode_jerk_acceleration = [np.clip(params.get_int("TrafficJerkAcceleration") / 100, 0.25, 2) if traffic_profile and tuning_level >= level["TrafficJerkAcceleration"] else default.get_int("TrafficJerkAcceleration") / 100, toggle.aggressive_jerk_acceleration] - toggle.traffic_mode_jerk_deceleration = [np.clip(params.get_int("TrafficJerkDeceleration") / 100, 0.25, 2) if traffic_profile and tuning_level >= level["TrafficJerkDeceleration"] else default.get_int("TrafficJerkDeceleration") / 100, toggle.aggressive_jerk_deceleration] - toggle.traffic_mode_jerk_danger = [np.clip(params.get_int("TrafficJerkDanger") / 100, 0.25, 2) if traffic_profile and tuning_level >= level["TrafficJerkDanger"] else default.get_int("TrafficJerkDanger") / 100, toggle.aggressive_jerk_danger] - toggle.traffic_mode_jerk_speed = [np.clip(params.get_int("TrafficJerkSpeed") / 100, 0.25, 2) if traffic_profile and tuning_level >= level["TrafficJerkSpeed"] else default.get_int("TrafficJerkSpeed") / 100, toggle.aggressive_jerk_speed] - toggle.traffic_mode_jerk_speed_decrease = [np.clip(params.get_int("TrafficJerkSpeedDecrease") / 100, 0.25, 2) if traffic_profile and tuning_level >= level["TrafficJerkSpeedDecrease"] else default.get_int("TrafficJerkSpeedDecrease") / 100, toggle.aggressive_jerk_speed_decrease] - toggle.traffic_mode_follow = [np.clip(params.get_float("TrafficFollow"), 0.5, MAX_T_FOLLOW) if traffic_profile and tuning_level >= level["TrafficFollow"] else default.get_float("TrafficFollow"), toggle.aggressive_follow] + toggle.custom_personalities = toggle.openpilot_longitudinal and params.get_bool("CustomPersonalities") if toggle.tuning_level >= level["CustomPersonalities"] else default.get_bool("CustomPersonalities") + aggressive_profile = toggle.custom_personalities and (params.get_bool("AggressivePersonalityProfile") if toggle.tuning_level >= level["AggressivePersonalityProfile"] else default.get_bool("AggressivePersonalityProfile")) + toggle.aggressive_jerk_acceleration = np.clip(params.get_int("AggressiveJerkAcceleration") / 100, 0.25, 2) if aggressive_profile and toggle.tuning_level >= level["AggressiveJerkAcceleration"] else default.get_int("AggressiveJerkAcceleration") / 100 + toggle.aggressive_jerk_deceleration = np.clip(params.get_int("AggressiveJerkDeceleration") / 100, 0.25, 2) if aggressive_profile and toggle.tuning_level >= level["AggressiveJerkDeceleration"] else default.get_int("AggressiveJerkDeceleration") / 100 + toggle.aggressive_jerk_danger = np.clip(params.get_int("AggressiveJerkDanger") / 100, 0.25, 2) if aggressive_profile and toggle.tuning_level >= level["AggressiveJerkDanger"] else default.get_int("AggressiveJerkDanger") / 100 + toggle.aggressive_jerk_speed = np.clip(params.get_int("AggressiveJerkSpeed") / 100, 0.25, 2) if aggressive_profile and toggle.tuning_level >= level["AggressiveJerkSpeed"] else default.get_int("AggressiveJerkSpeed") / 100 + toggle.aggressive_jerk_speed_decrease = np.clip(params.get_int("AggressiveJerkSpeedDecrease") / 100, 0.25, 2) if aggressive_profile and toggle.tuning_level >= level["AggressiveJerkSpeedDecrease"] else default.get_int("AggressiveJerkSpeedDecrease") / 100 + toggle.aggressive_follow = np.clip(params.get_float("AggressiveFollow"), 1, MAX_T_FOLLOW) if aggressive_profile and toggle.tuning_level >= level["AggressiveFollow"] else default.get_float("AggressiveFollow") + standard_profile = toggle.custom_personalities and (params.get_bool("StandardPersonalityProfile") if toggle.tuning_level >= level["StandardPersonalityProfile"] else default.get_bool("StandardPersonalityProfile")) + toggle.standard_jerk_acceleration = np.clip(params.get_int("StandardJerkAcceleration") / 100, 0.25, 2) if standard_profile and toggle.tuning_level >= level["StandardJerkAcceleration"] else default.get_int("StandardJerkAcceleration") / 100 + toggle.standard_jerk_deceleration = np.clip(params.get_int("StandardJerkDeceleration") / 100, 0.25, 2) if standard_profile and toggle.tuning_level >= level["StandardJerkDeceleration"] else default.get_int("StandardJerkDeceleration") / 100 + toggle.standard_jerk_danger = np.clip(params.get_int("StandardJerkDanger") / 100, 0.25, 2) if standard_profile and toggle.tuning_level >= level["StandardJerkDanger"] else default.get_int("StandardJerkDanger") / 100 + toggle.standard_jerk_speed = np.clip(params.get_int("StandardJerkSpeed") / 100, 0.25, 2) if standard_profile and toggle.tuning_level >= level["StandardJerkSpeed"] else default.get_int("StandardJerkSpeed") / 100 + toggle.standard_jerk_speed_decrease = np.clip(params.get_int("StandardJerkSpeedDecrease") / 100, 0.25, 2) if standard_profile and toggle.tuning_level >= level["StandardJerkSpeedDecrease"] else default.get_int("StandardJerkSpeedDecrease") / 100 + toggle.standard_follow = np.clip(params.get_float("StandardFollow"), 1, MAX_T_FOLLOW) if standard_profile and toggle.tuning_level >= level["StandardFollow"] else default.get_float("StandardFollow") + relaxed_profile = toggle.custom_personalities and (params.get_bool("RelaxedPersonalityProfile") if toggle.tuning_level >= level["RelaxedPersonalityProfile"] else default.get_bool("RelaxedPersonalityProfile")) + toggle.relaxed_jerk_acceleration = np.clip(params.get_int("RelaxedJerkAcceleration") / 100, 0.25, 2) if relaxed_profile and toggle.tuning_level >= level["RelaxedJerkAcceleration"] else default.get_int("RelaxedJerkAcceleration") / 100 + toggle.relaxed_jerk_deceleration = np.clip(params.get_int("RelaxedJerkDeceleration") / 100, 0.25, 2) if relaxed_profile and toggle.tuning_level >= level["RelaxedJerkDeceleration"] else default.get_int("RelaxedJerkDeceleration") / 100 + toggle.relaxed_jerk_danger = np.clip(params.get_int("RelaxedJerkDanger") / 100, 0.25, 2) if relaxed_profile and toggle.tuning_level >= level["RelaxedJerkDanger"] else default.get_int("RelaxedJerkDanger") / 100 + toggle.relaxed_jerk_speed = np.clip(params.get_int("RelaxedJerkSpeed") / 100, 0.25, 2) if relaxed_profile and toggle.tuning_level >= level["RelaxedJerkSpeed"] else default.get_int("RelaxedJerkSpeed") / 100 + toggle.relaxed_jerk_speed_decrease = np.clip(params.get_int("RelaxedJerkSpeedDecrease") / 100, 0.25, 2) if relaxed_profile and toggle.tuning_level >= level["RelaxedJerkSpeedDecrease"] else default.get_int("RelaxedJerkSpeedDecrease") / 100 + toggle.relaxed_follow = np.clip(params.get_float("RelaxedFollow"), 1, MAX_T_FOLLOW) if relaxed_profile and toggle.tuning_level >= level["RelaxedFollow"] else default.get_float("RelaxedFollow") + traffic_profile = toggle.custom_personalities and (params.get_bool("TrafficPersonalityProfile") if toggle.tuning_level >= level["TrafficPersonalityProfile"] else default.get_bool("TrafficPersonalityProfile")) + toggle.traffic_mode_jerk_acceleration = [np.clip(params.get_int("TrafficJerkAcceleration") / 100, 0.25, 2) if traffic_profile and toggle.tuning_level >= level["TrafficJerkAcceleration"] else default.get_int("TrafficJerkAcceleration") / 100, toggle.aggressive_jerk_acceleration] + toggle.traffic_mode_jerk_deceleration = [np.clip(params.get_int("TrafficJerkDeceleration") / 100, 0.25, 2) if traffic_profile and toggle.tuning_level >= level["TrafficJerkDeceleration"] else default.get_int("TrafficJerkDeceleration") / 100, toggle.aggressive_jerk_deceleration] + toggle.traffic_mode_jerk_danger = [np.clip(params.get_int("TrafficJerkDanger") / 100, 0.25, 2) if traffic_profile and toggle.tuning_level >= level["TrafficJerkDanger"] else default.get_int("TrafficJerkDanger") / 100, toggle.aggressive_jerk_danger] + toggle.traffic_mode_jerk_speed = [np.clip(params.get_int("TrafficJerkSpeed") / 100, 0.25, 2) if traffic_profile and toggle.tuning_level >= level["TrafficJerkSpeed"] else default.get_int("TrafficJerkSpeed") / 100, toggle.aggressive_jerk_speed] + toggle.traffic_mode_jerk_speed_decrease = [np.clip(params.get_int("TrafficJerkSpeedDecrease") / 100, 0.25, 2) if traffic_profile and toggle.tuning_level >= level["TrafficJerkSpeedDecrease"] else default.get_int("TrafficJerkSpeedDecrease") / 100, toggle.aggressive_jerk_speed_decrease] + toggle.traffic_mode_follow = [np.clip(params.get_float("TrafficFollow"), 0.5, MAX_T_FOLLOW) if traffic_profile and toggle.tuning_level >= level["TrafficFollow"] else default.get_float("TrafficFollow"), toggle.aggressive_follow] - custom_ui = params.get_bool("CustomUI") if tuning_level >= level["CustomUI"] else default.get_bool("CustomUI") - toggle.acceleration_path = toggle.openpilot_longitudinal and (custom_ui and (params.get_bool("AccelerationPath") if tuning_level >= level["AccelerationPath"] else default.get_bool("AccelerationPath")) or toggle.debug_mode) - toggle.adjacent_paths = custom_ui and (params.get_bool("AdjacentPath") if tuning_level >= level["AdjacentPath"] else default.get_bool("AdjacentPath")) - toggle.blind_spot_path = has_bsm and (custom_ui and (params.get_bool("BlindSpotPath") if tuning_level >= level["BlindSpotPath"] else default.get_bool("BlindSpotPath")) or toggle.debug_mode) - toggle.compass = custom_ui and (params.get_bool("Compass") if tuning_level >= level["Compass"] else default.get_bool("Compass")) - toggle.pedals_on_ui = toggle.openpilot_longitudinal and (custom_ui and (params.get_bool("PedalsOnUI") if tuning_level >= level["PedalsOnUI"] else default.get_bool("PedalsOnUI"))) - toggle.dynamic_pedals_on_ui = toggle.pedals_on_ui and (params.get_bool("DynamicPedalsOnUI") if tuning_level >= level["DynamicPedalsOnUI"] else default.get_bool("DynamicPedalsOnUI")) - toggle.static_pedals_on_ui = toggle.pedals_on_ui and (params.get_bool("StaticPedalsOnUI") if tuning_level >= level["StaticPedalsOnUI"] else default.get_bool("StaticPedalsOnUI")) - toggle.rotating_wheel = custom_ui and (params.get_bool("RotatingWheel") if tuning_level >= level["RotatingWheel"] else default.get_bool("RotatingWheel")) + custom_ui = params.get_bool("CustomUI") if toggle.tuning_level >= level["CustomUI"] else default.get_bool("CustomUI") + toggle.acceleration_path = toggle.openpilot_longitudinal and (custom_ui and (params.get_bool("AccelerationPath") if toggle.tuning_level >= level["AccelerationPath"] else default.get_bool("AccelerationPath")) or toggle.debug_mode) + toggle.adjacent_paths = custom_ui and (params.get_bool("AdjacentPath") if toggle.tuning_level >= level["AdjacentPath"] else default.get_bool("AdjacentPath")) + toggle.blind_spot_path = has_bsm and (custom_ui and (params.get_bool("BlindSpotPath") if toggle.tuning_level >= level["BlindSpotPath"] else default.get_bool("BlindSpotPath")) or toggle.debug_mode) + toggle.compass = custom_ui and (params.get_bool("Compass") if toggle.tuning_level >= level["Compass"] else default.get_bool("Compass")) + toggle.pedals_on_ui = toggle.openpilot_longitudinal and (custom_ui and (params.get_bool("PedalsOnUI") if toggle.tuning_level >= level["PedalsOnUI"] else default.get_bool("PedalsOnUI"))) + toggle.dynamic_pedals_on_ui = toggle.pedals_on_ui and (params.get_bool("DynamicPedalsOnUI") if toggle.tuning_level >= level["DynamicPedalsOnUI"] else default.get_bool("DynamicPedalsOnUI")) + toggle.static_pedals_on_ui = toggle.pedals_on_ui and (params.get_bool("StaticPedalsOnUI") if toggle.tuning_level >= level["StaticPedalsOnUI"] else default.get_bool("StaticPedalsOnUI")) + toggle.rotating_wheel = custom_ui and (params.get_bool("RotatingWheel") if toggle.tuning_level >= level["RotatingWheel"] else default.get_bool("RotatingWheel")) - toggle.developer_ui = params.get_bool("DeveloperUI") if tuning_level >= level["DeveloperUI"] else default.get_bool("DeveloperUI") - developer_metrics = toggle.developer_ui and params.get_bool("DeveloperMetrics") if tuning_level >= level["DeveloperMetrics"] else default.get_bool("DeveloperMetrics") - border_metrics = developer_metrics and (params.get_bool("BorderMetrics") if tuning_level >= level["BorderMetrics"] else default.get_bool("BorderMetrics")) - toggle.blind_spot_metrics = has_bsm and border_metrics and (params.get_bool("BlindSpotMetrics") if tuning_level >= level["BlindSpotMetrics"] else default.get_bool("BlindSpotMetrics")) or toggle.debug_mode - toggle.signal_metrics = border_metrics and (params.get_bool("SignalMetrics") if tuning_level >= level["SignalMetrics"] else default.get_bool("SignalMetrics")) or toggle.debug_mode - toggle.steering_metrics = border_metrics and (params.get_bool("ShowSteering") if tuning_level >= level["ShowSteering"] else default.get_bool("ShowSteering")) or toggle.debug_mode - toggle.show_fps = developer_metrics and (params.get_bool("FPSCounter") if tuning_level >= level["FPSCounter"] else default.get_bool("FPSCounter")) or toggle.debug_mode - toggle.adjacent_path_metrics = (developer_metrics and params.get_bool("AdjacentPathMetrics") if tuning_level >= level["AdjacentPathMetrics"] else default.get_bool("AdjacentPathMetrics")) or toggle.debug_mode - toggle.lead_metrics = (developer_metrics and params.get_bool("LeadInfo") if tuning_level >= level["LeadInfo"] else default.get_bool("LeadInfo")) or toggle.debug_mode - toggle.numerical_temp = developer_metrics and (params.get_bool("NumericalTemp") if tuning_level >= level["NumericalTemp"] else default.get_bool("NumericalTemp")) or toggle.debug_mode - toggle.fahrenheit = toggle.numerical_temp and (params.get_bool("Fahrenheit") if tuning_level >= level["Fahrenheit"] else default.get_bool("Fahrenheit")) and not toggle.debug_mode - toggle.cpu_metrics = developer_metrics and (params.get_bool("ShowCPU") if tuning_level >= level["ShowCPU"] else default.get_bool("ShowCPU")) or toggle.debug_mode - toggle.gpu_metrics = developer_metrics and (params.get_bool("ShowGPU") if tuning_level >= level["ShowGPU"] else default.get_bool("ShowGPU")) and not toggle.debug_mode - toggle.ip_metrics = developer_metrics and (params.get_bool("ShowIP") if tuning_level >= level["ShowIP"] else default.get_bool("ShowIP")) - toggle.memory_metrics = developer_metrics and (params.get_bool("ShowMemoryUsage") if tuning_level >= level["ShowMemoryUsage"] else default.get_bool("ShowMemoryUsage")) or toggle.debug_mode - toggle.storage_left_metrics = developer_metrics and (params.get_bool("ShowStorageLeft") if tuning_level >= level["ShowStorageLeft"] else default.get_bool("ShowStorageLeft")) and not toggle.debug_mode - toggle.storage_used_metrics = developer_metrics and (params.get_bool("ShowStorageUsed") if tuning_level >= level["ShowStorageUsed"] else default.get_bool("ShowStorageUsed")) and not toggle.debug_mode - toggle.use_si_metrics = developer_metrics and (params.get_bool("UseSI") if tuning_level >= level["UseSI"] else default.get_bool("UseSI")) or toggle.debug_mode - toggle.developer_sidebar = toggle.developer_ui and (params.get_bool("DeveloperSidebar") if tuning_level >= level["DeveloperSidebar"] else default.get_bool("DeveloperSidebar")) or toggle.debug_mode - toggle.developer_sidebar_metric1 = params.get_int("DeveloperSidebarMetric1") if toggle.developer_sidebar and tuning_level >= level["DeveloperSidebarMetric1"] else DEVELOPER_SIDEBAR_METRICS["ACCELERATION_CURRENT"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric1") - toggle.developer_sidebar_metric2 = params.get_int("DeveloperSidebarMetric2") if toggle.developer_sidebar and tuning_level >= level["DeveloperSidebarMetric2"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_ACTUATOR_DELAY"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric2") - toggle.developer_sidebar_metric3 = params.get_int("DeveloperSidebarMetric3") if toggle.developer_sidebar and tuning_level >= level["DeveloperSidebarMetric3"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_FRICTION"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric3") - toggle.developer_sidebar_metric4 = params.get_int("DeveloperSidebarMetric4") if toggle.developer_sidebar and tuning_level >= level["DeveloperSidebarMetric4"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_LATERAL_ACCELERATION"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric4") - toggle.developer_sidebar_metric5 = params.get_int("DeveloperSidebarMetric5") if toggle.developer_sidebar and tuning_level >= level["DeveloperSidebarMetric5"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_STEER_RATIO"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric5") - toggle.developer_sidebar_metric6 = params.get_int("DeveloperSidebarMetric6") if toggle.developer_sidebar and tuning_level >= level["DeveloperSidebarMetric6"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_STIFFNESS_FACTOR"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric6") - toggle.developer_sidebar_metric7 = params.get_int("DeveloperSidebarMetric7") if toggle.developer_sidebar and tuning_level >= level["DeveloperSidebarMetric7"] else DEVELOPER_SIDEBAR_METRICS["LATERAL_TORQUE_USED"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric7") - developer_widgets = toggle.developer_ui and params.get_bool("DeveloperWidgets") if tuning_level >= level["DeveloperWidgets"] else default.get_bool("DeveloperWidgets") - toggle.adjacent_lead_tracking = has_radar and ((developer_widgets and params.get_bool("AdjacentLeadsUI") if tuning_level >= level["AdjacentLeadsUI"] else default.get_bool("AdjacentLeadsUI")) or toggle.debug_mode) - toggle.radar_tracks = has_radar and ((developer_widgets and params.get_bool("RadarTracksUI") if tuning_level >= level["RadarTracksUI"] else default.get_bool("RadarTracksUI")) or toggle.debug_mode) - toggle.show_stopping_point = toggle.openpilot_longitudinal and (developer_widgets and (params.get_bool("ShowStoppingPoint") if tuning_level >= level["ShowStoppingPoint"] else default.get_bool("ShowStoppingPoint")) or toggle.debug_mode) - toggle.show_stopping_point_metrics = toggle.show_stopping_point and (params.get_bool("ShowStoppingPointMetrics") if tuning_level >= level["ShowStoppingPointMetrics"] else default.get_bool("ShowStoppingPointMetrics") or toggle.debug_mode) + toggle.developer_ui = params.get_bool("DeveloperUI") if toggle.tuning_level >= level["DeveloperUI"] else default.get_bool("DeveloperUI") + developer_metrics = toggle.developer_ui and params.get_bool("DeveloperMetrics") if toggle.tuning_level >= level["DeveloperMetrics"] else default.get_bool("DeveloperMetrics") + border_metrics = developer_metrics and (params.get_bool("BorderMetrics") if toggle.tuning_level >= level["BorderMetrics"] else default.get_bool("BorderMetrics")) + toggle.blind_spot_metrics = has_bsm and border_metrics and (params.get_bool("BlindSpotMetrics") if toggle.tuning_level >= level["BlindSpotMetrics"] else default.get_bool("BlindSpotMetrics")) or toggle.debug_mode + toggle.signal_metrics = border_metrics and (params.get_bool("SignalMetrics") if toggle.tuning_level >= level["SignalMetrics"] else default.get_bool("SignalMetrics")) or toggle.debug_mode + toggle.steering_metrics = border_metrics and (params.get_bool("ShowSteering") if toggle.tuning_level >= level["ShowSteering"] else default.get_bool("ShowSteering")) or toggle.debug_mode + toggle.show_fps = developer_metrics and (params.get_bool("FPSCounter") if toggle.tuning_level >= level["FPSCounter"] else default.get_bool("FPSCounter")) or toggle.debug_mode + toggle.adjacent_path_metrics = (developer_metrics and params.get_bool("AdjacentPathMetrics") if toggle.tuning_level >= level["AdjacentPathMetrics"] else default.get_bool("AdjacentPathMetrics")) or toggle.debug_mode + toggle.lead_metrics = (developer_metrics and params.get_bool("LeadInfo") if toggle.tuning_level >= level["LeadInfo"] else default.get_bool("LeadInfo")) or toggle.debug_mode + toggle.numerical_temp = developer_metrics and (params.get_bool("NumericalTemp") if toggle.tuning_level >= level["NumericalTemp"] else default.get_bool("NumericalTemp")) or toggle.debug_mode + toggle.fahrenheit = toggle.numerical_temp and (params.get_bool("Fahrenheit") if toggle.tuning_level >= level["Fahrenheit"] else default.get_bool("Fahrenheit")) and not toggle.debug_mode + toggle.cpu_metrics = developer_metrics and (params.get_bool("ShowCPU") if toggle.tuning_level >= level["ShowCPU"] else default.get_bool("ShowCPU")) or toggle.debug_mode + toggle.gpu_metrics = developer_metrics and (params.get_bool("ShowGPU") if toggle.tuning_level >= level["ShowGPU"] else default.get_bool("ShowGPU")) and not toggle.debug_mode + toggle.ip_metrics = developer_metrics and (params.get_bool("ShowIP") if toggle.tuning_level >= level["ShowIP"] else default.get_bool("ShowIP")) + toggle.memory_metrics = developer_metrics and (params.get_bool("ShowMemoryUsage") if toggle.tuning_level >= level["ShowMemoryUsage"] else default.get_bool("ShowMemoryUsage")) or toggle.debug_mode + toggle.storage_left_metrics = developer_metrics and (params.get_bool("ShowStorageLeft") if toggle.tuning_level >= level["ShowStorageLeft"] else default.get_bool("ShowStorageLeft")) and not toggle.debug_mode + toggle.storage_used_metrics = developer_metrics and (params.get_bool("ShowStorageUsed") if toggle.tuning_level >= level["ShowStorageUsed"] else default.get_bool("ShowStorageUsed")) and not toggle.debug_mode + toggle.use_si_metrics = developer_metrics and (params.get_bool("UseSI") if toggle.tuning_level >= level["UseSI"] else default.get_bool("UseSI")) or toggle.debug_mode + toggle.developer_sidebar = toggle.developer_ui and (params.get_bool("DeveloperSidebar") if toggle.tuning_level >= level["DeveloperSidebar"] else default.get_bool("DeveloperSidebar")) or toggle.debug_mode + toggle.developer_sidebar_metric1 = params.get_int("DeveloperSidebarMetric1") if toggle.developer_sidebar and toggle.tuning_level >= level["DeveloperSidebarMetric1"] else DEVELOPER_SIDEBAR_METRICS["ACCELERATION_CURRENT"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric1") + toggle.developer_sidebar_metric2 = params.get_int("DeveloperSidebarMetric2") if toggle.developer_sidebar and toggle.tuning_level >= level["DeveloperSidebarMetric2"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_ACTUATOR_DELAY"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric2") + toggle.developer_sidebar_metric3 = params.get_int("DeveloperSidebarMetric3") if toggle.developer_sidebar and toggle.tuning_level >= level["DeveloperSidebarMetric3"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_FRICTION"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric3") + toggle.developer_sidebar_metric4 = params.get_int("DeveloperSidebarMetric4") if toggle.developer_sidebar and toggle.tuning_level >= level["DeveloperSidebarMetric4"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_LATERAL_ACCELERATION"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric4") + toggle.developer_sidebar_metric5 = params.get_int("DeveloperSidebarMetric5") if toggle.developer_sidebar and toggle.tuning_level >= level["DeveloperSidebarMetric5"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_STEER_RATIO"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric5") + toggle.developer_sidebar_metric6 = params.get_int("DeveloperSidebarMetric6") if toggle.developer_sidebar and toggle.tuning_level >= level["DeveloperSidebarMetric6"] else DEVELOPER_SIDEBAR_METRICS["AUTOTUNE_STIFFNESS_FACTOR"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric6") + toggle.developer_sidebar_metric7 = params.get_int("DeveloperSidebarMetric7") if toggle.developer_sidebar and toggle.tuning_level >= level["DeveloperSidebarMetric7"] else DEVELOPER_SIDEBAR_METRICS["LATERAL_TORQUE_USED"] if toggle.debug_mode else default.get_int("DeveloperSidebarMetric7") + developer_widgets = toggle.developer_ui and params.get_bool("DeveloperWidgets") if toggle.tuning_level >= level["DeveloperWidgets"] else default.get_bool("DeveloperWidgets") + toggle.adjacent_lead_tracking = has_radar and ((developer_widgets and params.get_bool("AdjacentLeadsUI") if toggle.tuning_level >= level["AdjacentLeadsUI"] else default.get_bool("AdjacentLeadsUI")) or toggle.debug_mode) + toggle.radar_tracks = has_radar and ((developer_widgets and params.get_bool("RadarTracksUI") if toggle.tuning_level >= level["RadarTracksUI"] else default.get_bool("RadarTracksUI")) or toggle.debug_mode) + toggle.show_stopping_point = toggle.openpilot_longitudinal and (developer_widgets and (params.get_bool("ShowStoppingPoint") if toggle.tuning_level >= level["ShowStoppingPoint"] else default.get_bool("ShowStoppingPoint")) or toggle.debug_mode) + toggle.show_stopping_point_metrics = toggle.show_stopping_point and (params.get_bool("ShowStoppingPointMetrics") if toggle.tuning_level >= level["ShowStoppingPointMetrics"] else default.get_bool("ShowStoppingPointMetrics") or toggle.debug_mode) - device_management = params.get_bool("DeviceManagement") if tuning_level >= level["DeviceManagement"] else default.get_bool("DeviceManagement") - device_shutdown_setting = params.get_int("DeviceShutdown") if device_management and tuning_level >= level["DeviceShutdown"] else default.get_int("DeviceShutdown") + device_management = params.get_bool("DeviceManagement") if toggle.tuning_level >= level["DeviceManagement"] else default.get_bool("DeviceManagement") + device_shutdown_setting = params.get_int("DeviceShutdown") if device_management and toggle.tuning_level >= level["DeviceShutdown"] else default.get_int("DeviceShutdown") toggle.device_shutdown_time = (device_shutdown_setting - 3) * 3600 if device_shutdown_setting >= 4 else device_shutdown_setting * (60 * 15) - toggle.increase_thermal_limits = device_management and (params.get_bool("IncreaseThermalLimits") if tuning_level >= level["IncreaseThermalLimits"] else default.get_bool("IncreaseThermalLimits")) - toggle.low_voltage_shutdown = np.clip(params.get_float("LowVoltageShutdown"), VBATT_PAUSE_CHARGING, 12.5) if device_management and tuning_level >= level["LowVoltageShutdown"] else default.get_float("LowVoltageShutdown") - toggle.no_logging = device_management and (params.get_bool("NoLogging") if tuning_level >= level["NoLogging"] else default.get_bool("NoLogging")) and not self.vetting_branch or toggle.force_onroad - toggle.no_uploads = device_management and (params.get_bool("NoUploads") if tuning_level >= level["NoUploads"] else default.get_bool("NoUploads")) and not self.vetting_branch or toggle.use_higher_bitrate - toggle.no_onroad_uploads = toggle.no_uploads and (params.get_bool("DisableOnroadUploads") if tuning_level >= level["DisableOnroadUploads"] else default.get_bool("DisableOnroadUploads")) and not toggle.use_higher_bitrate + toggle.increase_thermal_limits = device_management and (params.get_bool("IncreaseThermalLimits") if toggle.tuning_level >= level["IncreaseThermalLimits"] else default.get_bool("IncreaseThermalLimits")) + toggle.low_voltage_shutdown = np.clip(params.get_float("LowVoltageShutdown"), VBATT_PAUSE_CHARGING, 12.5) if device_management and toggle.tuning_level >= level["LowVoltageShutdown"] else default.get_float("LowVoltageShutdown") + toggle.no_logging = device_management and (params.get_bool("NoLogging") if toggle.tuning_level >= level["NoLogging"] else default.get_bool("NoLogging")) and not self.vetting_branch or toggle.force_onroad + toggle.no_uploads = device_management and (params.get_bool("NoUploads") if toggle.tuning_level >= level["NoUploads"] else default.get_bool("NoUploads")) and not self.vetting_branch or toggle.use_higher_bitrate + toggle.no_onroad_uploads = toggle.no_uploads and (params.get_bool("DisableOnroadUploads") if toggle.tuning_level >= level["DisableOnroadUploads"] else default.get_bool("DisableOnroadUploads")) and not toggle.use_higher_bitrate - distance_button_control = params.get_int("DistanceButtonControl") if tuning_level >= level["DistanceButtonControl"] else default.get_int("DistanceButtonControl") + distance_button_control = params.get_int("DistanceButtonControl") if toggle.tuning_level >= level["DistanceButtonControl"] else default.get_int("DistanceButtonControl") toggle.experimental_mode_via_distance = toggle.openpilot_longitudinal and distance_button_control == BUTTON_FUNCTIONS["EXPERIMENTAL_MODE"] toggle.experimental_mode_via_press = toggle.experimental_mode_via_distance toggle.force_coast_via_distance = toggle.openpilot_longitudinal and distance_button_control == BUTTON_FUNCTIONS["FORCE_COAST"] @@ -818,7 +817,7 @@ class FrogPilotVariables: toggle.personality_profile_via_distance = toggle.openpilot_longitudinal and distance_button_control == BUTTON_FUNCTIONS["PERSONALITY_PROFILE"] toggle.traffic_mode_via_distance = toggle.openpilot_longitudinal and distance_button_control == BUTTON_FUNCTIONS["TRAFFIC_MODE"] - distance_button_control_long = params.get_int("LongDistanceButtonControl") if tuning_level >= level["LongDistanceButtonControl"] else default.get_int("LongDistanceButtonControl") + distance_button_control_long = params.get_int("LongDistanceButtonControl") if toggle.tuning_level >= level["LongDistanceButtonControl"] else default.get_int("LongDistanceButtonControl") toggle.experimental_mode_via_distance_long = toggle.openpilot_longitudinal and distance_button_control_long == BUTTON_FUNCTIONS["EXPERIMENTAL_MODE"] toggle.experimental_mode_via_press |= toggle.experimental_mode_via_distance_long toggle.force_coast_via_distance_long = toggle.openpilot_longitudinal and distance_button_control_long == BUTTON_FUNCTIONS["FORCE_COAST"] @@ -827,7 +826,7 @@ class FrogPilotVariables: toggle.personality_profile_via_distance_long = toggle.openpilot_longitudinal and distance_button_control_long == BUTTON_FUNCTIONS["PERSONALITY_PROFILE"] toggle.traffic_mode_via_distance_long = toggle.openpilot_longitudinal and distance_button_control_long == BUTTON_FUNCTIONS["TRAFFIC_MODE"] - distance_button_control_very_long = params.get_int("VeryLongDistanceButtonControl") if tuning_level >= level["VeryLongDistanceButtonControl"] else default.get_int("VeryLongDistanceButtonControl") + distance_button_control_very_long = params.get_int("VeryLongDistanceButtonControl") if toggle.tuning_level >= level["VeryLongDistanceButtonControl"] else default.get_int("VeryLongDistanceButtonControl") toggle.experimental_mode_via_distance_very_long = toggle.openpilot_longitudinal and distance_button_control_very_long == BUTTON_FUNCTIONS["EXPERIMENTAL_MODE"] toggle.experimental_mode_via_press |= toggle.experimental_mode_via_distance_very_long toggle.force_coast_via_distance_very_long = toggle.openpilot_longitudinal and distance_button_control_very_long == BUTTON_FUNCTIONS["FORCE_COAST"] @@ -836,40 +835,40 @@ class FrogPilotVariables: toggle.personality_profile_via_distance_very_long = toggle.openpilot_longitudinal and distance_button_control_very_long == BUTTON_FUNCTIONS["PERSONALITY_PROFILE"] toggle.traffic_mode_via_distance_very_long = toggle.openpilot_longitudinal and distance_button_control_very_long == BUTTON_FUNCTIONS["TRAFFIC_MODE"] - toggle.experimental_gm_tune = toggle.openpilot_longitudinal and toggle.car_make == "gm" and (params.get_bool("ExperimentalGMTune") if tuning_level >= level["ExperimentalGMTune"] else default.get_bool("ExperimentalGMTune")) + toggle.experimental_gm_tune = toggle.openpilot_longitudinal and toggle.car_make == "gm" and (params.get_bool("ExperimentalGMTune") if toggle.tuning_level >= level["ExperimentalGMTune"] else default.get_bool("ExperimentalGMTune")) toggle.stoppingDecelRate = 0.3 if toggle.experimental_gm_tune else toggle.stoppingDecelRate toggle.vEgoStarting = 0.15 if toggle.experimental_gm_tune else toggle.vEgoStarting toggle.vEgoStopping = 0.15 if toggle.experimental_gm_tune else toggle.vEgoStopping - toggle.force_fingerprint = (params.get_bool("ForceFingerprint") if tuning_level >= level["ForceFingerprint"] else default.get_bool("ForceFingerprint")) and toggle.car_model is not None + toggle.force_fingerprint = (params.get_bool("ForceFingerprint") if toggle.tuning_level >= level["ForceFingerprint"] else default.get_bool("ForceFingerprint")) and toggle.car_model is not None - toggle.frogsgomoo_tweak = toggle.openpilot_longitudinal and toggle.car_make == "toyota" and (params.get_bool("FrogsGoMoosTweak") if tuning_level >= level["FrogsGoMoosTweak"] else default.get_bool("FrogsGoMoosTweak")) + toggle.frogsgomoo_tweak = toggle.openpilot_longitudinal and toggle.car_make == "toyota" and (params.get_bool("FrogsGoMoosTweak") if toggle.tuning_level >= level["FrogsGoMoosTweak"] else default.get_bool("FrogsGoMoosTweak")) toggle.stoppingDecelRate = 0.01 if toggle.frogsgomoo_tweak else toggle.stoppingDecelRate toggle.vEgoStarting = 0.1 if toggle.frogsgomoo_tweak else toggle.vEgoStarting toggle.vEgoStopping = 0.5 if toggle.frogsgomoo_tweak else toggle.vEgoStopping - toggle.holiday_themes = params.get_bool("HolidayThemes") if tuning_level >= level["HolidayThemes"] else default.get_bool("HolidayThemes") + toggle.holiday_themes = params.get_bool("HolidayThemes") if toggle.tuning_level >= level["HolidayThemes"] else default.get_bool("HolidayThemes") toggle.current_holiday_theme = holiday_theme if toggle.holiday_themes else "stock" - toggle.honda_alt_Tune = toggle.openpilot_longitudinal and toggle.car_make == "honda" and honda_nidec and (params.get_bool("HondaAltTune") if tuning_level >= level["HondaAltTune"] else default.get_bool("HondaAltTune")) - toggle.honda_low_speed_pedal = toggle.openpilot_longitudinal and toggle.car_make == "honda" and toggle.has_pedal and (params.get_bool("HondaLowSpeedPedal") if tuning_level >= level["HondaLowSpeedPedal"] else default.get_bool("HondaLowSpeedPedal")) - toggle.honda_nidec_max_brake = toggle.openpilot_longitudinal and toggle.car_make == "honda" and honda_nidec and (params.get_bool("HondaMaxBrake") if tuning_level >= level["HondaMaxBrake"] else default.get_bool("HondaMaxBrake")) + toggle.honda_alt_Tune = toggle.openpilot_longitudinal and toggle.car_make == "honda" and honda_nidec and (params.get_bool("HondaAltTune") if toggle.tuning_level >= level["HondaAltTune"] else default.get_bool("HondaAltTune")) + toggle.honda_low_speed_pedal = toggle.openpilot_longitudinal and toggle.car_make == "honda" and toggle.has_pedal and (params.get_bool("HondaLowSpeedPedal") if toggle.tuning_level >= level["HondaLowSpeedPedal"] else default.get_bool("HondaLowSpeedPedal")) + toggle.honda_nidec_max_brake = toggle.openpilot_longitudinal and toggle.car_make == "honda" and honda_nidec and (params.get_bool("HondaMaxBrake") if toggle.tuning_level >= level["HondaMaxBrake"] else default.get_bool("HondaMaxBrake")) - toggle.lane_changes = params.get_bool("LaneChanges") if tuning_level >= level["LaneChanges"] else default.get_bool("LaneChanges") - toggle.lane_change_delay = params.get_float("LaneChangeTime") if toggle.lane_changes and tuning_level >= level["LaneChangeTime"] else default.get_float("LaneChangeTime") - toggle.lane_detection_width = params.get_float("LaneDetectionWidth") * distance_conversion if toggle.lane_changes and tuning_level >= level["LaneDetectionWidth"] else default.get_float("LaneDetectionWidth") * CV.FOOT_TO_METER + toggle.lane_changes = params.get_bool("LaneChanges") if toggle.tuning_level >= level["LaneChanges"] else default.get_bool("LaneChanges") + toggle.lane_change_delay = params.get_float("LaneChangeTime") if toggle.lane_changes and toggle.tuning_level >= level["LaneChangeTime"] else default.get_float("LaneChangeTime") + toggle.lane_detection_width = params.get_float("LaneDetectionWidth") * distance_conversion if toggle.lane_changes and toggle.tuning_level >= level["LaneDetectionWidth"] else default.get_float("LaneDetectionWidth") * CV.FOOT_TO_METER toggle.lane_detection = toggle.lane_detection_width > 0 - toggle.minimum_lane_change_speed = params.get_float("MinimumLaneChangeSpeed") * speed_conversion if toggle.lane_changes and tuning_level >= level["MinimumLaneChangeSpeed"] else default.get_float("MinimumLaneChangeSpeed") * CV.MPH_TO_MS - toggle.nudgeless = toggle.lane_changes and (params.get_bool("NudgelessLaneChange") if tuning_level >= level["NudgelessLaneChange"] else default.get_bool("NudgelessLaneChange")) - toggle.one_lane_change = toggle.lane_changes and (params.get_bool("OneLaneChange") if tuning_level >= level["OneLaneChange"] else default.get_bool("OneLaneChange")) + toggle.minimum_lane_change_speed = params.get_float("MinimumLaneChangeSpeed") * speed_conversion if toggle.lane_changes and toggle.tuning_level >= level["MinimumLaneChangeSpeed"] else default.get_float("MinimumLaneChangeSpeed") * CV.MPH_TO_MS + toggle.nudgeless = toggle.lane_changes and (params.get_bool("NudgelessLaneChange") if toggle.tuning_level >= level["NudgelessLaneChange"] else default.get_bool("NudgelessLaneChange")) + toggle.one_lane_change = toggle.lane_changes and (params.get_bool("OneLaneChange") if toggle.tuning_level >= level["OneLaneChange"] else default.get_bool("OneLaneChange")) - lateral_tuning = params.get_bool("LateralTune") if tuning_level >= level["LateralTune"] else default.get_bool("LateralTune") - toggle.force_torque_controller = lateral_tuning and not is_torque_car and (params.get_bool("ForceTorqueController") if tuning_level >= level["ForceTorqueController"] else default.get_bool("ForceTorqueController")) - toggle.nnff = lateral_tuning and has_nnff and not is_angle_car and (params.get_bool("NNFF") if tuning_level >= level["NNFF"] else default.get_bool("NNFF")) - toggle.nnff_lite = not toggle.nnff and lateral_tuning and not is_angle_car and (params.get_bool("NNFFLite") if tuning_level >= level["NNFFLite"] else default.get_bool("NNFFLite")) - toggle.use_turn_desires = lateral_tuning and (params.get_bool("TurnDesires") if tuning_level >= level["TurnDesires"] else default.get_bool("TurnDesires")) + lateral_tuning = params.get_bool("LateralTune") if toggle.tuning_level >= level["LateralTune"] else default.get_bool("LateralTune") + toggle.force_torque_controller = lateral_tuning and not is_torque_car and (params.get_bool("ForceTorqueController") if toggle.tuning_level >= level["ForceTorqueController"] else default.get_bool("ForceTorqueController")) + toggle.nnff = lateral_tuning and has_nnff and not is_angle_car and (params.get_bool("NNFF") if toggle.tuning_level >= level["NNFF"] else default.get_bool("NNFF")) + toggle.nnff_lite = not toggle.nnff and lateral_tuning and not is_angle_car and (params.get_bool("NNFFLite") if toggle.tuning_level >= level["NNFFLite"] else default.get_bool("NNFFLite")) + toggle.use_turn_desires = lateral_tuning and (params.get_bool("TurnDesires") if toggle.tuning_level >= level["TurnDesires"] else default.get_bool("TurnDesires")) - lkas_button_control = (params.get_int("LKASButtonControl") if tuning_level >= level["LKASButtonControl"] else default.get_int("LKASButtonControl")) if toggle.car_make != "subaru" else 0 + lkas_button_control = (params.get_int("LKASButtonControl") if toggle.tuning_level >= level["LKASButtonControl"] else default.get_int("LKASButtonControl")) if toggle.car_make != "subaru" else 0 toggle.experimental_mode_via_lkas = toggle.openpilot_longitudinal and lkas_button_control == BUTTON_FUNCTIONS["EXPERIMENTAL_MODE"] toggle.experimental_mode_via_press |= toggle.experimental_mode_via_lkas toggle.force_coast_via_lkas = toggle.openpilot_longitudinal and lkas_button_control == BUTTON_FUNCTIONS["FORCE_COAST"] @@ -878,24 +877,24 @@ class FrogPilotVariables: toggle.personality_profile_via_lkas = toggle.openpilot_longitudinal and lkas_button_control == BUTTON_FUNCTIONS["PERSONALITY_PROFILE"] toggle.traffic_mode_via_lkas = toggle.openpilot_longitudinal and lkas_button_control == BUTTON_FUNCTIONS["TRAFFIC_MODE"] - toggle.lock_doors_timer = params.get_int("LockDoorsTimer") if toggle.car_make == "toyota" and tuning_level >= level["LockDoorsTimer"] else default.get_int("LockDoorsTimer") + toggle.lock_doors_timer = params.get_int("LockDoorsTimer") if toggle.car_make == "toyota" and toggle.tuning_level >= level["LockDoorsTimer"] else default.get_int("LockDoorsTimer") - toggle.long_pitch = toggle.openpilot_longitudinal and toggle.car_make == "gm" and (params.get_bool("LongPitch") if tuning_level >= level["LongPitch"] else default.get_bool("LongPitch")) + toggle.long_pitch = toggle.openpilot_longitudinal and toggle.car_make == "gm" and (params.get_bool("LongPitch") if toggle.tuning_level >= level["LongPitch"] else default.get_bool("LongPitch")) - longitudinal_tuning = toggle.openpilot_longitudinal and (params.get_bool("LongitudinalTune") if tuning_level >= level["LongitudinalTune"] else default.get_bool("LongitudinalTune")) - toggle.acceleration_profile = params.get_int("AccelerationProfile") if longitudinal_tuning and tuning_level >= level["AccelerationProfile"] else default.get_int("AccelerationProfile") - toggle.deceleration_profile = params.get_int("DecelerationProfile") if longitudinal_tuning and tuning_level >= level["DecelerationProfile"] else default.get_int("DecelerationProfile") - toggle.human_acceleration = longitudinal_tuning and (params.get_bool("HumanAcceleration") if tuning_level >= level["HumanAcceleration"] else default.get_bool("HumanAcceleration")) - toggle.human_following = longitudinal_tuning and (params.get_bool("HumanFollowing") if tuning_level >= level["HumanFollowing"] else default.get_bool("HumanFollowing")) - toggle.human_lane_changes = longitudinal_tuning and has_radar and (params.get_bool("HumanLaneChanges") if tuning_level >= level["HumanLaneChanges"] else default.get_bool("HumanLaneChanges")) - toggle.lead_detection_probability = np.clip(params.get_int("LeadDetectionThreshold") / 100, 0.25, 0.50) if longitudinal_tuning and tuning_level >= level["LeadDetectionThreshold"] else default.get_int("LeadDetectionThreshold") / 100 - toggle.taco_tune = longitudinal_tuning and (params.get_bool("TacoTune") if tuning_level >= level["TacoTune"] else default.get_bool("TacoTune")) + longitudinal_tuning = toggle.openpilot_longitudinal and (params.get_bool("LongitudinalTune") if toggle.tuning_level >= level["LongitudinalTune"] else default.get_bool("LongitudinalTune")) + toggle.acceleration_profile = params.get_int("AccelerationProfile") if longitudinal_tuning and toggle.tuning_level >= level["AccelerationProfile"] else default.get_int("AccelerationProfile") + toggle.deceleration_profile = params.get_int("DecelerationProfile") if longitudinal_tuning and toggle.tuning_level >= level["DecelerationProfile"] else default.get_int("DecelerationProfile") + toggle.human_acceleration = longitudinal_tuning and (params.get_bool("HumanAcceleration") if toggle.tuning_level >= level["HumanAcceleration"] else default.get_bool("HumanAcceleration")) + toggle.human_following = longitudinal_tuning and (params.get_bool("HumanFollowing") if toggle.tuning_level >= level["HumanFollowing"] else default.get_bool("HumanFollowing")) + toggle.human_lane_changes = longitudinal_tuning and has_radar and (params.get_bool("HumanLaneChanges") if toggle.tuning_level >= level["HumanLaneChanges"] else default.get_bool("HumanLaneChanges")) + toggle.lead_detection_probability = np.clip(params.get_int("LeadDetectionThreshold") / 100, 0.25, 0.50) if longitudinal_tuning and toggle.tuning_level >= level["LeadDetectionThreshold"] else default.get_int("LeadDetectionThreshold") / 100 + toggle.taco_tune = longitudinal_tuning and (params.get_bool("TacoTune") if toggle.tuning_level >= level["TacoTune"] else default.get_bool("TacoTune")) toggle.available_models = (params.get("AvailableModels", encoding="utf-8") or "") + f",{DEFAULT_MODEL}" toggle.available_model_names = (params.get("AvailableModelNames", encoding="utf-8") or "") + f",{DEFAULT_MODEL_NAME}" downloaded_models = [model for model in toggle.available_models.split(",") if (MODELS_PATH / f"{model}.thneed").is_file() or all((MODELS_PATH / f"{model}_{filename}").is_file() for filename, _ in TINYGRAD_FILES)] model_versions = (params.get("ModelVersions", encoding="utf-8") or "") + f",{DEFAULT_MODEL_VERSION}" - toggle.model_randomizer = params.get_bool("ModelRandomizer") if tuning_level >= level["ModelRandomizer"] else default.get_bool("ModelRandomizer") + toggle.model_randomizer = params.get_bool("ModelRandomizer") if toggle.tuning_level >= level["ModelRandomizer"] else default.get_bool("ModelRandomizer") if toggle.model_randomizer: if not started: blacklisted_models = (params.get("BlacklistedModels", encoding="utf-8") or "").split(",") @@ -904,7 +903,7 @@ class FrogPilotVariables: toggle.model_name = "Mystery Model 👻" toggle.model_version = dict(zip(toggle.available_models.split(","), model_versions.split(","))).get(toggle.model, DEFAULT_MODEL_VERSION) else: - model = ((params.get("Model", encoding="utf-8") if tuning_level >= level["Model"] else default.get("Model", encoding="utf-8")) or DEFAULT_MODEL).removesuffix("_default") + model = ((params.get("Model", encoding="utf-8") if toggle.tuning_level >= level["Model"] else default.get("Model", encoding="utf-8")) or DEFAULT_MODEL).removesuffix("_default") if model in downloaded_models: toggle.model = model toggle.model_name = dict(zip(toggle.available_models.split(","), toggle.available_model_names.split(","))).get(toggle.model, DEFAULT_MODEL_NAME) @@ -917,31 +916,31 @@ class FrogPilotVariables: toggle.classic_longitudinal = toggle.model_version in {"v1", "v2", "v3", "v4", "v5", "v6"} toggle.tinygrad_model = not toggle.classic_model and toggle.model_version not in {"v5", "v6"} - toggle.model_ui = params.get_bool("ModelUI") if tuning_level >= level["ModelUI"] else default.get_bool("ModelUI") - toggle.dynamic_path_width = toggle.model_ui and (params.get_bool("DynamicPathWidth") if tuning_level >= level["DynamicPathWidth"] else default.get_bool("DynamicPathWidth")) - toggle.lane_line_width = params.get_int("LaneLinesWidth") * small_distance_conversion / 200 if toggle.model_ui and tuning_level >= level["LaneLinesWidth"] else default.get_int("LaneLinesWidth") * CV.INCH_TO_CM / 200 - toggle.path_edge_width = params.get_int("PathEdgeWidth") if toggle.model_ui and tuning_level >= level["PathEdgeWidth"] else default.get_int("PathEdgeWidth") - toggle.path_width = params.get_float("PathWidth") * distance_conversion / 2 if toggle.model_ui and tuning_level >= level["PathWidth"] else default.get_float("PathWidth") * CV.FOOT_TO_METER / 2 - toggle.road_edge_width = params.get_int("RoadEdgesWidth") * small_distance_conversion / 200 if toggle.model_ui and tuning_level >= level["RoadEdgesWidth"] else default.get_int("RoadEdgesWidth") * CV.INCH_TO_CM / 200 - toggle.unlimited_road_ui_length = toggle.model_ui and (params.get_bool("UnlimitedLength") if tuning_level >= level["UnlimitedLength"] else default.get_bool("UnlimitedLength")) + toggle.model_ui = params.get_bool("ModelUI") if toggle.tuning_level >= level["ModelUI"] else default.get_bool("ModelUI") + toggle.dynamic_path_width = toggle.model_ui and (params.get_bool("DynamicPathWidth") if toggle.tuning_level >= level["DynamicPathWidth"] else default.get_bool("DynamicPathWidth")) + toggle.lane_line_width = params.get_int("LaneLinesWidth") * small_distance_conversion / 200 if toggle.model_ui and toggle.tuning_level >= level["LaneLinesWidth"] else default.get_int("LaneLinesWidth") * CV.INCH_TO_CM / 200 + toggle.path_edge_width = params.get_int("PathEdgeWidth") if toggle.model_ui and toggle.tuning_level >= level["PathEdgeWidth"] else default.get_int("PathEdgeWidth") + toggle.path_width = params.get_float("PathWidth") * distance_conversion / 2 if toggle.model_ui and toggle.tuning_level >= level["PathWidth"] else default.get_float("PathWidth") * CV.FOOT_TO_METER / 2 + toggle.road_edge_width = params.get_int("RoadEdgesWidth") * small_distance_conversion / 200 if toggle.model_ui and toggle.tuning_level >= level["RoadEdgesWidth"] else default.get_int("RoadEdgesWidth") * CV.INCH_TO_CM / 200 + toggle.unlimited_road_ui_length = toggle.model_ui and (params.get_bool("UnlimitedLength") if toggle.tuning_level >= level["UnlimitedLength"] else default.get_bool("UnlimitedLength")) - toggle.navigation_ui = params.get_bool("NavigationUI") if tuning_level >= level["NavigationUI"] else default.get_bool("NavigationUI") - toggle.big_map = toggle.navigation_ui and (params.get_bool("BigMap") if tuning_level >= level["BigMap"] else default.get_bool("BigMap")) - toggle.full_map = toggle.big_map and (params.get_bool("FullMap") if tuning_level >= level["FullMap"] else default.get_bool("FullMap")) - toggle.map_style = params.get_int("MapStyle") if toggle.navigation_ui and tuning_level >= level["MapStyle"] else default.get_int("MapStyle") - toggle.road_name_ui = toggle.navigation_ui and (params.get_bool("RoadNameUI") if tuning_level >= level["RoadNameUI"] else default.get_bool("RoadNameUI")) - toggle.show_speed_limits = toggle.navigation_ui and (params.get_bool("ShowSpeedLimits") if tuning_level >= level["ShowSpeedLimits"] else default.get_bool("ShowSpeedLimits")) - toggle.speed_limit_vienna = toggle.navigation_ui and (params.get_bool("UseVienna") if tuning_level >= level["UseVienna"] else default.get_bool("UseVienna")) + toggle.navigation_ui = params.get_bool("NavigationUI") if toggle.tuning_level >= level["NavigationUI"] else default.get_bool("NavigationUI") + toggle.big_map = toggle.navigation_ui and (params.get_bool("BigMap") if toggle.tuning_level >= level["BigMap"] else default.get_bool("BigMap")) + toggle.full_map = toggle.big_map and (params.get_bool("FullMap") if toggle.tuning_level >= level["FullMap"] else default.get_bool("FullMap")) + toggle.map_style = params.get_int("MapStyle") if toggle.navigation_ui and toggle.tuning_level >= level["MapStyle"] else default.get_int("MapStyle") + toggle.road_name_ui = toggle.navigation_ui and (params.get_bool("RoadNameUI") if toggle.tuning_level >= level["RoadNameUI"] else default.get_bool("RoadNameUI")) + toggle.show_speed_limits = toggle.navigation_ui and (params.get_bool("ShowSpeedLimits") if toggle.tuning_level >= level["ShowSpeedLimits"] else default.get_bool("ShowSpeedLimits")) + toggle.speed_limit_vienna = toggle.navigation_ui and (params.get_bool("UseVienna") if toggle.tuning_level >= level["UseVienna"] else default.get_bool("UseVienna")) if not started: toggle.old_long_api = toggle.openpilot_longitudinal and toggle.car_make == "gm" and toggle.has_cc_long and not toggle.has_pedal - toggle.old_long_api |= toggle.openpilot_longitudinal and toggle.car_make == "hyundai" and not (params.get_bool("NewLongAPI") if tuning_level >= level["NewLongAPI"] else default.get_bool("NewLongAPI")) + toggle.old_long_api |= toggle.openpilot_longitudinal and toggle.car_make == "hyundai" and not (params.get_bool("NewLongAPI") if toggle.tuning_level >= level["NewLongAPI"] else default.get_bool("NewLongAPI")) - personalize_openpilot = params.get_bool("PersonalizeOpenpilot") if tuning_level >= level["PersonalizeOpenpilot"] else default.get_bool("PersonalizeOpenpilot") + personalize_openpilot = params.get_bool("PersonalizeOpenpilot") if toggle.tuning_level >= level["PersonalizeOpenpilot"] else default.get_bool("PersonalizeOpenpilot") toggle.color_scheme = toggle.current_holiday_theme if toggle.current_holiday_theme != "stock" else params.get("CustomColors", encoding="utf-8") if personalize_openpilot else "stock" toggle.distance_icons = toggle.current_holiday_theme if toggle.current_holiday_theme != "stock" else params.get("CustomDistanceIcons", encoding="utf-8") if personalize_openpilot else "stock" toggle.icon_pack = toggle.current_holiday_theme if toggle.current_holiday_theme != "stock" else params.get("CustomIcons", encoding="utf-8") if personalize_openpilot else "stock" - toggle.random_themes = personalize_openpilot and (params.get_bool("RandomThemes") if tuning_level >= level["RandomThemes"] else default.get_bool("RandomThemes")) + toggle.random_themes = personalize_openpilot and (params.get_bool("RandomThemes") if toggle.tuning_level >= level["RandomThemes"] else default.get_bool("RandomThemes")) toggle.signal_icons = toggle.current_holiday_theme if toggle.current_holiday_theme != "stock" else params.get("CustomSignals", encoding="utf-8") if personalize_openpilot else "stock" toggle.sound_pack = toggle.current_holiday_theme if toggle.current_holiday_theme != "stock" else params.get("CustomSounds", encoding="utf-8") if personalize_openpilot else "stock" if not toggle.random_themes: @@ -949,105 +948,105 @@ class FrogPilotVariables: else: toggle.wheel_image = next((file.resolve().stem for file in (ACTIVE_THEME_PATH / "steering_wheel").glob("wheel.*")), "stock") - quality_of_life_lateral = params.get_bool("QOLLateral") if tuning_level >= level["QOLLateral"] else default.get_bool("QOLLateral") - toggle.pause_lateral_below_speed = params.get_int("PauseLateralSpeed") * speed_conversion if quality_of_life_lateral and tuning_level >= level["PauseLateralSpeed"] else default.get_int("PauseLateralSpeed") * CV.MPH_TO_MS - toggle.pause_lateral_below_signal = toggle.pause_lateral_below_speed != 0 and (params.get_bool("PauseLateralOnSignal") if tuning_level >= level["PauseLateralOnSignal"] else default.get_bool("PauseLateralOnSignal")) + quality_of_life_lateral = params.get_bool("QOLLateral") if toggle.tuning_level >= level["QOLLateral"] else default.get_bool("QOLLateral") + toggle.pause_lateral_below_speed = params.get_int("PauseLateralSpeed") * speed_conversion if quality_of_life_lateral and toggle.tuning_level >= level["PauseLateralSpeed"] else default.get_int("PauseLateralSpeed") * CV.MPH_TO_MS + toggle.pause_lateral_below_signal = toggle.pause_lateral_below_speed != 0 and (params.get_bool("PauseLateralOnSignal") if toggle.tuning_level >= level["PauseLateralOnSignal"] else default.get_bool("PauseLateralOnSignal")) - quality_of_life_longitudinal = toggle.openpilot_longitudinal and (params.get_bool("QOLLongitudinal") if tuning_level >= level["QOLLongitudinal"] else default.get_bool("QOLLongitudinal")) - toggle.cruise_increase = params.get_int("CustomCruise") if quality_of_life_longitudinal and not pcm_cruise and tuning_level >= level["CustomCruise"] else default.get_int("CustomCruise") - toggle.cruise_increase_long = params.get_int("CustomCruiseLong") if quality_of_life_longitudinal and not pcm_cruise and tuning_level >= level["CustomCruiseLong"] else default.get_int("CustomCruiseLong") - toggle.force_stops = quality_of_life_longitudinal and (params.get_bool("ForceStops") if tuning_level >= level["ForceStops"] else default.get_bool("ForceStops")) - toggle.increase_stopped_distance = params.get_int("IncreasedStoppedDistance") * distance_conversion if quality_of_life_longitudinal and tuning_level >= level["IncreasedStoppedDistance"] else default.get_int("IncreasedStoppedDistance") * CV.FOOT_TO_METER - map_gears = quality_of_life_longitudinal and (params.get_bool("MapGears") if tuning_level >= level["MapGears"] else default.get_bool("MapGears")) - toggle.map_acceleration = map_gears and (params.get_bool("MapAcceleration") if tuning_level >= level["MapAcceleration"] else default.get_bool("MapAcceleration")) - toggle.map_deceleration = map_gears and (params.get_bool("MapDeceleration") if tuning_level >= level["MapDeceleration"] else default.get_bool("MapDeceleration")) - toggle.reverse_cruise_increase = quality_of_life_longitudinal and toggle.car_make == "toyota" and pcm_cruise and (params.get_bool("ReverseCruise") if tuning_level >= level["ReverseCruise"] else default.get_bool("ReverseCruise")) - toggle.set_speed_offset = params.get_int("SetSpeedOffset") * (1 if toggle.is_metric else CV.MPH_TO_KPH) if quality_of_life_longitudinal and not pcm_cruise and tuning_level >= level["SetSpeedOffset"] else default.get_int("SetSpeedOffset") * CV.MPH_TO_KPH - toggle.weather_presets = quality_of_life_longitudinal and (params.get_bool("WeatherPresets") if tuning_level >= level["WeatherPresets"] else default.get_bool("WeatherPresets")) - toggle.increase_following_distance_low_visibility = params.get_float("IncreaseFollowingLowVisibility") if toggle.weather_presets and tuning_level >= level["IncreaseFollowingLowVisibility"] else default.get_float("IncreaseFollowingLowVisibility") - toggle.increase_following_distance_rain = params.get_float("IncreaseFollowingRain") if toggle.weather_presets and tuning_level >= level["IncreaseFollowingRain"] else default.get_float("IncreaseFollowingRain") - toggle.increase_following_distance_rain_storm = params.get_float("IncreaseFollowingRainStorm") if toggle.weather_presets and tuning_level >= level["IncreaseFollowingRainStorm"] else default.get_float("IncreaseFollowingRainStorm") - toggle.increase_following_distance_snow = params.get_float("IncreaseFollowingSnow") if toggle.weather_presets and tuning_level >= level["IncreaseFollowingSnow"] else default.get_float("IncreaseFollowingSnow") - toggle.increase_stopped_distance_low_visibility = params.get_int("IncreasedStoppedDistanceLowVisibility") * distance_conversion if toggle.weather_presets and tuning_level >= level["IncreasedStoppedDistanceLowVisibility"] else default.get_int("IncreasedStoppedDistanceLowVisibility") * CV.FOOT_TO_METER - toggle.increase_stopped_distance_rain = params.get_int("IncreasedStoppedDistanceRain") * distance_conversion if toggle.weather_presets and tuning_level >= level["IncreasedStoppedDistanceRain"] else default.get_int("IncreasedStoppedDistanceRain") * CV.FOOT_TO_METER - toggle.increase_stopped_distance_rain_storm = params.get_int("IncreasedStoppedDistanceRainStorm") * distance_conversion if toggle.weather_presets and tuning_level >= level["IncreasedStoppedDistanceRainStorm"] else default.get_int("IncreasedStoppedDistanceRainStorm") * CV.FOOT_TO_METER - toggle.increase_stopped_distance_snow = params.get_int("IncreasedStoppedDistanceSnow") * distance_conversion if toggle.weather_presets and tuning_level >= level["IncreasedStoppedDistanceSnow"] else default.get_int("IncreasedStoppedDistanceSnow") * CV.FOOT_TO_METER - toggle.reduce_acceleration_low_visibility = (params.get_int("ReduceAccelerationLowVisibility") if toggle.weather_presets and tuning_level >= level["ReduceAccelerationLowVisibility"] else default.get_int("ReduceAccelerationLowVisibility")) / 100 - toggle.reduce_acceleration_rain = (params.get_int("ReduceAccelerationRain") if toggle.weather_presets and tuning_level >= level["ReduceAccelerationRain"] else default.get_int("ReduceAccelerationRain")) / 100 - toggle.reduce_acceleration_rain_storm = (params.get_int("ReduceAccelerationRainStorm") if toggle.weather_presets and tuning_level >= level["ReduceAccelerationRainStorm"] else default.get_int("ReduceAccelerationRainStorm")) / 100 - toggle.reduce_acceleration_snow = (params.get_int("ReduceAccelerationSnow") if toggle.weather_presets and tuning_level >= level["ReduceAccelerationSnow"] else default.get_int("ReduceAccelerationSnow")) / 100 - toggle.reduce_lateral_acceleration_low_visibility = (params.get_int("ReduceLateralAccelerationLowVisibility") if toggle.weather_presets and tuning_level >= level["ReduceLateralAccelerationLowVisibility"] else default.get_int("ReduceLateralAccelerationLowVisibility")) / 100 - toggle.reduce_lateral_acceleration_rain = (params.get_int("ReduceLateralAccelerationRain") if toggle.weather_presets and tuning_level >= level["ReduceLateralAccelerationRain"] else default.get_int("ReduceLateralAccelerationRain")) / 100 - toggle.reduce_lateral_acceleration_rain_storm = (params.get_int("ReduceLateralAccelerationRainStorm") if toggle.weather_presets and tuning_level >= level["ReduceLateralAccelerationRainStorm"] else default.get_int("ReduceLateralAccelerationRainStorm")) / 100 - toggle.reduce_lateral_acceleration_snow = (params.get_int("ReduceLateralAccelerationSnow") if toggle.weather_presets and tuning_level >= level["ReduceLateralAccelerationSnow"] else default.get_int("ReduceLateralAccelerationSnow")) / 100 + quality_of_life_longitudinal = toggle.openpilot_longitudinal and (params.get_bool("QOLLongitudinal") if toggle.tuning_level >= level["QOLLongitudinal"] else default.get_bool("QOLLongitudinal")) + toggle.cruise_increase = params.get_int("CustomCruise") if quality_of_life_longitudinal and not pcm_cruise and toggle.tuning_level >= level["CustomCruise"] else default.get_int("CustomCruise") + toggle.cruise_increase_long = params.get_int("CustomCruiseLong") if quality_of_life_longitudinal and not pcm_cruise and toggle.tuning_level >= level["CustomCruiseLong"] else default.get_int("CustomCruiseLong") + toggle.force_stops = quality_of_life_longitudinal and (params.get_bool("ForceStops") if toggle.tuning_level >= level["ForceStops"] else default.get_bool("ForceStops")) + toggle.increase_stopped_distance = params.get_int("IncreasedStoppedDistance") * distance_conversion if quality_of_life_longitudinal and toggle.tuning_level >= level["IncreasedStoppedDistance"] else default.get_int("IncreasedStoppedDistance") * CV.FOOT_TO_METER + map_gears = quality_of_life_longitudinal and (params.get_bool("MapGears") if toggle.tuning_level >= level["MapGears"] else default.get_bool("MapGears")) + toggle.map_acceleration = map_gears and (params.get_bool("MapAcceleration") if toggle.tuning_level >= level["MapAcceleration"] else default.get_bool("MapAcceleration")) + toggle.map_deceleration = map_gears and (params.get_bool("MapDeceleration") if toggle.tuning_level >= level["MapDeceleration"] else default.get_bool("MapDeceleration")) + toggle.reverse_cruise_increase = quality_of_life_longitudinal and toggle.car_make == "toyota" and pcm_cruise and (params.get_bool("ReverseCruise") if toggle.tuning_level >= level["ReverseCruise"] else default.get_bool("ReverseCruise")) + toggle.set_speed_offset = params.get_int("SetSpeedOffset") * (1 if toggle.is_metric else CV.MPH_TO_KPH) if quality_of_life_longitudinal and not pcm_cruise and toggle.tuning_level >= level["SetSpeedOffset"] else default.get_int("SetSpeedOffset") * CV.MPH_TO_KPH + toggle.weather_presets = quality_of_life_longitudinal and (params.get_bool("WeatherPresets") if toggle.tuning_level >= level["WeatherPresets"] else default.get_bool("WeatherPresets")) + toggle.increase_following_distance_low_visibility = params.get_float("IncreaseFollowingLowVisibility") if toggle.weather_presets and toggle.tuning_level >= level["IncreaseFollowingLowVisibility"] else default.get_float("IncreaseFollowingLowVisibility") + toggle.increase_following_distance_rain = params.get_float("IncreaseFollowingRain") if toggle.weather_presets and toggle.tuning_level >= level["IncreaseFollowingRain"] else default.get_float("IncreaseFollowingRain") + toggle.increase_following_distance_rain_storm = params.get_float("IncreaseFollowingRainStorm") if toggle.weather_presets and toggle.tuning_level >= level["IncreaseFollowingRainStorm"] else default.get_float("IncreaseFollowingRainStorm") + toggle.increase_following_distance_snow = params.get_float("IncreaseFollowingSnow") if toggle.weather_presets and toggle.tuning_level >= level["IncreaseFollowingSnow"] else default.get_float("IncreaseFollowingSnow") + toggle.increase_stopped_distance_low_visibility = params.get_int("IncreasedStoppedDistanceLowVisibility") * distance_conversion if toggle.weather_presets and toggle.tuning_level >= level["IncreasedStoppedDistanceLowVisibility"] else default.get_int("IncreasedStoppedDistanceLowVisibility") * CV.FOOT_TO_METER + toggle.increase_stopped_distance_rain = params.get_int("IncreasedStoppedDistanceRain") * distance_conversion if toggle.weather_presets and toggle.tuning_level >= level["IncreasedStoppedDistanceRain"] else default.get_int("IncreasedStoppedDistanceRain") * CV.FOOT_TO_METER + toggle.increase_stopped_distance_rain_storm = params.get_int("IncreasedStoppedDistanceRainStorm") * distance_conversion if toggle.weather_presets and toggle.tuning_level >= level["IncreasedStoppedDistanceRainStorm"] else default.get_int("IncreasedStoppedDistanceRainStorm") * CV.FOOT_TO_METER + toggle.increase_stopped_distance_snow = params.get_int("IncreasedStoppedDistanceSnow") * distance_conversion if toggle.weather_presets and toggle.tuning_level >= level["IncreasedStoppedDistanceSnow"] else default.get_int("IncreasedStoppedDistanceSnow") * CV.FOOT_TO_METER + toggle.reduce_acceleration_low_visibility = (params.get_int("ReduceAccelerationLowVisibility") if toggle.weather_presets and toggle.tuning_level >= level["ReduceAccelerationLowVisibility"] else default.get_int("ReduceAccelerationLowVisibility")) / 100 + toggle.reduce_acceleration_rain = (params.get_int("ReduceAccelerationRain") if toggle.weather_presets and toggle.tuning_level >= level["ReduceAccelerationRain"] else default.get_int("ReduceAccelerationRain")) / 100 + toggle.reduce_acceleration_rain_storm = (params.get_int("ReduceAccelerationRainStorm") if toggle.weather_presets and toggle.tuning_level >= level["ReduceAccelerationRainStorm"] else default.get_int("ReduceAccelerationRainStorm")) / 100 + toggle.reduce_acceleration_snow = (params.get_int("ReduceAccelerationSnow") if toggle.weather_presets and toggle.tuning_level >= level["ReduceAccelerationSnow"] else default.get_int("ReduceAccelerationSnow")) / 100 + toggle.reduce_lateral_acceleration_low_visibility = (params.get_int("ReduceLateralAccelerationLowVisibility") if toggle.weather_presets and toggle.tuning_level >= level["ReduceLateralAccelerationLowVisibility"] else default.get_int("ReduceLateralAccelerationLowVisibility")) / 100 + toggle.reduce_lateral_acceleration_rain = (params.get_int("ReduceLateralAccelerationRain") if toggle.weather_presets and toggle.tuning_level >= level["ReduceLateralAccelerationRain"] else default.get_int("ReduceLateralAccelerationRain")) / 100 + toggle.reduce_lateral_acceleration_rain_storm = (params.get_int("ReduceLateralAccelerationRainStorm") if toggle.weather_presets and toggle.tuning_level >= level["ReduceLateralAccelerationRainStorm"] else default.get_int("ReduceLateralAccelerationRainStorm")) / 100 + toggle.reduce_lateral_acceleration_snow = (params.get_int("ReduceLateralAccelerationSnow") if toggle.weather_presets and toggle.tuning_level >= level["ReduceLateralAccelerationSnow"] else default.get_int("ReduceLateralAccelerationSnow")) / 100 - quality_of_life_visuals = params.get_bool("QOLVisuals") if tuning_level >= level["QOLVisuals"] else default.get_bool("QOLVisuals") - toggle.camera_view = params.get_int("CameraView") if quality_of_life_visuals and tuning_level >= level["CameraView"] else default.get_int("CameraView") - toggle.driver_camera_in_reverse = quality_of_life_visuals and (params.get_bool("DriverCamera") if tuning_level >= level["DriverCamera"] else default.get_bool("DriverCamera")) - toggle.onroad_distance_button = toggle.openpilot_longitudinal and (quality_of_life_visuals and (params.get_bool("OnroadDistanceButton") if tuning_level >= level["OnroadDistanceButton"] else default.get_bool("OnroadDistanceButton")) or toggle.debug_mode) - toggle.stopped_timer = quality_of_life_visuals and (params.get_bool("StoppedTimer") if tuning_level >= level["StoppedTimer"] else default.get_bool("StoppedTimer")) + quality_of_life_visuals = params.get_bool("QOLVisuals") if toggle.tuning_level >= level["QOLVisuals"] else default.get_bool("QOLVisuals") + toggle.camera_view = params.get_int("CameraView") if quality_of_life_visuals and toggle.tuning_level >= level["CameraView"] else default.get_int("CameraView") + toggle.driver_camera_in_reverse = quality_of_life_visuals and (params.get_bool("DriverCamera") if toggle.tuning_level >= level["DriverCamera"] else default.get_bool("DriverCamera")) + toggle.onroad_distance_button = toggle.openpilot_longitudinal and (quality_of_life_visuals and (params.get_bool("OnroadDistanceButton") if toggle.tuning_level >= level["OnroadDistanceButton"] else default.get_bool("OnroadDistanceButton")) or toggle.debug_mode) + toggle.stopped_timer = quality_of_life_visuals and (params.get_bool("StoppedTimer") if toggle.tuning_level >= level["StoppedTimer"] else default.get_bool("StoppedTimer")) - toggle.rainbow_path = params.get_bool("RainbowPath") if tuning_level >= level["RainbowPath"] else default.get_bool("RainbowPath") + toggle.rainbow_path = params.get_bool("RainbowPath") if toggle.tuning_level >= level["RainbowPath"] else default.get_bool("RainbowPath") - toggle.random_events = params.get_bool("RandomEvents") if tuning_level >= level["RandomEvents"] else default.get_bool("RandomEvents") + toggle.random_events = params.get_bool("RandomEvents") if toggle.tuning_level >= level["RandomEvents"] else default.get_bool("RandomEvents") - screen_management = params.get_bool("ScreenManagement") if tuning_level >= level["ScreenManagement"] else default.get_bool("ScreenManagement") - toggle.screen_brightness = params.get_int("ScreenBrightness") if screen_management and tuning_level >= level["ScreenBrightness"] else default.get_int("ScreenBrightness") - toggle.screen_brightness_onroad = params.get_int("ScreenBrightnessOnroad") if screen_management and tuning_level >= level["ScreenBrightnessOnroad"] else default.get_int("ScreenBrightnessOnroad") - toggle.screen_recorder = screen_management and (params.get_bool("ScreenRecorder") if tuning_level >= level["ScreenRecorder"] else default.get_bool("ScreenRecorder")) or toggle.debug_mode - toggle.screen_timeout = params.get_int("ScreenTimeout") if screen_management and tuning_level >= level["ScreenTimeout"] else default.get_int("ScreenTimeout") - toggle.screen_timeout_onroad = params.get_int("ScreenTimeoutOnroad") if screen_management and tuning_level >= level["ScreenTimeoutOnroad"] else default.get_int("ScreenTimeoutOnroad") - toggle.standby_mode = screen_management and (params.get_bool("StandbyMode") if tuning_level >= level["StandbyMode"] else default.get_bool("StandbyMode")) + screen_management = params.get_bool("ScreenManagement") if toggle.tuning_level >= level["ScreenManagement"] else default.get_bool("ScreenManagement") + toggle.screen_brightness = params.get_int("ScreenBrightness") if screen_management and toggle.tuning_level >= level["ScreenBrightness"] else default.get_int("ScreenBrightness") + toggle.screen_brightness_onroad = params.get_int("ScreenBrightnessOnroad") if screen_management and toggle.tuning_level >= level["ScreenBrightnessOnroad"] else default.get_int("ScreenBrightnessOnroad") + toggle.screen_recorder = screen_management and (params.get_bool("ScreenRecorder") if toggle.tuning_level >= level["ScreenRecorder"] else default.get_bool("ScreenRecorder")) or toggle.debug_mode + toggle.screen_timeout = params.get_int("ScreenTimeout") if screen_management and toggle.tuning_level >= level["ScreenTimeout"] else default.get_int("ScreenTimeout") + toggle.screen_timeout_onroad = params.get_int("ScreenTimeoutOnroad") if screen_management and toggle.tuning_level >= level["ScreenTimeoutOnroad"] else default.get_int("ScreenTimeoutOnroad") + toggle.standby_mode = screen_management and (params.get_bool("StandbyMode") if toggle.tuning_level >= level["StandbyMode"] else default.get_bool("StandbyMode")) - toggle.sng_hack = toggle.openpilot_longitudinal and toggle.car_make == "toyota" and not toggle.has_pedal and not has_sng and (params.get_bool("SNGHack") if tuning_level >= level["SNGHack"] else default.get_bool("SNGHack")) + toggle.sng_hack = toggle.openpilot_longitudinal and toggle.car_make == "toyota" and not toggle.has_pedal and not has_sng and (params.get_bool("SNGHack") if toggle.tuning_level >= level["SNGHack"] else default.get_bool("SNGHack")) - toggle.speed_limit_controller = toggle.openpilot_longitudinal and (params.get_bool("SpeedLimitController") if tuning_level >= level["SpeedLimitController"] else default.get_bool("SpeedLimitController")) - toggle.force_mph_dashboard = toggle.speed_limit_controller and (params.get_bool("ForceMPHDashboard") if tuning_level >= level["ForceMPHDashboard"] else default.get_bool("ForceMPHDashboard")) - toggle.map_speed_lookahead_higher = params.get_int("SLCLookaheadHigher") if toggle.speed_limit_controller and tuning_level >= level["SLCLookaheadHigher"] else default.get_int("SLCLookaheadHigher") - toggle.map_speed_lookahead_lower = params.get_int("SLCLookaheadLower") if toggle.speed_limit_controller and tuning_level >= level["SLCLookaheadLower"] else default.get_int("SLCLookaheadLower") - toggle.set_speed_limit = toggle.speed_limit_controller and (params.get_bool("SetSpeedLimit") if tuning_level >= level["SetSpeedLimit"] else default.get_bool("SetSpeedLimit")) - toggle.show_speed_limit_offset = toggle.speed_limit_controller and (params.get_bool("ShowSLCOffset") if tuning_level >= level["ShowSLCOffset"] else default.get_bool("ShowSLCOffset")) or toggle.debug_mode - slc_fallback_method = params.get_int("SLCFallback") if toggle.speed_limit_controller and tuning_level >= level["SLCFallback"] else default.get_int("SLCFallback") + toggle.speed_limit_controller = toggle.openpilot_longitudinal and (params.get_bool("SpeedLimitController") if toggle.tuning_level >= level["SpeedLimitController"] else default.get_bool("SpeedLimitController")) + toggle.force_mph_dashboard = toggle.speed_limit_controller and (params.get_bool("ForceMPHDashboard") if toggle.tuning_level >= level["ForceMPHDashboard"] else default.get_bool("ForceMPHDashboard")) + toggle.map_speed_lookahead_higher = params.get_int("SLCLookaheadHigher") if toggle.speed_limit_controller and toggle.tuning_level >= level["SLCLookaheadHigher"] else default.get_int("SLCLookaheadHigher") + toggle.map_speed_lookahead_lower = params.get_int("SLCLookaheadLower") if toggle.speed_limit_controller and toggle.tuning_level >= level["SLCLookaheadLower"] else default.get_int("SLCLookaheadLower") + toggle.set_speed_limit = toggle.speed_limit_controller and (params.get_bool("SetSpeedLimit") if toggle.tuning_level >= level["SetSpeedLimit"] else default.get_bool("SetSpeedLimit")) + toggle.show_speed_limit_offset = toggle.speed_limit_controller and (params.get_bool("ShowSLCOffset") if toggle.tuning_level >= level["ShowSLCOffset"] else default.get_bool("ShowSLCOffset")) or toggle.debug_mode + slc_fallback_method = params.get_int("SLCFallback") if toggle.speed_limit_controller and toggle.tuning_level >= level["SLCFallback"] else default.get_int("SLCFallback") toggle.slc_fallback_experimental_mode = slc_fallback_method == 1 toggle.slc_fallback_previous_speed_limit = slc_fallback_method == 2 toggle.slc_fallback_set_speed = slc_fallback_method == 0 - toggle.slc_mapbox_filler = (toggle.show_speed_limits or toggle.speed_limit_controller) and params.get("MapboxSecretKey", encoding="utf-8") != None and (params.get_bool("SLCMapboxFiller") if tuning_level >= level["SLCMapboxFiller"] else default.get_bool("SLCMapboxFiller")) - toggle.speed_limit_confirmation = toggle.speed_limit_controller and (params.get_bool("SLCConfirmation") if tuning_level >= level["SLCConfirmation"] else default.get_bool("SLCConfirmation")) - toggle.speed_limit_confirmation_higher = toggle.speed_limit_confirmation and (params.get_bool("SLCConfirmationHigher") if tuning_level >= level["SLCConfirmationHigher"] else default.get_bool("SLCConfirmationHigher")) - toggle.speed_limit_confirmation_lower = toggle.speed_limit_confirmation and (params.get_bool("SLCConfirmationLower") if tuning_level >= level["SLCConfirmationLower"] else default.get_bool("SLCConfirmationLower")) - slc_override_method = params.get_int("SLCOverride") if toggle.speed_limit_controller and tuning_level >= level["SLCOverride"] else default.get_int("SLCOverride") + toggle.slc_mapbox_filler = (toggle.show_speed_limits or toggle.speed_limit_controller) and params.get("MapboxSecretKey", encoding="utf-8") != None and (params.get_bool("SLCMapboxFiller") if toggle.tuning_level >= level["SLCMapboxFiller"] else default.get_bool("SLCMapboxFiller")) + toggle.speed_limit_confirmation = toggle.speed_limit_controller and (params.get_bool("SLCConfirmation") if toggle.tuning_level >= level["SLCConfirmation"] else default.get_bool("SLCConfirmation")) + toggle.speed_limit_confirmation_higher = toggle.speed_limit_confirmation and (params.get_bool("SLCConfirmationHigher") if toggle.tuning_level >= level["SLCConfirmationHigher"] else default.get_bool("SLCConfirmationHigher")) + toggle.speed_limit_confirmation_lower = toggle.speed_limit_confirmation and (params.get_bool("SLCConfirmationLower") if toggle.tuning_level >= level["SLCConfirmationLower"] else default.get_bool("SLCConfirmationLower")) + slc_override_method = params.get_int("SLCOverride") if toggle.speed_limit_controller and toggle.tuning_level >= level["SLCOverride"] else default.get_int("SLCOverride") toggle.speed_limit_controller_override_manual = slc_override_method == 1 toggle.speed_limit_controller_override_set_speed = slc_override_method == 2 - toggle.speed_limit_offset1 = (params.get_int("Offset1") * speed_conversion if tuning_level >= level["Offset1"] else default.get_int("Offset1") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 - toggle.speed_limit_offset2 = (params.get_int("Offset2") * speed_conversion if tuning_level >= level["Offset2"] else default.get_int("Offset2") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 - toggle.speed_limit_offset3 = (params.get_int("Offset3") * speed_conversion if tuning_level >= level["Offset3"] else default.get_int("Offset3") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 - toggle.speed_limit_offset4 = (params.get_int("Offset4") * speed_conversion if tuning_level >= level["Offset4"] else default.get_int("Offset4") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 - toggle.speed_limit_offset5 = (params.get_int("Offset5") * speed_conversion if tuning_level >= level["Offset5"] else default.get_int("Offset5") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 - toggle.speed_limit_offset6 = (params.get_int("Offset6") * speed_conversion if tuning_level >= level["Offset6"] else default.get_int("Offset6") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 - toggle.speed_limit_offset7 = (params.get_int("Offset7") * speed_conversion if tuning_level >= level["Offset7"] else default.get_int("Offset7") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 - toggle.speed_limit_priority1 = params.get("SLCPriority1", encoding="utf-8") if toggle.speed_limit_controller and tuning_level >= level["SLCPriority1"] else default.get("SLCPriority1", encoding="utf-8") - toggle.speed_limit_priority2 = params.get("SLCPriority2", encoding="utf-8") if toggle.speed_limit_controller and tuning_level >= level["SLCPriority2"] else default.get("SLCPriority2", encoding="utf-8") - toggle.speed_limit_priority3 = params.get("SLCPriority3", encoding="utf-8") if toggle.speed_limit_controller and tuning_level >= level["SLCPriority3"] else default.get("SLCPriority3", encoding="utf-8") + toggle.speed_limit_offset1 = (params.get_int("Offset1") * speed_conversion if toggle.tuning_level >= level["Offset1"] else default.get_int("Offset1") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 + toggle.speed_limit_offset2 = (params.get_int("Offset2") * speed_conversion if toggle.tuning_level >= level["Offset2"] else default.get_int("Offset2") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 + toggle.speed_limit_offset3 = (params.get_int("Offset3") * speed_conversion if toggle.tuning_level >= level["Offset3"] else default.get_int("Offset3") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 + toggle.speed_limit_offset4 = (params.get_int("Offset4") * speed_conversion if toggle.tuning_level >= level["Offset4"] else default.get_int("Offset4") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 + toggle.speed_limit_offset5 = (params.get_int("Offset5") * speed_conversion if toggle.tuning_level >= level["Offset5"] else default.get_int("Offset5") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 + toggle.speed_limit_offset6 = (params.get_int("Offset6") * speed_conversion if toggle.tuning_level >= level["Offset6"] else default.get_int("Offset6") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 + toggle.speed_limit_offset7 = (params.get_int("Offset7") * speed_conversion if toggle.tuning_level >= level["Offset7"] else default.get_int("Offset7") * CV.MPH_TO_MS) if toggle.speed_limit_controller else 0 + toggle.speed_limit_priority1 = params.get("SLCPriority1", encoding="utf-8") if toggle.speed_limit_controller and toggle.tuning_level >= level["SLCPriority1"] else default.get("SLCPriority1", encoding="utf-8") + toggle.speed_limit_priority2 = params.get("SLCPriority2", encoding="utf-8") if toggle.speed_limit_controller and toggle.tuning_level >= level["SLCPriority2"] else default.get("SLCPriority2", encoding="utf-8") + toggle.speed_limit_priority3 = params.get("SLCPriority3", encoding="utf-8") if toggle.speed_limit_controller and toggle.tuning_level >= level["SLCPriority3"] else default.get("SLCPriority3", encoding="utf-8") toggle.speed_limit_priority_highest = toggle.speed_limit_priority1 == "Highest" toggle.speed_limit_priority_lowest = toggle.speed_limit_priority1 == "Lowest" - toggle.speed_limit_sources = toggle.speed_limit_controller and (params.get_bool("SpeedLimitSources") if tuning_level >= level["SpeedLimitSources"] else default.get_bool("SpeedLimitSources")) + toggle.speed_limit_sources = toggle.speed_limit_controller and (params.get_bool("SpeedLimitSources") if toggle.tuning_level >= level["SpeedLimitSources"] else default.get_bool("SpeedLimitSources")) - toggle.speed_limit_filler = params.get_bool("SpeedLimitFiller") if tuning_level >= level["SpeedLimitFiller"] else default.get_bool("SpeedLimitFiller") + toggle.speed_limit_filler = params.get_bool("SpeedLimitFiller") if toggle.tuning_level >= level["SpeedLimitFiller"] else default.get_bool("SpeedLimitFiller") - toggle.startup_alert_top = params.get("StartupMessageTop", encoding="utf-8") if tuning_level >= level["StartupMessageTop"] else default.get("StartupMessageTop", encoding="utf-8") - toggle.startup_alert_bottom = params.get("StartupMessageBottom", encoding="utf-8") if tuning_level >= level["StartupMessageBottom"] else default.get("StartupMessageBottom", encoding="utf-8") + toggle.startup_alert_top = params.get("StartupMessageTop", encoding="utf-8") if toggle.tuning_level >= level["StartupMessageTop"] else default.get("StartupMessageTop", encoding="utf-8") + toggle.startup_alert_bottom = params.get("StartupMessageBottom", encoding="utf-8") if toggle.tuning_level >= level["StartupMessageBottom"] else default.get("StartupMessageBottom", encoding="utf-8") - toggle.subaru_sng = toggle.car_make == "subaru" and not (CP.flags & SubaruFlags.GLOBAL_GEN2 or CP.flags & SubaruFlags.HYBRID) and (params.get_bool("SubaruSNG") if tuning_level >= level["SubaruSNG"] else default.get_bool("SubaruSNG")) + toggle.subaru_sng = toggle.car_make == "subaru" and not (CP.flags & SubaruFlags.GLOBAL_GEN2 or CP.flags & SubaruFlags.HYBRID) and (params.get_bool("SubaruSNG") if toggle.tuning_level >= level["SubaruSNG"] else default.get_bool("SubaruSNG")) - toggle.taco_tune_hacks = taco_hacks_allowed and (params.get_bool("TacoTuneHacks") if tuning_level >= level["TacoTuneHacks"] else default.get_bool("TacoTuneHacks")) + toggle.taco_tune_hacks = taco_hacks_allowed and (params.get_bool("TacoTuneHacks") if toggle.tuning_level >= level["TacoTuneHacks"] else default.get_bool("TacoTuneHacks")) toggle.tethering_config = params.get_int("TetheringEnabled") - toyota_doors = toggle.car_make == "toyota" and (params.get_bool("ToyotaDoors") if tuning_level >= level["ToyotaDoors"] else default.get_bool("ToyotaDoors")) - toggle.lock_doors = toyota_doors and (params.get_bool("LockDoors") if tuning_level >= level["LockDoors"] else default.get_bool("LockDoors")) - toggle.unlock_doors = toyota_doors and (params.get_bool("UnlockDoors") if tuning_level >= level["UnlockDoors"] else default.get_bool("UnlockDoors")) + toyota_doors = toggle.car_make == "toyota" and (params.get_bool("ToyotaDoors") if toggle.tuning_level >= level["ToyotaDoors"] else default.get_bool("ToyotaDoors")) + toggle.lock_doors = toyota_doors and (params.get_bool("LockDoors") if toggle.tuning_level >= level["LockDoors"] else default.get_bool("LockDoors")) + toggle.unlock_doors = toyota_doors and (params.get_bool("UnlockDoors") if toggle.tuning_level >= level["UnlockDoors"] else default.get_bool("UnlockDoors")) - toggle.volt_sng = toggle.car_model == "CHEVROLET_VOLT" and (params.get_bool("VoltSNG") if tuning_level >= level["VoltSNG"] else default.get_bool("VoltSNG")) + toggle.volt_sng = toggle.car_model == "CHEVROLET_VOLT" and (params.get_bool("VoltSNG") if toggle.tuning_level >= level["VoltSNG"] else default.get_bool("VoltSNG")) params_memory.put("FrogPilotToggles", json.dumps(toggle.__dict__)) params_memory.remove("FrogPilotTogglesUpdated") diff --git a/frogpilot/controls/frogpilot_card.py b/frogpilot/controls/frogpilot_card.py index c67edb9cd..c4dd8d3b5 100644 --- a/frogpilot/controls/frogpilot_card.py +++ b/frogpilot/controls/frogpilot_card.py @@ -3,7 +3,7 @@ from cereal import car, custom from openpilot.selfdrive.controls.lib.drive_helpers import CRUISE_LONG_PRESS from openpilot.selfdrive.controls.lib.events import ET -from openpilot.frogpilot.common.frogpilot_variables import ERROR_LOGS_PATH, NON_DRIVING_GEARS, params, params_memory +from openpilot.frogpilot.common.frogpilot_variables import ERROR_LOGS_PATH, GearShifter, NON_DRIVING_GEARS, params, params_memory ButtonType = car.CarState.ButtonEvent.Type FrogPilotButtonType = custom.FrogPilotCarState.ButtonEvent.Type @@ -139,6 +139,7 @@ class FrogPilotCard: frogpilotCarState.distanceLongPressed = self.very_long_press_threshold > self.gap_counter >= self.long_press_threshold frogpilotCarState.distanceVeryLongPressed = self.gap_counter >= self.very_long_press_threshold frogpilotCarState.forceCoast = self.force_coast + frogpilotCarState.isParked = carState.gearShifter == GearShifter.park frogpilotCarState.pauseLateral = self.pause_lateral frogpilotCarState.pauseLongitudinal = self.pause_longitudinal frogpilotCarState.trafficModeEnabled = self.traffic_mode_enabled diff --git a/frogpilot/controls/lib/frogpilot_events.py b/frogpilot/controls/lib/frogpilot_events.py index c5bec2272..09b6ddaa3 100644 --- a/frogpilot/controls/lib/frogpilot_events.py +++ b/frogpilot/controls/lib/frogpilot_events.py @@ -51,7 +51,7 @@ class FrogPilotEvents: self.random_event_playing = False self.random_event_timer = 0 - acceleration = sm["carState"].aEgo + acceleration = sm["carControl"].actuators.accel if not sm["carState"].gasPressed: self.max_acceleration = max(acceleration, self.max_acceleration) diff --git a/frogpilot/controls/lib/weather_checker.py b/frogpilot/controls/lib/weather_checker.py index 541d174ec..041b4306b 100644 --- a/frogpilot/controls/lib/weather_checker.py +++ b/frogpilot/controls/lib/weather_checker.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 -import os import requests import time @@ -8,7 +7,8 @@ from concurrent.futures import ThreadPoolExecutor from openpilot.common.conversions import Conversions as CV from openpilot.common.params import Params -from openpilot.frogpilot.common.frogpilot_utilities import calculate_distance_to_point, is_url_pingable +from openpilot.frogpilot.common.frogpilot_utilities import calculate_distance_to_point, get_frogpilot_api_info +from openpilot.frogpilot.common.frogpilot_variables import FROGPILOT_API CACHE_DISTANCE = 25 MAX_RETRIES = 3 @@ -55,18 +55,19 @@ class WeatherChecker: self.hourly_forecast = None self.last_gps_position = None self.last_updated = None + self.requesting = False - user_api_key = Params().get("WeatherToken", encoding="utf-8") - self.api_key = user_api_key or os.environ.get("WEATHER_TOKEN", "") + self.user_api_key = Params().get("WeatherToken", encoding="utf-8") - if user_api_key: + if self.user_api_key: self.check_interval = 60 else: self.check_interval = 15 * 60 + self.api_token, self.build_metadata, self.device_type, self.dongle_id = get_frogpilot_api_info() + self.session = requests.Session() - self.session.headers.update({"Accept-Language": "en"}) - self.session.headers.update({"User-Agent": "frogpilot-weather-checker/1.0 (https://github.com/FrogAi/FrogPilot)"}) + self.session.headers.update({"Accept-Language": "en", "User-Agent": "frogpilot-api/1.0"}) self.executor = ThreadPoolExecutor(max_workers=1) @@ -89,10 +90,6 @@ class WeatherChecker: self.reduce_lateral_acceleration = 0 def update_weather(self, gps_position, now, frogpilot_toggles): - if not self.api_key: - self.weather_id = 0 - return - if self.last_gps_position and self.last_updated: distance = calculate_distance_to_point( self.last_gps_position["latitude"] * CV.DEG_TO_RAD, @@ -114,10 +111,15 @@ class WeatherChecker: self.update_offsets(frogpilot_toggles) return - self.last_updated = now + if self.requesting: + return + + self.requesting = True def complete_request(future): + self.requesting = False data = future.result() + self.last_updated = now if data: self.hourly_forecast = data.get("hourly") self.last_gps_position = gps_position @@ -136,32 +138,27 @@ class WeatherChecker: self.update_offsets(frogpilot_toggles) def make_request(): - if not is_url_pingable("https://api.openweathermap.org"): - return None - - params = { + payload = { + "api_key": self.user_api_key, + "api_token": self.api_token, + "build_metadata": self.build_metadata, + "device": self.device_type, + "frogpilot_dongle_id": self.dongle_id, "lat": gps_position["latitude"], "lon": gps_position["longitude"], - "appid": self.api_key, - "units": "metric", - "exclude": "alerts,minutely,daily", } for attempt in range(1, MAX_RETRIES + 1): try: - self.api_3_calls += 1 - response = self.session.get("https://api.openweathermap.org/data/3.0/onecall", params=params, timeout=10) - - if response.status_code in (401, 403, 429): - fallback_params = params.copy() - fallback_params.pop("exclude", None) - self.api_25_calls += 1 - fallback_response = self.session.get("https://api.openweathermap.org/data/2.5/weather", params=fallback_params, timeout=10) - fallback_response.raise_for_status() - return fallback_response.json() - + response = self.session.post(f"{FROGPILOT_API}/weather", json=payload, headers={"Content-Type": "application/json"}, timeout=10) response.raise_for_status() - return response.json() + + data = response.json() + if data.get("api_version") == "2.5": + self.api_25_calls += 1 + else: + self.api_3_calls += 1 + return data except Exception: if attempt < MAX_RETRIES: time.sleep(RETRY_DELAY) diff --git a/frogpilot/frogpilot_process.py b/frogpilot/frogpilot_process.py index 8dfb91e04..360ac86ce 100644 --- a/frogpilot/frogpilot_process.py +++ b/frogpilot/frogpilot_process.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import datetime import json -import os import time from cereal import messaging @@ -104,7 +103,7 @@ def frogpilot_thread(): if frogpilot_toggles.random_themes: theme_manager.update_active_theme(time_validated, frogpilot_toggles, randomize_theme=True) - if time_validated and is_url_pingable(os.environ.get("STATS_URL", "")): + if time_validated: send_stats() elif started and not started_previously: diff --git a/frogpilot/system/environment_variables b/frogpilot/system/environment_variables deleted file mode 100755 index c1cfbaa8c..000000000 Binary files a/frogpilot/system/environment_variables and /dev/null differ diff --git a/frogpilot/system/frogpilot_stats.py b/frogpilot/system/frogpilot_stats.py index 6efe479ba..e1a525598 100644 --- a/frogpilot/system/frogpilot_stats.py +++ b/frogpilot/system/frogpilot_stats.py @@ -1,25 +1,41 @@ import json -import os import random import requests -from collections import Counter -from datetime import datetime, timezone -from influxdb_client import InfluxDBClient, Point -from influxdb_client.client.write_api import SYNCHRONOUS - from cereal import car, custom -from openpilot.common.conversions import Conversions as CV -from openpilot.system.hardware import HARDWARE -from openpilot.system.version import get_build_metadata -from openpilot.frogpilot.common.frogpilot_utilities import clean_model_name -from openpilot.frogpilot.common.frogpilot_variables import get_frogpilot_toggles, params +from openpilot.frogpilot.common.frogpilot_utilities import clean_model_name, get_frogpilot_api_info +from openpilot.frogpilot.common.frogpilot_variables import FROGPILOT_API, get_frogpilot_toggles, params BASE_URL = "https://nominatim.openstreetmap.org" +GITHUB_API_URL = "https://api.github.com/repos/FrogAi/FrogPilot/commits" MINIMUM_POPULATION = 100_000 +TRACKED_BRANCHES = ["FrogPilot", "FrogPilot-Staging", "FrogPilot-Testing"] + +def get_branch_commits(): + commits = [] + + with requests.Session() as session: + session.headers.update({"Accept": "application/vnd.github.v3+json", "User-Agent": "frogpilot-stats/1.0"}) + + for branch in TRACKED_BRANCHES: + try: + response = session.get(f"{GITHUB_API_URL}/{branch}", timeout=10) + response.raise_for_status() + + sha = response.json().get("sha") + if sha: + commits.append({"branch": branch, "commit": sha}) + except requests.exceptions.RequestException as exception: + print(f"Failed to get commit for {branch}: {exception}") + + return commits + def get_city_center(latitude, longitude): + if latitude == 0 and longitude == 0: + return (0.0, 0.0, "N/A", "N/A", "N/A") + try: with requests.Session() as session: session.headers.update({"Accept-Language": "en"}) @@ -95,30 +111,14 @@ def get_city_center(latitude, longitude): print(f"Falling back to (0, 0) for {latitude}, {longitude}") return float(0.0), float(0.0), "N/A", "N/A", "N/A" -def update_branch_commits(now): - points = [] - for branch in ["FrogPilot", "FrogPilot-Staging", "FrogPilot-Testing"]: - try: - response = requests.get(f"https://api.github.com/repos/FrogAi/FrogPilot/commits/{branch}") - response.raise_for_status() - sha = response.json()["sha"] - points.append(Point("branch_commits").field("commit", sha).tag("branch", branch).time(now)) - except Exception as e: - print(f"Failed to fetch commit for {branch}: {e}") - return points - def send_stats(): try: - build_metadata = get_build_metadata() frogpilot_toggles = get_frogpilot_toggles() if frogpilot_toggles.car_make == "mock": return - bucket = os.environ.get("STATS_BUCKET", "") - org_ID = os.environ.get("STATS_ORG_ID", "") - token = os.environ.get("STATS_TOKEN", "") - url = os.environ.get("STATS_URL", "") + api_token, build_metadata, device_type, dongle_id = get_frogpilot_api_info() car_params = "{}" msg_bytes = params.get("CarParamsPersistent") @@ -138,7 +138,6 @@ def send_stats(): fpcp_dict.pop("carVin", None) frogpilot_car_params = json.dumps(fpcp_dict) - dongle_id = params.get("FrogPilotDongleId", encoding="utf-8") frogpilot_stats = json.loads(params.get("FrogPilotStats") or "{}") location = json.loads(params.get("LastGPSPosition") or "{}") @@ -146,60 +145,43 @@ def send_stats(): original_longitude = location.get("longitude", 0.0) latitude, longitude, city, state, country = get_city_center(original_latitude, original_longitude) - now = datetime.now(timezone.utc) - - theme_attributes = sorted(["color_scheme", "distance_icons", "icon_pack", "signal_icons", "sound_pack"]) - theme_counts = Counter(getattr(frogpilot_toggles, attribute).replace("-animated", "") for attribute in theme_attributes) - winners = [theme for theme, count in theme_counts.items() if count == max(theme_counts.values(), default=0)] - if len(winners) > 1 and "stock" in winners: - winners.remove("stock") - selected_theme = random.choice(winners).replace("-user_created", "").replace("_", " ") if winners else "stock" - - user_point = ( - Point("user_stats") - .field("calibrated_lateral_acceleration", params.get_float("CalibratedLateralAcceleration")) - .field("calibration_progress", params.get_float("CalibrationProgress")) - .field("car_params", car_params) - .field("city", city) - .field("commit", build_metadata.openpilot.git_commit) - .field("country", country) - .field("device", HARDWARE.get_device_type()) - .field("event", 1) - .field("frogpilot_car_params", frogpilot_car_params) - .field("latitude", latitude) - .field("longitude", longitude) - .field("state", state) - .field("stats", json.dumps(frogpilot_stats)) - .field("theme", selected_theme.title()) - .field("toggles", json.dumps(frogpilot_toggles.__dict__)) - .field("tuning_level", params.get_int("TuningLevel") + 1 if params.get_bool("TuningLevelConfirmed") else 0) - .field("using_default_model", params.get("Model", encoding="utf-8").endswith("_default")) - .tag("branch", build_metadata.channel) - .tag("dongle_id", dongle_id) - .time(now) - ) + payload = { + "api_token": api_token, + "branch_commits": get_branch_commits(), + "build_metadata": build_metadata, + "model_scores": [], + "user_stats": { + "calibrated_lateral_acceleration": params.get_float("CalibratedLateralAcceleration"), + "calibration_progress": params.get_float("CalibrationProgress"), + "car_params": car_params, + "city": city, + "country": country, + "device": device_type, + "frogpilot_car_params": frogpilot_car_params, + "frogpilot_dongle_id": dongle_id, + "frogpilot_stats": json.dumps(frogpilot_stats), + "latitude": latitude, + "longitude": longitude, + "state": state, + "toggles": json.dumps(frogpilot_toggles.__dict__), + "using_default_model": params.get("Model", encoding="utf-8").endswith("_default"), + }, + } model_scores = json.loads(params.get("ModelDrivesAndScores") or "{}") - model_points = [] for model_name, data in sorted(model_scores.items()): drives = data.get("Drives", 0) score = data.get("Score", 0) if drives > 0: - point = ( - Point("model_scores") - .field("drives", int(drives)) - .field("score", int(score)) - .tag("dongle_id", dongle_id) - .tag("model_name", clean_model_name(model_name)) - .time(now) - ) - model_points.append(point) + payload["model_scores"].append({ + "model_name": clean_model_name(model_name), + "drives": int(drives), + "score": int(score), + }) - all_points = model_points + [user_point] + update_branch_commits(now) - - client = InfluxDBClient(org=org_ID, token=token, url=url) - client.write_api(write_options=SYNCHRONOUS).write(bucket=bucket, org=org_ID, record=all_points) + response = requests.post(f"{FROGPILOT_API}/stats", json=payload, headers={"Content-Type": "application/json", "User-Agent": "frogpilot-api/1.0"}, timeout=30) + response.raise_for_status() print("Successfully sent FrogPilot stats!") except Exception as exception: diff --git a/frogpilot/system/frogpilot_tracking.py b/frogpilot/system/frogpilot_tracking.py index 63e581c0b..589b0bdb2 100644 --- a/frogpilot/system/frogpilot_tracking.py +++ b/frogpilot/system/frogpilot_tracking.py @@ -120,7 +120,7 @@ class FrogPilotTracking: self.previous_sound = sm["frogpilotControlsState"].alertSound - self.frogpilot_stats["HighestAcceleration"] = max(self.frogpilot_events.max_acceleration, self.frogpilot_stats.get("HighestAcceleration", 0)) + self.frogpilot_stats["MaxAcceleration"] = max(self.frogpilot_events.max_acceleration, self.frogpilot_stats.get("MaxAcceleration", 0)) if sm["carControl"].latActive: self.frogpilot_stats["LateralTime"] = self.frogpilot_stats.get("LateralTime", 0) + DT_MDL diff --git a/frogpilot/system/the_pond/assets/images/android-chrome-192x192.png b/frogpilot/system/the_pond/assets/images/android-chrome-192x192.png index 4ad74d653..fd46b8ee6 100644 Binary files a/frogpilot/system/the_pond/assets/images/android-chrome-192x192.png and b/frogpilot/system/the_pond/assets/images/android-chrome-192x192.png differ diff --git a/frogpilot/system/the_pond/assets/images/android-chrome-512x512.png b/frogpilot/system/the_pond/assets/images/android-chrome-512x512.png index 820616880..d7d28e5e7 100644 Binary files a/frogpilot/system/the_pond/assets/images/android-chrome-512x512.png and b/frogpilot/system/the_pond/assets/images/android-chrome-512x512.png differ diff --git a/frogpilot/system/the_pond/assets/images/apple-touch-icon.png b/frogpilot/system/the_pond/assets/images/apple-touch-icon.png index 5280a8987..6e6591e41 100644 Binary files a/frogpilot/system/the_pond/assets/images/apple-touch-icon.png and b/frogpilot/system/the_pond/assets/images/apple-touch-icon.png differ diff --git a/frogpilot/system/the_pond/assets/images/favicon-16x16.png b/frogpilot/system/the_pond/assets/images/favicon-16x16.png index a1d047862..5cfd6b2f2 100644 Binary files a/frogpilot/system/the_pond/assets/images/favicon-16x16.png and b/frogpilot/system/the_pond/assets/images/favicon-16x16.png differ diff --git a/frogpilot/system/the_pond/assets/images/favicon-32x32.png b/frogpilot/system/the_pond/assets/images/favicon-32x32.png index 130785c99..2814a5825 100644 Binary files a/frogpilot/system/the_pond/assets/images/favicon-32x32.png and b/frogpilot/system/the_pond/assets/images/favicon-32x32.png differ diff --git a/frogpilot/system/the_pond/assets/images/favicon.ico b/frogpilot/system/the_pond/assets/images/favicon.ico index 03380a673..7d77d9cab 100644 Binary files a/frogpilot/system/the_pond/assets/images/favicon.ico and b/frogpilot/system/the_pond/assets/images/favicon.ico differ diff --git a/frogpilot/system/the_pond/assets/images/main_logo.png b/frogpilot/system/the_pond/assets/images/main_logo.png index f450d8c56..cda7c1e22 100644 Binary files a/frogpilot/system/the_pond/assets/images/main_logo.png and b/frogpilot/system/the_pond/assets/images/main_logo.png differ diff --git a/frogpilot/system/the_pond/the_pond.py b/frogpilot/system/the_pond/the_pond.py index a0eff1cb6..dff6c1519 100644 --- a/frogpilot/system/the_pond/the_pond.py +++ b/frogpilot/system/the_pond/the_pond.py @@ -31,15 +31,11 @@ from openpilot.system.version import get_build_metadata from panda import Panda from openpilot.frogpilot.assets.theme_manager import HOLIDAY_THEME_PATH, THEME_COMPONENT_PARAMS -from openpilot.frogpilot.common.frogpilot_utilities import delete_file, get_lock_status, run_cmd, extract_tar -from openpilot.frogpilot.common.frogpilot_variables import ACTIVE_THEME_PATH, DISCORD_WEBHOOK_URL_THEME, ERROR_LOGS_PATH, EXCLUDED_KEYS, RESOURCES_REPO, SCREEN_RECORDINGS_PATH, THEME_SAVE_PATH,\ +from openpilot.frogpilot.common.frogpilot_utilities import delete_file, get_frogpilot_api_info, get_lock_status, is_url_pingable, run_cmd, extract_tar +from openpilot.frogpilot.common.frogpilot_variables import ACTIVE_THEME_PATH, ERROR_LOGS_PATH, EXCLUDED_KEYS, FROGPILOT_API, RESOURCES_REPO, SCREEN_RECORDINGS_PATH, THEME_SAVE_PATH,\ frogpilot_default_params, params, params_memory, update_frogpilot_toggles from openpilot.frogpilot.system.the_pond import utilities -GITLAB_API = "https://gitlab.com/api/v4" -GITLAB_SUBMISSIONS_PROJECT_ID = "71992109" -GITLAB_TOKEN = os.environ.get("GITLAB_TOKEN", "") - FOOTAGE_PATHS = [ Paths.log_root(HD=True, raw=True), Paths.log_root(konik=True, raw=True), @@ -1249,8 +1245,8 @@ def setup(app): @app.route("/api/themes/submit", methods=["POST"]) def submit_theme(): - if not GITLAB_TOKEN: - return jsonify({"error": "Missing GitLab token"}), 500 + if not is_url_pingable(FROGPILOT_API): + return jsonify({"error": "FrogPilot API is not reachable"}), 503 try: theme_name = request.form.get("themeName") @@ -1267,11 +1263,18 @@ def setup(app): combined_name = f"{safe_theme_name}~{discord_username}" timestamp = int(time.time()) - def gitlab_post(project_id, endpoint, payload): - url = f"{GITLAB_API}/projects/{project_id}/{endpoint}" - resp = requests.post(url, headers={"PRIVATE-TOKEN": GITLAB_TOKEN}, json=payload) + def gitlab_post(commit_payload): + api_token, build_metadata, device_type, dongle_id = get_frogpilot_api_info() + payload = { + "api_token": api_token, + "build_metadata": build_metadata, + "device": device_type, + "frogpilot_dongle_id": dongle_id, + **commit_payload, + } + resp = requests.post(f"{FROGPILOT_API}/gitlab/commit", json=payload, headers={"Content-Type": "application/json", "User-Agent": "frogpilot-api/1.0"}, timeout=60) if resp.status_code not in (200, 201): - raise RuntimeError(f"GitLab API error {resp.status_code}: {resp.text}") + raise RuntimeError(f"GitLab commit error {resp.status_code}: {resp.text}") return resp.json() def encode_file_base64(path): @@ -1279,24 +1282,27 @@ def setup(app): return base64.b64encode(f.read()).decode("utf-8") def send_discord_notification(username, theme_name, asset_types): - if not DISCORD_WEBHOOK_URL_THEME: + if not is_url_pingable(FROGPILOT_API): return - message = ( - f"🎨 **New Theme Submission**\n" - f"User: `{username}`\n" - f"Theme: `{theme_name}`\n" - f"Assets: {', '.join(asset_types)}\n" - f"[View Submissions Repo](https://gitlab.com/{RESOURCES_REPO}-Submissions)\n" - f"<@263565721336807424>" - ) - payload = {"content": message} + api_token, build_metadata, device_type, dongle_id = get_frogpilot_api_info() + + payload = { + "api_token": api_token, + "asset_types": asset_types, + "build_metadata": build_metadata, + "device": device_type, + "frogpilot_dongle_id": dongle_id, + "theme_name": theme_name, + "username": username, + } + try: - resp = requests.post(DISCORD_WEBHOOK_URL_THEME, json=payload) - if resp.status_code not in (200, 204): - print(f"Discord notification failed: {resp.status_code} {resp.text}") - except Exception as exception: - print(f"Error sending Discord message: {exception}") + resp = requests.post(f"{FROGPILOT_API}/discord/theme", json=payload, headers={"Content-Type": "application/json", "User-Agent": "frogpilot-api/1.0"}, timeout=30) + resp.raise_for_status() + print("Successfully sent theme submission notification!") + except requests.exceptions.RequestException as exception: + print(f"Error sending theme notification: {exception}") asset_types = [] submission_urls = {} @@ -1319,7 +1325,7 @@ def setup(app): "commit_message": f"Added Distance Icons: {combined_name}", "actions": actions } - gitlab_post(GITLAB_SUBMISSIONS_PROJECT_ID, "repository/commits", commit_payload) + gitlab_post(commit_payload) asset_types.append("Distance Icons") submission_urls["distance_icons"] = f"https://gitlab.com/{RESOURCES_REPO}-Submissions/-/tree/Distance-Icons" @@ -1343,7 +1349,7 @@ def setup(app): "commit_message": f"Added Theme: {combined_name}", "actions": theme_actions } - gitlab_post(GITLAB_SUBMISSIONS_PROJECT_ID, "repository/commits", commit_payload) + gitlab_post(commit_payload) asset_types.append("Theme") submission_urls["theme"] = f"https://gitlab.com/{RESOURCES_REPO}-Submissions/-/tree/Themes" @@ -1366,7 +1372,7 @@ def setup(app): "commit_message": f"Added Steering Wheel: {combined_name}", "actions": actions } - gitlab_post(GITLAB_SUBMISSIONS_PROJECT_ID, "repository/commits", commit_payload) + gitlab_post(commit_payload) asset_types.append("Steering Wheel") submission_urls["steering_wheel"] = f"https://gitlab.com/{RESOURCES_REPO}-Submissions/-/tree/Steering-Wheels" diff --git a/frogpilot/third_party/influxdb_client/__init__.py b/frogpilot/third_party/influxdb_client/__init__.py deleted file mode 100644 index a10095111..000000000 --- a/frogpilot/third_party/influxdb_client/__init__.py +++ /dev/null @@ -1,396 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import apis into sdk package -from influxdb_client.service.authorizations_service import AuthorizationsService -from influxdb_client.service.backup_service import BackupService -from influxdb_client.service.bucket_schemas_service import BucketSchemasService -from influxdb_client.service.buckets_service import BucketsService -from influxdb_client.service.cells_service import CellsService -from influxdb_client.service.checks_service import ChecksService -from influxdb_client.service.config_service import ConfigService -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.invokable_scripts_service import InvokableScriptsService -from influxdb_client.service.labels_service import LabelsService -from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService -from influxdb_client.service.metrics_service import MetricsService -from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService -from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.organizations_service import OrganizationsService -from influxdb_client.service.ping_service import PingService -from influxdb_client.service.query_service import QueryService -from influxdb_client.service.ready_service import ReadyService -from influxdb_client.service.remote_connections_service import RemoteConnectionsService -from influxdb_client.service.replications_service import ReplicationsService -from influxdb_client.service.resources_service import ResourcesService -from influxdb_client.service.restore_service import RestoreService -from influxdb_client.service.routes_service import RoutesService -from influxdb_client.service.rules_service import RulesService -from influxdb_client.service.scraper_targets_service import ScraperTargetsService -from influxdb_client.service.secrets_service import SecretsService -from influxdb_client.service.setup_service import SetupService -from influxdb_client.service.signin_service import SigninService -from influxdb_client.service.signout_service import SignoutService -from influxdb_client.service.sources_service import SourcesService -from influxdb_client.service.tasks_service import TasksService -from influxdb_client.service.telegraf_plugins_service import TelegrafPluginsService -from influxdb_client.service.telegrafs_service import TelegrafsService -from influxdb_client.service.templates_service import TemplatesService -from influxdb_client.service.users_service import UsersService -from influxdb_client.service.variables_service import VariablesService -from influxdb_client.service.views_service import ViewsService -from influxdb_client.service.write_service import WriteService - -from influxdb_client.configuration import Configuration -# import models into sdk package -from influxdb_client.domain.ast_response import ASTResponse -from influxdb_client.domain.add_resource_member_request_body import AddResourceMemberRequestBody -from influxdb_client.domain.analyze_query_response import AnalyzeQueryResponse -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 -from influxdb_client.domain.bucket import Bucket -from influxdb_client.domain.bucket_links import BucketLinks -from influxdb_client.domain.bucket_metadata_manifest import BucketMetadataManifest -from influxdb_client.domain.bucket_retention_rules import BucketRetentionRules -from influxdb_client.domain.bucket_shard_mapping import BucketShardMapping -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 -from influxdb_client.domain.builder_tags_type import BuilderTagsType -from influxdb_client.domain.builtin_statement import BuiltinStatement -from influxdb_client.domain.call_expression import CallExpression -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_discriminator import CheckDiscriminator -from influxdb_client.domain.check_patch import CheckPatch -from influxdb_client.domain.check_status_level import CheckStatusLevel -from influxdb_client.domain.check_view_properties import CheckViewProperties -from influxdb_client.domain.checks import Checks -from influxdb_client.domain.column_data_type import ColumnDataType -from influxdb_client.domain.column_semantic_type import ColumnSemanticType -from influxdb_client.domain.conditional_expression import ConditionalExpression -from influxdb_client.domain.config import Config -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_create import DBRPCreate -from influxdb_client.domain.dbrp_get import DBRPGet -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.duration import Duration -from influxdb_client.domain.duration_literal import DurationLiteral -from influxdb_client.domain.error import Error -from influxdb_client.domain.expression import Expression -from influxdb_client.domain.expression_statement import ExpressionStatement -from influxdb_client.domain.field import Field -from influxdb_client.domain.file import File -from influxdb_client.domain.float_literal import FloatLiteral -from influxdb_client.domain.flux_response import FluxResponse -from influxdb_client.domain.flux_suggestion import FluxSuggestion -from influxdb_client.domain.flux_suggestions import FluxSuggestions -from influxdb_client.domain.function_expression import FunctionExpression -from influxdb_client.domain.gauge_view_properties import GaugeViewProperties -from influxdb_client.domain.greater_threshold import GreaterThreshold -from influxdb_client.domain.http_notification_endpoint import HTTPNotificationEndpoint -from influxdb_client.domain.http_notification_rule import HTTPNotificationRule -from influxdb_client.domain.http_notification_rule_base import HTTPNotificationRuleBase -from influxdb_client.domain.health_check import HealthCheck -from influxdb_client.domain.heatmap_view_properties import HeatmapViewProperties -from influxdb_client.domain.histogram_view_properties import HistogramViewProperties -from influxdb_client.domain.identifier import Identifier -from influxdb_client.domain.import_declaration import ImportDeclaration -from influxdb_client.domain.index_expression import IndexExpression -from influxdb_client.domain.integer_literal import IntegerLiteral -from influxdb_client.domain.is_onboarding import IsOnboarding -from influxdb_client.domain.label import Label -from influxdb_client.domain.label_create_request import LabelCreateRequest -from influxdb_client.domain.label_mapping import LabelMapping -from influxdb_client.domain.label_response import LabelResponse -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.legacy_authorization_post_request import LegacyAuthorizationPostRequest -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 -from influxdb_client.domain.line_protocol_length_error import LineProtocolLengthError -from influxdb_client.domain.links import Links -from influxdb_client.domain.list_stacks_response import ListStacksResponse -from influxdb_client.domain.log_event import LogEvent -from influxdb_client.domain.logical_expression import LogicalExpression -from influxdb_client.domain.logs import Logs -from influxdb_client.domain.map_variable_properties import MapVariableProperties -from influxdb_client.domain.markdown_view_properties import MarkdownViewProperties -from influxdb_client.domain.measurement_schema import MeasurementSchema -from influxdb_client.domain.measurement_schema_column import MeasurementSchemaColumn -from influxdb_client.domain.measurement_schema_create_request import MeasurementSchemaCreateRequest -from influxdb_client.domain.measurement_schema_list import MeasurementSchemaList -from influxdb_client.domain.measurement_schema_update_request import MeasurementSchemaUpdateRequest -from influxdb_client.domain.member_assignment import MemberAssignment -from influxdb_client.domain.member_expression import MemberExpression -from influxdb_client.domain.metadata_backup import MetadataBackup -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 -from influxdb_client.domain.notification_endpoint_base_links import NotificationEndpointBaseLinks -from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator -from influxdb_client.domain.notification_endpoint_type import NotificationEndpointType -from influxdb_client.domain.notification_endpoint_update import NotificationEndpointUpdate -from influxdb_client.domain.notification_endpoints import NotificationEndpoints -from influxdb_client.domain.notification_rule import NotificationRule -from influxdb_client.domain.notification_rule_base import NotificationRuleBase -from influxdb_client.domain.notification_rule_base_links import NotificationRuleBaseLinks -from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator -from influxdb_client.domain.notification_rule_update import NotificationRuleUpdate -from influxdb_client.domain.notification_rules import NotificationRules -from influxdb_client.domain.object_expression import ObjectExpression -from influxdb_client.domain.onboarding_request import OnboardingRequest -from influxdb_client.domain.onboarding_response import OnboardingResponse -from influxdb_client.domain.option_statement import OptionStatement -from influxdb_client.domain.organization import Organization -from influxdb_client.domain.organization_links import OrganizationLinks -from influxdb_client.domain.organizations import Organizations -from influxdb_client.domain.package import Package -from influxdb_client.domain.package_clause import PackageClause -from influxdb_client.domain.pager_duty_notification_endpoint import PagerDutyNotificationEndpoint -from influxdb_client.domain.pager_duty_notification_rule import PagerDutyNotificationRule -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.patch_stack_request import PatchStackRequest -from influxdb_client.domain.patch_stack_request_additional_resources import PatchStackRequestAdditionalResources -from influxdb_client.domain.permission import Permission -from influxdb_client.domain.permission_resource import PermissionResource -from influxdb_client.domain.pipe_expression import PipeExpression -from influxdb_client.domain.pipe_literal import PipeLiteral -from influxdb_client.domain.post_bucket_request import PostBucketRequest -from influxdb_client.domain.post_check import PostCheck -from influxdb_client.domain.post_notification_endpoint import PostNotificationEndpoint -from influxdb_client.domain.post_notification_rule import PostNotificationRule -from influxdb_client.domain.post_organization_request import PostOrganizationRequest -from influxdb_client.domain.post_restore_kv_response import PostRestoreKVResponse -from influxdb_client.domain.post_stack_request import PostStackRequest -from influxdb_client.domain.property_key import PropertyKey -from influxdb_client.domain.query import Query -from influxdb_client.domain.query_edit_mode import QueryEditMode -from influxdb_client.domain.query_variable_properties import QueryVariableProperties -from influxdb_client.domain.query_variable_properties_values import QueryVariablePropertiesValues -from influxdb_client.domain.range_threshold import RangeThreshold -from influxdb_client.domain.ready import Ready -from influxdb_client.domain.regexp_literal import RegexpLiteral -from influxdb_client.domain.remote_connection import RemoteConnection -from influxdb_client.domain.remote_connection_creation_request import RemoteConnectionCreationRequest -from influxdb_client.domain.remote_connection_update_request import RemoteConnectionUpdateRequest -from influxdb_client.domain.remote_connections import RemoteConnections -from influxdb_client.domain.renamable_field import RenamableField -from influxdb_client.domain.replication import Replication -from influxdb_client.domain.replication_creation_request import ReplicationCreationRequest -from influxdb_client.domain.replication_update_request import ReplicationUpdateRequest -from influxdb_client.domain.replications import Replications -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.restored_bucket_mappings import RestoredBucketMappings -from influxdb_client.domain.retention_policy_manifest import RetentionPolicyManifest -from influxdb_client.domain.return_statement import ReturnStatement -from influxdb_client.domain.routes import Routes -from influxdb_client.domain.routes_external import RoutesExternal -from influxdb_client.domain.routes_query import RoutesQuery -from influxdb_client.domain.routes_system import RoutesSystem -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_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 -from influxdb_client.domain.script import Script -from influxdb_client.domain.script_create_request import ScriptCreateRequest -from influxdb_client.domain.script_invocation_params import ScriptInvocationParams -from influxdb_client.domain.script_language import ScriptLanguage -from influxdb_client.domain.script_update_request import ScriptUpdateRequest -from influxdb_client.domain.scripts import Scripts -from influxdb_client.domain.secret_keys import SecretKeys -from influxdb_client.domain.secret_keys_response import SecretKeysResponse -from influxdb_client.domain.shard_group_manifest import ShardGroupManifest -from influxdb_client.domain.shard_manifest import ShardManifest -from influxdb_client.domain.shard_owner import ShardOwner -from influxdb_client.domain.simple_table_view_properties import SimpleTableViewProperties -from influxdb_client.domain.single_stat_view_properties import SingleStatViewProperties -from influxdb_client.domain.slack_notification_endpoint import SlackNotificationEndpoint -from influxdb_client.domain.slack_notification_rule import SlackNotificationRule -from influxdb_client.domain.slack_notification_rule_base import SlackNotificationRuleBase -from influxdb_client.domain.source import Source -from influxdb_client.domain.source_links import SourceLinks -from influxdb_client.domain.sources import Sources -from influxdb_client.domain.stack import Stack -from influxdb_client.domain.stack_associations import StackAssociations -from influxdb_client.domain.stack_events import StackEvents -from influxdb_client.domain.stack_links import StackLinks -from influxdb_client.domain.stack_resources import StackResources -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.subscription_manifest import SubscriptionManifest -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 -from influxdb_client.domain.task_links import TaskLinks -from influxdb_client.domain.task_status_type import TaskStatusType -from influxdb_client.domain.task_update_request import TaskUpdateRequest -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_plugin_request import TelegrafPluginRequest -from influxdb_client.domain.telegraf_plugin_request_plugins import TelegrafPluginRequestPlugins -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.template_apply import TemplateApply -from influxdb_client.domain.template_apply_remotes import TemplateApplyRemotes -from influxdb_client.domain.template_apply_template import TemplateApplyTemplate -from influxdb_client.domain.template_chart import TemplateChart -from influxdb_client.domain.template_export_by_id import TemplateExportByID -from influxdb_client.domain.template_export_by_id_org_ids import TemplateExportByIDOrgIDs -from influxdb_client.domain.template_export_by_id_resource_filters import TemplateExportByIDResourceFilters -from influxdb_client.domain.template_export_by_id_resources import TemplateExportByIDResources -from influxdb_client.domain.template_kind import TemplateKind -from influxdb_client.domain.template_summary import TemplateSummary -from influxdb_client.domain.template_summary_diff import TemplateSummaryDiff -from influxdb_client.domain.template_summary_diff_buckets import TemplateSummaryDiffBuckets -from influxdb_client.domain.template_summary_diff_buckets_new_old import TemplateSummaryDiffBucketsNewOld -from influxdb_client.domain.template_summary_diff_checks import TemplateSummaryDiffChecks -from influxdb_client.domain.template_summary_diff_dashboards import TemplateSummaryDiffDashboards -from influxdb_client.domain.template_summary_diff_dashboards_new_old import TemplateSummaryDiffDashboardsNewOld -from influxdb_client.domain.template_summary_diff_label_mappings import TemplateSummaryDiffLabelMappings -from influxdb_client.domain.template_summary_diff_labels import TemplateSummaryDiffLabels -from influxdb_client.domain.template_summary_diff_labels_new_old import TemplateSummaryDiffLabelsNewOld -from influxdb_client.domain.template_summary_diff_notification_endpoints import TemplateSummaryDiffNotificationEndpoints -from influxdb_client.domain.template_summary_diff_notification_rules import TemplateSummaryDiffNotificationRules -from influxdb_client.domain.template_summary_diff_notification_rules_new_old import TemplateSummaryDiffNotificationRulesNewOld -from influxdb_client.domain.template_summary_diff_tasks import TemplateSummaryDiffTasks -from influxdb_client.domain.template_summary_diff_tasks_new_old import TemplateSummaryDiffTasksNewOld -from influxdb_client.domain.template_summary_diff_telegraf_configs import TemplateSummaryDiffTelegrafConfigs -from influxdb_client.domain.template_summary_diff_variables import TemplateSummaryDiffVariables -from influxdb_client.domain.template_summary_diff_variables_new_old import TemplateSummaryDiffVariablesNewOld -from influxdb_client.domain.template_summary_errors import TemplateSummaryErrors -from influxdb_client.domain.template_summary_label import TemplateSummaryLabel -from influxdb_client.domain.template_summary_label_properties import TemplateSummaryLabelProperties -from influxdb_client.domain.template_summary_summary import TemplateSummarySummary -from influxdb_client.domain.template_summary_summary_buckets import TemplateSummarySummaryBuckets -from influxdb_client.domain.template_summary_summary_dashboards import TemplateSummarySummaryDashboards -from influxdb_client.domain.template_summary_summary_label_mappings import TemplateSummarySummaryLabelMappings -from influxdb_client.domain.template_summary_summary_notification_rules import TemplateSummarySummaryNotificationRules -from influxdb_client.domain.template_summary_summary_status_rules import TemplateSummarySummaryStatusRules -from influxdb_client.domain.template_summary_summary_tag_rules import TemplateSummarySummaryTagRules -from influxdb_client.domain.template_summary_summary_tasks import TemplateSummarySummaryTasks -from influxdb_client.domain.template_summary_summary_variables import TemplateSummarySummaryVariables -from influxdb_client.domain.test_statement import TestStatement -from influxdb_client.domain.threshold import Threshold -from influxdb_client.domain.threshold_base import ThresholdBase -from influxdb_client.domain.threshold_check import ThresholdCheck -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_response import UserResponse -from influxdb_client.domain.user_response_links import UserResponseLinks -from influxdb_client.domain.users import Users -from influxdb_client.domain.variable import Variable -from influxdb_client.domain.variable_assignment import VariableAssignment -from influxdb_client.domain.variable_links import VariableLinks -from influxdb_client.domain.variable_properties import VariableProperties -from influxdb_client.domain.variables import Variables -from influxdb_client.domain.view import View -from influxdb_client.domain.view_links import ViewLinks -from influxdb_client.domain.view_properties import ViewProperties -from influxdb_client.domain.views import Views -from influxdb_client.domain.write_precision import WritePrecision -from influxdb_client.domain.xy_geom import XYGeom -from influxdb_client.domain.xy_view_properties import XYViewProperties - -from influxdb_client.client.authorizations_api import AuthorizationsApi -from influxdb_client.client.bucket_api import BucketsApi -from influxdb_client.client.delete_api import DeleteApi -from influxdb_client.client.invokable_scripts_api import InvokableScriptsApi -from influxdb_client.client.labels_api import LabelsApi -from influxdb_client.client.organizations_api import OrganizationsApi -from influxdb_client.client.query_api import QueryApi -from influxdb_client.client.tasks_api import TasksApi -from influxdb_client.client.users_api import UsersApi -from influxdb_client.client.write_api import WriteApi, WriteOptions -from influxdb_client.client.influxdb_client import InfluxDBClient -from influxdb_client.client.logging_handler import InfluxLoggingHandler -from influxdb_client.client.write.point import Point - -from influxdb_client.version import VERSION - -__version__ = VERSION diff --git a/frogpilot/third_party/influxdb_client/_async/__init__.py b/frogpilot/third_party/influxdb_client/_async/__init__.py deleted file mode 100644 index 743539c50..000000000 --- a/frogpilot/third_party/influxdb_client/_async/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Asynchronous REST APIs.""" diff --git a/frogpilot/third_party/influxdb_client/_async/api_client.py b/frogpilot/third_party/influxdb_client/_async/api_client.py deleted file mode 100644 index 3a396a109..000000000 --- a/frogpilot/third_party/influxdb_client/_async/api_client.py +++ /dev/null @@ -1,663 +0,0 @@ -# coding: utf-8 -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import - -import datetime -import json -import mimetypes -import os -import re -import tempfile -from multiprocessing.pool import ThreadPool -from urllib.parse import quote - -import influxdb_client.domain -from influxdb_client import SigninService -from influxdb_client import SignoutService -from influxdb_client._async import rest -from influxdb_client.configuration import Configuration -from influxdb_client.rest import _requires_create_user_session, _requires_expire_user_session - - -class ApiClientAsync(object): - """Generic API client for OpenAPI client library Build. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=None, **kwargs): - """Initialize generic API client.""" - if configuration is None: - configuration = Configuration() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObjectAsync(configuration, **kwargs) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - from influxdb_client import VERSION - self.user_agent = f'influxdb-client-python/{VERSION}' - - async def close(self): - """Dispose api client.""" - await self._signout() - await self.rest_client.close() - """Dispose pools.""" - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - - @property - def pool(self): - """Create thread pool on first request avoids instantiating unused threadpool for blocking clients.""" - if self._pool is None: - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client.""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - """Set User agent for this API client.""" - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - """Set HTTP header for this API client.""" - self.default_headers[header_name] = header_value - - async def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, urlopen_kw=None): - - config = self.configuration - await self._signin(resource_path=resource_path) - - # header parameters - header_params = header_params or {} - config.update_request_header_params(resource_path, header_params) - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - body = config.update_request_body(resource_path, body) - - # request url - url = self.configuration.host + resource_path - - urlopen_kw = urlopen_kw or {} - - # perform request and return response - response_data = await self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout, **urlopen_kw) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only is not False: - return return_data - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Build a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in obj.openapi_types.items() - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items()} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(influxdb_client.domain, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, urlopen_kw=None): - """Make the HTTP request (synchronous) and Return deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param urlopen_kw: Additional parameters are passed to - :meth:`urllib3.request.RequestMethods.request` - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, urlopen_kw) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout, urlopen_kw)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None, **urlopen_kw): - """Make the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - **urlopen_kw) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - **urlopen_kw) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Build form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Return `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Return `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Update header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file. - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - if not klass.openapi_types and not hasattr(klass, - 'get_real_child_model'): - return data - - kwargs = {} - if klass.openapi_types is not None: - for attr, attr_type in klass.openapi_types.items(): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance - - async def _signin(self, resource_path: str): - if _requires_create_user_session(self.configuration, self.cookie, resource_path): - http_info = await SigninService(self).post_signin_async(_return_http_data_only=False) - self.cookie = http_info[2]['set-cookie'] - - async def _signout(self): - if _requires_expire_user_session(self.configuration, self.cookie): - await SignoutService(self).post_signout_async() - self.cookie = None diff --git a/frogpilot/third_party/influxdb_client/_async/rest.py b/frogpilot/third_party/influxdb_client/_async/rest.py deleted file mode 100644 index 53c555c9c..000000000 --- a/frogpilot/third_party/influxdb_client/_async/rest.py +++ /dev/null @@ -1,309 +0,0 @@ -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import io -import json -import re -import ssl -from urllib.parse import urlencode - -import aiohttp - -from influxdb_client.rest import ApiException -from influxdb_client.rest import _BaseRESTClient -from influxdb_client.rest import _UTF_8_encoding - - -async def _on_request_start(session, trace_config_ctx, params): - _BaseRESTClient.log_request(params.method, params.url) - _BaseRESTClient.log_headers(params.headers, '>>>') - - -async def _on_request_chunk_sent(session, context, params): - if params.chunk: - _BaseRESTClient.log_body(params.chunk, '>>>') - - -async def _on_request_end(session, trace_config_ctx, params): - _BaseRESTClient.log_response(params.response.status) - _BaseRESTClient.log_headers(params.headers, '<<<') - - response_content = params.response.content - data = bytearray() - while True: - chunk = await response_content.read(100) - if not chunk: - break - data += chunk - if data: - _BaseRESTClient.log_body(data.decode(_UTF_8_encoding), '<<<') - response_content.unread_data(data=data) - - -class RESTResponseAsync(io.IOBase): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(self, resp, data): - """Initialize with HTTP response.""" - self.aiohttp_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = data - - def getheaders(self): - """Return a CIMultiDictProxy of the response headers.""" - return self.aiohttp_response.headers - - def getheader(self, name, default=None): - """Return a given response header.""" - return self.aiohttp_response.headers.get(name, default) - - -class RESTClientObjectAsync(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(self, configuration, pools_size=4, maxsize=None, **kwargs): - """Initialize REST client.""" - # maxsize is number of requests to host that are allowed in parallel - if maxsize is None: - maxsize = configuration.connection_pool_maxsize - - if configuration.ssl_context is None: - ssl_context = ssl.create_default_context(cafile=configuration.ssl_ca_cert) - if configuration.cert_file: - ssl_context.load_cert_chain( - certfile=configuration.cert_file, keyfile=configuration.cert_key_file, - password=configuration.cert_key_password - ) - - if not configuration.verify_ssl: - ssl_context.check_hostname = False - ssl_context.verify_mode = ssl.CERT_NONE - else: - ssl_context = configuration.ssl_context - - connector = aiohttp.TCPConnector( - limit=maxsize, - ssl=ssl_context - ) - - self.proxy = configuration.proxy - self.proxy_headers = configuration.proxy_headers - self.allow_redirects = kwargs.get('allow_redirects', True) - self.max_redirects = kwargs.get('max_redirects', 10) - - # configure tracing - trace_config = aiohttp.TraceConfig() - trace_config.on_request_start.append(_on_request_start) - trace_config.on_request_chunk_sent.append(_on_request_chunk_sent) - trace_config.on_request_end.append(_on_request_end) - - # timeout - if isinstance(configuration.timeout, (int, float,)): # noqa: E501,F821 - timeout = aiohttp.ClientTimeout(total=configuration.timeout / 1_000) - elif isinstance(configuration.timeout, aiohttp.ClientTimeout): - timeout = configuration.timeout - else: - timeout = aiohttp.client.DEFAULT_TIMEOUT - - # https pool manager - _client_session_type = kwargs.get('client_session_type', aiohttp.ClientSession) - _client_session_kwargs = kwargs.get('client_session_kwargs', {}) - self.pool_manager = _client_session_type( - connector=connector, - timeout=timeout, - trace_configs=[trace_config] if configuration.debug else None, - **_client_session_kwargs - ) - - async def close(self): - """Dispose connection pool manager.""" - await self.pool_manager.close() - - async def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): - """Execute request. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: this is a non-applicable field for - the AiohttpClient. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - args = { - "method": method, - "url": url, - "headers": headers, - "allow_redirects": self.allow_redirects, - "max_redirects": self.max_redirects - } - - if self.proxy: - args["proxy"] = self.proxy - if self.proxy_headers: - args["proxy_headers"] = self.proxy_headers - - if query_params: - args["url"] += '?' + urlencode(query_params) - - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if re.search('json', headers['Content-Type'], re.IGNORECASE): - if body is not None: - body = json.dumps(body) - args["data"] = body - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - args["data"] = aiohttp.FormData(post_params) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by aiohttp - del headers['Content-Type'] - data = aiohttp.FormData() - for param in post_params: - k, v = param - if isinstance(v, tuple) and len(v) == 3: - data.add_field(k, - value=v[1], - filename=v[0], - content_type=v[2]) - else: - data.add_field(k, v) - args["data"] = data - - # Pass a `bytes` parameter directly in the body to support - # other content types than Json when `body` argument is provided - # in serialized form - elif isinstance(body, bytes): - args["data"] = body - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - - r = await self.pool_manager.request(**args) - if _preload_content: - - data = await r.read() - r = RESTResponseAsync(r, data) - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - async def GET(self, url, headers=None, query_params=None, - _preload_content=True, _request_timeout=None): - """Perform GET HTTP request.""" - return (await self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params)) - - async def HEAD(self, url, headers=None, query_params=None, - _preload_content=True, _request_timeout=None): - """Perform HEAD HTTP request.""" - return (await self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params)) - - async def OPTIONS(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Perform OPTIONS HTTP request.""" - return (await self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - """Perform DELETE HTTP request.""" - return (await self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def POST(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Perform POST HTTP request.""" - return (await self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - """Perform PUT HTTP request.""" - return (await self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) - - async def PATCH(self, url, headers=None, query_params=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): - """Perform PATCH HTTP request.""" - return (await self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body)) diff --git a/frogpilot/third_party/influxdb_client/_sync/__init__.py b/frogpilot/third_party/influxdb_client/_sync/__init__.py deleted file mode 100644 index 476e193aa..000000000 --- a/frogpilot/third_party/influxdb_client/_sync/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Synchronous REST APIs.""" diff --git a/frogpilot/third_party/influxdb_client/_sync/api_client.py b/frogpilot/third_party/influxdb_client/_sync/api_client.py deleted file mode 100644 index f61ef26c7..000000000 --- a/frogpilot/third_party/influxdb_client/_sync/api_client.py +++ /dev/null @@ -1,663 +0,0 @@ -# coding: utf-8 -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import - -import datetime -import json -import mimetypes -import os -import re -import tempfile -from multiprocessing.pool import ThreadPool -from urllib.parse import quote - -import influxdb_client.domain -from influxdb_client import SigninService -from influxdb_client import SignoutService -from influxdb_client._sync import rest -from influxdb_client.configuration import Configuration -from influxdb_client.rest import _requires_create_user_session, _requires_expire_user_session - - -class ApiClient(object): - """Generic API client for OpenAPI client library Build. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, - } - _pool = None - - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=None, retries=False): - """Initialize generic API client.""" - if configuration is None: - configuration = Configuration() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration, retries=retries) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - from influxdb_client import VERSION - self.user_agent = f'influxdb-client-python/{VERSION}' - - def __del__(self): - """Dispose pools.""" - self._signout() - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if self.rest_client and self.rest_client.pool_manager and hasattr(self.rest_client.pool_manager, 'clear'): - self.rest_client.pool_manager.clear() - - @property - def pool(self): - """Create thread pool on first request avoids instantiating unused threadpool for blocking clients.""" - if self._pool is None: - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client.""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - """Set User agent for this API client.""" - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - """Set HTTP header for this API client.""" - self.default_headers[header_name] = header_value - - def __call_api( - self, resource_path, method, path_params=None, - query_params=None, header_params=None, body=None, post_params=None, - files=None, response_type=None, auth_settings=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, urlopen_kw=None): - - config = self.configuration - self._signin(resource_path=resource_path) - - # header parameters - header_params = header_params or {} - config.update_request_header_params(resource_path, header_params) - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, - collection_formats) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) - - # post parameters - if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, - collection_formats) - - # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings) - - # body - if body: - body = self.sanitize_for_serialization(body) - body = config.update_request_body(resource_path, body) - - # request url - url = self.configuration.host + resource_path - - urlopen_kw = urlopen_kw or {} - - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout, **urlopen_kw) - - self.last_response = response_data - - return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None - - if _return_http_data_only: - return (return_data) - else: - return (return_data, response_data.status, - response_data.getheaders()) - - def sanitize_for_serialization(self, obj): - """Build a JSON POST object. - - If obj is None, return None. - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) - for sub_obj in obj] - elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) - for sub_obj in obj) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - - if isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) - for attr, _ in obj.openapi_types.items() - if getattr(obj, attr) is not None} - - return {key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items()} - - def deserialize(self, response, response_type): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - - :return: deserialized object. - """ - # handle file downloading - # save response body into a tmp file and return the instance - if response_type == "file": - return self.__deserialize_file(response) - - # fetch data from response object - try: - data = json.loads(response.data) - except ValueError: - data = response.data - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if type(klass) == str: - if klass.startswith('list['): - sub_kls = re.match(r'list\[(.*)\]', klass).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('dict('): - sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(influxdb_client.domain, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datatime(data) - else: - return self.__deserialize_model(data, klass) - - def call_api(self, resource_path, method, - path_params=None, query_params=None, header_params=None, - body=None, post_params=None, files=None, - response_type=None, auth_settings=None, async_req=None, - _return_http_data_only=None, collection_formats=None, - _preload_content=True, _request_timeout=None, urlopen_kw=None): - """Make the HTTP request (synchronous) and Return deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param response: Response data type. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param async_req bool: execute request asynchronously - :param _return_http_data_only: response data without head status code - and headers - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param urlopen_kw: Additional parameters are passed to - :meth:`urllib3.request.RequestMethods.request` - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, urlopen_kw) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, _request_timeout, urlopen_kw)) - return thread - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None, **urlopen_kw): - """Make the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - **urlopen_kw) - elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - **urlopen_kw) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - else: - raise ValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def prepare_post_parameters(self, post_params=None, files=None): - """Build form parameters. - - :param post_params: Normal form parameters. - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - - if post_params: - params = post_params - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([k, tuple([filename, filedata, mimetype])])) - - return params - - def select_header_accept(self, accepts): - """Return `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return - - accepts = [x.lower() for x in accepts] - - if 'application/json' in accepts: - return 'application/json' - else: - return ', '.join(accepts) - - def select_header_content_type(self, content_types): - """Return `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return 'application/json' - - content_types = [x.lower() for x in content_types] - - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' - else: - return content_types[0] - - def update_params_for_auth(self, headers, querys, auth_settings): - """Update header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param querys: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'header': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - querys.append((auth_setting['key'], auth_setting['value'])) - else: - raise ValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file. - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - from dateutil.parser import parse - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datatime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - from dateutil.parser import parse - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - if not klass.openapi_types and not hasattr(klass, - 'get_real_child_model'): - return data - - kwargs = {} - if klass.openapi_types is not None: - for attr, attr_type in klass.openapi_types.items(): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): - value = data[klass.attribute_map[attr]] - kwargs[attr] = self.__deserialize(value, attr_type) - - instance = klass(**kwargs) - - if hasattr(instance, 'get_real_child_model'): - klass_name = instance.get_real_child_model(data) - if klass_name: - instance = self.__deserialize(data, klass_name) - return instance - - def _signin(self, resource_path: str): - if _requires_create_user_session(self.configuration, self.cookie, resource_path): - http_info = SigninService(self).post_signin_with_http_info() - self.cookie = http_info[2]['set-cookie'] - - def _signout(self): - if _requires_expire_user_session(self.configuration, self.cookie): - SignoutService(self).post_signout() - self.cookie = None diff --git a/frogpilot/third_party/influxdb_client/_sync/rest.py b/frogpilot/third_party/influxdb_client/_sync/rest.py deleted file mode 100644 index eadbf0615..000000000 --- a/frogpilot/third_party/influxdb_client/_sync/rest.py +++ /dev/null @@ -1,355 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import io -import json -import re -import ssl -from urllib.parse import urlencode - -from influxdb_client.rest import ApiException -from influxdb_client.rest import _BaseRESTClient - -try: - import urllib3 -except ImportError: - raise ImportError('OpenAPI Python client requires urllib3.') - - -class RESTResponse(io.IOBase): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(self, resp): - """Initialize with HTTP response.""" - self.urllib3_response = resp - self.status = resp.status - self.reason = resp.reason - self.data = resp.data - - def getheaders(self): - """Return a dictionary of the response headers.""" - return self.urllib3_response.headers - - def getheader(self, name, default=None): - """Return a given response header.""" - return self.urllib3_response.headers.get(name, default) - - -class RESTClientObject(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(self, configuration, pools_size=4, maxsize=None, retries=False): - """Initialize REST client.""" - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - self.configuration = configuration - self.pools_size = pools_size - self.maxsize = maxsize - self.retries = retries - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - ca_certs = None - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - addition_pool_args['retries'] = self.retries - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.cert_key_file, - key_password=configuration.cert_key_password, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - ssl_context=configuration.ssl_context, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.cert_key_file, - key_password=configuration.cert_key_password, - ssl_context=configuration.ssl_context, - **addition_pool_args - ) - - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None, **urlopen_kw): - """Perform requests. - - :param method: http request method - :param url: http request url - :param query_params: query parameters in the url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is True. - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param urlopen_kw: Additional parameters are passed to - :meth:`urllib3.request.RequestMethods.request` - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if post_params and body: - raise ValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - _configured_timeout = _request_timeout or self.configuration.timeout - if _configured_timeout: - if isinstance(_configured_timeout, (int, float, )): # noqa: E501,F821 - timeout = urllib3.Timeout(total=_configured_timeout / 1_000) - elif (isinstance(_configured_timeout, tuple) and - len(_configured_timeout) == 2): - timeout = urllib3.Timeout( - connect=_configured_timeout[0] / 1_000, read=_configured_timeout[1] / 1_000) - - if 'Content-Type' not in headers: - headers['Content-Type'] = 'application/json' - - if self.configuration.debug: - _BaseRESTClient.log_request(method, f"{url}{'' if query_params is None else '?' + urlencode(query_params)}") - _BaseRESTClient.log_headers(headers, '>>>') - _BaseRESTClient.log_body(body, '>>>') - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if query_params: - url += '?' + urlencode(query_params) - if re.search('json', headers['Content-Type'], re.IGNORECASE): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - **urlopen_kw) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - **urlopen_kw) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - **urlopen_kw) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - **urlopen_kw) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers, - **urlopen_kw) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if _preload_content: - r = RESTResponse(r) - - # In the python 3, the response.data is bytes. - # we need to decode it to string. - r.data = r.data.decode('utf8') - - if self.configuration.debug: - _BaseRESTClient.log_response(r.status) - if hasattr(r, 'headers'): - _BaseRESTClient.log_headers(r.headers, '<<<') - if hasattr(r, 'urllib3_response'): - _BaseRESTClient.log_headers(r.urllib3_response.headers, '<<<') - _BaseRESTClient.log_body(r.data, '<<<') - - if not 200 <= r.status <= 299: - raise ApiException(http_resp=r) - - return r - - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None, **urlopen_kw): - """Perform GET HTTP request.""" - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - **urlopen_kw) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None, **urlopen_kw): - """Perform HEAD HTTP request.""" - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - **urlopen_kw) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None, **urlopen_kw): - """Perform OPTIONS HTTP request.""" - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None, **urlopen_kw): - """Perform DELETE HTTP request.""" - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None, **urlopen_kw): - """Perform POST HTTP request.""" - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None, **urlopen_kw): - """Perform PUT HTTP request.""" - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None, **urlopen_kw): - """Perform PATCH HTTP request.""" - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - **urlopen_kw) - - def __getstate__(self): - """Return a dict of attributes that you want to pickle.""" - state = self.__dict__.copy() - # Remove Pool managaer - del state['pool_manager'] - return state - - def __setstate__(self, state): - """Set your object with the provided dict.""" - self.__dict__.update(state) - # Init Pool manager - self.__init__(self.configuration, self.pools_size, self.maxsize, self.retries) diff --git a/frogpilot/third_party/influxdb_client/client/__init__.py b/frogpilot/third_party/influxdb_client/client/__init__.py deleted file mode 100644 index 0d21a4384..000000000 --- a/frogpilot/third_party/influxdb_client/client/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -# flake8: noqa - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import apis into api package -from influxdb_client.service.authorizations_service import AuthorizationsService -from influxdb_client.service.backup_service import BackupService -from influxdb_client.service.bucket_schemas_service import BucketSchemasService -from influxdb_client.service.buckets_service import BucketsService -from influxdb_client.service.cells_service import CellsService -from influxdb_client.service.checks_service import ChecksService -from influxdb_client.service.config_service import ConfigService -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.invokable_scripts_service import InvokableScriptsService -from influxdb_client.service.labels_service import LabelsService -from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService -from influxdb_client.service.metrics_service import MetricsService -from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService -from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.organizations_service import OrganizationsService -from influxdb_client.service.ping_service import PingService -from influxdb_client.service.query_service import QueryService -from influxdb_client.service.ready_service import ReadyService -from influxdb_client.service.remote_connections_service import RemoteConnectionsService -from influxdb_client.service.replications_service import ReplicationsService -from influxdb_client.service.resources_service import ResourcesService -from influxdb_client.service.restore_service import RestoreService -from influxdb_client.service.routes_service import RoutesService -from influxdb_client.service.rules_service import RulesService -from influxdb_client.service.scraper_targets_service import ScraperTargetsService -from influxdb_client.service.secrets_service import SecretsService -from influxdb_client.service.setup_service import SetupService -from influxdb_client.service.signin_service import SigninService -from influxdb_client.service.signout_service import SignoutService -from influxdb_client.service.sources_service import SourcesService -from influxdb_client.service.tasks_service import TasksService -from influxdb_client.service.telegraf_plugins_service import TelegrafPluginsService -from influxdb_client.service.telegrafs_service import TelegrafsService -from influxdb_client.service.templates_service import TemplatesService -from influxdb_client.service.users_service import UsersService -from influxdb_client.service.variables_service import VariablesService -from influxdb_client.service.views_service import ViewsService -from influxdb_client.service.write_service import WriteService diff --git a/frogpilot/third_party/influxdb_client/client/_base.py b/frogpilot/third_party/influxdb_client/client/_base.py deleted file mode 100644 index d4f179018..000000000 --- a/frogpilot/third_party/influxdb_client/client/_base.py +++ /dev/null @@ -1,556 +0,0 @@ -"""Commons function for Sync and Async client.""" -from __future__ import absolute_import - -import base64 -import configparser -import logging -import os -from datetime import datetime, timedelta -from typing import List, Generator, Any, Union, Iterable, AsyncGenerator - -from urllib3 import HTTPResponse - -from influxdb_client import Configuration, Dialect, Query, OptionStatement, VariableAssignment, Identifier, \ - Expression, BooleanLiteral, IntegerLiteral, FloatLiteral, DateTimeLiteral, UnaryExpression, DurationLiteral, \ - Duration, StringLiteral, ArrayExpression, ImportDeclaration, MemberExpression, MemberAssignment, File, \ - WriteService, QueryService, DeleteService, DeletePredicateRequest -from influxdb_client.client.flux_csv_parser import FluxResponseMetadataMode, FluxCsvParser, FluxSerializationMode -from influxdb_client.client.flux_table import FluxRecord, TableList, CSVIterator -from influxdb_client.client.util.date_utils import get_date_helper -from influxdb_client.client.util.helpers import get_org_query_param -from influxdb_client.client.warnings import MissingPivotFunction -from influxdb_client.client.write.dataframe_serializer import DataframeSerializer -from influxdb_client.rest import _UTF_8_encoding - -try: - import dataclasses - - _HAS_DATACLASS = True -except ModuleNotFoundError: - _HAS_DATACLASS = False - -LOGGERS_NAMES = [ - 'influxdb_client.client.influxdb_client', - 'influxdb_client.client.influxdb_client_async', - 'influxdb_client.client.write_api', - 'influxdb_client.client.write_api_async', - 'influxdb_client.client.write.retry', - 'influxdb_client.client.write.dataframe_serializer', - 'influxdb_client.client.util.multiprocessing_helper', - 'influxdb_client.client.http', - 'influxdb_client.client.exceptions', -] - - -# noinspection PyMethodMayBeStatic -class _BaseClient(object): - def __init__(self, url, token, debug=None, timeout=10_000, enable_gzip=False, org: str = None, - default_tags: dict = None, http_client_logger: str = None, **kwargs) -> None: - self.url = url - self.token = token - self.org = org - - self.default_tags = default_tags - - self.conf = _Configuration() - if not isinstance(self.url, str): - raise ValueError('"url" attribute is not str instance') - if self.url.endswith("/"): - self.conf.host = self.url[:-1] - else: - self.conf.host = self.url - self.conf.enable_gzip = enable_gzip - self.conf.verify_ssl = kwargs.get('verify_ssl', True) - self.conf.ssl_ca_cert = kwargs.get('ssl_ca_cert', None) - self.conf.cert_file = kwargs.get('cert_file', None) - self.conf.cert_key_file = kwargs.get('cert_key_file', None) - self.conf.cert_key_password = kwargs.get('cert_key_password', None) - self.conf.ssl_context = kwargs.get('ssl_context', None) - self.conf.proxy = kwargs.get('proxy', None) - self.conf.proxy_headers = kwargs.get('proxy_headers', None) - self.conf.connection_pool_maxsize = kwargs.get('connection_pool_maxsize', self.conf.connection_pool_maxsize) - self.conf.timeout = timeout - # logging - self.conf.loggers["http_client_logger"] = logging.getLogger(http_client_logger) - for client_logger in LOGGERS_NAMES: - self.conf.loggers[client_logger] = logging.getLogger(client_logger) - self.conf.debug = debug - - self.conf.username = kwargs.get('username', None) - self.conf.password = kwargs.get('password', None) - # defaults - self.auth_header_name = None - self.auth_header_value = None - # by token - if self.token: - self.auth_header_name = "Authorization" - self.auth_header_value = "Token " + self.token - # by HTTP basic - auth_basic = kwargs.get('auth_basic', False) - if auth_basic: - self.auth_header_name = "Authorization" - self.auth_header_value = "Basic " + base64.b64encode(token.encode()).decode() - # by username, password - if self.conf.username and self.conf.password: - self.auth_header_name = None - self.auth_header_value = None - - self.retries = kwargs.get('retries', False) - - self.profilers = kwargs.get('profilers', None) - pass - - @classmethod - def _from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): - config = configparser.ConfigParser() - config_name = kwargs.get('config_name', 'influx2') - is_json = False - try: - config.read(config_file) - except configparser.ParsingError: - with open(config_file) as json_file: - import json - config = json.load(json_file) - is_json = True - - def _config_value(key: str): - value = str(config[key]) if is_json else config[config_name][key] - return value.strip('"') - - def _has_option(key: str): - return key in config if is_json else config.has_option(config_name, key) - - def _has_section(key: str): - return key in config if is_json else config.has_section(key) - - url = _config_value('url') - token = _config_value('token') - - timeout = None - if _has_option('timeout'): - timeout = _config_value('timeout') - - org = None - if _has_option('org'): - org = _config_value('org') - - verify_ssl = True - if _has_option('verify_ssl'): - verify_ssl = _config_value('verify_ssl') - - ssl_ca_cert = None - if _has_option('ssl_ca_cert'): - ssl_ca_cert = _config_value('ssl_ca_cert') - - cert_file = None - if _has_option('cert_file'): - cert_file = _config_value('cert_file') - - cert_key_file = None - if _has_option('cert_key_file'): - cert_key_file = _config_value('cert_key_file') - - cert_key_password = None - if _has_option('cert_key_password'): - cert_key_password = _config_value('cert_key_password') - - connection_pool_maxsize = None - if _has_option('connection_pool_maxsize'): - connection_pool_maxsize = _config_value('connection_pool_maxsize') - - auth_basic = False - if _has_option('auth_basic'): - auth_basic = _config_value('auth_basic') - - default_tags = None - if _has_section('tags'): - if is_json: - default_tags = config['tags'] - else: - tags = {k: v.strip('"') for k, v in config.items('tags')} - default_tags = dict(tags) - - profilers = None - if _has_option('profilers'): - profilers = [x.strip() for x in _config_value('profilers').split(',')] - - proxy = None - if _has_option('proxy'): - proxy = _config_value('proxy') - - return cls(url, token, debug=debug, timeout=_to_int(timeout), org=org, default_tags=default_tags, - enable_gzip=enable_gzip, verify_ssl=_to_bool(verify_ssl), ssl_ca_cert=ssl_ca_cert, - cert_file=cert_file, cert_key_file=cert_key_file, cert_key_password=cert_key_password, - connection_pool_maxsize=_to_int(connection_pool_maxsize), auth_basic=_to_bool(auth_basic), - profilers=profilers, proxy=proxy, **kwargs) - - @classmethod - def _from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): - url = os.getenv('INFLUXDB_V2_URL', "http://localhost:8086") - token = os.getenv('INFLUXDB_V2_TOKEN', "my-token") - timeout = os.getenv('INFLUXDB_V2_TIMEOUT', "10000") - org = os.getenv('INFLUXDB_V2_ORG', "my-org") - verify_ssl = os.getenv('INFLUXDB_V2_VERIFY_SSL', "True") - ssl_ca_cert = os.getenv('INFLUXDB_V2_SSL_CA_CERT', None) - cert_file = os.getenv('INFLUXDB_V2_CERT_FILE', None) - cert_key_file = os.getenv('INFLUXDB_V2_CERT_KEY_FILE', None) - cert_key_password = os.getenv('INFLUXDB_V2_CERT_KEY_PASSWORD', None) - connection_pool_maxsize = os.getenv('INFLUXDB_V2_CONNECTION_POOL_MAXSIZE', None) - auth_basic = os.getenv('INFLUXDB_V2_AUTH_BASIC', "False") - - prof = os.getenv("INFLUXDB_V2_PROFILERS", None) - profilers = None - if prof is not None: - profilers = [x.strip() for x in prof.split(',')] - - default_tags = dict() - - for key, value in os.environ.items(): - if key.startswith("INFLUXDB_V2_TAG_"): - default_tags[key[16:].lower()] = value - - return cls(url, token, debug=debug, timeout=_to_int(timeout), org=org, default_tags=default_tags, - enable_gzip=enable_gzip, verify_ssl=_to_bool(verify_ssl), ssl_ca_cert=ssl_ca_cert, - cert_file=cert_file, cert_key_file=cert_key_file, cert_key_password=cert_key_password, - connection_pool_maxsize=_to_int(connection_pool_maxsize), auth_basic=_to_bool(auth_basic), - profilers=profilers, **kwargs) - - -# noinspection PyMethodMayBeStatic -class _BaseQueryApi(object): - default_dialect = Dialect(header=True, delimiter=",", comment_prefix="#", - annotations=["datatype", "group", "default"], date_time_format="RFC3339") - - def __init__(self, influxdb_client, query_options=None): - from influxdb_client.client.query_api import QueryOptions - self._query_options = QueryOptions() if query_options is None else query_options - self._influxdb_client = influxdb_client - self._query_api = QueryService(influxdb_client.api_client) - - """Base implementation for Queryable API.""" - - def _to_tables(self, response, query_options=None, response_metadata_mode: - FluxResponseMetadataMode = FluxResponseMetadataMode.full) -> TableList: - """ - Parse HTTP response to TableList. - - :param response: HTTP response from an HTTP client. Expected type: `urllib3.response.HTTPResponse`. - """ - _parser = self._to_tables_parser(response, query_options, response_metadata_mode) - list(_parser.generator()) - return _parser.table_list() - - async def _to_tables_async(self, response, query_options=None, response_metadata_mode: - FluxResponseMetadataMode = FluxResponseMetadataMode.full) -> TableList: - """ - Parse HTTP response to TableList. - - :param response: HTTP response from an HTTP client. Expected type: `aiohttp.client_reqrep.ClientResponse`. - """ - async with self._to_tables_parser(response, query_options, response_metadata_mode) as parser: - async for _ in parser.generator_async(): - pass - return parser.table_list() - - def _to_csv(self, response: HTTPResponse) -> CSVIterator: - """Parse HTTP response to CSV.""" - return CSVIterator(response) - - def _to_flux_record_stream(self, response, query_options=None, - response_metadata_mode: FluxResponseMetadataMode = FluxResponseMetadataMode.full) -> \ - Generator[FluxRecord, Any, None]: - """ - Parse HTTP response to FluxRecord stream. - - :param response: HTTP response from an HTTP client. Expected type: `urllib3.response.HTTPResponse`. - """ - _parser = self._to_flux_record_stream_parser(query_options, response, response_metadata_mode) - return _parser.generator() - - async def _to_flux_record_stream_async(self, response, query_options=None, response_metadata_mode: - FluxResponseMetadataMode = FluxResponseMetadataMode.full) -> \ - AsyncGenerator['FluxRecord', None]: - """ - Parse HTTP response to FluxRecord stream. - - :param response: HTTP response from an HTTP client. Expected type: `aiohttp.client_reqrep.ClientResponse`. - """ - _parser = self._to_flux_record_stream_parser(query_options, response, response_metadata_mode) - return (await _parser.__aenter__()).generator_async() - - def _to_data_frame_stream(self, data_frame_index, response, query_options=None, - response_metadata_mode: FluxResponseMetadataMode = FluxResponseMetadataMode.full, - use_extension_dtypes=False): - """ - Parse HTTP response to DataFrame stream. - - :param response: HTTP response from an HTTP client. Expected type: `urllib3.response.HTTPResponse`. - """ - _parser = self._to_data_frame_stream_parser(data_frame_index, query_options, response, response_metadata_mode, - use_extension_dtypes) - return _parser.generator() - - async def _to_data_frame_stream_async(self, data_frame_index, response, query_options=None, response_metadata_mode: - FluxResponseMetadataMode = FluxResponseMetadataMode.full, - use_extension_dtypes=False): - """ - Parse HTTP response to DataFrame stream. - - :param response: HTTP response from an HTTP client. Expected type: `aiohttp.client_reqrep.ClientResponse`. - """ - _parser = self._to_data_frame_stream_parser(data_frame_index, query_options, response, response_metadata_mode, - use_extension_dtypes) - return (await _parser.__aenter__()).generator_async() - - def _to_tables_parser(self, response, query_options, response_metadata_mode): - return FluxCsvParser(response=response, serialization_mode=FluxSerializationMode.tables, - query_options=query_options, response_metadata_mode=response_metadata_mode) - - def _to_flux_record_stream_parser(self, query_options, response, response_metadata_mode): - return FluxCsvParser(response=response, serialization_mode=FluxSerializationMode.stream, - query_options=query_options, response_metadata_mode=response_metadata_mode) - - def _to_data_frame_stream_parser(self, data_frame_index, query_options, response, response_metadata_mode, - use_extension_dtypes): - return FluxCsvParser(response=response, serialization_mode=FluxSerializationMode.dataFrame, - data_frame_index=data_frame_index, query_options=query_options, - response_metadata_mode=response_metadata_mode, - use_extension_dtypes=use_extension_dtypes) - - def _to_data_frames(self, _generator): - """Parse stream of DataFrames into expected type.""" - from ..extras import pd - if isinstance(_generator, list): - _dataFrames = _generator - else: - _dataFrames = list(_generator) - - if len(_dataFrames) == 0: - return pd.DataFrame(columns=[], index=None) - elif len(_dataFrames) == 1: - return _dataFrames[0] - else: - return _dataFrames - - def _org_param(self, org): - return get_org_query_param(org=org, client=self._influxdb_client) - - def _get_query_options(self): - if self._query_options and self._query_options.profilers: - return self._query_options - elif self._influxdb_client.profilers: - from influxdb_client.client.query_api import QueryOptions - return QueryOptions(profilers=self._influxdb_client.profilers) - - def _create_query(self, query, dialect=default_dialect, params: dict = None, **kwargs): - query_options = self._get_query_options() - profilers = query_options.profilers if query_options is not None else None - q = Query(query=query, dialect=dialect, extern=_BaseQueryApi._build_flux_ast(params, profilers)) - - if profilers: - print("\n===============") - print("Profiler: query") - print("===============") - print(query) - - if kwargs.get('dataframe_query', False): - MissingPivotFunction.print_warning(query) - - return q - - @staticmethod - def _params_to_extern_ast(params: dict) -> List['OptionStatement']: - - statements = [] - for key, value in params.items(): - expression = _BaseQueryApi._parm_to_extern_ast(value) - if expression is None: - continue - - statements.append(OptionStatement("OptionStatement", - VariableAssignment("VariableAssignment", Identifier("Identifier", key), - expression))) - return statements - - @staticmethod - def _parm_to_extern_ast(value) -> Union[Expression, None]: - if value is None: - return None - if isinstance(value, bool): - return BooleanLiteral("BooleanLiteral", value) - elif isinstance(value, int): - return IntegerLiteral("IntegerLiteral", str(value)) - elif isinstance(value, float): - return FloatLiteral("FloatLiteral", value) - elif isinstance(value, datetime): - value = get_date_helper().to_utc(value) - nanoseconds = getattr(value, 'nanosecond', 0) - fraction = f'{(value.microsecond * 1000 + nanoseconds):09d}' - return DateTimeLiteral("DateTimeLiteral", value.strftime('%Y-%m-%dT%H:%M:%S.') + fraction + 'Z') - elif isinstance(value, timedelta): - _micro_delta = int(value / timedelta(microseconds=1)) - if _micro_delta < 0: - return UnaryExpression("UnaryExpression", argument=DurationLiteral("DurationLiteral", [ - Duration(magnitude=-_micro_delta, unit="us")]), operator="-") - else: - return DurationLiteral("DurationLiteral", [Duration(magnitude=_micro_delta, unit="us")]) - elif isinstance(value, str): - return StringLiteral("StringLiteral", str(value)) - elif isinstance(value, Iterable): - return ArrayExpression("ArrayExpression", - elements=list(map(lambda it: _BaseQueryApi._parm_to_extern_ast(it), value))) - else: - return value - - @staticmethod - def _build_flux_ast(params: dict = None, profilers: List[str] = None): - - imports = [] - body = [] - - if profilers is not None and len(profilers) > 0: - imports.append(ImportDeclaration( - "ImportDeclaration", - path=StringLiteral("StringLiteral", "profiler"))) - - elements = [] - for profiler in profilers: - elements.append(StringLiteral("StringLiteral", value=profiler)) - - member = MemberExpression( - "MemberExpression", - object=Identifier("Identifier", "profiler"), - _property=Identifier("Identifier", "enabledProfilers")) - - prof = OptionStatement( - "OptionStatement", - assignment=MemberAssignment( - "MemberAssignment", - member=member, - init=ArrayExpression( - "ArrayExpression", - elements=elements))) - - body.append(prof) - - if params is not None: - body.extend(_BaseQueryApi._params_to_extern_ast(params)) - - return File(package=None, name=None, type=None, imports=imports, body=body) - - -class _BaseWriteApi(object): - def __init__(self, influxdb_client, point_settings=None): - self._influxdb_client = influxdb_client - self._point_settings = point_settings - self._write_service = WriteService(influxdb_client.api_client) - if influxdb_client.default_tags: - for key, value in influxdb_client.default_tags.items(): - self._point_settings.add_default_tag(key, value) - - def _append_default_tag(self, key, val, record): - from influxdb_client import Point - if isinstance(record, bytes) or isinstance(record, str): - pass - elif isinstance(record, Point): - record.tag(key, val) - elif isinstance(record, dict): - record.setdefault("tags", {}) - record.get("tags")[key] = val - elif isinstance(record, Iterable): - for item in record: - self._append_default_tag(key, val, item) - - def _append_default_tags(self, record): - if self._point_settings.defaultTags and record is not None: - for key, val in self._point_settings.defaultTags.items(): - self._append_default_tag(key, val, record) - - def _serialize(self, record, write_precision, payload, **kwargs): - from influxdb_client import Point - if isinstance(record, bytes): - payload[write_precision].append(record) - - elif isinstance(record, str): - self._serialize(record.encode(_UTF_8_encoding), write_precision, payload, **kwargs) - - elif isinstance(record, Point): - precision_from_point = kwargs.get('precision_from_point', True) - precision = record.write_precision if precision_from_point else write_precision - self._serialize(record.to_line_protocol(precision=precision), precision, payload, **kwargs) - - elif isinstance(record, dict): - self._serialize(Point.from_dict(record, write_precision=write_precision, **kwargs), - write_precision, payload, **kwargs) - elif 'DataFrame' in type(record).__name__: - serializer = DataframeSerializer(record, self._point_settings, write_precision, **kwargs) - self._serialize(serializer.serialize(), write_precision, payload, **kwargs) - elif hasattr(record, "_asdict"): - # noinspection PyProtectedMember - self._serialize(record._asdict(), write_precision, payload, **kwargs) - elif _HAS_DATACLASS and dataclasses.is_dataclass(record): - self._serialize(dataclasses.asdict(record), write_precision, payload, **kwargs) - elif isinstance(record, Iterable): - for item in record: - self._serialize(item, write_precision, payload, **kwargs) - - -# noinspection PyMethodMayBeStatic -class _BaseDeleteApi(object): - def __init__(self, influxdb_client): - self._influxdb_client = influxdb_client - self._service = DeleteService(influxdb_client.api_client) - - def _prepare_predicate_request(self, start, stop, predicate): - date_helper = get_date_helper() - if isinstance(start, datetime): - start = date_helper.to_utc(start) - if isinstance(stop, datetime): - stop = date_helper.to_utc(stop) - predicate_request = DeletePredicateRequest(start=start, stop=stop, predicate=predicate) - return predicate_request - - -class _Configuration(Configuration): - def __init__(self): - Configuration.__init__(self) - self.enable_gzip = False - self.username = None - self.password = None - - def update_request_header_params(self, path: str, params: dict): - super().update_request_header_params(path, params) - if self.enable_gzip: - # GZIP Request - if path == '/api/v2/write': - params["Content-Encoding"] = "gzip" - params["Accept-Encoding"] = "identity" - pass - # GZIP Response - if path == '/api/v2/query': - # params["Content-Encoding"] = "gzip" - params["Accept-Encoding"] = "gzip" - pass - pass - pass - - def update_request_body(self, path: str, body): - _body = super().update_request_body(path, body) - if self.enable_gzip: - # GZIP Request - if path == '/api/v2/write': - import gzip - if isinstance(_body, bytes): - return gzip.compress(data=_body) - else: - return gzip.compress(bytes(_body, _UTF_8_encoding)) - - return _body - - -def _to_bool(bool_value): - return str(bool_value).lower() in ("yes", "true") - - -def _to_int(int_value): - return int(int_value) if int_value is not None else None diff --git a/frogpilot/third_party/influxdb_client/client/_pages.py b/frogpilot/third_party/influxdb_client/client/_pages.py deleted file mode 100644 index 5e4184276..000000000 --- a/frogpilot/third_party/influxdb_client/client/_pages.py +++ /dev/null @@ -1,66 +0,0 @@ - - -class _Page: - def __init__(self, values, has_next, next_after): - self.has_next = has_next - self.values = values - self.next_after = next_after - - @staticmethod - def empty(): - return _Page([], False, None) - - @staticmethod - def initial(after): - return _Page([], True, after) - - -class _PageIterator: - def __init__(self, page: _Page, get_next_page): - self.page = page - self.get_next_page = get_next_page - - def __iter__(self): - return self - - def __next__(self): - if not self.page.values: - if self.page.has_next: - self.page = self.get_next_page(self.page) - if not self.page.values: - raise StopIteration - return self.page.values.pop(0) - - -class _Paginated: - def __init__(self, paginated_getter, pluck_page_resources_from_response): - self.paginated_getter = paginated_getter - self.pluck_page_resources_from_response = pluck_page_resources_from_response - - def find_iter(self, **kwargs): - """Iterate over resources with pagination. - - :key str org: The organization name. - :key str org_id: The organization ID. - :key str after: The last resource ID from which to seek from (but not including). - :key int limit: the maximum number of items per page - :return: resources iterator - """ - - def get_next_page(page: _Page): - return self._find_next_page(page, **kwargs) - - return iter(_PageIterator(_Page.initial(kwargs.get('after')), get_next_page)) - - def _find_next_page(self, page: _Page, **kwargs): - if not page.has_next: - return _Page.empty() - - kw_args = {**kwargs, 'after': page.next_after} if page.next_after is not None else kwargs - response = self.paginated_getter(**kw_args) - - resources = self.pluck_page_resources_from_response(response) - has_next = response.links.next is not None - last_id = resources[-1].id if resources else None - - return _Page(resources, has_next, last_id) diff --git a/frogpilot/third_party/influxdb_client/client/authorizations_api.py b/frogpilot/third_party/influxdb_client/client/authorizations_api.py deleted file mode 100644 index 05be6ecd4..000000000 --- a/frogpilot/third_party/influxdb_client/client/authorizations_api.py +++ /dev/null @@ -1,136 +0,0 @@ -"""Authorization is about managing the security of your InfluxDB instance.""" - -from influxdb_client import Authorization, AuthorizationsService, User, Organization - - -class AuthorizationsApi(object): - """Implementation for '/api/v2/authorizations' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - self._influxdb_client = influxdb_client - self._authorizations_service = AuthorizationsService(influxdb_client.api_client) - - def create_authorization(self, org_id: str = None, permissions: list = None, - authorization: Authorization = None) -> Authorization: - """ - Create an authorization. - - :type permissions: list of Permission - :param org_id: organization id - :param permissions: list of permissions - :type authorization: authorization object - - """ - if authorization is not None: - if not isinstance(authorization, Authorization): - raise TypeError(f"Attempt to use non-Authorization value for 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_post_request=authorization) - - def find_authorization_by_id(self, auth_id: str) -> Authorization: - """ - Find authorization by id. - - :param auth_id: authorization id - :return: Authorization - """ - return self._authorizations_service.get_authorizations_id(auth_id=auth_id) - - def find_authorizations(self, **kwargs): - """ - Get a list of all authorizations. - - :key str user_id: filter authorizations belonging to a user id - :key str user: filter authorizations belonging to a user name - :key str org_id: filter authorizations belonging to a org id - :key str org: filter authorizations belonging to a org name - :return: Authorizations - """ - authorizations = self._authorizations_service.get_authorizations(**kwargs) - - return authorizations.authorizations - - def find_authorizations_by_user(self, user: User): - """ - Find authorization by User. - - :return: Authorization list - """ - return self.find_authorizations(user_id=user.id) - - def find_authorizations_by_user_id(self, user_id: str): - """ - Find authorization by user id. - - :return: Authorization list - """ - return self.find_authorizations(user_id=user_id) - - def find_authorizations_by_user_name(self, user_name: str): - """ - Find authorization by user name. - - :return: Authorization list - """ - return self.find_authorizations(user=user_name) - - def find_authorizations_by_org(self, org: Organization): - """ - Find authorization by user name. - - :return: Authorization list - """ - if isinstance(org, Organization): - return self.find_authorizations(org_id=org.id) - - def find_authorizations_by_org_name(self, org_name: str): - """ - Find authorization by org name. - - :return: Authorization list - """ - return self.find_authorizations(org=org_name) - - def find_authorizations_by_org_id(self, org_id: str): - """ - Find authorization by org id. - - :return: Authorization list - """ - return self.find_authorizations(org_id=org_id) - - def update_authorization(self, auth): - """ - Update authorization object. - - :param auth: - :return: - """ - return self._authorizations_service.patch_authorizations_id(auth_id=auth.id, authorization_update_request=auth) - - def clone_authorization(self, auth) -> Authorization: - """Clone an authorization.""" - if isinstance(auth, Authorization): - cloned = Authorization(org_id=auth.org_id, permissions=auth.permissions) - # cloned.description = auth.description - # cloned.status = auth.status - return self.create_authorization(authorization=cloned) - - if isinstance(auth, str): - authorization = self.find_authorization_by_id(auth) - return self.clone_authorization(auth=authorization) - - raise ValueError("Invalid argument") - - def delete_authorization(self, auth): - """Delete a authorization.""" - if isinstance(auth, Authorization): - return self._authorizations_service.delete_authorizations_id(auth_id=auth.id) - - if isinstance(auth, str): - return self._authorizations_service.delete_authorizations_id(auth_id=auth) - raise ValueError("Invalid argument") diff --git a/frogpilot/third_party/influxdb_client/client/bucket_api.py b/frogpilot/third_party/influxdb_client/client/bucket_api.py deleted file mode 100644 index 684da7676..000000000 --- a/frogpilot/third_party/influxdb_client/client/bucket_api.py +++ /dev/null @@ -1,132 +0,0 @@ -""" -A bucket is a named location where time series data is stored. - -All buckets have a retention policy, a duration of time that each data point persists. -A bucket belongs to an organization. -""" -import warnings - -from influxdb_client import BucketsService, Bucket, PostBucketRequest, PatchBucketRequest -from influxdb_client.client.util.helpers import get_org_query_param -from influxdb_client.client._pages import _Paginated - - -class BucketsApi(object): - """Implementation for '/api/v2/buckets' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - self._influxdb_client = influxdb_client - self._buckets_service = BucketsService(influxdb_client.api_client) - - def create_bucket(self, bucket=None, bucket_name=None, org_id=None, retention_rules=None, - description=None, org=None) -> Bucket: - """Create a bucket. - - :param Bucket|PostBucketRequest bucket: bucket to create - :param bucket_name: bucket name - :param description: bucket description - :param org_id: org_id - :param bucket_name: bucket name - :param retention_rules: retention rules array or single BucketRetentionRules - :param str, Organization org: specifies the organization for create the bucket; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :return: Bucket - If the method is called asynchronously, - returns the request thread. - """ - if retention_rules is None: - retention_rules = [] - - rules = [] - - if isinstance(retention_rules, list): - rules.extend(retention_rules) - else: - rules.append(retention_rules) - - if org_id is not None: - warnings.warn("org_id is deprecated; use org", DeprecationWarning) - - if bucket is None: - bucket = PostBucketRequest(name=bucket_name, - retention_rules=rules, - description=description, - org_id=get_org_query_param(org=(org_id if org is None else org), - client=self._influxdb_client, - required_id=True)) - - return self._buckets_service.post_buckets(post_bucket_request=bucket) - - def update_bucket(self, bucket: Bucket) -> Bucket: - """Update a bucket. - - :param bucket: Bucket update to apply (required) - :return: Bucket - """ - request = PatchBucketRequest(name=bucket.name, - description=bucket.description, - retention_rules=bucket.retention_rules) - - return self._buckets_service.patch_buckets_id(bucket_id=bucket.id, patch_bucket_request=request) - - def delete_bucket(self, bucket): - """Delete a bucket. - - :param bucket: bucket id or Bucket - :return: Bucket - """ - if isinstance(bucket, Bucket): - bucket_id = bucket.id - else: - bucket_id = bucket - - return self._buckets_service.delete_buckets_id(bucket_id=bucket_id) - - def find_bucket_by_id(self, id): - """Find bucket by ID. - - :param id: - :return: - """ - return self._buckets_service.get_buckets_id(id) - - def find_bucket_by_name(self, bucket_name): - """Find bucket by name. - - :param bucket_name: bucket name - :return: Bucket - """ - buckets = self._buckets_service.get_buckets(name=bucket_name) - - if len(buckets.buckets) > 0: - return buckets.buckets[0] - else: - return None - - def find_buckets(self, **kwargs): - """List buckets. - - :key int offset: Offset for pagination - :key int limit: Limit for pagination - :key str after: The last resource ID from which to seek from (but not including). - This is to be used instead of `offset`. - :key str org: The organization name. - :key str org_id: The organization ID. - :key str name: Only returns buckets with a specific name. - :return: Buckets - """ - return self._buckets_service.get_buckets(**kwargs) - - def find_buckets_iter(self, **kwargs): - """Iterate over all buckets with pagination. - - :key str name: Only returns buckets with the specified name - :key str org: The organization name. - :key str org_id: The organization ID. - :key str after: The last resource ID from which to seek from (but not including). - :key int limit: the maximum number of buckets in one page - :return: Buckets iterator - """ - return _Paginated(self._buckets_service.get_buckets, lambda response: response.buckets).find_iter(**kwargs) diff --git a/frogpilot/third_party/influxdb_client/client/delete_api.py b/frogpilot/third_party/influxdb_client/client/delete_api.py deleted file mode 100644 index 5f9da4716..000000000 --- a/frogpilot/third_party/influxdb_client/client/delete_api.py +++ /dev/null @@ -1,35 +0,0 @@ -"""Delete time series data from InfluxDB.""" - -from datetime import datetime -from typing import Union - -from influxdb_client import Organization -from influxdb_client.client._base import _BaseDeleteApi -from influxdb_client.client.util.helpers import get_org_query_param - - -class DeleteApi(_BaseDeleteApi): - """Implementation for '/api/v2/delete' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - super().__init__(influxdb_client) - - def delete(self, start: Union[str, datetime], stop: Union[str, datetime], predicate: str, bucket: str, - org: Union[str, Organization, None] = None) -> None: - """ - Delete Time series data from InfluxDB. - - :param str, datetime.datetime start: start time - :param str, datetime.datetime stop: stop time - :param str predicate: predicate - :param str bucket: bucket id or name from which data will be deleted - :param str, Organization org: specifies the organization to delete data from. - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :return: - """ - predicate_request = self._prepare_predicate_request(start, stop, predicate) - org_param = get_org_query_param(org=org, client=self._influxdb_client, required_id=False) - - return self._service.post_delete(delete_predicate_request=predicate_request, bucket=bucket, org=org_param) diff --git a/frogpilot/third_party/influxdb_client/client/delete_api_async.py b/frogpilot/third_party/influxdb_client/client/delete_api_async.py deleted file mode 100644 index ef44c843a..000000000 --- a/frogpilot/third_party/influxdb_client/client/delete_api_async.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Delete time series data from InfluxDB.""" - -from datetime import datetime -from typing import Union - -from influxdb_client import Organization -from influxdb_client.client._base import _BaseDeleteApi -from influxdb_client.client.util.helpers import get_org_query_param - - -class DeleteApiAsync(_BaseDeleteApi): - """Async implementation for '/api/v2/delete' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - super().__init__(influxdb_client) - - async def delete(self, start: Union[str, datetime], stop: Union[str, datetime], predicate: str, bucket: str, - org: Union[str, Organization, None] = None) -> bool: - """ - Delete Time series data from InfluxDB. - - :param str, datetime.datetime start: start time - :param str, datetime.datetime stop: stop time - :param str predicate: predicate - :param str bucket: bucket id or name from which data will be deleted - :param str, Organization org: specifies the organization to delete data from. - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClientAsync.org`` is used. - :return: ``True`` for successfully deleted data, otherwise raise an exception - """ - predicate_request = self._prepare_predicate_request(start, stop, predicate) - org_param = get_org_query_param(org=org, client=self._influxdb_client, required_id=False) - - response = await self._service.post_delete_async(delete_predicate_request=predicate_request, bucket=bucket, - org=org_param, _return_http_data_only=False) - return response[1] == 204 diff --git a/frogpilot/third_party/influxdb_client/client/exceptions.py b/frogpilot/third_party/influxdb_client/client/exceptions.py deleted file mode 100644 index bfa453e2d..000000000 --- a/frogpilot/third_party/influxdb_client/client/exceptions.py +++ /dev/null @@ -1,47 +0,0 @@ -"""Exceptions utils for InfluxDB.""" - -import logging - -from urllib3 import HTTPResponse - -logger = logging.getLogger('influxdb_client.client.exceptions') - - -class InfluxDBError(Exception): - """Raised when a server error occurs.""" - - def __init__(self, response: HTTPResponse = None, message: str = None): - """Initialize the InfluxDBError handler.""" - if response is not None: - self.response = response - self.message = self._get_message(response) - if isinstance(response, HTTPResponse): # response is HTTPResponse - self.headers = response.headers - self.retry_after = response.headers.get('Retry-After') - else: # response is RESTResponse - self.headers = response.getheaders() - self.retry_after = response.getheader('Retry-After') - else: - self.response = None - self.message = message or 'no response' - self.retry_after = None - super().__init__(self.message) - - def _get_message(self, response): - # Body - if response.data: - import json - try: - return json.loads(response.data)["message"] - except Exception as e: - logging.debug(f"Cannot parse error response to JSON: {response.data}, {e}") - return response.data - - # Header - for header_key in ["X-Platform-Error-Code", "X-Influx-Error", "X-InfluxDb-Error"]: - header_value = response.getheader(header_key) - if header_value is not None: - return header_value - - # Http Status - return response.reason diff --git a/frogpilot/third_party/influxdb_client/client/flux_csv_parser.py b/frogpilot/third_party/influxdb_client/client/flux_csv_parser.py deleted file mode 100644 index 99e680941..000000000 --- a/frogpilot/third_party/influxdb_client/client/flux_csv_parser.py +++ /dev/null @@ -1,408 +0,0 @@ -"""Parsing response from InfluxDB to FluxStructures or DataFrame.""" - -import base64 -import codecs -import csv as csv_parser -import warnings -from enum import Enum -from typing import List - -from influxdb_client.client.flux_table import FluxTable, FluxColumn, FluxRecord, TableList -from influxdb_client.client.util.date_utils import get_date_helper -from influxdb_client.rest import _UTF_8_encoding - -ANNOTATION_DEFAULT = "#default" -ANNOTATION_GROUP = "#group" -ANNOTATION_DATATYPE = "#datatype" -ANNOTATIONS = [ANNOTATION_DEFAULT, ANNOTATION_GROUP, ANNOTATION_DATATYPE] - - -class FluxQueryException(Exception): - """The exception from InfluxDB.""" - - def __init__(self, message, reference) -> None: - """Initialize defaults.""" - self.message = message - self.reference = reference - - -class FluxCsvParserException(Exception): - """The exception for not parsable data.""" - - pass - - -class FluxSerializationMode(Enum): - """The type how we want to serialize data.""" - - tables = 1 - stream = 2 - dataFrame = 3 - - -class FluxResponseMetadataMode(Enum): - """The configuration for expected amount of metadata response from InfluxDB.""" - - full = 1 - # useful for Invokable scripts - only_names = 2 - - -class _FluxCsvParserMetadata(object): - def __init__(self): - self.table_index = 0 - self.table_id = -1 - self.start_new_table = False - self.table = None - self.groups = [] - self.parsing_state_error = False - - -class FluxCsvParser(object): - """Parse to processing response from InfluxDB to FluxStructures or DataFrame.""" - - def __init__(self, response, serialization_mode: FluxSerializationMode, - data_frame_index: List[str] = None, query_options=None, - response_metadata_mode: FluxResponseMetadataMode = FluxResponseMetadataMode.full, - use_extension_dtypes=False) -> None: - """ - Initialize defaults. - - :param response: HTTP response from a HTTP client. - Acceptable types: `urllib3.response.HTTPResponse`, `aiohttp.client_reqrep.ClientResponse`. - """ - self._response = response - self.tables = TableList() - self._serialization_mode = serialization_mode - self._response_metadata_mode = response_metadata_mode - self._use_extension_dtypes = use_extension_dtypes - self._data_frame_index = data_frame_index - self._data_frame_values = [] - self._profilers = query_options.profilers if query_options is not None else None - self._profiler_callback = query_options.profiler_callback if query_options is not None else None - self._async_mode = True if 'ClientResponse' in type(response).__name__ else False - - def _close(self): - self._response.close() - - def __enter__(self): - """Initialize CSV reader.""" - # response can be exhausted by logger, so we have to use data that has already been read - if hasattr(self._response, 'closed') and self._response.closed: - from io import StringIO - self._reader = csv_parser.reader(StringIO(self._response.data.decode(_UTF_8_encoding))) - else: - self._reader = csv_parser.reader(codecs.iterdecode(self._response, _UTF_8_encoding)) - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - """Close HTTP response.""" - self._close() - - async def __aenter__(self) -> 'FluxCsvParser': - """Initialize CSV reader.""" - from aiocsv import AsyncReader - self._reader = AsyncReader(_StreamReaderToWithAsyncRead(self._response.content)) - - return self - - async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: - """Shutdown the client.""" - self.__exit__(exc_type, exc_val, exc_tb) - - def generator(self): - """Return Python generator.""" - with self as parser: - for val in parser._parse_flux_response(): - yield val - - def generator_async(self): - """Return Python async-generator.""" - return self._parse_flux_response_async() - - def _parse_flux_response(self): - metadata = _FluxCsvParserMetadata() - - for csv in self._reader: - for val in self._parse_flux_response_row(metadata, csv): - yield val - - # Return latest DataFrame - if (self._serialization_mode is FluxSerializationMode.dataFrame) & hasattr(self, '_data_frame'): - df = self._prepare_data_frame() - if not self._is_profiler_table(metadata.table): - yield df - - async def _parse_flux_response_async(self): - metadata = _FluxCsvParserMetadata() - - try: - async for csv in self._reader: - for val in self._parse_flux_response_row(metadata, csv): - yield val - - # Return latest DataFrame - if (self._serialization_mode is FluxSerializationMode.dataFrame) & hasattr(self, '_data_frame'): - df = self._prepare_data_frame() - if not self._is_profiler_table(metadata.table): - yield df - except BaseException as e: - e_type = type(e).__name__ - if "CancelledError" in e_type or "TimeoutError" in e_type: - e.add_note("Stream cancelled during read. Recommended: Check Influxdb client `timeout` setting.") - raise - finally: - self._close() - - def _parse_flux_response_row(self, metadata, csv): - if len(csv) < 1: - # Skip empty line in results (new line is used as a delimiter between tables or table and error) - pass - - elif "error" == csv[1] and "reference" == csv[2]: - metadata.parsing_state_error = True - - else: - # Throw InfluxException with error response - if metadata.parsing_state_error: - error = csv[1] - reference_value = csv[2] - raise FluxQueryException(error, reference_value) - - token = csv[0] - # start new table - if (token in ANNOTATIONS and not metadata.start_new_table) or \ - (self._response_metadata_mode is FluxResponseMetadataMode.only_names and not metadata.table): - - # Return already parsed DataFrame - if (self._serialization_mode is FluxSerializationMode.dataFrame) & hasattr(self, '_data_frame'): - df = self._prepare_data_frame() - if not self._is_profiler_table(metadata.table): - yield df - - metadata.start_new_table = True - metadata.table = FluxTable() - self._insert_table(metadata.table, metadata.table_index) - metadata.table_index = metadata.table_index + 1 - metadata.table_id = -1 - elif metadata.table is None: - raise FluxCsvParserException("Unable to parse CSV response. FluxTable definition was not found.") - - # # datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double,string,string,string - if ANNOTATION_DATATYPE == token: - self.add_data_types(metadata.table, csv) - - elif ANNOTATION_GROUP == token: - metadata.groups = csv - - elif ANNOTATION_DEFAULT == token: - self.add_default_empty_values(metadata.table, csv) - - else: - # parse column names - if metadata.start_new_table: - # Invokable scripts doesn't supports dialect => all columns are string - if not metadata.table.columns and \ - self._response_metadata_mode is FluxResponseMetadataMode.only_names: - self.add_data_types(metadata.table, list(map(lambda column: 'string', csv))) - metadata.groups = list(map(lambda column: 'false', csv)) - self.add_groups(metadata.table, metadata.groups) - self.add_column_names_and_tags(metadata.table, csv) - metadata.start_new_table = False - # Create DataFrame with default values - if self._serialization_mode is FluxSerializationMode.dataFrame: - from ..extras import pd - labels = list(map(lambda it: it.label, metadata.table.columns)) - self._data_frame = pd.DataFrame(data=[], columns=labels, index=None) - pass - else: - - # to int conversions todo - current_id = int(csv[2]) - if metadata.table_id == -1: - metadata.table_id = current_id - - if metadata.table_id != current_id: - # create new table with previous column headers settings - flux_columns = metadata.table.columns - metadata.table = FluxTable() - metadata.table.columns.extend(flux_columns) - self._insert_table(metadata.table, metadata.table_index) - metadata.table_index = metadata.table_index + 1 - metadata.table_id = current_id - - flux_record = self.parse_record(metadata.table_index - 1, metadata.table, csv) - - if self._is_profiler_record(flux_record): - self._print_profiler_info(flux_record) - else: - if self._serialization_mode is FluxSerializationMode.tables: - self.tables[metadata.table_index - 1].records.append(flux_record) - - if self._serialization_mode is FluxSerializationMode.stream: - yield flux_record - - if self._serialization_mode is FluxSerializationMode.dataFrame: - self._data_frame_values.append(flux_record.values) - pass - - def _prepare_data_frame(self): - from ..extras import pd - - # We have to create temporary DataFrame because we want to preserve default column values - _temp_df = pd.DataFrame(self._data_frame_values) - self._data_frame_values = [] - - # Custom DataFrame index - if self._data_frame_index: - self._data_frame = self._data_frame.set_index(self._data_frame_index) - _temp_df = _temp_df.set_index(self._data_frame_index) - - # Append data - df = pd.concat([self._data_frame.astype(_temp_df.dtypes), _temp_df]) - - if self._use_extension_dtypes: - return df.convert_dtypes() - return df - - def parse_record(self, table_index, table, csv): - """Parse one record.""" - record = FluxRecord(table_index) - - for fluxColumn in table.columns: - column_name = fluxColumn.label - str_val = csv[fluxColumn.index + 1] - record.values[column_name] = self._to_value(str_val, fluxColumn) - record.row.append(record.values[column_name]) - - return record - - def _to_value(self, str_val, column): - - if str_val == '' or str_val is None: - default_value = column.default_value - if default_value == '' or default_value is None: - if self._serialization_mode is FluxSerializationMode.dataFrame: - if self._use_extension_dtypes: - from ..extras import pd - return pd.NA - return None - return None - return self._to_value(default_value, column) - - if "string" == column.data_type: - return str_val - - if "boolean" == column.data_type: - return "true" == str_val - - if "unsignedLong" == column.data_type or "long" == column.data_type: - return int(str_val) - - if "double" == column.data_type: - return float(str_val) - - if "base64Binary" == column.data_type: - return base64.b64decode(str_val) - - if "dateTime:RFC3339" == column.data_type or "dateTime:RFC3339Nano" == column.data_type: - return get_date_helper().parse_date(str_val) - - if "duration" == column.data_type: - # todo better type ? - return int(str_val) - - @staticmethod - def add_data_types(table, data_types): - """Add data types to columns.""" - for index in range(1, len(data_types)): - column_def = FluxColumn(index=index - 1, data_type=data_types[index]) - table.columns.append(column_def) - - @staticmethod - def add_groups(table, csv): - """Add group keys to columns.""" - i = 1 - for column in table.columns: - column.group = csv[i] == "true" - i += 1 - - @staticmethod - def add_default_empty_values(table, default_values): - """Add default values to columns.""" - i = 1 - for column in table.columns: - column.default_value = default_values[i] - i += 1 - - @staticmethod - def add_column_names_and_tags(table, csv): - """Add labels to columns.""" - if len(csv) != len(set(csv)): - message = f"""The response contains columns with duplicated names: '{csv}'. - -You should use the 'record.row' to access your data instead of 'record.values' dictionary. -""" - warnings.warn(message, UserWarning) - print(message) - i = 1 - for column in table.columns: - column.label = csv[i] - i += 1 - - def _insert_table(self, table, table_index): - if self._serialization_mode is FluxSerializationMode.tables: - self.tables.insert(table_index, table) - - def _is_profiler_record(self, flux_record: FluxRecord) -> bool: - if not self._profilers: - return False - - for profiler in self._profilers: - if "_measurement" in flux_record.values and flux_record["_measurement"] == "profiler/" + profiler: - return True - - return False - - def _is_profiler_table(self, table: FluxTable) -> bool: - - if not self._profilers: - return False - - return any(filter(lambda column: (column.default_value == "_profiler" and column.label == "result"), - table.columns)) - - def table_list(self) -> TableList: - """Get the list of flux tables.""" - if not self._profilers: - return self.tables - else: - return TableList(filter(lambda table: not self._is_profiler_table(table), self.tables)) - - def _print_profiler_info(self, flux_record: FluxRecord): - if flux_record.get_measurement().startswith("profiler/"): - if self._profiler_callback: - self._profiler_callback(flux_record) - else: - msg = "Profiler: " + flux_record.get_measurement() - print("\n" + len(msg) * "=") - print(msg) - print(len(msg) * "=") - for name in flux_record.values: - val = flux_record[name] - if isinstance(val, str) and len(val) > 50: - print(f"{name:<20}: \n\n{val}") - elif val is not None: - print(f"{name:<20}: {val:<20}") - - -class _StreamReaderToWithAsyncRead: - def __init__(self, response): - self.response = response - self.decoder = codecs.getincrementaldecoder(_UTF_8_encoding)() - - async def read(self, size: int) -> str: - raw_bytes = (await self.response.read(size)) - if not raw_bytes: - return self.decoder.decode(b'', final=True) - return self.decoder.decode(raw_bytes, final=False) diff --git a/frogpilot/third_party/influxdb_client/client/flux_table.py b/frogpilot/third_party/influxdb_client/client/flux_table.py deleted file mode 100644 index 5fd9a061d..000000000 --- a/frogpilot/third_party/influxdb_client/client/flux_table.py +++ /dev/null @@ -1,290 +0,0 @@ -""" -Flux employs a basic data model built from basic data types. - -The data model consists of tables, records, columns. -""" -import codecs -import csv -from http.client import HTTPResponse -from json import JSONEncoder -from typing import List, Iterator -from influxdb_client.rest import _UTF_8_encoding - - -class FluxStructure: - """The data model consists of tables, records, columns.""" - - pass - - -class FluxStructureEncoder(JSONEncoder): - """The FluxStructure encoder to encode query results to JSON.""" - - def default(self, obj): - """Return serializable objects for JSONEncoder.""" - import datetime - if isinstance(obj, FluxStructure): - return obj.__dict__ - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - return super().default(obj) - - -class FluxTable(FluxStructure): - """ - A table is set of records with a common set of columns and a group key. - - The table can be serialized into JSON by:: - - import json - from influxdb_client.client.flux_table import FluxStructureEncoder - - output = json.dumps(tables, cls=FluxStructureEncoder, indent=2) - print(output) - - """ - - def __init__(self) -> None: - """Initialize defaults.""" - self.columns: List[FluxColumn] = [] - self.records: List[FluxRecord] = [] - - def get_group_key(self): - """ - Group key is a list of columns. - - A table’s group key denotes which subset of the entire dataset is assigned to the table. - """ - return list(filter(lambda column: (column.group is True), self.columns)) - - def __str__(self): - """Return formatted output.""" - cls_name = type(self).__name__ - return cls_name + "() columns: " + str(len(self.columns)) + ", records: " + str(len(self.records)) - - def __repr__(self): - """Format for inspection.""" - return f"<{type(self).__name__}: {len(self.columns)} columns, {len(self.records)} records>" - - def __iter__(self): - """Iterate over records.""" - return iter(self.records) - - -class FluxColumn(FluxStructure): - """A column has a label and a data type.""" - - def __init__(self, index=None, label=None, data_type=None, group=None, default_value=None) -> None: - """Initialize defaults.""" - self.default_value = default_value - self.group = group - self.data_type = data_type - self.label = label - self.index = index - - def __repr__(self): - """Format for inspection.""" - fields = [repr(self.index)] + [ - f'{name}={getattr(self, name)!r}' for name in ( - 'label', 'data_type', 'group', 'default_value' - ) if getattr(self, name) is not None - ] - return f"{type(self).__name__}({', '.join(fields)})" - - -class FluxRecord(FluxStructure): - """A record is a tuple of named values and is represented using an object type.""" - - def __init__(self, table, values=None) -> None: - """Initialize defaults.""" - if values is None: - values = {} - self.table = table - self.values = values - self.row = [] - - def get_start(self): - """Get '_start' value.""" - return self["_start"] - - def get_stop(self): - """Get '_stop' value.""" - return self["_stop"] - - def get_time(self): - """Get timestamp.""" - return self["_time"] - - def get_value(self): - """Get field value.""" - return self["_value"] - - def get_field(self): - """Get field name.""" - return self["_field"] - - def get_measurement(self): - """Get measurement name.""" - return self["_measurement"] - - def __getitem__(self, key): - """Get value by key.""" - return self.values.__getitem__(key) - - def __setitem__(self, key, value): - """Set value with key and value.""" - return self.values.__setitem__(key, value) - - def __str__(self): - """Return formatted output.""" - cls_name = type(self).__name__ - return cls_name + "() table: " + str(self.table) + ", " + str(self.values) - - def __repr__(self): - """Format for inspection.""" - return f"<{type(self).__name__}: field={self.values.get('_field')}, value={self.values.get('_value')}>" - - -class TableList(List[FluxTable]): - """:class:`~influxdb_client.client.flux_table.FluxTable` list with additionally functional to better handle of query result.""" # noqa: E501 - - def to_values(self, columns: List['str'] = None) -> List[List[object]]: - """ - Serialize query results to a flattened list of values. - - :param columns: if not ``None`` then only specified columns are presented in results - :return: :class:`~list` of values - - Output example: - - .. code-block:: python - - [ - ['New York', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 24.3], - ['Prague', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 25.3], - ... - ] - - Configure required columns: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using Table structure - tables = client.query_api().query('from(bucket:"my-bucket") |> range(start: -10m)') - - # Serialize to values - output = tables.to_values(columns=['location', '_time', '_value']) - print(output) - """ - - def filter_values(record): - if columns is not None: - return [record.values.get(k) for k in columns] - return record.values.values() - - return self._to_values(filter_values) - - def to_json(self, columns: List['str'] = None, **kwargs) -> str: - """ - Serialize query results to a JSON formatted :class:`~str`. - - :param columns: if not ``None`` then only specified columns are presented in results - :return: :class:`~str` - - The query results is flattened to array: - - .. code-block:: javascript - - [ - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:00.897825+00:00", - "region": "north", - "_field": "usage", - "_value": 15 - }, - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:01.897825+00:00", - "region": "west", - "_field": "usage", - "_value": 10 - }, - ... - ] - - The JSON format could be configured via ``**kwargs`` arguments: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using Table structure - tables = client.query_api().query('from(bucket:"my-bucket") |> range(start: -10m)') - - # Serialize to JSON - output = tables.to_json(indent=5) - print(output) - - For all available options see - `json.dump `_. - """ - if 'indent' not in kwargs: - kwargs['indent'] = 2 - - def filter_values(record): - if columns is not None: - return {k: v for (k, v) in record.values.items() if k in columns} - return record.values - - import json - return json.dumps(self._to_values(filter_values), cls=FluxStructureEncoder, **kwargs) - - def _to_values(self, mapping): - return [mapping(record) for table in self for record in table.records] - - -class CSVIterator(Iterator[List[str]]): - """:class:`Iterator[List[str]]` with additionally functional to better handle of query result.""" - - def __init__(self, response: HTTPResponse) -> None: - """Initialize ``csv.reader``.""" - self.delegate = csv.reader(codecs.iterdecode(response, _UTF_8_encoding)) - - def __iter__(self): - """Return an iterator object.""" - return self - - def __next__(self): - """Retrieve the next item from the iterator.""" - row = self.delegate.__next__() - while not row: - row = self.delegate.__next__() - return row - - def to_values(self) -> List[List[str]]: - """ - Serialize query results to a flattened list of values. - - :return: :class:`~list` of values - - Output example: - - .. code-block:: python - - [ - ['New York', '2022-06-14T08:00:51.749072045Z', '24.3'], - ['Prague', '2022-06-14T08:00:51.749072045Z', '25.3'], - ... - ] - """ - return list(self.__iter__()) diff --git a/frogpilot/third_party/influxdb_client/client/influxdb_client.py b/frogpilot/third_party/influxdb_client/client/influxdb_client.py deleted file mode 100644 index cbae75a90..000000000 --- a/frogpilot/third_party/influxdb_client/client/influxdb_client.py +++ /dev/null @@ -1,438 +0,0 @@ -"""InfluxDBClient is client for API defined in https://github.com/influxdata/influxdb/blob/master/http/swagger.yml.""" - -from __future__ import absolute_import - -import logging -import warnings - -from influxdb_client import HealthCheck, HealthService, Ready, ReadyService, PingService, \ - InvokableScriptsApi -from influxdb_client.client._base import _BaseClient -from influxdb_client.client.authorizations_api import AuthorizationsApi -from influxdb_client.client.bucket_api import BucketsApi -from influxdb_client.client.delete_api import DeleteApi -from influxdb_client.client.labels_api import LabelsApi -from influxdb_client.client.organizations_api import OrganizationsApi -from influxdb_client.client.query_api import QueryApi, QueryOptions -from influxdb_client.client.tasks_api import TasksApi -from influxdb_client.client.users_api import UsersApi -from influxdb_client.client.write_api import WriteApi, WriteOptions, PointSettings - -logger = logging.getLogger('influxdb_client.client.influxdb_client') - - -class InfluxDBClient(_BaseClient): - """InfluxDBClient is client for InfluxDB v2.""" - - def __init__(self, url, token: str = None, debug=None, timeout=10_000, enable_gzip=False, org: str = None, - default_tags: dict = None, **kwargs) -> None: - """ - Initialize defaults. - - :param url: InfluxDB server API url (ex. http://localhost:8086). - :param token: ``token`` to authenticate to the InfluxDB API - :param debug: enable verbose logging of http requests - :param timeout: HTTP client timeout setting for a request specified in milliseconds. - If one number provided, it will be total request timeout. - It can also be a pair (tuple) of (connection, read) timeouts. - :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints - supports the Gzip compression. - :param org: organization name (used as a default in Query, Write and Delete API) - :key bool verify_ssl: Set this to false to skip verifying SSL certificate when calling API from https server. - :key str ssl_ca_cert: Set this to customize the certificate file to verify the peer. - :key str cert_file: Path to the certificate that will be used for mTLS authentication. - :key str cert_key_file: Path to the file contains private key for mTLS certificate. - :key str cert_key_password: String or function which returns password for decrypting the mTLS private key. - :key ssl.SSLContext ssl_context: Specify a custom Python SSL Context for the TLS/ mTLS handshake. - Be aware that only delivered certificate/ key files or an SSL Context are - possible. - :key str proxy: Set this to configure the http proxy to be used (ex. http://localhost:3128) - :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy - authentication. - :key int connection_pool_maxsize: Number of connections to save that can be reused by urllib3. - Defaults to "multiprocessing.cpu_count() * 5". - :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests - except batching writes. As a default there is no one retry strategy. - :key bool auth_basic: Set this to true to enable basic authentication when talking to a InfluxDB 1.8.x that - does not use auth-enabled but is protected by a reverse proxy with basic authentication. - (defaults to false, don't set to true when talking to InfluxDB 2) - :key str username: ``username`` to authenticate via username and password credentials to the InfluxDB 2.x - :key str password: ``password`` to authenticate via username and password credentials to the InfluxDB 2.x - :key list[str] profilers: list of enabled Flux profilers - """ - super().__init__(url=url, token=token, debug=debug, timeout=timeout, enable_gzip=enable_gzip, org=org, - default_tags=default_tags, http_client_logger="urllib3", **kwargs) - - from .._sync.api_client import ApiClient - self.api_client = ApiClient(configuration=self.conf, header_name=self.auth_header_name, - header_value=self.auth_header_value, retries=self.retries) - - def __enter__(self): - """ - Enter the runtime context related to this object. - - It will bind this method’s return value to the target(s) - specified in the `as` clause of the statement. - - return: self instance - """ - return self - - def __exit__(self, exc_type, exc_value, traceback): - """Exit the runtime context related to this object and close the client.""" - self.close() - - @classmethod - def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): - """ - Configure client via configuration file. The configuration has to be under 'influx' section. - - :param config_file: Path to configuration file - :param debug: Enable verbose logging of http requests - :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints - supports the Gzip compression. - :key config_name: Name of the configuration section of the configuration file - :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy - authentication. - :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests - except batching writes. As a default there is no one retry strategy. - :key ssl.SSLContext ssl_context: Specify a custom Python SSL Context for the TLS/ mTLS handshake. - Be aware that only delivered certificate/ key files or an SSL Context are - possible. - - The supported formats: - - https://docs.python.org/3/library/configparser.html - - https://toml.io/en/ - - https://www.json.org/json-en.html - - Configuration options: - - url - - org - - token - - timeout, - - verify_ssl - - ssl_ca_cert - - cert_file - - cert_key_file - - cert_key_password - - connection_pool_maxsize - - auth_basic - - profilers - - proxy - - - config.ini example:: - - [influx2] - url=http://localhost:8086 - org=my-org - token=my-token - timeout=6000 - connection_pool_maxsize=25 - auth_basic=false - profilers=query,operator - proxy=http:proxy.domain.org:8080 - - [tags] - id = 132-987-655 - customer = California Miner - data_center = ${env.data_center} - - config.toml example:: - - [influx2] - url = "http://localhost:8086" - token = "my-token" - org = "my-org" - timeout = 6000 - connection_pool_maxsize = 25 - auth_basic = false - profilers="query, operator" - proxy = "http://proxy.domain.org:8080" - - [tags] - id = "132-987-655" - customer = "California Miner" - data_center = "${env.data_center}" - - config.json example:: - - { - "url": "http://localhost:8086", - "token": "my-token", - "org": "my-org", - "active": true, - "timeout": 6000, - "connection_pool_maxsize": 55, - "auth_basic": false, - "profilers": "query, operator", - "tags": { - "id": "132-987-655", - "customer": "California Miner", - "data_center": "${env.data_center}" - } - } - - """ - return InfluxDBClient._from_config_file(config_file=config_file, debug=debug, enable_gzip=enable_gzip, **kwargs) - - @classmethod - def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): - """ - Configure client via environment properties. - - :param debug: Enable verbose logging of http requests - :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints - supports the Gzip compression. - :key str proxy: Set this to configure the http proxy to be used (ex. http://localhost:3128) - :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy - authentication. - :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests - except batching writes. As a default there is no one retry strategy. - :key ssl.SSLContext ssl_context: Specify a custom Python SSL Context for the TLS/ mTLS handshake. - Be aware that only delivered certificate/ key files or an SSL Context are - possible. - - Supported environment properties: - - INFLUXDB_V2_URL - - INFLUXDB_V2_ORG - - INFLUXDB_V2_TOKEN - - INFLUXDB_V2_TIMEOUT - - INFLUXDB_V2_VERIFY_SSL - - INFLUXDB_V2_SSL_CA_CERT - - INFLUXDB_V2_CERT_FILE - - INFLUXDB_V2_CERT_KEY_FILE - - INFLUXDB_V2_CERT_KEY_PASSWORD - - INFLUXDB_V2_CONNECTION_POOL_MAXSIZE - - INFLUXDB_V2_AUTH_BASIC - - INFLUXDB_V2_PROFILERS - - INFLUXDB_V2_TAG - """ - return InfluxDBClient._from_env_properties(debug=debug, enable_gzip=enable_gzip, **kwargs) - - def write_api(self, write_options=WriteOptions(), point_settings=PointSettings(), **kwargs) -> WriteApi: - """ - Create Write API instance. - - Example: - .. code-block:: python - - from influxdb_client import InfluxDBClient - from influxdb_client.client.write_api import SYNCHRONOUS - - - # Initialize SYNCHRONOUS instance of WriteApi - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - write_api = client.write_api(write_options=SYNCHRONOUS) - - If you would like to use a **background batching**, you have to configure client like this: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - # Initialize background batching instance of WriteApi - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - with client.write_api() as write_api: - pass - - There is also possibility to use callbacks to notify about state of background batches: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - from influxdb_client.client.exceptions import InfluxDBError - - - class BatchingCallback(object): - - def success(self, conf: (str, str, str), data: str): - print(f"Written batch: {conf}, data: {data}") - - def error(self, conf: (str, str, str), data: str, exception: InfluxDBError): - print(f"Cannot write batch: {conf}, data: {data} due: {exception}") - - def retry(self, conf: (str, str, str), data: str, exception: InfluxDBError): - print(f"Retryable error occurs for batch: {conf}, data: {data} retry: {exception}") - - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - callback = BatchingCallback() - with client.write_api(success_callback=callback.success, - error_callback=callback.error, - retry_callback=callback.retry) as write_api: - pass - - :param write_options: Write API configuration - :param point_settings: settings to store default tags - :key success_callback: The callable ``callback`` to run after having successfully written a batch. - - The callable must accept two arguments: - - `Tuple`: ``(bucket, organization, precision)`` - - `str`: written data - - **[batching mode]** - - :key error_callback: The callable ``callback`` to run after having unsuccessfully written a batch. - - The callable must accept three arguments: - - `Tuple`: ``(bucket, organization, precision)`` - - `str`: written data - - `Exception`: an occurred error - - **[batching mode]** - :key retry_callback: The callable ``callback`` to run after retryable error occurred. - - The callable must accept three arguments: - - `Tuple`: ``(bucket, organization, precision)`` - - `str`: written data - - `Exception`: an retryable error - - **[batching mode]** - :return: write api instance - """ - return WriteApi(influxdb_client=self, write_options=write_options, point_settings=point_settings, **kwargs) - - def query_api(self, query_options: QueryOptions = QueryOptions()) -> QueryApi: - """ - Create an Query API instance. - - :param query_options: optional query api configuration - :return: Query api instance - """ - return QueryApi(self, query_options) - - def invokable_scripts_api(self) -> InvokableScriptsApi: - """ - Create an InvokableScripts API instance. - - :return: InvokableScripts API instance - """ - return InvokableScriptsApi(self) - - def close(self): - """Shutdown the client.""" - self.__del__() - - def __del__(self): - """Shutdown the client.""" - if self.api_client: - self.api_client.__del__() - self.api_client = None - - def buckets_api(self) -> BucketsApi: - """ - Create the Bucket API instance. - - :return: buckets api - """ - return BucketsApi(self) - - def authorizations_api(self) -> AuthorizationsApi: - """ - Create the Authorizations API instance. - - :return: authorizations api - """ - return AuthorizationsApi(self) - - def users_api(self) -> UsersApi: - """ - Create the Users API instance. - - :return: users api - """ - return UsersApi(self) - - def organizations_api(self) -> OrganizationsApi: - """ - Create the Organizations API instance. - - :return: organizations api - """ - return OrganizationsApi(self) - - def tasks_api(self) -> TasksApi: - """ - Create the Tasks API instance. - - :return: tasks api - """ - return TasksApi(self) - - def labels_api(self) -> LabelsApi: - """ - Create the Labels API instance. - - :return: labels api - """ - return LabelsApi(self) - - def health(self) -> HealthCheck: - """ - Get the health of an instance. - - :return: HealthCheck - """ - warnings.warn("This method is deprecated. Call 'ping()' instead.", DeprecationWarning) - health_service = HealthService(self.api_client) - - try: - health = health_service.get_health() - return health - except Exception as e: - return HealthCheck(name="influxdb", message=str(e), status="fail") - - def ping(self) -> bool: - """ - Return the status of InfluxDB instance. - - :return: The status of InfluxDB. - """ - ping_service = PingService(self.api_client) - - try: - ping_service.get_ping() - return True - except Exception as ex: - logger.debug("Unexpected error during /ping: %s", ex) - return False - - def version(self) -> str: - """ - Return the version of the connected InfluxDB Server. - - :return: The version of InfluxDB. - """ - ping_service = PingService(self.api_client) - - response = ping_service.get_ping_with_http_info(_return_http_data_only=False) - - return ping_service.response_header(response) - - def build(self) -> str: - """ - Return the build type of the connected InfluxDB Server. - - :return: The type of InfluxDB build. - """ - ping_service = PingService(self.api_client) - - return ping_service.build_type() - - def ready(self) -> Ready: - """ - Get The readiness of the InfluxDB 2.0. - - :return: Ready - """ - ready_service = ReadyService(self.api_client) - return ready_service.get_ready() - - def delete_api(self) -> DeleteApi: - """ - Get the delete metrics API instance. - - :return: delete api - """ - return DeleteApi(self) diff --git a/frogpilot/third_party/influxdb_client/client/influxdb_client_async.py b/frogpilot/third_party/influxdb_client/client/influxdb_client_async.py deleted file mode 100644 index a8a2d1734..000000000 --- a/frogpilot/third_party/influxdb_client/client/influxdb_client_async.py +++ /dev/null @@ -1,301 +0,0 @@ -"""InfluxDBClientAsync is client for API defined in https://github.com/influxdata/openapi/blob/master/contracts/oss.yml.""" # noqa: E501 -import logging -import sys - -from influxdb_client import PingService -from influxdb_client.client._base import _BaseClient -from influxdb_client.client.delete_api_async import DeleteApiAsync -from influxdb_client.client.query_api import QueryOptions -from influxdb_client.client.query_api_async import QueryApiAsync -from influxdb_client.client.write_api import PointSettings -from influxdb_client.client.write_api_async import WriteApiAsync - -logger = logging.getLogger('influxdb_client.client.influxdb_client_async') - - -class InfluxDBClientAsync(_BaseClient): - """InfluxDBClientAsync is client for InfluxDB v2.""" - - def __init__(self, url, token: str = None, org: str = None, debug=None, timeout=10_000, enable_gzip=False, - **kwargs) -> None: - """ - Initialize defaults. - - :param url: InfluxDB server API url (ex. http://localhost:8086). - :param token: ``token`` to authenticate to the InfluxDB 2.x - :param org: organization name (used as a default in Query, Write and Delete API) - :param debug: enable verbose logging of http requests - :param timeout: The maximal number of milliseconds for the whole HTTP request including - connection establishment, request sending and response reading. - It can also be a :class:`~aiohttp.ClientTimeout` which is directly pass to ``aiohttp``. - :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints - supports the Gzip compression. - :key bool verify_ssl: Set this to false to skip verifying SSL certificate when calling API from https server. - :key str ssl_ca_cert: Set this to customize the certificate file to verify the peer. - :key str cert_file: Path to the certificate that will be used for mTLS authentication. - :key str cert_key_file: Path to the file contains private key for mTLS certificate. - :key str cert_key_password: String or function which returns password for decrypting the mTLS private key. - :key ssl.SSLContext ssl_context: Specify a custom Python SSL Context for the TLS/ mTLS handshake. - Be aware that only delivered certificate/ key files or an SSL Context are - possible. - :key str proxy: Set this to configure the http proxy to be used (ex. http://localhost:3128) - :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy - authentication. - :key int connection_pool_maxsize: The total number of simultaneous connections. - Defaults to "multiprocessing.cpu_count() * 5". - :key bool auth_basic: Set this to true to enable basic authentication when talking to a InfluxDB 1.8.x that - does not use auth-enabled but is protected by a reverse proxy with basic authentication. - (defaults to false, don't set to true when talking to InfluxDB 2) - :key str username: ``username`` to authenticate via username and password credentials to the InfluxDB 2.x - :key str password: ``password`` to authenticate via username and password credentials to the InfluxDB 2.x - :key bool allow_redirects: If set to ``False``, do not follow HTTP redirects. ``True`` by default. - :key int max_redirects: Maximum number of HTTP redirects to follow. ``10`` by default. - :key dict client_session_kwargs: Additional configuration arguments for :class:`~aiohttp.ClientSession` - :key type client_session_type: Type of aiohttp client to use. Useful for third party wrappers like - ``aiohttp-retry``. :class:`~aiohttp.ClientSession` by default. - :key list[str] profilers: list of enabled Flux profilers - """ - super().__init__(url=url, token=token, org=org, debug=debug, timeout=timeout, enable_gzip=enable_gzip, - http_client_logger="aiohttp.client", **kwargs) - - # compatibility with Python 3.6 - if sys.version_info[:2] >= (3, 7): - from asyncio import get_running_loop - else: - from asyncio import _get_running_loop as get_running_loop - - # check present asynchronous context - try: - loop = get_running_loop() - # compatibility with Python 3.6 - if loop is None: - raise RuntimeError('no running event loop') - except RuntimeError: - from influxdb_client.client.exceptions import InfluxDBError - message = "The async client should be initialised inside async coroutine " \ - "otherwise there can be unexpected behaviour." - raise InfluxDBError(response=None, message=message) - - from .._async.api_client import ApiClientAsync - self.api_client = ApiClientAsync(configuration=self.conf, header_name=self.auth_header_name, - header_value=self.auth_header_value, **kwargs) - - async def __aenter__(self) -> 'InfluxDBClientAsync': - """ - Enter the runtime context related to this object. - - return: self instance - """ - return self - - async def __aexit__(self, exc_type, exc, tb) -> None: - """Shutdown the client.""" - await self.close() - - async def close(self): - """Shutdown the client.""" - if self.api_client: - await self.api_client.close() - self.api_client = None - - @classmethod - def from_config_file(cls, config_file: str = "config.ini", debug=None, enable_gzip=False, **kwargs): - """ - Configure client via configuration file. The configuration has to be under 'influx' section. - - :param config_file: Path to configuration file - :param debug: Enable verbose logging of http requests - :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints - supports the Gzip compression. - :key config_name: Name of the configuration section of the configuration file - :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy - authentication. - :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests - except batching writes. As a default there is no one retry strategy. - :key ssl.SSLContext ssl_context: Specify a custom Python SSL Context for the TLS/ mTLS handshake. - Be aware that only delivered certificate/ key files or an SSL Context are - possible. - - The supported formats: - - https://docs.python.org/3/library/configparser.html - - https://toml.io/en/ - - https://www.json.org/json-en.html - - Configuration options: - - url - - org - - token - - timeout, - - verify_ssl - - ssl_ca_cert - - cert_file - - cert_key_file - - cert_key_password - - connection_pool_maxsize - - auth_basic - - profilers - - proxy - - - config.ini example:: - - [influx2] - url=http://localhost:8086 - org=my-org - token=my-token - timeout=6000 - connection_pool_maxsize=25 - auth_basic=false - profilers=query,operator - proxy=http:proxy.domain.org:8080 - - [tags] - id = 132-987-655 - customer = California Miner - data_center = ${env.data_center} - - config.toml example:: - - [influx2] - url = "http://localhost:8086" - token = "my-token" - org = "my-org" - timeout = 6000 - connection_pool_maxsize = 25 - auth_basic = false - profilers="query, operator" - proxy = "http://proxy.domain.org:8080" - - [tags] - id = "132-987-655" - customer = "California Miner" - data_center = "${env.data_center}" - - config.json example:: - - { - "url": "http://localhost:8086", - "token": "my-token", - "org": "my-org", - "active": true, - "timeout": 6000, - "connection_pool_maxsize": 55, - "auth_basic": false, - "profilers": "query, operator", - "tags": { - "id": "132-987-655", - "customer": "California Miner", - "data_center": "${env.data_center}" - } - } - - """ - return InfluxDBClientAsync._from_config_file(config_file=config_file, debug=debug, - enable_gzip=enable_gzip, **kwargs) - - @classmethod - def from_env_properties(cls, debug=None, enable_gzip=False, **kwargs): - """ - Configure client via environment properties. - - :param debug: Enable verbose logging of http requests - :param enable_gzip: Enable Gzip compression for http requests. Currently, only the "Write" and "Query" endpoints - supports the Gzip compression. - :key str proxy: Set this to configure the http proxy to be used (ex. http://localhost:3128) - :key str proxy_headers: A dictionary containing headers that will be sent to the proxy. Could be used for proxy - authentication. - :key urllib3.util.retry.Retry retries: Set the default retry strategy that is used for all HTTP requests - except batching writes. As a default there is no one retry strategy. - :key ssl.SSLContext ssl_context: Specify a custom Python SSL Context for the TLS/ mTLS handshake. - Be aware that only delivered certificate/ key files or an SSL Context are - possible. - - - Supported environment properties: - - INFLUXDB_V2_URL - - INFLUXDB_V2_ORG - - INFLUXDB_V2_TOKEN - - INFLUXDB_V2_TIMEOUT - - INFLUXDB_V2_VERIFY_SSL - - INFLUXDB_V2_SSL_CA_CERT - - INFLUXDB_V2_CERT_FILE - - INFLUXDB_V2_CERT_KEY_FILE - - INFLUXDB_V2_CERT_KEY_PASSWORD - - INFLUXDB_V2_CONNECTION_POOL_MAXSIZE - - INFLUXDB_V2_AUTH_BASIC - - INFLUXDB_V2_PROFILERS - - INFLUXDB_V2_TAG - """ - return InfluxDBClientAsync._from_env_properties(debug=debug, enable_gzip=enable_gzip, **kwargs) - - async def ping(self) -> bool: - """ - Return the status of InfluxDB instance. - - :return: The status of InfluxDB. - """ - ping_service = PingService(self.api_client) - - try: - await ping_service.get_ping_async() - return True - except Exception as ex: - logger.debug("Unexpected error during /ping: %s", ex) - raise ex - - async def version(self) -> str: - """ - Return the version of the connected InfluxDB Server. - - :return: The version of InfluxDB. - """ - ping_service = PingService(self.api_client) - - response = await ping_service.get_ping_async(_return_http_data_only=False) - return ping_service.response_header(response) - - async def build(self) -> str: - """ - Return the build type of the connected InfluxDB Server. - - :return: The type of InfluxDB build. - """ - ping_service = PingService(self.api_client) - - return await ping_service.build_type_async() - - def query_api(self, query_options: QueryOptions = QueryOptions()) -> QueryApiAsync: - """ - Create an asynchronous Query API instance. - - :param query_options: optional query api configuration - :return: Query api instance - """ - return QueryApiAsync(self, query_options) - - def write_api(self, point_settings=PointSettings()) -> WriteApiAsync: - """ - Create an asynchronous Write API instance. - - Example: - .. code-block:: python - - from influxdb_client_async import InfluxDBClientAsync - - - # Initialize async/await instance of Write API - async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", org="my-org") as client: - write_api = client.write_api() - - :param point_settings: settings to store default tags - :return: write api instance - """ - return WriteApiAsync(influxdb_client=self, point_settings=point_settings) - - def delete_api(self) -> DeleteApiAsync: - """ - Get the asynchronous delete metrics API instance. - - :return: delete api - """ - return DeleteApiAsync(self) diff --git a/frogpilot/third_party/influxdb_client/client/invokable_scripts_api.py b/frogpilot/third_party/influxdb_client/client/invokable_scripts_api.py deleted file mode 100644 index cf5df2807..000000000 --- a/frogpilot/third_party/influxdb_client/client/invokable_scripts_api.py +++ /dev/null @@ -1,293 +0,0 @@ -""" -Use API invokable scripts to create custom InfluxDB API endpoints that query, process, and shape data. - -API invokable scripts let you assign scripts to API endpoints and then execute them as standard REST operations -in InfluxDB Cloud. -""" - -from typing import List, Iterator, Generator, Any - -from influxdb_client import Script, InvokableScriptsService, ScriptCreateRequest, ScriptUpdateRequest, \ - ScriptInvocationParams -from influxdb_client.client._base import _BaseQueryApi -from influxdb_client.client.flux_csv_parser import FluxResponseMetadataMode -from influxdb_client.client.flux_table import FluxRecord, TableList, CSVIterator - - -class InvokableScriptsApi(_BaseQueryApi): - """Use API invokable scripts to create custom InfluxDB API endpoints that query, process, and shape data.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - self._influxdb_client = influxdb_client - self._invokable_scripts_service = InvokableScriptsService(influxdb_client.api_client) - - def create_script(self, create_request: ScriptCreateRequest) -> Script: - """Create a script. - - :param ScriptCreateRequest create_request: The script to create. (required) - :return: The created script. - """ - return self._invokable_scripts_service.post_scripts(script_create_request=create_request) - - def update_script(self, script_id: str, update_request: ScriptUpdateRequest) -> Script: - """Update a script. - - :param str script_id: The ID of the script to update. (required) - :param ScriptUpdateRequest update_request: Script updates to apply (required) - :return: The updated. - """ - return self._invokable_scripts_service.patch_scripts_id(script_id=script_id, - script_update_request=update_request) - - def delete_script(self, script_id: str) -> None: - """Delete a script. - - :param str script_id: The ID of the script to delete. (required) - :return: None - """ - self._invokable_scripts_service.delete_scripts_id(script_id=script_id) - - def find_scripts(self, **kwargs): - """List scripts. - - :key int limit: The number of scripts to return. - :key int offset: The offset for pagination. - :return: List of scripts. - :rtype: list[Script] - """ - return self._invokable_scripts_service.get_scripts(**kwargs).scripts - - def invoke_script(self, script_id: str, params: dict = None) -> TableList: - """ - Invoke synchronously a script and return result as a TableList. - - The bind parameters referenced in the script are substitutes with `params` key-values sent in the request body. - - :param str script_id: The ID of the script to invoke. (required) - :param params: bind parameters - :return: :class:`~influxdb_client.client.flux_table.FluxTable` list wrapped into - :class:`~influxdb_client.client.flux_table.TableList` - :rtype: TableList - - Serialization the query results to flattened list of values via :func:`~influxdb_client.client.flux_table.TableList.to_values`: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="https://us-west-2-1.aws.cloud2.influxdata.com", token="my-token", org="my-org") as client: - - # Query: using Table structure - tables = client.invokable_scripts_api().invoke_script(script_id="script-id") - - # Serialize to values - output = tables.to_values(columns=['location', '_time', '_value']) - print(output) - - .. code-block:: python - - [ - ['New York', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 24.3], - ['Prague', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 25.3], - ... - ] - - Serialization the query results to JSON via :func:`~influxdb_client.client.flux_table.TableList.to_json`: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="https://us-west-2-1.aws.cloud2.influxdata.com", token="my-token", org="my-org") as client: - - # Query: using Table structure - tables = client.invokable_scripts_api().invoke_script(script_id="script-id") - - # Serialize to JSON - output = tables.to_json(indent=5) - print(output) - - .. code-block:: javascript - - [ - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:00.897825+00:00", - "region": "north", - "_field": "usage", - "_value": 15 - }, - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:01.897825+00:00", - "region": "west", - "_field": "usage", - "_value": 10 - }, - ... - ] - """ # noqa: E501 - response = self._invokable_scripts_service \ - .post_scripts_id_invoke(script_id=script_id, - script_invocation_params=ScriptInvocationParams(params=params), - async_req=False, - _preload_content=False, - _return_http_data_only=False) - return self._to_tables(response, query_options=None, response_metadata_mode=FluxResponseMetadataMode.only_names) - - def invoke_script_stream(self, script_id: str, params: dict = None) -> Generator['FluxRecord', Any, None]: - """ - Invoke synchronously a script and return result as a Generator['FluxRecord']. - - The bind parameters referenced in the script are substitutes with `params` key-values sent in the request body. - - :param str script_id: The ID of the script to invoke. (required) - :param params: bind parameters - :return: Stream of FluxRecord. - :rtype: Generator['FluxRecord'] - """ - response = self._invokable_scripts_service \ - .post_scripts_id_invoke(script_id=script_id, - script_invocation_params=ScriptInvocationParams(params=params), - async_req=False, - _preload_content=False, - _return_http_data_only=False) - - return self._to_flux_record_stream(response, query_options=None, - response_metadata_mode=FluxResponseMetadataMode.only_names) - - def invoke_script_data_frame(self, script_id: str, params: dict = None, data_frame_index: List[str] = None): - """ - Invoke synchronously a script and return Pandas DataFrame. - - The bind parameters referenced in the script are substitutes with `params` key-values sent in the request body. - - .. note:: If the ``script`` returns tables with differing schemas than the client generates a :class:`~DataFrame` for each of them. - - :param str script_id: The ID of the script to invoke. (required) - :param List[str] data_frame_index: The list of columns that are used as DataFrame index. - :param params: bind parameters - :return: :class:`~DataFrame` or :class:`~List[DataFrame]` - - .. warning:: For the optimal processing of the query results use the ``pivot() function`` which align results as a table. - - .. code-block:: text - - from(bucket:"my-bucket") - |> range(start: -5m, stop: now()) - |> filter(fn: (r) => r._measurement == "mem") - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - - For more info see: - - https://docs.influxdata.com/resources/videos/pivots-in-flux/ - - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/ - - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/ - """ # noqa: E501 - _generator = self.invoke_script_data_frame_stream(script_id=script_id, - params=params, - data_frame_index=data_frame_index) - return self._to_data_frames(_generator) - - def invoke_script_data_frame_stream(self, script_id: str, params: dict = None, data_frame_index: List[str] = None): - """ - Invoke synchronously a script and return stream of Pandas DataFrame as a Generator['pd.DataFrame']. - - The bind parameters referenced in the script are substitutes with `params` key-values sent in the request body. - - .. note:: If the ``script`` returns tables with differing schemas than the client generates a :class:`~DataFrame` for each of them. - - :param str script_id: The ID of the script to invoke. (required) - :param List[str] data_frame_index: The list of columns that are used as DataFrame index. - :param params: bind parameters - :return: :class:`~Generator[DataFrame]` - - .. warning:: For the optimal processing of the query results use the ``pivot() function`` which align results as a table. - - .. code-block:: text - - from(bucket:"my-bucket") - |> range(start: -5m, stop: now()) - |> filter(fn: (r) => r._measurement == "mem") - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - - For more info see: - - https://docs.influxdata.com/resources/videos/pivots-in-flux/ - - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/ - - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/ - """ # noqa: E501 - response = self._invokable_scripts_service \ - .post_scripts_id_invoke(script_id=script_id, - script_invocation_params=ScriptInvocationParams(params=params), - async_req=False, - _preload_content=False, - _return_http_data_only=False) - - return self._to_data_frame_stream(data_frame_index, response, query_options=None, - response_metadata_mode=FluxResponseMetadataMode.only_names) - - def invoke_script_csv(self, script_id: str, params: dict = None) -> CSVIterator: - """ - Invoke synchronously a script and return result as a CSV iterator. Each iteration returns a row of the CSV file. - - The bind parameters referenced in the script are substitutes with `params` key-values sent in the request body. - - :param str script_id: The ID of the script to invoke. (required) - :param params: bind parameters - :return: :class:`~Iterator[List[str]]` wrapped into :class:`~influxdb_client.client.flux_table.CSVIterator` - :rtype: CSVIterator - - Serialization the query results to flattened list of values via :func:`~influxdb_client.client.flux_table.CSVIterator.to_values`: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using CSV iterator - csv_iterator = client.invokable_scripts_api().invoke_script_csv(script_id="script-id") - - # Serialize to values - output = csv_iterator.to_values() - print(output) - - .. code-block:: python - - [ - ['', 'result', 'table', '_start', '_stop', '_time', '_value', '_field', '_measurement', 'location'] - ['', '', '0', '2022-06-16', '2022-06-16', '2022-06-16', '24.3', 'temperature', 'my_measurement', 'New York'] - ['', '', '1', '2022-06-16', '2022-06-16', '2022-06-16', '25.3', 'temperature', 'my_measurement', 'Prague'] - ... - ] - - """ # noqa: E501 - response = self._invokable_scripts_service \ - .post_scripts_id_invoke(script_id=script_id, - script_invocation_params=ScriptInvocationParams(params=params), - async_req=False, - _preload_content=False) - - return self._to_csv(response) - - def invoke_script_raw(self, script_id: str, params: dict = None) -> Iterator[List[str]]: - """ - Invoke synchronously a script and return result as raw unprocessed result as a str. - - The bind parameters referenced in the script are substitutes with `params` key-values sent in the request body. - - :param str script_id: The ID of the script to invoke. (required) - :param params: bind parameters - :return: Result as a str. - """ - response = self._invokable_scripts_service \ - .post_scripts_id_invoke(script_id=script_id, - script_invocation_params=ScriptInvocationParams(params=params), - async_req=False, - _preload_content=True) - - return response diff --git a/frogpilot/third_party/influxdb_client/client/labels_api.py b/frogpilot/third_party/influxdb_client/client/labels_api.py deleted file mode 100644 index 006cb90c2..000000000 --- a/frogpilot/third_party/influxdb_client/client/labels_api.py +++ /dev/null @@ -1,96 +0,0 @@ -"""Labels are a way to add visual metadata to dashboards, tasks, and other items in the InfluxDB UI.""" - -from typing import List, Dict, Union - -from influxdb_client import LabelsService, LabelCreateRequest, Label, LabelUpdate - - -class LabelsApi(object): - """Implementation for '/api/v2/labels' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - self._influxdb_client = influxdb_client - self._service = LabelsService(influxdb_client.api_client) - - def create_label(self, name: str, org_id: str, properties: Dict[str, str] = None) -> Label: - """ - Create a new label. - - :param name: label name - :param org_id: organization id - :param properties: optional label properties - :return: created label - """ - label_request = LabelCreateRequest(org_id=org_id, name=name, properties=properties) - return self._service.post_labels(label_create_request=label_request).label - - def update_label(self, label: Label): - """ - Update an existing label name and properties. - - :param label: label - :return: the updated label - """ - label_update = LabelUpdate() - label_update.properties = label.properties - label_update.name = label.name - return self._service.patch_labels_id(label_id=label.id, label_update=label_update).label - - def delete_label(self, label: Union[str, Label]): - """ - Delete the label. - - :param label: label id or Label - """ - label_id = None - - if isinstance(label, str): - label_id = label - - if isinstance(label, Label): - label_id = label.id - - return self._service.delete_labels_id(label_id=label_id) - - def clone_label(self, cloned_name: str, label: Label) -> Label: - """ - Create the new instance of the label as a copy existing label. - - :param cloned_name: new label name - :param label: existing label - :return: clonned Label - """ - cloned_properties = None - if label.properties is not None: - cloned_properties = label.properties.copy() - - return self.create_label(name=cloned_name, properties=cloned_properties, org_id=label.org_id) - - def find_labels(self, **kwargs) -> List['Label']: - """ - Get all available labels. - - :key str org_id: The organization ID. - - :return: labels - """ - return self._service.get_labels(**kwargs).labels - - def find_label_by_id(self, label_id: str): - """ - Retrieve the label by id. - - :param label_id: - :return: Label - """ - return self._service.get_labels_id(label_id=label_id).label - - def find_label_by_org(self, org_id) -> List['Label']: - """ - Get the list of all labels for given organization. - - :param org_id: organization id - :return: list of labels - """ - return self._service.get_labels(org_id=org_id).labels diff --git a/frogpilot/third_party/influxdb_client/client/logging_handler.py b/frogpilot/third_party/influxdb_client/client/logging_handler.py deleted file mode 100644 index 445a828d5..000000000 --- a/frogpilot/third_party/influxdb_client/client/logging_handler.py +++ /dev/null @@ -1,64 +0,0 @@ -"""Use the influxdb_client with python native logging.""" -import logging - -from influxdb_client import InfluxDBClient - - -class InfluxLoggingHandler(logging.Handler): - """ - InfluxLoggingHandler instances dispatch logging events to influx. - - There is no need to set a Formatter. - The raw input will be passed on to the influx write api. - """ - - DEFAULT_LOG_RECORD_KEYS = list(logging.makeLogRecord({}).__dict__.keys()) + ['message'] - - def __init__(self, *, url, token, org, bucket, client_args=None, write_api_args=None): - """ - Initialize defaults. - - The arguments `client_args` and `write_api_args` can be dicts of kwargs. - They are passed on to the InfluxDBClient and write_api calls respectively. - """ - super().__init__() - - self.bucket = bucket - - client_args = {} if client_args is None else client_args - self.client = InfluxDBClient(url=url, token=token, org=org, **client_args) - - write_api_args = {} if write_api_args is None else write_api_args - self.write_api = self.client.write_api(**write_api_args) - - def __del__(self): - """Make sure all resources are closed.""" - self.close() - - def close(self) -> None: - """Close the write_api, client and logger.""" - self.write_api.close() - self.client.close() - super().close() - - def emit(self, record: logging.LogRecord) -> None: - """Emit a record via the influxDB WriteApi.""" - try: - message = self.format(record) - extra = self._get_extra_values(record) - return self.write_api.write(record=message, **extra) - except (KeyboardInterrupt, SystemExit): - raise - except (Exception,): - self.handleError(record) - - def _get_extra_values(self, record: logging.LogRecord) -> dict: - """ - Extract all items from the record that were injected via extra. - - Example: `logging.debug(msg, extra={key: value, ...})`. - """ - extra = {'bucket': self.bucket} - extra.update({key: value for key, value in record.__dict__.items() - if key not in self.DEFAULT_LOG_RECORD_KEYS}) - return extra diff --git a/frogpilot/third_party/influxdb_client/client/organizations_api.py b/frogpilot/third_party/influxdb_client/client/organizations_api.py deleted file mode 100644 index e25c6989d..000000000 --- a/frogpilot/third_party/influxdb_client/client/organizations_api.py +++ /dev/null @@ -1,60 +0,0 @@ -""" -An organization is a workspace for a group of users. - -All dashboards, tasks, buckets, members, etc., belong to an organization. -""" - -from influxdb_client import OrganizationsService, UsersService, Organization, PatchOrganizationRequest - - -class OrganizationsApi(object): - """Implementation for '/api/v2/orgs' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - self._influxdb_client = influxdb_client - self._organizations_service = OrganizationsService(influxdb_client.api_client) - self._users_service = UsersService(influxdb_client.api_client) - - def me(self): - """Return the current authenticated user.""" - user = self._users_service.get_me() - return user - - def find_organization(self, org_id): - """Retrieve an organization.""" - return self._organizations_service.get_orgs_id(org_id=org_id) - - def find_organizations(self, **kwargs): - """ - List all organizations. - - :key int offset: Offset for pagination - :key int limit: Limit for pagination - :key bool descending: - :key str org: Filter organizations to a specific organization name. - :key str org_id: Filter organizations to a specific organization ID. - :key str user_id: Filter organizations to a specific user ID. - """ - return self._organizations_service.get_orgs(**kwargs).orgs - - def create_organization(self, name: str = None, organization: Organization = None) -> Organization: - """Create an organization.""" - if organization is None: - organization = Organization(name=name) - return self._organizations_service.post_orgs(post_organization_request=organization) - - def update_organization(self, organization: Organization) -> Organization: - """Update an organization. - - :param organization: Organization update to apply (required) - :return: Organization - """ - request = PatchOrganizationRequest(name=organization.name, - description=organization.description) - - return self._organizations_service.patch_orgs_id(org_id=organization.id, patch_organization_request=request) - - def delete_organization(self, org_id: str): - """Delete an organization.""" - return self._organizations_service.delete_orgs_id(org_id=org_id) diff --git a/frogpilot/third_party/influxdb_client/client/query_api.py b/frogpilot/third_party/influxdb_client/client/query_api.py deleted file mode 100644 index 8611021da..000000000 --- a/frogpilot/third_party/influxdb_client/client/query_api.py +++ /dev/null @@ -1,310 +0,0 @@ -""" -Querying InfluxDB by FluxLang. - -Flux is InfluxData’s functional data scripting language designed for querying, analyzing, and acting on data. -""" - -from typing import List, Generator, Any, Callable - -from influxdb_client import Dialect -from influxdb_client.client._base import _BaseQueryApi -from influxdb_client.client.flux_table import FluxRecord, TableList, CSVIterator - - -class QueryOptions(object): - """Query options.""" - - def __init__(self, profilers: List[str] = None, profiler_callback: Callable = None) -> None: - """ - Initialize query options. - - :param profilers: list of enabled flux profilers - :param profiler_callback: callback function return profilers (FluxRecord) - """ - self.profilers = profilers - self.profiler_callback = profiler_callback - - -class QueryApi(_BaseQueryApi): - """Implementation for '/api/v2/query' endpoint.""" - - def __init__(self, influxdb_client, query_options=QueryOptions()): - """ - Initialize query client. - - :param influxdb_client: influxdb client - """ - super().__init__(influxdb_client=influxdb_client, query_options=query_options) - - def query_csv(self, query: str, org=None, dialect: Dialect = _BaseQueryApi.default_dialect, params: dict = None) \ - -> CSVIterator: - """ - Execute the Flux query and return results as a CSV iterator. Each iteration returns a row of the CSV file. - - :param query: a Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :param dialect: csv dialect format - :param params: bind parameters - :return: :class:`~Iterator[List[str]]` wrapped into :class:`~influxdb_client.client.flux_table.CSVIterator` - :rtype: CSVIterator - - Serialization the query results to flattened list of values via :func:`~influxdb_client.client.flux_table.CSVIterator.to_values`: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using CSV iterator - csv_iterator = client.query_api().query_csv('from(bucket:"my-bucket") |> range(start: -10m)') - - # Serialize to values - output = csv_iterator.to_values() - print(output) - - .. code-block:: python - - [ - ['#datatype', 'string', 'long', 'dateTime:RFC3339', 'dateTime:RFC3339', 'dateTime:RFC3339', 'double', 'string', 'string', 'string'] - ['#group', 'false', 'false', 'true', 'true', 'false', 'false', 'true', 'true', 'true'] - ['#default', '_result', '', '', '', '', '', '', '', ''] - ['', 'result', 'table', '_start', '_stop', '_time', '_value', '_field', '_measurement', 'location'] - ['', '', '0', '2022-06-16', '2022-06-16', '2022-06-16', '24.3', 'temperature', 'my_measurement', 'New York'] - ['', '', '1', '2022-06-16', '2022-06-16', '2022-06-16', '25.3', 'temperature', 'my_measurement', 'Prague'] - ... - ] - - If you would like to turn off `Annotated CSV header's `_ you can use following code: - - .. code-block:: python - - from influxdb_client import InfluxDBClient, Dialect - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using CSV iterator - csv_iterator = client.query_api().query_csv('from(bucket:"my-bucket") |> range(start: -10m)', - dialect=Dialect(header=False, annotations=[])) - - for csv_line in csv_iterator: - print(csv_line) - - .. code-block:: python - - [ - ['', '_result', '0', '2022-06-16', '2022-06-16', '2022-06-16', '24.3', 'temperature', 'my_measurement', 'New York'] - ['', '_result', '1', '2022-06-16', '2022-06-16', '2022-06-16', '25.3', 'temperature', 'my_measurement', 'Prague'] - ... - ] - """ # noqa: E501 - org = self._org_param(org) - response = self._query_api.post_query(org=org, query=self._create_query(query, dialect, params), - async_req=False, _preload_content=False) - - return self._to_csv(response) - - def query_raw(self, query: str, org=None, dialect=_BaseQueryApi.default_dialect, params: dict = None): - """ - Execute synchronous Flux query and return result as raw unprocessed result as a str. - - :param query: a Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :param dialect: csv dialect format - :param params: bind parameters - :return: str - """ - org = self._org_param(org) - result = self._query_api.post_query(org=org, query=self._create_query(query, dialect, params), async_req=False, - _preload_content=False) - - return result - - def query(self, query: str, org=None, params: dict = None) -> TableList: - """Execute synchronous Flux query and return result as a :class:`~influxdb_client.client.flux_table.FluxTable` list. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :param params: bind parameters - :return: :class:`~influxdb_client.client.flux_table.FluxTable` list wrapped into - :class:`~influxdb_client.client.flux_table.TableList` - :rtype: TableList - - Serialization the query results to flattened list of values via :func:`~influxdb_client.client.flux_table.TableList.to_values`: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using Table structure - tables = client.query_api().query('from(bucket:"my-bucket") |> range(start: -10m)') - - # Serialize to values - output = tables.to_values(columns=['location', '_time', '_value']) - print(output) - - .. code-block:: python - - [ - ['New York', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 24.3], - ['Prague', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 25.3], - ... - ] - - Serialization the query results to JSON via :func:`~influxdb_client.client.flux_table.TableList.to_json`: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using Table structure - tables = client.query_api().query('from(bucket:"my-bucket") |> range(start: -10m)') - - # Serialize to JSON - output = tables.to_json(indent=5) - print(output) - - .. code-block:: javascript - - [ - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:00.897825+00:00", - "region": "north", - "_field": "usage", - "_value": 15 - }, - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:01.897825+00:00", - "region": "west", - "_field": "usage", - "_value": 10 - }, - ... - ] - """ # noqa: E501 - org = self._org_param(org) - - response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params), - async_req=False, _preload_content=False, _return_http_data_only=False) - - return self._to_tables(response, query_options=self._get_query_options()) - - def query_stream(self, query: str, org=None, params: dict = None) -> Generator['FluxRecord', Any, None]: - """ - Execute synchronous Flux query and return stream of FluxRecord as a Generator['FluxRecord']. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :param params: bind parameters - :return: Generator['FluxRecord'] - """ - org = self._org_param(org) - - response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params), - async_req=False, _preload_content=False, _return_http_data_only=False) - return self._to_flux_record_stream(response, query_options=self._get_query_options()) - - def query_data_frame(self, query: str, org=None, data_frame_index: List[str] = None, params: dict = None, - use_extension_dtypes: bool = False): - """ - Execute synchronous Flux query and return Pandas DataFrame. - - .. note:: If the ``query`` returns tables with differing schemas than the client generates a :class:`~DataFrame` for each of them. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :param data_frame_index: the list of columns that are used as DataFrame index - :param params: bind parameters - :param use_extension_dtypes: set to ``True`` to use panda's extension data types. - Useful for queries with ``pivot`` function. - When data has missing values, column data type may change (to ``object`` or ``float64``). - Nullable extension types (``Int64``, ``Float64``, ``boolean``) support ``panda.NA`` value. - For more info, see https://pandas.pydata.org/docs/user_guide/missing_data.html. - :return: :class:`~DataFrame` or :class:`~List[DataFrame]` - - .. warning:: For the optimal processing of the query results use the ``pivot() function`` which align results as a table. - - .. code-block:: text - - from(bucket:"my-bucket") - |> range(start: -5m, stop: now()) - |> filter(fn: (r) => r._measurement == "mem") - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - - For more info see: - - https://docs.influxdata.com/resources/videos/pivots-in-flux/ - - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/ - - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/ - """ # noqa: E501 - _generator = self.query_data_frame_stream(query, org=org, data_frame_index=data_frame_index, params=params, - use_extension_dtypes=use_extension_dtypes) - return self._to_data_frames(_generator) - - def query_data_frame_stream(self, query: str, org=None, data_frame_index: List[str] = None, params: dict = None, - use_extension_dtypes: bool = False): - """ - Execute synchronous Flux query and return stream of Pandas DataFrame as a :class:`~Generator[DataFrame]`. - - .. note:: If the ``query`` returns tables with differing schemas than the client generates a :class:`~DataFrame` for each of them. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClient.org`` is used. - :param data_frame_index: the list of columns that are used as DataFrame index - :param params: bind parameters - :param use_extension_dtypes: set to ``True`` to use panda's extension data types. - Useful for queries with ``pivot`` function. - When data has missing values, column data type may change (to ``object`` or ``float64``). - Nullable extension types (``Int64``, ``Float64``, ``boolean``) support ``panda.NA`` value. - For more info, see https://pandas.pydata.org/docs/user_guide/missing_data.html. - :return: :class:`~Generator[DataFrame]` - - .. warning:: For the optimal processing of the query results use the ``pivot() function`` which align results as a table. - - .. code-block:: text - - from(bucket:"my-bucket") - |> range(start: -5m, stop: now()) - |> filter(fn: (r) => r._measurement == "mem") - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - - For more info see: - - https://docs.influxdata.com/resources/videos/pivots-in-flux/ - - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/ - - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/ - """ # noqa: E501 - org = self._org_param(org) - - response = self._query_api.post_query(org=org, query=self._create_query(query, self.default_dialect, params, - dataframe_query=True), - async_req=False, _preload_content=False, _return_http_data_only=False) - - return self._to_data_frame_stream(data_frame_index=data_frame_index, - response=response, - query_options=self._get_query_options(), - use_extension_dtypes=use_extension_dtypes) - - def __del__(self): - """Close QueryAPI.""" - pass diff --git a/frogpilot/third_party/influxdb_client/client/query_api_async.py b/frogpilot/third_party/influxdb_client/client/query_api_async.py deleted file mode 100644 index b3b42cb4e..000000000 --- a/frogpilot/third_party/influxdb_client/client/query_api_async.py +++ /dev/null @@ -1,236 +0,0 @@ -""" -Querying InfluxDB by FluxLang. - -Flux is InfluxData’s functional data scripting language designed for querying, analyzing, and acting on data. -""" -from typing import List, AsyncGenerator - -from influxdb_client.client._base import _BaseQueryApi -from influxdb_client.client.flux_table import FluxRecord, TableList -from influxdb_client.client.query_api import QueryOptions -from influxdb_client.rest import _UTF_8_encoding, ApiException -from .._async.rest import RESTResponseAsync - - -class QueryApiAsync(_BaseQueryApi): - """Asynchronous implementation for '/api/v2/query' endpoint.""" - - def __init__(self, influxdb_client, query_options=QueryOptions()): - """ - Initialize query client. - - :param influxdb_client: influxdb client - """ - super().__init__(influxdb_client=influxdb_client, query_options=query_options) - - async def query(self, query: str, org=None, params: dict = None) -> TableList: - """ - Execute asynchronous Flux query and return result as a :class:`~influxdb_client.client.flux_table.FluxTable` list. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClientAsync.org`` is used. - :param params: bind parameters - :return: :class:`~influxdb_client.client.flux_table.FluxTable` list wrapped into - :class:`~influxdb_client.client.flux_table.TableList` - :rtype: TableList - - Serialization the query results to flattened list of values via :func:`~influxdb_client.client.flux_table.TableList.to_values`: - - .. code-block:: python - - from influxdb_client import InfluxDBClient - - async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", org="my-org") as client: - - # Query: using Table structure - tables = await client.query_api().query('from(bucket:"my-bucket") |> range(start: -10m)') - - # Serialize to values - output = tables.to_values(columns=['location', '_time', '_value']) - print(output) - - .. code-block:: python - - [ - ['New York', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 24.3], - ['Prague', datetime.datetime(2022, 6, 7, 11, 3, 22, 917593, tzinfo=tzutc()), 25.3], - ... - ] - - Serialization the query results to JSON via :func:`~influxdb_client.client.flux_table.TableList.to_json`: - - .. code-block:: python - - from influxdb_client.client.influxdb_client_async import InfluxDBClientAsync - - async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", org="my-org") as client: - # Query: using Table structure - tables = await client.query_api().query('from(bucket:"my-bucket") |> range(start: -10m)') - - # Serialize to JSON - output = tables.to_json(indent=5) - print(output) - - .. code-block:: javascript - - [ - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:00.897825+00:00", - "region": "north", - "_field": "usage", - "_value": 15 - }, - { - "_measurement": "mem", - "_start": "2021-06-23T06:50:11.897825+00:00", - "_stop": "2021-06-25T06:50:11.897825+00:00", - "_time": "2020-02-27T16:20:01.897825+00:00", - "region": "west", - "_field": "usage", - "_value": 10 - }, - ... - ] - """ # noqa: E501 - org = self._org_param(org) - - response = await self._post_query(org=org, query=self._create_query(query, self.default_dialect, params)) - - return await self._to_tables_async(response, query_options=self._get_query_options()) - - async def query_stream(self, query: str, org=None, params: dict = None) -> AsyncGenerator['FluxRecord', None]: - """ - Execute asynchronous Flux query and return stream of :class:`~influxdb_client.client.flux_table.FluxRecord` as an AsyncGenerator[:class:`~influxdb_client.client.flux_table.FluxRecord`]. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClientAsync.org`` is used. - :param params: bind parameters - :return: AsyncGenerator[:class:`~influxdb_client.client.flux_table.FluxRecord`] - """ # noqa: E501 - org = self._org_param(org) - - response = await self._post_query(org=org, query=self._create_query(query, self.default_dialect, params)) - - return await self._to_flux_record_stream_async(response, query_options=self._get_query_options()) - - async def query_data_frame(self, query: str, org=None, data_frame_index: List[str] = None, params: dict = None, - use_extension_dtypes: bool = False): - """ - Execute asynchronous Flux query and return :class:`~pandas.core.frame.DataFrame`. - - .. note:: If the ``query`` returns tables with differing schemas than the client generates a :class:`~DataFrame` for each of them. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClientAsync.org`` is used. - :param data_frame_index: the list of columns that are used as DataFrame index - :param params: bind parameters - :param use_extension_dtypes: set to ``True`` to use panda's extension data types. - Useful for queries with ``pivot`` function. - When data has missing values, column data type may change (to ``object`` or ``float64``). - Nullable extension types (``Int64``, ``Float64``, ``boolean``) support ``panda.NA`` value. - For more info, see https://pandas.pydata.org/docs/user_guide/missing_data.html. - :return: :class:`~DataFrame` or :class:`~List[DataFrame]` - - .. warning:: For the optimal processing of the query results use the ``pivot() function`` which align results as a table. - - .. code-block:: text - - from(bucket:"my-bucket") - |> range(start: -5m, stop: now()) - |> filter(fn: (r) => r._measurement == "mem") - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - - For more info see: - - https://docs.influxdata.com/resources/videos/pivots-in-flux/ - - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/ - - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/ - """ # noqa: E501 - _generator = await self.query_data_frame_stream(query, org=org, data_frame_index=data_frame_index, - params=params, use_extension_dtypes=use_extension_dtypes) - - dataframes = [] - async for dataframe in _generator: - dataframes.append(dataframe) - - return self._to_data_frames(dataframes) - - async def query_data_frame_stream(self, query: str, org=None, data_frame_index: List[str] = None, - params: dict = None, use_extension_dtypes: bool = False): - """ - Execute asynchronous Flux query and return stream of :class:`~pandas.core.frame.DataFrame` as an AsyncGenerator[:class:`~pandas.core.frame.DataFrame`]. - - .. note:: If the ``query`` returns tables with differing schemas than the client generates a :class:`~DataFrame` for each of them. - - :param query: the Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClientAsync.org`` is used. - :param data_frame_index: the list of columns that are used as DataFrame index - :param params: bind parameters - :param use_extension_dtypes: set to ``True`` to use panda's extension data types. - Useful for queries with ``pivot`` function. - When data has missing values, column data type may change (to ``object`` or ``float64``). - Nullable extension types (``Int64``, ``Float64``, ``boolean``) support ``panda.NA`` value. - For more info, see https://pandas.pydata.org/docs/user_guide/missing_data.html. - :return: :class:`AsyncGenerator[:class:`DataFrame`]` - - .. warning:: For the optimal processing of the query results use the ``pivot() function`` which align results as a table. - - .. code-block:: text - - from(bucket:"my-bucket") - |> range(start: -5m, stop: now()) - |> filter(fn: (r) => r._measurement == "mem") - |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - - For more info see: - - https://docs.influxdata.com/resources/videos/pivots-in-flux/ - - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/ - - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/ - """ # noqa: E501 - org = self._org_param(org) - - response = await self._post_query(org=org, query=self._create_query(query, self.default_dialect, params, - dataframe_query=True)) - - return await self._to_data_frame_stream_async(data_frame_index=data_frame_index, response=response, - query_options=self._get_query_options(), - use_extension_dtypes=use_extension_dtypes) - - async def query_raw(self, query: str, org=None, dialect=_BaseQueryApi.default_dialect, params: dict = None): - """ - Execute asynchronous Flux query and return result as raw unprocessed result as a str. - - :param query: a Flux query - :param str, Organization org: specifies the organization for executing the query; - Take the ``ID``, ``Name`` or ``Organization``. - If not specified the default value from ``InfluxDBClientAsync.org`` is used. - :param dialect: csv dialect format - :param params: bind parameters - :return: :class:`~str` - """ - org = self._org_param(org) - result = await self._post_query(org=org, query=self._create_query(query, dialect, params)) - raw_bytes = await result.read() - return raw_bytes.decode(_UTF_8_encoding) - - async def _post_query(self, org, query): - response = await self._query_api.post_query_async(org=org, - query=query, - async_req=False, - _preload_content=False, - _return_http_data_only=True) - if not 200 <= response.status <= 299: - data = await response.read() - raise ApiException(http_resp=RESTResponseAsync(response, data)) - - return response diff --git a/frogpilot/third_party/influxdb_client/client/tasks_api.py b/frogpilot/third_party/influxdb_client/client/tasks_api.py deleted file mode 100644 index 5ca18fbdd..000000000 --- a/frogpilot/third_party/influxdb_client/client/tasks_api.py +++ /dev/null @@ -1,226 +0,0 @@ -""" -Process and analyze your data with tasks in the InfluxDB task engine. - -Use tasks (scheduled Flux queries) to input a data stream and then analyze, modify, and act on the data accordingly. -""" - -import datetime -from typing import List - -from influxdb_client import TasksService, Task, TaskCreateRequest, TaskUpdateRequest, LabelResponse, LabelMapping, \ - AddResourceMemberRequestBody, RunManually, Run, LogEvent -from influxdb_client.client._pages import _Paginated - - -class TasksApi(object): - """Implementation for '/api/v2/tasks' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - self._influxdb_client = influxdb_client - self._service = TasksService(influxdb_client.api_client) - - def find_task_by_id(self, task_id) -> Task: - """Retrieve a task.""" - task = self._service.get_tasks_id(task_id) - return task - - def find_tasks(self, **kwargs): - """List all tasks up to set limit (max 500). - - :key str name: only returns tasks with the specified name - :key str after: returns tasks after specified ID - :key str user: filter tasks to a specific user ID - :key str org: filter tasks to a specific organization name - :key str org_id: filter tasks to a specific organization ID - :key int limit: the number of tasks to return - :return: Tasks - """ - return self._service.get_tasks(**kwargs).tasks - - def find_tasks_iter(self, **kwargs): - """Iterate over all tasks with pagination. - - :key str name: only returns tasks with the specified name - :key str after: returns tasks after specified ID - :key str user: filter tasks to a specific user ID - :key str org: filter tasks to a specific organization name - :key str org_id: filter tasks to a specific organization ID - :key int limit: the number of tasks in one page - :return: Tasks iterator - """ - return _Paginated(self._service.get_tasks, lambda response: response.tasks).find_iter(**kwargs) - - def create_task(self, task: Task = None, task_create_request: TaskCreateRequest = None) -> Task: - """Create a new task.""" - if task_create_request is not None: - return self._service.post_tasks(task_create_request) - - if task is not None: - request = TaskCreateRequest(flux=task.flux, org_id=task.org_id, org=task.org, description=task.description, - status=task.status) - - return self.create_task(task_create_request=request) - - raise ValueError("task or task_create_request must be not None") - - @staticmethod - def _create_task(name: str, flux: str, every, cron, org_id: str) -> Task: - - task = Task(id=0, name=name, org_id=org_id, status="active", flux=flux) - - repetition = "" - if every is not None: - repetition += "every: " - repetition += every - - if cron is not None: - repetition += "cron: " - repetition += '"' + cron + '"' - - flux_with_options = '{} \n\noption task = {{name: "{}", {}}}'.format(flux, name, repetition) - task.flux = flux_with_options - - return task - - def create_task_every(self, name, flux, every, organization) -> Task: - """Create a new task with every repetition schedule.""" - task = self._create_task(name, flux, every, None, organization.id) - return self.create_task(task) - - def create_task_cron(self, name: str, flux: str, cron: str, org_id: str) -> Task: - """Create a new task with cron repetition schedule.""" - task = self._create_task(name=name, flux=flux, cron=cron, org_id=org_id, every=None) - return self.create_task(task) - - def delete_task(self, task_id: str): - """Delete a task.""" - if task_id is not None: - return self._service.delete_tasks_id(task_id=task_id) - - def update_task(self, task: Task) -> Task: - """Update a task.""" - req = TaskUpdateRequest(flux=task.flux, description=task.description, every=task.every, cron=task.cron, - status=task.status, offset=task.offset) - - return self.update_task_request(task_id=task.id, task_update_request=req) - - def update_task_request(self, task_id, task_update_request: TaskUpdateRequest) -> Task: - """Update a task.""" - return self._service.patch_tasks_id(task_id=task_id, task_update_request=task_update_request) - - def clone_task(self, task: Task) -> Task: - """Clone a task.""" - cloned = Task(id=0, name=task.name, org_id=task.org_id, org=task.org, flux=task.flux, status="active") - - created = self.create_task(cloned) - if task.id: - labels = self.get_labels(task.id) - for label in labels.labels: - self.add_label(label.id, created.id) - return created - - def get_labels(self, task_id): - """List all labels for a task.""" - return self._service.get_tasks_id_labels(task_id=task_id) - - def add_label(self, label_id: str, task_id: str) -> LabelResponse: - """Add a label to a task.""" - label_mapping = LabelMapping(label_id=label_id) - return self._service.post_tasks_id_labels(task_id=task_id, label_mapping=label_mapping) - - def delete_label(self, label_id: str, task_id: str): - """Delete a label from a task.""" - return self._service.delete_tasks_id_labels_id(task_id=task_id, label_id=label_id) - - def get_members(self, task_id: str): - """List all task members.""" - return self._service.get_tasks_id_members(task_id=task_id).users - - def add_member(self, member_id, task_id): - """Add a member to a task.""" - user = AddResourceMemberRequestBody(id=member_id) - return self._service.post_tasks_id_members(task_id=task_id, add_resource_member_request_body=user) - - def delete_member(self, member_id, task_id): - """Remove a member from a task.""" - return self._service.delete_tasks_id_members_id(user_id=member_id, task_id=task_id) - - def get_owners(self, task_id): - """List all owners of a task.""" - return self._service.get_tasks_id_owners(task_id=task_id).users - - def add_owner(self, owner_id, task_id): - """Add an owner to a task.""" - user = AddResourceMemberRequestBody(id=owner_id) - return self._service.post_tasks_id_owners(task_id=task_id, add_resource_member_request_body=user) - - def delete_owner(self, owner_id, task_id): - """Remove an owner from a task.""" - return self._service.delete_tasks_id_owners_id(user_id=owner_id, task_id=task_id) - - def get_runs(self, task_id, **kwargs) -> List['Run']: - """ - Retrieve list of run records for a task. - - :param task_id: task id - :key str after: returns runs after specified ID - :key int limit: the number of runs to return - :key datetime after_time: filter runs to those scheduled after this time, RFC3339 - :key datetime before_time: filter runs to those scheduled before this time, RFC3339 - """ - return self._service.get_tasks_id_runs(task_id=task_id, **kwargs).runs - - def get_run(self, task_id: str, run_id: str) -> Run: - """ - Get run record for specific task and run id. - - :param task_id: task id - :param run_id: run id - :return: Run for specified task and run id - """ - return self._service.get_tasks_id_runs_id(task_id=task_id, run_id=run_id) - - def get_run_logs(self, task_id: str, run_id: str) -> List['LogEvent']: - """Retrieve all logs for a run.""" - return self._service.get_tasks_id_runs_id_logs(task_id=task_id, run_id=run_id).events - - def run_manually(self, task_id: str, scheduled_for: datetime = None): - """ - Manually start a run of the task now overriding the current schedule. - - :param task_id: - :param scheduled_for: planned execution - """ - r = RunManually(scheduled_for=scheduled_for) - return self._service.post_tasks_id_runs(task_id=task_id, run_manually=r) - - def retry_run(self, task_id: str, run_id: str): - """ - Retry a task run. - - :param task_id: task id - :param run_id: run id - """ - return self._service.post_tasks_id_runs_id_retry(task_id=task_id, run_id=run_id) - - def cancel_run(self, task_id: str, run_id: str): - """ - Cancel a currently running run. - - :param task_id: - :param run_id: - """ - return self._service.delete_tasks_id_runs_id(task_id=task_id, run_id=run_id) - - def get_logs(self, task_id: str) -> List['LogEvent']: - """ - Retrieve all logs for a task. - - :param task_id: task id - """ - return self._service.get_tasks_id_logs(task_id=task_id).events - - def find_tasks_by_user(self, task_user_id): - """List all tasks by user.""" - return self.find_tasks(user=task_user_id) diff --git a/frogpilot/third_party/influxdb_client/client/users_api.py b/frogpilot/third_party/influxdb_client/client/users_api.py deleted file mode 100644 index dbaca7ad6..000000000 --- a/frogpilot/third_party/influxdb_client/client/users_api.py +++ /dev/null @@ -1,80 +0,0 @@ -""" -Users are those with access to InfluxDB. - -To grant a user permission to access data, add them as a member of an organization -and provide them with an authentication token. -""" - -from typing import Union -from influxdb_client import UsersService, User, Users, UserResponse, PasswordResetBody - - -class UsersApi(object): - """Implementation for '/api/v2/users' endpoint.""" - - def __init__(self, influxdb_client): - """Initialize defaults.""" - self._influxdb_client = influxdb_client - self._service = UsersService(influxdb_client.api_client) - - def me(self) -> User: - """Return the current authenticated user.""" - user = self._service.get_me() - return user - - def create_user(self, name: str) -> User: - """Create a user.""" - user = User(name=name) - - return self._service.post_users(user=user) - - def update_user(self, user: User) -> UserResponse: - """Update a user. - - :param user: User update to apply (required) - :return: User - """ - return self._service.patch_users_id(user_id=user.id, user=user) - - def update_password(self, user: Union[str, User, UserResponse], password: str) -> None: - """Update a password. - - :param user: User to update password (required) - :param password: New password (required) - :return: None - """ - user_id = self._user_id(user) - - return self._service.post_users_id_password(user_id=user_id, password_reset_body=PasswordResetBody(password)) - - def delete_user(self, user: Union[str, User, UserResponse]) -> None: - """Delete a user. - - :param user: user id or User - :return: None - """ - user_id = self._user_id(user) - - return self._service.delete_users_id(user_id=user_id) - - def find_users(self, **kwargs) -> Users: - """List all users. - - :key int offset: The offset for pagination. The number of records to skip. - :key int limit: Limits the number of records returned. Default is `20`. - :key str after: The last resource ID from which to seek from (but not including). - This is to be used instead of `offset`. - :key str name: The user name. - :key str id: The user ID. - :return: Buckets - """ - return self._service.get_users(**kwargs) - - def _user_id(self, user: Union[str, User, UserResponse]): - if isinstance(user, User): - user_id = user.id - elif isinstance(user, UserResponse): - user_id = user.id - else: - user_id = user - return user_id diff --git a/frogpilot/third_party/influxdb_client/client/util/__init__.py b/frogpilot/third_party/influxdb_client/client/util/__init__.py deleted file mode 100644 index f9a83206c..000000000 --- a/frogpilot/third_party/influxdb_client/client/util/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Utils package.""" diff --git a/frogpilot/third_party/influxdb_client/client/util/date_utils.py b/frogpilot/third_party/influxdb_client/client/util/date_utils.py deleted file mode 100644 index 7b6750c87..000000000 --- a/frogpilot/third_party/influxdb_client/client/util/date_utils.py +++ /dev/null @@ -1,101 +0,0 @@ -"""Utils to get right Date parsing function.""" -import datetime -from sys import version_info -import threading -from datetime import timezone as tz - -from dateutil import parser - -date_helper = None - -lock_ = threading.Lock() - - -class DateHelper: - """ - DateHelper to groups different implementations of date operations. - - If you would like to serialize the query results to custom timezone, you can use following code: - - .. code-block:: python - - from influxdb_client.client.util import date_utils - from influxdb_client.client.util.date_utils import DateHelper - import dateutil.parser - from dateutil import tz - - def parse_date(date_string: str): - return dateutil.parser.parse(date_string).astimezone(tz.gettz('ETC/GMT+2')) - - date_utils.date_helper = DateHelper() - date_utils.date_helper.parse_date = parse_date - """ - - def __init__(self, timezone: datetime.tzinfo = tz.utc) -> None: - """ - Initialize defaults. - - :param timezone: Default timezone used for serialization "datetime" without "tzinfo". - Default value is "UTC". - """ - self.timezone = timezone - - def parse_date(self, date_string: str): - """ - Parse string into Date or Timestamp. - - :return: Returns a :class:`datetime.datetime` object or compliant implementation - like :class:`class 'pandas._libs.tslibs.timestamps.Timestamp` - """ - pass - - def to_nanoseconds(self, delta): - """ - Get number of nanoseconds in timedelta. - - Solution comes from v1 client. Thx. - https://github.com/influxdata/influxdb-python/pull/811 - """ - nanoseconds_in_days = delta.days * 86400 * 10 ** 9 - nanoseconds_in_seconds = delta.seconds * 10 ** 9 - nanoseconds_in_micros = delta.microseconds * 10 ** 3 - - return nanoseconds_in_days + nanoseconds_in_seconds + nanoseconds_in_micros - - def to_utc(self, value: datetime): - """ - Convert datetime to UTC timezone. - - :param value: datetime - :return: datetime in UTC - """ - if not value.tzinfo: - return self.to_utc(value.replace(tzinfo=self.timezone)) - else: - return value.astimezone(tz.utc) - - -def get_date_helper() -> DateHelper: - """ - Return DateHelper with proper implementation. - - If there is a 'ciso8601' than use 'ciso8601.parse_datetime' else - use 'datetime.fromisoformat' (Python >= 3.11) or 'dateutil.parse' (Python < 3.11). - """ - global date_helper - if date_helper is None: - with lock_: - # avoid duplicate initialization - if date_helper is None: - _date_helper = DateHelper() - try: - import ciso8601 - _date_helper.parse_date = ciso8601.parse_datetime - except ModuleNotFoundError: - if (version_info.major, version_info.minor) >= (3, 11): - _date_helper.parse_date = datetime.datetime.fromisoformat - else: - _date_helper.parse_date = parser.parse - date_helper = _date_helper - - return date_helper diff --git a/frogpilot/third_party/influxdb_client/client/util/date_utils_pandas.py b/frogpilot/third_party/influxdb_client/client/util/date_utils_pandas.py deleted file mode 100644 index 9a87c6abd..000000000 --- a/frogpilot/third_party/influxdb_client/client/util/date_utils_pandas.py +++ /dev/null @@ -1,15 +0,0 @@ -"""Pandas date utils.""" -from influxdb_client.client.util.date_utils import DateHelper -from influxdb_client.extras import pd - - -class PandasDateTimeHelper(DateHelper): - """DateHelper that use Pandas library with nanosecond precision.""" - - def parse_date(self, date_string: str): - """Parse date string into `class 'pandas._libs.tslibs.timestamps.Timestamp`.""" - return pd.to_datetime(date_string) - - def to_nanoseconds(self, delta): - """Get number of nanoseconds with nanos precision.""" - return super().to_nanoseconds(delta) + (delta.nanoseconds if hasattr(delta, 'nanoseconds') else 0) diff --git a/frogpilot/third_party/influxdb_client/client/util/helpers.py b/frogpilot/third_party/influxdb_client/client/util/helpers.py deleted file mode 100644 index e1fdce909..000000000 --- a/frogpilot/third_party/influxdb_client/client/util/helpers.py +++ /dev/null @@ -1,50 +0,0 @@ -"""Functions to share utility across client classes.""" -from influxdb_client.rest import ApiException - - -def _is_id(value): - """ - Check if the value is valid InfluxDB ID. - - :param value: to check - :return: True if provided parameter is valid InfluxDB ID. - """ - if value and len(value) == 16: - try: - int(value, 16) - return True - except ValueError: - return False - return False - - -def get_org_query_param(org, client, required_id=False): - """ - Get required type of Org query parameter. - - :param str, Organization org: value provided as a parameter into API (optional) - :param InfluxDBClient client: with default value for Org parameter - :param bool required_id: true if the query param has to be a ID - :return: request type of org query parameter or None - """ - _org = client.org if org is None else org - if 'Organization' in type(_org).__name__: - _org = _org.id - if required_id and _org and not _is_id(_org): - try: - organizations = client.organizations_api().find_organizations(org=_org) - if len(organizations) < 1: - from influxdb_client.client.exceptions import InfluxDBError - message = f"The client cannot find organization with name: '{_org}' " \ - "to determine their ID. Are you using token with sufficient permission?" - raise InfluxDBError(response=None, message=message) - return organizations[0].id - except ApiException as e: - if e.status == 404: - from influxdb_client.client.exceptions import InfluxDBError - message = f"The client cannot find organization with name: '{_org}' " \ - "to determine their ID." - raise InfluxDBError(response=None, message=message) - raise e - - return _org diff --git a/frogpilot/third_party/influxdb_client/client/util/multiprocessing_helper.py b/frogpilot/third_party/influxdb_client/client/util/multiprocessing_helper.py deleted file mode 100644 index 41530a237..000000000 --- a/frogpilot/third_party/influxdb_client/client/util/multiprocessing_helper.py +++ /dev/null @@ -1,205 +0,0 @@ -""" -Helpers classes to make easier use the client in multiprocessing environment. - -For more information how the multiprocessing works see Python's -`reference docs `_. -""" -import logging -import multiprocessing - -from influxdb_client import InfluxDBClient, WriteOptions -from influxdb_client.client.exceptions import InfluxDBError - -logger = logging.getLogger('influxdb_client.client.util.multiprocessing_helper') - - -def _success_callback(conf: (str, str, str), data: str): - """Successfully writen batch.""" - logger.debug(f"Written batch: {conf}, data: {data}") - - -def _error_callback(conf: (str, str, str), data: str, exception: InfluxDBError): - """Unsuccessfully writen batch.""" - logger.debug(f"Cannot write batch: {conf}, data: {data} due: {exception}") - - -def _retry_callback(conf: (str, str, str), data: str, exception: InfluxDBError): - """Retryable error.""" - logger.debug(f"Retryable error occurs for batch: {conf}, data: {data} retry: {exception}") - - -class _PoisonPill: - """To notify process to terminate.""" - - pass - - -class MultiprocessingWriter(multiprocessing.Process): - """ - The Helper class to write data into InfluxDB in independent OS process. - - Example: - .. code-block:: python - - from influxdb_client import WriteOptions - from influxdb_client.client.util.multiprocessing_helper import MultiprocessingWriter - - - def main(): - writer = MultiprocessingWriter(url="http://localhost:8086", token="my-token", org="my-org", - write_options=WriteOptions(batch_size=100)) - writer.start() - - for x in range(1, 1000): - writer.write(bucket="my-bucket", record=f"mem,tag=a value={x}i {x}") - - writer.__del__() - - - if __name__ == '__main__': - main() - - - How to use with context_manager: - .. code-block:: python - - from influxdb_client import WriteOptions - from influxdb_client.client.util.multiprocessing_helper import MultiprocessingWriter - - - def main(): - with MultiprocessingWriter(url="http://localhost:8086", token="my-token", org="my-org", - write_options=WriteOptions(batch_size=100)) as writer: - for x in range(1, 1000): - writer.write(bucket="my-bucket", record=f"mem,tag=a value={x}i {x}") - - - if __name__ == '__main__': - main() - - - How to handle batch events: - .. code-block:: python - - from influxdb_client import WriteOptions - from influxdb_client.client.exceptions import InfluxDBError - from influxdb_client.client.util.multiprocessing_helper import MultiprocessingWriter - - - class BatchingCallback(object): - - def success(self, conf: (str, str, str), data: str): - print(f"Written batch: {conf}, data: {data}") - - def error(self, conf: (str, str, str), data: str, exception: InfluxDBError): - print(f"Cannot write batch: {conf}, data: {data} due: {exception}") - - def retry(self, conf: (str, str, str), data: str, exception: InfluxDBError): - print(f"Retryable error occurs for batch: {conf}, data: {data} retry: {exception}") - - - def main(): - callback = BatchingCallback() - with MultiprocessingWriter(url="http://localhost:8086", token="my-token", org="my-org", - success_callback=callback.success, - error_callback=callback.error, - retry_callback=callback.retry) as writer: - - for x in range(1, 1000): - writer.write(bucket="my-bucket", record=f"mem,tag=a value={x}i {x}") - - - if __name__ == '__main__': - main() - - - """ - - __started__ = False - __disposed__ = False - - def __init__(self, **kwargs) -> None: - """ - Initialize defaults. - - For more information how to initialize the writer see the examples above. - - :param kwargs: arguments are passed into ``__init__`` function of ``InfluxDBClient`` and ``write_api``. - """ - multiprocessing.Process.__init__(self) - self.kwargs = kwargs - self.client = None - self.write_api = None - self.queue_ = multiprocessing.Manager().Queue() - - def write(self, **kwargs) -> None: - """ - Append time-series data into underlying queue. - - For more information how to pass arguments see the examples above. - - :param kwargs: arguments are passed into ``write`` function of ``WriteApi`` - :return: None - """ - assert self.__disposed__ is False, 'Cannot write data: the writer is closed.' - assert self.__started__ is True, 'Cannot write data: the writer is not started.' - self.queue_.put(kwargs) - - def run(self): - """Initialize ``InfluxDBClient`` and waits for data to writes into InfluxDB.""" - # Initialize Client and Write API - self.client = InfluxDBClient(**self.kwargs) - self.write_api = self.client.write_api(write_options=self.kwargs.get('write_options', WriteOptions()), - success_callback=self.kwargs.get('success_callback', _success_callback), - error_callback=self.kwargs.get('error_callback', _error_callback), - retry_callback=self.kwargs.get('retry_callback', _retry_callback)) - # Infinite loop - until poison pill - while True: - next_record = self.queue_.get() - if type(next_record) is _PoisonPill: - # Poison pill means break the loop - self.terminate() - self.queue_.task_done() - break - self.write_api.write(**next_record) - self.queue_.task_done() - - def start(self) -> None: - """Start independent process for writing data into InfluxDB.""" - super().start() - self.__started__ = True - - def terminate(self) -> None: - """ - Cleanup resources in independent process. - - This function **cannot be used** to terminate the ``MultiprocessingWriter``. - If you want to finish your writes please call: ``__del__``. - """ - if self.write_api: - logger.info("flushing data...") - self.write_api.__del__() - self.write_api = None - if self.client: - self.client.__del__() - self.client = None - logger.info("closed") - - def __enter__(self): - """Enter the runtime context related to this object.""" - self.start() - return self - - def __exit__(self, exc_type, exc_value, traceback): - """Exit the runtime context related to this object.""" - self.__del__() - - def __del__(self): - """Dispose the client and write_api.""" - if self.__started__: - self.queue_.put(_PoisonPill()) - self.queue_.join() - self.join() - self.queue_ = None - self.__started__ = False - self.__disposed__ = True diff --git a/frogpilot/third_party/influxdb_client/client/warnings.py b/frogpilot/third_party/influxdb_client/client/warnings.py deleted file mode 100644 index b682ff865..000000000 --- a/frogpilot/third_party/influxdb_client/client/warnings.py +++ /dev/null @@ -1,52 +0,0 @@ -"""The warnings message definition.""" -import warnings - - -class MissingPivotFunction(UserWarning): - """User warning about missing pivot() function.""" - - @staticmethod - def print_warning(query: str): - """Print warning about missing pivot() function and how to deal with that.""" - if 'fieldsAsCols' in query or 'pivot' in query: - return - - message = f"""The query doesn't contains the pivot() function. - -The result will not be shaped to optimal processing by pandas.DataFrame. Use the pivot() function by: - - {query} |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") - -You can disable this warning by: - import warnings - from influxdb_client.client.warnings import MissingPivotFunction - - warnings.simplefilter("ignore", MissingPivotFunction) - -For more info see: - - https://docs.influxdata.com/resources/videos/pivots-in-flux/ - - https://docs.influxdata.com/flux/latest/stdlib/universe/pivot/ - - https://docs.influxdata.com/flux/latest/stdlib/influxdata/influxdb/schema/fieldsascols/ -""" - warnings.warn(message, MissingPivotFunction) - - -class CloudOnlyWarning(UserWarning): - """User warning about availability only on the InfluxDB Cloud.""" - - @staticmethod - def print_warning(api_name: str, doc_url: str): - """Print warning about availability only on the InfluxDB Cloud.""" - message = f"""The '{api_name}' is available only on the InfluxDB Cloud. - -For more info see: - - {doc_url} - - https://docs.influxdata.com/influxdb/cloud/ - -You can disable this warning by: - import warnings - from influxdb_client.client.warnings import CloudOnlyWarning - - warnings.simplefilter("ignore", CloudOnlyWarning) -""" - warnings.warn(message, CloudOnlyWarning) diff --git a/frogpilot/third_party/influxdb_client/client/write/__init__.py b/frogpilot/third_party/influxdb_client/client/write/__init__.py deleted file mode 100644 index 0d21a4384..000000000 --- a/frogpilot/third_party/influxdb_client/client/write/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -# flake8: noqa - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import apis into api package -from influxdb_client.service.authorizations_service import AuthorizationsService -from influxdb_client.service.backup_service import BackupService -from influxdb_client.service.bucket_schemas_service import BucketSchemasService -from influxdb_client.service.buckets_service import BucketsService -from influxdb_client.service.cells_service import CellsService -from influxdb_client.service.checks_service import ChecksService -from influxdb_client.service.config_service import ConfigService -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.invokable_scripts_service import InvokableScriptsService -from influxdb_client.service.labels_service import LabelsService -from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService -from influxdb_client.service.metrics_service import MetricsService -from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService -from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.organizations_service import OrganizationsService -from influxdb_client.service.ping_service import PingService -from influxdb_client.service.query_service import QueryService -from influxdb_client.service.ready_service import ReadyService -from influxdb_client.service.remote_connections_service import RemoteConnectionsService -from influxdb_client.service.replications_service import ReplicationsService -from influxdb_client.service.resources_service import ResourcesService -from influxdb_client.service.restore_service import RestoreService -from influxdb_client.service.routes_service import RoutesService -from influxdb_client.service.rules_service import RulesService -from influxdb_client.service.scraper_targets_service import ScraperTargetsService -from influxdb_client.service.secrets_service import SecretsService -from influxdb_client.service.setup_service import SetupService -from influxdb_client.service.signin_service import SigninService -from influxdb_client.service.signout_service import SignoutService -from influxdb_client.service.sources_service import SourcesService -from influxdb_client.service.tasks_service import TasksService -from influxdb_client.service.telegraf_plugins_service import TelegrafPluginsService -from influxdb_client.service.telegrafs_service import TelegrafsService -from influxdb_client.service.templates_service import TemplatesService -from influxdb_client.service.users_service import UsersService -from influxdb_client.service.variables_service import VariablesService -from influxdb_client.service.views_service import ViewsService -from influxdb_client.service.write_service import WriteService diff --git a/frogpilot/third_party/influxdb_client/client/write/dataframe_serializer.py b/frogpilot/third_party/influxdb_client/client/write/dataframe_serializer.py deleted file mode 100644 index ccc198ac3..000000000 --- a/frogpilot/third_party/influxdb_client/client/write/dataframe_serializer.py +++ /dev/null @@ -1,290 +0,0 @@ -""" -Functions for serialize Pandas DataFrame. - -Much of the code here is inspired by that in the aioinflux packet found here: https://github.com/gusutabopb/aioinflux -""" - -import logging -import math -import re - -from influxdb_client import WritePrecision -from influxdb_client.client.write.point import _ESCAPE_KEY, _ESCAPE_STRING, _ESCAPE_MEASUREMENT, DEFAULT_WRITE_PRECISION - -logger = logging.getLogger('influxdb_client.client.write.dataframe_serializer') - - -def _itertuples(data_frame): - cols = [data_frame.iloc[:, k] for k in range(len(data_frame.columns))] - return zip(data_frame.index, *cols) - - -class DataframeSerializer: - """Serialize DataFrame into LineProtocols.""" - - def __init__(self, data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION, chunk_size: int = None, - **kwargs) -> None: - """ - Init serializer. - - :param data_frame: Pandas DataFrame to serialize - :param point_settings: Default Tags - :param precision: The precision for the unix timestamps within the body line-protocol. - :param chunk_size: The size of chunk for serializing into chunks. - :key data_frame_measurement_name: name of measurement for writing Pandas DataFrame - :key data_frame_tag_columns: list of DataFrame columns which are tags, rest columns will be fields - :key data_frame_timestamp_column: name of DataFrame column which contains a timestamp. The column can be defined as a :class:`~str` value - formatted as `2018-10-26`, `2018-10-26 12:00`, `2018-10-26 12:00:00-05:00` - or other formats and types supported by `pandas.to_datetime `_ - ``DataFrame`` - :key data_frame_timestamp_timezone: name of the timezone which is used for timestamp column - ``DataFrame`` - """ # noqa: E501 - # This function is hard to understand but for good reason: - # the approach used here is considerably more efficient - # than the alternatives. - # - # We build up a Python expression that efficiently converts a data point - # tuple into line-protocol entry, and then evaluate the expression - # as a lambda so that we can call it. This avoids the overhead of - # invoking a function on every data value - we only have one function - # call per row instead. The expression consists of exactly - # one f-string, so we build up the parts of it as segments - # that are concatenated together to make the full f-string inside - # the lambda. - # - # Things are made a little more complex because fields and tags with NaN - # values and empty tags are omitted from the generated line-protocol - # output. - # - # As an example, say we have a data frame with two value columns: - # a float - # b int - # - # This will generate a lambda expression to be evaluated that looks like - # this: - # - # lambda p: f"""{measurement_name} {keys[0]}={p[1]},{keys[1]}={p[2]}i {p[0].value}""" - # - # This lambda is then executed for each row p. - # - # When NaNs are present, the expression looks like this (split - # across two lines to satisfy the code-style checker) - # - # lambda p: f"""{measurement_name} {"" if pd.isna(p[1]) - # else f"{keys[0]}={p[1]}"},{keys[1]}={p[2]}i {p[0].value}""" - # - # When there's a NaN value in column a, we'll end up with a comma at the start of the - # fields, so we run a regexp substitution after generating the line-protocol entries - # to remove this. - # - # We're careful to run these potentially costly extra steps only when NaN values actually - # exist in the data. - - from ...extras import pd, np - if not isinstance(data_frame, pd.DataFrame): - raise TypeError('Must be DataFrame, but type was: {0}.' - .format(type(data_frame))) - - data_frame_measurement_name = kwargs.get('data_frame_measurement_name') - if data_frame_measurement_name is None: - raise TypeError('"data_frame_measurement_name" is a Required Argument') - - timestamp_column = kwargs.get('data_frame_timestamp_column', None) - timestamp_timezone = kwargs.get('data_frame_timestamp_timezone', None) - data_frame = data_frame.copy(deep=False) - data_frame_timestamp = data_frame.index if timestamp_column is None else data_frame[timestamp_column] - if isinstance(data_frame_timestamp, pd.PeriodIndex): - data_frame_timestamp = data_frame_timestamp.to_timestamp() - else: - # TODO: this is almost certainly not what you want - # when the index is the default RangeIndex. - # Instead, it would probably be better to leave - # out the timestamp unless a time column is explicitly - # enabled. - data_frame_timestamp = pd.to_datetime(data_frame_timestamp, unit=precision) - - if timestamp_timezone: - if isinstance(data_frame_timestamp, pd.DatetimeIndex): - data_frame_timestamp = data_frame_timestamp.tz_localize(timestamp_timezone) - else: - data_frame_timestamp = data_frame_timestamp.dt.tz_localize(timestamp_timezone) - - if hasattr(data_frame_timestamp, 'tzinfo') and data_frame_timestamp.tzinfo is None: - data_frame_timestamp = data_frame_timestamp.tz_localize('UTC') - if timestamp_column is None: - data_frame.index = data_frame_timestamp - else: - data_frame[timestamp_column] = data_frame_timestamp - - data_frame_tag_columns = kwargs.get('data_frame_tag_columns') - data_frame_tag_columns = set(data_frame_tag_columns or []) - - # keys holds a list of string keys. - keys = [] - # tags holds a list of tag f-string segments ordered alphabetically by tag key. - tags = [] - # fields holds a list of field f-string segments ordered alphebetically by field key - fields = [] - # field_indexes holds the index into each row of all the fields. - field_indexes = [] - - if point_settings.defaultTags: - for key, value in point_settings.defaultTags.items(): - # Avoid overwriting existing data if there's a column - # that already exists with the default tag's name. - # Note: when a new column is added, the old DataFrame - # that we've made a shallow copy of is unaffected. - # TODO: when there are NaN or empty values in - # the column, we could make a deep copy of the - # data and fill in those values with the default tag value. - if key not in data_frame.columns: - data_frame[key] = value - data_frame_tag_columns.add(key) - - # Get a list of all the columns sorted by field/tag key. - # We want to iterate through the columns in sorted order - # so that we know when we're on the first field so we - # can know whether a comma is needed for that - # field. - columns = sorted(enumerate(data_frame.dtypes.items()), key=lambda col: col[1][0]) - - # null_columns has a bool value for each column holding - # whether that column contains any null (NaN or None) values. - null_columns = data_frame.isnull().any() - timestamp_index = 0 - - # Iterate through the columns building up the expression for each column. - for index, (key, value) in columns: - key = str(key) - key_format = f'{{keys[{len(keys)}]}}' - keys.append(key.translate(_ESCAPE_KEY)) - # The field index is one more than the column index because the - # time index is at column zero in the finally zipped-together - # result columns. - field_index = index + 1 - val_format = f'p[{field_index}]' - - if key in data_frame_tag_columns: - # This column is a tag column. - if null_columns.iloc[index]: - key_value = f"""{{ - '' if {val_format} == '' or pd.isna({val_format}) else - f',{key_format}={{str({val_format}).translate(_ESCAPE_STRING)}}' - }}""" - else: - key_value = f',{key_format}={{str({val_format}).translate(_ESCAPE_KEY)}}' - tags.append(key_value) - continue - elif timestamp_column is not None and key in timestamp_column: - timestamp_index = field_index - continue - - # This column is a field column. - # Note: no comma separator is needed for the first field. - # It's important to omit it because when the first - # field column has no nulls, we don't run the comma-removal - # regexp substitution step. - sep = '' if len(field_indexes) == 0 else ',' - if issubclass(value.type, np.integer) or issubclass(value.type, np.floating) or issubclass(value.type, np.bool_): # noqa: E501 - suffix = 'i' if issubclass(value.type, np.integer) else '' - if null_columns.iloc[index]: - field_value = f"""{{"" if pd.isna({val_format}) else f"{sep}{key_format}={{{val_format}}}{suffix}"}}""" # noqa: E501 - else: - field_value = f"{sep}{key_format}={{{val_format}}}{suffix}" - else: - if null_columns.iloc[index]: - field_value = f"""{{ - '' if pd.isna({val_format}) else - f'{sep}{key_format}="{{str({val_format}).translate(_ESCAPE_STRING)}}"' - }}""" - else: - field_value = f'''{sep}{key_format}="{{str({val_format}).translate(_ESCAPE_STRING)}}"''' - field_indexes.append(field_index) - fields.append(field_value) - - measurement_name = str(data_frame_measurement_name).translate(_ESCAPE_MEASUREMENT) - - tags = ''.join(tags) - fields = ''.join(fields) - timestamp = '{p[%s].value}' % timestamp_index - if precision == WritePrecision.US: - timestamp = '{int(p[%s].value / 1e3)}' % timestamp_index - elif precision == WritePrecision.MS: - timestamp = '{int(p[%s].value / 1e6)}' % timestamp_index - elif precision == WritePrecision.S: - timestamp = '{int(p[%s].value / 1e9)}' % timestamp_index - - f = eval(f'lambda p: f"""{{measurement_name}}{tags} {fields} {timestamp}"""', { - 'measurement_name': measurement_name, - '_ESCAPE_KEY': _ESCAPE_KEY, - '_ESCAPE_STRING': _ESCAPE_STRING, - 'keys': keys, - 'pd': pd, - }) - - for k, v in dict(data_frame.dtypes).items(): - if k in data_frame_tag_columns: - data_frame = data_frame.replace({k: ''}, np.nan) - - def _any_not_nan(p, indexes): - return any(map(lambda x: not pd.isna(p[x]), indexes)) - - self.data_frame = data_frame - self.f = f - self.field_indexes = field_indexes - self.first_field_maybe_null = null_columns.iloc[field_indexes[0] - 1] - self._any_not_nan = _any_not_nan - - # - # prepare chunks - # - if chunk_size is not None: - self.number_of_chunks = int(math.ceil(len(data_frame) / float(chunk_size))) - self.chunk_size = chunk_size - else: - self.number_of_chunks = None - - def serialize(self, chunk_idx: int = None): - """ - Serialize chunk into LineProtocols. - - :param chunk_idx: The index of chunk to serialize. If `None` then serialize whole dataframe. - """ - if chunk_idx is None: - chunk = self.data_frame - else: - logger.debug("Serialize chunk %s/%s ...", chunk_idx + 1, self.number_of_chunks) - chunk = self.data_frame[chunk_idx * self.chunk_size:(chunk_idx + 1) * self.chunk_size] - - if self.first_field_maybe_null: - # When the first field is null (None/NaN), we'll have - # a spurious leading comma which needs to be removed. - lp = (re.sub('^(( |[^ ])* ),([a-zA-Z0-9])(.*)', '\\1\\3\\4', self.f(p)) - for p in filter(lambda x: self._any_not_nan(x, self.field_indexes), _itertuples(chunk))) - return list(lp) - else: - return list(map(self.f, _itertuples(chunk))) - - def number_of_chunks(self): - """ - Return the number of chunks. - - :return: number of chunks or None if chunk_size is not specified. - """ - return self.number_of_chunks - - -def data_frame_to_list_of_points(data_frame, point_settings, precision=DEFAULT_WRITE_PRECISION, **kwargs): - """ - Serialize DataFrame into LineProtocols. - - :param data_frame: Pandas DataFrame to serialize - :param point_settings: Default Tags - :param precision: The precision for the unix timestamps within the body line-protocol. - :key data_frame_measurement_name: name of measurement for writing Pandas DataFrame - :key data_frame_tag_columns: list of DataFrame columns which are tags, rest columns will be fields - :key data_frame_timestamp_column: name of DataFrame column which contains a timestamp. The column can be defined as a :class:`~str` value - formatted as `2018-10-26`, `2018-10-26 12:00`, `2018-10-26 12:00:00-05:00` - or other formats and types supported by `pandas.to_datetime `_ - ``DataFrame`` - :key data_frame_timestamp_timezone: name of the timezone which is used for timestamp column - ``DataFrame`` - """ # noqa: E501 - return DataframeSerializer(data_frame, point_settings, precision, **kwargs).serialize() diff --git a/frogpilot/third_party/influxdb_client/client/write/point.py b/frogpilot/third_party/influxdb_client/client/write/point.py deleted file mode 100644 index cc95d2045..000000000 --- a/frogpilot/third_party/influxdb_client/client/write/point.py +++ /dev/null @@ -1,371 +0,0 @@ -"""Point data structure to represent LineProtocol.""" - -import math -import warnings -from builtins import int -from datetime import datetime, timedelta, timezone -from decimal import Decimal -from numbers import Integral - -from influxdb_client.client.util.date_utils import get_date_helper -from influxdb_client.domain.write_precision import WritePrecision - -EPOCH = datetime.fromtimestamp(0, tz=timezone.utc) - -DEFAULT_WRITE_PRECISION = WritePrecision.NS - -_ESCAPE_MEASUREMENT = str.maketrans({ - ',': r'\,', - ' ': r'\ ', - '\n': r'\n', - '\t': r'\t', - '\r': r'\r', -}) - -_ESCAPE_KEY = str.maketrans({ - ',': r'\,', - '=': r'\=', - ' ': r'\ ', - '\n': r'\n', - '\t': r'\t', - '\r': r'\r', -}) - -_ESCAPE_STRING = str.maketrans({ - '"': r'\"', - '\\': r'\\', -}) - -try: - import numpy as np - - _HAS_NUMPY = True -except ModuleNotFoundError: - _HAS_NUMPY = False - - -class Point(object): - """ - Point defines the values that will be written to the database. - - Ref: https://docs.influxdata.com/influxdb/latest/reference/key-concepts/data-elements/#point - """ - - @staticmethod - def measurement(measurement): - """Create a new Point with specified measurement name.""" - p = Point(measurement) - return p - - @staticmethod - def from_dict(dictionary: dict, write_precision: WritePrecision = DEFAULT_WRITE_PRECISION, **kwargs): - """ - Initialize point from 'dict' structure. - - The expected dict structure is: - - measurement - - tags - - fields - - time - - Example: - .. code-block:: python - - # Use default dictionary structure - dict_structure = { - "measurement": "h2o_feet", - "tags": {"location": "coyote_creek"}, - "fields": {"water_level": 1.0}, - "time": 1 - } - point = Point.from_dict(dict_structure, WritePrecision.NS) - - Example: - .. code-block:: python - - # Use custom dictionary structure - dictionary = { - "name": "sensor_pt859", - "location": "warehouse_125", - "version": "2021.06.05.5874", - "pressure": 125, - "temperature": 10, - "created": 1632208639, - } - point = Point.from_dict(dictionary, - write_precision=WritePrecision.S, - record_measurement_key="name", - record_time_key="created", - record_tag_keys=["location", "version"], - record_field_keys=["pressure", "temperature"]) - - Int Types: - The following example shows how to configure the types of integers fields. - It is useful when you want to serialize integers always as ``float`` to avoid ``field type conflict`` - or use ``unsigned 64-bit integer`` as the type for serialization. - - .. code-block:: python - - # Use custom dictionary structure - dict_structure = { - "measurement": "h2o_feet", - "tags": {"location": "coyote_creek"}, - "fields": { - "water_level": 1.0, - "some_counter": 108913123234 - }, - "time": 1 - } - - point = Point.from_dict(dict_structure, field_types={"some_counter": "uint"}) - - :param dictionary: dictionary for serialize into data Point - :param write_precision: sets the precision for the supplied time values - :key record_measurement_key: key of dictionary with specified measurement - :key record_measurement_name: static measurement name for data Point - :key record_time_key: key of dictionary with specified timestamp - :key record_tag_keys: list of dictionary keys to use as a tag - :key record_field_keys: list of dictionary keys to use as a field - :key field_types: optional dictionary to specify types of serialized fields. Currently, is supported customization for integer types. - Possible integers types: - - ``int`` - serialize integers as "**Signed 64-bit integers**" - ``9223372036854775807i`` (default behaviour) - - ``uint`` - serialize integers as "**Unsigned 64-bit integers**" - ``9223372036854775807u`` - - ``float`` - serialize integers as "**IEEE-754 64-bit floating-point numbers**". Useful for unify number types in your pipeline to avoid field type conflict - ``9223372036854775807`` - The ``field_types`` can be also specified as part of incoming dictionary. For more info see an example above. - :return: new data point - """ # noqa: E501 - measurement_ = kwargs.get('record_measurement_name', None) - if measurement_ is None: - measurement_ = dictionary[kwargs.get('record_measurement_key', 'measurement')] - point = Point(measurement_) - - record_tag_keys = kwargs.get('record_tag_keys', None) - if record_tag_keys is not None: - for tag_key in record_tag_keys: - if tag_key in dictionary: - point.tag(tag_key, dictionary[tag_key]) - elif 'tags' in dictionary: - for tag_key, tag_value in dictionary['tags'].items(): - point.tag(tag_key, tag_value) - - record_field_keys = kwargs.get('record_field_keys', None) - if record_field_keys is not None: - for field_key in record_field_keys: - if field_key in dictionary: - point.field(field_key, dictionary[field_key]) - else: - for field_key, field_value in dictionary['fields'].items(): - point.field(field_key, field_value) - - record_time_key = kwargs.get('record_time_key', 'time') - if record_time_key in dictionary: - point.time(dictionary[record_time_key], write_precision=write_precision) - - _field_types = kwargs.get('field_types', {}) - if 'field_types' in dictionary: - _field_types = dictionary['field_types'] - # Map API fields types to Line Protocol types postfix: - # - int: 'i' - # - uint: 'u' - # - float: '' - point._field_types = dict(map( - lambda item: (item[0], 'i' if item[1] == 'int' else 'u' if item[1] == 'uint' else ''), - _field_types.items() - )) - - return point - - def __init__(self, measurement_name): - """Initialize defaults.""" - self._tags = {} - self._fields = {} - self._name = measurement_name - self._time = None - self._write_precision = DEFAULT_WRITE_PRECISION - self._field_types = {} - - def time(self, time, write_precision=DEFAULT_WRITE_PRECISION): - """ - Specify timestamp for DataPoint with declared precision. - - If time doesn't have specified timezone we assume that timezone is UTC. - - Examples:: - Point.measurement("h2o").field("val", 1).time("2009-11-10T23:00:00.123456Z") - Point.measurement("h2o").field("val", 1).time(1257894000123456000) - Point.measurement("h2o").field("val", 1).time(datetime(2009, 11, 10, 23, 0, 0, 123456)) - Point.measurement("h2o").field("val", 1).time(1257894000123456000, write_precision=WritePrecision.NS) - - - :param time: the timestamp for your data - :param write_precision: sets the precision for the supplied time values - :return: this point - """ - self._write_precision = write_precision - self._time = time - return self - - def tag(self, key, value): - """Add tag with key and value.""" - self._tags[key] = value - return self - - def field(self, field, value): - """Add field with key and value.""" - self._fields[field] = value - return self - - def to_line_protocol(self, precision=None): - """ - Create LineProtocol. - - :param precision: required precision of LineProtocol. If it's not set then use the precision from ``Point``. - """ - _measurement = _escape_key(self._name, _ESCAPE_MEASUREMENT) - if _measurement.startswith("#"): - message = f"""The measurement name '{_measurement}' start with '#'. - -The output Line protocol will be interpret as a comment by InfluxDB. For more info see: - - https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/#comments -""" - warnings.warn(message, SyntaxWarning) - _tags = _append_tags(self._tags) - _fields = _append_fields(self._fields, self._field_types) - if not _fields: - return "" - _time = _append_time(self._time, self._write_precision if precision is None else precision) - - return f"{_measurement}{_tags}{_fields}{_time}" - - @property - def write_precision(self): - """Get precision.""" - return self._write_precision - - @classmethod - def set_str_rep(cls, rep_function): - """Set the string representation for all Points.""" - cls.__str___rep = rep_function - - def __str__(self): - """Create string representation of this Point.""" - return self.to_line_protocol() - - def __eq__(self, other): - """Return true iff other is equal to self.""" - if not isinstance(other, Point): - return False - # assume points are equal iff their instance fields are equal - return (self._tags == other._tags and - self._fields == other._fields and - self._name == other._name and - self._time == other._time and - self._write_precision == other._write_precision and - self._field_types == other._field_types) - - -def _append_tags(tags): - _return = [] - for tag_key, tag_value in sorted(tags.items()): - - if tag_value is None: - continue - - tag = _escape_key(tag_key) - value = _escape_tag_value(tag_value) - if tag != '' and value != '': - _return.append(f'{tag}={value}') - - return f"{',' if _return else ''}{','.join(_return)} " - - -def _append_fields(fields, field_types): - _return = [] - - for field, value in sorted(fields.items()): - if value is None: - continue - - if isinstance(value, float) or isinstance(value, Decimal) or _np_is_subtype(value, 'float'): - if not math.isfinite(value): - continue - s = str(value) - # It's common to represent whole numbers as floats - # and the trailing ".0" that Python produces is unnecessary - # in line-protocol, inconsistent with other line-protocol encoders, - # and takes more space than needed, so trim it off. - if s.endswith('.0'): - s = s[:-2] - _return.append(f'{_escape_key(field)}={s}') - elif (isinstance(value, int) or _np_is_subtype(value, 'int')) and not isinstance(value, bool): - _type = field_types.get(field, "i") - _return.append(f'{_escape_key(field)}={str(value)}{_type}') - elif isinstance(value, bool): - _return.append(f'{_escape_key(field)}={str(value).lower()}') - elif isinstance(value, str): - _return.append(f'{_escape_key(field)}="{_escape_string(value)}"') - else: - raise ValueError(f'Type: "{type(value)}" of field: "{field}" is not supported.') - - return f"{','.join(_return)}" - - -def _append_time(time, write_precision) -> str: - if time is None: - return '' - return f" {int(_convert_timestamp(time, write_precision))}" - - -def _escape_key(tag, escape_list=None) -> str: - if escape_list is None: - escape_list = _ESCAPE_KEY - return str(tag).translate(escape_list) - - -def _escape_tag_value(value) -> str: - ret = _escape_key(value) - if ret.endswith('\\'): - ret += ' ' - return ret - - -def _escape_string(value) -> str: - return str(value).translate(_ESCAPE_STRING) - - -def _convert_timestamp(timestamp, precision=DEFAULT_WRITE_PRECISION): - date_helper = get_date_helper() - if isinstance(timestamp, Integral): - return timestamp # assume precision is correct if timestamp is int - - if isinstance(timestamp, str): - timestamp = date_helper.parse_date(timestamp) - - if isinstance(timestamp, timedelta) or isinstance(timestamp, datetime): - - if isinstance(timestamp, datetime): - timestamp = date_helper.to_utc(timestamp) - EPOCH - - ns = date_helper.to_nanoseconds(timestamp) - - if precision is None or precision == WritePrecision.NS: - return ns - elif precision == WritePrecision.US: - return ns / 1e3 - elif precision == WritePrecision.MS: - return ns / 1e6 - elif precision == WritePrecision.S: - return ns / 1e9 - - raise ValueError(timestamp) - - -def _np_is_subtype(value, np_type): - if not _HAS_NUMPY or not hasattr(value, 'dtype'): - return False - - if np_type == 'float': - return np.issubdtype(value, np.floating) - elif np_type == 'int': - return np.issubdtype(value, np.integer) - return False diff --git a/frogpilot/third_party/influxdb_client/client/write/retry.py b/frogpilot/third_party/influxdb_client/client/write/retry.py deleted file mode 100644 index 2c4b359ec..000000000 --- a/frogpilot/third_party/influxdb_client/client/write/retry.py +++ /dev/null @@ -1,148 +0,0 @@ -"""Implementation for Retry strategy during HTTP requests.""" - -import logging -from datetime import datetime, timedelta -from itertools import takewhile -from random import random -from typing import Callable - -from urllib3 import Retry -from urllib3.exceptions import MaxRetryError, ResponseError - -from influxdb_client.client.exceptions import InfluxDBError - -logger = logging.getLogger('influxdb_client.client.write.retry') - - -class WritesRetry(Retry): - """ - Writes retry configuration. - - The next delay is computed as random value between range - `retry_interval * exponential_base^(attempts-1)` and `retry_interval * exponential_base^(attempts) - - Example: - for retry_interval=5, exponential_base=2, max_retry_delay=125, total=5 - retry delays are random distributed values within the ranges of - [5-10, 10-20, 20-40, 40-80, 80-125] - """ - - def __init__(self, jitter_interval=0, max_retry_delay=125, exponential_base=2, max_retry_time=180, total=5, - retry_interval=5, retry_callback: Callable[[Exception], int] = None, **kw): - """ - Initialize defaults. - - :param int jitter_interval: random milliseconds when retrying writes - :param num max_retry_delay: maximum delay when retrying write in seconds - :param int max_retry_time: maximum total retry timeout in seconds, - attempt after this timout throws MaxRetryError - :param int total: maximum number of retries - :param num retry_interval: initial first retry delay range in seconds - :param int exponential_base: base for the exponential retry delay, - :param Callable[[Exception], int] retry_callback: the callable ``callback`` to run after retryable - error occurred. - The callable must accept one argument: - - `Exception`: an retryable error - """ - super().__init__(**kw) - self.jitter_interval = jitter_interval - self.total = total - self.retry_interval = retry_interval - self.max_retry_delay = max_retry_delay - self.max_retry_time = max_retry_time - self.exponential_base = exponential_base - self.retry_timeout = datetime.now() + timedelta(seconds=max_retry_time) - self.retry_callback = retry_callback - - def new(self, **kw): - """Initialize defaults.""" - if 'jitter_interval' not in kw: - kw['jitter_interval'] = self.jitter_interval - if 'retry_interval' not in kw: - kw['retry_interval'] = self.retry_interval - if 'max_retry_delay' not in kw: - kw['max_retry_delay'] = self.max_retry_delay - if 'max_retry_time' not in kw: - kw['max_retry_time'] = self.max_retry_time - if 'exponential_base' not in kw: - kw['exponential_base'] = self.exponential_base - if 'retry_callback' not in kw: - kw['retry_callback'] = self.retry_callback - - new = super().new(**kw) - new.retry_timeout = self.retry_timeout - return new - - def is_retry(self, method, status_code, has_retry_after=False): - """is_retry doesn't require retry_after header. If there is not Retry-After we will use backoff.""" - if not self._is_method_retryable(method): - return False - - return self.total and (status_code >= 429) - - def get_backoff_time(self): - """Variant of exponential backoff with initial and max delay and a random jitter delay.""" - # We want to consider only the last consecutive errors sequence (Ignore redirects). - consecutive_errors_len = len( - list( - takewhile(lambda x: x.redirect_location is None, reversed(self.history)) - ) - ) - # First fail doesn't increase backoff - consecutive_errors_len -= 1 - if consecutive_errors_len < 0: - return 0 - - range_start = self.retry_interval - range_stop = self.retry_interval * self.exponential_base - - i = 1 - while i <= consecutive_errors_len: - i += 1 - range_start = range_stop - range_stop = range_stop * self.exponential_base - if range_stop > self.max_retry_delay: - break - - if range_stop > self.max_retry_delay: - range_stop = self.max_retry_delay - - return range_start + (range_stop - range_start) * self._random() - - def get_retry_after(self, response): - """Get the value of Retry-After header and append random jitter delay.""" - retry_after = super().get_retry_after(response) - if retry_after: - retry_after += self._jitter_delay() - return retry_after - - def increment(self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None): - """Return a new Retry object with incremented retry counters.""" - if self.retry_timeout < datetime.now(): - raise MaxRetryError(_pool, url, error or ResponseError("max_retry_time exceeded")) - - new_retry = super().increment(method, url, response, error, _pool, _stacktrace) - - if response is not None: - parsed_error = InfluxDBError(response=response) - elif error is not None: - parsed_error = error - else: - parsed_error = f"Failed request to: {url}" - - message = f"The retriable error occurred during request. Reason: '{parsed_error}'." - if isinstance(parsed_error, InfluxDBError): - message += f" Retry in {parsed_error.retry_after}s." - - if self.retry_callback: - self.retry_callback(parsed_error) - - logger.warning(message) - - return new_retry - - def _jitter_delay(self): - return self.jitter_interval * random() - - def _random(self): - return random() diff --git a/frogpilot/third_party/influxdb_client/client/write_api.py b/frogpilot/third_party/influxdb_client/client/write_api.py deleted file mode 100644 index 3b3db68fe..000000000 --- a/frogpilot/third_party/influxdb_client/client/write_api.py +++ /dev/null @@ -1,587 +0,0 @@ -"""Collect and write time series data to InfluxDB Cloud or InfluxDB OSS.""" - -# coding: utf-8 -import logging -import os -import warnings -from collections import defaultdict -from datetime import timedelta -from enum import Enum -from random import random -from time import sleep -from typing import Union, Any, Iterable, NamedTuple - -import reactivex as rx -from reactivex import operators as ops, Observable -from reactivex.scheduler import ThreadPoolScheduler -from reactivex.subject import Subject - -from influxdb_client import WritePrecision -from influxdb_client.client._base import _BaseWriteApi, _HAS_DATACLASS -from influxdb_client.client.util.helpers import get_org_query_param -from influxdb_client.client.write.dataframe_serializer import DataframeSerializer -from influxdb_client.client.write.point import Point, DEFAULT_WRITE_PRECISION -from influxdb_client.client.write.retry import WritesRetry -from influxdb_client.rest import _UTF_8_encoding - -logger = logging.getLogger('influxdb_client.client.write_api') - - -if _HAS_DATACLASS: - import dataclasses - from dataclasses import dataclass - - -class WriteType(Enum): - """Configuration which type of writes will client use.""" - - batching = 1 - asynchronous = 2 - synchronous = 3 - - -class WriteOptions(object): - """Write configuration.""" - - def __init__(self, write_type: WriteType = WriteType.batching, - batch_size=1_000, flush_interval=1_000, - jitter_interval=0, - retry_interval=5_000, - max_retries=5, - max_retry_delay=125_000, - max_retry_time=180_000, - exponential_base=2, - max_close_wait=300_000, - write_scheduler=ThreadPoolScheduler(max_workers=1)) -> None: - """ - Create write api configuration. - - :param write_type: methods of write (batching, asynchronous, synchronous) - :param batch_size: the number of data point to collect in batch - :param flush_interval: flush data at least in this interval (milliseconds) - :param jitter_interval: this is primarily to avoid large write spikes for users running a large number of - client instances ie, a jitter of 5s and flush duration 10s means flushes will happen every 10-15s - (milliseconds) - :param retry_interval: the time to wait before retry unsuccessful write (milliseconds) - :param max_retries: the number of max retries when write fails, 0 means retry is disabled - :param max_retry_delay: the maximum delay between each retry attempt in milliseconds - :param max_retry_time: total timeout for all retry attempts in milliseconds, if 0 retry is disabled - :param exponential_base: base for the exponential retry delay - :parama max_close_wait: the maximum time to wait for writes to be flushed if close() is called - :param write_scheduler: - """ - self.write_type = write_type - self.batch_size = batch_size - self.flush_interval = flush_interval - self.jitter_interval = jitter_interval - self.retry_interval = retry_interval - self.max_retries = max_retries - self.max_retry_delay = max_retry_delay - self.max_retry_time = max_retry_time - self.exponential_base = exponential_base - self.write_scheduler = write_scheduler - self.max_close_wait = max_close_wait - - def to_retry_strategy(self, **kwargs): - """ - Create a Retry strategy from write options. - - :key retry_callback: The callable ``callback`` to run after retryable error occurred. - The callable must accept one argument: - - `Exception`: an retryable error - """ - return WritesRetry( - total=self.max_retries, - retry_interval=self.retry_interval / 1_000, - jitter_interval=self.jitter_interval / 1_000, - max_retry_delay=self.max_retry_delay / 1_000, - max_retry_time=self.max_retry_time / 1_000, - exponential_base=self.exponential_base, - retry_callback=kwargs.get("retry_callback", None), - allowed_methods=["POST"]) - - def __getstate__(self): - """Return a dict of attributes that you want to pickle.""" - state = self.__dict__.copy() - # Remove write scheduler - del state['write_scheduler'] - return state - - def __setstate__(self, state): - """Set your object with the provided dict.""" - self.__dict__.update(state) - # Init default write Scheduler - self.write_scheduler = ThreadPoolScheduler(max_workers=1) - - -SYNCHRONOUS = WriteOptions(write_type=WriteType.synchronous) -ASYNCHRONOUS = WriteOptions(write_type=WriteType.asynchronous) - - -class PointSettings(object): - """Settings to store default tags.""" - - def __init__(self, **default_tags) -> None: - """ - Create point settings for write api. - - :param default_tags: Default tags which will be added to each point written by api. - """ - self.defaultTags = dict() - - for key, val in default_tags.items(): - self.add_default_tag(key, val) - - @staticmethod - def _get_value(value): - - if value.startswith("${env."): - return os.environ.get(value[6:-1]) - - return value - - def add_default_tag(self, key, value) -> None: - """Add new default tag with key and value.""" - self.defaultTags[key] = self._get_value(value) - - -class _BatchItemKey(object): - def __init__(self, bucket, org, precision=DEFAULT_WRITE_PRECISION) -> None: - self.bucket = bucket - self.org = org - self.precision = precision - pass - - def __hash__(self) -> int: - return hash((self.bucket, self.org, self.precision)) - - def __eq__(self, o: object) -> bool: - return isinstance(o, self.__class__) \ - and self.bucket == o.bucket and self.org == o.org and self.precision == o.precision - - def __str__(self) -> str: - return '_BatchItemKey[bucket:\'{}\', org:\'{}\', precision:\'{}\']' \ - .format(str(self.bucket), str(self.org), str(self.precision)) - - -class _BatchItem(object): - def __init__(self, key: _BatchItemKey, data, size=1) -> None: - self.key = key - self.data = data - self.size = size - pass - - def to_key_tuple(self) -> (str, str, str): - return self.key.bucket, self.key.org, self.key.precision - - def __str__(self) -> str: - return '_BatchItem[key:\'{}\', size: \'{}\']' \ - .format(str(self.key), str(self.size)) - - -class _BatchResponse(object): - def __init__(self, data: _BatchItem, exception: Exception = None): - self.data = data - self.exception = exception - pass - - def __str__(self) -> str: - return '_BatchResponse[status:\'{}\', \'{}\']' \ - .format("failed" if self.exception else "success", str(self.data)) - - -def _body_reduce(batch_items): - return b'\n'.join(map(lambda batch_item: batch_item.data, batch_items)) - - -class WriteApi(_BaseWriteApi): - """ - Implementation for '/api/v2/write' endpoint. - - Example: - .. code-block:: python - - from influxdb_client import InfluxDBClient - from influxdb_client.client.write_api import SYNCHRONOUS - - - # Initialize SYNCHRONOUS instance of WriteApi - with InfluxDBClient(url="http://localhost:8086", token="my-token", org="my-org") as client: - write_api = client.write_api(write_options=SYNCHRONOUS) - """ - - def __init__(self, - influxdb_client, - write_options: WriteOptions = WriteOptions(), - point_settings: PointSettings = PointSettings(), - **kwargs) -> None: - """ - Initialize defaults. - - :param influxdb_client: with default settings (organization) - :param write_options: write api configuration - :param point_settings: settings to store default tags. - :key success_callback: The callable ``callback`` to run after successfully writen a batch. - - The callable must accept two arguments: - - `Tuple`: ``(bucket, organization, precision)`` - - `str`: written data - - **[batching mode]** - :key error_callback: The callable ``callback`` to run after unsuccessfully writen a batch. - - The callable must accept three arguments: - - `Tuple`: ``(bucket, organization, precision)`` - - `str`: written data - - `Exception`: an occurred error - - **[batching mode]** - :key retry_callback: The callable ``callback`` to run after retryable error occurred. - - The callable must accept three arguments: - - `Tuple`: ``(bucket, organization, precision)`` - - `str`: written data - - `Exception`: an retryable error - - **[batching mode]** - """ - super().__init__(influxdb_client=influxdb_client, point_settings=point_settings) - self._write_options = write_options - self._success_callback = kwargs.get('success_callback', None) - self._error_callback = kwargs.get('error_callback', None) - self._retry_callback = kwargs.get('retry_callback', None) - self._window_scheduler = None - - if self._write_options.write_type is WriteType.batching: - # Define Subject that listen incoming data and produces writes into InfluxDB - self._subject = Subject() - - self._window_scheduler = ThreadPoolScheduler(1) - self._disposable = self._subject.pipe( - # Split incoming data to windows by batch_size or flush_interval - ops.window_with_time_or_count(count=write_options.batch_size, - timespan=timedelta(milliseconds=write_options.flush_interval), - scheduler=self._window_scheduler), - # Map window into groups defined by 'organization', 'bucket' and 'precision' - ops.flat_map(lambda window: window.pipe( - # Group window by 'organization', 'bucket' and 'precision' - ops.group_by(lambda batch_item: batch_item.key), - # Create batch (concatenation line protocols by \n) - ops.map(lambda group: group.pipe( - ops.to_iterable(), - ops.map(lambda xs: _BatchItem(key=group.key, data=_body_reduce(xs), size=len(xs))))), - ops.merge_all())), - # Write data into InfluxDB (possibility to retry if its fail) - ops.filter(lambda batch: batch.size > 0), - ops.map(mapper=lambda batch: self._to_response(data=batch, delay=self._jitter_delay())), - ops.merge_all()) \ - .subscribe(self._on_next, self._on_error, self._on_complete) - - else: - self._subject = None - self._disposable = None - - if self._write_options.write_type is WriteType.asynchronous: - message = """The 'WriteType.asynchronous' is deprecated and will be removed in future major version. - -You can use native asynchronous version of the client: -- https://influxdb-client.readthedocs.io/en/stable/usage.html#how-to-use-asyncio - """ - warnings.warn(message, DeprecationWarning) - - def write(self, bucket: str, org: str = None, - record: Union[ - str, Iterable['str'], Point, Iterable['Point'], dict, Iterable['dict'], bytes, Iterable['bytes'], - Observable, NamedTuple, Iterable['NamedTuple'], 'dataclass', Iterable['dataclass'] - ] = None, - write_precision: WritePrecision = DEFAULT_WRITE_PRECISION, **kwargs) -> Any: - """ - Write time-series data into InfluxDB. - - :param str bucket: specifies the destination bucket for writes (required) - :param str, Organization org: specifies the destination organization for writes; - take the ID, Name or Organization. - If not specified the default value from ``InfluxDBClient.org`` is used. - :param WritePrecision write_precision: specifies the precision for the unix timestamps within - the body line-protocol. The precision specified on a Point has precedes - and is use for write. - :param record: Point, Line Protocol, Dictionary, NamedTuple, Data Classes, Pandas DataFrame or - RxPY Observable to write - :key data_frame_measurement_name: name of measurement for writing Pandas DataFrame - ``DataFrame`` - :key data_frame_tag_columns: list of DataFrame columns which are tags, - rest columns will be fields - ``DataFrame`` - :key data_frame_timestamp_column: name of DataFrame column which contains a timestamp. The column can be defined as a :class:`~str` value - formatted as `2018-10-26`, `2018-10-26 12:00`, `2018-10-26 12:00:00-05:00` - or other formats and types supported by `pandas.to_datetime `_ - ``DataFrame`` - :key data_frame_timestamp_timezone: name of the timezone which is used for timestamp column - ``DataFrame`` - :key record_measurement_key: key of record with specified measurement - - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_measurement_name: static measurement name - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_time_key: key of record with specified timestamp - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_tag_keys: list of record keys to use as a tag - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_field_keys: list of record keys to use as a field - ``dictionary``, ``NamedTuple``, ``dataclass`` - - Example: - .. code-block:: python - - # Record as Line Protocol - write_api.write("my-bucket", "my-org", "h2o_feet,location=us-west level=125i 1") - - # Record as Dictionary - dictionary = { - "measurement": "h2o_feet", - "tags": {"location": "us-west"}, - "fields": {"level": 125}, - "time": 1 - } - write_api.write("my-bucket", "my-org", dictionary) - - # Record as Point - from influxdb_client import Point - point = Point("h2o_feet").tag("location", "us-west").field("level", 125).time(1) - write_api.write("my-bucket", "my-org", point) - - DataFrame: - If the ``data_frame_timestamp_column`` is not specified the index of `Pandas DataFrame `_ - is used as a ``timestamp`` for written data. The index can be `PeriodIndex `_ - or its must be transformable to ``datetime`` by - `pandas.to_datetime `_. - - If you would like to transform a column to ``PeriodIndex``, you can use something like: - - .. code-block:: python - - import pandas as pd - - # DataFrame - data_frame = ... - # Set column as Index - data_frame.set_index('column_name', inplace=True) - # Transform index to PeriodIndex - data_frame.index = pd.to_datetime(data_frame.index, unit='s') - - """ # noqa: E501 - org = get_org_query_param(org=org, client=self._influxdb_client) - - self._append_default_tags(record) - - if self._write_options.write_type is WriteType.batching: - return self._write_batching(bucket, org, record, - write_precision, **kwargs) - - payloads = defaultdict(list) - self._serialize(record, write_precision, payloads, **kwargs) - - _async_req = True if self._write_options.write_type == WriteType.asynchronous else False - - def write_payload(payload): - final_string = b'\n'.join(payload[1]) - return self._post_write(_async_req, bucket, org, final_string, payload[0]) - - results = list(map(write_payload, payloads.items())) - if not _async_req: - return None - elif len(results) == 1: - return results[0] - return results - - def flush(self): - """Flush data.""" - # TODO - pass - - def close(self): - """Flush data and dispose a batching buffer.""" - self.__del__() - - def __enter__(self): - """ - Enter the runtime context related to this object. - - It will bind this method’s return value to the target(s) - specified in the `as` clause of the statement. - - return: self instance - """ - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - """Exit the runtime context related to this object and close the WriteApi.""" - self.close() - - def __del__(self): - """Close WriteApi.""" - if self._subject: - self._subject.on_completed() - self._subject.dispose() - self._subject = None - - """ - We impose a maximum wait time to ensure that we do not cause a deadlock if the - background thread has exited abnormally - - Each iteration waits 100ms, but sleep expects the unit to be seconds so convert - the maximum wait time to seconds. - - We keep a counter of how long we've waited - """ - max_wait_time = self._write_options.max_close_wait / 1000 - waited = 0 - sleep_period = 0.1 - - # Wait for writing to finish - while not self._disposable.is_disposed: - sleep(sleep_period) - waited += sleep_period - - # Have we reached the upper limit? - if waited >= max_wait_time: - logger.warning( - "Reached max_close_wait (%s seconds) waiting for batches to finish writing. Force closing", - max_wait_time - ) - break - - if self._window_scheduler: - self._window_scheduler.executor.shutdown(wait=False) - self._window_scheduler = None - - if self._disposable: - self._disposable = None - pass - - def _write_batching(self, bucket, org, data, - precision=DEFAULT_WRITE_PRECISION, - **kwargs): - if isinstance(data, bytes): - _key = _BatchItemKey(bucket, org, precision) - self._subject.on_next(_BatchItem(key=_key, data=data)) - - elif isinstance(data, str): - self._write_batching(bucket, org, data.encode(_UTF_8_encoding), - precision, **kwargs) - - elif isinstance(data, Point): - self._write_batching(bucket, org, data.to_line_protocol(), data.write_precision, **kwargs) - - elif isinstance(data, dict): - self._write_batching(bucket, org, Point.from_dict(data, write_precision=precision, **kwargs), - precision, **kwargs) - - elif 'DataFrame' in type(data).__name__: - serializer = DataframeSerializer(data, self._point_settings, precision, self._write_options.batch_size, - **kwargs) - for chunk_idx in range(serializer.number_of_chunks): - self._write_batching(bucket, org, - serializer.serialize(chunk_idx), - precision, **kwargs) - elif hasattr(data, "_asdict"): - # noinspection PyProtectedMember - self._write_batching(bucket, org, data._asdict(), precision, **kwargs) - - elif _HAS_DATACLASS and dataclasses.is_dataclass(data): - self._write_batching(bucket, org, dataclasses.asdict(data), precision, **kwargs) - - elif isinstance(data, Iterable): - for item in data: - self._write_batching(bucket, org, item, precision, **kwargs) - - elif isinstance(data, Observable): - data.subscribe(lambda it: self._write_batching(bucket, org, it, precision, **kwargs)) - pass - - return None - - def _http(self, batch_item: _BatchItem): - - logger.debug("Write time series data into InfluxDB: %s", batch_item) - - if self._retry_callback: - def _retry_callback_delegate(exception): - return self._retry_callback(batch_item.to_key_tuple(), batch_item.data, exception) - else: - _retry_callback_delegate = None - - retry = self._write_options.to_retry_strategy(retry_callback=_retry_callback_delegate) - - self._post_write(False, batch_item.key.bucket, batch_item.key.org, batch_item.data, - batch_item.key.precision, urlopen_kw={'retries': retry}) - - logger.debug("Write request finished %s", batch_item) - - return _BatchResponse(data=batch_item) - - def _post_write(self, _async_req, bucket, org, body, precision, **kwargs): - - return self._write_service.post_write(org=org, bucket=bucket, body=body, precision=precision, - async_req=_async_req, - content_type="text/plain; charset=utf-8", - **kwargs) - - def _to_response(self, data: _BatchItem, delay: timedelta): - - return rx.of(data).pipe( - ops.subscribe_on(self._write_options.write_scheduler), - # use delay if its specified - ops.delay(duetime=delay, scheduler=self._write_options.write_scheduler), - # invoke http call - ops.map(lambda x: self._http(x)), - # catch exception to fail batch response - ops.catch(handler=lambda exception, source: rx.just(_BatchResponse(exception=exception, data=data))), - ) - - def _jitter_delay(self): - return timedelta(milliseconds=random() * self._write_options.jitter_interval) - - def _on_next(self, response: _BatchResponse): - if response.exception: - logger.error("The batch item wasn't processed successfully because: %s", response.exception) - if self._error_callback: - try: - self._error_callback(response.data.to_key_tuple(), response.data.data, response.exception) - except Exception as e: - """ - Unfortunately, because callbacks are user-provided generic code, exceptions can be entirely - arbitrary - - We trap it, log that it occurred and then proceed - there's not much more that we can - really do. - """ - logger.error("The configured error callback threw an exception: %s", e) - - else: - logger.debug("The batch item: %s was processed successfully.", response) - if self._success_callback: - try: - self._success_callback(response.data.to_key_tuple(), response.data.data) - except Exception as e: - logger.error("The configured success callback threw an exception: %s", e) - - @staticmethod - def _on_error(ex): - logger.error("unexpected error during batching: %s", ex) - - def _on_complete(self): - self._disposable.dispose() - logger.info("the batching processor was disposed") - - def __getstate__(self): - """Return a dict of attributes that you want to pickle.""" - state = self.__dict__.copy() - # Remove rx - del state['_subject'] - del state['_disposable'] - del state['_window_scheduler'] - del state['_write_service'] - return state - - def __setstate__(self, state): - """Set your object with the provided dict.""" - self.__dict__.update(state) - # Init Rx - self.__init__(self._influxdb_client, - self._write_options, - self._point_settings, - success_callback=self._success_callback, - error_callback=self._error_callback, - retry_callback=self._retry_callback) diff --git a/frogpilot/third_party/influxdb_client/client/write_api_async.py b/frogpilot/third_party/influxdb_client/client/write_api_async.py deleted file mode 100644 index 38937ecad..000000000 --- a/frogpilot/third_party/influxdb_client/client/write_api_async.py +++ /dev/null @@ -1,134 +0,0 @@ -"""Collect and async write time series data to InfluxDB Cloud or InfluxDB OSS.""" -import logging -from asyncio import ensure_future, gather -from collections import defaultdict -from typing import Union, Iterable, NamedTuple - -from influxdb_client import Point, WritePrecision -from influxdb_client.client._base import _BaseWriteApi, _HAS_DATACLASS -from influxdb_client.client.util.helpers import get_org_query_param -from influxdb_client.client.write.point import DEFAULT_WRITE_PRECISION -from influxdb_client.client.write_api import PointSettings - -logger = logging.getLogger('influxdb_client.client.write_api_async') - -if _HAS_DATACLASS: - from dataclasses import dataclass - - -class WriteApiAsync(_BaseWriteApi): - """ - Implementation for '/api/v2/write' endpoint. - - Example: - .. code-block:: python - - from influxdb_client_async import InfluxDBClientAsync - - - # Initialize async/await instance of Write API - async with InfluxDBClientAsync(url="http://localhost:8086", token="my-token", org="my-org") as client: - write_api = client.write_api() - """ - - def __init__(self, influxdb_client, point_settings: PointSettings = PointSettings()) -> None: - """ - Initialize defaults. - - :param influxdb_client: with default settings (organization) - :param point_settings: settings to store default tags. - """ - super().__init__(influxdb_client=influxdb_client, point_settings=point_settings) - - async def write(self, bucket: str, org: str = None, - record: Union[str, Iterable['str'], Point, Iterable['Point'], dict, Iterable['dict'], bytes, - Iterable['bytes'], NamedTuple, Iterable['NamedTuple'], 'dataclass', - Iterable['dataclass']] = None, - write_precision: WritePrecision = DEFAULT_WRITE_PRECISION, **kwargs) -> bool: - """ - Write time-series data into InfluxDB. - - :param str bucket: specifies the destination bucket for writes (required) - :param str, Organization org: specifies the destination organization for writes; - take the ID, Name or Organization. - If not specified the default value from ``InfluxDBClientAsync.org`` is used. - :param WritePrecision write_precision: specifies the precision for the unix timestamps within - the body line-protocol. The precision specified on a Point has precedes - and is use for write. - :param record: Point, Line Protocol, Dictionary, NamedTuple, Data Classes, Pandas DataFrame - :key data_frame_measurement_name: name of measurement for writing Pandas DataFrame - ``DataFrame`` - :key data_frame_tag_columns: list of DataFrame columns which are tags, - rest columns will be fields - ``DataFrame`` - :key data_frame_timestamp_column: name of DataFrame column which contains a timestamp. The column can be defined as a :class:`~str` value - formatted as `2018-10-26`, `2018-10-26 12:00`, `2018-10-26 12:00:00-05:00` - or other formats and types supported by `pandas.to_datetime `_ - ``DataFrame`` - :key data_frame_timestamp_timezone: name of the timezone which is used for timestamp column - ``DataFrame`` - :key record_measurement_key: key of record with specified measurement - - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_measurement_name: static measurement name - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_time_key: key of record with specified timestamp - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_tag_keys: list of record keys to use as a tag - ``dictionary``, ``NamedTuple``, ``dataclass`` - :key record_field_keys: list of record keys to use as a field - ``dictionary``, ``NamedTuple``, ``dataclass`` - :return: ``True`` for successfully accepted data, otherwise raise an exception - - Example: - .. code-block:: python - - # Record as Line Protocol - await write_api.write("my-bucket", "my-org", "h2o_feet,location=us-west level=125i 1") - - # Record as Dictionary - dictionary = { - "measurement": "h2o_feet", - "tags": {"location": "us-west"}, - "fields": {"level": 125}, - "time": 1 - } - await write_api.write("my-bucket", "my-org", dictionary) - - # Record as Point - from influxdb_client import Point - point = Point("h2o_feet").tag("location", "us-west").field("level", 125).time(1) - await write_api.write("my-bucket", "my-org", point) - - DataFrame: - If the ``data_frame_timestamp_column`` is not specified the index of `Pandas DataFrame `_ - is used as a ``timestamp`` for written data. The index can be `PeriodIndex `_ - or its must be transformable to ``datetime`` by - `pandas.to_datetime `_. - - If you would like to transform a column to ``PeriodIndex``, you can use something like: - - .. code-block:: python - - import pandas as pd - - # DataFrame - data_frame = ... - # Set column as Index - data_frame.set_index('column_name', inplace=True) - # Transform index to PeriodIndex - data_frame.index = pd.to_datetime(data_frame.index, unit='s') - - """ # noqa: E501 - org = get_org_query_param(org=org, client=self._influxdb_client) - self._append_default_tags(record) - - payloads = defaultdict(list) - self._serialize(record, write_precision, payloads, precision_from_point=True, **kwargs) - - futures = [] - for payload_precision, payload_line in payloads.items(): - futures.append(ensure_future - (self._write_service.post_write_async(org=org, bucket=bucket, - body=b'\n'.join(payload_line), - precision=payload_precision, async_req=False, - _return_http_data_only=False, - content_type="text/plain; charset=utf-8"))) - - results = await gather(*futures, return_exceptions=True) - for result in results: - if isinstance(result, Exception): - raise result - - return False not in [re[1] in (201, 204) for re in results] diff --git a/frogpilot/third_party/influxdb_client/configuration.py b/frogpilot/third_party/influxdb_client/configuration.py deleted file mode 100644 index 96b103016..000000000 --- a/frogpilot/third_party/influxdb_client/configuration.py +++ /dev/null @@ -1,283 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import copy -import logging -import multiprocessing -import sys - -import urllib3 - - -class TypeWithDefault(type): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(cls, name, bases, dct): - """Initialize with defaults.""" - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls): - """Call self as a function.""" - if cls._default is None: - cls._default = type.__call__(cls) - return copy.copy(cls._default) - - def set_default(cls, default): - """Set dafaults.""" - cls._default = copy.copy(default) - - -class Configuration(object, metaclass=TypeWithDefault): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(self): - """Initialize configuration.""" - # Default Base url - self.host = "http://localhost/api/v2" - # Temp file folder for downloading files - self.temp_folder_path = None - - # Authentication Settings - # dict to store API key(s) - self.api_key = {} - # dict to store API prefix (e.g. Bearer) - self.api_key_prefix = {} - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - - # Logging Settings - self.loggers = {} - # Log format - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - # Log stream handler - self.logger_stream_handler = None - # Log file handler - self.logger_file_handler = None - # Debug file location - self.logger_file = None - # Debug switch - self.debug = False - - # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API - # from https server. - self.verify_ssl = True - # Set this to customize the certificate file to verify the peer. - self.ssl_ca_cert = None - # client certificate file - self.cert_file = None - # client key file - self.cert_key_file = None - # client key file password - self.cert_key_password = None - # Set this to True/False to enable/disable SSL hostname verification. - self.assert_hostname = None - - # Set this to specify a custom ssl context to inject this context inside the urllib3 connection pool. - self.ssl_context = None - - # urllib3 connection pool's maximum number of connections saved - # per pool. urllib3 uses 1 connection as default value, but this is - # not the best value when you are making a lot of possibly parallel - # requests to the same host, which is often the case here. - # cpu_count * 5 is used as default value to increase performance. - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - # Timeout setting for a request. If one number provided, it will be total request timeout. - # It can also be a pair (tuple) of (connection, read) timeouts. - self.timeout = None - - # Set to True/False to enable basic authentication when using proxied InfluxDB 1.8.x with no auth-enabled - self.auth_basic = False - - # Proxy URL - self.proxy = None - # A dictionary containing headers that will be sent to the proxy - self.proxy_headers = None - # Safe chars for path_param - self.safe_chars_for_path_param = '' - - @property - def logger_file(self): - """Logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """Logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.loggers.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status. - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status. - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for name, logger in self.loggers.items(): - logger.setLevel(logging.DEBUG) - if name == 'influxdb_client.client.http': - # makes sure to do not duplicate stdout handler - if not any(map(lambda h: isinstance(h, logging.StreamHandler) and h.stream == sys.stdout, - logger.handlers)): - logger.addHandler(logging.StreamHandler(sys.stdout)) - # we use 'influxdb_client.client.http' logger instead of this - # httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.loggers.items(): - logger.setLevel(logging.WARNING) - # we use 'influxdb_client.client.http' logger instead of this - # httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """Logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """Logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier): - """Get API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :return: The token for api key authentication. - """ - if (self.api_key.get(identifier) and - self.api_key_prefix.get(identifier)): - return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 - elif self.api_key.get(identifier): - return self.api_key[identifier] - - def get_basic_auth_token(self): - """Get HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password - ).get('authorization') - - def auth_settings(self): - """Get Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - return { - 'BasicAuthentication': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - 'TokenAuthentication': - { - 'type': 'api_key', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_api_key_with_prefix('Authorization') - }, - - } - - def to_debug_report(self): - """Get the essential information for debugging. - - :return: The report for debugging. - """ - from influxdb_client import VERSION - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 2.0.0\n"\ - "SDK Package Version: {client_version}".\ - format(env=sys.platform, pyversion=sys.version, client_version=VERSION) - - def update_request_header_params(self, path: str, params: dict): - """Update header params based on custom settings. - - :param path: Resource path - :param params: Header parameters dict to be updated. - """ - pass - - def update_request_body(self, path: str, body): - """Update http body based on custom settings. - - :param path: Resource path - :param body: Request body to be updated. - :return: Updated body - """ - return body diff --git a/frogpilot/third_party/influxdb_client/domain/__init__.py b/frogpilot/third_party/influxdb_client/domain/__init__.py deleted file mode 100644 index e9a69d613..000000000 --- a/frogpilot/third_party/influxdb_client/domain/__init__.py +++ /dev/null @@ -1,335 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import models into model package -from influxdb_client.domain.ast_response import ASTResponse -from influxdb_client.domain.add_resource_member_request_body import AddResourceMemberRequestBody -from influxdb_client.domain.analyze_query_response import AnalyzeQueryResponse -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 -from influxdb_client.domain.bucket import Bucket -from influxdb_client.domain.bucket_links import BucketLinks -from influxdb_client.domain.bucket_metadata_manifest import BucketMetadataManifest -from influxdb_client.domain.bucket_retention_rules import BucketRetentionRules -from influxdb_client.domain.bucket_shard_mapping import BucketShardMapping -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 -from influxdb_client.domain.builder_tags_type import BuilderTagsType -from influxdb_client.domain.builtin_statement import BuiltinStatement -from influxdb_client.domain.call_expression import CallExpression -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_discriminator import CheckDiscriminator -from influxdb_client.domain.check_patch import CheckPatch -from influxdb_client.domain.check_status_level import CheckStatusLevel -from influxdb_client.domain.check_view_properties import CheckViewProperties -from influxdb_client.domain.checks import Checks -from influxdb_client.domain.column_data_type import ColumnDataType -from influxdb_client.domain.column_semantic_type import ColumnSemanticType -from influxdb_client.domain.conditional_expression import ConditionalExpression -from influxdb_client.domain.config import Config -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_create import DBRPCreate -from influxdb_client.domain.dbrp_get import DBRPGet -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.duration import Duration -from influxdb_client.domain.duration_literal import DurationLiteral -from influxdb_client.domain.error import Error -from influxdb_client.domain.expression import Expression -from influxdb_client.domain.expression_statement import ExpressionStatement -from influxdb_client.domain.field import Field -from influxdb_client.domain.file import File -from influxdb_client.domain.float_literal import FloatLiteral -from influxdb_client.domain.flux_response import FluxResponse -from influxdb_client.domain.flux_suggestion import FluxSuggestion -from influxdb_client.domain.flux_suggestions import FluxSuggestions -from influxdb_client.domain.function_expression import FunctionExpression -from influxdb_client.domain.gauge_view_properties import GaugeViewProperties -from influxdb_client.domain.greater_threshold import GreaterThreshold -from influxdb_client.domain.http_notification_endpoint import HTTPNotificationEndpoint -from influxdb_client.domain.http_notification_rule import HTTPNotificationRule -from influxdb_client.domain.http_notification_rule_base import HTTPNotificationRuleBase -from influxdb_client.domain.health_check import HealthCheck -from influxdb_client.domain.heatmap_view_properties import HeatmapViewProperties -from influxdb_client.domain.histogram_view_properties import HistogramViewProperties -from influxdb_client.domain.identifier import Identifier -from influxdb_client.domain.import_declaration import ImportDeclaration -from influxdb_client.domain.index_expression import IndexExpression -from influxdb_client.domain.integer_literal import IntegerLiteral -from influxdb_client.domain.is_onboarding import IsOnboarding -from influxdb_client.domain.label import Label -from influxdb_client.domain.label_create_request import LabelCreateRequest -from influxdb_client.domain.label_mapping import LabelMapping -from influxdb_client.domain.label_response import LabelResponse -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.legacy_authorization_post_request import LegacyAuthorizationPostRequest -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 -from influxdb_client.domain.line_protocol_length_error import LineProtocolLengthError -from influxdb_client.domain.links import Links -from influxdb_client.domain.list_stacks_response import ListStacksResponse -from influxdb_client.domain.log_event import LogEvent -from influxdb_client.domain.logical_expression import LogicalExpression -from influxdb_client.domain.logs import Logs -from influxdb_client.domain.map_variable_properties import MapVariableProperties -from influxdb_client.domain.markdown_view_properties import MarkdownViewProperties -from influxdb_client.domain.measurement_schema import MeasurementSchema -from influxdb_client.domain.measurement_schema_column import MeasurementSchemaColumn -from influxdb_client.domain.measurement_schema_create_request import MeasurementSchemaCreateRequest -from influxdb_client.domain.measurement_schema_list import MeasurementSchemaList -from influxdb_client.domain.measurement_schema_update_request import MeasurementSchemaUpdateRequest -from influxdb_client.domain.member_assignment import MemberAssignment -from influxdb_client.domain.member_expression import MemberExpression -from influxdb_client.domain.metadata_backup import MetadataBackup -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 -from influxdb_client.domain.notification_endpoint_base_links import NotificationEndpointBaseLinks -from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator -from influxdb_client.domain.notification_endpoint_type import NotificationEndpointType -from influxdb_client.domain.notification_endpoint_update import NotificationEndpointUpdate -from influxdb_client.domain.notification_endpoints import NotificationEndpoints -from influxdb_client.domain.notification_rule import NotificationRule -from influxdb_client.domain.notification_rule_base import NotificationRuleBase -from influxdb_client.domain.notification_rule_base_links import NotificationRuleBaseLinks -from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator -from influxdb_client.domain.notification_rule_update import NotificationRuleUpdate -from influxdb_client.domain.notification_rules import NotificationRules -from influxdb_client.domain.object_expression import ObjectExpression -from influxdb_client.domain.onboarding_request import OnboardingRequest -from influxdb_client.domain.onboarding_response import OnboardingResponse -from influxdb_client.domain.option_statement import OptionStatement -from influxdb_client.domain.organization import Organization -from influxdb_client.domain.organization_links import OrganizationLinks -from influxdb_client.domain.organizations import Organizations -from influxdb_client.domain.package import Package -from influxdb_client.domain.package_clause import PackageClause -from influxdb_client.domain.pager_duty_notification_endpoint import PagerDutyNotificationEndpoint -from influxdb_client.domain.pager_duty_notification_rule import PagerDutyNotificationRule -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.patch_stack_request import PatchStackRequest -from influxdb_client.domain.patch_stack_request_additional_resources import PatchStackRequestAdditionalResources -from influxdb_client.domain.permission import Permission -from influxdb_client.domain.permission_resource import PermissionResource -from influxdb_client.domain.pipe_expression import PipeExpression -from influxdb_client.domain.pipe_literal import PipeLiteral -from influxdb_client.domain.post_bucket_request import PostBucketRequest -from influxdb_client.domain.post_check import PostCheck -from influxdb_client.domain.post_notification_endpoint import PostNotificationEndpoint -from influxdb_client.domain.post_notification_rule import PostNotificationRule -from influxdb_client.domain.post_organization_request import PostOrganizationRequest -from influxdb_client.domain.post_restore_kv_response import PostRestoreKVResponse -from influxdb_client.domain.post_stack_request import PostStackRequest -from influxdb_client.domain.property_key import PropertyKey -from influxdb_client.domain.query import Query -from influxdb_client.domain.query_edit_mode import QueryEditMode -from influxdb_client.domain.query_variable_properties import QueryVariableProperties -from influxdb_client.domain.query_variable_properties_values import QueryVariablePropertiesValues -from influxdb_client.domain.range_threshold import RangeThreshold -from influxdb_client.domain.ready import Ready -from influxdb_client.domain.regexp_literal import RegexpLiteral -from influxdb_client.domain.remote_connection import RemoteConnection -from influxdb_client.domain.remote_connection_creation_request import RemoteConnectionCreationRequest -from influxdb_client.domain.remote_connection_update_request import RemoteConnectionUpdateRequest -from influxdb_client.domain.remote_connections import RemoteConnections -from influxdb_client.domain.renamable_field import RenamableField -from influxdb_client.domain.replication import Replication -from influxdb_client.domain.replication_creation_request import ReplicationCreationRequest -from influxdb_client.domain.replication_update_request import ReplicationUpdateRequest -from influxdb_client.domain.replications import Replications -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.restored_bucket_mappings import RestoredBucketMappings -from influxdb_client.domain.retention_policy_manifest import RetentionPolicyManifest -from influxdb_client.domain.return_statement import ReturnStatement -from influxdb_client.domain.routes import Routes -from influxdb_client.domain.routes_external import RoutesExternal -from influxdb_client.domain.routes_query import RoutesQuery -from influxdb_client.domain.routes_system import RoutesSystem -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_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 -from influxdb_client.domain.script import Script -from influxdb_client.domain.script_create_request import ScriptCreateRequest -from influxdb_client.domain.script_invocation_params import ScriptInvocationParams -from influxdb_client.domain.script_language import ScriptLanguage -from influxdb_client.domain.script_update_request import ScriptUpdateRequest -from influxdb_client.domain.scripts import Scripts -from influxdb_client.domain.secret_keys import SecretKeys -from influxdb_client.domain.secret_keys_response import SecretKeysResponse -from influxdb_client.domain.shard_group_manifest import ShardGroupManifest -from influxdb_client.domain.shard_manifest import ShardManifest -from influxdb_client.domain.shard_owner import ShardOwner -from influxdb_client.domain.simple_table_view_properties import SimpleTableViewProperties -from influxdb_client.domain.single_stat_view_properties import SingleStatViewProperties -from influxdb_client.domain.slack_notification_endpoint import SlackNotificationEndpoint -from influxdb_client.domain.slack_notification_rule import SlackNotificationRule -from influxdb_client.domain.slack_notification_rule_base import SlackNotificationRuleBase -from influxdb_client.domain.source import Source -from influxdb_client.domain.source_links import SourceLinks -from influxdb_client.domain.sources import Sources -from influxdb_client.domain.stack import Stack -from influxdb_client.domain.stack_associations import StackAssociations -from influxdb_client.domain.stack_events import StackEvents -from influxdb_client.domain.stack_links import StackLinks -from influxdb_client.domain.stack_resources import StackResources -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.subscription_manifest import SubscriptionManifest -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 -from influxdb_client.domain.task_links import TaskLinks -from influxdb_client.domain.task_status_type import TaskStatusType -from influxdb_client.domain.task_update_request import TaskUpdateRequest -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_plugin_request import TelegrafPluginRequest -from influxdb_client.domain.telegraf_plugin_request_plugins import TelegrafPluginRequestPlugins -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.template_apply import TemplateApply -from influxdb_client.domain.template_apply_remotes import TemplateApplyRemotes -from influxdb_client.domain.template_apply_template import TemplateApplyTemplate -from influxdb_client.domain.template_chart import TemplateChart -from influxdb_client.domain.template_export_by_id import TemplateExportByID -from influxdb_client.domain.template_export_by_id_org_ids import TemplateExportByIDOrgIDs -from influxdb_client.domain.template_export_by_id_resource_filters import TemplateExportByIDResourceFilters -from influxdb_client.domain.template_export_by_id_resources import TemplateExportByIDResources -from influxdb_client.domain.template_export_by_name import TemplateExportByName -from influxdb_client.domain.template_export_by_name_resources import TemplateExportByNameResources -from influxdb_client.domain.template_kind import TemplateKind -from influxdb_client.domain.template_summary import TemplateSummary -from influxdb_client.domain.template_summary_diff import TemplateSummaryDiff -from influxdb_client.domain.template_summary_diff_buckets import TemplateSummaryDiffBuckets -from influxdb_client.domain.template_summary_diff_buckets_new_old import TemplateSummaryDiffBucketsNewOld -from influxdb_client.domain.template_summary_diff_checks import TemplateSummaryDiffChecks -from influxdb_client.domain.template_summary_diff_dashboards import TemplateSummaryDiffDashboards -from influxdb_client.domain.template_summary_diff_dashboards_new_old import TemplateSummaryDiffDashboardsNewOld -from influxdb_client.domain.template_summary_diff_label_mappings import TemplateSummaryDiffLabelMappings -from influxdb_client.domain.template_summary_diff_labels import TemplateSummaryDiffLabels -from influxdb_client.domain.template_summary_diff_labels_new_old import TemplateSummaryDiffLabelsNewOld -from influxdb_client.domain.template_summary_diff_notification_endpoints import TemplateSummaryDiffNotificationEndpoints -from influxdb_client.domain.template_summary_diff_notification_rules import TemplateSummaryDiffNotificationRules -from influxdb_client.domain.template_summary_diff_notification_rules_new_old import TemplateSummaryDiffNotificationRulesNewOld -from influxdb_client.domain.template_summary_diff_tasks import TemplateSummaryDiffTasks -from influxdb_client.domain.template_summary_diff_tasks_new_old import TemplateSummaryDiffTasksNewOld -from influxdb_client.domain.template_summary_diff_telegraf_configs import TemplateSummaryDiffTelegrafConfigs -from influxdb_client.domain.template_summary_diff_variables import TemplateSummaryDiffVariables -from influxdb_client.domain.template_summary_diff_variables_new_old import TemplateSummaryDiffVariablesNewOld -from influxdb_client.domain.template_summary_errors import TemplateSummaryErrors -from influxdb_client.domain.template_summary_label import TemplateSummaryLabel -from influxdb_client.domain.template_summary_label_properties import TemplateSummaryLabelProperties -from influxdb_client.domain.template_summary_summary import TemplateSummarySummary -from influxdb_client.domain.template_summary_summary_buckets import TemplateSummarySummaryBuckets -from influxdb_client.domain.template_summary_summary_dashboards import TemplateSummarySummaryDashboards -from influxdb_client.domain.template_summary_summary_label_mappings import TemplateSummarySummaryLabelMappings -from influxdb_client.domain.template_summary_summary_notification_rules import TemplateSummarySummaryNotificationRules -from influxdb_client.domain.template_summary_summary_status_rules import TemplateSummarySummaryStatusRules -from influxdb_client.domain.template_summary_summary_tag_rules import TemplateSummarySummaryTagRules -from influxdb_client.domain.template_summary_summary_tasks import TemplateSummarySummaryTasks -from influxdb_client.domain.template_summary_summary_variables import TemplateSummarySummaryVariables -from influxdb_client.domain.test_statement import TestStatement -from influxdb_client.domain.threshold import Threshold -from influxdb_client.domain.threshold_base import ThresholdBase -from influxdb_client.domain.threshold_check import ThresholdCheck -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_response import UserResponse -from influxdb_client.domain.user_response_links import UserResponseLinks -from influxdb_client.domain.users import Users -from influxdb_client.domain.variable import Variable -from influxdb_client.domain.variable_assignment import VariableAssignment -from influxdb_client.domain.variable_links import VariableLinks -from influxdb_client.domain.variable_properties import VariableProperties -from influxdb_client.domain.variables import Variables -from influxdb_client.domain.view import View -from influxdb_client.domain.view_links import ViewLinks -from influxdb_client.domain.view_properties import ViewProperties -from influxdb_client.domain.views import Views -from influxdb_client.domain.write_precision import WritePrecision -from influxdb_client.domain.xy_geom import XYGeom -from influxdb_client.domain.xy_view_properties import XYViewProperties diff --git a/frogpilot/third_party/influxdb_client/domain/add_resource_member_request_body.py b/frogpilot/third_party/influxdb_client/domain/add_resource_member_request_body.py deleted file mode 100644 index ffcddd869..000000000 --- a/frogpilot/third_party/influxdb_client/domain/add_resource_member_request_body.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class AddResourceMemberRequestBody(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name' - } - - def __init__(self, id=None, name=None): # noqa: E501,D401,D403 - """AddResourceMemberRequestBody - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._name = None - self.discriminator = None - - self.id = id - if name is not None: - self.name = name - - @property - def id(self): - """Get the id of this AddResourceMemberRequestBody. - - The ID of the user to add to the resource. - - :return: The id of this AddResourceMemberRequestBody. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this AddResourceMemberRequestBody. - - The ID of the user to add to the resource. - - :param id: The id of this AddResourceMemberRequestBody. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this AddResourceMemberRequestBody. - - The name of the user to add to the resource. - - :return: The name of this AddResourceMemberRequestBody. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this AddResourceMemberRequestBody. - - The name of the user to add to the resource. - - :param name: The name of this AddResourceMemberRequestBody. - :type: str - """ # noqa: E501 - self._name = name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, AddResourceMemberRequestBody): - 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/frogpilot/third_party/influxdb_client/domain/analyze_query_response.py b/frogpilot/third_party/influxdb_client/domain/analyze_query_response.py deleted file mode 100644 index ef7d18287..000000000 --- a/frogpilot/third_party/influxdb_client/domain/analyze_query_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class AnalyzeQueryResponse(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 = { - 'errors': 'list[AnalyzeQueryResponseErrors]' - } - - attribute_map = { - 'errors': 'errors' - } - - def __init__(self, errors=None): # noqa: E501,D401,D403 - """AnalyzeQueryResponse - a model defined in OpenAPI.""" # noqa: E501 - self._errors = None - self.discriminator = None - - if errors is not None: - self.errors = errors - - @property - def errors(self): - """Get the errors of this AnalyzeQueryResponse. - - :return: The errors of this AnalyzeQueryResponse. - :rtype: list[AnalyzeQueryResponseErrors] - """ # noqa: E501 - return self._errors - - @errors.setter - def errors(self, errors): - """Set the errors of this AnalyzeQueryResponse. - - :param errors: The errors of this AnalyzeQueryResponse. - :type: list[AnalyzeQueryResponseErrors] - """ # noqa: E501 - self._errors = errors - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, AnalyzeQueryResponse): - 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/frogpilot/third_party/influxdb_client/domain/analyze_query_response_errors.py b/frogpilot/third_party/influxdb_client/domain/analyze_query_response_errors.py deleted file mode 100644 index 7a35dc68b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/analyze_query_response_errors.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class AnalyzeQueryResponseErrors(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 = { - 'line': 'int', - 'column': 'int', - 'character': 'int', - 'message': 'str' - } - - attribute_map = { - 'line': 'line', - 'column': 'column', - 'character': 'character', - 'message': 'message' - } - - def __init__(self, line=None, column=None, character=None, message=None): # noqa: E501,D401,D403 - """AnalyzeQueryResponseErrors - a model defined in OpenAPI.""" # noqa: E501 - self._line = None - self._column = None - self._character = None - self._message = None - self.discriminator = None - - if line is not None: - self.line = line - if column is not None: - self.column = column - if character is not None: - self.character = character - if message is not None: - self.message = message - - @property - def line(self): - """Get the line of this AnalyzeQueryResponseErrors. - - :return: The line of this AnalyzeQueryResponseErrors. - :rtype: int - """ # noqa: E501 - return self._line - - @line.setter - def line(self, line): - """Set the line of this AnalyzeQueryResponseErrors. - - :param line: The line of this AnalyzeQueryResponseErrors. - :type: int - """ # noqa: E501 - self._line = line - - @property - def column(self): - """Get the column of this AnalyzeQueryResponseErrors. - - :return: The column of this AnalyzeQueryResponseErrors. - :rtype: int - """ # noqa: E501 - return self._column - - @column.setter - def column(self, column): - """Set the column of this AnalyzeQueryResponseErrors. - - :param column: The column of this AnalyzeQueryResponseErrors. - :type: int - """ # noqa: E501 - self._column = column - - @property - def character(self): - """Get the character of this AnalyzeQueryResponseErrors. - - :return: The character of this AnalyzeQueryResponseErrors. - :rtype: int - """ # noqa: E501 - return self._character - - @character.setter - def character(self, character): - """Set the character of this AnalyzeQueryResponseErrors. - - :param character: The character of this AnalyzeQueryResponseErrors. - :type: int - """ # noqa: E501 - self._character = character - - @property - def message(self): - """Get the message of this AnalyzeQueryResponseErrors. - - :return: The message of this AnalyzeQueryResponseErrors. - :rtype: str - """ # noqa: E501 - return self._message - - @message.setter - def message(self, message): - """Set the message of this AnalyzeQueryResponseErrors. - - :param message: The message of this AnalyzeQueryResponseErrors. - :type: str - """ # noqa: E501 - self._message = message - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, AnalyzeQueryResponseErrors): - 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/frogpilot/third_party/influxdb_client/domain/array_expression.py b/frogpilot/third_party/influxdb_client/domain/array_expression.py deleted file mode 100644 index 0c2853171..000000000 --- a/frogpilot/third_party/influxdb_client/domain/array_expression.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class ArrayExpression(Expression): - """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', - 'elements': 'list[Expression]' - } - - attribute_map = { - 'type': 'type', - 'elements': 'elements' - } - - 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 - - if type is not None: - self.type = type - if elements is not None: - self.elements = elements - - @property - def type(self): - """Get the type of this ArrayExpression. - - Type of AST node - - :return: The type of this ArrayExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ArrayExpression. - - Type of AST node - - :param type: The type of this ArrayExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def elements(self): - """Get the elements of this ArrayExpression. - - Elements of the array - - :return: The elements of this ArrayExpression. - :rtype: list[Expression] - """ # noqa: E501 - return self._elements - - @elements.setter - def elements(self, elements): - """Set the elements of this ArrayExpression. - - Elements of the array - - :param elements: The elements of this ArrayExpression. - :type: list[Expression] - """ # noqa: E501 - self._elements = elements - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ArrayExpression): - 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/frogpilot/third_party/influxdb_client/domain/ast_response.py b/frogpilot/third_party/influxdb_client/domain/ast_response.py deleted file mode 100644 index 227cfddd2..000000000 --- a/frogpilot/third_party/influxdb_client/domain/ast_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ASTResponse(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 = { - 'ast': 'Package' - } - - attribute_map = { - 'ast': 'ast' - } - - def __init__(self, ast=None): # noqa: E501,D401,D403 - """ASTResponse - a model defined in OpenAPI.""" # noqa: E501 - self._ast = None - self.discriminator = None - - if ast is not None: - self.ast = ast - - @property - def ast(self): - """Get the ast of this ASTResponse. - - :return: The ast of this ASTResponse. - :rtype: Package - """ # noqa: E501 - return self._ast - - @ast.setter - def ast(self, ast): - """Set the ast of this ASTResponse. - - :param ast: The ast of this ASTResponse. - :type: Package - """ # noqa: E501 - self._ast = ast - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ASTResponse): - 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/frogpilot/third_party/influxdb_client/domain/authorization.py b/frogpilot/third_party/influxdb_client/domain/authorization.py deleted file mode 100644 index aef38d9c0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/authorization.py +++ /dev/null @@ -1,354 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.authorization_update_request import AuthorizationUpdateRequest - - -class Authorization(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 = { - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'org_id': 'str', - 'permissions': 'list[Permission]', - 'id': 'str', - 'token': 'str', - 'user_id': 'str', - 'user': 'str', - 'org': 'str', - 'links': 'object', - 'status': 'str', - 'description': 'str' - } - - attribute_map = { - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'org_id': 'orgID', - 'permissions': 'permissions', - 'id': 'id', - 'token': 'token', - 'user_id': 'userID', - 'user': 'user', - 'org': 'org', - 'links': 'links', - 'status': 'status', - 'description': 'description' - } - - def __init__(self, created_at=None, updated_at=None, org_id=None, permissions=None, id=None, token=None, user_id=None, user=None, org=None, links=None, status='active', description=None): # noqa: E501,D401,D403 - """Authorization - a model defined in OpenAPI.""" # noqa: E501 - AuthorizationUpdateRequest.__init__(self, status=status, description=description) # noqa: E501 - - self._created_at = None - self._updated_at = None - self._org_id = None - self._permissions = None - self._id = None - self._token = None - self._user_id = None - self._user = None - self._org = None - self._links = None - self.discriminator = None - - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - if org_id is not None: - if not isinstance(org_id, str): - raise TypeError("org_id must be a string.") - self.org_id = org_id - if permissions is not None: - if not isinstance(permissions, list): - raise TypeError("permissions must be a list.") - self.permissions = permissions - if id is not None: - self.id = id - if token is not None: - self.token = token - if user_id is not None: - self.user_id = user_id - if user is not None: - self.user = user - if org is not None: - self.org = org - if links is not None: - self.links = links - - @property - def created_at(self): - """Get the created_at of this Authorization. - - :return: The created_at of this Authorization. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this Authorization. - - :param created_at: The created_at of this Authorization. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this Authorization. - - :return: The updated_at of this Authorization. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this Authorization. - - :param updated_at: The updated_at of this Authorization. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - @property - def org_id(self): - """Get the org_id of this Authorization. - - The organization ID. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the authorization is scoped to. - - :return: The org_id of this Authorization. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Authorization. - - The organization ID. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the authorization is scoped to. - - :param org_id: The org_id of this Authorization. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def permissions(self): - """Get the permissions of this Authorization. - - The list of permissions. An authorization must have at least one permission. - - :return: The permissions of this Authorization. - :rtype: list[Permission] - """ # noqa: E501 - return self._permissions - - @permissions.setter - def permissions(self, permissions): - """Set the permissions of this Authorization. - - The list of permissions. An authorization must have at least one permission. - - :param permissions: The permissions of this Authorization. - :type: list[Permission] - """ # noqa: E501 - self._permissions = permissions - - @property - def id(self): - """Get the id of this Authorization. - - The authorization ID. - - :return: The id of this Authorization. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Authorization. - - The authorization ID. - - :param id: The id of this Authorization. - :type: str - """ # noqa: E501 - self._id = id - - @property - def token(self): - """Get the token of this Authorization. - - The API token. The token value is unique to the authorization. [API tokens](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) are used to authenticate and authorize InfluxDB API requests and `influx` CLI commands--after receiving the request, InfluxDB checks that the token is valid and that the `permissions` allow the requested action(s). - - :return: The token of this Authorization. - :rtype: str - """ # noqa: E501 - return self._token - - @token.setter - def token(self, token): - """Set the token of this Authorization. - - The API token. The token value is unique to the authorization. [API tokens](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) are used to authenticate and authorize InfluxDB API requests and `influx` CLI commands--after receiving the request, InfluxDB checks that the token is valid and that the `permissions` allow the requested action(s). - - :param token: The token of this Authorization. - :type: str - """ # noqa: E501 - self._token = token - - @property - def user_id(self): - """Get the user_id of this Authorization. - - The user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If _scoped_, the user that the authorization is scoped to; otherwise, the creator of the authorization. - - :return: The user_id of this Authorization. - :rtype: str - """ # noqa: E501 - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Set the user_id of this Authorization. - - The user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If _scoped_, the user that the authorization is scoped to; otherwise, the creator of the authorization. - - :param user_id: The user_id of this Authorization. - :type: str - """ # noqa: E501 - self._user_id = user_id - - @property - def user(self): - """Get the user of this Authorization. - - The user name. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If the authorization is _scoped_ to a user, the user; otherwise, the creator of the authorization. - - :return: The user of this Authorization. - :rtype: str - """ # noqa: E501 - return self._user - - @user.setter - def user(self, user): - """Set the user of this Authorization. - - The user name. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that owns the authorization. If the authorization is _scoped_ to a user, the user; otherwise, the creator of the authorization. - - :param user: The user of this Authorization. - :type: str - """ # noqa: E501 - self._user = user - - @property - def org(self): - """Get the org of this Authorization. - - The organization name. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the token is scoped to. - - :return: The org of this Authorization. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this Authorization. - - The organization name. Specifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that the token is scoped to. - - :param org: The org of this Authorization. - :type: str - """ # noqa: E501 - self._org = org - - @property - def links(self): - """Get the links of this Authorization. - - :return: The links of this Authorization. - :rtype: object - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Authorization. - - :param links: The links of this Authorization. - :type: object - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Authorization): - 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/frogpilot/third_party/influxdb_client/domain/authorization_post_request.py b/frogpilot/third_party/influxdb_client/domain/authorization_post_request.py deleted file mode 100644 index 94bcd96f3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/authorization_post_request.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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. - - An organization ID. Specifies the organization that owns the authorization. - - :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. - - An organization ID. Specifies the organization that owns the authorization. - - :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. - - A user ID. Specifies the user that the authorization is scoped to. When a user authenticates with username and password, InfluxDB generates a _user session_ with all the permissions specified by all the user's authorizations. - - :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. - - A user ID. Specifies the user that the authorization is scoped to. When a user authenticates with username and password, InfluxDB generates a _user session_ with all the permissions specified by all the user's authorizations. - - :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. - - A list of permissions for an authorization. In the list, provide at least one `permission` object. In a `permission`, the `resource.type` property grants access to all resources of the specified type. To grant access to only a specific resource, specify the `resource.id` property. - - :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. - - A list of permissions for an authorization. In the list, provide at least one `permission` object. In a `permission`, the `resource.type` property grants access to all resources of the specified type. To grant access to only a specific resource, specify the `resource.id` property. - - :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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/authorization_update_request.py b/frogpilot/third_party/influxdb_client/domain/authorization_update_request.py deleted file mode 100644 index 097d9654e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/authorization_update_request.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class AuthorizationUpdateRequest(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 = { - 'status': 'str', - 'description': 'str' - } - - attribute_map = { - 'status': 'status', - 'description': 'description' - } - - def __init__(self, status='active', description=None): # noqa: E501,D401,D403 - """AuthorizationUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._status = None - self._description = None - self.discriminator = None - - if status is not None: - self.status = status - if description is not None: - self.description = description - - @property - def status(self): - """Get the status of this AuthorizationUpdateRequest. - - Status of the token. If `inactive`, InfluxDB rejects requests that use the token. - - :return: The status of this AuthorizationUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this AuthorizationUpdateRequest. - - Status of the token. If `inactive`, InfluxDB rejects requests that use the token. - - :param status: The status of this AuthorizationUpdateRequest. - :type: str - """ # noqa: E501 - self._status = status - - @property - def description(self): - """Get the description of this AuthorizationUpdateRequest. - - A description of the token. - - :return: The description of this AuthorizationUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this AuthorizationUpdateRequest. - - A description of the token. - - :param description: The description of this AuthorizationUpdateRequest. - :type: str - """ # noqa: E501 - self._description = description - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, AuthorizationUpdateRequest): - 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/frogpilot/third_party/influxdb_client/domain/authorizations.py b/frogpilot/third_party/influxdb_client/domain/authorizations.py deleted file mode 100644 index ad3a4d092..000000000 --- a/frogpilot/third_party/influxdb_client/domain/authorizations.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Authorizations(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 = { - 'links': 'Links', - 'authorizations': 'list[Authorization]' - } - - attribute_map = { - 'links': 'links', - 'authorizations': 'authorizations' - } - - def __init__(self, links=None, authorizations=None): # noqa: E501,D401,D403 - """Authorizations - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._authorizations = None - self.discriminator = None - - if links is not None: - self.links = links - if authorizations is not None: - self.authorizations = authorizations - - @property - def links(self): - """Get the links of this Authorizations. - - :return: The links of this Authorizations. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Authorizations. - - :param links: The links of this Authorizations. - :type: Links - """ # noqa: E501 - self._links = links - - @property - def authorizations(self): - """Get the authorizations of this Authorizations. - - :return: The authorizations of this Authorizations. - :rtype: list[Authorization] - """ # noqa: E501 - return self._authorizations - - @authorizations.setter - def authorizations(self, authorizations): - """Set the authorizations of this Authorizations. - - :param authorizations: The authorizations of this Authorizations. - :type: list[Authorization] - """ # noqa: E501 - self._authorizations = authorizations - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Authorizations): - 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/frogpilot/third_party/influxdb_client/domain/axes.py b/frogpilot/third_party/influxdb_client/domain/axes.py deleted file mode 100644 index 738e3b3b0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/axes.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Axes(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'x': 'Axis', - 'y': 'Axis' - } - - attribute_map = { - 'x': 'x', - 'y': 'y' - } - - def __init__(self, x=None, y=None): # noqa: E501,D401,D403 - """Axes - a model defined in OpenAPI.""" # noqa: E501 - self._x = None - self._y = None - self.discriminator = None - - self.x = x - self.y = y - - @property - def x(self): - """Get the x of this Axes. - - :return: The x of this Axes. - :rtype: Axis - """ # noqa: E501 - return self._x - - @x.setter - def x(self, x): - """Set the x of this Axes. - - :param x: The x of this Axes. - :type: Axis - """ # noqa: E501 - if x is None: - raise ValueError("Invalid value for `x`, must not be `None`") # noqa: E501 - self._x = x - - @property - def y(self): - """Get the y of this Axes. - - :return: The y of this Axes. - :rtype: Axis - """ # noqa: E501 - return self._y - - @y.setter - def y(self, y): - """Set the y of this Axes. - - :param y: The y of this Axes. - :type: Axis - """ # noqa: E501 - if y is None: - raise ValueError("Invalid value for `y`, must not be `None`") # noqa: E501 - self._y = y - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Axes): - 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/frogpilot/third_party/influxdb_client/domain/axis.py b/frogpilot/third_party/influxdb_client/domain/axis.py deleted file mode 100644 index 444207530..000000000 --- a/frogpilot/third_party/influxdb_client/domain/axis.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Axis(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 = { - 'bounds': 'list[str]', - 'label': 'str', - 'prefix': 'str', - 'suffix': 'str', - 'base': 'str', - 'scale': 'AxisScale' - } - - attribute_map = { - 'bounds': 'bounds', - 'label': 'label', - 'prefix': 'prefix', - 'suffix': 'suffix', - 'base': 'base', - 'scale': 'scale' - } - - def __init__(self, bounds=None, label=None, prefix=None, suffix=None, base=None, scale=None): # noqa: E501,D401,D403 - """Axis - a model defined in OpenAPI.""" # noqa: E501 - self._bounds = None - self._label = None - self._prefix = None - self._suffix = None - self._base = None - self._scale = None - self.discriminator = None - - if bounds is not None: - self.bounds = bounds - if label is not None: - self.label = label - if prefix is not None: - self.prefix = prefix - if suffix is not None: - self.suffix = suffix - if base is not None: - self.base = base - if scale is not None: - self.scale = scale - - @property - def bounds(self): - """Get the bounds of this Axis. - - The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits. - - :return: The bounds of this Axis. - :rtype: list[str] - """ # noqa: E501 - return self._bounds - - @bounds.setter - def bounds(self, bounds): - """Set the bounds of this Axis. - - The extents of the axis in the form [lower, upper]. Clients determine whether bounds are inclusive or exclusive of their limits. - - :param bounds: The bounds of this Axis. - :type: list[str] - """ # noqa: E501 - self._bounds = bounds - - @property - def label(self): - """Get the label of this Axis. - - Description of the axis. - - :return: The label of this Axis. - :rtype: str - """ # noqa: E501 - return self._label - - @label.setter - def label(self, label): - """Set the label of this Axis. - - Description of the axis. - - :param label: The label of this Axis. - :type: str - """ # noqa: E501 - self._label = label - - @property - def prefix(self): - """Get the prefix of this Axis. - - Label prefix for formatting axis values. - - :return: The prefix of this Axis. - :rtype: str - """ # noqa: E501 - return self._prefix - - @prefix.setter - def prefix(self, prefix): - """Set the prefix of this Axis. - - Label prefix for formatting axis values. - - :param prefix: The prefix of this Axis. - :type: str - """ # noqa: E501 - self._prefix = prefix - - @property - def suffix(self): - """Get the suffix of this Axis. - - Label suffix for formatting axis values. - - :return: The suffix of this Axis. - :rtype: str - """ # noqa: E501 - return self._suffix - - @suffix.setter - def suffix(self, suffix): - """Set the suffix of this Axis. - - Label suffix for formatting axis values. - - :param suffix: The suffix of this Axis. - :type: str - """ # noqa: E501 - self._suffix = suffix - - @property - def base(self): - """Get the base of this Axis. - - Radix for formatting axis values. - - :return: The base of this Axis. - :rtype: str - """ # noqa: E501 - return self._base - - @base.setter - def base(self, base): - """Set the base of this Axis. - - Radix for formatting axis values. - - :param base: The base of this Axis. - :type: str - """ # noqa: E501 - self._base = base - - @property - def scale(self): - """Get the scale of this Axis. - - :return: The scale of this Axis. - :rtype: AxisScale - """ # noqa: E501 - return self._scale - - @scale.setter - def scale(self, scale): - """Set the scale of this Axis. - - :param scale: The scale of this Axis. - :type: AxisScale - """ # noqa: E501 - self._scale = scale - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Axis): - 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/frogpilot/third_party/influxdb_client/domain/axis_scale.py b/frogpilot/third_party/influxdb_client/domain/axis_scale.py deleted file mode 100644 index a678feff5..000000000 --- a/frogpilot/third_party/influxdb_client/domain/axis_scale.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class AxisScale(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - LOG = "log" - LINEAR = "linear" - - """ - 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 - """AxisScale - 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 self.openapi_types.items(): - 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, AxisScale): - 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/frogpilot/third_party/influxdb_client/domain/bad_statement.py b/frogpilot/third_party/influxdb_client/domain/bad_statement.py deleted file mode 100644 index d1f455e6c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/bad_statement.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class BadStatement(Statement): - """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', - 'text': 'str' - } - - attribute_map = { - 'type': 'type', - 'text': 'text' - } - - 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 - - if type is not None: - self.type = type - if text is not None: - self.text = text - - @property - def type(self): - """Get the type of this BadStatement. - - Type of AST node - - :return: The type of this BadStatement. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this BadStatement. - - Type of AST node - - :param type: The type of this BadStatement. - :type: str - """ # noqa: E501 - self._type = type - - @property - def text(self): - """Get the text of this BadStatement. - - Raw source text - - :return: The text of this BadStatement. - :rtype: str - """ # noqa: E501 - return self._text - - @text.setter - def text(self, text): - """Set the text of this BadStatement. - - Raw source text - - :param text: The text of this BadStatement. - :type: str - """ # noqa: E501 - self._text = text - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BadStatement): - 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/frogpilot/third_party/influxdb_client/domain/band_view_properties.py b/frogpilot/third_party/influxdb_client/domain/band_view_properties.py deleted file mode 100644 index 1b03b7b4d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/band_view_properties.py +++ /dev/null @@ -1,771 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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 = { - 'adaptive_zoom_hide': 'bool', - '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 = { - 'adaptive_zoom_hide': 'adaptiveZoomHide', - '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, adaptive_zoom_hide=None, 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._adaptive_zoom_hide = None - 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 adaptive_zoom_hide is not None: - self.adaptive_zoom_hide = adaptive_zoom_hide - 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 adaptive_zoom_hide(self): - """Get the adaptive_zoom_hide of this BandViewProperties. - - :return: The adaptive_zoom_hide of this BandViewProperties. - :rtype: bool - """ # noqa: E501 - return self._adaptive_zoom_hide - - @adaptive_zoom_hide.setter - def adaptive_zoom_hide(self, adaptive_zoom_hide): - """Set the adaptive_zoom_hide of this BandViewProperties. - - :param adaptive_zoom_hide: The adaptive_zoom_hide of this BandViewProperties. - :type: bool - """ # noqa: E501 - self._adaptive_zoom_hide = adaptive_zoom_hide - - @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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/binary_expression.py b/frogpilot/third_party/influxdb_client/domain/binary_expression.py deleted file mode 100644 index 858d4e110..000000000 --- a/frogpilot/third_party/influxdb_client/domain/binary_expression.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class BinaryExpression(Expression): - """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', - 'operator': 'str', - 'left': 'Expression', - 'right': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'operator': 'operator', - 'left': 'left', - 'right': 'right' - } - - 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 - self._right = None - self.discriminator = None - - if type is not None: - self.type = type - if operator is not None: - self.operator = operator - if left is not None: - self.left = left - if right is not None: - self.right = right - - @property - def type(self): - """Get the type of this BinaryExpression. - - Type of AST node - - :return: The type of this BinaryExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this BinaryExpression. - - Type of AST node - - :param type: The type of this BinaryExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def operator(self): - """Get the operator of this BinaryExpression. - - :return: The operator of this BinaryExpression. - :rtype: str - """ # noqa: E501 - return self._operator - - @operator.setter - def operator(self, operator): - """Set the operator of this BinaryExpression. - - :param operator: The operator of this BinaryExpression. - :type: str - """ # noqa: E501 - self._operator = operator - - @property - def left(self): - """Get the left of this BinaryExpression. - - :return: The left of this BinaryExpression. - :rtype: Expression - """ # noqa: E501 - return self._left - - @left.setter - def left(self, left): - """Set the left of this BinaryExpression. - - :param left: The left of this BinaryExpression. - :type: Expression - """ # noqa: E501 - self._left = left - - @property - def right(self): - """Get the right of this BinaryExpression. - - :return: The right of this BinaryExpression. - :rtype: Expression - """ # noqa: E501 - return self._right - - @right.setter - def right(self, right): - """Set the right of this BinaryExpression. - - :param right: The right of this BinaryExpression. - :type: Expression - """ # noqa: E501 - self._right = right - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BinaryExpression): - 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/frogpilot/third_party/influxdb_client/domain/block.py b/frogpilot/third_party/influxdb_client/domain/block.py deleted file mode 100644 index b2ddc3660..000000000 --- a/frogpilot/third_party/influxdb_client/domain/block.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.node import Node - - -class Block(Node): - """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', - 'body': 'list[Statement]' - } - - attribute_map = { - 'type': 'type', - 'body': 'body' - } - - 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 - - if type is not None: - self.type = type - if body is not None: - self.body = body - - @property - def type(self): - """Get the type of this Block. - - Type of AST node - - :return: The type of this Block. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Block. - - Type of AST node - - :param type: The type of this Block. - :type: str - """ # noqa: E501 - self._type = type - - @property - def body(self): - """Get the body of this Block. - - Block body - - :return: The body of this Block. - :rtype: list[Statement] - """ # noqa: E501 - return self._body - - @body.setter - def body(self, body): - """Set the body of this Block. - - Block body - - :param body: The body of this Block. - :type: list[Statement] - """ # noqa: E501 - self._body = body - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Block): - 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/frogpilot/third_party/influxdb_client/domain/boolean_literal.py b/frogpilot/third_party/influxdb_client/domain/boolean_literal.py deleted file mode 100644 index 693d7be1a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/boolean_literal.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class BooleanLiteral(Expression): - """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', - 'value': 'bool' - } - - attribute_map = { - 'type': 'type', - 'value': 'value' - } - - 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 - - if type is not None: - self.type = type - if value is not None: - self.value = value - - @property - def type(self): - """Get the type of this BooleanLiteral. - - Type of AST node - - :return: The type of this BooleanLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this BooleanLiteral. - - Type of AST node - - :param type: The type of this BooleanLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def value(self): - """Get the value of this BooleanLiteral. - - :return: The value of this BooleanLiteral. - :rtype: bool - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this BooleanLiteral. - - :param value: The value of this BooleanLiteral. - :type: bool - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BooleanLiteral): - 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/frogpilot/third_party/influxdb_client/domain/bucket.py b/frogpilot/third_party/influxdb_client/domain/bucket.py deleted file mode 100644 index fe7d3d6b5..000000000 --- a/frogpilot/third_party/influxdb_client/domain/bucket.py +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Bucket(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 = { - 'links': 'BucketLinks', - 'id': 'str', - 'type': 'str', - 'name': 'str', - 'description': 'str', - 'org_id': 'str', - 'rp': 'str', - 'schema_type': 'SchemaType', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'retention_rules': 'list[BucketRetentionRules]', - 'labels': 'list[Label]' - } - - attribute_map = { - 'links': 'links', - 'id': 'id', - 'type': 'type', - 'name': 'name', - '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, 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 - self._type = None - self._name = 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 - self._labels = None - self.discriminator = None - - if links is not None: - self.links = links - if id is not None: - self.id = id - if type is not None: - self.type = type - self.name = name - if description is not None: - self.description = description - if org_id is not 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: - self.updated_at = updated_at - self.retention_rules = retention_rules - if labels is not None: - self.labels = labels - - @property - def links(self): - """Get the links of this Bucket. - - :return: The links of this Bucket. - :rtype: BucketLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Bucket. - - :param links: The links of this Bucket. - :type: BucketLinks - """ # noqa: E501 - self._links = links - - @property - def id(self): - """Get the id of this Bucket. - - :return: The id of this Bucket. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Bucket. - - :param id: The id of this Bucket. - :type: str - """ # noqa: E501 - self._id = id - - @property - def type(self): - """Get the type of this Bucket. - - :return: The type of this Bucket. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Bucket. - - :param type: The type of this Bucket. - :type: str - """ # noqa: E501 - self._type = type - - @property - def name(self): - """Get the name of this Bucket. - - :return: The name of this Bucket. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Bucket. - - :param name: The name of this Bucket. - :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 Bucket. - - :return: The description of this Bucket. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this Bucket. - - :param description: The description of this Bucket. - :type: str - """ # noqa: E501 - self._description = description - - @property - def org_id(self): - """Get the org_id of this Bucket. - - :return: The org_id of this Bucket. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Bucket. - - :param org_id: The org_id of this Bucket. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def rp(self): - """Get the rp of this Bucket. - - :return: The rp of this Bucket. - :rtype: str - """ # noqa: E501 - return self._rp - - @rp.setter - def rp(self, rp): - """Set the rp of this Bucket. - - :param rp: The rp of this Bucket. - :type: str - """ # 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. - - :return: The created_at of this Bucket. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this Bucket. - - :param created_at: The created_at of this Bucket. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this Bucket. - - :return: The updated_at of this Bucket. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this Bucket. - - :param updated_at: The updated_at of this Bucket. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - @property - def retention_rules(self): - """Get the retention_rules of this Bucket. - - Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. - - :return: The retention_rules of this Bucket. - :rtype: list[BucketRetentionRules] - """ # noqa: E501 - return self._retention_rules - - @retention_rules.setter - def retention_rules(self, retention_rules): - """Set the retention_rules of this Bucket. - - Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. - - :param retention_rules: The retention_rules of this Bucket. - :type: list[BucketRetentionRules] - """ # noqa: E501 - if retention_rules is None: - raise ValueError("Invalid value for `retention_rules`, must not be `None`") # noqa: E501 - self._retention_rules = retention_rules - - @property - def labels(self): - """Get the labels of this Bucket. - - :return: The labels of this Bucket. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this Bucket. - - :param labels: The labels of this Bucket. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Bucket): - 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/frogpilot/third_party/influxdb_client/domain/bucket_links.py b/frogpilot/third_party/influxdb_client/domain/bucket_links.py deleted file mode 100644 index a4cef1aae..000000000 --- a/frogpilot/third_party/influxdb_client/domain/bucket_links.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BucketLinks(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 = { - 'labels': 'str', - 'members': 'str', - 'org': 'str', - 'owners': 'str', - '_self': 'str', - 'write': 'str' - } - - attribute_map = { - 'labels': 'labels', - 'members': 'members', - 'org': 'org', - 'owners': 'owners', - '_self': 'self', - 'write': 'write' - } - - def __init__(self, labels=None, members=None, org=None, owners=None, _self=None, write=None): # noqa: E501,D401,D403 - """BucketLinks - a model defined in OpenAPI.""" # noqa: E501 - self._labels = None - self._members = None - self._org = None - self._owners = None - self.__self = None - self._write = None - self.discriminator = None - - if labels is not None: - self.labels = labels - if members is not None: - self.members = members - if org is not None: - self.org = org - if owners is not None: - self.owners = owners - if _self is not None: - self._self = _self - if write is not None: - self.write = write - - @property - def labels(self): - """Get the labels of this BucketLinks. - - URI of resource. - - :return: The labels of this BucketLinks. - :rtype: str - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this BucketLinks. - - URI of resource. - - :param labels: The labels of this BucketLinks. - :type: str - """ # noqa: E501 - self._labels = labels - - @property - def members(self): - """Get the members of this BucketLinks. - - URI of resource. - - :return: The members of this BucketLinks. - :rtype: str - """ # noqa: E501 - return self._members - - @members.setter - def members(self, members): - """Set the members of this BucketLinks. - - URI of resource. - - :param members: The members of this BucketLinks. - :type: str - """ # noqa: E501 - self._members = members - - @property - def org(self): - """Get the org of this BucketLinks. - - URI of resource. - - :return: The org of this BucketLinks. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this BucketLinks. - - URI of resource. - - :param org: The org of this BucketLinks. - :type: str - """ # noqa: E501 - self._org = org - - @property - def owners(self): - """Get the owners of this BucketLinks. - - URI of resource. - - :return: The owners of this BucketLinks. - :rtype: str - """ # noqa: E501 - return self._owners - - @owners.setter - def owners(self, owners): - """Set the owners of this BucketLinks. - - URI of resource. - - :param owners: The owners of this BucketLinks. - :type: str - """ # noqa: E501 - self._owners = owners - - @property - def _self(self): - """Get the _self of this BucketLinks. - - URI of resource. - - :return: The _self of this BucketLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this BucketLinks. - - URI of resource. - - :param _self: The _self of this BucketLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def write(self): - """Get the write of this BucketLinks. - - URI of resource. - - :return: The write of this BucketLinks. - :rtype: str - """ # noqa: E501 - return self._write - - @write.setter - def write(self, write): - """Set the write of this BucketLinks. - - URI of resource. - - :param write: The write of this BucketLinks. - :type: str - """ # noqa: E501 - self._write = write - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BucketLinks): - 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/frogpilot/third_party/influxdb_client/domain/bucket_metadata_manifest.py b/frogpilot/third_party/influxdb_client/domain/bucket_metadata_manifest.py deleted file mode 100644 index c87ec20e1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/bucket_metadata_manifest.py +++ /dev/null @@ -1,251 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BucketMetadataManifest(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 = { - 'organization_id': 'str', - 'organization_name': 'str', - 'bucket_id': 'str', - 'bucket_name': 'str', - 'description': 'str', - 'default_retention_policy': 'str', - 'retention_policies': 'list[RetentionPolicyManifest]' - } - - attribute_map = { - 'organization_id': 'organizationID', - 'organization_name': 'organizationName', - 'bucket_id': 'bucketID', - 'bucket_name': 'bucketName', - 'description': 'description', - 'default_retention_policy': 'defaultRetentionPolicy', - 'retention_policies': 'retentionPolicies' - } - - def __init__(self, organization_id=None, organization_name=None, bucket_id=None, bucket_name=None, description=None, default_retention_policy=None, retention_policies=None): # noqa: E501,D401,D403 - """BucketMetadataManifest - a model defined in OpenAPI.""" # noqa: E501 - self._organization_id = None - self._organization_name = None - self._bucket_id = None - self._bucket_name = None - self._description = None - self._default_retention_policy = None - self._retention_policies = None - self.discriminator = None - - self.organization_id = organization_id - self.organization_name = organization_name - self.bucket_id = bucket_id - self.bucket_name = bucket_name - if description is not None: - self.description = description - self.default_retention_policy = default_retention_policy - self.retention_policies = retention_policies - - @property - def organization_id(self): - """Get the organization_id of this BucketMetadataManifest. - - :return: The organization_id of this BucketMetadataManifest. - :rtype: str - """ # noqa: E501 - return self._organization_id - - @organization_id.setter - def organization_id(self, organization_id): - """Set the organization_id of this BucketMetadataManifest. - - :param organization_id: The organization_id of this BucketMetadataManifest. - :type: str - """ # noqa: E501 - if organization_id is None: - raise ValueError("Invalid value for `organization_id`, must not be `None`") # noqa: E501 - self._organization_id = organization_id - - @property - def organization_name(self): - """Get the organization_name of this BucketMetadataManifest. - - :return: The organization_name of this BucketMetadataManifest. - :rtype: str - """ # noqa: E501 - return self._organization_name - - @organization_name.setter - def organization_name(self, organization_name): - """Set the organization_name of this BucketMetadataManifest. - - :param organization_name: The organization_name of this BucketMetadataManifest. - :type: str - """ # noqa: E501 - if organization_name is None: - raise ValueError("Invalid value for `organization_name`, must not be `None`") # noqa: E501 - self._organization_name = organization_name - - @property - def bucket_id(self): - """Get the bucket_id of this BucketMetadataManifest. - - :return: The bucket_id of this BucketMetadataManifest. - :rtype: str - """ # noqa: E501 - return self._bucket_id - - @bucket_id.setter - def bucket_id(self, bucket_id): - """Set the bucket_id of this BucketMetadataManifest. - - :param bucket_id: The bucket_id of this BucketMetadataManifest. - :type: str - """ # noqa: E501 - if bucket_id is None: - raise ValueError("Invalid value for `bucket_id`, must not be `None`") # noqa: E501 - self._bucket_id = bucket_id - - @property - def bucket_name(self): - """Get the bucket_name of this BucketMetadataManifest. - - :return: The bucket_name of this BucketMetadataManifest. - :rtype: str - """ # noqa: E501 - return self._bucket_name - - @bucket_name.setter - def bucket_name(self, bucket_name): - """Set the bucket_name of this BucketMetadataManifest. - - :param bucket_name: The bucket_name of this BucketMetadataManifest. - :type: str - """ # noqa: E501 - if bucket_name is None: - raise ValueError("Invalid value for `bucket_name`, must not be `None`") # noqa: E501 - self._bucket_name = bucket_name - - @property - def description(self): - """Get the description of this BucketMetadataManifest. - - :return: The description of this BucketMetadataManifest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this BucketMetadataManifest. - - :param description: The description of this BucketMetadataManifest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def default_retention_policy(self): - """Get the default_retention_policy of this BucketMetadataManifest. - - :return: The default_retention_policy of this BucketMetadataManifest. - :rtype: str - """ # noqa: E501 - return self._default_retention_policy - - @default_retention_policy.setter - def default_retention_policy(self, default_retention_policy): - """Set the default_retention_policy of this BucketMetadataManifest. - - :param default_retention_policy: The default_retention_policy of this BucketMetadataManifest. - :type: str - """ # noqa: E501 - if default_retention_policy is None: - raise ValueError("Invalid value for `default_retention_policy`, must not be `None`") # noqa: E501 - self._default_retention_policy = default_retention_policy - - @property - def retention_policies(self): - """Get the retention_policies of this BucketMetadataManifest. - - :return: The retention_policies of this BucketMetadataManifest. - :rtype: list[RetentionPolicyManifest] - """ # noqa: E501 - return self._retention_policies - - @retention_policies.setter - def retention_policies(self, retention_policies): - """Set the retention_policies of this BucketMetadataManifest. - - :param retention_policies: The retention_policies of this BucketMetadataManifest. - :type: list[RetentionPolicyManifest] - """ # noqa: E501 - if retention_policies is None: - raise ValueError("Invalid value for `retention_policies`, must not be `None`") # noqa: E501 - self._retention_policies = retention_policies - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BucketMetadataManifest): - 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/frogpilot/third_party/influxdb_client/domain/bucket_retention_rules.py b/frogpilot/third_party/influxdb_client/domain/bucket_retention_rules.py deleted file mode 100644 index 2359eb73e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/bucket_retention_rules.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BucketRetentionRules(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=2592000, shard_group_duration_seconds=None): # noqa: E501,D401,D403 - """BucketRetentionRules - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._every_seconds = None - self._shard_group_duration_seconds = None - self.discriminator = None - - if type is not None: - self.type = type - 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 BucketRetentionRules. - - :return: The type of this BucketRetentionRules. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this BucketRetentionRules. - - :param type: The type of this BucketRetentionRules. - :type: str - """ # noqa: E501 - self._type = type - - @property - def every_seconds(self): - """Get the every_seconds of this BucketRetentionRules. - - The duration in seconds for how long data will be kept in the database. The default duration is 2592000 (30 days). 0 represents infinite retention. - - :return: The every_seconds of this BucketRetentionRules. - :rtype: int - """ # noqa: E501 - return self._every_seconds - - @every_seconds.setter - def every_seconds(self, every_seconds): - """Set the every_seconds of this BucketRetentionRules. - - The duration in seconds for how long data will be kept in the database. The default duration is 2592000 (30 days). 0 represents infinite retention. - - :param every_seconds: The every_seconds of this BucketRetentionRules. - :type: int - """ # noqa: E501 - if every_seconds is None: - raise ValueError("Invalid value for `every_seconds`, must not be `None`") # 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 BucketRetentionRules. - - The shard group duration. The duration or interval (in seconds) that each shard group covers. #### InfluxDB Cloud - Does not use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). - - :return: The shard_group_duration_seconds of this BucketRetentionRules. - :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 BucketRetentionRules. - - The shard group duration. The duration or interval (in seconds) that each shard group covers. #### InfluxDB Cloud - Does not use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). - - :param shard_group_duration_seconds: The shard_group_duration_seconds of this BucketRetentionRules. - :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 self.openapi_types.items(): - 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, BucketRetentionRules): - 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/frogpilot/third_party/influxdb_client/domain/bucket_shard_mapping.py b/frogpilot/third_party/influxdb_client/domain/bucket_shard_mapping.py deleted file mode 100644 index 1bf7c277d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/bucket_shard_mapping.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BucketShardMapping(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 = { - 'old_id': 'int', - 'new_id': 'int' - } - - attribute_map = { - 'old_id': 'oldId', - 'new_id': 'newId' - } - - def __init__(self, old_id=None, new_id=None): # noqa: E501,D401,D403 - """BucketShardMapping - a model defined in OpenAPI.""" # noqa: E501 - self._old_id = None - self._new_id = None - self.discriminator = None - - self.old_id = old_id - self.new_id = new_id - - @property - def old_id(self): - """Get the old_id of this BucketShardMapping. - - :return: The old_id of this BucketShardMapping. - :rtype: int - """ # noqa: E501 - return self._old_id - - @old_id.setter - def old_id(self, old_id): - """Set the old_id of this BucketShardMapping. - - :param old_id: The old_id of this BucketShardMapping. - :type: int - """ # noqa: E501 - if old_id is None: - raise ValueError("Invalid value for `old_id`, must not be `None`") # noqa: E501 - self._old_id = old_id - - @property - def new_id(self): - """Get the new_id of this BucketShardMapping. - - :return: The new_id of this BucketShardMapping. - :rtype: int - """ # noqa: E501 - return self._new_id - - @new_id.setter - def new_id(self, new_id): - """Set the new_id of this BucketShardMapping. - - :param new_id: The new_id of this BucketShardMapping. - :type: int - """ # noqa: E501 - if new_id is None: - raise ValueError("Invalid value for `new_id`, must not be `None`") # noqa: E501 - self._new_id = new_id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BucketShardMapping): - 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/frogpilot/third_party/influxdb_client/domain/buckets.py b/frogpilot/third_party/influxdb_client/domain/buckets.py deleted file mode 100644 index de3277f75..000000000 --- a/frogpilot/third_party/influxdb_client/domain/buckets.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Buckets(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 = { - 'links': 'Links', - 'buckets': 'list[Bucket]' - } - - attribute_map = { - 'links': 'links', - 'buckets': 'buckets' - } - - def __init__(self, links=None, buckets=None): # noqa: E501,D401,D403 - """Buckets - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._buckets = None - self.discriminator = None - - if links is not None: - self.links = links - if buckets is not None: - self.buckets = buckets - - @property - def links(self): - """Get the links of this Buckets. - - :return: The links of this Buckets. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Buckets. - - :param links: The links of this Buckets. - :type: Links - """ # noqa: E501 - self._links = links - - @property - def buckets(self): - """Get the buckets of this Buckets. - - :return: The buckets of this Buckets. - :rtype: list[Bucket] - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this Buckets. - - :param buckets: The buckets of this Buckets. - :type: list[Bucket] - """ # noqa: E501 - self._buckets = buckets - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Buckets): - 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/frogpilot/third_party/influxdb_client/domain/builder_aggregate_function_type.py b/frogpilot/third_party/influxdb_client/domain/builder_aggregate_function_type.py deleted file mode 100644 index 0cbf6b676..000000000 --- a/frogpilot/third_party/influxdb_client/domain/builder_aggregate_function_type.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/builder_config.py b/frogpilot/third_party/influxdb_client/domain/builder_config.py deleted file mode 100644 index e8a2d0258..000000000 --- a/frogpilot/third_party/influxdb_client/domain/builder_config.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BuilderConfig(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'buckets': 'list[str]', - 'tags': 'list[BuilderTagsType]', - 'functions': 'list[BuilderFunctionsType]', - 'aggregate_window': 'BuilderConfigAggregateWindow' - } - - attribute_map = { - 'buckets': 'buckets', - 'tags': 'tags', - 'functions': 'functions', - 'aggregate_window': 'aggregateWindow' - } - - def __init__(self, buckets=None, tags=None, functions=None, aggregate_window=None): # noqa: E501,D401,D403 - """BuilderConfig - a model defined in OpenAPI.""" # noqa: E501 - self._buckets = None - self._tags = None - self._functions = None - self._aggregate_window = None - self.discriminator = None - - if buckets is not None: - self.buckets = buckets - if tags is not None: - self.tags = tags - if functions is not None: - self.functions = functions - if aggregate_window is not None: - self.aggregate_window = aggregate_window - - @property - def buckets(self): - """Get the buckets of this BuilderConfig. - - :return: The buckets of this BuilderConfig. - :rtype: list[str] - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this BuilderConfig. - - :param buckets: The buckets of this BuilderConfig. - :type: list[str] - """ # noqa: E501 - self._buckets = buckets - - @property - def tags(self): - """Get the tags of this BuilderConfig. - - :return: The tags of this BuilderConfig. - :rtype: list[BuilderTagsType] - """ # noqa: E501 - return self._tags - - @tags.setter - def tags(self, tags): - """Set the tags of this BuilderConfig. - - :param tags: The tags of this BuilderConfig. - :type: list[BuilderTagsType] - """ # noqa: E501 - self._tags = tags - - @property - def functions(self): - """Get the functions of this BuilderConfig. - - :return: The functions of this BuilderConfig. - :rtype: list[BuilderFunctionsType] - """ # noqa: E501 - return self._functions - - @functions.setter - def functions(self, functions): - """Set the functions of this BuilderConfig. - - :param functions: The functions of this BuilderConfig. - :type: list[BuilderFunctionsType] - """ # noqa: E501 - self._functions = functions - - @property - def aggregate_window(self): - """Get the aggregate_window of this BuilderConfig. - - :return: The aggregate_window of this BuilderConfig. - :rtype: BuilderConfigAggregateWindow - """ # noqa: E501 - return self._aggregate_window - - @aggregate_window.setter - def aggregate_window(self, aggregate_window): - """Set the aggregate_window of this BuilderConfig. - - :param aggregate_window: The aggregate_window of this BuilderConfig. - :type: BuilderConfigAggregateWindow - """ # noqa: E501 - self._aggregate_window = aggregate_window - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BuilderConfig): - 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/frogpilot/third_party/influxdb_client/domain/builder_config_aggregate_window.py b/frogpilot/third_party/influxdb_client/domain/builder_config_aggregate_window.py deleted file mode 100644 index bcdde38d9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/builder_config_aggregate_window.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BuilderConfigAggregateWindow(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 = { - 'period': 'str', - 'fill_values': 'bool' - } - - attribute_map = { - 'period': 'period', - 'fill_values': 'fillValues' - } - - 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): - """Get the period of this BuilderConfigAggregateWindow. - - :return: The period of this BuilderConfigAggregateWindow. - :rtype: str - """ # noqa: E501 - return self._period - - @period.setter - def period(self, period): - """Set the period of this BuilderConfigAggregateWindow. - - :param period: The period of this BuilderConfigAggregateWindow. - :type: str - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, BuilderConfigAggregateWindow): - 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/frogpilot/third_party/influxdb_client/domain/builder_functions_type.py b/frogpilot/third_party/influxdb_client/domain/builder_functions_type.py deleted file mode 100644 index 4ebf44ea9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/builder_functions_type.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BuilderFunctionsType(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' - } - - attribute_map = { - 'name': 'name' - } - - def __init__(self, name=None): # noqa: E501,D401,D403 - """BuilderFunctionsType - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self.discriminator = None - - if name is not None: - self.name = name - - @property - def name(self): - """Get the name of this BuilderFunctionsType. - - :return: The name of this BuilderFunctionsType. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this BuilderFunctionsType. - - :param name: The name of this BuilderFunctionsType. - :type: str - """ # noqa: E501 - self._name = name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BuilderFunctionsType): - 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/frogpilot/third_party/influxdb_client/domain/builder_tags_type.py b/frogpilot/third_party/influxdb_client/domain/builder_tags_type.py deleted file mode 100644 index fcf7e05e1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/builder_tags_type.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class BuilderTagsType(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 = { - 'key': 'str', - 'values': 'list[str]', - 'aggregate_function_type': 'BuilderAggregateFunctionType' - } - - attribute_map = { - 'key': 'key', - 'values': 'values', - 'aggregate_function_type': 'aggregateFunctionType' - } - - 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): - """Get the key of this BuilderTagsType. - - :return: The key of this BuilderTagsType. - :rtype: str - """ # noqa: E501 - return self._key - - @key.setter - def key(self, key): - """Set the key of this BuilderTagsType. - - :param key: The key of this BuilderTagsType. - :type: str - """ # noqa: E501 - self._key = key - - @property - def values(self): - """Get the values of this BuilderTagsType. - - :return: The values of this BuilderTagsType. - :rtype: list[str] - """ # noqa: E501 - return self._values - - @values.setter - def values(self, values): - """Set the values of this BuilderTagsType. - - :param values: The values of this BuilderTagsType. - :type: list[str] - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, BuilderTagsType): - 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/frogpilot/third_party/influxdb_client/domain/builtin_statement.py b/frogpilot/third_party/influxdb_client/domain/builtin_statement.py deleted file mode 100644 index 51f24a317..000000000 --- a/frogpilot/third_party/influxdb_client/domain/builtin_statement.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class BuiltinStatement(Statement): - """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': 'Identifier' - } - - attribute_map = { - 'type': 'type', - 'id': 'id' - } - - 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 - - if type is not None: - self.type = type - if id is not None: - self.id = id - - @property - def type(self): - """Get the type of this BuiltinStatement. - - Type of AST node - - :return: The type of this BuiltinStatement. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this BuiltinStatement. - - Type of AST node - - :param type: The type of this BuiltinStatement. - :type: str - """ # noqa: E501 - self._type = type - - @property - def id(self): - """Get the id of this BuiltinStatement. - - :return: The id of this BuiltinStatement. - :rtype: Identifier - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this BuiltinStatement. - - :param id: The id of this BuiltinStatement. - :type: Identifier - """ # noqa: E501 - self._id = id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, BuiltinStatement): - 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/frogpilot/third_party/influxdb_client/domain/call_expression.py b/frogpilot/third_party/influxdb_client/domain/call_expression.py deleted file mode 100644 index 922b705d2..000000000 --- a/frogpilot/third_party/influxdb_client/domain/call_expression.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class CallExpression(Expression): - """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', - 'callee': 'Expression', - 'arguments': 'list[Expression]' - } - - attribute_map = { - 'type': 'type', - 'callee': 'callee', - 'arguments': 'arguments' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if callee is not None: - self.callee = callee - if arguments is not None: - self.arguments = arguments - - @property - def type(self): - """Get the type of this CallExpression. - - Type of AST node - - :return: The type of this CallExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this CallExpression. - - Type of AST node - - :param type: The type of this CallExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def callee(self): - """Get the callee of this CallExpression. - - :return: The callee of this CallExpression. - :rtype: Expression - """ # noqa: E501 - return self._callee - - @callee.setter - def callee(self, callee): - """Set the callee of this CallExpression. - - :param callee: The callee of this CallExpression. - :type: Expression - """ # noqa: E501 - self._callee = callee - - @property - def arguments(self): - """Get the arguments of this CallExpression. - - Function arguments - - :return: The arguments of this CallExpression. - :rtype: list[Expression] - """ # noqa: E501 - return self._arguments - - @arguments.setter - def arguments(self, arguments): - """Set the arguments of this CallExpression. - - Function arguments - - :param arguments: The arguments of this CallExpression. - :type: list[Expression] - """ # noqa: E501 - self._arguments = arguments - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CallExpression): - 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/frogpilot/third_party/influxdb_client/domain/cell.py b/frogpilot/third_party/influxdb_client/domain/cell.py deleted file mode 100644 index d52d9476f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/cell.py +++ /dev/null @@ -1,249 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Cell(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', - 'links': 'CellLinks', - 'x': 'int', - 'y': 'int', - 'w': 'int', - 'h': 'int', - 'view_id': 'str' - } - - attribute_map = { - 'id': 'id', - 'links': 'links', - 'x': 'x', - 'y': 'y', - 'w': 'w', - 'h': 'h', - 'view_id': 'viewID' - } - - def __init__(self, id=None, links=None, x=None, y=None, w=None, h=None, view_id=None): # noqa: E501,D401,D403 - """Cell - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._links = None - self._x = None - self._y = None - self._w = None - self._h = None - self._view_id = None - self.discriminator = None - - if id is not None: - self.id = id - if links is not None: - self.links = links - if x is not None: - self.x = x - if y is not None: - self.y = y - if w is not None: - self.w = w - if h is not None: - self.h = h - if view_id is not None: - self.view_id = view_id - - @property - def id(self): - """Get the id of this Cell. - - :return: The id of this Cell. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Cell. - - :param id: The id of this Cell. - :type: str - """ # noqa: E501 - self._id = id - - @property - def links(self): - """Get the links of this Cell. - - :return: The links of this Cell. - :rtype: CellLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Cell. - - :param links: The links of this Cell. - :type: CellLinks - """ # noqa: E501 - self._links = links - - @property - def x(self): - """Get the x of this Cell. - - :return: The x of this Cell. - :rtype: int - """ # noqa: E501 - return self._x - - @x.setter - def x(self, x): - """Set the x of this Cell. - - :param x: The x of this Cell. - :type: int - """ # noqa: E501 - self._x = x - - @property - def y(self): - """Get the y of this Cell. - - :return: The y of this Cell. - :rtype: int - """ # noqa: E501 - return self._y - - @y.setter - def y(self, y): - """Set the y of this Cell. - - :param y: The y of this Cell. - :type: int - """ # noqa: E501 - self._y = y - - @property - def w(self): - """Get the w of this Cell. - - :return: The w of this Cell. - :rtype: int - """ # noqa: E501 - return self._w - - @w.setter - def w(self, w): - """Set the w of this Cell. - - :param w: The w of this Cell. - :type: int - """ # noqa: E501 - self._w = w - - @property - def h(self): - """Get the h of this Cell. - - :return: The h of this Cell. - :rtype: int - """ # noqa: E501 - return self._h - - @h.setter - def h(self, h): - """Set the h of this Cell. - - :param h: The h of this Cell. - :type: int - """ # noqa: E501 - self._h = h - - @property - def view_id(self): - """Get the view_id of this Cell. - - The reference to a view from the views API. - - :return: The view_id of this Cell. - :rtype: str - """ # noqa: E501 - return self._view_id - - @view_id.setter - def view_id(self, view_id): - """Set the view_id of this Cell. - - The reference to a view from the views API. - - :param view_id: The view_id of this Cell. - :type: str - """ # noqa: E501 - self._view_id = view_id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Cell): - 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/frogpilot/third_party/influxdb_client/domain/cell_links.py b/frogpilot/third_party/influxdb_client/domain/cell_links.py deleted file mode 100644 index fc556c728..000000000 --- a/frogpilot/third_party/influxdb_client/domain/cell_links.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CellLinks(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 = { - '_self': 'str', - 'view': 'str' - } - - attribute_map = { - '_self': 'self', - 'view': 'view' - } - - def __init__(self, _self=None, view=None): # noqa: E501,D401,D403 - """CellLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._view = None - self.discriminator = None - - if _self is not None: - self._self = _self - if view is not None: - self.view = view - - @property - def _self(self): - """Get the _self of this CellLinks. - - :return: The _self of this CellLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this CellLinks. - - :param _self: The _self of this CellLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def view(self): - """Get the view of this CellLinks. - - :return: The view of this CellLinks. - :rtype: str - """ # noqa: E501 - return self._view - - @view.setter - def view(self, view): - """Set the view of this CellLinks. - - :param view: The view of this CellLinks. - :type: str - """ # noqa: E501 - self._view = view - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CellLinks): - 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/frogpilot/third_party/influxdb_client/domain/cell_update.py b/frogpilot/third_party/influxdb_client/domain/cell_update.py deleted file mode 100644 index d58c62577..000000000 --- a/frogpilot/third_party/influxdb_client/domain/cell_update.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CellUpdate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'x': 'int', - 'y': 'int', - 'w': 'int', - 'h': 'int' - } - - attribute_map = { - 'x': 'x', - 'y': 'y', - 'w': 'w', - 'h': 'h' - } - - def __init__(self, x=None, y=None, w=None, h=None): # noqa: E501,D401,D403 - """CellUpdate - a model defined in OpenAPI.""" # noqa: E501 - self._x = None - self._y = None - self._w = None - self._h = None - self.discriminator = None - - if x is not None: - self.x = x - if y is not None: - self.y = y - if w is not None: - self.w = w - if h is not None: - self.h = h - - @property - def x(self): - """Get the x of this CellUpdate. - - :return: The x of this CellUpdate. - :rtype: int - """ # noqa: E501 - return self._x - - @x.setter - def x(self, x): - """Set the x of this CellUpdate. - - :param x: The x of this CellUpdate. - :type: int - """ # noqa: E501 - self._x = x - - @property - def y(self): - """Get the y of this CellUpdate. - - :return: The y of this CellUpdate. - :rtype: int - """ # noqa: E501 - return self._y - - @y.setter - def y(self, y): - """Set the y of this CellUpdate. - - :param y: The y of this CellUpdate. - :type: int - """ # noqa: E501 - self._y = y - - @property - def w(self): - """Get the w of this CellUpdate. - - :return: The w of this CellUpdate. - :rtype: int - """ # noqa: E501 - return self._w - - @w.setter - def w(self, w): - """Set the w of this CellUpdate. - - :param w: The w of this CellUpdate. - :type: int - """ # noqa: E501 - self._w = w - - @property - def h(self): - """Get the h of this CellUpdate. - - :return: The h of this CellUpdate. - :rtype: int - """ # noqa: E501 - return self._h - - @h.setter - def h(self, h): - """Set the h of this CellUpdate. - - :param h: The h of this CellUpdate. - :type: int - """ # noqa: E501 - self._h = h - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CellUpdate): - 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/frogpilot/third_party/influxdb_client/domain/cell_with_view_properties.py b/frogpilot/third_party/influxdb_client/domain/cell_with_view_properties.py deleted file mode 100644 index 4379cd11c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/cell_with_view_properties.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/check.py b/frogpilot/third_party/influxdb_client/domain/check.py deleted file mode 100644 index c85e4a558..000000000 --- a/frogpilot/third_party/influxdb_client/domain/check.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Check(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' - } - - attribute_map = { - 'type': 'type' - } - - 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 - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Check): - 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/frogpilot/third_party/influxdb_client/domain/check_base.py b/frogpilot/third_party/influxdb_client/domain/check_base.py deleted file mode 100644 index b54921a10..000000000 --- a/frogpilot/third_party/influxdb_client/domain/check_base.py +++ /dev/null @@ -1,452 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CheckBase(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - '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' - } - - 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 - 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._description = None - self._latest_completed = None - self._last_run_status = None - self._last_run_error = None - self._labels = None - self._links = None - self.discriminator = None - - if id is not None: - 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: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - self.query = query - if status is not None: - self.status = status - if description is not None: - self.description = description - 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: - self.links = links - - @property - def id(self): - """Get the id of this CheckBase. - - :return: The id of this CheckBase. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this CheckBase. - - :param id: The id of this CheckBase. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this CheckBase. - - :return: The name of this CheckBase. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this CheckBase. - - :param name: The name of this CheckBase. - :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 org_id(self): - """Get the org_id of this CheckBase. - - The ID of the organization that owns this check. - - :return: The org_id of this CheckBase. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this CheckBase. - - The ID of the organization that owns this check. - - :param org_id: The org_id of this CheckBase. - :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 - 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. - - The ID of creator used to create this check. - - :return: The owner_id of this CheckBase. - :rtype: str - """ # noqa: E501 - return self._owner_id - - @owner_id.setter - def owner_id(self, owner_id): - """Set the owner_id of this CheckBase. - - The ID of creator used to create this check. - - :param owner_id: The owner_id of this CheckBase. - :type: str - """ # noqa: E501 - self._owner_id = owner_id - - @property - def created_at(self): - """Get the created_at of this CheckBase. - - :return: The created_at of this CheckBase. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this CheckBase. - - :param created_at: The created_at of this CheckBase. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this CheckBase. - - :return: The updated_at of this CheckBase. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this CheckBase. - - :param updated_at: The updated_at of this CheckBase. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - @property - def query(self): - """Get the query of this CheckBase. - - :return: The query of this CheckBase. - :rtype: DashboardQuery - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this CheckBase. - - :param query: The query of this CheckBase. - :type: DashboardQuery - """ # noqa: E501 - if query is None: - raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501 - self._query = query - - @property - def status(self): - """Get the status of this CheckBase. - - :return: The status of this CheckBase. - :rtype: TaskStatusType - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this CheckBase. - - :param status: The status of this CheckBase. - :type: TaskStatusType - """ # noqa: E501 - self._status = status - - @property - def description(self): - """Get the description of this CheckBase. - - An optional description of the check. - - :return: The description of this CheckBase. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this CheckBase. - - An optional description of the check. - - :param description: The description of this CheckBase. - :type: str - """ # noqa: E501 - self._description = description - - @property - def latest_completed(self): - """Get the latest_completed of this CheckBase. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. - - :return: The latest_completed of this CheckBase. - :rtype: datetime - """ # noqa: E501 - return self._latest_completed - - @latest_completed.setter - def latest_completed(self, latest_completed): - """Set the latest_completed of this CheckBase. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. - - :param latest_completed: The latest_completed of this CheckBase. - :type: datetime - """ # noqa: E501 - self._latest_completed = latest_completed - - @property - def last_run_status(self): - """Get the last_run_status of this CheckBase. - - :return: The last_run_status of this CheckBase. - :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 CheckBase. - - :param last_run_status: The last_run_status of this CheckBase. - :type: str - """ # noqa: E501 - self._last_run_status = last_run_status - - @property - def last_run_error(self): - """Get the last_run_error of this CheckBase. - - :return: The last_run_error of this CheckBase. - :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 CheckBase. - - :param last_run_error: The last_run_error of this CheckBase. - :type: str - """ # noqa: E501 - self._last_run_error = last_run_error - - @property - def labels(self): - """Get the labels of this CheckBase. - - :return: The labels of this CheckBase. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this CheckBase. - - :param labels: The labels of this CheckBase. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - @property - def links(self): - """Get the links of this CheckBase. - - :return: The links of this CheckBase. - :rtype: CheckBaseLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this CheckBase. - - :param links: The links of this CheckBase. - :type: CheckBaseLinks - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CheckBase): - 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/frogpilot/third_party/influxdb_client/domain/check_base_links.py b/frogpilot/third_party/influxdb_client/domain/check_base_links.py deleted file mode 100644 index 19c28aa45..000000000 --- a/frogpilot/third_party/influxdb_client/domain/check_base_links.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CheckBaseLinks(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 = { - '_self': 'str', - 'labels': 'str', - 'members': 'str', - 'owners': 'str', - 'query': 'str' - } - - attribute_map = { - '_self': 'self', - 'labels': 'labels', - 'members': 'members', - 'owners': 'owners', - 'query': 'query' - } - - 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: - self._self = _self - if labels is not None: - self.labels = labels - if members is not None: - self.members = members - if owners is not None: - self.owners = owners - if query is not None: - self.query = query - - @property - def _self(self): - """Get the _self of this CheckBaseLinks. - - URI of resource. - - :return: The _self of this CheckBaseLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this CheckBaseLinks. - - URI of resource. - - :param _self: The _self of this CheckBaseLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def labels(self): - """Get the labels of this CheckBaseLinks. - - URI of resource. - - :return: The labels of this CheckBaseLinks. - :rtype: str - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this CheckBaseLinks. - - URI of resource. - - :param labels: The labels of this CheckBaseLinks. - :type: str - """ # noqa: E501 - self._labels = labels - - @property - def members(self): - """Get the members of this CheckBaseLinks. - - URI of resource. - - :return: The members of this CheckBaseLinks. - :rtype: str - """ # noqa: E501 - return self._members - - @members.setter - def members(self, members): - """Set the members of this CheckBaseLinks. - - URI of resource. - - :param members: The members of this CheckBaseLinks. - :type: str - """ # noqa: E501 - self._members = members - - @property - def owners(self): - """Get the owners of this CheckBaseLinks. - - URI of resource. - - :return: The owners of this CheckBaseLinks. - :rtype: str - """ # noqa: E501 - return self._owners - - @owners.setter - def owners(self, owners): - """Set the owners of this CheckBaseLinks. - - URI of resource. - - :param owners: The owners of this CheckBaseLinks. - :type: str - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, CheckBaseLinks): - 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/frogpilot/third_party/influxdb_client/domain/check_discriminator.py b/frogpilot/third_party/influxdb_client/domain/check_discriminator.py deleted file mode 100644 index c2ebfea88..000000000 --- a/frogpilot/third_party/influxdb_client/domain/check_discriminator.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.check_base import CheckBase - - -class CheckDiscriminator(CheckBase): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - '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' - } - - 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 - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CheckDiscriminator): - 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/frogpilot/third_party/influxdb_client/domain/check_patch.py b/frogpilot/third_party/influxdb_client/domain/check_patch.py deleted file mode 100644 index 014e910b3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/check_patch.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CheckPatch(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', - 'status': 'str' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'status': 'status' - } - - def __init__(self, name=None, description=None, status=None): # noqa: E501,D401,D403 - """CheckPatch - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._status = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if status is not None: - self.status = status - - @property - def name(self): - """Get the name of this CheckPatch. - - :return: The name of this CheckPatch. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this CheckPatch. - - :param name: The name of this CheckPatch. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this CheckPatch. - - :return: The description of this CheckPatch. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this CheckPatch. - - :param description: The description of this CheckPatch. - :type: str - """ # noqa: E501 - self._description = description - - @property - def status(self): - """Get the status of this CheckPatch. - - :return: The status of this CheckPatch. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this CheckPatch. - - :param status: The status of this CheckPatch. - :type: str - """ # noqa: E501 - self._status = status - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CheckPatch): - 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/frogpilot/third_party/influxdb_client/domain/check_status_level.py b/frogpilot/third_party/influxdb_client/domain/check_status_level.py deleted file mode 100644 index 476f2b568..000000000 --- a/frogpilot/third_party/influxdb_client/domain/check_status_level.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CheckStatusLevel(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - UNKNOWN = "UNKNOWN" - OK = "OK" - INFO = "INFO" - CRIT = "CRIT" - WARN = "WARN" - - """ - 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 - """CheckStatusLevel - 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 self.openapi_types.items(): - 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, CheckStatusLevel): - 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/frogpilot/third_party/influxdb_client/domain/check_view_properties.py b/frogpilot/third_party/influxdb_client/domain/check_view_properties.py deleted file mode 100644 index 5226c490c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/check_view_properties.py +++ /dev/null @@ -1,350 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class CheckViewProperties(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 = { - 'adaptive_zoom_hide': 'bool', - 'type': 'str', - 'shape': 'str', - 'check_id': 'str', - 'check': 'Check', - 'queries': 'list[DashboardQuery]', - 'colors': 'list[DashboardColor]', - 'legend_colorize_rows': 'bool', - 'legend_hide': 'bool', - 'legend_opacity': 'float', - 'legend_orientation_threshold': 'int' - } - - attribute_map = { - 'adaptive_zoom_hide': 'adaptiveZoomHide', - 'type': 'type', - 'shape': 'shape', - 'check_id': 'checkID', - 'check': 'check', - 'queries': 'queries', - 'colors': 'colors', - 'legend_colorize_rows': 'legendColorizeRows', - 'legend_hide': 'legendHide', - 'legend_opacity': 'legendOpacity', - 'legend_orientation_threshold': 'legendOrientationThreshold' - } - - def __init__(self, adaptive_zoom_hide=None, 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 - - self._adaptive_zoom_hide = None - self._type = None - self._shape = None - self._check_id = None - 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 - - if adaptive_zoom_hide is not None: - self.adaptive_zoom_hide = adaptive_zoom_hide - self.type = type - self.shape = shape - self.check_id = check_id - if check is not None: - 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 adaptive_zoom_hide(self): - """Get the adaptive_zoom_hide of this CheckViewProperties. - - :return: The adaptive_zoom_hide of this CheckViewProperties. - :rtype: bool - """ # noqa: E501 - return self._adaptive_zoom_hide - - @adaptive_zoom_hide.setter - def adaptive_zoom_hide(self, adaptive_zoom_hide): - """Set the adaptive_zoom_hide of this CheckViewProperties. - - :param adaptive_zoom_hide: The adaptive_zoom_hide of this CheckViewProperties. - :type: bool - """ # noqa: E501 - self._adaptive_zoom_hide = adaptive_zoom_hide - - @property - def type(self): - """Get the type of this CheckViewProperties. - - :return: The type of this CheckViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this CheckViewProperties. - - :param type: The type of this CheckViewProperties. - :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 shape(self): - """Get the shape of this CheckViewProperties. - - :return: The shape of this CheckViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this CheckViewProperties. - - :param shape: The shape of this CheckViewProperties. - :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 check_id(self): - """Get the check_id of this CheckViewProperties. - - :return: The check_id of this CheckViewProperties. - :rtype: str - """ # noqa: E501 - return self._check_id - - @check_id.setter - def check_id(self, check_id): - """Set the check_id of this CheckViewProperties. - - :param check_id: The check_id of this CheckViewProperties. - :type: str - """ # noqa: E501 - if check_id is None: - raise ValueError("Invalid value for `check_id`, must not be `None`") # noqa: E501 - self._check_id = check_id - - @property - def check(self): - """Get the check of this CheckViewProperties. - - :return: The check of this CheckViewProperties. - :rtype: Check - """ # noqa: E501 - return self._check - - @check.setter - def check(self, check): - """Set the check of this CheckViewProperties. - - :param check: The check of this CheckViewProperties. - :type: Check - """ # noqa: E501 - self._check = check - - @property - def queries(self): - """Get the queries of this CheckViewProperties. - - :return: The queries of this CheckViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this CheckViewProperties. - - :param queries: The queries of this CheckViewProperties. - :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 CheckViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this CheckViewProperties. - :rtype: list[DashboardColor] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this CheckViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this CheckViewProperties. - :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 = {} - - for attr, _ in self.openapi_types.items(): - 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, CheckViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/checks.py b/frogpilot/third_party/influxdb_client/domain/checks.py deleted file mode 100644 index 05083fcc4..000000000 --- a/frogpilot/third_party/influxdb_client/domain/checks.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Checks(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 = { - 'checks': 'list[Check]', - 'links': 'Links' - } - - attribute_map = { - 'checks': 'checks', - 'links': 'links' - } - - def __init__(self, checks=None, links=None): # noqa: E501,D401,D403 - """Checks - a model defined in OpenAPI.""" # noqa: E501 - self._checks = None - self._links = None - self.discriminator = None - - if checks is not None: - self.checks = checks - if links is not None: - self.links = links - - @property - def checks(self): - """Get the checks of this Checks. - - :return: The checks of this Checks. - :rtype: list[Check] - """ # noqa: E501 - return self._checks - - @checks.setter - def checks(self, checks): - """Set the checks of this Checks. - - :param checks: The checks of this Checks. - :type: list[Check] - """ # noqa: E501 - self._checks = checks - - @property - def links(self): - """Get the links of this Checks. - - :return: The links of this Checks. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Checks. - - :param links: The links of this Checks. - :type: Links - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Checks): - 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/frogpilot/third_party/influxdb_client/domain/column_data_type.py b/frogpilot/third_party/influxdb_client/domain/column_data_type.py deleted file mode 100644 index e2a2f2c32..000000000 --- a/frogpilot/third_party/influxdb_client/domain/column_data_type.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ColumnDataType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - INTEGER = "integer" - FLOAT = "float" - BOOLEAN = "boolean" - STRING = "string" - UNSIGNED = "unsigned" - - """ - 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 - """ColumnDataType - 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 self.openapi_types.items(): - 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, ColumnDataType): - 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/frogpilot/third_party/influxdb_client/domain/column_semantic_type.py b/frogpilot/third_party/influxdb_client/domain/column_semantic_type.py deleted file mode 100644 index 3f88a1337..000000000 --- a/frogpilot/third_party/influxdb_client/domain/column_semantic_type.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ColumnSemanticType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - TIMESTAMP = "timestamp" - TAG = "tag" - FIELD = "field" - - """ - 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 - """ColumnSemanticType - 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 self.openapi_types.items(): - 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, ColumnSemanticType): - 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/frogpilot/third_party/influxdb_client/domain/conditional_expression.py b/frogpilot/third_party/influxdb_client/domain/conditional_expression.py deleted file mode 100644 index da5af4339..000000000 --- a/frogpilot/third_party/influxdb_client/domain/conditional_expression.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class ConditionalExpression(Expression): - """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', - 'test': 'Expression', - 'alternate': 'Expression', - 'consequent': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'test': 'test', - 'alternate': 'alternate', - 'consequent': 'consequent' - } - - 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 - self._consequent = None - self.discriminator = None - - if type is not None: - self.type = type - if test is not None: - self.test = test - if alternate is not None: - self.alternate = alternate - if consequent is not None: - self.consequent = consequent - - @property - def type(self): - """Get the type of this ConditionalExpression. - - Type of AST node - - :return: The type of this ConditionalExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ConditionalExpression. - - Type of AST node - - :param type: The type of this ConditionalExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def test(self): - """Get the test of this ConditionalExpression. - - :return: The test of this ConditionalExpression. - :rtype: Expression - """ # noqa: E501 - return self._test - - @test.setter - def test(self, test): - """Set the test of this ConditionalExpression. - - :param test: The test of this ConditionalExpression. - :type: Expression - """ # noqa: E501 - self._test = test - - @property - def alternate(self): - """Get the alternate of this ConditionalExpression. - - :return: The alternate of this ConditionalExpression. - :rtype: Expression - """ # noqa: E501 - return self._alternate - - @alternate.setter - def alternate(self, alternate): - """Set the alternate of this ConditionalExpression. - - :param alternate: The alternate of this ConditionalExpression. - :type: Expression - """ # noqa: E501 - self._alternate = alternate - - @property - def consequent(self): - """Get the consequent of this ConditionalExpression. - - :return: The consequent of this ConditionalExpression. - :rtype: Expression - """ # noqa: E501 - return self._consequent - - @consequent.setter - def consequent(self, consequent): - """Set the consequent of this ConditionalExpression. - - :param consequent: The consequent of this ConditionalExpression. - :type: Expression - """ # noqa: E501 - self._consequent = consequent - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ConditionalExpression): - 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/frogpilot/third_party/influxdb_client/domain/config.py b/frogpilot/third_party/influxdb_client/domain/config.py deleted file mode 100644 index cc4a03381..000000000 --- a/frogpilot/third_party/influxdb_client/domain/config.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Config(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 = { - 'config': 'dict(str, object)' - } - - attribute_map = { - 'config': 'config' - } - - def __init__(self, config=None): # noqa: E501,D401,D403 - """Config - a model defined in OpenAPI.""" # noqa: E501 - self._config = None - self.discriminator = None - - if config is not None: - self.config = config - - @property - def config(self): - """Get the config of this Config. - - :return: The config of this Config. - :rtype: dict(str, object) - """ # noqa: E501 - return self._config - - @config.setter - def config(self, config): - """Set the config of this Config. - - :param config: The config of this Config. - :type: dict(str, object) - """ # noqa: E501 - self._config = config - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Config): - 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/frogpilot/third_party/influxdb_client/domain/constant_variable_properties.py b/frogpilot/third_party/influxdb_client/domain/constant_variable_properties.py deleted file mode 100644 index 806045e89..000000000 --- a/frogpilot/third_party/influxdb_client/domain/constant_variable_properties.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.variable_properties import VariableProperties - - -class ConstantVariableProperties(VariableProperties): - """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', - 'values': 'list[str]' - } - - attribute_map = { - 'type': 'type', - 'values': 'values' - } - - 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 - - if type is not None: - self.type = type - if values is not None: - self.values = values - - @property - def type(self): - """Get the type of this ConstantVariableProperties. - - :return: The type of this ConstantVariableProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ConstantVariableProperties. - - :param type: The type of this ConstantVariableProperties. - :type: str - """ # noqa: E501 - self._type = type - - @property - def values(self): - """Get the values of this ConstantVariableProperties. - - :return: The values of this ConstantVariableProperties. - :rtype: list[str] - """ # noqa: E501 - return self._values - - @values.setter - def values(self, values): - """Set the values of this ConstantVariableProperties. - - :param values: The values of this ConstantVariableProperties. - :type: list[str] - """ # noqa: E501 - self._values = values - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ConstantVariableProperties): - 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/frogpilot/third_party/influxdb_client/domain/create_cell.py b/frogpilot/third_party/influxdb_client/domain/create_cell.py deleted file mode 100644 index 1251c2f10..000000000 --- a/frogpilot/third_party/influxdb_client/domain/create_cell.py +++ /dev/null @@ -1,226 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CreateCell(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', - 'x': 'int', - 'y': 'int', - 'w': 'int', - 'h': 'int', - 'using_view': 'str' - } - - attribute_map = { - 'name': 'name', - 'x': 'x', - 'y': 'y', - 'w': 'w', - 'h': 'h', - 'using_view': 'usingView' - } - - def __init__(self, name=None, x=None, y=None, w=None, h=None, using_view=None): # noqa: E501,D401,D403 - """CreateCell - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._x = None - self._y = None - self._w = None - self._h = None - self._using_view = None - self.discriminator = None - - if name is not None: - self.name = name - if x is not None: - self.x = x - if y is not None: - self.y = y - if w is not None: - self.w = w - if h is not None: - self.h = h - if using_view is not None: - self.using_view = using_view - - @property - def name(self): - """Get the name of this CreateCell. - - :return: The name of this CreateCell. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this CreateCell. - - :param name: The name of this CreateCell. - :type: str - """ # noqa: E501 - self._name = name - - @property - def x(self): - """Get the x of this CreateCell. - - :return: The x of this CreateCell. - :rtype: int - """ # noqa: E501 - return self._x - - @x.setter - def x(self, x): - """Set the x of this CreateCell. - - :param x: The x of this CreateCell. - :type: int - """ # noqa: E501 - self._x = x - - @property - def y(self): - """Get the y of this CreateCell. - - :return: The y of this CreateCell. - :rtype: int - """ # noqa: E501 - return self._y - - @y.setter - def y(self, y): - """Set the y of this CreateCell. - - :param y: The y of this CreateCell. - :type: int - """ # noqa: E501 - self._y = y - - @property - def w(self): - """Get the w of this CreateCell. - - :return: The w of this CreateCell. - :rtype: int - """ # noqa: E501 - return self._w - - @w.setter - def w(self, w): - """Set the w of this CreateCell. - - :param w: The w of this CreateCell. - :type: int - """ # noqa: E501 - self._w = w - - @property - def h(self): - """Get the h of this CreateCell. - - :return: The h of this CreateCell. - :rtype: int - """ # noqa: E501 - return self._h - - @h.setter - def h(self, h): - """Set the h of this CreateCell. - - :param h: The h of this CreateCell. - :type: int - """ # noqa: E501 - self._h = h - - @property - def using_view(self): - """Get the using_view of this CreateCell. - - Makes a copy of the provided view. - - :return: The using_view of this CreateCell. - :rtype: str - """ # noqa: E501 - return self._using_view - - @using_view.setter - def using_view(self, using_view): - """Set the using_view of this CreateCell. - - Makes a copy of the provided view. - - :param using_view: The using_view of this CreateCell. - :type: str - """ # noqa: E501 - self._using_view = using_view - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CreateCell): - 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/frogpilot/third_party/influxdb_client/domain/create_dashboard_request.py b/frogpilot/third_party/influxdb_client/domain/create_dashboard_request.py deleted file mode 100644 index e5de81ee8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/create_dashboard_request.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class CreateDashboardRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'org_id': 'str', - 'name': 'str', - 'description': 'str' - } - - attribute_map = { - 'org_id': 'orgID', - 'name': 'name', - 'description': 'description' - } - - def __init__(self, org_id=None, name=None, description=None): # noqa: E501,D401,D403 - """CreateDashboardRequest - a model defined in OpenAPI.""" # noqa: E501 - self._org_id = None - self._name = None - self._description = None - self.discriminator = None - - self.org_id = org_id - self.name = name - if description is not None: - self.description = description - - @property - def org_id(self): - """Get the org_id of this CreateDashboardRequest. - - The ID of the organization that owns the dashboard. - - :return: The org_id of this CreateDashboardRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this CreateDashboardRequest. - - The ID of the organization that owns the dashboard. - - :param org_id: The org_id of this CreateDashboardRequest. - :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 - def name(self): - """Get the name of this CreateDashboardRequest. - - The user-facing name of the dashboard. - - :return: The name of this CreateDashboardRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this CreateDashboardRequest. - - The user-facing name of the dashboard. - - :param name: The name of this CreateDashboardRequest. - :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 CreateDashboardRequest. - - The user-facing description of the dashboard. - - :return: The description of this CreateDashboardRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this CreateDashboardRequest. - - The user-facing description of the dashboard. - - :param description: The description of this CreateDashboardRequest. - :type: str - """ # noqa: E501 - self._description = description - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, CreateDashboardRequest): - 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/frogpilot/third_party/influxdb_client/domain/custom_check.py b/frogpilot/third_party/influxdb_client/domain/custom_check.py deleted file mode 100644 index 88c0180de..000000000 --- a/frogpilot/third_party/influxdb_client/domain/custom_check.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/dashboard.py b/frogpilot/third_party/influxdb_client/domain/dashboard.py deleted file mode 100644 index 4b4e47e9d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dashboard.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.create_dashboard_request import CreateDashboardRequest - - -class Dashboard(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[Cell]', - '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 - """Dashboard - 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 Dashboard. - - :return: The links of this Dashboard. - :rtype: object - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Dashboard. - - :param links: The links of this Dashboard. - :type: object - """ # noqa: E501 - self._links = links - - @property - def id(self): - """Get the id of this Dashboard. - - :return: The id of this Dashboard. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Dashboard. - - :param id: The id of this Dashboard. - :type: str - """ # noqa: E501 - self._id = id - - @property - def meta(self): - """Get the meta of this Dashboard. - - :return: The meta of this Dashboard. - :rtype: object - """ # noqa: E501 - return self._meta - - @meta.setter - def meta(self, meta): - """Set the meta of this Dashboard. - - :param meta: The meta of this Dashboard. - :type: object - """ # noqa: E501 - self._meta = meta - - @property - def cells(self): - """Get the cells of this Dashboard. - - :return: The cells of this Dashboard. - :rtype: list[Cell] - """ # noqa: E501 - return self._cells - - @cells.setter - def cells(self, cells): - """Set the cells of this Dashboard. - - :param cells: The cells of this Dashboard. - :type: list[Cell] - """ # noqa: E501 - self._cells = cells - - @property - def labels(self): - """Get the labels of this Dashboard. - - :return: The labels of this Dashboard. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this Dashboard. - - :param labels: The labels of this Dashboard. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Dashboard): - 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/frogpilot/third_party/influxdb_client/domain/dashboard_color.py b/frogpilot/third_party/influxdb_client/domain/dashboard_color.py deleted file mode 100644 index b03a4e2fe..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dashboard_color.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DashboardColor(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', - 'type': 'str', - 'hex': 'str', - 'name': 'str', - 'value': 'float' - } - - attribute_map = { - 'id': 'id', - 'type': 'type', - 'hex': 'hex', - 'name': 'name', - 'value': 'value' - } - - def __init__(self, id=None, type=None, hex=None, name=None, value=None): # noqa: E501,D401,D403 - """DashboardColor - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._type = None - self._hex = None - self._name = None - self._value = None - self.discriminator = None - - self.id = id - self.type = type - self.hex = hex - self.name = name - self.value = value - - @property - def id(self): - """Get the id of this DashboardColor. - - The unique ID of the view color. - - :return: The id of this DashboardColor. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this DashboardColor. - - The unique ID of the view color. - - :param id: The id of this DashboardColor. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def type(self): - """Get the type of this DashboardColor. - - Type is how the color is used. - - :return: The type of this DashboardColor. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this DashboardColor. - - Type is how the color is used. - - :param type: The type of this DashboardColor. - :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 hex(self): - """Get the hex of this DashboardColor. - - The hex number of the color - - :return: The hex of this DashboardColor. - :rtype: str - """ # noqa: E501 - return self._hex - - @hex.setter - def hex(self, hex): - """Set the hex of this DashboardColor. - - The hex number of the color - - :param hex: The hex of this DashboardColor. - :type: str - """ # noqa: E501 - if hex is None: - raise ValueError("Invalid value for `hex`, must not be `None`") # noqa: E501 - if hex is not None and len(hex) > 7: - raise ValueError("Invalid value for `hex`, length must be less than or equal to `7`") # noqa: E501 - if hex is not None and len(hex) < 7: - raise ValueError("Invalid value for `hex`, length must be greater than or equal to `7`") # noqa: E501 - self._hex = hex - - @property - def name(self): - """Get the name of this DashboardColor. - - The user-facing name of the hex color. - - :return: The name of this DashboardColor. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this DashboardColor. - - The user-facing name of the hex color. - - :param name: The name of this DashboardColor. - :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 value(self): - """Get the value of this DashboardColor. - - The data value mapped to this color. - - :return: The value of this DashboardColor. - :rtype: float - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this DashboardColor. - - The data value mapped to this color. - - :param value: The value of this DashboardColor. - :type: float - """ # noqa: E501 - if value is None: - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DashboardColor): - 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/frogpilot/third_party/influxdb_client/domain/dashboard_query.py b/frogpilot/third_party/influxdb_client/domain/dashboard_query.py deleted file mode 100644 index e23c61f7a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dashboard_query.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DashboardQuery(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 = { - 'text': 'str', - 'edit_mode': 'QueryEditMode', - 'name': 'str', - 'builder_config': 'BuilderConfig' - } - - attribute_map = { - 'text': 'text', - 'edit_mode': 'editMode', - 'name': 'name', - 'builder_config': 'builderConfig' - } - - def __init__(self, text=None, edit_mode=None, name=None, builder_config=None): # noqa: E501,D401,D403 - """DashboardQuery - a model defined in OpenAPI.""" # noqa: E501 - self._text = None - self._edit_mode = None - self._name = None - self._builder_config = None - self.discriminator = None - - if text is not None: - self.text = text - if edit_mode is not None: - self.edit_mode = edit_mode - if name is not None: - self.name = name - if builder_config is not None: - self.builder_config = builder_config - - @property - def text(self): - """Get the text of this DashboardQuery. - - The text of the Flux query. - - :return: The text of this DashboardQuery. - :rtype: str - """ # noqa: E501 - return self._text - - @text.setter - def text(self, text): - """Set the text of this DashboardQuery. - - The text of the Flux query. - - :param text: The text of this DashboardQuery. - :type: str - """ # noqa: E501 - self._text = text - - @property - def edit_mode(self): - """Get the edit_mode of this DashboardQuery. - - :return: The edit_mode of this DashboardQuery. - :rtype: QueryEditMode - """ # noqa: E501 - return self._edit_mode - - @edit_mode.setter - def edit_mode(self, edit_mode): - """Set the edit_mode of this DashboardQuery. - - :param edit_mode: The edit_mode of this DashboardQuery. - :type: QueryEditMode - """ # noqa: E501 - self._edit_mode = edit_mode - - @property - def name(self): - """Get the name of this DashboardQuery. - - :return: The name of this DashboardQuery. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this DashboardQuery. - - :param name: The name of this DashboardQuery. - :type: str - """ # noqa: E501 - self._name = name - - @property - def builder_config(self): - """Get the builder_config of this DashboardQuery. - - :return: The builder_config of this DashboardQuery. - :rtype: BuilderConfig - """ # noqa: E501 - return self._builder_config - - @builder_config.setter - def builder_config(self, builder_config): - """Set the builder_config of this DashboardQuery. - - :param builder_config: The builder_config of this DashboardQuery. - :type: BuilderConfig - """ # noqa: E501 - self._builder_config = builder_config - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DashboardQuery): - 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/frogpilot/third_party/influxdb_client/domain/dashboard_with_view_properties.py b/frogpilot/third_party/influxdb_client/domain/dashboard_with_view_properties.py deleted file mode 100644 index 08a78d2cb..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dashboard_with_view_properties.py +++ /dev/null @@ -1,209 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/dashboards.py b/frogpilot/third_party/influxdb_client/domain/dashboards.py deleted file mode 100644 index e15de9284..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dashboards.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Dashboards(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 = { - 'links': 'Links', - 'dashboards': 'list[Dashboard]' - } - - attribute_map = { - 'links': 'links', - 'dashboards': 'dashboards' - } - - def __init__(self, links=None, dashboards=None): # noqa: E501,D401,D403 - """Dashboards - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._dashboards = None - self.discriminator = None - - if links is not None: - self.links = links - if dashboards is not None: - self.dashboards = dashboards - - @property - def links(self): - """Get the links of this Dashboards. - - :return: The links of this Dashboards. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Dashboards. - - :param links: The links of this Dashboards. - :type: Links - """ # noqa: E501 - self._links = links - - @property - def dashboards(self): - """Get the dashboards of this Dashboards. - - :return: The dashboards of this Dashboards. - :rtype: list[Dashboard] - """ # noqa: E501 - return self._dashboards - - @dashboards.setter - def dashboards(self, dashboards): - """Set the dashboards of this Dashboards. - - :param dashboards: The dashboards of this Dashboards. - :type: list[Dashboard] - """ # noqa: E501 - self._dashboards = dashboards - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Dashboards): - 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/frogpilot/third_party/influxdb_client/domain/date_time_literal.py b/frogpilot/third_party/influxdb_client/domain/date_time_literal.py deleted file mode 100644 index ce2280f36..000000000 --- a/frogpilot/third_party/influxdb_client/domain/date_time_literal.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class DateTimeLiteral(Expression): - """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', - 'value': 'datetime' - } - - attribute_map = { - 'type': 'type', - 'value': 'value' - } - - 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 - - if type is not None: - self.type = type - if value is not None: - self.value = value - - @property - def type(self): - """Get the type of this DateTimeLiteral. - - Type of AST node - - :return: The type of this DateTimeLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this DateTimeLiteral. - - Type of AST node - - :param type: The type of this DateTimeLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def value(self): - """Get the value of this DateTimeLiteral. - - :return: The value of this DateTimeLiteral. - :rtype: datetime - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this DateTimeLiteral. - - :param value: The value of this DateTimeLiteral. - :type: datetime - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DateTimeLiteral): - 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/frogpilot/third_party/influxdb_client/domain/dbr_ps.py b/frogpilot/third_party/influxdb_client/domain/dbr_ps.py deleted file mode 100644 index 27617a99f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dbr_ps.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DBRPs(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 = { - 'content': 'list[DBRP]' - } - - attribute_map = { - 'content': 'content' - } - - def __init__(self, content=None): # noqa: E501,D401,D403 - """DBRPs - a model defined in OpenAPI.""" # noqa: E501 - self._content = None - self.discriminator = None - - if content is not None: - self.content = content - - @property - def content(self): - """Get the content of this DBRPs. - - :return: The content of this DBRPs. - :rtype: list[DBRP] - """ # noqa: E501 - return self._content - - @content.setter - def content(self, content): - """Set the content of this DBRPs. - - :param content: The content of this DBRPs. - :type: list[DBRP] - """ # noqa: E501 - self._content = content - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DBRPs): - 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/frogpilot/third_party/influxdb_client/domain/dbrp.py b/frogpilot/third_party/influxdb_client/domain/dbrp.py deleted file mode 100644 index 1bb74ecf9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dbrp.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DBRP(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'bucket_id': 'str', - 'database': 'str', - 'retention_policy': 'str', - 'default': 'bool', - 'virtual': 'bool', - 'links': 'Links' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'bucket_id': 'bucketID', - 'database': 'database', - 'retention_policy': 'retention_policy', - 'default': 'default', - 'virtual': 'virtual', - 'links': 'links' - } - - def __init__(self, id=None, org_id=None, bucket_id=None, database=None, retention_policy=None, default=None, virtual=None, links=None): # noqa: E501,D401,D403 - """DBRP - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._bucket_id = None - self._database = None - self._retention_policy = None - self._default = None - self._virtual = None - self._links = None - self.discriminator = None - - self.id = id - self.org_id = org_id - self.bucket_id = bucket_id - self.database = database - self.retention_policy = retention_policy - self.default = default - if virtual is not None: - self.virtual = virtual - if links is not None: - self.links = links - - @property - def id(self): - """Get the id of this DBRP. - - The resource ID that InfluxDB uses to uniquely identify the database retention policy (DBRP) mapping. - - :return: The id of this DBRP. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this DBRP. - - The resource ID that InfluxDB uses to uniquely identify the database retention policy (DBRP) mapping. - - :param id: The id of this DBRP. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this DBRP. - - An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - - :return: The org_id of this DBRP. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this DBRP. - - An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - - :param org_id: The org_id of this DBRP. - :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 - def bucket_id(self): - """Get the bucket_id of this DBRP. - - A bucket ID. Identifies the bucket used as the target for the translation. - - :return: The bucket_id of this DBRP. - :rtype: str - """ # noqa: E501 - return self._bucket_id - - @bucket_id.setter - def bucket_id(self, bucket_id): - """Set the bucket_id of this DBRP. - - A bucket ID. Identifies the bucket used as the target for the translation. - - :param bucket_id: The bucket_id of this DBRP. - :type: str - """ # noqa: E501 - if bucket_id is None: - raise ValueError("Invalid value for `bucket_id`, must not be `None`") # noqa: E501 - self._bucket_id = bucket_id - - @property - def database(self): - """Get the database of this DBRP. - - A database name. Identifies the InfluxDB v1 database. - - :return: The database of this DBRP. - :rtype: str - """ # noqa: E501 - return self._database - - @database.setter - def database(self, database): - """Set the database of this DBRP. - - A database name. Identifies the InfluxDB v1 database. - - :param database: The database of this DBRP. - :type: str - """ # noqa: E501 - if database is None: - raise ValueError("Invalid value for `database`, must not be `None`") # noqa: E501 - self._database = database - - @property - def retention_policy(self): - """Get the retention_policy of this DBRP. - - A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. - - :return: The retention_policy of this DBRP. - :rtype: str - """ # noqa: E501 - return self._retention_policy - - @retention_policy.setter - def retention_policy(self, retention_policy): - """Set the retention_policy of this DBRP. - - A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. - - :param retention_policy: The retention_policy of this DBRP. - :type: str - """ # noqa: E501 - if retention_policy is None: - raise ValueError("Invalid value for `retention_policy`, must not be `None`") # noqa: E501 - self._retention_policy = retention_policy - - @property - def default(self): - """Get the default of this DBRP. - - If set to `true`, this DBRP mapping is the default retention policy for the database (specified by the `database` property's value). - - :return: The default of this DBRP. - :rtype: bool - """ # noqa: E501 - return self._default - - @default.setter - def default(self, default): - """Set the default of this DBRP. - - If set to `true`, this DBRP mapping is the default retention policy for the database (specified by the `database` property's value). - - :param default: The default of this DBRP. - :type: bool - """ # noqa: E501 - if default is None: - raise ValueError("Invalid value for `default`, must not be `None`") # noqa: E501 - self._default = default - - @property - def virtual(self): - """Get the virtual of this DBRP. - - Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS. - - :return: The virtual of this DBRP. - :rtype: bool - """ # noqa: E501 - return self._virtual - - @virtual.setter - def virtual(self, virtual): - """Set the virtual of this DBRP. - - Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS. - - :param virtual: The virtual of this DBRP. - :type: bool - """ # noqa: E501 - self._virtual = virtual - - @property - def links(self): - """Get the links of this DBRP. - - :return: The links of this DBRP. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this DBRP. - - :param links: The links of this DBRP. - :type: Links - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DBRP): - 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/frogpilot/third_party/influxdb_client/domain/dbrp_create.py b/frogpilot/third_party/influxdb_client/domain/dbrp_create.py deleted file mode 100644 index e69183ff7..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dbrp_create.py +++ /dev/null @@ -1,249 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DBRPCreate(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'org': 'str', - 'org_id': 'str', - 'bucket_id': 'str', - 'database': 'str', - 'retention_policy': 'str', - 'default': 'bool' - } - - attribute_map = { - 'org': 'org', - 'org_id': 'orgID', - 'bucket_id': 'bucketID', - 'database': 'database', - 'retention_policy': 'retention_policy', - 'default': 'default' - } - - def __init__(self, org=None, org_id=None, bucket_id=None, database=None, retention_policy=None, default=None): # noqa: E501,D401,D403 - """DBRPCreate - a model defined in OpenAPI.""" # noqa: E501 - self._org = None - self._org_id = None - self._bucket_id = None - self._database = None - self._retention_policy = None - self._default = None - self.discriminator = None - - if org is not None: - self.org = org - if org_id is not None: - self.org_id = org_id - self.bucket_id = bucket_id - self.database = database - self.retention_policy = retention_policy - if default is not None: - self.default = default - - @property - def org(self): - """Get the org of this DBRPCreate. - - An organization name. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - - :return: The org of this DBRPCreate. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this DBRPCreate. - - An organization name. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - - :param org: The org of this DBRPCreate. - :type: str - """ # noqa: E501 - self._org = org - - @property - def org_id(self): - """Get the org_id of this DBRPCreate. - - An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - - :return: The org_id of this DBRPCreate. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this DBRPCreate. - - An organization ID. Identifies the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) that owns the mapping. - - :param org_id: The org_id of this DBRPCreate. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def bucket_id(self): - """Get the bucket_id of this DBRPCreate. - - A bucket ID. Identifies the bucket used as the target for the translation. - - :return: The bucket_id of this DBRPCreate. - :rtype: str - """ # noqa: E501 - return self._bucket_id - - @bucket_id.setter - def bucket_id(self, bucket_id): - """Set the bucket_id of this DBRPCreate. - - A bucket ID. Identifies the bucket used as the target for the translation. - - :param bucket_id: The bucket_id of this DBRPCreate. - :type: str - """ # noqa: E501 - if bucket_id is None: - raise ValueError("Invalid value for `bucket_id`, must not be `None`") # noqa: E501 - self._bucket_id = bucket_id - - @property - def database(self): - """Get the database of this DBRPCreate. - - A database name. Identifies the InfluxDB v1 database. - - :return: The database of this DBRPCreate. - :rtype: str - """ # noqa: E501 - return self._database - - @database.setter - def database(self, database): - """Set the database of this DBRPCreate. - - A database name. Identifies the InfluxDB v1 database. - - :param database: The database of this DBRPCreate. - :type: str - """ # noqa: E501 - if database is None: - raise ValueError("Invalid value for `database`, must not be `None`") # noqa: E501 - self._database = database - - @property - def retention_policy(self): - """Get the retention_policy of this DBRPCreate. - - A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. - - :return: The retention_policy of this DBRPCreate. - :rtype: str - """ # noqa: E501 - return self._retention_policy - - @retention_policy.setter - def retention_policy(self, retention_policy): - """Set the retention_policy of this DBRPCreate. - - A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. - - :param retention_policy: The retention_policy of this DBRPCreate. - :type: str - """ # noqa: E501 - if retention_policy is None: - raise ValueError("Invalid value for `retention_policy`, must not be `None`") # noqa: E501 - self._retention_policy = retention_policy - - @property - def default(self): - """Get the default of this DBRPCreate. - - Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). - - :return: The default of this DBRPCreate. - :rtype: bool - """ # noqa: E501 - return self._default - - @default.setter - def default(self, default): - """Set the default of this DBRPCreate. - - Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). - - :param default: The default of this DBRPCreate. - :type: bool - """ # noqa: E501 - self._default = default - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DBRPCreate): - 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/frogpilot/third_party/influxdb_client/domain/dbrp_get.py b/frogpilot/third_party/influxdb_client/domain/dbrp_get.py deleted file mode 100644 index 375f0a55d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dbrp_get.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DBRPGet(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 = { - 'content': 'DBRP' - } - - attribute_map = { - 'content': 'content' - } - - def __init__(self, content=None): # noqa: E501,D401,D403 - """DBRPGet - a model defined in OpenAPI.""" # noqa: E501 - self._content = None - self.discriminator = None - - if content is not None: - self.content = content - - @property - def content(self): - """Get the content of this DBRPGet. - - :return: The content of this DBRPGet. - :rtype: DBRP - """ # noqa: E501 - return self._content - - @content.setter - def content(self, content): - """Set the content of this DBRPGet. - - :param content: The content of this DBRPGet. - :type: DBRP - """ # noqa: E501 - self._content = content - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DBRPGet): - 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/frogpilot/third_party/influxdb_client/domain/dbrp_update.py b/frogpilot/third_party/influxdb_client/domain/dbrp_update.py deleted file mode 100644 index 4b0c5baea..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dbrp_update.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DBRPUpdate(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 = { - 'retention_policy': 'str', - 'default': 'bool' - } - - attribute_map = { - 'retention_policy': 'retention_policy', - 'default': 'default' - } - - def __init__(self, retention_policy=None, default=None): # noqa: E501,D401,D403 - """DBRPUpdate - a model defined in OpenAPI.""" # noqa: E501 - self._retention_policy = None - self._default = None - self.discriminator = None - - if retention_policy is not None: - self.retention_policy = retention_policy - if default is not None: - self.default = default - - @property - def retention_policy(self): - """Get the retention_policy of this DBRPUpdate. - - A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. - - :return: The retention_policy of this DBRPUpdate. - :rtype: str - """ # noqa: E501 - return self._retention_policy - - @retention_policy.setter - def retention_policy(self, retention_policy): - """Set the retention_policy of this DBRPUpdate. - - A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) name. Identifies the InfluxDB v1 retention policy mapping. - - :param retention_policy: The retention_policy of this DBRPUpdate. - :type: str - """ # noqa: E501 - self._retention_policy = retention_policy - - @property - def default(self): - """Get the default of this DBRPUpdate. - - Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). To remove the default mapping, set to `false`. - - :return: The default of this DBRPUpdate. - :rtype: bool - """ # noqa: E501 - return self._default - - @default.setter - def default(self, default): - """Set the default of this DBRPUpdate. - - Set to `true` to use this DBRP mapping as the default retention policy for the database (specified by the `database` property's value). To remove the default mapping, set to `false`. - - :param default: The default of this DBRPUpdate. - :type: bool - """ # noqa: E501 - self._default = default - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DBRPUpdate): - 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/frogpilot/third_party/influxdb_client/domain/deadman_check.py b/frogpilot/third_party/influxdb_client/domain/deadman_check.py deleted file mode 100644 index 81e368fab..000000000 --- a/frogpilot/third_party/influxdb_client/domain/deadman_check.py +++ /dev/null @@ -1,354 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.check_discriminator import CheckDiscriminator - - -class DeadmanCheck(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', - 'time_since': 'str', - 'stale_time': 'str', - 'report_zero': 'bool', - '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 = { - 'type': 'type', - 'time_since': 'timeSince', - 'stale_time': 'staleTime', - 'report_zero': 'reportZero', - '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="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 - 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 - - self.type = type - if time_since is not None: - self.time_since = time_since - if stale_time is not None: - self.stale_time = stale_time - if report_zero is not 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): - """Get the type of this DeadmanCheck. - - :return: The type of this DeadmanCheck. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this DeadmanCheck. - - :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 - def time_since(self): - """Get the time_since of this DeadmanCheck. - - String duration before deadman triggers. - - :return: The time_since of this DeadmanCheck. - :rtype: str - """ # noqa: E501 - return self._time_since - - @time_since.setter - def time_since(self, time_since): - """Set the time_since of this DeadmanCheck. - - String duration before deadman triggers. - - :param time_since: The time_since of this DeadmanCheck. - :type: str - """ # noqa: E501 - self._time_since = time_since - - @property - def stale_time(self): - """Get the stale_time of this DeadmanCheck. - - String duration for time that a series is considered stale and should not trigger deadman. - - :return: The stale_time of this DeadmanCheck. - :rtype: str - """ # noqa: E501 - return self._stale_time - - @stale_time.setter - def stale_time(self, stale_time): - """Set the stale_time of this DeadmanCheck. - - String duration for time that a series is considered stale and should not trigger deadman. - - :param stale_time: The stale_time of this DeadmanCheck. - :type: str - """ # noqa: E501 - self._stale_time = stale_time - - @property - def report_zero(self): - """Get the report_zero of this DeadmanCheck. - - If only zero values reported since time, trigger an alert - - :return: The report_zero of this DeadmanCheck. - :rtype: bool - """ # noqa: E501 - return self._report_zero - - @report_zero.setter - def report_zero(self, report_zero): - """Set the report_zero of this DeadmanCheck. - - If only zero values reported since time, trigger an alert - - :param report_zero: The report_zero of this DeadmanCheck. - :type: bool - """ # noqa: E501 - self._report_zero = report_zero - - @property - def level(self): - """Get the level of this DeadmanCheck. - - :return: The level of this DeadmanCheck. - :rtype: CheckStatusLevel - """ # noqa: E501 - return self._level - - @level.setter - def level(self, level): - """Set the level of this DeadmanCheck. - - :param level: The level of this DeadmanCheck. - :type: CheckStatusLevel - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, DeadmanCheck): - 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/frogpilot/third_party/influxdb_client/domain/decimal_places.py b/frogpilot/third_party/influxdb_client/domain/decimal_places.py deleted file mode 100644 index 7a855a6d6..000000000 --- a/frogpilot/third_party/influxdb_client/domain/decimal_places.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DecimalPlaces(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'is_enforced': 'bool', - 'digits': 'int' - } - - attribute_map = { - 'is_enforced': 'isEnforced', - 'digits': 'digits' - } - - def __init__(self, is_enforced=None, digits=None): # noqa: E501,D401,D403 - """DecimalPlaces - a model defined in OpenAPI.""" # noqa: E501 - self._is_enforced = None - self._digits = None - self.discriminator = None - - if is_enforced is not None: - self.is_enforced = is_enforced - if digits is not None: - self.digits = digits - - @property - def is_enforced(self): - """Get the is_enforced of this DecimalPlaces. - - Indicates whether decimal point setting should be enforced - - :return: The is_enforced of this DecimalPlaces. - :rtype: bool - """ # noqa: E501 - return self._is_enforced - - @is_enforced.setter - def is_enforced(self, is_enforced): - """Set the is_enforced of this DecimalPlaces. - - Indicates whether decimal point setting should be enforced - - :param is_enforced: The is_enforced of this DecimalPlaces. - :type: bool - """ # noqa: E501 - self._is_enforced = is_enforced - - @property - def digits(self): - """Get the digits of this DecimalPlaces. - - The number of digits after decimal to display - - :return: The digits of this DecimalPlaces. - :rtype: int - """ # noqa: E501 - return self._digits - - @digits.setter - def digits(self, digits): - """Set the digits of this DecimalPlaces. - - The number of digits after decimal to display - - :param digits: The digits of this DecimalPlaces. - :type: int - """ # noqa: E501 - self._digits = digits - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DecimalPlaces): - 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/frogpilot/third_party/influxdb_client/domain/delete_predicate_request.py b/frogpilot/third_party/influxdb_client/domain/delete_predicate_request.py deleted file mode 100644 index 13202910d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/delete_predicate_request.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DeletePredicateRequest(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 = { - 'start': 'datetime', - 'stop': 'datetime', - 'predicate': 'str' - } - - attribute_map = { - 'start': 'start', - 'stop': 'stop', - 'predicate': 'predicate' - } - - def __init__(self, start=None, stop=None, predicate=None): # noqa: E501,D401,D403 - """DeletePredicateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._start = None - self._stop = None - self._predicate = None - self.discriminator = None - - self.start = start - self.stop = stop - if predicate is not None: - self.predicate = predicate - - @property - def start(self): - """Get the start of this DeletePredicateRequest. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The earliest time to delete from. - - :return: The start of this DeletePredicateRequest. - :rtype: datetime - """ # noqa: E501 - return self._start - - @start.setter - def start(self, start): - """Set the start of this DeletePredicateRequest. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The earliest time to delete from. - - :param start: The start of this DeletePredicateRequest. - :type: datetime - """ # noqa: E501 - if start is None: - raise ValueError("Invalid value for `start`, must not be `None`") # noqa: E501 - self._start = start - - @property - def stop(self): - """Get the stop of this DeletePredicateRequest. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The latest time to delete from. - - :return: The stop of this DeletePredicateRequest. - :rtype: datetime - """ # noqa: E501 - return self._stop - - @stop.setter - def stop(self, stop): - """Set the stop of this DeletePredicateRequest. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). The latest time to delete from. - - :param stop: The stop of this DeletePredicateRequest. - :type: datetime - """ # noqa: E501 - if stop is None: - raise ValueError("Invalid value for `stop`, must not be `None`") # noqa: E501 - self._stop = stop - - @property - def predicate(self): - """Get the predicate of this DeletePredicateRequest. - - An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - - :return: The predicate of this DeletePredicateRequest. - :rtype: str - """ # noqa: E501 - return self._predicate - - @predicate.setter - def predicate(self, predicate): - """Set the predicate of this DeletePredicateRequest. - - An expression in [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - - :param predicate: The predicate of this DeletePredicateRequest. - :type: str - """ # noqa: E501 - self._predicate = predicate - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DeletePredicateRequest): - 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/frogpilot/third_party/influxdb_client/domain/dialect.py b/frogpilot/third_party/influxdb_client/domain/dialect.py deleted file mode 100644 index 18bc75329..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dialect.py +++ /dev/null @@ -1,234 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Dialect(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 = { - 'header': 'bool', - 'delimiter': 'str', - 'annotations': 'list[str]', - 'comment_prefix': 'str', - 'date_time_format': 'str' - } - - attribute_map = { - 'header': 'header', - 'delimiter': 'delimiter', - 'annotations': 'annotations', - 'comment_prefix': 'commentPrefix', - 'date_time_format': 'dateTimeFormat' - } - - def __init__(self, header=True, delimiter=',', annotations=None, comment_prefix='#', date_time_format='RFC3339'): # noqa: E501,D401,D403 - """Dialect - a model defined in OpenAPI.""" # noqa: E501 - self._header = None - self._delimiter = None - self._annotations = None - self._comment_prefix = None - self._date_time_format = None - self.discriminator = None - - if header is not None: - self.header = header - if delimiter is not None: - self.delimiter = delimiter - if annotations is not None: - self.annotations = annotations - if comment_prefix is not None: - self.comment_prefix = comment_prefix - if date_time_format is not None: - self.date_time_format = date_time_format - - @property - def header(self): - """Get the header of this Dialect. - - If true, the results contain a header row. - - :return: The header of this Dialect. - :rtype: bool - """ # noqa: E501 - return self._header - - @header.setter - def header(self, header): - """Set the header of this Dialect. - - If true, the results contain a header row. - - :param header: The header of this Dialect. - :type: bool - """ # noqa: E501 - self._header = header - - @property - def delimiter(self): - """Get the delimiter of this Dialect. - - The separator used between cells. Default is a comma (`,`). - - :return: The delimiter of this Dialect. - :rtype: str - """ # noqa: E501 - return self._delimiter - - @delimiter.setter - def delimiter(self, delimiter): - """Set the delimiter of this Dialect. - - The separator used between cells. Default is a comma (`,`). - - :param delimiter: The delimiter of this Dialect. - :type: str - """ # noqa: E501 - if delimiter is not None and len(delimiter) > 1: - raise ValueError("Invalid value for `delimiter`, length must be less than or equal to `1`") # noqa: E501 - if delimiter is not None and len(delimiter) < 1: - raise ValueError("Invalid value for `delimiter`, length must be greater than or equal to `1`") # noqa: E501 - self._delimiter = delimiter - - @property - def annotations(self): - """Get the annotations of this Dialect. - - Annotation rows to include in the results. An _annotation_ is metadata associated with an object (column) in the data model. #### Related guides - See [Annotated CSV annotations](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#annotations) for examples and more information. For more information about **annotations** in tabular data, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns). - - :return: The annotations of this Dialect. - :rtype: list[str] - """ # noqa: E501 - return self._annotations - - @annotations.setter - def annotations(self, annotations): - """Set the annotations of this Dialect. - - Annotation rows to include in the results. An _annotation_ is metadata associated with an object (column) in the data model. #### Related guides - See [Annotated CSV annotations](https://docs.influxdata.com/influxdb/latest/reference/syntax/annotated-csv/#annotations) for examples and more information. For more information about **annotations** in tabular data, see [W3 metadata vocabulary for tabular data](https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/#columns). - - :param annotations: The annotations of this Dialect. - :type: list[str] - """ # noqa: E501 - allowed_values = ["group", "datatype", "default"] # noqa: E501 - if not set(annotations).issubset(set(allowed_values)): - raise ValueError( - "Invalid values for `annotations` [{0}], must be a subset of [{1}]" # noqa: E501 - .format(", ".join(map(str, set(annotations) - set(allowed_values))), # noqa: E501 - ", ".join(map(str, allowed_values))) - ) - self._annotations = annotations - - @property - def comment_prefix(self): - """Get the comment_prefix of this Dialect. - - The character prefixed to comment strings. Default is a number sign (`#`). - - :return: The comment_prefix of this Dialect. - :rtype: str - """ # noqa: E501 - return self._comment_prefix - - @comment_prefix.setter - def comment_prefix(self, comment_prefix): - """Set the comment_prefix of this Dialect. - - The character prefixed to comment strings. Default is a number sign (`#`). - - :param comment_prefix: The comment_prefix of this Dialect. - :type: str - """ # noqa: E501 - if comment_prefix is not None and len(comment_prefix) > 1: - raise ValueError("Invalid value for `comment_prefix`, length must be less than or equal to `1`") # noqa: E501 - if comment_prefix is not None and len(comment_prefix) < 0: - raise ValueError("Invalid value for `comment_prefix`, length must be greater than or equal to `0`") # noqa: E501 - self._comment_prefix = comment_prefix - - @property - def date_time_format(self): - """Get the date_time_format of this Dialect. - - The format for timestamps in results. Default is [`RFC3339` date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp). To include nanoseconds in timestamps, use `RFC3339Nano`. #### Example formatted date/time values | Format | Value | |:------------|:----------------------------| | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` | | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` | - - :return: The date_time_format of this Dialect. - :rtype: str - """ # noqa: E501 - return self._date_time_format - - @date_time_format.setter - def date_time_format(self, date_time_format): - """Set the date_time_format of this Dialect. - - The format for timestamps in results. Default is [`RFC3339` date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp). To include nanoseconds in timestamps, use `RFC3339Nano`. #### Example formatted date/time values | Format | Value | |:------------|:----------------------------| | `RFC3339` | `"2006-01-02T15:04:05Z07:00"` | | `RFC3339Nano` | `"2006-01-02T15:04:05.999999999Z07:00"` | - - :param date_time_format: The date_time_format of this Dialect. - :type: str - """ # noqa: E501 - self._date_time_format = date_time_format - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Dialect): - 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/frogpilot/third_party/influxdb_client/domain/dict_expression.py b/frogpilot/third_party/influxdb_client/domain/dict_expression.py deleted file mode 100644 index f6c0242c3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dict_expression.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class DictExpression(Expression): - """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', - 'elements': 'list[DictItem]' - } - - attribute_map = { - 'type': 'type', - 'elements': 'elements' - } - - 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._elements = None - self.discriminator = None - - if type is not None: - self.type = type - if elements is not None: - self.elements = elements - - @property - def type(self): - """Get the type of this DictExpression. - - Type of AST node - - :return: The type of this DictExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this DictExpression. - - Type of AST node - - :param type: The type of this DictExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def elements(self): - """Get the elements of this DictExpression. - - Elements of the dictionary - - :return: The elements of this DictExpression. - :rtype: list[DictItem] - """ # noqa: E501 - return self._elements - - @elements.setter - def elements(self, elements): - """Set the elements of this DictExpression. - - Elements of the dictionary - - :param elements: The elements of this DictExpression. - :type: list[DictItem] - """ # noqa: E501 - self._elements = elements - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DictExpression): - 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/frogpilot/third_party/influxdb_client/domain/dict_item.py b/frogpilot/third_party/influxdb_client/domain/dict_item.py deleted file mode 100644 index 77beac923..000000000 --- a/frogpilot/third_party/influxdb_client/domain/dict_item.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class DictItem(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', - 'key': 'Expression', - 'val': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'key': 'key', - 'val': 'val' - } - - 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._val = None - self.discriminator = None - - if type is not None: - self.type = type - if key is not None: - self.key = key - if val is not None: - self.val = val - - @property - def type(self): - """Get the type of this DictItem. - - Type of AST node - - :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 DictItem. - - :param key: The key of this DictItem. - :type: Expression - """ # noqa: E501 - self._key = key - - @property - def val(self): - """Get the val of this DictItem. - - :return: The val of this DictItem. - :rtype: Expression - """ # noqa: E501 - return self._val - - @val.setter - def val(self, val): - """Set the val of this DictItem. - - :param val: The val of this DictItem. - :type: Expression - """ # noqa: E501 - self._val = val - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DictItem): - 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/frogpilot/third_party/influxdb_client/domain/duration.py b/frogpilot/third_party/influxdb_client/domain/duration.py deleted file mode 100644 index 510444443..000000000 --- a/frogpilot/third_party/influxdb_client/domain/duration.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Duration(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', - 'magnitude': 'int', - 'unit': 'str' - } - - attribute_map = { - 'type': 'type', - 'magnitude': 'magnitude', - 'unit': 'unit' - } - - def __init__(self, type=None, magnitude=None, unit=None): # noqa: E501,D401,D403 - """Duration - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._magnitude = None - self._unit = None - self.discriminator = None - - if type is not None: - self.type = type - if magnitude is not None: - self.magnitude = magnitude - if unit is not None: - self.unit = unit - - @property - def type(self): - """Get the type of this Duration. - - Type of AST node - - :return: The type of this Duration. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Duration. - - Type of AST node - - :param type: The type of this Duration. - :type: str - """ # noqa: E501 - self._type = type - - @property - def magnitude(self): - """Get the magnitude of this Duration. - - :return: The magnitude of this Duration. - :rtype: int - """ # noqa: E501 - return self._magnitude - - @magnitude.setter - def magnitude(self, magnitude): - """Set the magnitude of this Duration. - - :param magnitude: The magnitude of this Duration. - :type: int - """ # noqa: E501 - self._magnitude = magnitude - - @property - def unit(self): - """Get the unit of this Duration. - - :return: The unit of this Duration. - :rtype: str - """ # noqa: E501 - return self._unit - - @unit.setter - def unit(self, unit): - """Set the unit of this Duration. - - :param unit: The unit of this Duration. - :type: str - """ # noqa: E501 - self._unit = unit - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Duration): - 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/frogpilot/third_party/influxdb_client/domain/duration_literal.py b/frogpilot/third_party/influxdb_client/domain/duration_literal.py deleted file mode 100644 index f6d639655..000000000 --- a/frogpilot/third_party/influxdb_client/domain/duration_literal.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class DurationLiteral(Expression): - """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', - 'values': 'list[Duration]' - } - - attribute_map = { - 'type': 'type', - 'values': 'values' - } - - 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 - - if type is not None: - self.type = type - if values is not None: - self.values = values - - @property - def type(self): - """Get the type of this DurationLiteral. - - Type of AST node - - :return: The type of this DurationLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this DurationLiteral. - - Type of AST node - - :param type: The type of this DurationLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def values(self): - """Get the values of this DurationLiteral. - - Duration values - - :return: The values of this DurationLiteral. - :rtype: list[Duration] - """ # noqa: E501 - return self._values - - @values.setter - def values(self, values): - """Set the values of this DurationLiteral. - - Duration values - - :param values: The values of this DurationLiteral. - :type: list[Duration] - """ # noqa: E501 - self._values = values - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, DurationLiteral): - 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/frogpilot/third_party/influxdb_client/domain/error.py b/frogpilot/third_party/influxdb_client/domain/error.py deleted file mode 100644 index 2a3655bb0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/error.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Error(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 = { - 'code': 'str', - 'message': 'str', - 'op': 'str', - 'err': 'str' - } - - attribute_map = { - 'code': 'code', - 'message': 'message', - 'op': 'op', - 'err': 'err' - } - - 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 - if message is not None: - 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. - - :return: The code of this Error. - :rtype: str - """ # noqa: E501 - return self._code - - @code.setter - def code(self, code): - """Set the code of this Error. - - code is the machine-readable error code. - - :param code: The code of this Error. - :type: str - """ # noqa: E501 - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - self._code = code - - @property - def message(self): - """Get the message of this Error. - - Human-readable message. - - :return: The message of this Error. - :rtype: str - """ # noqa: E501 - return self._message - - @message.setter - def message(self, message): - """Set the message of this Error. - - Human-readable message. - - :param message: The message of this Error. - :type: str - """ # noqa: E501 - self._message = message - - @property - def op(self): - """Get the op of this Error. - - Describes the logical code operation when the error occurred. 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. - - Describes the logical code operation when the error occurred. 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. - - 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. - - 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, Error): - 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/frogpilot/third_party/influxdb_client/domain/expression.py b/frogpilot/third_party/influxdb_client/domain/expression.py deleted file mode 100644 index 9d449fd45..000000000 --- a/frogpilot/third_party/influxdb_client/domain/expression.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.node import Node - - -class Expression(Node): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501,D401,D403 - """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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Expression): - 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/frogpilot/third_party/influxdb_client/domain/expression_statement.py b/frogpilot/third_party/influxdb_client/domain/expression_statement.py deleted file mode 100644 index 04dd216d9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/expression_statement.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class ExpressionStatement(Statement): - """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', - 'expression': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'expression': 'expression' - } - - 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 - - if type is not None: - self.type = type - if expression is not None: - self.expression = expression - - @property - def type(self): - """Get the type of this ExpressionStatement. - - Type of AST node - - :return: The type of this ExpressionStatement. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ExpressionStatement. - - Type of AST node - - :param type: The type of this ExpressionStatement. - :type: str - """ # noqa: E501 - self._type = type - - @property - def expression(self): - """Get the expression of this ExpressionStatement. - - :return: The expression of this ExpressionStatement. - :rtype: Expression - """ # noqa: E501 - return self._expression - - @expression.setter - def expression(self, expression): - """Set the expression of this ExpressionStatement. - - :param expression: The expression of this ExpressionStatement. - :type: Expression - """ # noqa: E501 - self._expression = expression - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ExpressionStatement): - 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/frogpilot/third_party/influxdb_client/domain/field.py b/frogpilot/third_party/influxdb_client/domain/field.py deleted file mode 100644 index 62bc3d13e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/field.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Field(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 = { - 'value': 'str', - 'type': 'str', - 'alias': 'str', - 'args': 'list[Field]' - } - - attribute_map = { - 'value': 'value', - 'type': 'type', - 'alias': 'alias', - 'args': 'args' - } - - def __init__(self, value=None, type=None, alias=None, args=None): # noqa: E501,D401,D403 - """Field - a model defined in OpenAPI.""" # noqa: E501 - self._value = None - self._type = None - self._alias = None - self._args = None - self.discriminator = None - - if value is not None: - self.value = value - if type is not None: - self.type = type - if alias is not None: - self.alias = alias - if args is not None: - self.args = args - - @property - def value(self): - """Get the value of this Field. - - value is the value of the field. Meaning of the value is implied by the `type` key - - :return: The value of this Field. - :rtype: str - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this Field. - - value is the value of the field. Meaning of the value is implied by the `type` key - - :param value: The value of this Field. - :type: str - """ # noqa: E501 - self._value = value - - @property - def type(self): - """Get the type of this Field. - - `type` describes the field type. `func` is a function. `field` is a field reference. - - :return: The type of this Field. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Field. - - `type` describes the field type. `func` is a function. `field` is a field reference. - - :param type: The type of this Field. - :type: str - """ # noqa: E501 - self._type = type - - @property - def alias(self): - """Get the alias of this Field. - - Alias overrides the field name in the returned response. Applies only if type is `func` - - :return: The alias of this Field. - :rtype: str - """ # noqa: E501 - return self._alias - - @alias.setter - def alias(self, alias): - """Set the alias of this Field. - - Alias overrides the field name in the returned response. Applies only if type is `func` - - :param alias: The alias of this Field. - :type: str - """ # noqa: E501 - self._alias = alias - - @property - def args(self): - """Get the args of this Field. - - Args are the arguments to the function - - :return: The args of this Field. - :rtype: list[Field] - """ # noqa: E501 - return self._args - - @args.setter - def args(self, args): - """Set the args of this Field. - - Args are the arguments to the function - - :param args: The args of this Field. - :type: list[Field] - """ # noqa: E501 - self._args = args - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Field): - 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/frogpilot/third_party/influxdb_client/domain/file.py b/frogpilot/third_party/influxdb_client/domain/file.py deleted file mode 100644 index 6d3ac8125..000000000 --- a/frogpilot/third_party/influxdb_client/domain/file.py +++ /dev/null @@ -1,215 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class File(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', - 'name': 'str', - 'package': 'PackageClause', - 'imports': 'list[ImportDeclaration]', - 'body': 'list[Statement]' - } - - attribute_map = { - 'type': 'type', - 'name': 'name', - 'package': 'package', - 'imports': 'imports', - 'body': 'body' - } - - def __init__(self, type=None, name=None, package=None, imports=None, body=None): # noqa: E501,D401,D403 - """File - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._name = None - self._package = None - self._imports = None - self._body = None - self.discriminator = None - - if type is not None: - self.type = type - if name is not None: - self.name = name - if package is not None: - self.package = package - if imports is not None: - self.imports = imports - if body is not None: - self.body = body - - @property - def type(self): - """Get the type of this File. - - Type of AST node - - :return: The type of this File. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this File. - - Type of AST node - - :param type: The type of this File. - :type: str - """ # noqa: E501 - self._type = type - - @property - def name(self): - """Get the name of this File. - - The name of the file. - - :return: The name of this File. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this File. - - The name of the file. - - :param name: The name of this File. - :type: str - """ # noqa: E501 - self._name = name - - @property - def package(self): - """Get the package of this File. - - :return: The package of this File. - :rtype: PackageClause - """ # noqa: E501 - return self._package - - @package.setter - def package(self, package): - """Set the package of this File. - - :param package: The package of this File. - :type: PackageClause - """ # noqa: E501 - self._package = package - - @property - def imports(self): - """Get the imports of this File. - - A list of package imports - - :return: The imports of this File. - :rtype: list[ImportDeclaration] - """ # noqa: E501 - return self._imports - - @imports.setter - def imports(self, imports): - """Set the imports of this File. - - A list of package imports - - :param imports: The imports of this File. - :type: list[ImportDeclaration] - """ # noqa: E501 - self._imports = imports - - @property - def body(self): - """Get the body of this File. - - List of Flux statements - - :return: The body of this File. - :rtype: list[Statement] - """ # noqa: E501 - return self._body - - @body.setter - def body(self, body): - """Set the body of this File. - - List of Flux statements - - :param body: The body of this File. - :type: list[Statement] - """ # noqa: E501 - self._body = body - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, File): - 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/frogpilot/third_party/influxdb_client/domain/float_literal.py b/frogpilot/third_party/influxdb_client/domain/float_literal.py deleted file mode 100644 index 41e8ec354..000000000 --- a/frogpilot/third_party/influxdb_client/domain/float_literal.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class FloatLiteral(Expression): - """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', - 'value': 'float' - } - - attribute_map = { - 'type': 'type', - 'value': 'value' - } - - 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 - - if type is not None: - self.type = type - if value is not None: - self.value = value - - @property - def type(self): - """Get the type of this FloatLiteral. - - Type of AST node - - :return: The type of this FloatLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this FloatLiteral. - - Type of AST node - - :param type: The type of this FloatLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def value(self): - """Get the value of this FloatLiteral. - - :return: The value of this FloatLiteral. - :rtype: float - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this FloatLiteral. - - :param value: The value of this FloatLiteral. - :type: float - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, FloatLiteral): - 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/frogpilot/third_party/influxdb_client/domain/flux_response.py b/frogpilot/third_party/influxdb_client/domain/flux_response.py deleted file mode 100644 index 94608114a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/flux_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class FluxResponse(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 = { - 'flux': 'str' - } - - attribute_map = { - 'flux': 'flux' - } - - def __init__(self, flux=None): # noqa: E501,D401,D403 - """FluxResponse - a model defined in OpenAPI.""" # noqa: E501 - self._flux = None - self.discriminator = None - - if flux is not None: - self.flux = flux - - @property - def flux(self): - """Get the flux of this FluxResponse. - - :return: The flux of this FluxResponse. - :rtype: str - """ # noqa: E501 - return self._flux - - @flux.setter - def flux(self, flux): - """Set the flux of this FluxResponse. - - :param flux: The flux of this FluxResponse. - :type: str - """ # noqa: E501 - self._flux = flux - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, FluxResponse): - 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/frogpilot/third_party/influxdb_client/domain/flux_suggestion.py b/frogpilot/third_party/influxdb_client/domain/flux_suggestion.py deleted file mode 100644 index 46c692fbd..000000000 --- a/frogpilot/third_party/influxdb_client/domain/flux_suggestion.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class FluxSuggestion(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', - 'params': 'dict(str, str)' - } - - attribute_map = { - 'name': 'name', - 'params': 'params' - } - - def __init__(self, name=None, params=None): # noqa: E501,D401,D403 - """FluxSuggestion - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._params = None - self.discriminator = None - - if name is not None: - self.name = name - if params is not None: - self.params = params - - @property - def name(self): - """Get the name of this FluxSuggestion. - - :return: The name of this FluxSuggestion. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this FluxSuggestion. - - :param name: The name of this FluxSuggestion. - :type: str - """ # noqa: E501 - self._name = name - - @property - def params(self): - """Get the params of this FluxSuggestion. - - :return: The params of this FluxSuggestion. - :rtype: dict(str, str) - """ # noqa: E501 - return self._params - - @params.setter - def params(self, params): - """Set the params of this FluxSuggestion. - - :param params: The params of this FluxSuggestion. - :type: dict(str, str) - """ # noqa: E501 - self._params = params - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, FluxSuggestion): - 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/frogpilot/third_party/influxdb_client/domain/flux_suggestions.py b/frogpilot/third_party/influxdb_client/domain/flux_suggestions.py deleted file mode 100644 index 38c3ccf87..000000000 --- a/frogpilot/third_party/influxdb_client/domain/flux_suggestions.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class FluxSuggestions(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 = { - 'funcs': 'list[FluxSuggestion]' - } - - attribute_map = { - 'funcs': 'funcs' - } - - def __init__(self, funcs=None): # noqa: E501,D401,D403 - """FluxSuggestions - a model defined in OpenAPI.""" # noqa: E501 - self._funcs = None - self.discriminator = None - - if funcs is not None: - self.funcs = funcs - - @property - def funcs(self): - """Get the funcs of this FluxSuggestions. - - :return: The funcs of this FluxSuggestions. - :rtype: list[FluxSuggestion] - """ # noqa: E501 - return self._funcs - - @funcs.setter - def funcs(self, funcs): - """Set the funcs of this FluxSuggestions. - - :param funcs: The funcs of this FluxSuggestions. - :type: list[FluxSuggestion] - """ # noqa: E501 - self._funcs = funcs - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, FluxSuggestions): - 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/frogpilot/third_party/influxdb_client/domain/function_expression.py b/frogpilot/third_party/influxdb_client/domain/function_expression.py deleted file mode 100644 index b06c73876..000000000 --- a/frogpilot/third_party/influxdb_client/domain/function_expression.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class FunctionExpression(Expression): - """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', - 'params': 'list[ModelProperty]', - 'body': 'Node' - } - - attribute_map = { - 'type': 'type', - 'params': 'params', - 'body': 'body' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if params is not None: - self.params = params - if body is not None: - self.body = body - - @property - def type(self): - """Get the type of this FunctionExpression. - - Type of AST node - - :return: The type of this FunctionExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this FunctionExpression. - - Type of AST node - - :param type: The type of this FunctionExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def params(self): - """Get the params of this FunctionExpression. - - Function parameters - - :return: The params of this FunctionExpression. - :rtype: list[ModelProperty] - """ # noqa: E501 - return self._params - - @params.setter - def params(self, params): - """Set the params of this FunctionExpression. - - Function parameters - - :param params: The params of this FunctionExpression. - :type: list[ModelProperty] - """ # noqa: E501 - self._params = params - - @property - def body(self): - """Get the body of this FunctionExpression. - - :return: The body of this FunctionExpression. - :rtype: Node - """ # noqa: E501 - return self._body - - @body.setter - def body(self, body): - """Set the body of this FunctionExpression. - - :param body: The body of this FunctionExpression. - :type: Node - """ # noqa: E501 - self._body = body - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, FunctionExpression): - 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/frogpilot/third_party/influxdb_client/domain/gauge_view_properties.py b/frogpilot/third_party/influxdb_client/domain/gauge_view_properties.py deleted file mode 100644 index 237859874..000000000 --- a/frogpilot/third_party/influxdb_client/domain/gauge_view_properties.py +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class GaugeViewProperties(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 = { - 'type': 'str', - 'queries': 'list[DashboardQuery]', - 'colors': 'list[DashboardColor]', - 'shape': 'str', - 'note': 'str', - 'show_note_when_empty': 'bool', - 'prefix': 'str', - 'tick_prefix': 'str', - 'suffix': 'str', - 'tick_suffix': 'str', - 'decimal_places': 'DecimalPlaces' - } - - attribute_map = { - 'type': 'type', - 'queries': 'queries', - 'colors': 'colors', - 'shape': 'shape', - 'note': 'note', - 'show_note_when_empty': 'showNoteWhenEmpty', - 'prefix': 'prefix', - 'tick_prefix': 'tickPrefix', - 'suffix': 'suffix', - 'tick_suffix': 'tickSuffix', - '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, decimal_places=None): # noqa: E501,D401,D403 - """GaugeViewProperties - a model defined in OpenAPI.""" # noqa: E501 - ViewProperties.__init__(self) # noqa: E501 - - self._type = None - self._queries = None - self._colors = None - self._shape = None - self._note = None - self._show_note_when_empty = None - self._prefix = None - self._tick_prefix = None - self._suffix = None - self._tick_suffix = None - self._decimal_places = None - self.discriminator = None - - 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.prefix = prefix - self.tick_prefix = tick_prefix - self.suffix = suffix - self.tick_suffix = tick_suffix - self.decimal_places = decimal_places - - @property - def type(self): - """Get the type of this GaugeViewProperties. - - :return: The type of this GaugeViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this GaugeViewProperties. - - :param type: The type of this GaugeViewProperties. - :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 GaugeViewProperties. - - :return: The queries of this GaugeViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this GaugeViewProperties. - - :param queries: The queries of this GaugeViewProperties. - :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 GaugeViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this GaugeViewProperties. - :rtype: list[DashboardColor] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this GaugeViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this GaugeViewProperties. - :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 GaugeViewProperties. - - :return: The shape of this GaugeViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this GaugeViewProperties. - - :param shape: The shape of this GaugeViewProperties. - :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 GaugeViewProperties. - - :return: The note of this GaugeViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this GaugeViewProperties. - - :param note: The note of this GaugeViewProperties. - :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 GaugeViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this GaugeViewProperties. - :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 GaugeViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this GaugeViewProperties. - :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 prefix(self): - """Get the prefix of this GaugeViewProperties. - - :return: The prefix of this GaugeViewProperties. - :rtype: str - """ # noqa: E501 - return self._prefix - - @prefix.setter - def prefix(self, prefix): - """Set the prefix of this GaugeViewProperties. - - :param prefix: The prefix of this GaugeViewProperties. - :type: str - """ # noqa: E501 - if prefix is None: - raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 - self._prefix = prefix - - @property - def tick_prefix(self): - """Get the tick_prefix of this GaugeViewProperties. - - :return: The tick_prefix of this GaugeViewProperties. - :rtype: str - """ # noqa: E501 - return self._tick_prefix - - @tick_prefix.setter - def tick_prefix(self, tick_prefix): - """Set the tick_prefix of this GaugeViewProperties. - - :param tick_prefix: The tick_prefix of this GaugeViewProperties. - :type: str - """ # noqa: E501 - if tick_prefix is None: - raise ValueError("Invalid value for `tick_prefix`, must not be `None`") # noqa: E501 - self._tick_prefix = tick_prefix - - @property - def suffix(self): - """Get the suffix of this GaugeViewProperties. - - :return: The suffix of this GaugeViewProperties. - :rtype: str - """ # noqa: E501 - return self._suffix - - @suffix.setter - def suffix(self, suffix): - """Set the suffix of this GaugeViewProperties. - - :param suffix: The suffix of this GaugeViewProperties. - :type: str - """ # noqa: E501 - if suffix is None: - raise ValueError("Invalid value for `suffix`, must not be `None`") # noqa: E501 - self._suffix = suffix - - @property - def tick_suffix(self): - """Get the tick_suffix of this GaugeViewProperties. - - :return: The tick_suffix of this GaugeViewProperties. - :rtype: str - """ # noqa: E501 - return self._tick_suffix - - @tick_suffix.setter - def tick_suffix(self, tick_suffix): - """Set the tick_suffix of this GaugeViewProperties. - - :param tick_suffix: The tick_suffix of this GaugeViewProperties. - :type: str - """ # noqa: E501 - if tick_suffix is None: - raise ValueError("Invalid value for `tick_suffix`, must not be `None`") # noqa: E501 - self._tick_suffix = tick_suffix - - @property - def decimal_places(self): - """Get the decimal_places of this GaugeViewProperties. - - :return: The decimal_places of this GaugeViewProperties. - :rtype: DecimalPlaces - """ # noqa: E501 - return self._decimal_places - - @decimal_places.setter - def decimal_places(self, decimal_places): - """Set the decimal_places of this GaugeViewProperties. - - :param decimal_places: The decimal_places of this GaugeViewProperties. - :type: DecimalPlaces - """ # noqa: E501 - if decimal_places is None: - raise ValueError("Invalid value for `decimal_places`, must not be `None`") # noqa: E501 - self._decimal_places = decimal_places - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, GaugeViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/greater_threshold.py b/frogpilot/third_party/influxdb_client/domain/greater_threshold.py deleted file mode 100644 index b857f1322..000000000 --- a/frogpilot/third_party/influxdb_client/domain/greater_threshold.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.threshold_base import ThresholdBase - - -class GreaterThreshold(ThresholdBase): - """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', - 'value': 'float', - 'level': 'CheckStatusLevel', - 'all_values': 'bool' - } - - attribute_map = { - 'type': 'type', - 'value': 'value', - 'level': 'level', - 'all_values': 'allValues' - } - - def __init__(self, type="greater", value=None, level=None, all_values=None): # noqa: E501,D401,D403 - """GreaterThreshold - a model defined in OpenAPI.""" # noqa: E501 - ThresholdBase.__init__(self, level=level, all_values=all_values) # noqa: E501 - - self._type = None - self._value = None - self.discriminator = None - - self.type = type - self.value = value - - @property - def type(self): - """Get the type of this GreaterThreshold. - - :return: The type of this GreaterThreshold. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this GreaterThreshold. - - :param type: The type of this GreaterThreshold. - :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 value(self): - """Get the value of this GreaterThreshold. - - :return: The value of this GreaterThreshold. - :rtype: float - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this GreaterThreshold. - - :param value: The value of this GreaterThreshold. - :type: float - """ # noqa: E501 - if value is None: - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, GreaterThreshold): - 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/frogpilot/third_party/influxdb_client/domain/health_check.py b/frogpilot/third_party/influxdb_client/domain/health_check.py deleted file mode 100644 index b35524372..000000000 --- a/frogpilot/third_party/influxdb_client/domain/health_check.py +++ /dev/null @@ -1,224 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class HealthCheck(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', - 'message': 'str', - 'checks': 'list[HealthCheck]', - 'status': 'str', - 'version': 'str', - 'commit': 'str' - } - - attribute_map = { - 'name': 'name', - 'message': 'message', - 'checks': 'checks', - 'status': 'status', - 'version': 'version', - 'commit': 'commit' - } - - def __init__(self, name=None, message=None, checks=None, status=None, version=None, commit=None): # noqa: E501,D401,D403 - """HealthCheck - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._message = None - self._checks = None - self._status = None - self._version = None - self._commit = None - self.discriminator = None - - self.name = name - if message is not None: - self.message = message - if checks is not None: - self.checks = checks - self.status = status - if version is not None: - self.version = version - if commit is not None: - self.commit = commit - - @property - def name(self): - """Get the name of this HealthCheck. - - :return: The name of this HealthCheck. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this HealthCheck. - - :param name: The name of this HealthCheck. - :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 message(self): - """Get the message of this HealthCheck. - - :return: The message of this HealthCheck. - :rtype: str - """ # noqa: E501 - return self._message - - @message.setter - def message(self, message): - """Set the message of this HealthCheck. - - :param message: The message of this HealthCheck. - :type: str - """ # noqa: E501 - self._message = message - - @property - def checks(self): - """Get the checks of this HealthCheck. - - :return: The checks of this HealthCheck. - :rtype: list[HealthCheck] - """ # noqa: E501 - return self._checks - - @checks.setter - def checks(self, checks): - """Set the checks of this HealthCheck. - - :param checks: The checks of this HealthCheck. - :type: list[HealthCheck] - """ # noqa: E501 - self._checks = checks - - @property - def status(self): - """Get the status of this HealthCheck. - - :return: The status of this HealthCheck. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this HealthCheck. - - :param status: The status of this HealthCheck. - :type: str - """ # noqa: E501 - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._status = status - - @property - def version(self): - """Get the version of this HealthCheck. - - :return: The version of this HealthCheck. - :rtype: str - """ # noqa: E501 - return self._version - - @version.setter - def version(self, version): - """Set the version of this HealthCheck. - - :param version: The version of this HealthCheck. - :type: str - """ # noqa: E501 - self._version = version - - @property - def commit(self): - """Get the commit of this HealthCheck. - - :return: The commit of this HealthCheck. - :rtype: str - """ # noqa: E501 - return self._commit - - @commit.setter - def commit(self, commit): - """Set the commit of this HealthCheck. - - :param commit: The commit of this HealthCheck. - :type: str - """ # noqa: E501 - self._commit = commit - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, HealthCheck): - 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/frogpilot/third_party/influxdb_client/domain/heatmap_view_properties.py b/frogpilot/third_party/influxdb_client/domain/heatmap_view_properties.py deleted file mode 100644 index c4061b18f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/heatmap_view_properties.py +++ /dev/null @@ -1,826 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class HeatmapViewProperties(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 = { - 'adaptive_zoom_hide': 'bool', - '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_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', - 'y_axis_label': 'str', - 'x_prefix': 'str', - 'x_suffix': 'str', - 'y_prefix': 'str', - 'y_suffix': 'str', - 'bin_size': 'float', - 'legend_colorize_rows': 'bool', - 'legend_hide': 'bool', - 'legend_opacity': 'float', - 'legend_orientation_threshold': 'int' - } - - attribute_map = { - 'adaptive_zoom_hide': 'adaptiveZoomHide', - '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_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', - 'y_axis_label': 'yAxisLabel', - 'x_prefix': 'xPrefix', - 'x_suffix': 'xSuffix', - 'y_prefix': 'yPrefix', - 'y_suffix': 'ySuffix', - 'bin_size': 'binSize', - 'legend_colorize_rows': 'legendColorizeRows', - 'legend_hide': 'legendHide', - 'legend_opacity': 'legendOpacity', - 'legend_orientation_threshold': 'legendOrientationThreshold' - } - - def __init__(self, adaptive_zoom_hide=None, 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 - - self._adaptive_zoom_hide = None - 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_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 - self._y_axis_label = None - self._x_prefix = None - self._x_suffix = None - 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 adaptive_zoom_hide is not None: - self.adaptive_zoom_hide = adaptive_zoom_hide - 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 - 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 - 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 - 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 adaptive_zoom_hide(self): - """Get the adaptive_zoom_hide of this HeatmapViewProperties. - - :return: The adaptive_zoom_hide of this HeatmapViewProperties. - :rtype: bool - """ # noqa: E501 - return self._adaptive_zoom_hide - - @adaptive_zoom_hide.setter - def adaptive_zoom_hide(self, adaptive_zoom_hide): - """Set the adaptive_zoom_hide of this HeatmapViewProperties. - - :param adaptive_zoom_hide: The adaptive_zoom_hide of this HeatmapViewProperties. - :type: bool - """ # noqa: E501 - self._adaptive_zoom_hide = adaptive_zoom_hide - - @property - def time_format(self): - """Get the time_format of this HeatmapViewProperties. - - :return: The time_format of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._time_format - - @time_format.setter - def time_format(self, time_format): - """Set the time_format of this HeatmapViewProperties. - - :param time_format: The time_format of this HeatmapViewProperties. - :type: str - """ # noqa: E501 - self._time_format = time_format - - @property - def type(self): - """Get the type of this HeatmapViewProperties. - - :return: The type of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this HeatmapViewProperties. - - :param type: The type of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The queries of this HeatmapViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this HeatmapViewProperties. - - :param queries: The queries of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this HeatmapViewProperties. - :rtype: list[str] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this HeatmapViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The shape of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this HeatmapViewProperties. - - :param shape: The shape of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The note of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this HeatmapViewProperties. - - :param note: The note of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The x_column of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_column - - @x_column.setter - def x_column(self, x_column): - """Set the x_column of this HeatmapViewProperties. - - :param x_column: The x_column of this HeatmapViewProperties. - :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 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. - - :return: The y_column of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._y_column - - @y_column.setter - def y_column(self, y_column): - """Set the y_column of this HeatmapViewProperties. - - :param y_column: The y_column of this HeatmapViewProperties. - :type: str - """ # noqa: E501 - if y_column is None: - 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. - - :return: The x_domain of this HeatmapViewProperties. - :rtype: list[float] - """ # noqa: E501 - return self._x_domain - - @x_domain.setter - def x_domain(self, x_domain): - """Set the x_domain of this HeatmapViewProperties. - - :param x_domain: The x_domain of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The y_domain of this HeatmapViewProperties. - :rtype: list[float] - """ # noqa: E501 - return self._y_domain - - @y_domain.setter - def y_domain(self, y_domain): - """Set the y_domain of this HeatmapViewProperties. - - :param y_domain: The y_domain of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The x_axis_label of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :param x_axis_label: The x_axis_label of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The y_axis_label of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :param y_axis_label: The y_axis_label of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The x_prefix of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_prefix - - @x_prefix.setter - def x_prefix(self, x_prefix): - """Set the x_prefix of this HeatmapViewProperties. - - :param x_prefix: The x_prefix of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The x_suffix of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_suffix - - @x_suffix.setter - def x_suffix(self, x_suffix): - """Set the x_suffix of this HeatmapViewProperties. - - :param x_suffix: The x_suffix of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The y_prefix of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._y_prefix - - @y_prefix.setter - def y_prefix(self, y_prefix): - """Set the y_prefix of this HeatmapViewProperties. - - :param y_prefix: The y_prefix of this HeatmapViewProperties. - :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 HeatmapViewProperties. - - :return: The y_suffix of this HeatmapViewProperties. - :rtype: str - """ # noqa: E501 - return self._y_suffix - - @y_suffix.setter - def y_suffix(self, y_suffix): - """Set the y_suffix of this HeatmapViewProperties. - - :param y_suffix: The y_suffix of this HeatmapViewProperties. - :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 bin_size(self): - """Get the bin_size of this HeatmapViewProperties. - - :return: The bin_size of this HeatmapViewProperties. - :rtype: float - """ # noqa: E501 - return self._bin_size - - @bin_size.setter - def bin_size(self, bin_size): - """Set the bin_size of this HeatmapViewProperties. - - :param bin_size: The bin_size of this HeatmapViewProperties. - :type: float - """ # noqa: E501 - if bin_size is None: - 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, HeatmapViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/histogram_view_properties.py b/frogpilot/third_party/influxdb_client/domain/histogram_view_properties.py deleted file mode 100644 index 750574306..000000000 --- a/frogpilot/third_party/influxdb_client/domain/histogram_view_properties.py +++ /dev/null @@ -1,476 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class HistogramViewProperties(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 = { - 'type': 'str', - 'queries': 'list[DashboardQuery]', - 'colors': 'list[DashboardColor]', - 'shape': 'str', - 'note': 'str', - 'show_note_when_empty': 'bool', - 'x_column': 'str', - 'fill_columns': 'list[str]', - 'x_domain': 'list[float]', - 'x_axis_label': 'str', - 'position': 'str', - 'bin_count': 'int', - 'legend_colorize_rows': 'bool', - 'legend_hide': 'bool', - 'legend_opacity': 'float', - 'legend_orientation_threshold': 'int' - } - - attribute_map = { - 'type': 'type', - 'queries': 'queries', - 'colors': 'colors', - 'shape': 'shape', - 'note': 'note', - 'show_note_when_empty': 'showNoteWhenEmpty', - 'x_column': 'xColumn', - 'fill_columns': 'fillColumns', - 'x_domain': 'xDomain', - 'x_axis_label': 'xAxisLabel', - 'position': 'position', - '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, 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 - - 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._fill_columns = None - self._x_domain = 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 - 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 - self.fill_columns = fill_columns - self.x_domain = x_domain - 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): - """Get the type of this HistogramViewProperties. - - :return: The type of this HistogramViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this HistogramViewProperties. - - :param type: The type of this HistogramViewProperties. - :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 HistogramViewProperties. - - :return: The queries of this HistogramViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this HistogramViewProperties. - - :param queries: The queries of this HistogramViewProperties. - :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 HistogramViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this HistogramViewProperties. - :rtype: list[DashboardColor] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this HistogramViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this HistogramViewProperties. - :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 HistogramViewProperties. - - :return: The shape of this HistogramViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this HistogramViewProperties. - - :param shape: The shape of this HistogramViewProperties. - :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 HistogramViewProperties. - - :return: The note of this HistogramViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this HistogramViewProperties. - - :param note: The note of this HistogramViewProperties. - :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 HistogramViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this HistogramViewProperties. - :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 HistogramViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this HistogramViewProperties. - :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 HistogramViewProperties. - - :return: The x_column of this HistogramViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_column - - @x_column.setter - def x_column(self, x_column): - """Set the x_column of this HistogramViewProperties. - - :param x_column: The x_column of this HistogramViewProperties. - :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 fill_columns(self): - """Get the fill_columns of this HistogramViewProperties. - - :return: The fill_columns of this HistogramViewProperties. - :rtype: list[str] - """ # noqa: E501 - return self._fill_columns - - @fill_columns.setter - def fill_columns(self, fill_columns): - """Set the fill_columns of this HistogramViewProperties. - - :param fill_columns: The fill_columns of this HistogramViewProperties. - :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 HistogramViewProperties. - - :return: The x_domain of this HistogramViewProperties. - :rtype: list[float] - """ # noqa: E501 - return self._x_domain - - @x_domain.setter - def x_domain(self, x_domain): - """Set the x_domain of this HistogramViewProperties. - - :param x_domain: The x_domain of this HistogramViewProperties. - :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 x_axis_label(self): - """Get the x_axis_label of this HistogramViewProperties. - - :return: The x_axis_label of this HistogramViewProperties. - :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 HistogramViewProperties. - - :param x_axis_label: The x_axis_label of this HistogramViewProperties. - :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 position(self): - """Get the position of this HistogramViewProperties. - - :return: The position of this HistogramViewProperties. - :rtype: str - """ # noqa: E501 - return self._position - - @position.setter - def position(self, position): - """Set the position of this HistogramViewProperties. - - :param position: The position of this HistogramViewProperties. - :type: str - """ # noqa: E501 - if position is None: - raise ValueError("Invalid value for `position`, must not be `None`") # noqa: E501 - self._position = position - - @property - def bin_count(self): - """Get the bin_count of this HistogramViewProperties. - - :return: The bin_count of this HistogramViewProperties. - :rtype: int - """ # noqa: E501 - return self._bin_count - - @bin_count.setter - def bin_count(self, bin_count): - """Set the bin_count of this HistogramViewProperties. - - :param bin_count: The bin_count of this HistogramViewProperties. - :type: int - """ # noqa: E501 - if bin_count is None: - 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, HistogramViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/http_notification_endpoint.py b/frogpilot/third_party/influxdb_client/domain/http_notification_endpoint.py deleted file mode 100644 index d8a48851e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/http_notification_endpoint.py +++ /dev/null @@ -1,301 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator - - -class HTTPNotificationEndpoint(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 = { - 'url': 'str', - 'username': 'str', - 'password': 'str', - 'token': 'str', - 'method': 'str', - 'auth_method': 'str', - 'content_template': 'str', - 'headers': 'dict(str, str)', - 'id': 'str', - 'org_id': 'str', - 'user_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'description': 'str', - 'name': 'str', - 'status': 'str', - 'labels': 'list[Label]', - 'links': 'NotificationEndpointBaseLinks', - 'type': 'NotificationEndpointType' - } - - attribute_map = { - 'url': 'url', - 'username': 'username', - 'password': 'password', - 'token': 'token', - 'method': 'method', - 'auth_method': 'authMethod', - 'content_template': 'contentTemplate', - 'headers': 'headers', - 'id': 'id', - 'org_id': 'orgID', - 'user_id': 'userID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'description': 'description', - 'name': 'name', - 'status': 'status', - 'labels': 'labels', - 'links': 'links', - 'type': 'type' - } - - 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 - 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 - self._password = None - self._token = None - self._method = None - self._auth_method = None - self._content_template = None - self._headers = None - self.discriminator = None - - self.url = url - if username is not None: - self.username = username - if password is not None: - self.password = password - if token is not None: - self.token = token - self.method = method - self.auth_method = auth_method - if content_template is not None: - self.content_template = content_template - if headers is not None: - self.headers = headers - - @property - def url(self): - """Get the url of this HTTPNotificationEndpoint. - - :return: The url of this HTTPNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._url - - @url.setter - def url(self, url): - """Set the url of this HTTPNotificationEndpoint. - - :param url: The url of this HTTPNotificationEndpoint. - :type: str - """ # noqa: E501 - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - self._url = url - - @property - def username(self): - """Get the username of this HTTPNotificationEndpoint. - - :return: The username of this HTTPNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._username - - @username.setter - def username(self, username): - """Set the username of this HTTPNotificationEndpoint. - - :param username: The username of this HTTPNotificationEndpoint. - :type: str - """ # noqa: E501 - self._username = username - - @property - def password(self): - """Get the password of this HTTPNotificationEndpoint. - - :return: The password of this HTTPNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._password - - @password.setter - def password(self, password): - """Set the password of this HTTPNotificationEndpoint. - - :param password: The password of this HTTPNotificationEndpoint. - :type: str - """ # noqa: E501 - self._password = password - - @property - def token(self): - """Get the token of this HTTPNotificationEndpoint. - - :return: The token of this HTTPNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._token - - @token.setter - def token(self, token): - """Set the token of this HTTPNotificationEndpoint. - - :param token: The token of this HTTPNotificationEndpoint. - :type: str - """ # noqa: E501 - self._token = token - - @property - def method(self): - """Get the method of this HTTPNotificationEndpoint. - - :return: The method of this HTTPNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._method - - @method.setter - def method(self, method): - """Set the method of this HTTPNotificationEndpoint. - - :param method: The method of this HTTPNotificationEndpoint. - :type: str - """ # noqa: E501 - if method is None: - raise ValueError("Invalid value for `method`, must not be `None`") # noqa: E501 - self._method = method - - @property - def auth_method(self): - """Get the auth_method of this HTTPNotificationEndpoint. - - :return: The auth_method of this HTTPNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._auth_method - - @auth_method.setter - def auth_method(self, auth_method): - """Set the auth_method of this HTTPNotificationEndpoint. - - :param auth_method: The auth_method of this HTTPNotificationEndpoint. - :type: str - """ # noqa: E501 - if auth_method is None: - raise ValueError("Invalid value for `auth_method`, must not be `None`") # noqa: E501 - self._auth_method = auth_method - - @property - def content_template(self): - """Get the content_template of this HTTPNotificationEndpoint. - - :return: The content_template of this HTTPNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._content_template - - @content_template.setter - def content_template(self, content_template): - """Set the content_template of this HTTPNotificationEndpoint. - - :param content_template: The content_template of this HTTPNotificationEndpoint. - :type: str - """ # noqa: E501 - self._content_template = content_template - - @property - def headers(self): - """Get the headers of this HTTPNotificationEndpoint. - - Customized headers. - - :return: The headers of this HTTPNotificationEndpoint. - :rtype: dict(str, str) - """ # noqa: E501 - return self._headers - - @headers.setter - def headers(self, headers): - """Set the headers of this HTTPNotificationEndpoint. - - Customized headers. - - :param headers: The headers of this HTTPNotificationEndpoint. - :type: dict(str, str) - """ # noqa: E501 - self._headers = headers - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, HTTPNotificationEndpoint): - 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/frogpilot/third_party/influxdb_client/domain/http_notification_rule.py b/frogpilot/third_party/influxdb_client/domain/http_notification_rule.py deleted file mode 100644 index 050b3fcc5..000000000 --- a/frogpilot/third_party/influxdb_client/domain/http_notification_rule.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.http_notification_rule_base import HTTPNotificationRuleBase - - -class HTTPNotificationRule(HTTPNotificationRuleBase): - """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', - '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', - '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="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, 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 self.openapi_types.items(): - 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, HTTPNotificationRule): - 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/frogpilot/third_party/influxdb_client/domain/http_notification_rule_base.py b/frogpilot/third_party/influxdb_client/domain/http_notification_rule_base.py deleted file mode 100644 index 521f9084d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/http_notification_rule_base.py +++ /dev/null @@ -1,181 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator - - -class HTTPNotificationRuleBase(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', - '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', - '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, 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 - - self.type = type - if url is not None: - self.url = url - - @property - def type(self): - """Get the type of this HTTPNotificationRuleBase. - - :return: The type of this HTTPNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this HTTPNotificationRuleBase. - - :param type: The type of this HTTPNotificationRuleBase. - :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 url(self): - """Get the url of this HTTPNotificationRuleBase. - - :return: The url of this HTTPNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._url - - @url.setter - def url(self, url): - """Set the url of this HTTPNotificationRuleBase. - - :param url: The url of this HTTPNotificationRuleBase. - :type: str - """ # noqa: E501 - self._url = url - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, HTTPNotificationRuleBase): - 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/frogpilot/third_party/influxdb_client/domain/identifier.py b/frogpilot/third_party/influxdb_client/domain/identifier.py deleted file mode 100644 index aa9a3fb29..000000000 --- a/frogpilot/third_party/influxdb_client/domain/identifier.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.property_key import PropertyKey - - -class Identifier(PropertyKey): - """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', - 'name': 'str' - } - - attribute_map = { - 'type': 'type', - 'name': 'name' - } - - 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 - - if type is not None: - self.type = type - if name is not None: - self.name = name - - @property - def type(self): - """Get the type of this Identifier. - - Type of AST node - - :return: The type of this Identifier. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Identifier. - - Type of AST node - - :param type: The type of this Identifier. - :type: str - """ # noqa: E501 - self._type = type - - @property - def name(self): - """Get the name of this Identifier. - - :return: The name of this Identifier. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Identifier. - - :param name: The name of this Identifier. - :type: str - """ # noqa: E501 - self._name = name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Identifier): - 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/frogpilot/third_party/influxdb_client/domain/import_declaration.py b/frogpilot/third_party/influxdb_client/domain/import_declaration.py deleted file mode 100644 index 435380cfa..000000000 --- a/frogpilot/third_party/influxdb_client/domain/import_declaration.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ImportDeclaration(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', - '_as': 'Identifier', - 'path': 'StringLiteral' - } - - attribute_map = { - 'type': 'type', - '_as': 'as', - 'path': 'path' - } - - def __init__(self, type=None, _as=None, path=None): # noqa: E501,D401,D403 - """ImportDeclaration - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self.__as = None - self._path = None - self.discriminator = None - - if type is not None: - self.type = type - if _as is not None: - self._as = _as - if path is not None: - self.path = path - - @property - def type(self): - """Get the type of this ImportDeclaration. - - Type of AST node - - :return: The type of this ImportDeclaration. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ImportDeclaration. - - Type of AST node - - :param type: The type of this ImportDeclaration. - :type: str - """ # noqa: E501 - self._type = type - - @property - def _as(self): - """Get the _as of this ImportDeclaration. - - :return: The _as of this ImportDeclaration. - :rtype: Identifier - """ # noqa: E501 - return self.__as - - @_as.setter - def _as(self, _as): - """Set the _as of this ImportDeclaration. - - :param _as: The _as of this ImportDeclaration. - :type: Identifier - """ # noqa: E501 - self.__as = _as - - @property - def path(self): - """Get the path of this ImportDeclaration. - - :return: The path of this ImportDeclaration. - :rtype: StringLiteral - """ # noqa: E501 - return self._path - - @path.setter - def path(self, path): - """Set the path of this ImportDeclaration. - - :param path: The path of this ImportDeclaration. - :type: StringLiteral - """ # noqa: E501 - self._path = path - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ImportDeclaration): - 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/frogpilot/third_party/influxdb_client/domain/index_expression.py b/frogpilot/third_party/influxdb_client/domain/index_expression.py deleted file mode 100644 index 4aedd7317..000000000 --- a/frogpilot/third_party/influxdb_client/domain/index_expression.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class IndexExpression(Expression): - """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', - 'array': 'Expression', - 'index': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'array': 'array', - 'index': 'index' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if array is not None: - self.array = array - if index is not None: - self.index = index - - @property - def type(self): - """Get the type of this IndexExpression. - - Type of AST node - - :return: The type of this IndexExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this IndexExpression. - - Type of AST node - - :param type: The type of this IndexExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def array(self): - """Get the array of this IndexExpression. - - :return: The array of this IndexExpression. - :rtype: Expression - """ # noqa: E501 - return self._array - - @array.setter - def array(self, array): - """Set the array of this IndexExpression. - - :param array: The array of this IndexExpression. - :type: Expression - """ # noqa: E501 - self._array = array - - @property - def index(self): - """Get the index of this IndexExpression. - - :return: The index of this IndexExpression. - :rtype: Expression - """ # noqa: E501 - return self._index - - @index.setter - def index(self, index): - """Set the index of this IndexExpression. - - :param index: The index of this IndexExpression. - :type: Expression - """ # noqa: E501 - self._index = index - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, IndexExpression): - 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/frogpilot/third_party/influxdb_client/domain/integer_literal.py b/frogpilot/third_party/influxdb_client/domain/integer_literal.py deleted file mode 100644 index dcedf78d3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/integer_literal.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class IntegerLiteral(Expression): - """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', - 'value': 'str' - } - - attribute_map = { - 'type': 'type', - 'value': 'value' - } - - 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 - - if type is not None: - self.type = type - if value is not None: - self.value = value - - @property - def type(self): - """Get the type of this IntegerLiteral. - - Type of AST node - - :return: The type of this IntegerLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this IntegerLiteral. - - Type of AST node - - :param type: The type of this IntegerLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def value(self): - """Get the value of this IntegerLiteral. - - :return: The value of this IntegerLiteral. - :rtype: str - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this IntegerLiteral. - - :param value: The value of this IntegerLiteral. - :type: str - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, IntegerLiteral): - 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/frogpilot/third_party/influxdb_client/domain/is_onboarding.py b/frogpilot/third_party/influxdb_client/domain/is_onboarding.py deleted file mode 100644 index 0e14abdb8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/is_onboarding.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class IsOnboarding(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 = { - 'allowed': 'bool' - } - - attribute_map = { - 'allowed': 'allowed' - } - - def __init__(self, allowed=None): # noqa: E501,D401,D403 - """IsOnboarding - a model defined in OpenAPI.""" # noqa: E501 - self._allowed = None - self.discriminator = None - - if allowed is not None: - self.allowed = allowed - - @property - def allowed(self): - """Get the allowed of this IsOnboarding. - - If `true`, the InfluxDB instance hasn't had initial setup; `false` otherwise. - - :return: The allowed of this IsOnboarding. - :rtype: bool - """ # noqa: E501 - return self._allowed - - @allowed.setter - def allowed(self, allowed): - """Set the allowed of this IsOnboarding. - - If `true`, the InfluxDB instance hasn't had initial setup; `false` otherwise. - - :param allowed: The allowed of this IsOnboarding. - :type: bool - """ # noqa: E501 - self._allowed = allowed - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, IsOnboarding): - 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/frogpilot/third_party/influxdb_client/domain/label.py b/frogpilot/third_party/influxdb_client/domain/label.py deleted file mode 100644 index cceaab955..000000000 --- a/frogpilot/third_party/influxdb_client/domain/label.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Label(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'name': 'str', - 'properties': 'dict(str, str)' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'name': 'name', - 'properties': 'properties' - } - - def __init__(self, id=None, org_id=None, name=None, properties=None): # noqa: E501,D401,D403 - """Label - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._name = None - self._properties = None - self.discriminator = None - - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if name is not None: - self.name = name - if properties is not None: - self.properties = properties - - @property - def id(self): - """Get the id of this Label. - - :return: The id of this Label. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Label. - - :param id: The id of this Label. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this Label. - - :return: The org_id of this Label. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Label. - - :param org_id: The org_id of this Label. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def name(self): - """Get the name of this Label. - - :return: The name of this Label. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Label. - - :param name: The name of this Label. - :type: str - """ # noqa: E501 - self._name = name - - @property - def properties(self): - """Get the properties of this Label. - - Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. - - :return: The properties of this Label. - :rtype: dict(str, str) - """ # noqa: E501 - return self._properties - - @properties.setter - def properties(self, properties): - """Set the properties of this Label. - - Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. - - :param properties: The properties of this Label. - :type: dict(str, str) - """ # noqa: E501 - self._properties = properties - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Label): - 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/frogpilot/third_party/influxdb_client/domain/label_create_request.py b/frogpilot/third_party/influxdb_client/domain/label_create_request.py deleted file mode 100644 index 73259eea6..000000000 --- a/frogpilot/third_party/influxdb_client/domain/label_create_request.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LabelCreateRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'org_id': 'str', - 'name': 'str', - 'properties': 'dict(str, str)' - } - - attribute_map = { - 'org_id': 'orgID', - 'name': 'name', - 'properties': 'properties' - } - - def __init__(self, org_id=None, name=None, properties=None): # noqa: E501,D401,D403 - """LabelCreateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._org_id = None - self._name = None - self._properties = None - self.discriminator = None - - self.org_id = org_id - self.name = name - if properties is not None: - self.properties = properties - - @property - def org_id(self): - """Get the org_id of this LabelCreateRequest. - - :return: The org_id of this LabelCreateRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this LabelCreateRequest. - - :param org_id: The org_id of this LabelCreateRequest. - :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 - def name(self): - """Get the name of this LabelCreateRequest. - - :return: The name of this LabelCreateRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this LabelCreateRequest. - - :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 - def properties(self): - """Get the properties of this LabelCreateRequest. - - Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. - - :return: The properties of this LabelCreateRequest. - :rtype: dict(str, str) - """ # noqa: E501 - return self._properties - - @properties.setter - def properties(self, properties): - """Set the properties of this LabelCreateRequest. - - Key-value pairs associated with this label. To remove a property, send an update with an empty value (`""`) for the key. - - :param properties: The properties of this LabelCreateRequest. - :type: dict(str, str) - """ # noqa: E501 - self._properties = properties - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LabelCreateRequest): - 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/frogpilot/third_party/influxdb_client/domain/label_mapping.py b/frogpilot/third_party/influxdb_client/domain/label_mapping.py deleted file mode 100644 index 909d1b38a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/label_mapping.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LabelMapping(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 = { - 'label_id': 'str' - } - - attribute_map = { - 'label_id': 'labelID' - } - - def __init__(self, label_id=None): # noqa: E501,D401,D403 - """LabelMapping - a model defined in OpenAPI.""" # noqa: E501 - self._label_id = None - self.discriminator = None - - self.label_id = label_id - - @property - def label_id(self): - """Get the label_id of this LabelMapping. - - A label ID. Specifies the label to attach. - - :return: The label_id of this LabelMapping. - :rtype: str - """ # noqa: E501 - return self._label_id - - @label_id.setter - def label_id(self, label_id): - """Set the label_id of this LabelMapping. - - A label ID. Specifies the label to attach. - - :param label_id: The label_id of this LabelMapping. - :type: str - """ # noqa: E501 - if label_id is None: - raise ValueError("Invalid value for `label_id`, must not be `None`") # noqa: E501 - self._label_id = label_id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LabelMapping): - 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/frogpilot/third_party/influxdb_client/domain/label_response.py b/frogpilot/third_party/influxdb_client/domain/label_response.py deleted file mode 100644 index 8eed84067..000000000 --- a/frogpilot/third_party/influxdb_client/domain/label_response.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LabelResponse(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 = { - 'label': 'Label', - 'links': 'Links' - } - - attribute_map = { - 'label': 'label', - 'links': 'links' - } - - def __init__(self, label=None, links=None): # noqa: E501,D401,D403 - """LabelResponse - a model defined in OpenAPI.""" # noqa: E501 - self._label = None - self._links = None - self.discriminator = None - - if label is not None: - self.label = label - if links is not None: - self.links = links - - @property - def label(self): - """Get the label of this LabelResponse. - - :return: The label of this LabelResponse. - :rtype: Label - """ # noqa: E501 - return self._label - - @label.setter - def label(self, label): - """Set the label of this LabelResponse. - - :param label: The label of this LabelResponse. - :type: Label - """ # noqa: E501 - self._label = label - - @property - def links(self): - """Get the links of this LabelResponse. - - :return: The links of this LabelResponse. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this LabelResponse. - - :param links: The links of this LabelResponse. - :type: Links - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LabelResponse): - 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/frogpilot/third_party/influxdb_client/domain/label_update.py b/frogpilot/third_party/influxdb_client/domain/label_update.py deleted file mode 100644 index c1a7c7ee7..000000000 --- a/frogpilot/third_party/influxdb_client/domain/label_update.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LabelUpdate(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', - 'properties': 'dict(str, str)' - } - - attribute_map = { - 'name': 'name', - 'properties': 'properties' - } - - def __init__(self, name=None, properties=None): # noqa: E501,D401,D403 - """LabelUpdate - a model defined in OpenAPI.""" # 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 LabelUpdate. - - :return: The name of this LabelUpdate. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this LabelUpdate. - - :param name: The name of this LabelUpdate. - :type: str - """ # noqa: E501 - self._name = name - - @property - def properties(self): - """Get the properties of this LabelUpdate. - - :return: The properties of this LabelUpdate. - :rtype: dict(str, str) - """ # noqa: E501 - return self._properties - - @properties.setter - def properties(self, properties): - """Set the properties of this LabelUpdate. - - :param properties: The properties of this LabelUpdate. - :type: dict(str, str) - """ # noqa: E501 - self._properties = properties - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LabelUpdate): - 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/frogpilot/third_party/influxdb_client/domain/labels_response.py b/frogpilot/third_party/influxdb_client/domain/labels_response.py deleted file mode 100644 index fee2fdc9c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/labels_response.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LabelsResponse(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 = { - 'labels': 'list[Label]', - 'links': 'Links' - } - - attribute_map = { - 'labels': 'labels', - 'links': 'links' - } - - def __init__(self, labels=None, links=None): # noqa: E501,D401,D403 - """LabelsResponse - a model defined in OpenAPI.""" # noqa: E501 - self._labels = None - self._links = None - self.discriminator = None - - if labels is not None: - self.labels = labels - if links is not None: - self.links = links - - @property - def labels(self): - """Get the labels of this LabelsResponse. - - :return: The labels of this LabelsResponse. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this LabelsResponse. - - :param labels: The labels of this LabelsResponse. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - @property - def links(self): - """Get the links of this LabelsResponse. - - :return: The links of this LabelsResponse. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this LabelsResponse. - - :param links: The links of this LabelsResponse. - :type: Links - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LabelsResponse): - 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/frogpilot/third_party/influxdb_client/domain/language_request.py b/frogpilot/third_party/influxdb_client/domain/language_request.py deleted file mode 100644 index 083e70a22..000000000 --- a/frogpilot/third_party/influxdb_client/domain/language_request.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LanguageRequest(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 = { - 'query': 'str' - } - - attribute_map = { - 'query': 'query' - } - - def __init__(self, query=None): # noqa: E501,D401,D403 - """LanguageRequest - a model defined in OpenAPI.""" # noqa: E501 - self._query = None - self.discriminator = None - - self.query = query - - @property - def query(self): - """Get the query of this LanguageRequest. - - The Flux query script to be analyzed. - - :return: The query of this LanguageRequest. - :rtype: str - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this LanguageRequest. - - The Flux query script to be analyzed. - - :param query: The query of this LanguageRequest. - :type: str - """ # noqa: E501 - if query is None: - raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501 - self._query = query - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LanguageRequest): - 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/frogpilot/third_party/influxdb_client/domain/legacy_authorization_post_request.py b/frogpilot/third_party/influxdb_client/domain/legacy_authorization_post_request.py deleted file mode 100644 index 2976671b4..000000000 --- a/frogpilot/third_party/influxdb_client/domain/legacy_authorization_post_request.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.authorization_update_request import AuthorizationUpdateRequest - - -class LegacyAuthorizationPostRequest(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', - 'token': 'str', - 'permissions': 'list[Permission]', - 'status': 'str', - 'description': 'str' - } - - attribute_map = { - 'org_id': 'orgID', - 'user_id': 'userID', - 'token': 'token', - 'permissions': 'permissions', - 'status': 'status', - 'description': 'description' - } - - def __init__(self, org_id=None, user_id=None, token=None, permissions=None, status='active', description=None): # noqa: E501,D401,D403 - """LegacyAuthorizationPostRequest - 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._token = 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 token is not None: - self.token = token - if permissions is not None: - self.permissions = permissions - - @property - def org_id(self): - """Get the org_id of this LegacyAuthorizationPostRequest. - - ID of org that authorization is scoped to. - - :return: The org_id of this LegacyAuthorizationPostRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this LegacyAuthorizationPostRequest. - - ID of org that authorization is scoped to. - - :param org_id: The org_id of this LegacyAuthorizationPostRequest. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def user_id(self): - """Get the user_id of this LegacyAuthorizationPostRequest. - - ID of user that authorization is scoped to. - - :return: The user_id of this LegacyAuthorizationPostRequest. - :rtype: str - """ # noqa: E501 - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Set the user_id of this LegacyAuthorizationPostRequest. - - ID of user that authorization is scoped to. - - :param user_id: The user_id of this LegacyAuthorizationPostRequest. - :type: str - """ # noqa: E501 - self._user_id = user_id - - @property - def token(self): - """Get the token of this LegacyAuthorizationPostRequest. - - Token (name) of the authorization - - :return: The token of this LegacyAuthorizationPostRequest. - :rtype: str - """ # noqa: E501 - return self._token - - @token.setter - def token(self, token): - """Set the token of this LegacyAuthorizationPostRequest. - - Token (name) of the authorization - - :param token: The token of this LegacyAuthorizationPostRequest. - :type: str - """ # noqa: E501 - self._token = token - - @property - def permissions(self): - """Get the permissions of this LegacyAuthorizationPostRequest. - - List of permissions for an auth. An auth must have at least one Permission. - - :return: The permissions of this LegacyAuthorizationPostRequest. - :rtype: list[Permission] - """ # noqa: E501 - return self._permissions - - @permissions.setter - def permissions(self, permissions): - """Set the permissions of this LegacyAuthorizationPostRequest. - - List of permissions for an auth. An auth must have at least one Permission. - - :param permissions: The permissions of this LegacyAuthorizationPostRequest. - :type: list[Permission] - """ # noqa: E501 - self._permissions = permissions - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LegacyAuthorizationPostRequest): - 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/frogpilot/third_party/influxdb_client/domain/lesser_threshold.py b/frogpilot/third_party/influxdb_client/domain/lesser_threshold.py deleted file mode 100644 index a75a19e27..000000000 --- a/frogpilot/third_party/influxdb_client/domain/lesser_threshold.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.threshold_base import ThresholdBase - - -class LesserThreshold(ThresholdBase): - """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', - 'value': 'float', - 'level': 'CheckStatusLevel', - 'all_values': 'bool' - } - - attribute_map = { - 'type': 'type', - 'value': 'value', - 'level': 'level', - 'all_values': 'allValues' - } - - def __init__(self, type="lesser", value=None, level=None, all_values=None): # noqa: E501,D401,D403 - """LesserThreshold - a model defined in OpenAPI.""" # noqa: E501 - ThresholdBase.__init__(self, level=level, all_values=all_values) # noqa: E501 - - self._type = None - self._value = None - self.discriminator = None - - self.type = type - self.value = value - - @property - def type(self): - """Get the type of this LesserThreshold. - - :return: The type of this LesserThreshold. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this LesserThreshold. - - :param type: The type of this LesserThreshold. - :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 value(self): - """Get the value of this LesserThreshold. - - :return: The value of this LesserThreshold. - :rtype: float - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this LesserThreshold. - - :param value: The value of this LesserThreshold. - :type: float - """ # noqa: E501 - if value is None: - raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LesserThreshold): - 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/frogpilot/third_party/influxdb_client/domain/line_plus_single_stat_properties.py b/frogpilot/third_party/influxdb_client/domain/line_plus_single_stat_properties.py deleted file mode 100644 index 5196ba03f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/line_plus_single_stat_properties.py +++ /dev/null @@ -1,797 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class LinePlusSingleStatProperties(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 = { - 'adaptive_zoom_hide': 'bool', - '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', - 'shade_below': 'bool', - 'hover_dimension': 'str', - 'position': 'str', - 'prefix': 'str', - 'suffix': 'str', - 'decimal_places': 'DecimalPlaces', - 'legend_colorize_rows': 'bool', - 'legend_hide': 'bool', - 'legend_opacity': 'float', - 'legend_orientation_threshold': 'int' - } - - attribute_map = { - 'adaptive_zoom_hide': 'adaptiveZoomHide', - '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', - 'shade_below': 'shadeBelow', - 'hover_dimension': 'hoverDimension', - 'position': 'position', - 'prefix': 'prefix', - 'suffix': 'suffix', - 'decimal_places': 'decimalPlaces', - 'legend_colorize_rows': 'legendColorizeRows', - 'legend_hide': 'legendHide', - 'legend_opacity': 'legendOpacity', - 'legend_orientation_threshold': 'legendOrientationThreshold' - } - - def __init__(self, adaptive_zoom_hide=None, 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._adaptive_zoom_hide = None - 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._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 adaptive_zoom_hide is not None: - self.adaptive_zoom_hide = adaptive_zoom_hide - 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 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 adaptive_zoom_hide(self): - """Get the adaptive_zoom_hide of this LinePlusSingleStatProperties. - - :return: The adaptive_zoom_hide of this LinePlusSingleStatProperties. - :rtype: bool - """ # noqa: E501 - return self._adaptive_zoom_hide - - @adaptive_zoom_hide.setter - def adaptive_zoom_hide(self, adaptive_zoom_hide): - """Set the adaptive_zoom_hide of this LinePlusSingleStatProperties. - - :param adaptive_zoom_hide: The adaptive_zoom_hide of this LinePlusSingleStatProperties. - :type: bool - """ # noqa: E501 - self._adaptive_zoom_hide = adaptive_zoom_hide - - @property - def time_format(self): - """Get the time_format of this LinePlusSingleStatProperties. - - :return: The time_format of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._time_format - - @time_format.setter - def time_format(self, time_format): - """Set the time_format of this LinePlusSingleStatProperties. - - :param time_format: The time_format of this LinePlusSingleStatProperties. - :type: str - """ # noqa: E501 - self._time_format = time_format - - @property - def type(self): - """Get the type of this LinePlusSingleStatProperties. - - :return: The type of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this LinePlusSingleStatProperties. - - :param type: The type of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - :return: The queries of this LinePlusSingleStatProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this LinePlusSingleStatProperties. - - :param queries: The queries of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this LinePlusSingleStatProperties. - :rtype: list[DashboardColor] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this LinePlusSingleStatProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - :return: The shape of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this LinePlusSingleStatProperties. - - :param shape: The shape of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - :return: The note of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this LinePlusSingleStatProperties. - - :param note: The note of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - :return: The axes of this LinePlusSingleStatProperties. - :rtype: Axes - """ # noqa: E501 - return self._axes - - @axes.setter - def axes(self, axes): - """Set the axes of this LinePlusSingleStatProperties. - - :param axes: The axes of this LinePlusSingleStatProperties. - :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 LinePlusSingleStatProperties. - - :return: The static_legend of this LinePlusSingleStatProperties. - :rtype: StaticLegend - """ # noqa: E501 - return self._static_legend - - @static_legend.setter - def static_legend(self, static_legend): - """Set the static_legend of this LinePlusSingleStatProperties. - - :param static_legend: The static_legend of this LinePlusSingleStatProperties. - :type: StaticLegend - """ # noqa: E501 - self._static_legend = static_legend - - @property - def x_column(self): - """Get the x_column of this LinePlusSingleStatProperties. - - :return: The x_column of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._x_column - - @x_column.setter - def x_column(self, x_column): - """Set the x_column of this LinePlusSingleStatProperties. - - :param x_column: The x_column of this LinePlusSingleStatProperties. - :type: str - """ # 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. - - :return: The y_column of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._y_column - - @y_column.setter - def y_column(self, y_column): - """Set the y_column of this LinePlusSingleStatProperties. - - :param y_column: The y_column of this LinePlusSingleStatProperties. - :type: str - """ # 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. - - :return: The shade_below of this LinePlusSingleStatProperties. - :rtype: bool - """ # noqa: E501 - return self._shade_below - - @shade_below.setter - def shade_below(self, shade_below): - """Set the shade_below of this LinePlusSingleStatProperties. - - :param shade_below: The shade_below of this LinePlusSingleStatProperties. - :type: bool - """ # 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. - - :return: The position of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._position - - @position.setter - def position(self, position): - """Set the position of this LinePlusSingleStatProperties. - - :param position: The position of this LinePlusSingleStatProperties. - :type: str - """ # noqa: E501 - if position is None: - raise ValueError("Invalid value for `position`, must not be `None`") # noqa: E501 - self._position = position - - @property - def prefix(self): - """Get the prefix of this LinePlusSingleStatProperties. - - :return: The prefix of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._prefix - - @prefix.setter - def prefix(self, prefix): - """Set the prefix of this LinePlusSingleStatProperties. - - :param prefix: The prefix of this LinePlusSingleStatProperties. - :type: str - """ # noqa: E501 - if prefix is None: - raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 - self._prefix = prefix - - @property - def suffix(self): - """Get the suffix of this LinePlusSingleStatProperties. - - :return: The suffix of this LinePlusSingleStatProperties. - :rtype: str - """ # noqa: E501 - return self._suffix - - @suffix.setter - def suffix(self, suffix): - """Set the suffix of this LinePlusSingleStatProperties. - - :param suffix: The suffix of this LinePlusSingleStatProperties. - :type: str - """ # noqa: E501 - if suffix is None: - raise ValueError("Invalid value for `suffix`, must not be `None`") # noqa: E501 - self._suffix = suffix - - @property - def decimal_places(self): - """Get the decimal_places of this LinePlusSingleStatProperties. - - :return: The decimal_places of this LinePlusSingleStatProperties. - :rtype: DecimalPlaces - """ # noqa: E501 - return self._decimal_places - - @decimal_places.setter - def decimal_places(self, decimal_places): - """Set the decimal_places of this LinePlusSingleStatProperties. - - :param decimal_places: The decimal_places of this LinePlusSingleStatProperties. - :type: DecimalPlaces - """ # noqa: E501 - if decimal_places is None: - 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, LinePlusSingleStatProperties): - 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/frogpilot/third_party/influxdb_client/domain/line_protocol_error.py b/frogpilot/third_party/influxdb_client/domain/line_protocol_error.py deleted file mode 100644 index 2050a8b28..000000000 --- a/frogpilot/third_party/influxdb_client/domain/line_protocol_error.py +++ /dev/null @@ -1,220 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LineProtocolError(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 = { - 'code': 'str', - 'message': 'str', - 'op': 'str', - 'err': 'str', - 'line': 'int' - } - - attribute_map = { - 'code': 'code', - 'message': 'message', - 'op': 'op', - 'err': 'err', - 'line': 'line' - } - - def __init__(self, code=None, message=None, op=None, err=None, line=None): # noqa: E501,D401,D403 - """LineProtocolError - a model defined in OpenAPI.""" # noqa: E501 - self._code = None - self._message = None - self._op = None - self._err = None - self._line = None - self.discriminator = None - - self.code = code - if message is not None: - self.message = message - if op is not None: - self.op = op - if err is not None: - self.err = err - if line is not None: - self.line = line - - @property - def code(self): - """Get the code of this LineProtocolError. - - Code is the machine-readable error code. - - :return: The code of this LineProtocolError. - :rtype: str - """ # noqa: E501 - return self._code - - @code.setter - def code(self, code): - """Set the code of this LineProtocolError. - - Code is the machine-readable error code. - - :param code: The code of this LineProtocolError. - :type: str - """ # noqa: E501 - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - self._code = code - - @property - def message(self): - """Get the message of this LineProtocolError. - - Human-readable message. - - :return: The message of this LineProtocolError. - :rtype: str - """ # noqa: E501 - return self._message - - @message.setter - def message(self, message): - """Set the message of this LineProtocolError. - - Human-readable message. - - :param message: The message of this LineProtocolError. - :type: str - """ # noqa: E501 - self._message = message - - @property - def op(self): - """Get the op of this LineProtocolError. - - Describes the logical code operation when the error occurred. Useful for debugging. - - :return: The op of this LineProtocolError. - :rtype: str - """ # noqa: E501 - return self._op - - @op.setter - def op(self, op): - """Set the op of this LineProtocolError. - - Describes the logical code operation when the error occurred. Useful for debugging. - - :param op: The op of this LineProtocolError. - :type: str - """ # noqa: E501 - self._op = op - - @property - def err(self): - """Get the err of this LineProtocolError. - - Stack of errors that occurred during processing of the request. Useful for debugging. - - :return: The err of this LineProtocolError. - :rtype: str - """ # noqa: E501 - return self._err - - @err.setter - def err(self, err): - """Set the err of this LineProtocolError. - - Stack of errors that occurred during processing of the request. Useful for debugging. - - :param err: The err of this LineProtocolError. - :type: str - """ # noqa: E501 - self._err = err - - @property - def line(self): - """Get the line of this LineProtocolError. - - First line in the request body that contains malformed data. - - :return: The line of this LineProtocolError. - :rtype: int - """ # noqa: E501 - return self._line - - @line.setter - def line(self, line): - """Set the line of this LineProtocolError. - - First line in the request body that contains malformed data. - - :param line: The line of this LineProtocolError. - :type: int - """ # noqa: E501 - self._line = line - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LineProtocolError): - 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/frogpilot/third_party/influxdb_client/domain/line_protocol_length_error.py b/frogpilot/third_party/influxdb_client/domain/line_protocol_length_error.py deleted file mode 100644 index d40aa6ae4..000000000 --- a/frogpilot/third_party/influxdb_client/domain/line_protocol_length_error.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LineProtocolLengthError(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 = { - 'code': 'str', - 'message': 'str' - } - - attribute_map = { - 'code': 'code', - 'message': 'message' - } - - def __init__(self, code=None, message=None): # noqa: E501,D401,D403 - """LineProtocolLengthError - a model defined in OpenAPI.""" # noqa: E501 - self._code = None - self._message = None - self.discriminator = None - - self.code = code - self.message = message - - @property - def code(self): - """Get the code of this LineProtocolLengthError. - - Code is the machine-readable error code. - - :return: The code of this LineProtocolLengthError. - :rtype: str - """ # noqa: E501 - return self._code - - @code.setter - def code(self, code): - """Set the code of this LineProtocolLengthError. - - Code is the machine-readable error code. - - :param code: The code of this LineProtocolLengthError. - :type: str - """ # noqa: E501 - if code is None: - raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - self._code = code - - @property - def message(self): - """Get the message of this LineProtocolLengthError. - - Human-readable message. - - :return: The message of this LineProtocolLengthError. - :rtype: str - """ # noqa: E501 - return self._message - - @message.setter - def message(self, message): - """Set the message of this LineProtocolLengthError. - - Human-readable message. - - :param message: The message of this LineProtocolLengthError. - :type: str - """ # noqa: E501 - if message is None: - raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 - self._message = message - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LineProtocolLengthError): - 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/frogpilot/third_party/influxdb_client/domain/links.py b/frogpilot/third_party/influxdb_client/domain/links.py deleted file mode 100644 index d9844c8b0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/links.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Links(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 = { - 'next': 'str', - '_self': 'str', - 'prev': 'str' - } - - attribute_map = { - 'next': 'next', - '_self': 'self', - 'prev': 'prev' - } - - def __init__(self, next=None, _self=None, prev=None): # noqa: E501,D401,D403 - """Links - a model defined in OpenAPI.""" # noqa: E501 - self._next = None - self.__self = None - self._prev = None - self.discriminator = None - - if next is not None: - self.next = next - self._self = _self - if prev is not None: - self.prev = prev - - @property - def next(self): - """Get the next of this Links. - - URI of resource. - - :return: The next of this Links. - :rtype: str - """ # noqa: E501 - return self._next - - @next.setter - def next(self, next): - """Set the next of this Links. - - URI of resource. - - :param next: The next of this Links. - :type: str - """ # noqa: E501 - self._next = next - - @property - def _self(self): - """Get the _self of this Links. - - URI of resource. - - :return: The _self of this Links. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this Links. - - URI of resource. - - :param _self: The _self of this Links. - :type: str - """ # noqa: E501 - if _self is None: - raise ValueError("Invalid value for `_self`, must not be `None`") # noqa: E501 - self.__self = _self - - @property - def prev(self): - """Get the prev of this Links. - - URI of resource. - - :return: The prev of this Links. - :rtype: str - """ # noqa: E501 - return self._prev - - @prev.setter - def prev(self, prev): - """Set the prev of this Links. - - URI of resource. - - :param prev: The prev of this Links. - :type: str - """ # noqa: E501 - self._prev = prev - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Links): - 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/frogpilot/third_party/influxdb_client/domain/list_stacks_response.py b/frogpilot/third_party/influxdb_client/domain/list_stacks_response.py deleted file mode 100644 index 084e34024..000000000 --- a/frogpilot/third_party/influxdb_client/domain/list_stacks_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ListStacksResponse(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 = { - 'stacks': 'list[Stack]' - } - - attribute_map = { - 'stacks': 'stacks' - } - - def __init__(self, stacks=None): # noqa: E501,D401,D403 - """ListStacksResponse - a model defined in OpenAPI.""" # noqa: E501 - self._stacks = None - self.discriminator = None - - if stacks is not None: - self.stacks = stacks - - @property - def stacks(self): - """Get the stacks of this ListStacksResponse. - - :return: The stacks of this ListStacksResponse. - :rtype: list[Stack] - """ # noqa: E501 - return self._stacks - - @stacks.setter - def stacks(self, stacks): - """Set the stacks of this ListStacksResponse. - - :param stacks: The stacks of this ListStacksResponse. - :type: list[Stack] - """ # noqa: E501 - self._stacks = stacks - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ListStacksResponse): - 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/frogpilot/third_party/influxdb_client/domain/log_event.py b/frogpilot/third_party/influxdb_client/domain/log_event.py deleted file mode 100644 index 336736e82..000000000 --- a/frogpilot/third_party/influxdb_client/domain/log_event.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class LogEvent(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 = { - 'time': 'datetime', - 'message': 'str', - 'run_id': 'str' - } - - attribute_map = { - 'time': 'time', - 'message': 'message', - 'run_id': 'runID' - } - - 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): - """Get the time of this LogEvent. - - The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) that the event occurred. - - :return: The time of this LogEvent. - :rtype: datetime - """ # noqa: E501 - return self._time - - @time.setter - def time(self, time): - """Set the time of this LogEvent. - - The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) that the event occurred. - - :param time: The time of this LogEvent. - :type: datetime - """ # noqa: E501 - self._time = time - - @property - def message(self): - """Get the message of this LogEvent. - - A description of the event that occurred. - - :return: The message of this LogEvent. - :rtype: str - """ # noqa: E501 - return self._message - - @message.setter - def message(self, message): - """Set the message of this LogEvent. - - A description of the event that occurred. - - :param message: The message of this LogEvent. - :type: str - """ # noqa: E501 - self._message = message - - @property - def run_id(self): - """Get the run_id of this LogEvent. - - The ID of the task run that generated the event. - - :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 run that generated the event. - - :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 = {} - - for attr, _ in self.openapi_types.items(): - 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, LogEvent): - 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/frogpilot/third_party/influxdb_client/domain/logical_expression.py b/frogpilot/third_party/influxdb_client/domain/logical_expression.py deleted file mode 100644 index 25a1aa9b1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/logical_expression.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class LogicalExpression(Expression): - """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', - 'operator': 'str', - 'left': 'Expression', - 'right': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'operator': 'operator', - 'left': 'left', - 'right': 'right' - } - - 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 - self._right = None - self.discriminator = None - - if type is not None: - self.type = type - if operator is not None: - self.operator = operator - if left is not None: - self.left = left - if right is not None: - self.right = right - - @property - def type(self): - """Get the type of this LogicalExpression. - - Type of AST node - - :return: The type of this LogicalExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this LogicalExpression. - - Type of AST node - - :param type: The type of this LogicalExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def operator(self): - """Get the operator of this LogicalExpression. - - :return: The operator of this LogicalExpression. - :rtype: str - """ # noqa: E501 - return self._operator - - @operator.setter - def operator(self, operator): - """Set the operator of this LogicalExpression. - - :param operator: The operator of this LogicalExpression. - :type: str - """ # noqa: E501 - self._operator = operator - - @property - def left(self): - """Get the left of this LogicalExpression. - - :return: The left of this LogicalExpression. - :rtype: Expression - """ # noqa: E501 - return self._left - - @left.setter - def left(self, left): - """Set the left of this LogicalExpression. - - :param left: The left of this LogicalExpression. - :type: Expression - """ # noqa: E501 - self._left = left - - @property - def right(self): - """Get the right of this LogicalExpression. - - :return: The right of this LogicalExpression. - :rtype: Expression - """ # noqa: E501 - return self._right - - @right.setter - def right(self, right): - """Set the right of this LogicalExpression. - - :param right: The right of this LogicalExpression. - :type: Expression - """ # noqa: E501 - self._right = right - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, LogicalExpression): - 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/frogpilot/third_party/influxdb_client/domain/logs.py b/frogpilot/third_party/influxdb_client/domain/logs.py deleted file mode 100644 index 0dd2acfdc..000000000 --- a/frogpilot/third_party/influxdb_client/domain/logs.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Logs(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 = { - 'events': 'list[LogEvent]' - } - - attribute_map = { - 'events': 'events' - } - - def __init__(self, events=None): # noqa: E501,D401,D403 - """Logs - a model defined in OpenAPI.""" # noqa: E501 - self._events = None - self.discriminator = None - - if events is not None: - self.events = events - - @property - def events(self): - """Get the events of this Logs. - - :return: The events of this Logs. - :rtype: list[LogEvent] - """ # noqa: E501 - return self._events - - @events.setter - def events(self, events): - """Set the events of this Logs. - - :param events: The events of this Logs. - :type: list[LogEvent] - """ # noqa: E501 - self._events = events - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Logs): - 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/frogpilot/third_party/influxdb_client/domain/map_variable_properties.py b/frogpilot/third_party/influxdb_client/domain/map_variable_properties.py deleted file mode 100644 index 8648d9cb9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/map_variable_properties.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.variable_properties import VariableProperties - - -class MapVariableProperties(VariableProperties): - """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', - 'values': 'dict(str, str)' - } - - attribute_map = { - 'type': 'type', - 'values': 'values' - } - - 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 - - if type is not None: - self.type = type - if values is not None: - self.values = values - - @property - def type(self): - """Get the type of this MapVariableProperties. - - :return: The type of this MapVariableProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this MapVariableProperties. - - :param type: The type of this MapVariableProperties. - :type: str - """ # noqa: E501 - self._type = type - - @property - def values(self): - """Get the values of this MapVariableProperties. - - :return: The values of this MapVariableProperties. - :rtype: dict(str, str) - """ # noqa: E501 - return self._values - - @values.setter - def values(self, values): - """Set the values of this MapVariableProperties. - - :param values: The values of this MapVariableProperties. - :type: dict(str, str) - """ # noqa: E501 - self._values = values - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MapVariableProperties): - 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/frogpilot/third_party/influxdb_client/domain/markdown_view_properties.py b/frogpilot/third_party/influxdb_client/domain/markdown_view_properties.py deleted file mode 100644 index cc797f06d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/markdown_view_properties.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class MarkdownViewProperties(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 = { - 'type': 'str', - 'shape': 'str', - 'note': 'str' - } - - attribute_map = { - 'type': 'type', - 'shape': 'shape', - 'note': 'note' - } - - def __init__(self, type=None, shape=None, note=None): # noqa: E501,D401,D403 - """MarkdownViewProperties - a model defined in OpenAPI.""" # noqa: E501 - ViewProperties.__init__(self) # noqa: E501 - - self._type = None - self._shape = None - self._note = None - self.discriminator = None - - self.type = type - self.shape = shape - self.note = note - - @property - def type(self): - """Get the type of this MarkdownViewProperties. - - :return: The type of this MarkdownViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this MarkdownViewProperties. - - :param type: The type of this MarkdownViewProperties. - :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 shape(self): - """Get the shape of this MarkdownViewProperties. - - :return: The shape of this MarkdownViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this MarkdownViewProperties. - - :param shape: The shape of this MarkdownViewProperties. - :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 MarkdownViewProperties. - - :return: The note of this MarkdownViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this MarkdownViewProperties. - - :param note: The note of this MarkdownViewProperties. - :type: str - """ # noqa: E501 - if note is None: - raise ValueError("Invalid value for `note`, must not be `None`") # noqa: E501 - self._note = note - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MarkdownViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/measurement_schema.py b/frogpilot/third_party/influxdb_client/domain/measurement_schema.py deleted file mode 100644 index f2a48faa1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/measurement_schema.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class MeasurementSchema(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'bucket_id': 'str', - 'name': 'str', - 'columns': 'list[MeasurementSchemaColumn]', - 'created_at': 'datetime', - 'updated_at': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'bucket_id': 'bucketID', - 'name': 'name', - 'columns': 'columns', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, id=None, org_id=None, bucket_id=None, name=None, columns=None, created_at=None, updated_at=None): # noqa: E501,D401,D403 - """MeasurementSchema - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._bucket_id = None - self._name = None - self._columns = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - self.id = id - if org_id is not None: - self.org_id = org_id - if bucket_id is not None: - self.bucket_id = bucket_id - self.name = name - self.columns = columns - self.created_at = created_at - self.updated_at = updated_at - - @property - def id(self): - """Get the id of this MeasurementSchema. - - :return: The id of this MeasurementSchema. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this MeasurementSchema. - - :param id: The id of this MeasurementSchema. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this MeasurementSchema. - - The ID of the organization. - - :return: The org_id of this MeasurementSchema. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this MeasurementSchema. - - The ID of the organization. - - :param org_id: The org_id of this MeasurementSchema. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def bucket_id(self): - """Get the bucket_id of this MeasurementSchema. - - The ID of the bucket that the measurement schema is associated with. - - :return: The bucket_id of this MeasurementSchema. - :rtype: str - """ # noqa: E501 - return self._bucket_id - - @bucket_id.setter - def bucket_id(self, bucket_id): - """Set the bucket_id of this MeasurementSchema. - - The ID of the bucket that the measurement schema is associated with. - - :param bucket_id: The bucket_id of this MeasurementSchema. - :type: str - """ # noqa: E501 - self._bucket_id = bucket_id - - @property - def name(self): - """Get the name of this MeasurementSchema. - - :return: The name of this MeasurementSchema. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this MeasurementSchema. - - :param name: The name of this MeasurementSchema. - :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 columns(self): - """Get the columns of this MeasurementSchema. - - Ordered collection of column definitions. - - :return: The columns of this MeasurementSchema. - :rtype: list[MeasurementSchemaColumn] - """ # noqa: E501 - return self._columns - - @columns.setter - def columns(self, columns): - """Set the columns of this MeasurementSchema. - - Ordered collection of column definitions. - - :param columns: The columns of this MeasurementSchema. - :type: list[MeasurementSchemaColumn] - """ # noqa: E501 - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - self._columns = columns - - @property - def created_at(self): - """Get the created_at of this MeasurementSchema. - - :return: The created_at of this MeasurementSchema. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this MeasurementSchema. - - :param created_at: The created_at of this MeasurementSchema. - :type: datetime - """ # noqa: E501 - if created_at is None: - raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this MeasurementSchema. - - :return: The updated_at of this MeasurementSchema. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this MeasurementSchema. - - :param updated_at: The updated_at of this MeasurementSchema. - :type: datetime - """ # noqa: E501 - if updated_at is None: - raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 - self._updated_at = updated_at - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MeasurementSchema): - 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/frogpilot/third_party/influxdb_client/domain/measurement_schema_column.py b/frogpilot/third_party/influxdb_client/domain/measurement_schema_column.py deleted file mode 100644 index 79ee3845f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/measurement_schema_column.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class MeasurementSchemaColumn(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', - 'type': 'ColumnSemanticType', - 'data_type': 'ColumnDataType' - } - - attribute_map = { - 'name': 'name', - 'type': 'type', - 'data_type': 'dataType' - } - - def __init__(self, name=None, type=None, data_type=None): # noqa: E501,D401,D403 - """MeasurementSchemaColumn - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._type = None - self._data_type = None - self.discriminator = None - - self.name = name - self.type = type - if data_type is not None: - self.data_type = data_type - - @property - def name(self): - """Get the name of this MeasurementSchemaColumn. - - :return: The name of this MeasurementSchemaColumn. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this MeasurementSchemaColumn. - - :param name: The name of this MeasurementSchemaColumn. - :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 type(self): - """Get the type of this MeasurementSchemaColumn. - - :return: The type of this MeasurementSchemaColumn. - :rtype: ColumnSemanticType - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this MeasurementSchemaColumn. - - :param type: The type of this MeasurementSchemaColumn. - :type: ColumnSemanticType - """ # noqa: E501 - if type is None: - raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - self._type = type - - @property - def data_type(self): - """Get the data_type of this MeasurementSchemaColumn. - - :return: The data_type of this MeasurementSchemaColumn. - :rtype: ColumnDataType - """ # noqa: E501 - return self._data_type - - @data_type.setter - def data_type(self, data_type): - """Set the data_type of this MeasurementSchemaColumn. - - :param data_type: The data_type of this MeasurementSchemaColumn. - :type: ColumnDataType - """ # noqa: E501 - self._data_type = data_type - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MeasurementSchemaColumn): - 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/frogpilot/third_party/influxdb_client/domain/measurement_schema_create_request.py b/frogpilot/third_party/influxdb_client/domain/measurement_schema_create_request.py deleted file mode 100644 index 1308a2daa..000000000 --- a/frogpilot/third_party/influxdb_client/domain/measurement_schema_create_request.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class MeasurementSchemaCreateRequest(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', - 'columns': 'list[MeasurementSchemaColumn]' - } - - attribute_map = { - 'name': 'name', - 'columns': 'columns' - } - - def __init__(self, name=None, columns=None): # noqa: E501,D401,D403 - """MeasurementSchemaCreateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._columns = None - self.discriminator = None - - self.name = name - self.columns = columns - - @property - def name(self): - """Get the name of this MeasurementSchemaCreateRequest. - - The [measurement](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#measurement) name. - - :return: The name of this MeasurementSchemaCreateRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this MeasurementSchemaCreateRequest. - - The [measurement](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#measurement) name. - - :param name: The name of this MeasurementSchemaCreateRequest. - :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 columns(self): - """Get the columns of this MeasurementSchemaCreateRequest. - - Ordered collection of column definitions. - - :return: The columns of this MeasurementSchemaCreateRequest. - :rtype: list[MeasurementSchemaColumn] - """ # noqa: E501 - return self._columns - - @columns.setter - def columns(self, columns): - """Set the columns of this MeasurementSchemaCreateRequest. - - Ordered collection of column definitions. - - :param columns: The columns of this MeasurementSchemaCreateRequest. - :type: list[MeasurementSchemaColumn] - """ # noqa: E501 - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - self._columns = columns - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MeasurementSchemaCreateRequest): - 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/frogpilot/third_party/influxdb_client/domain/measurement_schema_list.py b/frogpilot/third_party/influxdb_client/domain/measurement_schema_list.py deleted file mode 100644 index f8a83ddaa..000000000 --- a/frogpilot/third_party/influxdb_client/domain/measurement_schema_list.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class MeasurementSchemaList(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 = { - 'measurement_schemas': 'list[MeasurementSchema]' - } - - attribute_map = { - 'measurement_schemas': 'measurementSchemas' - } - - def __init__(self, measurement_schemas=None): # noqa: E501,D401,D403 - """MeasurementSchemaList - a model defined in OpenAPI.""" # noqa: E501 - self._measurement_schemas = None - self.discriminator = None - - self.measurement_schemas = measurement_schemas - - @property - def measurement_schemas(self): - """Get the measurement_schemas of this MeasurementSchemaList. - - :return: The measurement_schemas of this MeasurementSchemaList. - :rtype: list[MeasurementSchema] - """ # noqa: E501 - return self._measurement_schemas - - @measurement_schemas.setter - def measurement_schemas(self, measurement_schemas): - """Set the measurement_schemas of this MeasurementSchemaList. - - :param measurement_schemas: The measurement_schemas of this MeasurementSchemaList. - :type: list[MeasurementSchema] - """ # noqa: E501 - if measurement_schemas is None: - raise ValueError("Invalid value for `measurement_schemas`, must not be `None`") # noqa: E501 - self._measurement_schemas = measurement_schemas - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MeasurementSchemaList): - 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/frogpilot/third_party/influxdb_client/domain/measurement_schema_update_request.py b/frogpilot/third_party/influxdb_client/domain/measurement_schema_update_request.py deleted file mode 100644 index bdfa19c29..000000000 --- a/frogpilot/third_party/influxdb_client/domain/measurement_schema_update_request.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class MeasurementSchemaUpdateRequest(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 = { - 'columns': 'list[MeasurementSchemaColumn]' - } - - attribute_map = { - 'columns': 'columns' - } - - def __init__(self, columns=None): # noqa: E501,D401,D403 - """MeasurementSchemaUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._columns = None - self.discriminator = None - - self.columns = columns - - @property - def columns(self): - """Get the columns of this MeasurementSchemaUpdateRequest. - - An ordered collection of column definitions - - :return: The columns of this MeasurementSchemaUpdateRequest. - :rtype: list[MeasurementSchemaColumn] - """ # noqa: E501 - return self._columns - - @columns.setter - def columns(self, columns): - """Set the columns of this MeasurementSchemaUpdateRequest. - - An ordered collection of column definitions - - :param columns: The columns of this MeasurementSchemaUpdateRequest. - :type: list[MeasurementSchemaColumn] - """ # noqa: E501 - if columns is None: - raise ValueError("Invalid value for `columns`, must not be `None`") # noqa: E501 - self._columns = columns - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MeasurementSchemaUpdateRequest): - 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/frogpilot/third_party/influxdb_client/domain/member_assignment.py b/frogpilot/third_party/influxdb_client/domain/member_assignment.py deleted file mode 100644 index 7773b0e40..000000000 --- a/frogpilot/third_party/influxdb_client/domain/member_assignment.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class MemberAssignment(Statement): - """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', - 'member': 'MemberExpression', - 'init': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'member': 'member', - 'init': 'init' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if member is not None: - self.member = member - if init is not None: - self.init = init - - @property - def type(self): - """Get the type of this MemberAssignment. - - Type of AST node - - :return: The type of this MemberAssignment. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this MemberAssignment. - - Type of AST node - - :param type: The type of this MemberAssignment. - :type: str - """ # noqa: E501 - self._type = type - - @property - def member(self): - """Get the member of this MemberAssignment. - - :return: The member of this MemberAssignment. - :rtype: MemberExpression - """ # noqa: E501 - return self._member - - @member.setter - def member(self, member): - """Set the member of this MemberAssignment. - - :param member: The member of this MemberAssignment. - :type: MemberExpression - """ # noqa: E501 - self._member = member - - @property - def init(self): - """Get the init of this MemberAssignment. - - :return: The init of this MemberAssignment. - :rtype: Expression - """ # noqa: E501 - return self._init - - @init.setter - def init(self, init): - """Set the init of this MemberAssignment. - - :param init: The init of this MemberAssignment. - :type: Expression - """ # noqa: E501 - self._init = init - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MemberAssignment): - 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/frogpilot/third_party/influxdb_client/domain/member_expression.py b/frogpilot/third_party/influxdb_client/domain/member_expression.py deleted file mode 100644 index decf2c48c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/member_expression.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class MemberExpression(Expression): - """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', - 'object': 'Expression', - '_property': 'PropertyKey' - } - - attribute_map = { - 'type': 'type', - 'object': 'object', - '_property': 'property' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if object is not None: - self.object = object - if _property is not None: - self._property = _property - - @property - def type(self): - """Get the type of this MemberExpression. - - Type of AST node - - :return: The type of this MemberExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this MemberExpression. - - Type of AST node - - :param type: The type of this MemberExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def object(self): - """Get the object of this MemberExpression. - - :return: The object of this MemberExpression. - :rtype: Expression - """ # noqa: E501 - return self._object - - @object.setter - def object(self, object): - """Set the object of this MemberExpression. - - :param object: The object of this MemberExpression. - :type: Expression - """ # noqa: E501 - self._object = object - - @property - def _property(self): - """Get the _property of this MemberExpression. - - :return: The _property of this MemberExpression. - :rtype: PropertyKey - """ # noqa: E501 - return self.__property - - @_property.setter - def _property(self, _property): - """Set the _property of this MemberExpression. - - :param _property: The _property of this MemberExpression. - :type: PropertyKey - """ # noqa: E501 - self.__property = _property - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MemberExpression): - 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/frogpilot/third_party/influxdb_client/domain/metadata_backup.py b/frogpilot/third_party/influxdb_client/domain/metadata_backup.py deleted file mode 100644 index ebe498fcb..000000000 --- a/frogpilot/third_party/influxdb_client/domain/metadata_backup.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class MetadataBackup(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 = { - 'kv': 'file', - 'sql': 'file', - 'buckets': 'list[BucketMetadataManifest]' - } - - attribute_map = { - 'kv': 'kv', - 'sql': 'sql', - 'buckets': 'buckets' - } - - def __init__(self, kv=None, sql=None, buckets=None): # noqa: E501,D401,D403 - """MetadataBackup - a model defined in OpenAPI.""" # noqa: E501 - self._kv = None - self._sql = None - self._buckets = None - self.discriminator = None - - self.kv = kv - self.sql = sql - self.buckets = buckets - - @property - def kv(self): - """Get the kv of this MetadataBackup. - - :return: The kv of this MetadataBackup. - :rtype: file - """ # noqa: E501 - return self._kv - - @kv.setter - def kv(self, kv): - """Set the kv of this MetadataBackup. - - :param kv: The kv of this MetadataBackup. - :type: file - """ # noqa: E501 - if kv is None: - raise ValueError("Invalid value for `kv`, must not be `None`") # noqa: E501 - self._kv = kv - - @property - def sql(self): - """Get the sql of this MetadataBackup. - - :return: The sql of this MetadataBackup. - :rtype: file - """ # noqa: E501 - return self._sql - - @sql.setter - def sql(self, sql): - """Set the sql of this MetadataBackup. - - :param sql: The sql of this MetadataBackup. - :type: file - """ # noqa: E501 - if sql is None: - raise ValueError("Invalid value for `sql`, must not be `None`") # noqa: E501 - self._sql = sql - - @property - def buckets(self): - """Get the buckets of this MetadataBackup. - - :return: The buckets of this MetadataBackup. - :rtype: list[BucketMetadataManifest] - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this MetadataBackup. - - :param buckets: The buckets of this MetadataBackup. - :type: list[BucketMetadataManifest] - """ # noqa: E501 - if buckets is None: - raise ValueError("Invalid value for `buckets`, must not be `None`") # noqa: E501 - self._buckets = buckets - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, MetadataBackup): - 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/frogpilot/third_party/influxdb_client/domain/model_property.py b/frogpilot/third_party/influxdb_client/domain/model_property.py deleted file mode 100644 index cbdcd249d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/model_property.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ModelProperty(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', - 'key': 'PropertyKey', - 'value': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'key': 'key', - 'value': 'value' - } - - def __init__(self, type=None, key=None, value=None): # noqa: E501,D401,D403 - """ModelProperty - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._key = None - self._value = 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 - - @property - def type(self): - """Get the type of this ModelProperty. - - Type of AST node - - :return: The type of this ModelProperty. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ModelProperty. - - Type of AST node - - :param type: The type of this ModelProperty. - :type: str - """ # noqa: E501 - self._type = type - - @property - def key(self): - """Get the key of this ModelProperty. - - :return: The key of this ModelProperty. - :rtype: PropertyKey - """ # noqa: E501 - return self._key - - @key.setter - def key(self, key): - """Set the key of this ModelProperty. - - :param key: The key of this ModelProperty. - :type: PropertyKey - """ # noqa: E501 - self._key = key - - @property - def value(self): - """Get the value of this ModelProperty. - - :return: The value of this ModelProperty. - :rtype: Expression - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this ModelProperty. - - :param value: The value of this ModelProperty. - :type: Expression - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ModelProperty): - 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/frogpilot/third_party/influxdb_client/domain/mosaic_view_properties.py b/frogpilot/third_party/influxdb_client/domain/mosaic_view_properties.py deleted file mode 100644 index 1ea889724..000000000 --- a/frogpilot/third_party/influxdb_client/domain/mosaic_view_properties.py +++ /dev/null @@ -1,780 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/node.py b/frogpilot/third_party/influxdb_client/domain/node.py deleted file mode 100644 index c254c62a4..000000000 --- a/frogpilot/third_party/influxdb_client/domain/node.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Node(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501,D401,D403 - """Node - 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 self.openapi_types.items(): - 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, Node): - 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/frogpilot/third_party/influxdb_client/domain/notification_endpoint.py b/frogpilot/third_party/influxdb_client/domain/notification_endpoint.py deleted file mode 100644 index 3d0a886ed..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_endpoint.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationEndpoint(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': 'NotificationEndpointType' - } - - attribute_map = { - 'type': 'type' - } - - 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 - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationEndpoint): - 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/frogpilot/third_party/influxdb_client/domain/notification_endpoint_base.py b/frogpilot/third_party/influxdb_client/domain/notification_endpoint_base.py deleted file mode 100644 index 3ac9da021..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_endpoint_base.py +++ /dev/null @@ -1,347 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationEndpointBase(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - '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' - } - - 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 - self._id = None - self._org_id = None - self._user_id = None - self._created_at = None - self._updated_at = None - self._description = None - self._name = None - self._status = None - self._labels = None - self._links = None - self._type = None - self.discriminator = None - - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if user_id is not None: - self.user_id = user_id - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - if description is not None: - self.description = description - self.name = name - if status is not None: - self.status = status - if labels is not None: - self.labels = labels - if links is not None: - self.links = links - self.type = type - - @property - def id(self): - """Get the id of this NotificationEndpointBase. - - :return: The id of this NotificationEndpointBase. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this NotificationEndpointBase. - - :param id: The id of this NotificationEndpointBase. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this NotificationEndpointBase. - - :return: The org_id of this NotificationEndpointBase. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this NotificationEndpointBase. - - :param org_id: The org_id of this NotificationEndpointBase. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def user_id(self): - """Get the user_id of this NotificationEndpointBase. - - :return: The user_id of this NotificationEndpointBase. - :rtype: str - """ # noqa: E501 - return self._user_id - - @user_id.setter - def user_id(self, user_id): - """Set the user_id of this NotificationEndpointBase. - - :param user_id: The user_id of this NotificationEndpointBase. - :type: str - """ # noqa: E501 - self._user_id = user_id - - @property - def created_at(self): - """Get the created_at of this NotificationEndpointBase. - - :return: The created_at of this NotificationEndpointBase. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this NotificationEndpointBase. - - :param created_at: The created_at of this NotificationEndpointBase. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this NotificationEndpointBase. - - :return: The updated_at of this NotificationEndpointBase. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this NotificationEndpointBase. - - :param updated_at: The updated_at of this NotificationEndpointBase. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - @property - def description(self): - """Get the description of this NotificationEndpointBase. - - An optional description of the notification endpoint. - - :return: The description of this NotificationEndpointBase. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this NotificationEndpointBase. - - An optional description of the notification endpoint. - - :param description: The description of this NotificationEndpointBase. - :type: str - """ # noqa: E501 - self._description = description - - @property - def name(self): - """Get the name of this NotificationEndpointBase. - - :return: The name of this NotificationEndpointBase. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this NotificationEndpointBase. - - :param name: The name of this NotificationEndpointBase. - :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 NotificationEndpointBase. - - The status of the endpoint. - - :return: The status of this NotificationEndpointBase. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this NotificationEndpointBase. - - The status of the endpoint. - - :param status: The status of this NotificationEndpointBase. - :type: str - """ # noqa: E501 - self._status = status - - @property - def labels(self): - """Get the labels of this NotificationEndpointBase. - - :return: The labels of this NotificationEndpointBase. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this NotificationEndpointBase. - - :param labels: The labels of this NotificationEndpointBase. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - @property - def links(self): - """Get the links of this NotificationEndpointBase. - - :return: The links of this NotificationEndpointBase. - :rtype: NotificationEndpointBaseLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this NotificationEndpointBase. - - :param links: The links of this NotificationEndpointBase. - :type: NotificationEndpointBaseLinks - """ # noqa: E501 - self._links = links - - @property - def type(self): - """Get the type of this NotificationEndpointBase. - - :return: The type of this NotificationEndpointBase. - :rtype: NotificationEndpointType - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this NotificationEndpointBase. - - :param type: The type of this NotificationEndpointBase. - :type: NotificationEndpointType - """ # 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 self.openapi_types.items(): - 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, NotificationEndpointBase): - 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/frogpilot/third_party/influxdb_client/domain/notification_endpoint_base_links.py b/frogpilot/third_party/influxdb_client/domain/notification_endpoint_base_links.py deleted file mode 100644 index 4ff93cc7e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_endpoint_base_links.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationEndpointBaseLinks(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 = { - '_self': 'str', - 'labels': 'str', - 'members': 'str', - 'owners': 'str' - } - - attribute_map = { - '_self': 'self', - 'labels': 'labels', - 'members': 'members', - 'owners': 'owners' - } - - def __init__(self, _self=None, labels=None, members=None, owners=None): # noqa: E501,D401,D403 - """NotificationEndpointBaseLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._labels = None - self._members = None - self._owners = None - self.discriminator = None - - if _self is not None: - self._self = _self - if labels is not None: - self.labels = labels - if members is not None: - self.members = members - if owners is not None: - self.owners = owners - - @property - def _self(self): - """Get the _self of this NotificationEndpointBaseLinks. - - URI of resource. - - :return: The _self of this NotificationEndpointBaseLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this NotificationEndpointBaseLinks. - - URI of resource. - - :param _self: The _self of this NotificationEndpointBaseLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def labels(self): - """Get the labels of this NotificationEndpointBaseLinks. - - URI of resource. - - :return: The labels of this NotificationEndpointBaseLinks. - :rtype: str - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this NotificationEndpointBaseLinks. - - URI of resource. - - :param labels: The labels of this NotificationEndpointBaseLinks. - :type: str - """ # noqa: E501 - self._labels = labels - - @property - def members(self): - """Get the members of this NotificationEndpointBaseLinks. - - URI of resource. - - :return: The members of this NotificationEndpointBaseLinks. - :rtype: str - """ # noqa: E501 - return self._members - - @members.setter - def members(self, members): - """Set the members of this NotificationEndpointBaseLinks. - - URI of resource. - - :param members: The members of this NotificationEndpointBaseLinks. - :type: str - """ # noqa: E501 - self._members = members - - @property - def owners(self): - """Get the owners of this NotificationEndpointBaseLinks. - - URI of resource. - - :return: The owners of this NotificationEndpointBaseLinks. - :rtype: str - """ # noqa: E501 - return self._owners - - @owners.setter - def owners(self, owners): - """Set the owners of this NotificationEndpointBaseLinks. - - URI of resource. - - :param owners: The owners of this NotificationEndpointBaseLinks. - :type: str - """ # noqa: E501 - self._owners = owners - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationEndpointBaseLinks): - 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/frogpilot/third_party/influxdb_client/domain/notification_endpoint_discriminator.py b/frogpilot/third_party/influxdb_client/domain/notification_endpoint_discriminator.py deleted file mode 100644 index b285c12d4..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_endpoint_discriminator.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_endpoint_base import NotificationEndpointBase - - -class NotificationEndpointDiscriminator(NotificationEndpointBase): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - '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' - } - - 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 - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationEndpointDiscriminator): - 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/frogpilot/third_party/influxdb_client/domain/notification_endpoint_type.py b/frogpilot/third_party/influxdb_client/domain/notification_endpoint_type.py deleted file mode 100644 index 50ae33821..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_endpoint_type.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationEndpointType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - SLACK = "slack" - PAGERDUTY = "pagerduty" - HTTP = "http" - TELEGRAM = "telegram" - - """ - 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 - """NotificationEndpointType - 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 self.openapi_types.items(): - 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, NotificationEndpointType): - 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/frogpilot/third_party/influxdb_client/domain/notification_endpoint_update.py b/frogpilot/third_party/influxdb_client/domain/notification_endpoint_update.py deleted file mode 100644 index 4e63b1ff6..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_endpoint_update.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationEndpointUpdate(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', - 'status': 'str' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'status': 'status' - } - - def __init__(self, name=None, description=None, status=None): # noqa: E501,D401,D403 - """NotificationEndpointUpdate - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._status = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if status is not None: - self.status = status - - @property - def name(self): - """Get the name of this NotificationEndpointUpdate. - - :return: The name of this NotificationEndpointUpdate. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this NotificationEndpointUpdate. - - :param name: The name of this NotificationEndpointUpdate. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this NotificationEndpointUpdate. - - :return: The description of this NotificationEndpointUpdate. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this NotificationEndpointUpdate. - - :param description: The description of this NotificationEndpointUpdate. - :type: str - """ # noqa: E501 - self._description = description - - @property - def status(self): - """Get the status of this NotificationEndpointUpdate. - - :return: The status of this NotificationEndpointUpdate. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this NotificationEndpointUpdate. - - :param status: The status of this NotificationEndpointUpdate. - :type: str - """ # noqa: E501 - self._status = status - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationEndpointUpdate): - 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/frogpilot/third_party/influxdb_client/domain/notification_endpoints.py b/frogpilot/third_party/influxdb_client/domain/notification_endpoints.py deleted file mode 100644 index 55c2ec932..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_endpoints.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationEndpoints(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 = { - 'notification_endpoints': 'list[NotificationEndpoint]', - 'links': 'Links' - } - - attribute_map = { - 'notification_endpoints': 'notificationEndpoints', - 'links': 'links' - } - - def __init__(self, notification_endpoints=None, links=None): # noqa: E501,D401,D403 - """NotificationEndpoints - a model defined in OpenAPI.""" # noqa: E501 - self._notification_endpoints = None - self._links = None - self.discriminator = None - - if notification_endpoints is not None: - self.notification_endpoints = notification_endpoints - if links is not None: - self.links = links - - @property - def notification_endpoints(self): - """Get the notification_endpoints of this NotificationEndpoints. - - :return: The notification_endpoints of this NotificationEndpoints. - :rtype: list[NotificationEndpoint] - """ # noqa: E501 - return self._notification_endpoints - - @notification_endpoints.setter - def notification_endpoints(self, notification_endpoints): - """Set the notification_endpoints of this NotificationEndpoints. - - :param notification_endpoints: The notification_endpoints of this NotificationEndpoints. - :type: list[NotificationEndpoint] - """ # noqa: E501 - self._notification_endpoints = notification_endpoints - - @property - def links(self): - """Get the links of this NotificationEndpoints. - - :return: The links of this NotificationEndpoints. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this NotificationEndpoints. - - :param links: The links of this NotificationEndpoints. - :type: Links - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationEndpoints): - 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/frogpilot/third_party/influxdb_client/domain/notification_rule.py b/frogpilot/third_party/influxdb_client/domain/notification_rule.py deleted file mode 100644 index b22e53bbe..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_rule.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationRule(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' - } - - attribute_map = { - 'type': 'type' - } - - 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 - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationRule): - 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/frogpilot/third_party/influxdb_client/domain/notification_rule_base.py b/frogpilot/third_party/influxdb_client/domain/notification_rule_base.py deleted file mode 100644 index 6f3de0027..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_rule_base.py +++ /dev/null @@ -1,666 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationRuleBase(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 = { - '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' - } - - 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 - 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 - self._status = None - self._name = None - self._sleep_until = None - self._every = None - self._offset = None - self._runbook_link = None - self._limit_every = None - self._limit = None - self._tag_rules = None - self._description = None - self._status_rules = None - self._labels = None - self._links = None - self.discriminator = None - - 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: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - self.status = status - self.name = name - if sleep_until is not None: - self.sleep_until = sleep_until - if every is not None: - self.every = every - if offset is not None: - self.offset = offset - if runbook_link is not None: - self.runbook_link = runbook_link - if limit_every is not None: - self.limit_every = limit_every - if limit is not None: - self.limit = limit - if tag_rules is not None: - self.tag_rules = tag_rules - if description is not None: - self.description = description - self.status_rules = status_rules - if labels is not None: - self.labels = labels - if links is not None: - self.links = links - - @property - def latest_completed(self): - """Get the latest_completed of this NotificationRuleBase. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. - - :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. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. - - :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. - - :return: The id of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this NotificationRuleBase. - - :param id: The id of this NotificationRuleBase. - :type: str - """ # noqa: E501 - self._id = id - - @property - def endpoint_id(self): - """Get the endpoint_id of this NotificationRuleBase. - - :return: The endpoint_id of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._endpoint_id - - @endpoint_id.setter - def endpoint_id(self, endpoint_id): - """Set the endpoint_id of this NotificationRuleBase. - - :param endpoint_id: The endpoint_id of this NotificationRuleBase. - :type: str - """ # noqa: E501 - if endpoint_id is None: - raise ValueError("Invalid value for `endpoint_id`, must not be `None`") # noqa: E501 - self._endpoint_id = endpoint_id - - @property - def org_id(self): - """Get the org_id of this NotificationRuleBase. - - The ID of the organization that owns this notification rule. - - :return: The org_id of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this NotificationRuleBase. - - The ID of the organization that owns this notification rule. - - :param org_id: The org_id of this NotificationRuleBase. - :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 - 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. - - The ID of creator used to create this notification rule. - - :return: The owner_id of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._owner_id - - @owner_id.setter - def owner_id(self, owner_id): - """Set the owner_id of this NotificationRuleBase. - - The ID of creator used to create this notification rule. - - :param owner_id: The owner_id of this NotificationRuleBase. - :type: str - """ # noqa: E501 - self._owner_id = owner_id - - @property - def created_at(self): - """Get the created_at of this NotificationRuleBase. - - :return: The created_at of this NotificationRuleBase. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this NotificationRuleBase. - - :param created_at: The created_at of this NotificationRuleBase. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this NotificationRuleBase. - - :return: The updated_at of this NotificationRuleBase. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this NotificationRuleBase. - - :param updated_at: The updated_at of this NotificationRuleBase. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - @property - def status(self): - """Get the status of this NotificationRuleBase. - - :return: The status of this NotificationRuleBase. - :rtype: TaskStatusType - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this NotificationRuleBase. - - :param status: The status of this NotificationRuleBase. - :type: TaskStatusType - """ # noqa: E501 - if status is None: - raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 - self._status = status - - @property - def name(self): - """Get the name of this NotificationRuleBase. - - Human-readable name describing the notification rule. - - :return: The name of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this NotificationRuleBase. - - Human-readable name describing the notification rule. - - :param name: The name of this NotificationRuleBase. - :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 sleep_until(self): - """Get the sleep_until of this NotificationRuleBase. - - :return: The sleep_until of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._sleep_until - - @sleep_until.setter - def sleep_until(self, sleep_until): - """Set the sleep_until of this NotificationRuleBase. - - :param sleep_until: The sleep_until of this NotificationRuleBase. - :type: str - """ # noqa: E501 - self._sleep_until = sleep_until - - @property - def every(self): - """Get the every of this NotificationRuleBase. - - The notification repetition interval. - - :return: The every of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this NotificationRuleBase. - - The notification repetition interval. - - :param every: The every of this NotificationRuleBase. - :type: str - """ # noqa: E501 - self._every = every - - @property - def offset(self): - """Get the offset of this NotificationRuleBase. - - Duration to delay after the schedule, before executing check. - - :return: The offset of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._offset - - @offset.setter - def offset(self, offset): - """Set the offset of this NotificationRuleBase. - - Duration to delay after the schedule, before executing check. - - :param offset: The offset of this NotificationRuleBase. - :type: str - """ # noqa: E501 - self._offset = offset - - @property - def runbook_link(self): - """Get the runbook_link of this NotificationRuleBase. - - :return: The runbook_link of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._runbook_link - - @runbook_link.setter - def runbook_link(self, runbook_link): - """Set the runbook_link of this NotificationRuleBase. - - :param runbook_link: The runbook_link of this NotificationRuleBase. - :type: str - """ # noqa: E501 - self._runbook_link = runbook_link - - @property - def limit_every(self): - """Get the limit_every of this NotificationRuleBase. - - Don't notify me more than times every seconds. If set, limit cannot be empty. - - :return: The limit_every of this NotificationRuleBase. - :rtype: int - """ # noqa: E501 - return self._limit_every - - @limit_every.setter - def limit_every(self, limit_every): - """Set the limit_every of this NotificationRuleBase. - - Don't notify me more than times every seconds. If set, limit cannot be empty. - - :param limit_every: The limit_every of this NotificationRuleBase. - :type: int - """ # noqa: E501 - self._limit_every = limit_every - - @property - def limit(self): - """Get the limit of this NotificationRuleBase. - - Don't notify me more than times every seconds. If set, limitEvery cannot be empty. - - :return: The limit of this NotificationRuleBase. - :rtype: int - """ # noqa: E501 - return self._limit - - @limit.setter - def limit(self, limit): - """Set the limit of this NotificationRuleBase. - - Don't notify me more than times every seconds. If set, limitEvery cannot be empty. - - :param limit: The limit of this NotificationRuleBase. - :type: int - """ # noqa: E501 - self._limit = limit - - @property - def tag_rules(self): - """Get the tag_rules of this NotificationRuleBase. - - List of tag rules the notification rule attempts to match. - - :return: The tag_rules of this NotificationRuleBase. - :rtype: list[TagRule] - """ # noqa: E501 - return self._tag_rules - - @tag_rules.setter - def tag_rules(self, tag_rules): - """Set the tag_rules of this NotificationRuleBase. - - List of tag rules the notification rule attempts to match. - - :param tag_rules: The tag_rules of this NotificationRuleBase. - :type: list[TagRule] - """ # noqa: E501 - self._tag_rules = tag_rules - - @property - def description(self): - """Get the description of this NotificationRuleBase. - - An optional description of the notification rule. - - :return: The description of this NotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this NotificationRuleBase. - - An optional description of the notification rule. - - :param description: The description of this NotificationRuleBase. - :type: str - """ # noqa: E501 - self._description = description - - @property - def status_rules(self): - """Get the status_rules of this NotificationRuleBase. - - List of status rules the notification rule attempts to match. - - :return: The status_rules of this NotificationRuleBase. - :rtype: list[StatusRule] - """ # noqa: E501 - return self._status_rules - - @status_rules.setter - def status_rules(self, status_rules): - """Set the status_rules of this NotificationRuleBase. - - List of status rules the notification rule attempts to match. - - :param status_rules: The status_rules of this NotificationRuleBase. - :type: list[StatusRule] - """ # noqa: E501 - if status_rules is None: - raise ValueError("Invalid value for `status_rules`, must not be `None`") # noqa: E501 - self._status_rules = status_rules - - @property - def labels(self): - """Get the labels of this NotificationRuleBase. - - :return: The labels of this NotificationRuleBase. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this NotificationRuleBase. - - :param labels: The labels of this NotificationRuleBase. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - @property - def links(self): - """Get the links of this NotificationRuleBase. - - :return: The links of this NotificationRuleBase. - :rtype: NotificationRuleBaseLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this NotificationRuleBase. - - :param links: The links of this NotificationRuleBase. - :type: NotificationRuleBaseLinks - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationRuleBase): - 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/frogpilot/third_party/influxdb_client/domain/notification_rule_base_links.py b/frogpilot/third_party/influxdb_client/domain/notification_rule_base_links.py deleted file mode 100644 index 2f6e1c259..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_rule_base_links.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationRuleBaseLinks(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 = { - '_self': 'str', - 'labels': 'str', - 'members': 'str', - 'owners': 'str', - 'query': 'str' - } - - attribute_map = { - '_self': 'self', - 'labels': 'labels', - 'members': 'members', - 'owners': 'owners', - 'query': 'query' - } - - 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: - self._self = _self - if labels is not None: - self.labels = labels - if members is not None: - self.members = members - if owners is not None: - self.owners = owners - if query is not None: - self.query = query - - @property - def _self(self): - """Get the _self of this NotificationRuleBaseLinks. - - URI of resource. - - :return: The _self of this NotificationRuleBaseLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this NotificationRuleBaseLinks. - - URI of resource. - - :param _self: The _self of this NotificationRuleBaseLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def labels(self): - """Get the labels of this NotificationRuleBaseLinks. - - URI of resource. - - :return: The labels of this NotificationRuleBaseLinks. - :rtype: str - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this NotificationRuleBaseLinks. - - URI of resource. - - :param labels: The labels of this NotificationRuleBaseLinks. - :type: str - """ # noqa: E501 - self._labels = labels - - @property - def members(self): - """Get the members of this NotificationRuleBaseLinks. - - URI of resource. - - :return: The members of this NotificationRuleBaseLinks. - :rtype: str - """ # noqa: E501 - return self._members - - @members.setter - def members(self, members): - """Set the members of this NotificationRuleBaseLinks. - - URI of resource. - - :param members: The members of this NotificationRuleBaseLinks. - :type: str - """ # noqa: E501 - self._members = members - - @property - def owners(self): - """Get the owners of this NotificationRuleBaseLinks. - - URI of resource. - - :return: The owners of this NotificationRuleBaseLinks. - :rtype: str - """ # noqa: E501 - return self._owners - - @owners.setter - def owners(self, owners): - """Set the owners of this NotificationRuleBaseLinks. - - URI of resource. - - :param owners: The owners of this NotificationRuleBaseLinks. - :type: str - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationRuleBaseLinks): - 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/frogpilot/third_party/influxdb_client/domain/notification_rule_discriminator.py b/frogpilot/third_party/influxdb_client/domain/notification_rule_discriminator.py deleted file mode 100644 index a677fa523..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_rule_discriminator.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_rule_base import NotificationRuleBase - - -class NotificationRuleDiscriminator(NotificationRuleBase): - """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 = { - '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' - } - - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationRuleDiscriminator): - 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/frogpilot/third_party/influxdb_client/domain/notification_rule_update.py b/frogpilot/third_party/influxdb_client/domain/notification_rule_update.py deleted file mode 100644 index a8e9fa1fc..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_rule_update.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationRuleUpdate(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', - 'status': 'str' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'status': 'status' - } - - def __init__(self, name=None, description=None, status=None): # noqa: E501,D401,D403 - """NotificationRuleUpdate - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._status = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if status is not None: - self.status = status - - @property - def name(self): - """Get the name of this NotificationRuleUpdate. - - :return: The name of this NotificationRuleUpdate. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this NotificationRuleUpdate. - - :param name: The name of this NotificationRuleUpdate. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this NotificationRuleUpdate. - - :return: The description of this NotificationRuleUpdate. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this NotificationRuleUpdate. - - :param description: The description of this NotificationRuleUpdate. - :type: str - """ # noqa: E501 - self._description = description - - @property - def status(self): - """Get the status of this NotificationRuleUpdate. - - :return: The status of this NotificationRuleUpdate. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this NotificationRuleUpdate. - - :param status: The status of this NotificationRuleUpdate. - :type: str - """ # noqa: E501 - self._status = status - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationRuleUpdate): - 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/frogpilot/third_party/influxdb_client/domain/notification_rules.py b/frogpilot/third_party/influxdb_client/domain/notification_rules.py deleted file mode 100644 index 08eaf6d80..000000000 --- a/frogpilot/third_party/influxdb_client/domain/notification_rules.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class NotificationRules(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 = { - 'notification_rules': 'list[NotificationRule]', - 'links': 'Links' - } - - attribute_map = { - 'notification_rules': 'notificationRules', - 'links': 'links' - } - - def __init__(self, notification_rules=None, links=None): # noqa: E501,D401,D403 - """NotificationRules - a model defined in OpenAPI.""" # noqa: E501 - self._notification_rules = None - self._links = None - self.discriminator = None - - if notification_rules is not None: - self.notification_rules = notification_rules - if links is not None: - self.links = links - - @property - def notification_rules(self): - """Get the notification_rules of this NotificationRules. - - :return: The notification_rules of this NotificationRules. - :rtype: list[NotificationRule] - """ # noqa: E501 - return self._notification_rules - - @notification_rules.setter - def notification_rules(self, notification_rules): - """Set the notification_rules of this NotificationRules. - - :param notification_rules: The notification_rules of this NotificationRules. - :type: list[NotificationRule] - """ # noqa: E501 - self._notification_rules = notification_rules - - @property - def links(self): - """Get the links of this NotificationRules. - - :return: The links of this NotificationRules. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this NotificationRules. - - :param links: The links of this NotificationRules. - :type: Links - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, NotificationRules): - 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/frogpilot/third_party/influxdb_client/domain/object_expression.py b/frogpilot/third_party/influxdb_client/domain/object_expression.py deleted file mode 100644 index 05ca2a058..000000000 --- a/frogpilot/third_party/influxdb_client/domain/object_expression.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class ObjectExpression(Expression): - """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', - 'properties': 'list[ModelProperty]' - } - - attribute_map = { - 'type': 'type', - 'properties': 'properties' - } - - 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 - - if type is not None: - self.type = type - if properties is not None: - self.properties = properties - - @property - def type(self): - """Get the type of this ObjectExpression. - - Type of AST node - - :return: The type of this ObjectExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ObjectExpression. - - Type of AST node - - :param type: The type of this ObjectExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def properties(self): - """Get the properties of this ObjectExpression. - - Object properties - - :return: The properties of this ObjectExpression. - :rtype: list[ModelProperty] - """ # noqa: E501 - return self._properties - - @properties.setter - def properties(self, properties): - """Set the properties of this ObjectExpression. - - Object properties - - :param properties: The properties of this ObjectExpression. - :type: list[ModelProperty] - """ # noqa: E501 - self._properties = properties - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ObjectExpression): - 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/frogpilot/third_party/influxdb_client/domain/onboarding_request.py b/frogpilot/third_party/influxdb_client/domain/onboarding_request.py deleted file mode 100644 index 7ca4bf0ca..000000000 --- a/frogpilot/third_party/influxdb_client/domain/onboarding_request.py +++ /dev/null @@ -1,256 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class OnboardingRequest(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 = { - 'username': 'str', - 'password': 'str', - 'org': 'str', - 'bucket': 'str', - 'retention_period_seconds': 'int', - 'retention_period_hrs': 'int', - 'token': 'str' - } - - attribute_map = { - 'username': 'username', - 'password': 'password', - 'org': 'org', - 'bucket': 'bucket', - 'retention_period_seconds': 'retentionPeriodSeconds', - 'retention_period_hrs': 'retentionPeriodHrs', - 'token': 'token' - } - - 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 - 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): - """Get the username of this OnboardingRequest. - - :return: The username of this OnboardingRequest. - :rtype: str - """ # noqa: E501 - return self._username - - @username.setter - def username(self, username): - """Set the username of this OnboardingRequest. - - :param username: The username of this OnboardingRequest. - :type: str - """ # noqa: E501 - if username is None: - raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 - self._username = username - - @property - def password(self): - """Get the password of this OnboardingRequest. - - :return: The password of this OnboardingRequest. - :rtype: str - """ # noqa: E501 - return self._password - - @password.setter - def password(self, password): - """Set the password of this OnboardingRequest. - - :param password: The password of this OnboardingRequest. - :type: str - """ # noqa: E501 - self._password = password - - @property - def org(self): - """Get the org of this OnboardingRequest. - - :return: The org of this OnboardingRequest. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this OnboardingRequest. - - :param org: The org of this OnboardingRequest. - :type: str - """ # noqa: E501 - if org is None: - raise ValueError("Invalid value for `org`, must not be `None`") # noqa: E501 - self._org = org - - @property - def bucket(self): - """Get the bucket of this OnboardingRequest. - - :return: The bucket of this OnboardingRequest. - :rtype: str - """ # noqa: E501 - return self._bucket - - @bucket.setter - def bucket(self, bucket): - """Set the bucket of this OnboardingRequest. - - :param bucket: The bucket of this OnboardingRequest. - :type: str - """ # noqa: E501 - if bucket is None: - 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 - return self._retention_period_hrs - - @retention_period_hrs.setter - 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, OnboardingRequest): - 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/frogpilot/third_party/influxdb_client/domain/onboarding_response.py b/frogpilot/third_party/influxdb_client/domain/onboarding_response.py deleted file mode 100644 index 62db52f5f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/onboarding_response.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class OnboardingResponse(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 = { - 'user': 'UserResponse', - 'org': 'Organization', - 'bucket': 'Bucket', - 'auth': 'Authorization' - } - - attribute_map = { - 'user': 'user', - 'org': 'org', - 'bucket': 'bucket', - 'auth': 'auth' - } - - def __init__(self, user=None, org=None, bucket=None, auth=None): # noqa: E501,D401,D403 - """OnboardingResponse - a model defined in OpenAPI.""" # noqa: E501 - self._user = None - self._org = None - self._bucket = None - self._auth = None - self.discriminator = None - - if user is not None: - self.user = user - if org is not None: - self.org = org - if bucket is not None: - self.bucket = bucket - if auth is not None: - self.auth = auth - - @property - def user(self): - """Get the user of this OnboardingResponse. - - :return: The user of this OnboardingResponse. - :rtype: UserResponse - """ # noqa: E501 - return self._user - - @user.setter - def user(self, user): - """Set the user of this OnboardingResponse. - - :param user: The user of this OnboardingResponse. - :type: UserResponse - """ # noqa: E501 - self._user = user - - @property - def org(self): - """Get the org of this OnboardingResponse. - - :return: The org of this OnboardingResponse. - :rtype: Organization - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this OnboardingResponse. - - :param org: The org of this OnboardingResponse. - :type: Organization - """ # noqa: E501 - self._org = org - - @property - def bucket(self): - """Get the bucket of this OnboardingResponse. - - :return: The bucket of this OnboardingResponse. - :rtype: Bucket - """ # noqa: E501 - return self._bucket - - @bucket.setter - def bucket(self, bucket): - """Set the bucket of this OnboardingResponse. - - :param bucket: The bucket of this OnboardingResponse. - :type: Bucket - """ # noqa: E501 - self._bucket = bucket - - @property - def auth(self): - """Get the auth of this OnboardingResponse. - - :return: The auth of this OnboardingResponse. - :rtype: Authorization - """ # noqa: E501 - return self._auth - - @auth.setter - def auth(self, auth): - """Set the auth of this OnboardingResponse. - - :param auth: The auth of this OnboardingResponse. - :type: Authorization - """ # noqa: E501 - self._auth = auth - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, OnboardingResponse): - 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/frogpilot/third_party/influxdb_client/domain/option_statement.py b/frogpilot/third_party/influxdb_client/domain/option_statement.py deleted file mode 100644 index 4ab156998..000000000 --- a/frogpilot/third_party/influxdb_client/domain/option_statement.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class OptionStatement(Statement): - """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', - 'assignment': 'object' - } - - attribute_map = { - 'type': 'type', - 'assignment': 'assignment' - } - - 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 - - if type is not None: - self.type = type - if assignment is not None: - self.assignment = assignment - - @property - def type(self): - """Get the type of this OptionStatement. - - Type of AST node - - :return: The type of this OptionStatement. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this OptionStatement. - - Type of AST node - - :param type: The type of this OptionStatement. - :type: str - """ # noqa: E501 - self._type = type - - @property - def assignment(self): - """Get the assignment of this OptionStatement. - - :return: The assignment of this OptionStatement. - :rtype: object - """ # noqa: E501 - return self._assignment - - @assignment.setter - def assignment(self, assignment): - """Set the assignment of this OptionStatement. - - :param assignment: The assignment of this OptionStatement. - :type: object - """ # noqa: E501 - self._assignment = assignment - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, OptionStatement): - 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/frogpilot/third_party/influxdb_client/domain/organization.py b/frogpilot/third_party/influxdb_client/domain/organization.py deleted file mode 100644 index 4071964c1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/organization.py +++ /dev/null @@ -1,277 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Organization(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 = { - 'links': 'OrganizationLinks', - 'id': 'str', - 'name': 'str', - 'default_storage_type': 'str', - 'description': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'status': 'str' - } - - attribute_map = { - 'links': 'links', - 'id': 'id', - 'name': 'name', - 'default_storage_type': 'defaultStorageType', - 'description': 'description', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'status': 'status' - } - - def __init__(self, links=None, id=None, name=None, default_storage_type=None, description=None, created_at=None, updated_at=None, status='active'): # noqa: E501,D401,D403 - """Organization - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._id = None - self._name = None - self._default_storage_type = None - self._description = None - self._created_at = None - self._updated_at = None - self._status = None - self.discriminator = None - - if links is not None: - self.links = links - if id is not None: - self.id = id - self.name = name - if default_storage_type is not None: - self.default_storage_type = default_storage_type - if description is not None: - self.description = description - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - if status is not None: - self.status = status - - @property - def links(self): - """Get the links of this Organization. - - :return: The links of this Organization. - :rtype: OrganizationLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Organization. - - :param links: The links of this Organization. - :type: OrganizationLinks - """ # noqa: E501 - self._links = links - - @property - def id(self): - """Get the id of this Organization. - - :return: The id of this Organization. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Organization. - - :param id: The id of this Organization. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this Organization. - - :return: The name of this Organization. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Organization. - - :param name: The name of this Organization. - :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 default_storage_type(self): - """Get the default_storage_type of this Organization. - - Discloses whether the organization uses TSM or IOx. - - :return: The default_storage_type of this Organization. - :rtype: str - """ # noqa: E501 - return self._default_storage_type - - @default_storage_type.setter - def default_storage_type(self, default_storage_type): - """Set the default_storage_type of this Organization. - - Discloses whether the organization uses TSM or IOx. - - :param default_storage_type: The default_storage_type of this Organization. - :type: str - """ # noqa: E501 - self._default_storage_type = default_storage_type - - @property - def description(self): - """Get the description of this Organization. - - :return: The description of this Organization. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this Organization. - - :param description: The description of this Organization. - :type: str - """ # noqa: E501 - self._description = description - - @property - def created_at(self): - """Get the created_at of this Organization. - - :return: The created_at of this Organization. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this Organization. - - :param created_at: The created_at of this Organization. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this Organization. - - :return: The updated_at of this Organization. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this Organization. - - :param updated_at: The updated_at of this Organization. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - @property - def status(self): - """Get the status of this Organization. - - If inactive, the organization is inactive. - - :return: The status of this Organization. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this Organization. - - If inactive, the organization is inactive. - - :param status: The status of this Organization. - :type: str - """ # noqa: E501 - self._status = status - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Organization): - 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/frogpilot/third_party/influxdb_client/domain/organization_links.py b/frogpilot/third_party/influxdb_client/domain/organization_links.py deleted file mode 100644 index a2cca0424..000000000 --- a/frogpilot/third_party/influxdb_client/domain/organization_links.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class OrganizationLinks(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 = { - '_self': 'str', - 'members': 'str', - 'owners': 'str', - 'labels': 'str', - 'secrets': 'str', - 'buckets': 'str', - 'tasks': 'str', - 'dashboards': 'str' - } - - attribute_map = { - '_self': 'self', - 'members': 'members', - 'owners': 'owners', - 'labels': 'labels', - 'secrets': 'secrets', - 'buckets': 'buckets', - 'tasks': 'tasks', - 'dashboards': 'dashboards' - } - - def __init__(self, _self=None, members=None, owners=None, labels=None, secrets=None, buckets=None, tasks=None, dashboards=None): # noqa: E501,D401,D403 - """OrganizationLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._members = None - self._owners = None - self._labels = None - self._secrets = None - self._buckets = None - self._tasks = None - self._dashboards = None - self.discriminator = None - - if _self is not None: - self._self = _self - if members is not None: - self.members = members - if owners is not None: - self.owners = owners - if labels is not None: - self.labels = labels - if secrets is not None: - self.secrets = secrets - if buckets is not None: - self.buckets = buckets - if tasks is not None: - self.tasks = tasks - if dashboards is not None: - self.dashboards = dashboards - - @property - def _self(self): - """Get the _self of this OrganizationLinks. - - URI of resource. - - :return: The _self of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this OrganizationLinks. - - URI of resource. - - :param _self: The _self of this OrganizationLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def members(self): - """Get the members of this OrganizationLinks. - - URI of resource. - - :return: The members of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self._members - - @members.setter - def members(self, members): - """Set the members of this OrganizationLinks. - - URI of resource. - - :param members: The members of this OrganizationLinks. - :type: str - """ # noqa: E501 - self._members = members - - @property - def owners(self): - """Get the owners of this OrganizationLinks. - - URI of resource. - - :return: The owners of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self._owners - - @owners.setter - def owners(self, owners): - """Set the owners of this OrganizationLinks. - - URI of resource. - - :param owners: The owners of this OrganizationLinks. - :type: str - """ # noqa: E501 - self._owners = owners - - @property - def labels(self): - """Get the labels of this OrganizationLinks. - - URI of resource. - - :return: The labels of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this OrganizationLinks. - - URI of resource. - - :param labels: The labels of this OrganizationLinks. - :type: str - """ # noqa: E501 - self._labels = labels - - @property - def secrets(self): - """Get the secrets of this OrganizationLinks. - - URI of resource. - - :return: The secrets of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self._secrets - - @secrets.setter - def secrets(self, secrets): - """Set the secrets of this OrganizationLinks. - - URI of resource. - - :param secrets: The secrets of this OrganizationLinks. - :type: str - """ # noqa: E501 - self._secrets = secrets - - @property - def buckets(self): - """Get the buckets of this OrganizationLinks. - - URI of resource. - - :return: The buckets of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this OrganizationLinks. - - URI of resource. - - :param buckets: The buckets of this OrganizationLinks. - :type: str - """ # noqa: E501 - self._buckets = buckets - - @property - def tasks(self): - """Get the tasks of this OrganizationLinks. - - URI of resource. - - :return: The tasks of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self._tasks - - @tasks.setter - def tasks(self, tasks): - """Set the tasks of this OrganizationLinks. - - URI of resource. - - :param tasks: The tasks of this OrganizationLinks. - :type: str - """ # noqa: E501 - self._tasks = tasks - - @property - def dashboards(self): - """Get the dashboards of this OrganizationLinks. - - URI of resource. - - :return: The dashboards of this OrganizationLinks. - :rtype: str - """ # noqa: E501 - return self._dashboards - - @dashboards.setter - def dashboards(self, dashboards): - """Set the dashboards of this OrganizationLinks. - - URI of resource. - - :param dashboards: The dashboards of this OrganizationLinks. - :type: str - """ # noqa: E501 - self._dashboards = dashboards - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, OrganizationLinks): - 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/frogpilot/third_party/influxdb_client/domain/organizations.py b/frogpilot/third_party/influxdb_client/domain/organizations.py deleted file mode 100644 index 844c7faab..000000000 --- a/frogpilot/third_party/influxdb_client/domain/organizations.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Organizations(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 = { - 'links': 'Links', - 'orgs': 'list[Organization]' - } - - attribute_map = { - 'links': 'links', - 'orgs': 'orgs' - } - - def __init__(self, links=None, orgs=None): # noqa: E501,D401,D403 - """Organizations - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._orgs = None - self.discriminator = None - - if links is not None: - self.links = links - if orgs is not None: - self.orgs = orgs - - @property - def links(self): - """Get the links of this Organizations. - - :return: The links of this Organizations. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Organizations. - - :param links: The links of this Organizations. - :type: Links - """ # noqa: E501 - self._links = links - - @property - def orgs(self): - """Get the orgs of this Organizations. - - :return: The orgs of this Organizations. - :rtype: list[Organization] - """ # noqa: E501 - return self._orgs - - @orgs.setter - def orgs(self, orgs): - """Set the orgs of this Organizations. - - :param orgs: The orgs of this Organizations. - :type: list[Organization] - """ # noqa: E501 - self._orgs = orgs - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Organizations): - 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/frogpilot/third_party/influxdb_client/domain/package.py b/frogpilot/third_party/influxdb_client/domain/package.py deleted file mode 100644 index 9c328e6f7..000000000 --- a/frogpilot/third_party/influxdb_client/domain/package.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Package(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', - 'path': 'str', - 'package': 'str', - 'files': 'list[File]' - } - - attribute_map = { - 'type': 'type', - 'path': 'path', - 'package': 'package', - 'files': 'files' - } - - def __init__(self, type=None, path=None, package=None, files=None): # noqa: E501,D401,D403 - """Package - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._path = None - self._package = None - self._files = None - self.discriminator = None - - if type is not None: - self.type = type - if path is not None: - self.path = path - if package is not None: - self.package = package - if files is not None: - self.files = files - - @property - def type(self): - """Get the type of this Package. - - Type of AST node - - :return: The type of this Package. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Package. - - Type of AST node - - :param type: The type of this Package. - :type: str - """ # noqa: E501 - self._type = type - - @property - def path(self): - """Get the path of this Package. - - Package import path - - :return: The path of this Package. - :rtype: str - """ # noqa: E501 - return self._path - - @path.setter - def path(self, path): - """Set the path of this Package. - - Package import path - - :param path: The path of this Package. - :type: str - """ # noqa: E501 - self._path = path - - @property - def package(self): - """Get the package of this Package. - - Package name - - :return: The package of this Package. - :rtype: str - """ # noqa: E501 - return self._package - - @package.setter - def package(self, package): - """Set the package of this Package. - - Package name - - :param package: The package of this Package. - :type: str - """ # noqa: E501 - self._package = package - - @property - def files(self): - """Get the files of this Package. - - Package files - - :return: The files of this Package. - :rtype: list[File] - """ # noqa: E501 - return self._files - - @files.setter - def files(self, files): - """Set the files of this Package. - - Package files - - :param files: The files of this Package. - :type: list[File] - """ # noqa: E501 - self._files = files - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Package): - 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/frogpilot/third_party/influxdb_client/domain/package_clause.py b/frogpilot/third_party/influxdb_client/domain/package_clause.py deleted file mode 100644 index b9cb6abc6..000000000 --- a/frogpilot/third_party/influxdb_client/domain/package_clause.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PackageClause(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', - 'name': 'Identifier' - } - - attribute_map = { - 'type': 'type', - 'name': 'name' - } - - def __init__(self, type=None, name=None): # noqa: E501,D401,D403 - """PackageClause - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._name = None - self.discriminator = None - - if type is not None: - self.type = type - if name is not None: - self.name = name - - @property - def type(self): - """Get the type of this PackageClause. - - Type of AST node - - :return: The type of this PackageClause. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this PackageClause. - - Type of AST node - - :param type: The type of this PackageClause. - :type: str - """ # noqa: E501 - self._type = type - - @property - def name(self): - """Get the name of this PackageClause. - - :return: The name of this PackageClause. - :rtype: Identifier - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this PackageClause. - - :param name: The name of this PackageClause. - :type: Identifier - """ # noqa: E501 - self._name = name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PackageClause): - 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/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_endpoint.py b/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_endpoint.py deleted file mode 100644 index f57b6c005..000000000 --- a/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_endpoint.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator - - -class PagerDutyNotificationEndpoint(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 = { - 'client_url': 'str', - 'routing_key': 'str', - 'id': 'str', - 'org_id': 'str', - 'user_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'description': 'str', - 'name': 'str', - 'status': 'str', - 'labels': 'list[Label]', - 'links': 'NotificationEndpointBaseLinks', - 'type': 'NotificationEndpointType' - } - - attribute_map = { - 'client_url': 'clientURL', - 'routing_key': 'routingKey', - 'id': 'id', - 'org_id': 'orgID', - 'user_id': 'userID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'description': 'description', - 'name': 'name', - 'status': 'status', - 'labels': 'labels', - 'links': 'links', - 'type': 'type' - } - - 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 - 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 - - if client_url is not None: - self.client_url = client_url - self.routing_key = routing_key - - @property - def client_url(self): - """Get the client_url of this PagerDutyNotificationEndpoint. - - :return: The client_url of this PagerDutyNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._client_url - - @client_url.setter - def client_url(self, client_url): - """Set the client_url of this PagerDutyNotificationEndpoint. - - :param client_url: The client_url of this PagerDutyNotificationEndpoint. - :type: str - """ # noqa: E501 - self._client_url = client_url - - @property - def routing_key(self): - """Get the routing_key of this PagerDutyNotificationEndpoint. - - :return: The routing_key of this PagerDutyNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._routing_key - - @routing_key.setter - def routing_key(self, routing_key): - """Set the routing_key of this PagerDutyNotificationEndpoint. - - :param routing_key: The routing_key of this PagerDutyNotificationEndpoint. - :type: str - """ # noqa: E501 - if routing_key is None: - raise ValueError("Invalid value for `routing_key`, must not be `None`") # noqa: E501 - self._routing_key = routing_key - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PagerDutyNotificationEndpoint): - 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/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_rule.py b/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_rule.py deleted file mode 100644 index 8ccf2bd2b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_rule.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.pager_duty_notification_rule_base import PagerDutyNotificationRuleBase - - -class PagerDutyNotificationRule(PagerDutyNotificationRuleBase): - """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', - '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', - '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="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, 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 self.openapi_types.items(): - 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, PagerDutyNotificationRule): - 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/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_rule_base.py b/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_rule_base.py deleted file mode 100644 index 8e447743b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/pager_duty_notification_rule_base.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator - - -class PagerDutyNotificationRuleBase(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', - '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', - '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, 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 - - self.type = type - self.message_template = message_template - - @property - def type(self): - """Get the type of this PagerDutyNotificationRuleBase. - - :return: The type of this PagerDutyNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this PagerDutyNotificationRuleBase. - - :param type: The type of this PagerDutyNotificationRuleBase. - :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 PagerDutyNotificationRuleBase. - - :return: The message_template of this PagerDutyNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._message_template - - @message_template.setter - def message_template(self, message_template): - """Set the message_template of this PagerDutyNotificationRuleBase. - - :param message_template: The message_template of this PagerDutyNotificationRuleBase. - :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 - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PagerDutyNotificationRuleBase): - 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/frogpilot/third_party/influxdb_client/domain/paren_expression.py b/frogpilot/third_party/influxdb_client/domain/paren_expression.py deleted file mode 100644 index 68bcfe03c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/paren_expression.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class ParenExpression(Expression): - """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', - 'expression': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'expression': 'expression' - } - - 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 - - if type is not None: - self.type = type - if expression is not None: - self.expression = expression - - @property - def type(self): - """Get the type of this ParenExpression. - - Type of AST node - - :return: The type of this ParenExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ParenExpression. - - Type of AST node - - :param type: The type of this ParenExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def expression(self): - """Get the expression of this ParenExpression. - - :return: The expression of this ParenExpression. - :rtype: Expression - """ # noqa: E501 - return self._expression - - @expression.setter - def expression(self, expression): - """Set the expression of this ParenExpression. - - :param expression: The expression of this ParenExpression. - :type: Expression - """ # noqa: E501 - self._expression = expression - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ParenExpression): - 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/frogpilot/third_party/influxdb_client/domain/password_reset_body.py b/frogpilot/third_party/influxdb_client/domain/password_reset_body.py deleted file mode 100644 index 22dc5c974..000000000 --- a/frogpilot/third_party/influxdb_client/domain/password_reset_body.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PasswordResetBody(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 = { - 'password': 'str' - } - - attribute_map = { - 'password': 'password' - } - - def __init__(self, password=None): # noqa: E501,D401,D403 - """PasswordResetBody - a model defined in OpenAPI.""" # noqa: E501 - self._password = None - self.discriminator = None - - self.password = password - - @property - def password(self): - """Get the password of this PasswordResetBody. - - :return: The password of this PasswordResetBody. - :rtype: str - """ # noqa: E501 - return self._password - - @password.setter - def password(self, password): - """Set the password of this PasswordResetBody. - - :param password: The password of this PasswordResetBody. - :type: str - """ # noqa: E501 - if password is None: - raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 - self._password = password - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PasswordResetBody): - 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/frogpilot/third_party/influxdb_client/domain/patch_bucket_request.py b/frogpilot/third_party/influxdb_client/domain/patch_bucket_request.py deleted file mode 100644 index d2416a548..000000000 --- a/frogpilot/third_party/influxdb_client/domain/patch_bucket_request.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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. - - The name of the bucket. - - :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. - - The name of the bucket. - - :param name: The name of this PatchBucketRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this PatchBucketRequest. - - A description of the bucket. - - :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. - - A description of the bucket. - - :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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/patch_dashboard_request.py b/frogpilot/third_party/influxdb_client/domain/patch_dashboard_request.py deleted file mode 100644 index 8405c3b0f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/patch_dashboard_request.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/patch_organization_request.py b/frogpilot/third_party/influxdb_client/domain/patch_organization_request.py deleted file mode 100644 index ff74e17b0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/patch_organization_request.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PatchOrganizationRequest(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 - """PatchOrganizationRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - - @property - def name(self): - """Get the name of this PatchOrganizationRequest. - - The name of the organization. - - :return: The name of this PatchOrganizationRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this PatchOrganizationRequest. - - The name of the organization. - - :param name: The name of this PatchOrganizationRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this PatchOrganizationRequest. - - The description of the organization. - - :return: The description of this PatchOrganizationRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this PatchOrganizationRequest. - - The description of the organization. - - :param description: The description of this PatchOrganizationRequest. - :type: str - """ # noqa: E501 - self._description = description - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PatchOrganizationRequest): - 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/frogpilot/third_party/influxdb_client/domain/patch_retention_rule.py b/frogpilot/third_party/influxdb_client/domain/patch_retention_rule.py deleted file mode 100644 index d02335a1d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/patch_retention_rule.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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=2592000, 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 - - if type is not None: - self.type = type - 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 - self._type = type - - @property - def every_seconds(self): - """Get the every_seconds of this PatchRetentionRule. - - The number of seconds to keep data. Default duration is `2592000` (30 days). `0` represents infinite retention. - - :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. - - The number of seconds to keep data. Default duration is `2592000` (30 days). `0` represents infinite retention. - - :param every_seconds: The every_seconds of this PatchRetentionRule. - :type: int - """ # noqa: E501 - if every_seconds is None: - raise ValueError("Invalid value for `every_seconds`, must not be `None`") # 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. - - The [shard group duration](https://docs.influxdata.com/influxdb/latest/reference/glossary/#shard). The number of seconds that each shard group covers. #### InfluxDB Cloud - Doesn't use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). #### Related guides - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/) - - :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. - - The [shard group duration](https://docs.influxdata.com/influxdb/latest/reference/glossary/#shard). The number of seconds that each shard group covers. #### InfluxDB Cloud - Doesn't use `shardGroupDurationsSeconds`. #### InfluxDB OSS - Default value depends on the [bucket retention period](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/#shard-group-duration). #### Related guides - InfluxDB [shards and shard groups](https://docs.influxdata.com/influxdb/latest/reference/internals/shards/) - - :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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/patch_stack_request.py b/frogpilot/third_party/influxdb_client/domain/patch_stack_request.py deleted file mode 100644 index 917cc3151..000000000 --- a/frogpilot/third_party/influxdb_client/domain/patch_stack_request.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PatchStackRequest(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', - 'template_ur_ls': 'list[str]', - 'additional_resources': 'list[PatchStackRequestAdditionalResources]' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'template_ur_ls': 'templateURLs', - 'additional_resources': 'additionalResources' - } - - def __init__(self, name=None, description=None, template_ur_ls=None, additional_resources=None): # noqa: E501,D401,D403 - """PatchStackRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._template_ur_ls = None - self._additional_resources = None - self.discriminator = None - - self.name = name - self.description = description - self.template_ur_ls = template_ur_ls - if additional_resources is not None: - self.additional_resources = additional_resources - - @property - def name(self): - """Get the name of this PatchStackRequest. - - :return: The name of this PatchStackRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this PatchStackRequest. - - :param name: The name of this PatchStackRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this PatchStackRequest. - - :return: The description of this PatchStackRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this PatchStackRequest. - - :param description: The description of this PatchStackRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def template_ur_ls(self): - """Get the template_ur_ls of this PatchStackRequest. - - :return: The template_ur_ls of this PatchStackRequest. - :rtype: list[str] - """ # noqa: E501 - return self._template_ur_ls - - @template_ur_ls.setter - def template_ur_ls(self, template_ur_ls): - """Set the template_ur_ls of this PatchStackRequest. - - :param template_ur_ls: The template_ur_ls of this PatchStackRequest. - :type: list[str] - """ # noqa: E501 - self._template_ur_ls = template_ur_ls - - @property - def additional_resources(self): - """Get the additional_resources of this PatchStackRequest. - - :return: The additional_resources of this PatchStackRequest. - :rtype: list[PatchStackRequestAdditionalResources] - """ # noqa: E501 - return self._additional_resources - - @additional_resources.setter - def additional_resources(self, additional_resources): - """Set the additional_resources of this PatchStackRequest. - - :param additional_resources: The additional_resources of this PatchStackRequest. - :type: list[PatchStackRequestAdditionalResources] - """ # noqa: E501 - self._additional_resources = additional_resources - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PatchStackRequest): - 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/frogpilot/third_party/influxdb_client/domain/patch_stack_request_additional_resources.py b/frogpilot/third_party/influxdb_client/domain/patch_stack_request_additional_resources.py deleted file mode 100644 index 6df857bbf..000000000 --- a/frogpilot/third_party/influxdb_client/domain/patch_stack_request_additional_resources.py +++ /dev/null @@ -1,155 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PatchStackRequestAdditionalResources(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'resource_id': 'str', - 'kind': 'str', - 'template_meta_name': 'str' - } - - attribute_map = { - 'resource_id': 'resourceID', - 'kind': 'kind', - 'template_meta_name': 'templateMetaName' - } - - def __init__(self, resource_id=None, kind=None, template_meta_name=None): # noqa: E501,D401,D403 - """PatchStackRequestAdditionalResources - a model defined in OpenAPI.""" # noqa: E501 - self._resource_id = None - self._kind = None - self._template_meta_name = None - self.discriminator = None - - self.resource_id = resource_id - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - - @property - def resource_id(self): - """Get the resource_id of this PatchStackRequestAdditionalResources. - - :return: The resource_id of this PatchStackRequestAdditionalResources. - :rtype: str - """ # noqa: E501 - return self._resource_id - - @resource_id.setter - def resource_id(self, resource_id): - """Set the resource_id of this PatchStackRequestAdditionalResources. - - :param resource_id: The resource_id of this PatchStackRequestAdditionalResources. - :type: str - """ # noqa: E501 - if resource_id is None: - raise ValueError("Invalid value for `resource_id`, must not be `None`") # noqa: E501 - self._resource_id = resource_id - - @property - def kind(self): - """Get the kind of this PatchStackRequestAdditionalResources. - - :return: The kind of this PatchStackRequestAdditionalResources. - :rtype: str - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this PatchStackRequestAdditionalResources. - - :param kind: The kind of this PatchStackRequestAdditionalResources. - :type: str - """ # noqa: E501 - if kind is None: - raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this PatchStackRequestAdditionalResources. - - :return: The template_meta_name of this PatchStackRequestAdditionalResources. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this PatchStackRequestAdditionalResources. - - :param template_meta_name: The template_meta_name of this PatchStackRequestAdditionalResources. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PatchStackRequestAdditionalResources): - 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/frogpilot/third_party/influxdb_client/domain/permission.py b/frogpilot/third_party/influxdb_client/domain/permission.py deleted file mode 100644 index 4d25db701..000000000 --- a/frogpilot/third_party/influxdb_client/domain/permission.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Permission(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 = { - 'action': 'str', - 'resource': 'PermissionResource' - } - - attribute_map = { - 'action': 'action', - 'resource': 'resource' - } - - def __init__(self, action=None, resource=None): # noqa: E501,D401,D403 - """Permission - a model defined in OpenAPI.""" # noqa: E501 - self._action = None - self._resource = None - self.discriminator = None - - self.action = action - self.resource = resource - - @property - def action(self): - """Get the action of this Permission. - - :return: The action of this Permission. - :rtype: str - """ # noqa: E501 - return self._action - - @action.setter - def action(self, action): - """Set the action of this Permission. - - :param action: The action of this Permission. - :type: str - """ # noqa: E501 - if action is None: - raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 - self._action = action - - @property - def resource(self): - """Get the resource of this Permission. - - :return: The resource of this Permission. - :rtype: PermissionResource - """ # noqa: E501 - return self._resource - - @resource.setter - def resource(self, resource): - """Set the resource of this Permission. - - :param resource: The resource of this Permission. - :type: PermissionResource - """ # noqa: E501 - if resource is None: - raise ValueError("Invalid value for `resource`, must not be `None`") # noqa: E501 - self._resource = resource - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Permission): - 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/frogpilot/third_party/influxdb_client/domain/permission_resource.py b/frogpilot/third_party/influxdb_client/domain/permission_resource.py deleted file mode 100644 index 07634a039..000000000 --- a/frogpilot/third_party/influxdb_client/domain/permission_resource.py +++ /dev/null @@ -1,220 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PermissionResource(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', - 'id': 'str', - 'name': 'str', - 'org_id': 'str', - 'org': 'str' - } - - attribute_map = { - 'type': 'type', - 'id': 'id', - 'name': 'name', - 'org_id': 'orgID', - 'org': 'org' - } - - def __init__(self, type=None, id=None, name=None, org_id=None, org=None): # noqa: E501,D401,D403 - """PermissionResource - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._id = None - self._name = None - self._org_id = None - self._org = None - self.discriminator = None - - self.type = type - if id is not None: - self.id = id - if name is not None: - self.name = name - if org_id is not None: - self.org_id = org_id - if org is not None: - self.org = org - - @property - def type(self): - """Get the type of this PermissionResource. - - A resource type. Identifies the API resource's type (or _kind_). - - :return: The type of this PermissionResource. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this PermissionResource. - - A resource type. Identifies the API resource's type (or _kind_). - - :param type: The type of this PermissionResource. - :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 id(self): - """Get the id of this PermissionResource. - - A resource ID. Identifies a specific resource. - - :return: The id of this PermissionResource. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this PermissionResource. - - A resource ID. Identifies a specific resource. - - :param id: The id of this PermissionResource. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this PermissionResource. - - The name of the resource. _Note: not all resource types have a `name` property_. - - :return: The name of this PermissionResource. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this PermissionResource. - - The name of the resource. _Note: not all resource types have a `name` property_. - - :param name: The name of this PermissionResource. - :type: str - """ # noqa: E501 - self._name = name - - @property - def org_id(self): - """Get the org_id of this PermissionResource. - - An organization ID. Identifies the organization that owns the resource. - - :return: The org_id of this PermissionResource. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this PermissionResource. - - An organization ID. Identifies the organization that owns the resource. - - :param org_id: The org_id of this PermissionResource. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def org(self): - """Get the org of this PermissionResource. - - An organization name. The organization that owns the resource. - - :return: The org of this PermissionResource. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this PermissionResource. - - An organization name. The organization that owns the resource. - - :param org: The org of this PermissionResource. - :type: str - """ # noqa: E501 - self._org = org - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PermissionResource): - 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/frogpilot/third_party/influxdb_client/domain/pipe_expression.py b/frogpilot/third_party/influxdb_client/domain/pipe_expression.py deleted file mode 100644 index 3f984113b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/pipe_expression.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class PipeExpression(Expression): - """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', - 'argument': 'Expression', - 'call': 'CallExpression' - } - - attribute_map = { - 'type': 'type', - 'argument': 'argument', - 'call': 'call' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if argument is not None: - self.argument = argument - if call is not None: - self.call = call - - @property - def type(self): - """Get the type of this PipeExpression. - - Type of AST node - - :return: The type of this PipeExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this PipeExpression. - - Type of AST node - - :param type: The type of this PipeExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def argument(self): - """Get the argument of this PipeExpression. - - :return: The argument of this PipeExpression. - :rtype: Expression - """ # noqa: E501 - return self._argument - - @argument.setter - def argument(self, argument): - """Set the argument of this PipeExpression. - - :param argument: The argument of this PipeExpression. - :type: Expression - """ # noqa: E501 - self._argument = argument - - @property - def call(self): - """Get the call of this PipeExpression. - - :return: The call of this PipeExpression. - :rtype: CallExpression - """ # noqa: E501 - return self._call - - @call.setter - def call(self, call): - """Set the call of this PipeExpression. - - :param call: The call of this PipeExpression. - :type: CallExpression - """ # noqa: E501 - self._call = call - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PipeExpression): - 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/frogpilot/third_party/influxdb_client/domain/pipe_literal.py b/frogpilot/third_party/influxdb_client/domain/pipe_literal.py deleted file mode 100644 index eea02437e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/pipe_literal.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class PipeLiteral(Expression): - """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' - } - - attribute_map = { - 'type': 'type' - } - - 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 - - if type is not None: - self.type = type - - @property - def type(self): - """Get the type of this PipeLiteral. - - Type of AST node - - :return: The type of this PipeLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this PipeLiteral. - - Type of AST node - - :param type: The type of this PipeLiteral. - :type: str - """ # noqa: E501 - self._type = type - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PipeLiteral): - 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/frogpilot/third_party/influxdb_client/domain/post_bucket_request.py b/frogpilot/third_party/influxdb_client/domain/post_bucket_request.py deleted file mode 100644 index 83215a70f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/post_bucket_request.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PostBucketRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'org_id': 'str', - 'name': 'str', - 'description': 'str', - 'rp': 'str', - 'retention_rules': 'list[BucketRetentionRules]', - 'schema_type': 'SchemaType' - } - - attribute_map = { - 'org_id': 'orgID', - 'name': 'name', - 'description': 'description', - 'rp': 'rp', - 'retention_rules': 'retentionRules', - 'schema_type': 'schemaType' - } - - def __init__(self, org_id=None, name=None, description=None, rp='0', 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 - - self.org_id = org_id - self.name = name - if description is not None: - self.description = description - if rp is not None: - self.rp = rp - if retention_rules is not None: - self.retention_rules = retention_rules - if schema_type is not None: - self.schema_type = schema_type - - @property - def org_id(self): - """Get the org_id of this PostBucketRequest. - - The organization ID. Specifies the organization that owns the bucket. - - :return: The org_id of this PostBucketRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this PostBucketRequest. - - The organization ID. Specifies the organization that owns the bucket. - - :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 - def name(self): - """Get the name of this PostBucketRequest. - - The bucket name. - - :return: The name of this PostBucketRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this PostBucketRequest. - - The bucket name. - - :param name: The name of this PostBucketRequest. - :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 PostBucketRequest. - - A description of the bucket. - - :return: The description of this PostBucketRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this PostBucketRequest. - - A description of the bucket. - - :param description: The description of this PostBucketRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def rp(self): - """Get the rp of this PostBucketRequest. - - The retention policy for the bucket. For InfluxDB 1.x, specifies the duration of time that each data point in the retention policy persists. If you need compatibility with InfluxDB 1.x, specify a value for the `rp` property; otherwise, see the `retentionRules` property. [Retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) is an InfluxDB 1.x concept. The InfluxDB 2.x and Cloud equivalent is [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). The InfluxDB `/api/v2` API uses `RetentionRules` to configure the retention period. - - :return: The rp of this PostBucketRequest. - :rtype: str - """ # noqa: E501 - return self._rp - - @rp.setter - def rp(self, rp): - """Set the rp of this PostBucketRequest. - - The retention policy for the bucket. For InfluxDB 1.x, specifies the duration of time that each data point in the retention policy persists. If you need compatibility with InfluxDB 1.x, specify a value for the `rp` property; otherwise, see the `retentionRules` property. [Retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp) is an InfluxDB 1.x concept. The InfluxDB 2.x and Cloud equivalent is [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). The InfluxDB `/api/v2` API uses `RetentionRules` to configure the retention period. - - :param rp: The rp of this PostBucketRequest. - :type: str - """ # noqa: E501 - self._rp = rp - - @property - def retention_rules(self): - """Get the retention_rules of this PostBucketRequest. - - Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. - - :return: The retention_rules of this PostBucketRequest. - :rtype: list[BucketRetentionRules] - """ # noqa: E501 - return self._retention_rules - - @retention_rules.setter - def retention_rules(self, retention_rules): - """Set the retention_rules of this PostBucketRequest. - - Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. - - :param retention_rules: The retention_rules of this PostBucketRequest. - :type: list[BucketRetentionRules] - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, PostBucketRequest): - 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/frogpilot/third_party/influxdb_client/domain/post_check.py b/frogpilot/third_party/influxdb_client/domain/post_check.py deleted file mode 100644 index 144a72e3a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/post_check.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PostCheck(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'str' - } - - attribute_map = { - 'type': 'type' - } - - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PostCheck): - 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/frogpilot/third_party/influxdb_client/domain/post_notification_endpoint.py b/frogpilot/third_party/influxdb_client/domain/post_notification_endpoint.py deleted file mode 100644 index d2d0b3c85..000000000 --- a/frogpilot/third_party/influxdb_client/domain/post_notification_endpoint.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PostNotificationEndpoint(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'type': 'NotificationEndpointType' - } - - attribute_map = { - 'type': 'type' - } - - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PostNotificationEndpoint): - 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/frogpilot/third_party/influxdb_client/domain/post_notification_rule.py b/frogpilot/third_party/influxdb_client/domain/post_notification_rule.py deleted file mode 100644 index d0a54a0dd..000000000 --- a/frogpilot/third_party/influxdb_client/domain/post_notification_rule.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PostNotificationRule(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' - } - - attribute_map = { - 'type': 'type' - } - - 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 - 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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PostNotificationRule): - 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/frogpilot/third_party/influxdb_client/domain/post_organization_request.py b/frogpilot/third_party/influxdb_client/domain/post_organization_request.py deleted file mode 100644 index 5e152d374..000000000 --- a/frogpilot/third_party/influxdb_client/domain/post_organization_request.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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. - - The name of the organization. - - :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. - - The name of the organization. - - :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. - - The description of the organization. - - :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. - - The description of the organization. - - :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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/post_restore_kv_response.py b/frogpilot/third_party/influxdb_client/domain/post_restore_kv_response.py deleted file mode 100644 index 5cd5c166d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/post_restore_kv_response.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PostRestoreKVResponse(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 = { - 'token': 'str' - } - - attribute_map = { - 'token': 'token' - } - - def __init__(self, token=None): # noqa: E501,D401,D403 - """PostRestoreKVResponse - a model defined in OpenAPI.""" # noqa: E501 - self._token = None - self.discriminator = None - - if token is not None: - self.token = token - - @property - def token(self): - """Get the token of this PostRestoreKVResponse. - - token is the root token for the instance after restore (this is overwritten during the restore) - - :return: The token of this PostRestoreKVResponse. - :rtype: str - """ # noqa: E501 - return self._token - - @token.setter - def token(self, token): - """Set the token of this PostRestoreKVResponse. - - token is the root token for the instance after restore (this is overwritten during the restore) - - :param token: The token of this PostRestoreKVResponse. - :type: str - """ # noqa: E501 - self._token = token - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PostRestoreKVResponse): - 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/frogpilot/third_party/influxdb_client/domain/post_stack_request.py b/frogpilot/third_party/influxdb_client/domain/post_stack_request.py deleted file mode 100644 index ce683035a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/post_stack_request.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class PostStackRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'org_id': 'str', - 'name': 'str', - 'description': 'str', - 'urls': 'list[str]' - } - - attribute_map = { - 'org_id': 'orgID', - 'name': 'name', - 'description': 'description', - 'urls': 'urls' - } - - def __init__(self, org_id=None, name=None, description=None, urls=None): # noqa: E501,D401,D403 - """PostStackRequest - a model defined in OpenAPI.""" # noqa: E501 - self._org_id = None - self._name = None - self._description = None - self._urls = None - self.discriminator = None - - if org_id is not None: - self.org_id = org_id - if name is not None: - self.name = name - if description is not None: - self.description = description - if urls is not None: - self.urls = urls - - @property - def org_id(self): - """Get the org_id of this PostStackRequest. - - :return: The org_id of this PostStackRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this PostStackRequest. - - :param org_id: The org_id of this PostStackRequest. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def name(self): - """Get the name of this PostStackRequest. - - :return: The name of this PostStackRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this PostStackRequest. - - :param name: The name of this PostStackRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this PostStackRequest. - - :return: The description of this PostStackRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this PostStackRequest. - - :param description: The description of this PostStackRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def urls(self): - """Get the urls of this PostStackRequest. - - :return: The urls of this PostStackRequest. - :rtype: list[str] - """ # noqa: E501 - return self._urls - - @urls.setter - def urls(self, urls): - """Set the urls of this PostStackRequest. - - :param urls: The urls of this PostStackRequest. - :type: list[str] - """ # noqa: E501 - self._urls = urls - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PostStackRequest): - 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/frogpilot/third_party/influxdb_client/domain/property_key.py b/frogpilot/third_party/influxdb_client/domain/property_key.py deleted file mode 100644 index e072527b5..000000000 --- a/frogpilot/third_party/influxdb_client/domain/property_key.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class PropertyKey(Expression): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501,D401,D403 - """PropertyKey - a model defined in OpenAPI.""" # noqa: E501 - Expression.__init__(self) # noqa: E501 - self.discriminator = None - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, PropertyKey): - 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/frogpilot/third_party/influxdb_client/domain/query.py b/frogpilot/third_party/influxdb_client/domain/query.py deleted file mode 100644 index 9b69972c6..000000000 --- a/frogpilot/third_party/influxdb_client/domain/query.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Query(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 = { - 'extern': 'File', - 'query': 'str', - 'type': 'str', - 'params': 'dict(str, object)', - 'dialect': 'Dialect', - 'now': 'datetime' - } - - attribute_map = { - 'extern': 'extern', - 'query': 'query', - 'type': 'type', - 'params': 'params', - 'dialect': 'dialect', - 'now': 'now' - } - - 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 - - if extern is not None: - self.extern = extern - 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: - self.now = now - - @property - def extern(self): - """Get the extern of this Query. - - :return: The extern of this Query. - :rtype: File - """ # noqa: E501 - return self._extern - - @extern.setter - def extern(self, extern): - """Set the extern of this Query. - - :param extern: The extern of this Query. - :type: File - """ # noqa: E501 - self._extern = extern - - @property - def query(self): - """Get the query of this Query. - - The query script to execute. - - :return: The query of this Query. - :rtype: str - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this Query. - - The query script to execute. - - :param query: The query of this Query. - :type: str - """ # noqa: E501 - if query is None: - raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501 - self._query = query - - @property - def type(self): - """Get the type of this Query. - - The type of query. Must be "flux". - - :return: The type of this Query. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Query. - - The type of query. Must be "flux". - - :param type: The type of this Query. - :type: str - """ # noqa: E501 - self._type = type - - @property - def params(self): - r"""Get the params of this Query. - - Key-value pairs passed as parameters during query execution. To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example: ```json query: "from(bucket: params.mybucket)\\ |> range(start: params.rangeStart) |> limit(n:1)" ``` and pass _`params`_ with the key-value pairs--for example: ```json params: { "mybucket": "environment", "rangeStart": "-30d" } ``` During query execution, InfluxDB passes _`params`_ to your script and substitutes the values. #### Limitations - If you use _`params`_, you can't use _`extern`_. - - :return: The params of this Query. - :rtype: dict(str, object) - """ # noqa: E501 - return self._params - - @params.setter - def params(self, params): - r"""Set the params of this Query. - - Key-value pairs passed as parameters during query execution. To use parameters in your query, pass a _`query`_ with `params` references (in dot notation)--for example: ```json query: "from(bucket: params.mybucket)\\ |> range(start: params.rangeStart) |> limit(n:1)" ``` and pass _`params`_ with the key-value pairs--for example: ```json params: { "mybucket": "environment", "rangeStart": "-30d" } ``` During query execution, InfluxDB passes _`params`_ to your script and substitutes the values. #### Limitations - If you use _`params`_, you can't use _`extern`_. - - :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. - - :return: The dialect of this Query. - :rtype: Dialect - """ # noqa: E501 - return self._dialect - - @dialect.setter - def dialect(self, dialect): - """Set the dialect of this Query. - - :param dialect: The dialect of this Query. - :type: Dialect - """ # noqa: E501 - self._dialect = dialect - - @property - def now(self): - """Get the now of this Query. - - Specifies the time that should be reported as `now` in the query. Default is the server `now` time. - - :return: The now of this Query. - :rtype: datetime - """ # noqa: E501 - return self._now - - @now.setter - def now(self, now): - """Set the now of this Query. - - Specifies the time that should be reported as `now` in the query. Default is the server `now` time. - - :param now: The now of this Query. - :type: datetime - """ # noqa: E501 - self._now = now - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Query): - 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/frogpilot/third_party/influxdb_client/domain/query_edit_mode.py b/frogpilot/third_party/influxdb_client/domain/query_edit_mode.py deleted file mode 100644 index 8a7fba8b0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/query_edit_mode.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class QueryEditMode(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - BUILDER = "builder" - ADVANCED = "advanced" - - """ - 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 - """QueryEditMode - 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 self.openapi_types.items(): - 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, QueryEditMode): - 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/frogpilot/third_party/influxdb_client/domain/query_variable_properties.py b/frogpilot/third_party/influxdb_client/domain/query_variable_properties.py deleted file mode 100644 index 143bb01e2..000000000 --- a/frogpilot/third_party/influxdb_client/domain/query_variable_properties.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.variable_properties import VariableProperties - - -class QueryVariableProperties(VariableProperties): - """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', - 'values': 'QueryVariablePropertiesValues' - } - - attribute_map = { - 'type': 'type', - 'values': 'values' - } - - 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 - - if type is not None: - self.type = type - if values is not None: - self.values = values - - @property - def type(self): - """Get the type of this QueryVariableProperties. - - :return: The type of this QueryVariableProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this QueryVariableProperties. - - :param type: The type of this QueryVariableProperties. - :type: str - """ # noqa: E501 - self._type = type - - @property - def values(self): - """Get the values of this QueryVariableProperties. - - :return: The values of this QueryVariableProperties. - :rtype: QueryVariablePropertiesValues - """ # noqa: E501 - return self._values - - @values.setter - def values(self, values): - """Set the values of this QueryVariableProperties. - - :param values: The values of this QueryVariableProperties. - :type: QueryVariablePropertiesValues - """ # noqa: E501 - self._values = values - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, QueryVariableProperties): - 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/frogpilot/third_party/influxdb_client/domain/query_variable_properties_values.py b/frogpilot/third_party/influxdb_client/domain/query_variable_properties_values.py deleted file mode 100644 index a06a174e8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/query_variable_properties_values.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class QueryVariablePropertiesValues(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 = { - 'query': 'str', - 'language': 'str' - } - - attribute_map = { - 'query': 'query', - 'language': 'language' - } - - def __init__(self, query=None, language=None): # noqa: E501,D401,D403 - """QueryVariablePropertiesValues - a model defined in OpenAPI.""" # noqa: E501 - self._query = None - self._language = None - self.discriminator = None - - if query is not None: - self.query = query - if language is not None: - self.language = language - - @property - def query(self): - """Get the query of this QueryVariablePropertiesValues. - - :return: The query of this QueryVariablePropertiesValues. - :rtype: str - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this QueryVariablePropertiesValues. - - :param query: The query of this QueryVariablePropertiesValues. - :type: str - """ # noqa: E501 - self._query = query - - @property - def language(self): - """Get the language of this QueryVariablePropertiesValues. - - :return: The language of this QueryVariablePropertiesValues. - :rtype: str - """ # noqa: E501 - return self._language - - @language.setter - def language(self, language): - """Set the language of this QueryVariablePropertiesValues. - - :param language: The language of this QueryVariablePropertiesValues. - :type: str - """ # noqa: E501 - self._language = language - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, QueryVariablePropertiesValues): - 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/frogpilot/third_party/influxdb_client/domain/range_threshold.py b/frogpilot/third_party/influxdb_client/domain/range_threshold.py deleted file mode 100644 index 68e19860c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/range_threshold.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.threshold_base import ThresholdBase - - -class RangeThreshold(ThresholdBase): - """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', - 'min': 'float', - 'max': 'float', - 'within': 'bool', - 'level': 'CheckStatusLevel', - 'all_values': 'bool' - } - - attribute_map = { - 'type': 'type', - 'min': 'min', - 'max': 'max', - 'within': 'within', - 'level': 'level', - 'all_values': 'allValues' - } - - 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 - ThresholdBase.__init__(self, level=level, all_values=all_values) # noqa: E501 - - self._type = None - self._min = None - self._max = None - self._within = None - self.discriminator = None - - self.type = type - self.min = min - self.max = max - self.within = within - - @property - def type(self): - """Get the type of this RangeThreshold. - - :return: The type of this RangeThreshold. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this RangeThreshold. - - :param type: The type of this RangeThreshold. - :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 min(self): - """Get the min of this RangeThreshold. - - :return: The min of this RangeThreshold. - :rtype: float - """ # noqa: E501 - return self._min - - @min.setter - def min(self, min): - """Set the min of this RangeThreshold. - - :param min: The min of this RangeThreshold. - :type: float - """ # noqa: E501 - if min is None: - raise ValueError("Invalid value for `min`, must not be `None`") # noqa: E501 - self._min = min - - @property - def max(self): - """Get the max of this RangeThreshold. - - :return: The max of this RangeThreshold. - :rtype: float - """ # noqa: E501 - return self._max - - @max.setter - def max(self, max): - """Set the max of this RangeThreshold. - - :param max: The max of this RangeThreshold. - :type: float - """ # noqa: E501 - if max is None: - raise ValueError("Invalid value for `max`, must not be `None`") # noqa: E501 - self._max = max - - @property - def within(self): - """Get the within of this RangeThreshold. - - :return: The within of this RangeThreshold. - :rtype: bool - """ # noqa: E501 - return self._within - - @within.setter - def within(self, within): - """Set the within of this RangeThreshold. - - :param within: The within of this RangeThreshold. - :type: bool - """ # noqa: E501 - if within is None: - raise ValueError("Invalid value for `within`, must not be `None`") # noqa: E501 - self._within = within - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RangeThreshold): - 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/frogpilot/third_party/influxdb_client/domain/ready.py b/frogpilot/third_party/influxdb_client/domain/ready.py deleted file mode 100644 index 46c4d29bd..000000000 --- a/frogpilot/third_party/influxdb_client/domain/ready.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Ready(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 = { - 'status': 'str', - 'started': 'datetime', - 'up': 'str' - } - - attribute_map = { - 'status': 'status', - 'started': 'started', - 'up': 'up' - } - - def __init__(self, status=None, started=None, up=None): # noqa: E501,D401,D403 - """Ready - a model defined in OpenAPI.""" # noqa: E501 - self._status = None - self._started = None - self._up = None - self.discriminator = None - - if status is not None: - self.status = status - if started is not None: - self.started = started - if up is not None: - self.up = up - - @property - def status(self): - """Get the status of this Ready. - - :return: The status of this Ready. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this Ready. - - :param status: The status of this Ready. - :type: str - """ # noqa: E501 - self._status = status - - @property - def started(self): - """Get the started of this Ready. - - :return: The started of this Ready. - :rtype: datetime - """ # noqa: E501 - return self._started - - @started.setter - def started(self, started): - """Set the started of this Ready. - - :param started: The started of this Ready. - :type: datetime - """ # noqa: E501 - self._started = started - - @property - def up(self): - """Get the up of this Ready. - - :return: The up of this Ready. - :rtype: str - """ # noqa: E501 - return self._up - - @up.setter - def up(self, up): - """Set the up of this Ready. - - :param up: The up of this Ready. - :type: str - """ # noqa: E501 - self._up = up - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Ready): - 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/frogpilot/third_party/influxdb_client/domain/regexp_literal.py b/frogpilot/third_party/influxdb_client/domain/regexp_literal.py deleted file mode 100644 index 95fe4cb16..000000000 --- a/frogpilot/third_party/influxdb_client/domain/regexp_literal.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class RegexpLiteral(Expression): - """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', - 'value': 'str' - } - - attribute_map = { - 'type': 'type', - 'value': 'value' - } - - 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 - - if type is not None: - self.type = type - if value is not None: - self.value = value - - @property - def type(self): - """Get the type of this RegexpLiteral. - - Type of AST node - - :return: The type of this RegexpLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this RegexpLiteral. - - Type of AST node - - :param type: The type of this RegexpLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def value(self): - """Get the value of this RegexpLiteral. - - :return: The value of this RegexpLiteral. - :rtype: str - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this RegexpLiteral. - - :param value: The value of this RegexpLiteral. - :type: str - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RegexpLiteral): - 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/frogpilot/third_party/influxdb_client/domain/remote_connection.py b/frogpilot/third_party/influxdb_client/domain/remote_connection.py deleted file mode 100644 index e0c1785c3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/remote_connection.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RemoteConnection(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'org_id': 'str', - 'description': 'str', - 'remote_url': 'str', - 'remote_org_id': 'str', - 'allow_insecure_tls': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'org_id': 'orgID', - 'description': 'description', - 'remote_url': 'remoteURL', - 'remote_org_id': 'remoteOrgID', - 'allow_insecure_tls': 'allowInsecureTLS' - } - - def __init__(self, id=None, name=None, org_id=None, description=None, remote_url=None, remote_org_id=None, allow_insecure_tls=False): # noqa: E501,D401,D403 - """RemoteConnection - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._name = None - self._org_id = None - self._description = None - self._remote_url = None - self._remote_org_id = None - self._allow_insecure_tls = None - self.discriminator = None - - self.id = id - self.name = name - self.org_id = org_id - if description is not None: - self.description = description - self.remote_url = remote_url - if remote_org_id is not None: - self.remote_org_id = remote_org_id - self.allow_insecure_tls = allow_insecure_tls - - @property - def id(self): - """Get the id of this RemoteConnection. - - :return: The id of this RemoteConnection. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this RemoteConnection. - - :param id: The id of this RemoteConnection. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this RemoteConnection. - - :return: The name of this RemoteConnection. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this RemoteConnection. - - :param name: The name of this RemoteConnection. - :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 org_id(self): - """Get the org_id of this RemoteConnection. - - :return: The org_id of this RemoteConnection. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this RemoteConnection. - - :param org_id: The org_id of this RemoteConnection. - :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 - def description(self): - """Get the description of this RemoteConnection. - - :return: The description of this RemoteConnection. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this RemoteConnection. - - :param description: The description of this RemoteConnection. - :type: str - """ # noqa: E501 - self._description = description - - @property - def remote_url(self): - """Get the remote_url of this RemoteConnection. - - :return: The remote_url of this RemoteConnection. - :rtype: str - """ # noqa: E501 - return self._remote_url - - @remote_url.setter - def remote_url(self, remote_url): - """Set the remote_url of this RemoteConnection. - - :param remote_url: The remote_url of this RemoteConnection. - :type: str - """ # noqa: E501 - if remote_url is None: - raise ValueError("Invalid value for `remote_url`, must not be `None`") # noqa: E501 - self._remote_url = remote_url - - @property - def remote_org_id(self): - """Get the remote_org_id of this RemoteConnection. - - :return: The remote_org_id of this RemoteConnection. - :rtype: str - """ # noqa: E501 - return self._remote_org_id - - @remote_org_id.setter - def remote_org_id(self, remote_org_id): - """Set the remote_org_id of this RemoteConnection. - - :param remote_org_id: The remote_org_id of this RemoteConnection. - :type: str - """ # noqa: E501 - self._remote_org_id = remote_org_id - - @property - def allow_insecure_tls(self): - """Get the allow_insecure_tls of this RemoteConnection. - - :return: The allow_insecure_tls of this RemoteConnection. - :rtype: bool - """ # noqa: E501 - return self._allow_insecure_tls - - @allow_insecure_tls.setter - def allow_insecure_tls(self, allow_insecure_tls): - """Set the allow_insecure_tls of this RemoteConnection. - - :param allow_insecure_tls: The allow_insecure_tls of this RemoteConnection. - :type: bool - """ # noqa: E501 - if allow_insecure_tls is None: - raise ValueError("Invalid value for `allow_insecure_tls`, must not be `None`") # noqa: E501 - self._allow_insecure_tls = allow_insecure_tls - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RemoteConnection): - 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/frogpilot/third_party/influxdb_client/domain/remote_connection_creation_request.py b/frogpilot/third_party/influxdb_client/domain/remote_connection_creation_request.py deleted file mode 100644 index ba775362e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/remote_connection_creation_request.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RemoteConnectionCreationRequest(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', - 'org_id': 'str', - 'remote_url': 'str', - 'remote_api_token': 'str', - 'remote_org_id': 'str', - 'allow_insecure_tls': 'bool' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'org_id': 'orgID', - 'remote_url': 'remoteURL', - 'remote_api_token': 'remoteAPIToken', - 'remote_org_id': 'remoteOrgID', - 'allow_insecure_tls': 'allowInsecureTLS' - } - - def __init__(self, name=None, description=None, org_id=None, remote_url=None, remote_api_token=None, remote_org_id=None, allow_insecure_tls=False): # noqa: E501,D401,D403 - """RemoteConnectionCreationRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._org_id = None - self._remote_url = None - self._remote_api_token = None - self._remote_org_id = None - self._allow_insecure_tls = None - self.discriminator = None - - self.name = name - if description is not None: - self.description = description - self.org_id = org_id - self.remote_url = remote_url - self.remote_api_token = remote_api_token - if remote_org_id is not None: - self.remote_org_id = remote_org_id - self.allow_insecure_tls = allow_insecure_tls - - @property - def name(self): - """Get the name of this RemoteConnectionCreationRequest. - - :return: The name of this RemoteConnectionCreationRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this RemoteConnectionCreationRequest. - - :param name: The name of this RemoteConnectionCreationRequest. - :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 RemoteConnectionCreationRequest. - - :return: The description of this RemoteConnectionCreationRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this RemoteConnectionCreationRequest. - - :param description: The description of this RemoteConnectionCreationRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def org_id(self): - """Get the org_id of this RemoteConnectionCreationRequest. - - :return: The org_id of this RemoteConnectionCreationRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this RemoteConnectionCreationRequest. - - :param org_id: The org_id of this RemoteConnectionCreationRequest. - :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 - def remote_url(self): - """Get the remote_url of this RemoteConnectionCreationRequest. - - :return: The remote_url of this RemoteConnectionCreationRequest. - :rtype: str - """ # noqa: E501 - return self._remote_url - - @remote_url.setter - def remote_url(self, remote_url): - """Set the remote_url of this RemoteConnectionCreationRequest. - - :param remote_url: The remote_url of this RemoteConnectionCreationRequest. - :type: str - """ # noqa: E501 - if remote_url is None: - raise ValueError("Invalid value for `remote_url`, must not be `None`") # noqa: E501 - self._remote_url = remote_url - - @property - def remote_api_token(self): - """Get the remote_api_token of this RemoteConnectionCreationRequest. - - :return: The remote_api_token of this RemoteConnectionCreationRequest. - :rtype: str - """ # noqa: E501 - return self._remote_api_token - - @remote_api_token.setter - def remote_api_token(self, remote_api_token): - """Set the remote_api_token of this RemoteConnectionCreationRequest. - - :param remote_api_token: The remote_api_token of this RemoteConnectionCreationRequest. - :type: str - """ # noqa: E501 - if remote_api_token is None: - raise ValueError("Invalid value for `remote_api_token`, must not be `None`") # noqa: E501 - self._remote_api_token = remote_api_token - - @property - def remote_org_id(self): - """Get the remote_org_id of this RemoteConnectionCreationRequest. - - :return: The remote_org_id of this RemoteConnectionCreationRequest. - :rtype: str - """ # noqa: E501 - return self._remote_org_id - - @remote_org_id.setter - def remote_org_id(self, remote_org_id): - """Set the remote_org_id of this RemoteConnectionCreationRequest. - - :param remote_org_id: The remote_org_id of this RemoteConnectionCreationRequest. - :type: str - """ # noqa: E501 - self._remote_org_id = remote_org_id - - @property - def allow_insecure_tls(self): - """Get the allow_insecure_tls of this RemoteConnectionCreationRequest. - - :return: The allow_insecure_tls of this RemoteConnectionCreationRequest. - :rtype: bool - """ # noqa: E501 - return self._allow_insecure_tls - - @allow_insecure_tls.setter - def allow_insecure_tls(self, allow_insecure_tls): - """Set the allow_insecure_tls of this RemoteConnectionCreationRequest. - - :param allow_insecure_tls: The allow_insecure_tls of this RemoteConnectionCreationRequest. - :type: bool - """ # noqa: E501 - if allow_insecure_tls is None: - raise ValueError("Invalid value for `allow_insecure_tls`, must not be `None`") # noqa: E501 - self._allow_insecure_tls = allow_insecure_tls - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RemoteConnectionCreationRequest): - 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/frogpilot/third_party/influxdb_client/domain/remote_connection_update_request.py b/frogpilot/third_party/influxdb_client/domain/remote_connection_update_request.py deleted file mode 100644 index 54fd9f1c7..000000000 --- a/frogpilot/third_party/influxdb_client/domain/remote_connection_update_request.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RemoteConnectionUpdateRequest(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', - 'remote_url': 'str', - 'remote_api_token': 'str', - 'remote_org_id': 'str', - 'allow_insecure_tls': 'bool' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'remote_url': 'remoteURL', - 'remote_api_token': 'remoteAPIToken', - 'remote_org_id': 'remoteOrgID', - 'allow_insecure_tls': 'allowInsecureTLS' - } - - def __init__(self, name=None, description=None, remote_url=None, remote_api_token=None, remote_org_id=None, allow_insecure_tls=False): # noqa: E501,D401,D403 - """RemoteConnectionUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._remote_url = None - self._remote_api_token = None - self._remote_org_id = None - self._allow_insecure_tls = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if remote_url is not None: - self.remote_url = remote_url - if remote_api_token is not None: - self.remote_api_token = remote_api_token - if remote_org_id is not None: - self.remote_org_id = remote_org_id - if allow_insecure_tls is not None: - self.allow_insecure_tls = allow_insecure_tls - - @property - def name(self): - """Get the name of this RemoteConnectionUpdateRequest. - - :return: The name of this RemoteConnectionUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this RemoteConnectionUpdateRequest. - - :param name: The name of this RemoteConnectionUpdateRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this RemoteConnectionUpdateRequest. - - :return: The description of this RemoteConnectionUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this RemoteConnectionUpdateRequest. - - :param description: The description of this RemoteConnectionUpdateRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def remote_url(self): - """Get the remote_url of this RemoteConnectionUpdateRequest. - - :return: The remote_url of this RemoteConnectionUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._remote_url - - @remote_url.setter - def remote_url(self, remote_url): - """Set the remote_url of this RemoteConnectionUpdateRequest. - - :param remote_url: The remote_url of this RemoteConnectionUpdateRequest. - :type: str - """ # noqa: E501 - self._remote_url = remote_url - - @property - def remote_api_token(self): - """Get the remote_api_token of this RemoteConnectionUpdateRequest. - - :return: The remote_api_token of this RemoteConnectionUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._remote_api_token - - @remote_api_token.setter - def remote_api_token(self, remote_api_token): - """Set the remote_api_token of this RemoteConnectionUpdateRequest. - - :param remote_api_token: The remote_api_token of this RemoteConnectionUpdateRequest. - :type: str - """ # noqa: E501 - self._remote_api_token = remote_api_token - - @property - def remote_org_id(self): - """Get the remote_org_id of this RemoteConnectionUpdateRequest. - - :return: The remote_org_id of this RemoteConnectionUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._remote_org_id - - @remote_org_id.setter - def remote_org_id(self, remote_org_id): - """Set the remote_org_id of this RemoteConnectionUpdateRequest. - - :param remote_org_id: The remote_org_id of this RemoteConnectionUpdateRequest. - :type: str - """ # noqa: E501 - self._remote_org_id = remote_org_id - - @property - def allow_insecure_tls(self): - """Get the allow_insecure_tls of this RemoteConnectionUpdateRequest. - - :return: The allow_insecure_tls of this RemoteConnectionUpdateRequest. - :rtype: bool - """ # noqa: E501 - return self._allow_insecure_tls - - @allow_insecure_tls.setter - def allow_insecure_tls(self, allow_insecure_tls): - """Set the allow_insecure_tls of this RemoteConnectionUpdateRequest. - - :param allow_insecure_tls: The allow_insecure_tls of this RemoteConnectionUpdateRequest. - :type: bool - """ # noqa: E501 - self._allow_insecure_tls = allow_insecure_tls - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RemoteConnectionUpdateRequest): - 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/frogpilot/third_party/influxdb_client/domain/remote_connections.py b/frogpilot/third_party/influxdb_client/domain/remote_connections.py deleted file mode 100644 index ca6d30ce7..000000000 --- a/frogpilot/third_party/influxdb_client/domain/remote_connections.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RemoteConnections(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 = { - 'remotes': 'list[RemoteConnection]' - } - - attribute_map = { - 'remotes': 'remotes' - } - - def __init__(self, remotes=None): # noqa: E501,D401,D403 - """RemoteConnections - a model defined in OpenAPI.""" # noqa: E501 - self._remotes = None - self.discriminator = None - - if remotes is not None: - self.remotes = remotes - - @property - def remotes(self): - """Get the remotes of this RemoteConnections. - - :return: The remotes of this RemoteConnections. - :rtype: list[RemoteConnection] - """ # noqa: E501 - return self._remotes - - @remotes.setter - def remotes(self, remotes): - """Set the remotes of this RemoteConnections. - - :param remotes: The remotes of this RemoteConnections. - :type: list[RemoteConnection] - """ # noqa: E501 - self._remotes = remotes - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RemoteConnections): - 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/frogpilot/third_party/influxdb_client/domain/renamable_field.py b/frogpilot/third_party/influxdb_client/domain/renamable_field.py deleted file mode 100644 index 088cea3db..000000000 --- a/frogpilot/third_party/influxdb_client/domain/renamable_field.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RenamableField(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 = { - 'internal_name': 'str', - 'display_name': 'str', - 'visible': 'bool' - } - - attribute_map = { - 'internal_name': 'internalName', - 'display_name': 'displayName', - 'visible': 'visible' - } - - def __init__(self, internal_name=None, display_name=None, visible=None): # noqa: E501,D401,D403 - """RenamableField - a model defined in OpenAPI.""" # noqa: E501 - self._internal_name = None - self._display_name = None - self._visible = None - self.discriminator = None - - if internal_name is not None: - self.internal_name = internal_name - if display_name is not None: - self.display_name = display_name - if visible is not None: - self.visible = visible - - @property - def internal_name(self): - """Get the internal_name of this RenamableField. - - The calculated name of a field. - - :return: The internal_name of this RenamableField. - :rtype: str - """ # noqa: E501 - return self._internal_name - - @internal_name.setter - def internal_name(self, internal_name): - """Set the internal_name of this RenamableField. - - The calculated name of a field. - - :param internal_name: The internal_name of this RenamableField. - :type: str - """ # noqa: E501 - self._internal_name = internal_name - - @property - def display_name(self): - """Get the display_name of this RenamableField. - - The name that a field is renamed to by the user. - - :return: The display_name of this RenamableField. - :rtype: str - """ # noqa: E501 - return self._display_name - - @display_name.setter - def display_name(self, display_name): - """Set the display_name of this RenamableField. - - The name that a field is renamed to by the user. - - :param display_name: The display_name of this RenamableField. - :type: str - """ # noqa: E501 - self._display_name = display_name - - @property - def visible(self): - """Get the visible of this RenamableField. - - Indicates whether this field should be visible on the table. - - :return: The visible of this RenamableField. - :rtype: bool - """ # noqa: E501 - return self._visible - - @visible.setter - def visible(self, visible): - """Set the visible of this RenamableField. - - Indicates whether this field should be visible on the table. - - :param visible: The visible of this RenamableField. - :type: bool - """ # noqa: E501 - self._visible = visible - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RenamableField): - 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/frogpilot/third_party/influxdb_client/domain/replication.py b/frogpilot/third_party/influxdb_client/domain/replication.py deleted file mode 100644 index fea45ca38..000000000 --- a/frogpilot/third_party/influxdb_client/domain/replication.py +++ /dev/null @@ -1,412 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Replication(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'description': 'str', - 'org_id': 'str', - 'remote_id': 'str', - 'local_bucket_id': 'str', - 'remote_bucket_id': 'str', - 'remote_bucket_name': 'str', - 'max_queue_size_bytes': 'int', - 'current_queue_size_bytes': 'int', - 'remaining_bytes_to_be_synced': 'int', - 'latest_response_code': 'int', - 'latest_error_message': 'str', - 'drop_non_retryable_data': 'bool' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'org_id': 'orgID', - 'remote_id': 'remoteID', - 'local_bucket_id': 'localBucketID', - 'remote_bucket_id': 'remoteBucketID', - 'remote_bucket_name': 'remoteBucketName', - 'max_queue_size_bytes': 'maxQueueSizeBytes', - 'current_queue_size_bytes': 'currentQueueSizeBytes', - 'remaining_bytes_to_be_synced': 'remainingBytesToBeSynced', - 'latest_response_code': 'latestResponseCode', - 'latest_error_message': 'latestErrorMessage', - 'drop_non_retryable_data': 'dropNonRetryableData' - } - - def __init__(self, id=None, name=None, description=None, org_id=None, remote_id=None, local_bucket_id=None, remote_bucket_id=None, remote_bucket_name=None, max_queue_size_bytes=None, current_queue_size_bytes=None, remaining_bytes_to_be_synced=None, latest_response_code=None, latest_error_message=None, drop_non_retryable_data=None): # noqa: E501,D401,D403 - """Replication - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._org_id = None - self._remote_id = None - self._local_bucket_id = None - self._remote_bucket_id = None - self._remote_bucket_name = None - self._max_queue_size_bytes = None - self._current_queue_size_bytes = None - self._remaining_bytes_to_be_synced = None - self._latest_response_code = None - self._latest_error_message = None - self._drop_non_retryable_data = None - self.discriminator = None - - self.id = id - self.name = name - if description is not None: - self.description = description - self.org_id = org_id - self.remote_id = remote_id - self.local_bucket_id = local_bucket_id - if remote_bucket_id is not None: - self.remote_bucket_id = remote_bucket_id - if remote_bucket_name is not None: - self.remote_bucket_name = remote_bucket_name - self.max_queue_size_bytes = max_queue_size_bytes - if current_queue_size_bytes is not None: - self.current_queue_size_bytes = current_queue_size_bytes - if remaining_bytes_to_be_synced is not None: - self.remaining_bytes_to_be_synced = remaining_bytes_to_be_synced - if latest_response_code is not None: - self.latest_response_code = latest_response_code - if latest_error_message is not None: - self.latest_error_message = latest_error_message - if drop_non_retryable_data is not None: - self.drop_non_retryable_data = drop_non_retryable_data - - @property - def id(self): - """Get the id of this Replication. - - :return: The id of this Replication. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Replication. - - :param id: The id of this Replication. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this Replication. - - :return: The name of this Replication. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Replication. - - :param name: The name of this Replication. - :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 Replication. - - :return: The description of this Replication. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this Replication. - - :param description: The description of this Replication. - :type: str - """ # noqa: E501 - self._description = description - - @property - def org_id(self): - """Get the org_id of this Replication. - - :return: The org_id of this Replication. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Replication. - - :param org_id: The org_id of this Replication. - :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 - def remote_id(self): - """Get the remote_id of this Replication. - - :return: The remote_id of this Replication. - :rtype: str - """ # noqa: E501 - return self._remote_id - - @remote_id.setter - def remote_id(self, remote_id): - """Set the remote_id of this Replication. - - :param remote_id: The remote_id of this Replication. - :type: str - """ # noqa: E501 - if remote_id is None: - raise ValueError("Invalid value for `remote_id`, must not be `None`") # noqa: E501 - self._remote_id = remote_id - - @property - def local_bucket_id(self): - """Get the local_bucket_id of this Replication. - - :return: The local_bucket_id of this Replication. - :rtype: str - """ # noqa: E501 - return self._local_bucket_id - - @local_bucket_id.setter - def local_bucket_id(self, local_bucket_id): - """Set the local_bucket_id of this Replication. - - :param local_bucket_id: The local_bucket_id of this Replication. - :type: str - """ # noqa: E501 - if local_bucket_id is None: - raise ValueError("Invalid value for `local_bucket_id`, must not be `None`") # noqa: E501 - self._local_bucket_id = local_bucket_id - - @property - def remote_bucket_id(self): - """Get the remote_bucket_id of this Replication. - - :return: The remote_bucket_id of this Replication. - :rtype: str - """ # noqa: E501 - return self._remote_bucket_id - - @remote_bucket_id.setter - def remote_bucket_id(self, remote_bucket_id): - """Set the remote_bucket_id of this Replication. - - :param remote_bucket_id: The remote_bucket_id of this Replication. - :type: str - """ # noqa: E501 - self._remote_bucket_id = remote_bucket_id - - @property - def remote_bucket_name(self): - """Get the remote_bucket_name of this Replication. - - :return: The remote_bucket_name of this Replication. - :rtype: str - """ # noqa: E501 - return self._remote_bucket_name - - @remote_bucket_name.setter - def remote_bucket_name(self, remote_bucket_name): - """Set the remote_bucket_name of this Replication. - - :param remote_bucket_name: The remote_bucket_name of this Replication. - :type: str - """ # noqa: E501 - self._remote_bucket_name = remote_bucket_name - - @property - def max_queue_size_bytes(self): - """Get the max_queue_size_bytes of this Replication. - - :return: The max_queue_size_bytes of this Replication. - :rtype: int - """ # noqa: E501 - return self._max_queue_size_bytes - - @max_queue_size_bytes.setter - def max_queue_size_bytes(self, max_queue_size_bytes): - """Set the max_queue_size_bytes of this Replication. - - :param max_queue_size_bytes: The max_queue_size_bytes of this Replication. - :type: int - """ # noqa: E501 - if max_queue_size_bytes is None: - raise ValueError("Invalid value for `max_queue_size_bytes`, must not be `None`") # noqa: E501 - self._max_queue_size_bytes = max_queue_size_bytes - - @property - def current_queue_size_bytes(self): - """Get the current_queue_size_bytes of this Replication. - - :return: The current_queue_size_bytes of this Replication. - :rtype: int - """ # noqa: E501 - return self._current_queue_size_bytes - - @current_queue_size_bytes.setter - def current_queue_size_bytes(self, current_queue_size_bytes): - """Set the current_queue_size_bytes of this Replication. - - :param current_queue_size_bytes: The current_queue_size_bytes of this Replication. - :type: int - """ # noqa: E501 - self._current_queue_size_bytes = current_queue_size_bytes - - @property - def remaining_bytes_to_be_synced(self): - """Get the remaining_bytes_to_be_synced of this Replication. - - :return: The remaining_bytes_to_be_synced of this Replication. - :rtype: int - """ # noqa: E501 - return self._remaining_bytes_to_be_synced - - @remaining_bytes_to_be_synced.setter - def remaining_bytes_to_be_synced(self, remaining_bytes_to_be_synced): - """Set the remaining_bytes_to_be_synced of this Replication. - - :param remaining_bytes_to_be_synced: The remaining_bytes_to_be_synced of this Replication. - :type: int - """ # noqa: E501 - self._remaining_bytes_to_be_synced = remaining_bytes_to_be_synced - - @property - def latest_response_code(self): - """Get the latest_response_code of this Replication. - - :return: The latest_response_code of this Replication. - :rtype: int - """ # noqa: E501 - return self._latest_response_code - - @latest_response_code.setter - def latest_response_code(self, latest_response_code): - """Set the latest_response_code of this Replication. - - :param latest_response_code: The latest_response_code of this Replication. - :type: int - """ # noqa: E501 - self._latest_response_code = latest_response_code - - @property - def latest_error_message(self): - """Get the latest_error_message of this Replication. - - :return: The latest_error_message of this Replication. - :rtype: str - """ # noqa: E501 - return self._latest_error_message - - @latest_error_message.setter - def latest_error_message(self, latest_error_message): - """Set the latest_error_message of this Replication. - - :param latest_error_message: The latest_error_message of this Replication. - :type: str - """ # noqa: E501 - self._latest_error_message = latest_error_message - - @property - def drop_non_retryable_data(self): - """Get the drop_non_retryable_data of this Replication. - - :return: The drop_non_retryable_data of this Replication. - :rtype: bool - """ # noqa: E501 - return self._drop_non_retryable_data - - @drop_non_retryable_data.setter - def drop_non_retryable_data(self, drop_non_retryable_data): - """Set the drop_non_retryable_data of this Replication. - - :param drop_non_retryable_data: The drop_non_retryable_data of this Replication. - :type: bool - """ # noqa: E501 - self._drop_non_retryable_data = drop_non_retryable_data - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Replication): - 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/frogpilot/third_party/influxdb_client/domain/replication_creation_request.py b/frogpilot/third_party/influxdb_client/domain/replication_creation_request.py deleted file mode 100644 index 946f2c96a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/replication_creation_request.py +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ReplicationCreationRequest(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', - 'org_id': 'str', - 'remote_id': 'str', - 'local_bucket_id': 'str', - 'remote_bucket_id': 'str', - 'remote_bucket_name': 'str', - 'max_queue_size_bytes': 'int', - 'drop_non_retryable_data': 'bool', - 'max_age_seconds': 'int' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'org_id': 'orgID', - 'remote_id': 'remoteID', - 'local_bucket_id': 'localBucketID', - 'remote_bucket_id': 'remoteBucketID', - 'remote_bucket_name': 'remoteBucketName', - 'max_queue_size_bytes': 'maxQueueSizeBytes', - 'drop_non_retryable_data': 'dropNonRetryableData', - 'max_age_seconds': 'maxAgeSeconds' - } - - def __init__(self, name=None, description=None, org_id=None, remote_id=None, local_bucket_id=None, remote_bucket_id=None, remote_bucket_name=None, max_queue_size_bytes=67108860, drop_non_retryable_data=False, max_age_seconds=604800): # noqa: E501,D401,D403 - """ReplicationCreationRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._org_id = None - self._remote_id = None - self._local_bucket_id = None - self._remote_bucket_id = None - self._remote_bucket_name = None - self._max_queue_size_bytes = None - self._drop_non_retryable_data = None - self._max_age_seconds = None - self.discriminator = None - - self.name = name - if description is not None: - self.description = description - self.org_id = org_id - self.remote_id = remote_id - self.local_bucket_id = local_bucket_id - if remote_bucket_id is not None: - self.remote_bucket_id = remote_bucket_id - if remote_bucket_name is not None: - self.remote_bucket_name = remote_bucket_name - self.max_queue_size_bytes = max_queue_size_bytes - if drop_non_retryable_data is not None: - self.drop_non_retryable_data = drop_non_retryable_data - self.max_age_seconds = max_age_seconds - - @property - def name(self): - """Get the name of this ReplicationCreationRequest. - - :return: The name of this ReplicationCreationRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this ReplicationCreationRequest. - - :param name: The name of this ReplicationCreationRequest. - :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 ReplicationCreationRequest. - - :return: The description of this ReplicationCreationRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this ReplicationCreationRequest. - - :param description: The description of this ReplicationCreationRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def org_id(self): - """Get the org_id of this ReplicationCreationRequest. - - :return: The org_id of this ReplicationCreationRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this ReplicationCreationRequest. - - :param org_id: The org_id of this ReplicationCreationRequest. - :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 - def remote_id(self): - """Get the remote_id of this ReplicationCreationRequest. - - :return: The remote_id of this ReplicationCreationRequest. - :rtype: str - """ # noqa: E501 - return self._remote_id - - @remote_id.setter - def remote_id(self, remote_id): - """Set the remote_id of this ReplicationCreationRequest. - - :param remote_id: The remote_id of this ReplicationCreationRequest. - :type: str - """ # noqa: E501 - if remote_id is None: - raise ValueError("Invalid value for `remote_id`, must not be `None`") # noqa: E501 - self._remote_id = remote_id - - @property - def local_bucket_id(self): - """Get the local_bucket_id of this ReplicationCreationRequest. - - :return: The local_bucket_id of this ReplicationCreationRequest. - :rtype: str - """ # noqa: E501 - return self._local_bucket_id - - @local_bucket_id.setter - def local_bucket_id(self, local_bucket_id): - """Set the local_bucket_id of this ReplicationCreationRequest. - - :param local_bucket_id: The local_bucket_id of this ReplicationCreationRequest. - :type: str - """ # noqa: E501 - if local_bucket_id is None: - raise ValueError("Invalid value for `local_bucket_id`, must not be `None`") # noqa: E501 - self._local_bucket_id = local_bucket_id - - @property - def remote_bucket_id(self): - """Get the remote_bucket_id of this ReplicationCreationRequest. - - :return: The remote_bucket_id of this ReplicationCreationRequest. - :rtype: str - """ # noqa: E501 - return self._remote_bucket_id - - @remote_bucket_id.setter - def remote_bucket_id(self, remote_bucket_id): - """Set the remote_bucket_id of this ReplicationCreationRequest. - - :param remote_bucket_id: The remote_bucket_id of this ReplicationCreationRequest. - :type: str - """ # noqa: E501 - self._remote_bucket_id = remote_bucket_id - - @property - def remote_bucket_name(self): - """Get the remote_bucket_name of this ReplicationCreationRequest. - - :return: The remote_bucket_name of this ReplicationCreationRequest. - :rtype: str - """ # noqa: E501 - return self._remote_bucket_name - - @remote_bucket_name.setter - def remote_bucket_name(self, remote_bucket_name): - """Set the remote_bucket_name of this ReplicationCreationRequest. - - :param remote_bucket_name: The remote_bucket_name of this ReplicationCreationRequest. - :type: str - """ # noqa: E501 - self._remote_bucket_name = remote_bucket_name - - @property - def max_queue_size_bytes(self): - """Get the max_queue_size_bytes of this ReplicationCreationRequest. - - :return: The max_queue_size_bytes of this ReplicationCreationRequest. - :rtype: int - """ # noqa: E501 - return self._max_queue_size_bytes - - @max_queue_size_bytes.setter - def max_queue_size_bytes(self, max_queue_size_bytes): - """Set the max_queue_size_bytes of this ReplicationCreationRequest. - - :param max_queue_size_bytes: The max_queue_size_bytes of this ReplicationCreationRequest. - :type: int - """ # noqa: E501 - if max_queue_size_bytes is None: - raise ValueError("Invalid value for `max_queue_size_bytes`, must not be `None`") # noqa: E501 - if max_queue_size_bytes is not None and max_queue_size_bytes < 33554430: # noqa: E501 - raise ValueError("Invalid value for `max_queue_size_bytes`, must be a value greater than or equal to `33554430`") # noqa: E501 - self._max_queue_size_bytes = max_queue_size_bytes - - @property - def drop_non_retryable_data(self): - """Get the drop_non_retryable_data of this ReplicationCreationRequest. - - :return: The drop_non_retryable_data of this ReplicationCreationRequest. - :rtype: bool - """ # noqa: E501 - return self._drop_non_retryable_data - - @drop_non_retryable_data.setter - def drop_non_retryable_data(self, drop_non_retryable_data): - """Set the drop_non_retryable_data of this ReplicationCreationRequest. - - :param drop_non_retryable_data: The drop_non_retryable_data of this ReplicationCreationRequest. - :type: bool - """ # noqa: E501 - self._drop_non_retryable_data = drop_non_retryable_data - - @property - def max_age_seconds(self): - """Get the max_age_seconds of this ReplicationCreationRequest. - - :return: The max_age_seconds of this ReplicationCreationRequest. - :rtype: int - """ # noqa: E501 - return self._max_age_seconds - - @max_age_seconds.setter - def max_age_seconds(self, max_age_seconds): - """Set the max_age_seconds of this ReplicationCreationRequest. - - :param max_age_seconds: The max_age_seconds of this ReplicationCreationRequest. - :type: int - """ # noqa: E501 - if max_age_seconds is None: - raise ValueError("Invalid value for `max_age_seconds`, must not be `None`") # noqa: E501 - if max_age_seconds is not None and max_age_seconds < 0: # noqa: E501 - raise ValueError("Invalid value for `max_age_seconds`, must be a value greater than or equal to `0`") # noqa: E501 - self._max_age_seconds = max_age_seconds - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ReplicationCreationRequest): - 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/frogpilot/third_party/influxdb_client/domain/replication_update_request.py b/frogpilot/third_party/influxdb_client/domain/replication_update_request.py deleted file mode 100644 index 0c40c1173..000000000 --- a/frogpilot/third_party/influxdb_client/domain/replication_update_request.py +++ /dev/null @@ -1,272 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ReplicationUpdateRequest(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', - 'remote_id': 'str', - 'remote_bucket_id': 'str', - 'remote_bucket_name': 'str', - 'max_queue_size_bytes': 'int', - 'drop_non_retryable_data': 'bool', - 'max_age_seconds': 'int' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'remote_id': 'remoteID', - 'remote_bucket_id': 'remoteBucketID', - 'remote_bucket_name': 'remoteBucketName', - 'max_queue_size_bytes': 'maxQueueSizeBytes', - 'drop_non_retryable_data': 'dropNonRetryableData', - 'max_age_seconds': 'maxAgeSeconds' - } - - def __init__(self, name=None, description=None, remote_id=None, remote_bucket_id=None, remote_bucket_name=None, max_queue_size_bytes=None, drop_non_retryable_data=None, max_age_seconds=None): # noqa: E501,D401,D403 - """ReplicationUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._remote_id = None - self._remote_bucket_id = None - self._remote_bucket_name = None - self._max_queue_size_bytes = None - self._drop_non_retryable_data = None - self._max_age_seconds = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if remote_id is not None: - self.remote_id = remote_id - if remote_bucket_id is not None: - self.remote_bucket_id = remote_bucket_id - if remote_bucket_name is not None: - self.remote_bucket_name = remote_bucket_name - if max_queue_size_bytes is not None: - self.max_queue_size_bytes = max_queue_size_bytes - if drop_non_retryable_data is not None: - self.drop_non_retryable_data = drop_non_retryable_data - if max_age_seconds is not None: - self.max_age_seconds = max_age_seconds - - @property - def name(self): - """Get the name of this ReplicationUpdateRequest. - - :return: The name of this ReplicationUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this ReplicationUpdateRequest. - - :param name: The name of this ReplicationUpdateRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this ReplicationUpdateRequest. - - :return: The description of this ReplicationUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this ReplicationUpdateRequest. - - :param description: The description of this ReplicationUpdateRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def remote_id(self): - """Get the remote_id of this ReplicationUpdateRequest. - - :return: The remote_id of this ReplicationUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._remote_id - - @remote_id.setter - def remote_id(self, remote_id): - """Set the remote_id of this ReplicationUpdateRequest. - - :param remote_id: The remote_id of this ReplicationUpdateRequest. - :type: str - """ # noqa: E501 - self._remote_id = remote_id - - @property - def remote_bucket_id(self): - """Get the remote_bucket_id of this ReplicationUpdateRequest. - - :return: The remote_bucket_id of this ReplicationUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._remote_bucket_id - - @remote_bucket_id.setter - def remote_bucket_id(self, remote_bucket_id): - """Set the remote_bucket_id of this ReplicationUpdateRequest. - - :param remote_bucket_id: The remote_bucket_id of this ReplicationUpdateRequest. - :type: str - """ # noqa: E501 - self._remote_bucket_id = remote_bucket_id - - @property - def remote_bucket_name(self): - """Get the remote_bucket_name of this ReplicationUpdateRequest. - - :return: The remote_bucket_name of this ReplicationUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._remote_bucket_name - - @remote_bucket_name.setter - def remote_bucket_name(self, remote_bucket_name): - """Set the remote_bucket_name of this ReplicationUpdateRequest. - - :param remote_bucket_name: The remote_bucket_name of this ReplicationUpdateRequest. - :type: str - """ # noqa: E501 - self._remote_bucket_name = remote_bucket_name - - @property - def max_queue_size_bytes(self): - """Get the max_queue_size_bytes of this ReplicationUpdateRequest. - - :return: The max_queue_size_bytes of this ReplicationUpdateRequest. - :rtype: int - """ # noqa: E501 - return self._max_queue_size_bytes - - @max_queue_size_bytes.setter - def max_queue_size_bytes(self, max_queue_size_bytes): - """Set the max_queue_size_bytes of this ReplicationUpdateRequest. - - :param max_queue_size_bytes: The max_queue_size_bytes of this ReplicationUpdateRequest. - :type: int - """ # noqa: E501 - if max_queue_size_bytes is not None and max_queue_size_bytes < 33554430: # noqa: E501 - raise ValueError("Invalid value for `max_queue_size_bytes`, must be a value greater than or equal to `33554430`") # noqa: E501 - self._max_queue_size_bytes = max_queue_size_bytes - - @property - def drop_non_retryable_data(self): - """Get the drop_non_retryable_data of this ReplicationUpdateRequest. - - :return: The drop_non_retryable_data of this ReplicationUpdateRequest. - :rtype: bool - """ # noqa: E501 - return self._drop_non_retryable_data - - @drop_non_retryable_data.setter - def drop_non_retryable_data(self, drop_non_retryable_data): - """Set the drop_non_retryable_data of this ReplicationUpdateRequest. - - :param drop_non_retryable_data: The drop_non_retryable_data of this ReplicationUpdateRequest. - :type: bool - """ # noqa: E501 - self._drop_non_retryable_data = drop_non_retryable_data - - @property - def max_age_seconds(self): - """Get the max_age_seconds of this ReplicationUpdateRequest. - - :return: The max_age_seconds of this ReplicationUpdateRequest. - :rtype: int - """ # noqa: E501 - return self._max_age_seconds - - @max_age_seconds.setter - def max_age_seconds(self, max_age_seconds): - """Set the max_age_seconds of this ReplicationUpdateRequest. - - :param max_age_seconds: The max_age_seconds of this ReplicationUpdateRequest. - :type: int - """ # noqa: E501 - if max_age_seconds is not None and max_age_seconds < 0: # noqa: E501 - raise ValueError("Invalid value for `max_age_seconds`, must be a value greater than or equal to `0`") # noqa: E501 - self._max_age_seconds = max_age_seconds - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ReplicationUpdateRequest): - 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/frogpilot/third_party/influxdb_client/domain/replications.py b/frogpilot/third_party/influxdb_client/domain/replications.py deleted file mode 100644 index d81cd4539..000000000 --- a/frogpilot/third_party/influxdb_client/domain/replications.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Replications(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 = { - 'replications': 'list[Replication]' - } - - attribute_map = { - 'replications': 'replications' - } - - def __init__(self, replications=None): # noqa: E501,D401,D403 - """Replications - a model defined in OpenAPI.""" # noqa: E501 - self._replications = None - self.discriminator = None - - if replications is not None: - self.replications = replications - - @property - def replications(self): - """Get the replications of this Replications. - - :return: The replications of this Replications. - :rtype: list[Replication] - """ # noqa: E501 - return self._replications - - @replications.setter - def replications(self, replications): - """Set the replications of this Replications. - - :param replications: The replications of this Replications. - :type: list[Replication] - """ # noqa: E501 - self._replications = replications - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Replications): - 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/frogpilot/third_party/influxdb_client/domain/resource_member.py b/frogpilot/third_party/influxdb_client/domain/resource_member.py deleted file mode 100644 index 26e26d732..000000000 --- a/frogpilot/third_party/influxdb_client/domain/resource_member.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.user_response import UserResponse - - -class ResourceMember(UserResponse): - """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 = { - 'role': 'str', - 'id': 'str', - 'name': 'str', - 'status': 'str', - 'links': 'UserResponseLinks' - } - - attribute_map = { - 'role': 'role', - 'id': 'id', - 'name': 'name', - 'status': 'status', - 'links': 'links' - } - - def __init__(self, role='member', id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 - """ResourceMember - a model defined in OpenAPI.""" # noqa: E501 - UserResponse.__init__(self, id=id, name=name, status=status, links=links) # noqa: E501 - - self._role = None - self.discriminator = None - - if role is not None: - self.role = role - - @property - def role(self): - """Get the role of this ResourceMember. - - :return: The role of this ResourceMember. - :rtype: str - """ # noqa: E501 - return self._role - - @role.setter - def role(self, role): - """Set the role of this ResourceMember. - - :param role: The role of this ResourceMember. - :type: str - """ # noqa: E501 - self._role = role - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ResourceMember): - 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/frogpilot/third_party/influxdb_client/domain/resource_members.py b/frogpilot/third_party/influxdb_client/domain/resource_members.py deleted file mode 100644 index 5fde29a9d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/resource_members.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ResourceMembers(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 = { - 'links': 'ResourceMembersLinks', - 'users': 'list[ResourceMember]' - } - - attribute_map = { - 'links': 'links', - 'users': 'users' - } - - def __init__(self, links=None, users=None): # noqa: E501,D401,D403 - """ResourceMembers - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._users = None - self.discriminator = None - - if links is not None: - self.links = links - if users is not None: - self.users = users - - @property - def links(self): - """Get the links of this ResourceMembers. - - :return: The links of this ResourceMembers. - :rtype: ResourceMembersLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this ResourceMembers. - - :param links: The links of this ResourceMembers. - :type: ResourceMembersLinks - """ # noqa: E501 - self._links = links - - @property - def users(self): - """Get the users of this ResourceMembers. - - :return: The users of this ResourceMembers. - :rtype: list[ResourceMember] - """ # noqa: E501 - return self._users - - @users.setter - def users(self, users): - """Set the users of this ResourceMembers. - - :param users: The users of this ResourceMembers. - :type: list[ResourceMember] - """ # noqa: E501 - self._users = users - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ResourceMembers): - 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/frogpilot/third_party/influxdb_client/domain/resource_members_links.py b/frogpilot/third_party/influxdb_client/domain/resource_members_links.py deleted file mode 100644 index 26820bb5a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/resource_members_links.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ResourceMembersLinks(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 = { - '_self': 'str' - } - - attribute_map = { - '_self': 'self' - } - - def __init__(self, _self=None): # noqa: E501,D401,D403 - """ResourceMembersLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self.discriminator = None - - if _self is not None: - self._self = _self - - @property - def _self(self): - """Get the _self of this ResourceMembersLinks. - - :return: The _self of this ResourceMembersLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this ResourceMembersLinks. - - :param _self: The _self of this ResourceMembersLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ResourceMembersLinks): - 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/frogpilot/third_party/influxdb_client/domain/resource_owner.py b/frogpilot/third_party/influxdb_client/domain/resource_owner.py deleted file mode 100644 index 2f73cd7bf..000000000 --- a/frogpilot/third_party/influxdb_client/domain/resource_owner.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.user_response import UserResponse - - -class ResourceOwner(UserResponse): - """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 = { - 'role': 'str', - 'id': 'str', - 'name': 'str', - 'status': 'str', - 'links': 'UserResponseLinks' - } - - attribute_map = { - 'role': 'role', - 'id': 'id', - 'name': 'name', - 'status': 'status', - 'links': 'links' - } - - def __init__(self, role='owner', id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 - """ResourceOwner - a model defined in OpenAPI.""" # noqa: E501 - UserResponse.__init__(self, id=id, name=name, status=status, links=links) # noqa: E501 - - self._role = None - self.discriminator = None - - if role is not None: - self.role = role - - @property - def role(self): - """Get the role of this ResourceOwner. - - :return: The role of this ResourceOwner. - :rtype: str - """ # noqa: E501 - return self._role - - @role.setter - def role(self, role): - """Set the role of this ResourceOwner. - - :param role: The role of this ResourceOwner. - :type: str - """ # noqa: E501 - self._role = role - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ResourceOwner): - 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/frogpilot/third_party/influxdb_client/domain/resource_owners.py b/frogpilot/third_party/influxdb_client/domain/resource_owners.py deleted file mode 100644 index 84a85ff64..000000000 --- a/frogpilot/third_party/influxdb_client/domain/resource_owners.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ResourceOwners(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 = { - 'links': 'ResourceMembersLinks', - 'users': 'list[ResourceOwner]' - } - - attribute_map = { - 'links': 'links', - 'users': 'users' - } - - def __init__(self, links=None, users=None): # noqa: E501,D401,D403 - """ResourceOwners - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._users = None - self.discriminator = None - - if links is not None: - self.links = links - if users is not None: - self.users = users - - @property - def links(self): - """Get the links of this ResourceOwners. - - :return: The links of this ResourceOwners. - :rtype: ResourceMembersLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this ResourceOwners. - - :param links: The links of this ResourceOwners. - :type: ResourceMembersLinks - """ # noqa: E501 - self._links = links - - @property - def users(self): - """Get the users of this ResourceOwners. - - :return: The users of this ResourceOwners. - :rtype: list[ResourceOwner] - """ # noqa: E501 - return self._users - - @users.setter - def users(self, users): - """Set the users of this ResourceOwners. - - :param users: The users of this ResourceOwners. - :type: list[ResourceOwner] - """ # noqa: E501 - self._users = users - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ResourceOwners): - 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/frogpilot/third_party/influxdb_client/domain/restored_bucket_mappings.py b/frogpilot/third_party/influxdb_client/domain/restored_bucket_mappings.py deleted file mode 100644 index 2059cbc82..000000000 --- a/frogpilot/third_party/influxdb_client/domain/restored_bucket_mappings.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RestoredBucketMappings(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'shard_mappings': 'list[BucketShardMapping]' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'shard_mappings': 'shardMappings' - } - - def __init__(self, id=None, name=None, shard_mappings=None): # noqa: E501,D401,D403 - """RestoredBucketMappings - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._name = None - self._shard_mappings = None - self.discriminator = None - - self.id = id - self.name = name - self.shard_mappings = shard_mappings - - @property - def id(self): - """Get the id of this RestoredBucketMappings. - - New ID of the restored bucket - - :return: The id of this RestoredBucketMappings. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this RestoredBucketMappings. - - New ID of the restored bucket - - :param id: The id of this RestoredBucketMappings. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this RestoredBucketMappings. - - :return: The name of this RestoredBucketMappings. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this RestoredBucketMappings. - - :param name: The name of this RestoredBucketMappings. - :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 shard_mappings(self): - """Get the shard_mappings of this RestoredBucketMappings. - - :return: The shard_mappings of this RestoredBucketMappings. - :rtype: list[BucketShardMapping] - """ # noqa: E501 - return self._shard_mappings - - @shard_mappings.setter - def shard_mappings(self, shard_mappings): - """Set the shard_mappings of this RestoredBucketMappings. - - :param shard_mappings: The shard_mappings of this RestoredBucketMappings. - :type: list[BucketShardMapping] - """ # noqa: E501 - if shard_mappings is None: - raise ValueError("Invalid value for `shard_mappings`, must not be `None`") # noqa: E501 - self._shard_mappings = shard_mappings - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RestoredBucketMappings): - 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/frogpilot/third_party/influxdb_client/domain/retention_policy_manifest.py b/frogpilot/third_party/influxdb_client/domain/retention_policy_manifest.py deleted file mode 100644 index a0b314c86..000000000 --- a/frogpilot/third_party/influxdb_client/domain/retention_policy_manifest.py +++ /dev/null @@ -1,228 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RetentionPolicyManifest(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', - 'replica_n': 'int', - 'duration': 'int', - 'shard_group_duration': 'int', - 'shard_groups': 'list[ShardGroupManifest]', - 'subscriptions': 'list[SubscriptionManifest]' - } - - attribute_map = { - 'name': 'name', - 'replica_n': 'replicaN', - 'duration': 'duration', - 'shard_group_duration': 'shardGroupDuration', - 'shard_groups': 'shardGroups', - 'subscriptions': 'subscriptions' - } - - def __init__(self, name=None, replica_n=None, duration=None, shard_group_duration=None, shard_groups=None, subscriptions=None): # noqa: E501,D401,D403 - """RetentionPolicyManifest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._replica_n = None - self._duration = None - self._shard_group_duration = None - self._shard_groups = None - self._subscriptions = None - self.discriminator = None - - self.name = name - self.replica_n = replica_n - self.duration = duration - self.shard_group_duration = shard_group_duration - self.shard_groups = shard_groups - self.subscriptions = subscriptions - - @property - def name(self): - """Get the name of this RetentionPolicyManifest. - - :return: The name of this RetentionPolicyManifest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this RetentionPolicyManifest. - - :param name: The name of this RetentionPolicyManifest. - :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 replica_n(self): - """Get the replica_n of this RetentionPolicyManifest. - - :return: The replica_n of this RetentionPolicyManifest. - :rtype: int - """ # noqa: E501 - return self._replica_n - - @replica_n.setter - def replica_n(self, replica_n): - """Set the replica_n of this RetentionPolicyManifest. - - :param replica_n: The replica_n of this RetentionPolicyManifest. - :type: int - """ # noqa: E501 - if replica_n is None: - raise ValueError("Invalid value for `replica_n`, must not be `None`") # noqa: E501 - self._replica_n = replica_n - - @property - def duration(self): - """Get the duration of this RetentionPolicyManifest. - - :return: The duration of this RetentionPolicyManifest. - :rtype: int - """ # noqa: E501 - return self._duration - - @duration.setter - def duration(self, duration): - """Set the duration of this RetentionPolicyManifest. - - :param duration: The duration of this RetentionPolicyManifest. - :type: int - """ # noqa: E501 - if duration is None: - raise ValueError("Invalid value for `duration`, must not be `None`") # noqa: E501 - self._duration = duration - - @property - def shard_group_duration(self): - """Get the shard_group_duration of this RetentionPolicyManifest. - - :return: The shard_group_duration of this RetentionPolicyManifest. - :rtype: int - """ # noqa: E501 - return self._shard_group_duration - - @shard_group_duration.setter - def shard_group_duration(self, shard_group_duration): - """Set the shard_group_duration of this RetentionPolicyManifest. - - :param shard_group_duration: The shard_group_duration of this RetentionPolicyManifest. - :type: int - """ # noqa: E501 - if shard_group_duration is None: - raise ValueError("Invalid value for `shard_group_duration`, must not be `None`") # noqa: E501 - self._shard_group_duration = shard_group_duration - - @property - def shard_groups(self): - """Get the shard_groups of this RetentionPolicyManifest. - - :return: The shard_groups of this RetentionPolicyManifest. - :rtype: list[ShardGroupManifest] - """ # noqa: E501 - return self._shard_groups - - @shard_groups.setter - def shard_groups(self, shard_groups): - """Set the shard_groups of this RetentionPolicyManifest. - - :param shard_groups: The shard_groups of this RetentionPolicyManifest. - :type: list[ShardGroupManifest] - """ # noqa: E501 - if shard_groups is None: - raise ValueError("Invalid value for `shard_groups`, must not be `None`") # noqa: E501 - self._shard_groups = shard_groups - - @property - def subscriptions(self): - """Get the subscriptions of this RetentionPolicyManifest. - - :return: The subscriptions of this RetentionPolicyManifest. - :rtype: list[SubscriptionManifest] - """ # noqa: E501 - return self._subscriptions - - @subscriptions.setter - def subscriptions(self, subscriptions): - """Set the subscriptions of this RetentionPolicyManifest. - - :param subscriptions: The subscriptions of this RetentionPolicyManifest. - :type: list[SubscriptionManifest] - """ # noqa: E501 - if subscriptions is None: - raise ValueError("Invalid value for `subscriptions`, must not be `None`") # noqa: E501 - self._subscriptions = subscriptions - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RetentionPolicyManifest): - 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/frogpilot/third_party/influxdb_client/domain/return_statement.py b/frogpilot/third_party/influxdb_client/domain/return_statement.py deleted file mode 100644 index aa4b48d9b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/return_statement.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class ReturnStatement(Statement): - """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', - 'argument': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'argument': 'argument' - } - - 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 - - if type is not None: - self.type = type - if argument is not None: - self.argument = argument - - @property - def type(self): - """Get the type of this ReturnStatement. - - Type of AST node - - :return: The type of this ReturnStatement. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ReturnStatement. - - Type of AST node - - :param type: The type of this ReturnStatement. - :type: str - """ # noqa: E501 - self._type = type - - @property - def argument(self): - """Get the argument of this ReturnStatement. - - :return: The argument of this ReturnStatement. - :rtype: Expression - """ # noqa: E501 - return self._argument - - @argument.setter - def argument(self, argument): - """Set the argument of this ReturnStatement. - - :param argument: The argument of this ReturnStatement. - :type: Expression - """ # noqa: E501 - self._argument = argument - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ReturnStatement): - 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/frogpilot/third_party/influxdb_client/domain/routes.py b/frogpilot/third_party/influxdb_client/domain/routes.py deleted file mode 100644 index 2a7a77e68..000000000 --- a/frogpilot/third_party/influxdb_client/domain/routes.py +++ /dev/null @@ -1,498 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Routes(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 = { - 'authorizations': 'str', - 'buckets': 'str', - 'dashboards': 'str', - 'external': 'RoutesExternal', - 'variables': 'str', - 'me': 'str', - 'flags': 'str', - 'orgs': 'str', - 'query': 'RoutesQuery', - 'setup': 'str', - 'signin': 'str', - 'signout': 'str', - 'sources': 'str', - 'system': 'RoutesSystem', - 'tasks': 'str', - 'telegrafs': 'str', - 'users': 'str', - 'write': 'str' - } - - attribute_map = { - 'authorizations': 'authorizations', - 'buckets': 'buckets', - 'dashboards': 'dashboards', - 'external': 'external', - 'variables': 'variables', - 'me': 'me', - 'flags': 'flags', - 'orgs': 'orgs', - 'query': 'query', - 'setup': 'setup', - 'signin': 'signin', - 'signout': 'signout', - 'sources': 'sources', - 'system': 'system', - 'tasks': 'tasks', - 'telegrafs': 'telegrafs', - 'users': 'users', - 'write': 'write' - } - - 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 - self._dashboards = None - self._external = None - self._variables = None - self._me = None - self._flags = None - self._orgs = None - self._query = None - self._setup = None - self._signin = None - self._signout = None - self._sources = None - self._system = None - self._tasks = None - self._telegrafs = None - self._users = None - self._write = None - self.discriminator = None - - if authorizations is not None: - self.authorizations = authorizations - if buckets is not None: - self.buckets = buckets - if dashboards is not None: - self.dashboards = dashboards - if external is not None: - self.external = external - if variables is not None: - 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: - self.query = query - if setup is not None: - self.setup = setup - if signin is not None: - self.signin = signin - if signout is not None: - self.signout = signout - if sources is not None: - self.sources = sources - if system is not None: - self.system = system - if tasks is not None: - self.tasks = tasks - if telegrafs is not None: - self.telegrafs = telegrafs - if users is not None: - self.users = users - if write is not None: - self.write = write - - @property - def authorizations(self): - """Get the authorizations of this Routes. - - :return: The authorizations of this Routes. - :rtype: str - """ # noqa: E501 - return self._authorizations - - @authorizations.setter - def authorizations(self, authorizations): - """Set the authorizations of this Routes. - - :param authorizations: The authorizations of this Routes. - :type: str - """ # noqa: E501 - self._authorizations = authorizations - - @property - def buckets(self): - """Get the buckets of this Routes. - - :return: The buckets of this Routes. - :rtype: str - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this Routes. - - :param buckets: The buckets of this Routes. - :type: str - """ # noqa: E501 - self._buckets = buckets - - @property - def dashboards(self): - """Get the dashboards of this Routes. - - :return: The dashboards of this Routes. - :rtype: str - """ # noqa: E501 - return self._dashboards - - @dashboards.setter - def dashboards(self, dashboards): - """Set the dashboards of this Routes. - - :param dashboards: The dashboards of this Routes. - :type: str - """ # noqa: E501 - self._dashboards = dashboards - - @property - def external(self): - """Get the external of this Routes. - - :return: The external of this Routes. - :rtype: RoutesExternal - """ # noqa: E501 - return self._external - - @external.setter - def external(self, external): - """Set the external of this Routes. - - :param external: The external of this Routes. - :type: RoutesExternal - """ # noqa: E501 - self._external = external - - @property - def variables(self): - """Get the variables of this Routes. - - :return: The variables of this Routes. - :rtype: str - """ # noqa: E501 - return self._variables - - @variables.setter - def variables(self, variables): - """Set the variables of this Routes. - - :param variables: The variables of this Routes. - :type: str - """ # noqa: E501 - self._variables = variables - - @property - def me(self): - """Get the me of this Routes. - - :return: The me of this Routes. - :rtype: str - """ # noqa: E501 - return self._me - - @me.setter - def me(self, me): - """Set the me of this Routes. - - :param me: The me of this Routes. - :type: str - """ # 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. - - :return: The orgs of this Routes. - :rtype: str - """ # noqa: E501 - return self._orgs - - @orgs.setter - def orgs(self, orgs): - """Set the orgs of this Routes. - - :param orgs: The orgs of this Routes. - :type: str - """ # noqa: E501 - self._orgs = orgs - - @property - def query(self): - """Get the query of this Routes. - - :return: The query of this Routes. - :rtype: RoutesQuery - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this Routes. - - :param query: The query of this Routes. - :type: RoutesQuery - """ # noqa: E501 - self._query = query - - @property - def setup(self): - """Get the setup of this Routes. - - :return: The setup of this Routes. - :rtype: str - """ # noqa: E501 - return self._setup - - @setup.setter - def setup(self, setup): - """Set the setup of this Routes. - - :param setup: The setup of this Routes. - :type: str - """ # noqa: E501 - self._setup = setup - - @property - def signin(self): - """Get the signin of this Routes. - - :return: The signin of this Routes. - :rtype: str - """ # noqa: E501 - return self._signin - - @signin.setter - def signin(self, signin): - """Set the signin of this Routes. - - :param signin: The signin of this Routes. - :type: str - """ # noqa: E501 - self._signin = signin - - @property - def signout(self): - """Get the signout of this Routes. - - :return: The signout of this Routes. - :rtype: str - """ # noqa: E501 - return self._signout - - @signout.setter - def signout(self, signout): - """Set the signout of this Routes. - - :param signout: The signout of this Routes. - :type: str - """ # noqa: E501 - self._signout = signout - - @property - def sources(self): - """Get the sources of this Routes. - - :return: The sources of this Routes. - :rtype: str - """ # noqa: E501 - return self._sources - - @sources.setter - def sources(self, sources): - """Set the sources of this Routes. - - :param sources: The sources of this Routes. - :type: str - """ # noqa: E501 - self._sources = sources - - @property - def system(self): - """Get the system of this Routes. - - :return: The system of this Routes. - :rtype: RoutesSystem - """ # noqa: E501 - return self._system - - @system.setter - def system(self, system): - """Set the system of this Routes. - - :param system: The system of this Routes. - :type: RoutesSystem - """ # noqa: E501 - self._system = system - - @property - def tasks(self): - """Get the tasks of this Routes. - - :return: The tasks of this Routes. - :rtype: str - """ # noqa: E501 - return self._tasks - - @tasks.setter - def tasks(self, tasks): - """Set the tasks of this Routes. - - :param tasks: The tasks of this Routes. - :type: str - """ # noqa: E501 - self._tasks = tasks - - @property - def telegrafs(self): - """Get the telegrafs of this Routes. - - :return: The telegrafs of this Routes. - :rtype: str - """ # noqa: E501 - return self._telegrafs - - @telegrafs.setter - def telegrafs(self, telegrafs): - """Set the telegrafs of this Routes. - - :param telegrafs: The telegrafs of this Routes. - :type: str - """ # noqa: E501 - self._telegrafs = telegrafs - - @property - def users(self): - """Get the users of this Routes. - - :return: The users of this Routes. - :rtype: str - """ # noqa: E501 - return self._users - - @users.setter - def users(self, users): - """Set the users of this Routes. - - :param users: The users of this Routes. - :type: str - """ # noqa: E501 - self._users = users - - @property - def write(self): - """Get the write of this Routes. - - :return: The write of this Routes. - :rtype: str - """ # noqa: E501 - return self._write - - @write.setter - def write(self, write): - """Set the write of this Routes. - - :param write: The write of this Routes. - :type: str - """ # noqa: E501 - self._write = write - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Routes): - 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/frogpilot/third_party/influxdb_client/domain/routes_external.py b/frogpilot/third_party/influxdb_client/domain/routes_external.py deleted file mode 100644 index 87c49f980..000000000 --- a/frogpilot/third_party/influxdb_client/domain/routes_external.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RoutesExternal(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 = { - 'status_feed': 'str' - } - - attribute_map = { - 'status_feed': 'statusFeed' - } - - def __init__(self, status_feed=None): # noqa: E501,D401,D403 - """RoutesExternal - a model defined in OpenAPI.""" # noqa: E501 - self._status_feed = None - self.discriminator = None - - if status_feed is not None: - self.status_feed = status_feed - - @property - def status_feed(self): - """Get the status_feed of this RoutesExternal. - - :return: The status_feed of this RoutesExternal. - :rtype: str - """ # noqa: E501 - return self._status_feed - - @status_feed.setter - def status_feed(self, status_feed): - """Set the status_feed of this RoutesExternal. - - :param status_feed: The status_feed of this RoutesExternal. - :type: str - """ # noqa: E501 - self._status_feed = status_feed - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RoutesExternal): - 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/frogpilot/third_party/influxdb_client/domain/routes_query.py b/frogpilot/third_party/influxdb_client/domain/routes_query.py deleted file mode 100644 index 82ae34e17..000000000 --- a/frogpilot/third_party/influxdb_client/domain/routes_query.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RoutesQuery(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 = { - '_self': 'str', - 'ast': 'str', - 'analyze': 'str', - 'suggestions': 'str' - } - - attribute_map = { - '_self': 'self', - 'ast': 'ast', - 'analyze': 'analyze', - 'suggestions': 'suggestions' - } - - def __init__(self, _self=None, ast=None, analyze=None, suggestions=None): # noqa: E501,D401,D403 - """RoutesQuery - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._ast = None - self._analyze = None - self._suggestions = None - self.discriminator = None - - if _self is not None: - self._self = _self - if ast is not None: - self.ast = ast - if analyze is not None: - self.analyze = analyze - if suggestions is not None: - self.suggestions = suggestions - - @property - def _self(self): - """Get the _self of this RoutesQuery. - - :return: The _self of this RoutesQuery. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this RoutesQuery. - - :param _self: The _self of this RoutesQuery. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def ast(self): - """Get the ast of this RoutesQuery. - - :return: The ast of this RoutesQuery. - :rtype: str - """ # noqa: E501 - return self._ast - - @ast.setter - def ast(self, ast): - """Set the ast of this RoutesQuery. - - :param ast: The ast of this RoutesQuery. - :type: str - """ # noqa: E501 - self._ast = ast - - @property - def analyze(self): - """Get the analyze of this RoutesQuery. - - :return: The analyze of this RoutesQuery. - :rtype: str - """ # noqa: E501 - return self._analyze - - @analyze.setter - def analyze(self, analyze): - """Set the analyze of this RoutesQuery. - - :param analyze: The analyze of this RoutesQuery. - :type: str - """ # noqa: E501 - self._analyze = analyze - - @property - def suggestions(self): - """Get the suggestions of this RoutesQuery. - - :return: The suggestions of this RoutesQuery. - :rtype: str - """ # noqa: E501 - return self._suggestions - - @suggestions.setter - def suggestions(self, suggestions): - """Set the suggestions of this RoutesQuery. - - :param suggestions: The suggestions of this RoutesQuery. - :type: str - """ # noqa: E501 - self._suggestions = suggestions - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RoutesQuery): - 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/frogpilot/third_party/influxdb_client/domain/routes_system.py b/frogpilot/third_party/influxdb_client/domain/routes_system.py deleted file mode 100644 index 73ac677b2..000000000 --- a/frogpilot/third_party/influxdb_client/domain/routes_system.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RoutesSystem(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 = { - 'metrics': 'str', - 'debug': 'str', - 'health': 'str' - } - - attribute_map = { - 'metrics': 'metrics', - 'debug': 'debug', - 'health': 'health' - } - - def __init__(self, metrics=None, debug=None, health=None): # noqa: E501,D401,D403 - """RoutesSystem - a model defined in OpenAPI.""" # noqa: E501 - self._metrics = None - self._debug = None - self._health = None - self.discriminator = None - - if metrics is not None: - self.metrics = metrics - if debug is not None: - self.debug = debug - if health is not None: - self.health = health - - @property - def metrics(self): - """Get the metrics of this RoutesSystem. - - :return: The metrics of this RoutesSystem. - :rtype: str - """ # noqa: E501 - return self._metrics - - @metrics.setter - def metrics(self, metrics): - """Set the metrics of this RoutesSystem. - - :param metrics: The metrics of this RoutesSystem. - :type: str - """ # noqa: E501 - self._metrics = metrics - - @property - def debug(self): - """Get the debug of this RoutesSystem. - - :return: The debug of this RoutesSystem. - :rtype: str - """ # noqa: E501 - return self._debug - - @debug.setter - def debug(self, debug): - """Set the debug of this RoutesSystem. - - :param debug: The debug of this RoutesSystem. - :type: str - """ # noqa: E501 - self._debug = debug - - @property - def health(self): - """Get the health of this RoutesSystem. - - :return: The health of this RoutesSystem. - :rtype: str - """ # noqa: E501 - return self._health - - @health.setter - def health(self, health): - """Set the health of this RoutesSystem. - - :param health: The health of this RoutesSystem. - :type: str - """ # noqa: E501 - self._health = health - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RoutesSystem): - 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/frogpilot/third_party/influxdb_client/domain/rule_status_level.py b/frogpilot/third_party/influxdb_client/domain/rule_status_level.py deleted file mode 100644 index 9d9f4249e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/rule_status_level.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RuleStatusLevel(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - UNKNOWN = "UNKNOWN" - OK = "OK" - INFO = "INFO" - CRIT = "CRIT" - WARN = "WARN" - ANY = "ANY" - - """ - 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 - """RuleStatusLevel - 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 self.openapi_types.items(): - 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, RuleStatusLevel): - 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/frogpilot/third_party/influxdb_client/domain/run.py b/frogpilot/third_party/influxdb_client/domain/run.py deleted file mode 100644 index 32634aca6..000000000 --- a/frogpilot/third_party/influxdb_client/domain/run.py +++ /dev/null @@ -1,338 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Run(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', - 'task_id': 'str', - 'status': 'str', - 'scheduled_for': 'datetime', - 'log': 'list[LogEvent]', - 'flux': 'str', - 'started_at': 'datetime', - 'finished_at': 'datetime', - 'requested_at': 'datetime', - 'links': 'RunLinks' - } - - attribute_map = { - 'id': 'id', - 'task_id': 'taskID', - 'status': 'status', - 'scheduled_for': 'scheduledFor', - 'log': 'log', - 'flux': 'flux', - 'started_at': 'startedAt', - 'finished_at': 'finishedAt', - 'requested_at': 'requestedAt', - 'links': 'links' - } - - def __init__(self, id=None, task_id=None, status=None, scheduled_for=None, log=None, flux=None, started_at=None, finished_at=None, requested_at=None, links=None): # noqa: E501,D401,D403 - """Run - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._task_id = None - self._status = None - self._scheduled_for = None - self._log = None - self._flux = None - self._started_at = None - self._finished_at = None - self._requested_at = None - self._links = None - self.discriminator = None - - if id is not None: - self.id = id - if task_id is not None: - self.task_id = task_id - if status is not None: - self.status = status - if scheduled_for is not None: - self.scheduled_for = scheduled_for - if log is not None: - self.log = log - if flux is not None: - self.flux = flux - if started_at is not None: - self.started_at = started_at - if finished_at is not None: - self.finished_at = finished_at - if requested_at is not None: - self.requested_at = requested_at - if links is not None: - self.links = links - - @property - def id(self): - """Get the id of this Run. - - :return: The id of this Run. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Run. - - :param id: The id of this Run. - :type: str - """ # noqa: E501 - self._id = id - - @property - def task_id(self): - """Get the task_id of this Run. - - :return: The task_id of this Run. - :rtype: str - """ # noqa: E501 - return self._task_id - - @task_id.setter - def task_id(self, task_id): - """Set the task_id of this Run. - - :param task_id: The task_id of this Run. - :type: str - """ # noqa: E501 - self._task_id = task_id - - @property - def status(self): - """Get the status of this Run. - - :return: The status of this Run. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this Run. - - :param status: The status of this Run. - :type: str - """ # noqa: E501 - self._status = status - - @property - def scheduled_for(self): - """Get the scheduled_for of this Run. - - The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. - - :return: The scheduled_for of this Run. - :rtype: datetime - """ # noqa: E501 - return self._scheduled_for - - @scheduled_for.setter - def scheduled_for(self, scheduled_for): - """Set the scheduled_for of this Run. - - The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. - - :param scheduled_for: The scheduled_for of this Run. - :type: datetime - """ # noqa: E501 - self._scheduled_for = scheduled_for - - @property - def log(self): - """Get the log of this Run. - - An array of logs associated with the run. - - :return: The log of this Run. - :rtype: list[LogEvent] - """ # noqa: E501 - return self._log - - @log.setter - def log(self, log): - """Set the log of this Run. - - An array of logs associated with the run. - - :param log: The log of this Run. - :type: list[LogEvent] - """ # noqa: E501 - self._log = log - - @property - def flux(self): - """Get the flux of this Run. - - Flux used for the task - - :return: The flux of this Run. - :rtype: str - """ # noqa: E501 - return self._flux - - @flux.setter - def flux(self, flux): - """Set the flux of this Run. - - Flux used for the task - - :param flux: The flux of this Run. - :type: str - """ # noqa: E501 - self._flux = flux - - @property - def started_at(self): - """Get the started_at of this Run. - - The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run started executing. - - :return: The started_at of this Run. - :rtype: datetime - """ # noqa: E501 - return self._started_at - - @started_at.setter - def started_at(self, started_at): - """Set the started_at of this Run. - - The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run started executing. - - :param started_at: The started_at of this Run. - :type: datetime - """ # noqa: E501 - self._started_at = started_at - - @property - def finished_at(self): - """Get the finished_at of this Run. - - The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run finished executing. - - :return: The finished_at of this Run. - :rtype: datetime - """ # noqa: E501 - return self._finished_at - - @finished_at.setter - def finished_at(self, finished_at): - """Set the finished_at of this Run. - - The time ([RFC3339Nano date/time format](https://go.dev/src/time/format.go)) the run finished executing. - - :param finished_at: The finished_at of this Run. - :type: datetime - """ # noqa: E501 - self._finished_at = finished_at - - @property - def requested_at(self): - """Get the requested_at of this Run. - - The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested. - - :return: The requested_at of this Run. - :rtype: datetime - """ # noqa: E501 - return self._requested_at - - @requested_at.setter - def requested_at(self, requested_at): - """Set the requested_at of this Run. - - The time ([RFC3339Nano date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339nano-timestamp)) the run was manually requested. - - :param requested_at: The requested_at of this Run. - :type: datetime - """ # noqa: E501 - self._requested_at = requested_at - - @property - def links(self): - """Get the links of this Run. - - :return: The links of this Run. - :rtype: RunLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Run. - - :param links: The links of this Run. - :type: RunLinks - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Run): - 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/frogpilot/third_party/influxdb_client/domain/run_links.py b/frogpilot/third_party/influxdb_client/domain/run_links.py deleted file mode 100644 index 08c0533f0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/run_links.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RunLinks(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 = { - '_self': 'str', - 'task': 'str', - 'retry': 'str' - } - - attribute_map = { - '_self': 'self', - 'task': 'task', - 'retry': 'retry' - } - - def __init__(self, _self=None, task=None, retry=None): # noqa: E501,D401,D403 - """RunLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._task = None - self._retry = None - self.discriminator = None - - if _self is not None: - self._self = _self - if task is not None: - self.task = task - if retry is not None: - self.retry = retry - - @property - def _self(self): - """Get the _self of this RunLinks. - - :return: The _self of this RunLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this RunLinks. - - :param _self: The _self of this RunLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def task(self): - """Get the task of this RunLinks. - - :return: The task of this RunLinks. - :rtype: str - """ # noqa: E501 - return self._task - - @task.setter - def task(self, task): - """Set the task of this RunLinks. - - :param task: The task of this RunLinks. - :type: str - """ # noqa: E501 - self._task = task - - @property - def retry(self): - """Get the retry of this RunLinks. - - :return: The retry of this RunLinks. - :rtype: str - """ # noqa: E501 - return self._retry - - @retry.setter - def retry(self, retry): - """Set the retry of this RunLinks. - - :param retry: The retry of this RunLinks. - :type: str - """ # noqa: E501 - self._retry = retry - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RunLinks): - 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/frogpilot/third_party/influxdb_client/domain/run_manually.py b/frogpilot/third_party/influxdb_client/domain/run_manually.py deleted file mode 100644 index c32608319..000000000 --- a/frogpilot/third_party/influxdb_client/domain/run_manually.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class RunManually(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 = { - 'scheduled_for': 'datetime' - } - - attribute_map = { - 'scheduled_for': 'scheduledFor' - } - - def __init__(self, scheduled_for=None): # noqa: E501,D401,D403 - """RunManually - a model defined in OpenAPI.""" # noqa: E501 - self._scheduled_for = None - self.discriminator = None - - self.scheduled_for = scheduled_for - - @property - def scheduled_for(self): - """Get the scheduled_for of this RunManually. - - The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. Default is the server _now_ time. - - :return: The scheduled_for of this RunManually. - :rtype: datetime - """ # noqa: E501 - return self._scheduled_for - - @scheduled_for.setter - def scheduled_for(self, scheduled_for): - """Set the scheduled_for of this RunManually. - - The time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) used for the run's `now` option. Default is the server _now_ time. - - :param scheduled_for: The scheduled_for of this RunManually. - :type: datetime - """ # noqa: E501 - self._scheduled_for = scheduled_for - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, RunManually): - 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/frogpilot/third_party/influxdb_client/domain/runs.py b/frogpilot/third_party/influxdb_client/domain/runs.py deleted file mode 100644 index 5f926301e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/runs.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Runs(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 = { - 'links': 'Links', - 'runs': 'list[Run]' - } - - attribute_map = { - 'links': 'links', - 'runs': 'runs' - } - - def __init__(self, links=None, runs=None): # noqa: E501,D401,D403 - """Runs - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._runs = None - self.discriminator = None - - if links is not None: - self.links = links - if runs is not None: - self.runs = runs - - @property - def links(self): - """Get the links of this Runs. - - :return: The links of this Runs. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Runs. - - :param links: The links of this Runs. - :type: Links - """ # noqa: E501 - self._links = links - - @property - def runs(self): - """Get the runs of this Runs. - - :return: The runs of this Runs. - :rtype: list[Run] - """ # noqa: E501 - return self._runs - - @runs.setter - def runs(self, runs): - """Set the runs of this Runs. - - :param runs: The runs of this Runs. - :type: list[Run] - """ # noqa: E501 - self._runs = runs - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Runs): - 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/frogpilot/third_party/influxdb_client/domain/scatter_view_properties.py b/frogpilot/third_party/influxdb_client/domain/scatter_view_properties.py deleted file mode 100644 index 783a87cb7..000000000 --- a/frogpilot/third_party/influxdb_client/domain/scatter_view_properties.py +++ /dev/null @@ -1,850 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class ScatterViewProperties(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 = { - 'adaptive_zoom_hide': 'bool', - '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_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]', - 'y_domain': 'list[float]', - 'x_axis_label': 'str', - 'y_axis_label': 'str', - 'x_prefix': 'str', - 'x_suffix': 'str', - 'y_prefix': 'str', - 'y_suffix': 'str', - 'legend_colorize_rows': 'bool', - 'legend_hide': 'bool', - 'legend_opacity': 'float', - 'legend_orientation_threshold': 'int' - } - - attribute_map = { - 'adaptive_zoom_hide': 'adaptiveZoomHide', - '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_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', - 'y_domain': 'yDomain', - 'x_axis_label': 'xAxisLabel', - 'y_axis_label': 'yAxisLabel', - 'x_prefix': 'xPrefix', - 'x_suffix': 'xSuffix', - 'y_prefix': 'yPrefix', - 'y_suffix': 'ySuffix', - 'legend_colorize_rows': 'legendColorizeRows', - 'legend_hide': 'legendHide', - 'legend_opacity': 'legendOpacity', - 'legend_orientation_threshold': 'legendOrientationThreshold' - } - - def __init__(self, adaptive_zoom_hide=None, 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 - - self._adaptive_zoom_hide = None - 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_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 - 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._legend_colorize_rows = None - self._legend_hide = None - self._legend_opacity = None - self._legend_orientation_threshold = None - self.discriminator = None - - if adaptive_zoom_hide is not None: - self.adaptive_zoom_hide = adaptive_zoom_hide - 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 - 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 - 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 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 adaptive_zoom_hide(self): - """Get the adaptive_zoom_hide of this ScatterViewProperties. - - :return: The adaptive_zoom_hide of this ScatterViewProperties. - :rtype: bool - """ # noqa: E501 - return self._adaptive_zoom_hide - - @adaptive_zoom_hide.setter - def adaptive_zoom_hide(self, adaptive_zoom_hide): - """Set the adaptive_zoom_hide of this ScatterViewProperties. - - :param adaptive_zoom_hide: The adaptive_zoom_hide of this ScatterViewProperties. - :type: bool - """ # noqa: E501 - self._adaptive_zoom_hide = adaptive_zoom_hide - - @property - def time_format(self): - """Get the time_format of this ScatterViewProperties. - - :return: The time_format of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._time_format - - @time_format.setter - def time_format(self, time_format): - """Set the time_format of this ScatterViewProperties. - - :param time_format: The time_format of this ScatterViewProperties. - :type: str - """ # noqa: E501 - self._time_format = time_format - - @property - def type(self): - """Get the type of this ScatterViewProperties. - - :return: The type of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ScatterViewProperties. - - :param type: The type of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The queries of this ScatterViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this ScatterViewProperties. - - :param queries: The queries of this ScatterViewProperties. - :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 ScatterViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this ScatterViewProperties. - :rtype: list[str] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this ScatterViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The shape of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this ScatterViewProperties. - - :param shape: The shape of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The note of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this ScatterViewProperties. - - :param note: The note of this ScatterViewProperties. - :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 ScatterViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this ScatterViewProperties. - :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 ScatterViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The x_column of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_column - - @x_column.setter - def x_column(self, x_column): - """Set the x_column of this ScatterViewProperties. - - :param x_column: The x_column of this ScatterViewProperties. - :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 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. - - :return: The y_column of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._y_column - - @y_column.setter - def y_column(self, y_column): - """Set the y_column of this ScatterViewProperties. - - :param y_column: The y_column of this ScatterViewProperties. - :type: str - """ # noqa: E501 - if y_column is None: - 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. - - :return: The fill_columns of this ScatterViewProperties. - :rtype: list[str] - """ # noqa: E501 - return self._fill_columns - - @fill_columns.setter - def fill_columns(self, fill_columns): - """Set the fill_columns of this ScatterViewProperties. - - :param fill_columns: The fill_columns of this ScatterViewProperties. - :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 symbol_columns(self): - """Get the symbol_columns of this ScatterViewProperties. - - :return: The symbol_columns of this ScatterViewProperties. - :rtype: list[str] - """ # noqa: E501 - return self._symbol_columns - - @symbol_columns.setter - def symbol_columns(self, symbol_columns): - """Set the symbol_columns of this ScatterViewProperties. - - :param symbol_columns: The symbol_columns of this ScatterViewProperties. - :type: list[str] - """ # noqa: E501 - if symbol_columns is None: - raise ValueError("Invalid value for `symbol_columns`, must not be `None`") # noqa: E501 - self._symbol_columns = symbol_columns - - @property - def x_domain(self): - """Get the x_domain of this ScatterViewProperties. - - :return: The x_domain of this ScatterViewProperties. - :rtype: list[float] - """ # noqa: E501 - return self._x_domain - - @x_domain.setter - def x_domain(self, x_domain): - """Set the x_domain of this ScatterViewProperties. - - :param x_domain: The x_domain of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The y_domain of this ScatterViewProperties. - :rtype: list[float] - """ # noqa: E501 - return self._y_domain - - @y_domain.setter - def y_domain(self, y_domain): - """Set the y_domain of this ScatterViewProperties. - - :param y_domain: The y_domain of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The x_axis_label of this ScatterViewProperties. - :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 ScatterViewProperties. - - :param x_axis_label: The x_axis_label of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The y_axis_label of this ScatterViewProperties. - :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 ScatterViewProperties. - - :param y_axis_label: The y_axis_label of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The x_prefix of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_prefix - - @x_prefix.setter - def x_prefix(self, x_prefix): - """Set the x_prefix of this ScatterViewProperties. - - :param x_prefix: The x_prefix of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The x_suffix of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_suffix - - @x_suffix.setter - def x_suffix(self, x_suffix): - """Set the x_suffix of this ScatterViewProperties. - - :param x_suffix: The x_suffix of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The y_prefix of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._y_prefix - - @y_prefix.setter - def y_prefix(self, y_prefix): - """Set the y_prefix of this ScatterViewProperties. - - :param y_prefix: The y_prefix of this ScatterViewProperties. - :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 ScatterViewProperties. - - :return: The y_suffix of this ScatterViewProperties. - :rtype: str - """ # noqa: E501 - return self._y_suffix - - @y_suffix.setter - def y_suffix(self, y_suffix): - """Set the y_suffix of this ScatterViewProperties. - - :param y_suffix: The y_suffix of this ScatterViewProperties. - :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 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, ScatterViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/schema_type.py b/frogpilot/third_party/influxdb_client/domain/schema_type.py deleted file mode 100644 index c8612b55d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/schema_type.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/scraper_target_request.py b/frogpilot/third_party/influxdb_client/domain/scraper_target_request.py deleted file mode 100644 index ae9606789..000000000 --- a/frogpilot/third_party/influxdb_client/domain/scraper_target_request.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ScraperTargetRequest(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', - 'type': 'str', - 'url': 'str', - 'org_id': 'str', - 'bucket_id': 'str', - 'allow_insecure': 'bool' - } - - attribute_map = { - 'name': 'name', - 'type': 'type', - 'url': 'url', - 'org_id': 'orgID', - 'bucket_id': 'bucketID', - 'allow_insecure': 'allowInsecure' - } - - 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: - self.name = name - if type is not None: - self.type = type - if url is not None: - self.url = url - if org_id is not 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): - """Get the name of this ScraperTargetRequest. - - The name of the scraper target. - - :return: The name of this ScraperTargetRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this ScraperTargetRequest. - - The name of the scraper target. - - :param name: The name of this ScraperTargetRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def type(self): - """Get the type of this ScraperTargetRequest. - - The type of the metrics to be parsed. - - :return: The type of this ScraperTargetRequest. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ScraperTargetRequest. - - The type of the metrics to be parsed. - - :param type: The type of this ScraperTargetRequest. - :type: str - """ # noqa: E501 - self._type = type - - @property - def url(self): - """Get the url of this ScraperTargetRequest. - - The URL of the metrics endpoint. - - :return: The url of this ScraperTargetRequest. - :rtype: str - """ # noqa: E501 - return self._url - - @url.setter - def url(self, url): - """Set the url of this ScraperTargetRequest. - - The URL of the metrics endpoint. - - :param url: The url of this ScraperTargetRequest. - :type: str - """ # noqa: E501 - self._url = url - - @property - def org_id(self): - """Get the org_id of this ScraperTargetRequest. - - The organization ID. - - :return: The org_id of this ScraperTargetRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this ScraperTargetRequest. - - The organization ID. - - :param org_id: The org_id of this ScraperTargetRequest. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def bucket_id(self): - """Get the bucket_id of this ScraperTargetRequest. - - The ID of the bucket to write to. - - :return: The bucket_id of this ScraperTargetRequest. - :rtype: str - """ # noqa: E501 - return self._bucket_id - - @bucket_id.setter - def bucket_id(self, bucket_id): - """Set the bucket_id of this ScraperTargetRequest. - - The ID of the bucket to write to. - - :param bucket_id: The bucket_id of this ScraperTargetRequest. - :type: str - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, ScraperTargetRequest): - 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/frogpilot/third_party/influxdb_client/domain/scraper_target_response.py b/frogpilot/third_party/influxdb_client/domain/scraper_target_response.py deleted file mode 100644 index 8f40ae0da..000000000 --- a/frogpilot/third_party/influxdb_client/domain/scraper_target_response.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.scraper_target_request import ScraperTargetRequest - - -class ScraperTargetResponse(ScraperTargetRequest): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org': 'str', - 'bucket': 'str', - 'links': 'object', - 'name': 'str', - 'type': 'str', - 'url': 'str', - 'org_id': 'str', - 'bucket_id': 'str', - 'allow_insecure': 'bool' - } - - attribute_map = { - 'id': 'id', - 'org': 'org', - 'bucket': 'bucket', - 'links': 'links', - 'name': 'name', - 'type': 'type', - 'url': 'url', - 'org_id': 'orgID', - '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, 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, allow_insecure=allow_insecure) # noqa: E501 - - self._id = None - self._org = None - self._bucket = None - self._links = None - self.discriminator = None - - if id is not None: - self.id = id - if org is not None: - self.org = org - if bucket is not None: - self.bucket = bucket - if links is not None: - self.links = links - - @property - def id(self): - """Get the id of this ScraperTargetResponse. - - :return: The id of this ScraperTargetResponse. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this ScraperTargetResponse. - - :param id: The id of this ScraperTargetResponse. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org(self): - """Get the org of this ScraperTargetResponse. - - The name of the organization. - - :return: The org of this ScraperTargetResponse. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this ScraperTargetResponse. - - The name of the organization. - - :param org: The org of this ScraperTargetResponse. - :type: str - """ # noqa: E501 - self._org = org - - @property - def bucket(self): - """Get the bucket of this ScraperTargetResponse. - - The bucket name. - - :return: The bucket of this ScraperTargetResponse. - :rtype: str - """ # noqa: E501 - return self._bucket - - @bucket.setter - def bucket(self, bucket): - """Set the bucket of this ScraperTargetResponse. - - The bucket name. - - :param bucket: The bucket of this ScraperTargetResponse. - :type: str - """ # noqa: E501 - self._bucket = bucket - - @property - def links(self): - """Get the links of this ScraperTargetResponse. - - :return: The links of this ScraperTargetResponse. - :rtype: object - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this ScraperTargetResponse. - - :param links: The links of this ScraperTargetResponse. - :type: object - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ScraperTargetResponse): - 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/frogpilot/third_party/influxdb_client/domain/scraper_target_responses.py b/frogpilot/third_party/influxdb_client/domain/scraper_target_responses.py deleted file mode 100644 index 7e4e477e9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/scraper_target_responses.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ScraperTargetResponses(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 = { - 'configurations': 'list[ScraperTargetResponse]' - } - - attribute_map = { - 'configurations': 'configurations' - } - - def __init__(self, configurations=None): # noqa: E501,D401,D403 - """ScraperTargetResponses - a model defined in OpenAPI.""" # noqa: E501 - self._configurations = None - self.discriminator = None - - if configurations is not None: - self.configurations = configurations - - @property - def configurations(self): - """Get the configurations of this ScraperTargetResponses. - - :return: The configurations of this ScraperTargetResponses. - :rtype: list[ScraperTargetResponse] - """ # noqa: E501 - return self._configurations - - @configurations.setter - def configurations(self, configurations): - """Set the configurations of this ScraperTargetResponses. - - :param configurations: The configurations of this ScraperTargetResponses. - :type: list[ScraperTargetResponse] - """ # noqa: E501 - self._configurations = configurations - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ScraperTargetResponses): - 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/frogpilot/third_party/influxdb_client/domain/script.py b/frogpilot/third_party/influxdb_client/domain/script.py deleted file mode 100644 index ea2296f70..000000000 --- a/frogpilot/third_party/influxdb_client/domain/script.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Script(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'description': 'str', - 'org_id': 'str', - 'script': 'str', - 'language': 'ScriptLanguage', - 'url': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'description': 'description', - 'org_id': 'orgID', - 'script': 'script', - 'language': 'language', - 'url': 'url', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, id=None, name=None, description=None, org_id=None, script=None, language=None, url=None, created_at=None, updated_at=None): # noqa: E501,D401,D403 - """Script - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._name = None - self._description = None - self._org_id = None - self._script = None - self._language = None - self._url = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - if id is not None: - self.id = id - self.name = name - if description is not None: - self.description = description - self.org_id = org_id - self.script = script - if language is not None: - self.language = language - if url is not None: - self.url = url - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def id(self): - """Get the id of this Script. - - :return: The id of this Script. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Script. - - :param id: The id of this Script. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this Script. - - :return: The name of this Script. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Script. - - :param name: The name of this Script. - :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 Script. - - :return: The description of this Script. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this Script. - - :param description: The description of this Script. - :type: str - """ # noqa: E501 - self._description = description - - @property - def org_id(self): - """Get the org_id of this Script. - - :return: The org_id of this Script. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Script. - - :param org_id: The org_id of this Script. - :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 - def script(self): - """Get the script of this Script. - - The script to execute. - - :return: The script of this Script. - :rtype: str - """ # noqa: E501 - return self._script - - @script.setter - def script(self, script): - """Set the script of this Script. - - The script to execute. - - :param script: The script of this Script. - :type: str - """ # noqa: E501 - if script is None: - raise ValueError("Invalid value for `script`, must not be `None`") # noqa: E501 - self._script = script - - @property - def language(self): - """Get the language of this Script. - - :return: The language of this Script. - :rtype: ScriptLanguage - """ # noqa: E501 - return self._language - - @language.setter - def language(self, language): - """Set the language of this Script. - - :param language: The language of this Script. - :type: ScriptLanguage - """ # noqa: E501 - self._language = language - - @property - def url(self): - """Get the url of this Script. - - The invocation endpoint address. - - :return: The url of this Script. - :rtype: str - """ # noqa: E501 - return self._url - - @url.setter - def url(self, url): - """Set the url of this Script. - - The invocation endpoint address. - - :param url: The url of this Script. - :type: str - """ # noqa: E501 - self._url = url - - @property - def created_at(self): - """Get the created_at of this Script. - - :return: The created_at of this Script. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this Script. - - :param created_at: The created_at of this Script. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this Script. - - :return: The updated_at of this Script. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this Script. - - :param updated_at: The updated_at of this Script. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Script): - 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/frogpilot/third_party/influxdb_client/domain/script_create_request.py b/frogpilot/third_party/influxdb_client/domain/script_create_request.py deleted file mode 100644 index 5af2b5d13..000000000 --- a/frogpilot/third_party/influxdb_client/domain/script_create_request.py +++ /dev/null @@ -1,192 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ScriptCreateRequest(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', - 'script': 'str', - 'language': 'ScriptLanguage' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'script': 'script', - 'language': 'language' - } - - def __init__(self, name=None, description=None, script=None, language=None): # noqa: E501,D401,D403 - """ScriptCreateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._script = None - self._language = None - self.discriminator = None - - self.name = name - self.description = description - self.script = script - self.language = language - - @property - def name(self): - """Get the name of this ScriptCreateRequest. - - Script name. The name must be unique within the organization. - - :return: The name of this ScriptCreateRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this ScriptCreateRequest. - - Script name. The name must be unique within the organization. - - :param name: The name of this ScriptCreateRequest. - :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 ScriptCreateRequest. - - Script description. A description of the script. - - :return: The description of this ScriptCreateRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this ScriptCreateRequest. - - Script description. A description of the script. - - :param description: The description of this ScriptCreateRequest. - :type: str - """ # noqa: E501 - if description is None: - raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 - self._description = description - - @property - def script(self): - """Get the script of this ScriptCreateRequest. - - The script to execute. - - :return: The script of this ScriptCreateRequest. - :rtype: str - """ # noqa: E501 - return self._script - - @script.setter - def script(self, script): - """Set the script of this ScriptCreateRequest. - - The script to execute. - - :param script: The script of this ScriptCreateRequest. - :type: str - """ # noqa: E501 - if script is None: - raise ValueError("Invalid value for `script`, must not be `None`") # noqa: E501 - self._script = script - - @property - def language(self): - """Get the language of this ScriptCreateRequest. - - :return: The language of this ScriptCreateRequest. - :rtype: ScriptLanguage - """ # noqa: E501 - return self._language - - @language.setter - def language(self, language): - """Set the language of this ScriptCreateRequest. - - :param language: The language of this ScriptCreateRequest. - :type: ScriptLanguage - """ # noqa: E501 - if language is None: - raise ValueError("Invalid value for `language`, must not be `None`") # noqa: E501 - self._language = language - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ScriptCreateRequest): - 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/frogpilot/third_party/influxdb_client/domain/script_invocation_params.py b/frogpilot/third_party/influxdb_client/domain/script_invocation_params.py deleted file mode 100644 index 1849280f1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/script_invocation_params.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ScriptInvocationParams(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 = { - 'params': 'dict(str, object)' - } - - attribute_map = { - 'params': 'params' - } - - def __init__(self, params=None): # noqa: E501,D401,D403 - """ScriptInvocationParams - a model defined in OpenAPI.""" # noqa: E501 - self._params = None - self.discriminator = None - - if params is not None: - self.params = params - - @property - def params(self): - """Get the params of this ScriptInvocationParams. - - The script parameters. `params` contains key-value pairs that map values to the **params.keys** in a script. When you invoke a script with `params`, InfluxDB passes the values as invocation parameters to the script. - - :return: The params of this ScriptInvocationParams. - :rtype: dict(str, object) - """ # noqa: E501 - return self._params - - @params.setter - def params(self, params): - """Set the params of this ScriptInvocationParams. - - The script parameters. `params` contains key-value pairs that map values to the **params.keys** in a script. When you invoke a script with `params`, InfluxDB passes the values as invocation parameters to the script. - - :param params: The params of this ScriptInvocationParams. - :type: dict(str, object) - """ # noqa: E501 - self._params = params - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ScriptInvocationParams): - 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/frogpilot/third_party/influxdb_client/domain/script_language.py b/frogpilot/third_party/influxdb_client/domain/script_language.py deleted file mode 100644 index 473055e0c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/script_language.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ScriptLanguage(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - FLUX = "flux" - SQL = "sql" - INFLUXQL = "influxql" - - """ - 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 - """ScriptLanguage - 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 self.openapi_types.items(): - 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, ScriptLanguage): - 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/frogpilot/third_party/influxdb_client/domain/script_update_request.py b/frogpilot/third_party/influxdb_client/domain/script_update_request.py deleted file mode 100644 index 36444c710..000000000 --- a/frogpilot/third_party/influxdb_client/domain/script_update_request.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ScriptUpdateRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'description': 'str', - 'script': 'str' - } - - attribute_map = { - 'description': 'description', - 'script': 'script' - } - - def __init__(self, description=None, script=None): # noqa: E501,D401,D403 - """ScriptUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._description = None - self._script = None - self.discriminator = None - - if description is not None: - self.description = description - if script is not None: - self.script = script - - @property - def description(self): - """Get the description of this ScriptUpdateRequest. - - A description of the script. - - :return: The description of this ScriptUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this ScriptUpdateRequest. - - A description of the script. - - :param description: The description of this ScriptUpdateRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def script(self): - """Get the script of this ScriptUpdateRequest. - - The script to execute. - - :return: The script of this ScriptUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._script - - @script.setter - def script(self, script): - """Set the script of this ScriptUpdateRequest. - - The script to execute. - - :param script: The script of this ScriptUpdateRequest. - :type: str - """ # noqa: E501 - self._script = script - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ScriptUpdateRequest): - 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/frogpilot/third_party/influxdb_client/domain/scripts.py b/frogpilot/third_party/influxdb_client/domain/scripts.py deleted file mode 100644 index 03ca492b8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/scripts.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Scripts(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 = { - 'scripts': 'list[Script]' - } - - attribute_map = { - 'scripts': 'scripts' - } - - def __init__(self, scripts=None): # noqa: E501,D401,D403 - """Scripts - a model defined in OpenAPI.""" # noqa: E501 - self._scripts = None - self.discriminator = None - - if scripts is not None: - self.scripts = scripts - - @property - def scripts(self): - """Get the scripts of this Scripts. - - :return: The scripts of this Scripts. - :rtype: list[Script] - """ # noqa: E501 - return self._scripts - - @scripts.setter - def scripts(self, scripts): - """Set the scripts of this Scripts. - - :param scripts: The scripts of this Scripts. - :type: list[Script] - """ # noqa: E501 - self._scripts = scripts - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Scripts): - 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/frogpilot/third_party/influxdb_client/domain/secret_keys.py b/frogpilot/third_party/influxdb_client/domain/secret_keys.py deleted file mode 100644 index b935a61f8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/secret_keys.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class SecretKeys(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 = { - 'secrets': 'list[str]' - } - - attribute_map = { - 'secrets': 'secrets' - } - - def __init__(self, secrets=None): # noqa: E501,D401,D403 - """SecretKeys - a model defined in OpenAPI.""" # noqa: E501 - self._secrets = None - self.discriminator = None - - if secrets is not None: - self.secrets = secrets - - @property - def secrets(self): - """Get the secrets of this SecretKeys. - - :return: The secrets of this SecretKeys. - :rtype: list[str] - """ # noqa: E501 - return self._secrets - - @secrets.setter - def secrets(self, secrets): - """Set the secrets of this SecretKeys. - - :param secrets: The secrets of this SecretKeys. - :type: list[str] - """ # noqa: E501 - self._secrets = secrets - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SecretKeys): - 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/frogpilot/third_party/influxdb_client/domain/secret_keys_response.py b/frogpilot/third_party/influxdb_client/domain/secret_keys_response.py deleted file mode 100644 index c9686cf3e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/secret_keys_response.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.secret_keys import SecretKeys - - -class SecretKeysResponse(SecretKeys): - """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', - 'secrets': 'list[str]' - } - - attribute_map = { - 'links': 'links', - 'secrets': 'secrets' - } - - def __init__(self, links=None, secrets=None): # noqa: E501,D401,D403 - """SecretKeysResponse - a model defined in OpenAPI.""" # noqa: E501 - SecretKeys.__init__(self, secrets=secrets) # noqa: E501 - - self._links = None - self.discriminator = None - - if links is not None: - self.links = links - - @property - def links(self): - """Get the links of this SecretKeysResponse. - - :return: The links of this SecretKeysResponse. - :rtype: object - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this SecretKeysResponse. - - :param links: The links of this SecretKeysResponse. - :type: object - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SecretKeysResponse): - 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/frogpilot/third_party/influxdb_client/domain/shard_group_manifest.py b/frogpilot/third_party/influxdb_client/domain/shard_group_manifest.py deleted file mode 100644 index cd644444b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/shard_group_manifest.py +++ /dev/null @@ -1,226 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ShardGroupManifest(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': 'int', - 'start_time': 'datetime', - 'end_time': 'datetime', - 'deleted_at': 'datetime', - 'truncated_at': 'datetime', - 'shards': 'list[ShardManifest]' - } - - attribute_map = { - 'id': 'id', - 'start_time': 'startTime', - 'end_time': 'endTime', - 'deleted_at': 'deletedAt', - 'truncated_at': 'truncatedAt', - 'shards': 'shards' - } - - def __init__(self, id=None, start_time=None, end_time=None, deleted_at=None, truncated_at=None, shards=None): # noqa: E501,D401,D403 - """ShardGroupManifest - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._start_time = None - self._end_time = None - self._deleted_at = None - self._truncated_at = None - self._shards = None - self.discriminator = None - - self.id = id - self.start_time = start_time - self.end_time = end_time - if deleted_at is not None: - self.deleted_at = deleted_at - if truncated_at is not None: - self.truncated_at = truncated_at - self.shards = shards - - @property - def id(self): - """Get the id of this ShardGroupManifest. - - :return: The id of this ShardGroupManifest. - :rtype: int - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this ShardGroupManifest. - - :param id: The id of this ShardGroupManifest. - :type: int - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def start_time(self): - """Get the start_time of this ShardGroupManifest. - - :return: The start_time of this ShardGroupManifest. - :rtype: datetime - """ # noqa: E501 - return self._start_time - - @start_time.setter - def start_time(self, start_time): - """Set the start_time of this ShardGroupManifest. - - :param start_time: The start_time of this ShardGroupManifest. - :type: datetime - """ # noqa: E501 - if start_time is None: - raise ValueError("Invalid value for `start_time`, must not be `None`") # noqa: E501 - self._start_time = start_time - - @property - def end_time(self): - """Get the end_time of this ShardGroupManifest. - - :return: The end_time of this ShardGroupManifest. - :rtype: datetime - """ # noqa: E501 - return self._end_time - - @end_time.setter - def end_time(self, end_time): - """Set the end_time of this ShardGroupManifest. - - :param end_time: The end_time of this ShardGroupManifest. - :type: datetime - """ # noqa: E501 - if end_time is None: - raise ValueError("Invalid value for `end_time`, must not be `None`") # noqa: E501 - self._end_time = end_time - - @property - def deleted_at(self): - """Get the deleted_at of this ShardGroupManifest. - - :return: The deleted_at of this ShardGroupManifest. - :rtype: datetime - """ # noqa: E501 - return self._deleted_at - - @deleted_at.setter - def deleted_at(self, deleted_at): - """Set the deleted_at of this ShardGroupManifest. - - :param deleted_at: The deleted_at of this ShardGroupManifest. - :type: datetime - """ # noqa: E501 - self._deleted_at = deleted_at - - @property - def truncated_at(self): - """Get the truncated_at of this ShardGroupManifest. - - :return: The truncated_at of this ShardGroupManifest. - :rtype: datetime - """ # noqa: E501 - return self._truncated_at - - @truncated_at.setter - def truncated_at(self, truncated_at): - """Set the truncated_at of this ShardGroupManifest. - - :param truncated_at: The truncated_at of this ShardGroupManifest. - :type: datetime - """ # noqa: E501 - self._truncated_at = truncated_at - - @property - def shards(self): - """Get the shards of this ShardGroupManifest. - - :return: The shards of this ShardGroupManifest. - :rtype: list[ShardManifest] - """ # noqa: E501 - return self._shards - - @shards.setter - def shards(self, shards): - """Set the shards of this ShardGroupManifest. - - :param shards: The shards of this ShardGroupManifest. - :type: list[ShardManifest] - """ # noqa: E501 - if shards is None: - raise ValueError("Invalid value for `shards`, must not be `None`") # noqa: E501 - self._shards = shards - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ShardGroupManifest): - 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/frogpilot/third_party/influxdb_client/domain/shard_manifest.py b/frogpilot/third_party/influxdb_client/domain/shard_manifest.py deleted file mode 100644 index 1d1834655..000000000 --- a/frogpilot/third_party/influxdb_client/domain/shard_manifest.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ShardManifest(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': 'int', - 'shard_owners': 'list[ShardOwner]' - } - - attribute_map = { - 'id': 'id', - 'shard_owners': 'shardOwners' - } - - def __init__(self, id=None, shard_owners=None): # noqa: E501,D401,D403 - """ShardManifest - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._shard_owners = None - self.discriminator = None - - self.id = id - self.shard_owners = shard_owners - - @property - def id(self): - """Get the id of this ShardManifest. - - :return: The id of this ShardManifest. - :rtype: int - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this ShardManifest. - - :param id: The id of this ShardManifest. - :type: int - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def shard_owners(self): - """Get the shard_owners of this ShardManifest. - - :return: The shard_owners of this ShardManifest. - :rtype: list[ShardOwner] - """ # noqa: E501 - return self._shard_owners - - @shard_owners.setter - def shard_owners(self, shard_owners): - """Set the shard_owners of this ShardManifest. - - :param shard_owners: The shard_owners of this ShardManifest. - :type: list[ShardOwner] - """ # noqa: E501 - if shard_owners is None: - raise ValueError("Invalid value for `shard_owners`, must not be `None`") # noqa: E501 - self._shard_owners = shard_owners - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ShardManifest): - 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/frogpilot/third_party/influxdb_client/domain/shard_owner.py b/frogpilot/third_party/influxdb_client/domain/shard_owner.py deleted file mode 100644 index 3c8232a21..000000000 --- a/frogpilot/third_party/influxdb_client/domain/shard_owner.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ShardOwner(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 = { - 'node_id': 'int' - } - - attribute_map = { - 'node_id': 'nodeID' - } - - def __init__(self, node_id=None): # noqa: E501,D401,D403 - """ShardOwner - a model defined in OpenAPI.""" # noqa: E501 - self._node_id = None - self.discriminator = None - - self.node_id = node_id - - @property - def node_id(self): - """Get the node_id of this ShardOwner. - - The ID of the node that owns the shard. - - :return: The node_id of this ShardOwner. - :rtype: int - """ # noqa: E501 - return self._node_id - - @node_id.setter - def node_id(self, node_id): - """Set the node_id of this ShardOwner. - - The ID of the node that owns the shard. - - :param node_id: The node_id of this ShardOwner. - :type: int - """ # noqa: E501 - if node_id is None: - raise ValueError("Invalid value for `node_id`, must not be `None`") # noqa: E501 - self._node_id = node_id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ShardOwner): - 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/frogpilot/third_party/influxdb_client/domain/simple_table_view_properties.py b/frogpilot/third_party/influxdb_client/domain/simple_table_view_properties.py deleted file mode 100644 index 670be2091..000000000 --- a/frogpilot/third_party/influxdb_client/domain/simple_table_view_properties.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class SimpleTableViewProperties(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 = { - 'type': 'str', - 'show_all': 'bool', - 'queries': 'list[DashboardQuery]', - 'shape': 'str', - 'note': 'str', - 'show_note_when_empty': 'bool' - } - - attribute_map = { - 'type': 'type', - 'show_all': 'showAll', - 'queries': 'queries', - 'shape': 'shape', - 'note': 'note', - 'show_note_when_empty': 'showNoteWhenEmpty' - } - - def __init__(self, type=None, show_all=None, queries=None, shape=None, note=None, show_note_when_empty=None): # noqa: E501,D401,D403 - """SimpleTableViewProperties - a model defined in OpenAPI.""" # noqa: E501 - ViewProperties.__init__(self) # noqa: E501 - - self._type = None - self._show_all = None - self._queries = None - self._shape = None - self._note = None - self._show_note_when_empty = None - self.discriminator = None - - self.type = type - self.show_all = show_all - self.queries = queries - self.shape = shape - self.note = note - self.show_note_when_empty = show_note_when_empty - - @property - def type(self): - """Get the type of this SimpleTableViewProperties. - - :return: The type of this SimpleTableViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this SimpleTableViewProperties. - - :param type: The type of this SimpleTableViewProperties. - :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 show_all(self): - """Get the show_all of this SimpleTableViewProperties. - - :return: The show_all of this SimpleTableViewProperties. - :rtype: bool - """ # noqa: E501 - return self._show_all - - @show_all.setter - def show_all(self, show_all): - """Set the show_all of this SimpleTableViewProperties. - - :param show_all: The show_all of this SimpleTableViewProperties. - :type: bool - """ # noqa: E501 - if show_all is None: - raise ValueError("Invalid value for `show_all`, must not be `None`") # noqa: E501 - self._show_all = show_all - - @property - def queries(self): - """Get the queries of this SimpleTableViewProperties. - - :return: The queries of this SimpleTableViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this SimpleTableViewProperties. - - :param queries: The queries of this SimpleTableViewProperties. - :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 shape(self): - """Get the shape of this SimpleTableViewProperties. - - :return: The shape of this SimpleTableViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this SimpleTableViewProperties. - - :param shape: The shape of this SimpleTableViewProperties. - :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 SimpleTableViewProperties. - - :return: The note of this SimpleTableViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this SimpleTableViewProperties. - - :param note: The note of this SimpleTableViewProperties. - :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 SimpleTableViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this SimpleTableViewProperties. - :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 SimpleTableViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this SimpleTableViewProperties. - :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 - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SimpleTableViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/single_stat_view_properties.py b/frogpilot/third_party/influxdb_client/domain/single_stat_view_properties.py deleted file mode 100644 index cc46240f2..000000000 --- a/frogpilot/third_party/influxdb_client/domain/single_stat_view_properties.py +++ /dev/null @@ -1,383 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class SingleStatViewProperties(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 = { - 'type': 'str', - 'queries': 'list[DashboardQuery]', - 'colors': 'list[DashboardColor]', - 'shape': 'str', - 'note': 'str', - 'show_note_when_empty': 'bool', - 'prefix': 'str', - 'tick_prefix': 'str', - 'suffix': 'str', - 'tick_suffix': 'str', - 'static_legend': 'StaticLegend', - 'decimal_places': 'DecimalPlaces' - } - - attribute_map = { - 'type': 'type', - 'queries': 'queries', - 'colors': 'colors', - 'shape': 'shape', - 'note': 'note', - 'show_note_when_empty': 'showNoteWhenEmpty', - 'prefix': 'prefix', - 'tick_prefix': 'tickPrefix', - 'suffix': 'suffix', - 'tick_suffix': 'tickSuffix', - '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, static_legend=None, decimal_places=None): # noqa: E501,D401,D403 - """SingleStatViewProperties - a model defined in OpenAPI.""" # noqa: E501 - ViewProperties.__init__(self) # noqa: E501 - - self._type = None - self._queries = None - self._colors = None - self._shape = None - self._note = None - self._show_note_when_empty = None - self._prefix = None - self._tick_prefix = None - self._suffix = None - self._tick_suffix = None - self._static_legend = None - self._decimal_places = None - self.discriminator = None - - 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.prefix = prefix - self.tick_prefix = tick_prefix - self.suffix = suffix - self.tick_suffix = tick_suffix - if static_legend is not None: - self.static_legend = static_legend - self.decimal_places = decimal_places - - @property - def type(self): - """Get the type of this SingleStatViewProperties. - - :return: The type of this SingleStatViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this SingleStatViewProperties. - - :param type: The type of this SingleStatViewProperties. - :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 SingleStatViewProperties. - - :return: The queries of this SingleStatViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this SingleStatViewProperties. - - :param queries: The queries of this SingleStatViewProperties. - :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 SingleStatViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this SingleStatViewProperties. - :rtype: list[DashboardColor] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this SingleStatViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this SingleStatViewProperties. - :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 SingleStatViewProperties. - - :return: The shape of this SingleStatViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this SingleStatViewProperties. - - :param shape: The shape of this SingleStatViewProperties. - :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 SingleStatViewProperties. - - :return: The note of this SingleStatViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this SingleStatViewProperties. - - :param note: The note of this SingleStatViewProperties. - :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 SingleStatViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this SingleStatViewProperties. - :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 SingleStatViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this SingleStatViewProperties. - :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 prefix(self): - """Get the prefix of this SingleStatViewProperties. - - :return: The prefix of this SingleStatViewProperties. - :rtype: str - """ # noqa: E501 - return self._prefix - - @prefix.setter - def prefix(self, prefix): - """Set the prefix of this SingleStatViewProperties. - - :param prefix: The prefix of this SingleStatViewProperties. - :type: str - """ # noqa: E501 - if prefix is None: - raise ValueError("Invalid value for `prefix`, must not be `None`") # noqa: E501 - self._prefix = prefix - - @property - def tick_prefix(self): - """Get the tick_prefix of this SingleStatViewProperties. - - :return: The tick_prefix of this SingleStatViewProperties. - :rtype: str - """ # noqa: E501 - return self._tick_prefix - - @tick_prefix.setter - def tick_prefix(self, tick_prefix): - """Set the tick_prefix of this SingleStatViewProperties. - - :param tick_prefix: The tick_prefix of this SingleStatViewProperties. - :type: str - """ # noqa: E501 - if tick_prefix is None: - raise ValueError("Invalid value for `tick_prefix`, must not be `None`") # noqa: E501 - self._tick_prefix = tick_prefix - - @property - def suffix(self): - """Get the suffix of this SingleStatViewProperties. - - :return: The suffix of this SingleStatViewProperties. - :rtype: str - """ # noqa: E501 - return self._suffix - - @suffix.setter - def suffix(self, suffix): - """Set the suffix of this SingleStatViewProperties. - - :param suffix: The suffix of this SingleStatViewProperties. - :type: str - """ # noqa: E501 - if suffix is None: - raise ValueError("Invalid value for `suffix`, must not be `None`") # noqa: E501 - self._suffix = suffix - - @property - def tick_suffix(self): - """Get the tick_suffix of this SingleStatViewProperties. - - :return: The tick_suffix of this SingleStatViewProperties. - :rtype: str - """ # noqa: E501 - return self._tick_suffix - - @tick_suffix.setter - def tick_suffix(self, tick_suffix): - """Set the tick_suffix of this SingleStatViewProperties. - - :param tick_suffix: The tick_suffix of this SingleStatViewProperties. - :type: str - """ # noqa: E501 - if tick_suffix is None: - raise ValueError("Invalid value for `tick_suffix`, must not be `None`") # noqa: E501 - self._tick_suffix = tick_suffix - - @property - def static_legend(self): - """Get the static_legend of this SingleStatViewProperties. - - :return: The static_legend of this SingleStatViewProperties. - :rtype: StaticLegend - """ # noqa: E501 - return self._static_legend - - @static_legend.setter - def static_legend(self, static_legend): - """Set the static_legend of this SingleStatViewProperties. - - :param static_legend: The static_legend of this SingleStatViewProperties. - :type: StaticLegend - """ # noqa: E501 - self._static_legend = static_legend - - @property - def decimal_places(self): - """Get the decimal_places of this SingleStatViewProperties. - - :return: The decimal_places of this SingleStatViewProperties. - :rtype: DecimalPlaces - """ # noqa: E501 - return self._decimal_places - - @decimal_places.setter - def decimal_places(self, decimal_places): - """Set the decimal_places of this SingleStatViewProperties. - - :param decimal_places: The decimal_places of this SingleStatViewProperties. - :type: DecimalPlaces - """ # noqa: E501 - if decimal_places is None: - raise ValueError("Invalid value for `decimal_places`, must not be `None`") # noqa: E501 - self._decimal_places = decimal_places - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SingleStatViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/slack_notification_endpoint.py b/frogpilot/third_party/influxdb_client/domain/slack_notification_endpoint.py deleted file mode 100644 index d619a4c89..000000000 --- a/frogpilot/third_party/influxdb_client/domain/slack_notification_endpoint.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_endpoint_discriminator import NotificationEndpointDiscriminator - - -class SlackNotificationEndpoint(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 = { - 'url': 'str', - 'token': 'str', - 'id': 'str', - 'org_id': 'str', - 'user_id': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'description': 'str', - 'name': 'str', - 'status': 'str', - 'labels': 'list[Label]', - 'links': 'NotificationEndpointBaseLinks', - 'type': 'NotificationEndpointType' - } - - attribute_map = { - 'url': 'url', - 'token': 'token', - 'id': 'id', - 'org_id': 'orgID', - 'user_id': 'userID', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'description': 'description', - 'name': 'name', - 'status': 'status', - 'labels': 'labels', - 'links': 'links', - 'type': 'type' - } - - 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 - 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 - - if url is not None: - self.url = url - if token is not None: - self.token = token - - @property - def url(self): - """Get the url of this SlackNotificationEndpoint. - - Specifies the URL of the Slack endpoint. Specify either `URL` or `Token`. - - :return: The url of this SlackNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._url - - @url.setter - def url(self, url): - """Set the url of this SlackNotificationEndpoint. - - Specifies the URL of the Slack endpoint. Specify either `URL` or `Token`. - - :param url: The url of this SlackNotificationEndpoint. - :type: str - """ # noqa: E501 - self._url = url - - @property - def token(self): - """Get the token of this SlackNotificationEndpoint. - - Specifies the API token string. Specify either `URL` or `Token`. - - :return: The token of this SlackNotificationEndpoint. - :rtype: str - """ # noqa: E501 - return self._token - - @token.setter - def token(self, token): - """Set the token of this SlackNotificationEndpoint. - - Specifies the API token string. Specify either `URL` or `Token`. - - :param token: The token of this SlackNotificationEndpoint. - :type: str - """ # noqa: E501 - self._token = token - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SlackNotificationEndpoint): - 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/frogpilot/third_party/influxdb_client/domain/slack_notification_rule.py b/frogpilot/third_party/influxdb_client/domain/slack_notification_rule.py deleted file mode 100644 index c7cd5b292..000000000 --- a/frogpilot/third_party/influxdb_client/domain/slack_notification_rule.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.slack_notification_rule_base import SlackNotificationRuleBase - - -class SlackNotificationRule(SlackNotificationRuleBase): - """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', - 'channel': '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', - '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="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, 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 self.openapi_types.items(): - 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, SlackNotificationRule): - 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/frogpilot/third_party/influxdb_client/domain/slack_notification_rule_base.py b/frogpilot/third_party/influxdb_client/domain/slack_notification_rule_base.py deleted file mode 100644 index 923a5dfef..000000000 --- a/frogpilot/third_party/influxdb_client/domain/slack_notification_rule_base.py +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator - - -class SlackNotificationRuleBase(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', - 'channel': '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', - '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, 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 - self.discriminator = None - - self.type = type - if channel is not None: - self.channel = channel - self.message_template = message_template - - @property - def type(self): - """Get the type of this SlackNotificationRuleBase. - - :return: The type of this SlackNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this SlackNotificationRuleBase. - - :param type: The type of this SlackNotificationRuleBase. - :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 channel(self): - """Get the channel of this SlackNotificationRuleBase. - - :return: The channel of this SlackNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._channel - - @channel.setter - def channel(self, channel): - """Set the channel of this SlackNotificationRuleBase. - - :param channel: The channel of this SlackNotificationRuleBase. - :type: str - """ # noqa: E501 - self._channel = channel - - @property - def message_template(self): - """Get the message_template of this SlackNotificationRuleBase. - - :return: The message_template of this SlackNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._message_template - - @message_template.setter - def message_template(self, message_template): - """Set the message_template of this SlackNotificationRuleBase. - - :param message_template: The message_template of this SlackNotificationRuleBase. - :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 - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SlackNotificationRuleBase): - 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/frogpilot/third_party/influxdb_client/domain/smtp_notification_rule.py b/frogpilot/third_party/influxdb_client/domain/smtp_notification_rule.py deleted file mode 100644 index d91073277..000000000 --- a/frogpilot/third_party/influxdb_client/domain/smtp_notification_rule.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.smtp_notification_rule_base import SMTPNotificationRuleBase - - -class SMTPNotificationRule(SMTPNotificationRuleBase): - """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', - 'subject_template': 'str', - 'body_template': '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', - '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="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, 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 self.openapi_types.items(): - 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, SMTPNotificationRule): - 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/frogpilot/third_party/influxdb_client/domain/smtp_notification_rule_base.py b/frogpilot/third_party/influxdb_client/domain/smtp_notification_rule_base.py deleted file mode 100644 index 18cbae11b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/smtp_notification_rule_base.py +++ /dev/null @@ -1,229 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.notification_rule_discriminator import NotificationRuleDiscriminator - - -class SMTPNotificationRuleBase(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', - 'subject_template': 'str', - 'body_template': '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', - '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, 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 - self._to = None - self.discriminator = None - - self.type = type - self.subject_template = subject_template - if body_template is not None: - self.body_template = body_template - self.to = to - - @property - def type(self): - """Get the type of this SMTPNotificationRuleBase. - - :return: The type of this SMTPNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this SMTPNotificationRuleBase. - - :param type: The type of this SMTPNotificationRuleBase. - :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 subject_template(self): - """Get the subject_template of this SMTPNotificationRuleBase. - - :return: The subject_template of this SMTPNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._subject_template - - @subject_template.setter - def subject_template(self, subject_template): - """Set the subject_template of this SMTPNotificationRuleBase. - - :param subject_template: The subject_template of this SMTPNotificationRuleBase. - :type: str - """ # noqa: E501 - if subject_template is None: - raise ValueError("Invalid value for `subject_template`, must not be `None`") # noqa: E501 - self._subject_template = subject_template - - @property - def body_template(self): - """Get the body_template of this SMTPNotificationRuleBase. - - :return: The body_template of this SMTPNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._body_template - - @body_template.setter - def body_template(self, body_template): - """Set the body_template of this SMTPNotificationRuleBase. - - :param body_template: The body_template of this SMTPNotificationRuleBase. - :type: str - """ # noqa: E501 - self._body_template = body_template - - @property - def to(self): - """Get the to of this SMTPNotificationRuleBase. - - :return: The to of this SMTPNotificationRuleBase. - :rtype: str - """ # noqa: E501 - return self._to - - @to.setter - def to(self, to): - """Set the to of this SMTPNotificationRuleBase. - - :param to: The to of this SMTPNotificationRuleBase. - :type: str - """ # noqa: E501 - if to is None: - raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 - self._to = to - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SMTPNotificationRuleBase): - 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/frogpilot/third_party/influxdb_client/domain/source.py b/frogpilot/third_party/influxdb_client/domain/source.py deleted file mode 100644 index c45cb12aa..000000000 --- a/frogpilot/third_party/influxdb_client/domain/source.py +++ /dev/null @@ -1,459 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Source(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 = { - 'links': 'SourceLinks', - 'id': 'str', - 'org_id': 'str', - 'default': 'bool', - 'name': 'str', - 'type': 'str', - 'url': 'str', - 'insecure_skip_verify': 'bool', - 'telegraf': 'str', - 'token': 'str', - 'username': 'str', - 'password': 'str', - 'shared_secret': 'str', - 'meta_url': 'str', - 'default_rp': 'str', - 'languages': 'list[str]' - } - - attribute_map = { - 'links': 'links', - 'id': 'id', - 'org_id': 'orgID', - 'default': 'default', - 'name': 'name', - 'type': 'type', - 'url': 'url', - 'insecure_skip_verify': 'insecureSkipVerify', - 'telegraf': 'telegraf', - 'token': 'token', - 'username': 'username', - 'password': 'password', - 'shared_secret': 'sharedSecret', - 'meta_url': 'metaUrl', - 'default_rp': 'defaultRP', - 'languages': 'languages' - } - - def __init__(self, links=None, id=None, org_id=None, default=None, name=None, type=None, url=None, insecure_skip_verify=None, telegraf=None, token=None, username=None, password=None, shared_secret=None, meta_url=None, default_rp=None, languages=None): # noqa: E501,D401,D403 - """Source - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._id = None - self._org_id = None - self._default = None - self._name = None - self._type = None - self._url = None - self._insecure_skip_verify = None - self._telegraf = None - self._token = None - self._username = None - self._password = None - self._shared_secret = None - self._meta_url = None - self._default_rp = None - self._languages = None - self.discriminator = None - - if links is not None: - self.links = links - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if default is not None: - self.default = default - if name is not None: - self.name = name - if type is not None: - self.type = type - if url is not None: - self.url = url - if insecure_skip_verify is not None: - self.insecure_skip_verify = insecure_skip_verify - if telegraf is not None: - self.telegraf = telegraf - if token is not None: - self.token = token - if username is not None: - self.username = username - if password is not None: - self.password = password - if shared_secret is not None: - self.shared_secret = shared_secret - if meta_url is not None: - self.meta_url = meta_url - if default_rp is not None: - self.default_rp = default_rp - if languages is not None: - self.languages = languages - - @property - def links(self): - """Get the links of this Source. - - :return: The links of this Source. - :rtype: SourceLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Source. - - :param links: The links of this Source. - :type: SourceLinks - """ # noqa: E501 - self._links = links - - @property - def id(self): - """Get the id of this Source. - - :return: The id of this Source. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Source. - - :param id: The id of this Source. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this Source. - - :return: The org_id of this Source. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Source. - - :param org_id: The org_id of this Source. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def default(self): - """Get the default of this Source. - - :return: The default of this Source. - :rtype: bool - """ # noqa: E501 - return self._default - - @default.setter - def default(self, default): - """Set the default of this Source. - - :param default: The default of this Source. - :type: bool - """ # noqa: E501 - self._default = default - - @property - def name(self): - """Get the name of this Source. - - :return: The name of this Source. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Source. - - :param name: The name of this Source. - :type: str - """ # noqa: E501 - self._name = name - - @property - def type(self): - """Get the type of this Source. - - :return: The type of this Source. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Source. - - :param type: The type of this Source. - :type: str - """ # noqa: E501 - self._type = type - - @property - def url(self): - """Get the url of this Source. - - :return: The url of this Source. - :rtype: str - """ # noqa: E501 - return self._url - - @url.setter - def url(self, url): - """Set the url of this Source. - - :param url: The url of this Source. - :type: str - """ # noqa: E501 - self._url = url - - @property - def insecure_skip_verify(self): - """Get the insecure_skip_verify of this Source. - - :return: The insecure_skip_verify of this Source. - :rtype: bool - """ # noqa: E501 - return self._insecure_skip_verify - - @insecure_skip_verify.setter - def insecure_skip_verify(self, insecure_skip_verify): - """Set the insecure_skip_verify of this Source. - - :param insecure_skip_verify: The insecure_skip_verify of this Source. - :type: bool - """ # noqa: E501 - self._insecure_skip_verify = insecure_skip_verify - - @property - def telegraf(self): - """Get the telegraf of this Source. - - :return: The telegraf of this Source. - :rtype: str - """ # noqa: E501 - return self._telegraf - - @telegraf.setter - def telegraf(self, telegraf): - """Set the telegraf of this Source. - - :param telegraf: The telegraf of this Source. - :type: str - """ # noqa: E501 - self._telegraf = telegraf - - @property - def token(self): - """Get the token of this Source. - - :return: The token of this Source. - :rtype: str - """ # noqa: E501 - return self._token - - @token.setter - def token(self, token): - """Set the token of this Source. - - :param token: The token of this Source. - :type: str - """ # noqa: E501 - self._token = token - - @property - def username(self): - """Get the username of this Source. - - :return: The username of this Source. - :rtype: str - """ # noqa: E501 - return self._username - - @username.setter - def username(self, username): - """Set the username of this Source. - - :param username: The username of this Source. - :type: str - """ # noqa: E501 - self._username = username - - @property - def password(self): - """Get the password of this Source. - - :return: The password of this Source. - :rtype: str - """ # noqa: E501 - return self._password - - @password.setter - def password(self, password): - """Set the password of this Source. - - :param password: The password of this Source. - :type: str - """ # noqa: E501 - self._password = password - - @property - def shared_secret(self): - """Get the shared_secret of this Source. - - :return: The shared_secret of this Source. - :rtype: str - """ # noqa: E501 - return self._shared_secret - - @shared_secret.setter - def shared_secret(self, shared_secret): - """Set the shared_secret of this Source. - - :param shared_secret: The shared_secret of this Source. - :type: str - """ # noqa: E501 - self._shared_secret = shared_secret - - @property - def meta_url(self): - """Get the meta_url of this Source. - - :return: The meta_url of this Source. - :rtype: str - """ # noqa: E501 - return self._meta_url - - @meta_url.setter - def meta_url(self, meta_url): - """Set the meta_url of this Source. - - :param meta_url: The meta_url of this Source. - :type: str - """ # noqa: E501 - self._meta_url = meta_url - - @property - def default_rp(self): - """Get the default_rp of this Source. - - :return: The default_rp of this Source. - :rtype: str - """ # noqa: E501 - return self._default_rp - - @default_rp.setter - def default_rp(self, default_rp): - """Set the default_rp of this Source. - - :param default_rp: The default_rp of this Source. - :type: str - """ # noqa: E501 - self._default_rp = default_rp - - @property - def languages(self): - """Get the languages of this Source. - - :return: The languages of this Source. - :rtype: list[str] - """ # noqa: E501 - return self._languages - - @languages.setter - def languages(self, languages): - """Set the languages of this Source. - - :param languages: The languages of this Source. - :type: list[str] - """ # noqa: E501 - allowed_values = ["flux", "influxql"] # noqa: E501 - if not set(languages).issubset(set(allowed_values)): - raise ValueError( - "Invalid values for `languages` [{0}], must be a subset of [{1}]" # noqa: E501 - .format(", ".join(map(str, set(languages) - set(allowed_values))), # noqa: E501 - ", ".join(map(str, allowed_values))) - ) - self._languages = languages - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Source): - 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/frogpilot/third_party/influxdb_client/domain/source_links.py b/frogpilot/third_party/influxdb_client/domain/source_links.py deleted file mode 100644 index baffe913c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/source_links.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class SourceLinks(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 = { - '_self': 'str', - 'query': 'str', - 'health': 'str', - 'buckets': 'str' - } - - attribute_map = { - '_self': 'self', - 'query': 'query', - 'health': 'health', - 'buckets': 'buckets' - } - - def __init__(self, _self=None, query=None, health=None, buckets=None): # noqa: E501,D401,D403 - """SourceLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._query = None - self._health = None - self._buckets = None - self.discriminator = None - - if _self is not None: - self._self = _self - if query is not None: - self.query = query - if health is not None: - self.health = health - if buckets is not None: - self.buckets = buckets - - @property - def _self(self): - """Get the _self of this SourceLinks. - - :return: The _self of this SourceLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this SourceLinks. - - :param _self: The _self of this SourceLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def query(self): - """Get the query of this SourceLinks. - - :return: The query of this SourceLinks. - :rtype: str - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this SourceLinks. - - :param query: The query of this SourceLinks. - :type: str - """ # noqa: E501 - self._query = query - - @property - def health(self): - """Get the health of this SourceLinks. - - :return: The health of this SourceLinks. - :rtype: str - """ # noqa: E501 - return self._health - - @health.setter - def health(self, health): - """Set the health of this SourceLinks. - - :param health: The health of this SourceLinks. - :type: str - """ # noqa: E501 - self._health = health - - @property - def buckets(self): - """Get the buckets of this SourceLinks. - - :return: The buckets of this SourceLinks. - :rtype: str - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this SourceLinks. - - :param buckets: The buckets of this SourceLinks. - :type: str - """ # noqa: E501 - self._buckets = buckets - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SourceLinks): - 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/frogpilot/third_party/influxdb_client/domain/sources.py b/frogpilot/third_party/influxdb_client/domain/sources.py deleted file mode 100644 index c368f13d3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/sources.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Sources(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 = { - 'links': 'ResourceMembersLinks', - 'sources': 'list[Source]' - } - - attribute_map = { - 'links': 'links', - 'sources': 'sources' - } - - def __init__(self, links=None, sources=None): # noqa: E501,D401,D403 - """Sources - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._sources = None - self.discriminator = None - - if links is not None: - self.links = links - if sources is not None: - self.sources = sources - - @property - def links(self): - """Get the links of this Sources. - - :return: The links of this Sources. - :rtype: ResourceMembersLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Sources. - - :param links: The links of this Sources. - :type: ResourceMembersLinks - """ # noqa: E501 - self._links = links - - @property - def sources(self): - """Get the sources of this Sources. - - :return: The sources of this Sources. - :rtype: list[Source] - """ # noqa: E501 - return self._sources - - @sources.setter - def sources(self, sources): - """Set the sources of this Sources. - - :param sources: The sources of this Sources. - :type: list[Source] - """ # noqa: E501 - self._sources = sources - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Sources): - 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/frogpilot/third_party/influxdb_client/domain/stack.py b/frogpilot/third_party/influxdb_client/domain/stack.py deleted file mode 100644 index cdae5a358..000000000 --- a/frogpilot/third_party/influxdb_client/domain/stack.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Stack(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'created_at': 'datetime', - 'events': 'list[StackEvents]' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'created_at': 'createdAt', - 'events': 'events' - } - - def __init__(self, id=None, org_id=None, created_at=None, events=None): # noqa: E501,D401,D403 - """Stack - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._created_at = None - self._events = None - self.discriminator = None - - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if created_at is not None: - self.created_at = created_at - if events is not None: - self.events = events - - @property - def id(self): - """Get the id of this Stack. - - :return: The id of this Stack. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Stack. - - :param id: The id of this Stack. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this Stack. - - :return: The org_id of this Stack. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Stack. - - :param org_id: The org_id of this Stack. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def created_at(self): - """Get the created_at of this Stack. - - :return: The created_at of this Stack. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this Stack. - - :param created_at: The created_at of this Stack. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def events(self): - """Get the events of this Stack. - - :return: The events of this Stack. - :rtype: list[StackEvents] - """ # noqa: E501 - return self._events - - @events.setter - def events(self, events): - """Set the events of this Stack. - - :param events: The events of this Stack. - :type: list[StackEvents] - """ # noqa: E501 - self._events = events - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Stack): - 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/frogpilot/third_party/influxdb_client/domain/stack_associations.py b/frogpilot/third_party/influxdb_client/domain/stack_associations.py deleted file mode 100644 index 7e3191b36..000000000 --- a/frogpilot/third_party/influxdb_client/domain/stack_associations.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class StackAssociations(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'meta_name': 'str' - } - - attribute_map = { - 'kind': 'kind', - 'meta_name': 'metaName' - } - - def __init__(self, kind=None, meta_name=None): # noqa: E501,D401,D403 - """StackAssociations - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._meta_name = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if meta_name is not None: - self.meta_name = meta_name - - @property - def kind(self): - """Get the kind of this StackAssociations. - - :return: The kind of this StackAssociations. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this StackAssociations. - - :param kind: The kind of this StackAssociations. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def meta_name(self): - """Get the meta_name of this StackAssociations. - - :return: The meta_name of this StackAssociations. - :rtype: str - """ # noqa: E501 - return self._meta_name - - @meta_name.setter - def meta_name(self, meta_name): - """Set the meta_name of this StackAssociations. - - :param meta_name: The meta_name of this StackAssociations. - :type: str - """ # noqa: E501 - self._meta_name = meta_name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, StackAssociations): - 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/frogpilot/third_party/influxdb_client/domain/stack_events.py b/frogpilot/third_party/influxdb_client/domain/stack_events.py deleted file mode 100644 index 854a3ab4c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/stack_events.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class StackEvents(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 = { - 'event_type': 'str', - 'name': 'str', - 'description': 'str', - 'sources': 'list[str]', - 'resources': 'list[StackResources]', - 'urls': 'list[str]', - 'updated_at': 'datetime' - } - - attribute_map = { - 'event_type': 'eventType', - 'name': 'name', - 'description': 'description', - 'sources': 'sources', - 'resources': 'resources', - 'urls': 'urls', - 'updated_at': 'updatedAt' - } - - def __init__(self, event_type=None, name=None, description=None, sources=None, resources=None, urls=None, updated_at=None): # noqa: E501,D401,D403 - """StackEvents - a model defined in OpenAPI.""" # noqa: E501 - self._event_type = None - self._name = None - self._description = None - self._sources = None - self._resources = None - self._urls = None - self._updated_at = None - self.discriminator = None - - if event_type is not None: - self.event_type = event_type - if name is not None: - self.name = name - if description is not None: - self.description = description - if sources is not None: - self.sources = sources - if resources is not None: - self.resources = resources - if urls is not None: - self.urls = urls - if updated_at is not None: - self.updated_at = updated_at - - @property - def event_type(self): - """Get the event_type of this StackEvents. - - :return: The event_type of this StackEvents. - :rtype: str - """ # noqa: E501 - return self._event_type - - @event_type.setter - def event_type(self, event_type): - """Set the event_type of this StackEvents. - - :param event_type: The event_type of this StackEvents. - :type: str - """ # noqa: E501 - self._event_type = event_type - - @property - def name(self): - """Get the name of this StackEvents. - - :return: The name of this StackEvents. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this StackEvents. - - :param name: The name of this StackEvents. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this StackEvents. - - :return: The description of this StackEvents. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this StackEvents. - - :param description: The description of this StackEvents. - :type: str - """ # noqa: E501 - self._description = description - - @property - def sources(self): - """Get the sources of this StackEvents. - - :return: The sources of this StackEvents. - :rtype: list[str] - """ # noqa: E501 - return self._sources - - @sources.setter - def sources(self, sources): - """Set the sources of this StackEvents. - - :param sources: The sources of this StackEvents. - :type: list[str] - """ # noqa: E501 - self._sources = sources - - @property - def resources(self): - """Get the resources of this StackEvents. - - :return: The resources of this StackEvents. - :rtype: list[StackResources] - """ # noqa: E501 - return self._resources - - @resources.setter - def resources(self, resources): - """Set the resources of this StackEvents. - - :param resources: The resources of this StackEvents. - :type: list[StackResources] - """ # noqa: E501 - self._resources = resources - - @property - def urls(self): - """Get the urls of this StackEvents. - - :return: The urls of this StackEvents. - :rtype: list[str] - """ # noqa: E501 - return self._urls - - @urls.setter - def urls(self, urls): - """Set the urls of this StackEvents. - - :param urls: The urls of this StackEvents. - :type: list[str] - """ # noqa: E501 - self._urls = urls - - @property - def updated_at(self): - """Get the updated_at of this StackEvents. - - :return: The updated_at of this StackEvents. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this StackEvents. - - :param updated_at: The updated_at of this StackEvents. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, StackEvents): - 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/frogpilot/third_party/influxdb_client/domain/stack_links.py b/frogpilot/third_party/influxdb_client/domain/stack_links.py deleted file mode 100644 index f3c733546..000000000 --- a/frogpilot/third_party/influxdb_client/domain/stack_links.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class StackLinks(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 = { - '_self': 'str' - } - - attribute_map = { - '_self': 'self' - } - - def __init__(self, _self=None): # noqa: E501,D401,D403 - """StackLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self.discriminator = None - - if _self is not None: - self._self = _self - - @property - def _self(self): - """Get the _self of this StackLinks. - - :return: The _self of this StackLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this StackLinks. - - :param _self: The _self of this StackLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, StackLinks): - 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/frogpilot/third_party/influxdb_client/domain/stack_resources.py b/frogpilot/third_party/influxdb_client/domain/stack_resources.py deleted file mode 100644 index 3cd5f9891..000000000 --- a/frogpilot/third_party/influxdb_client/domain/stack_resources.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class StackResources(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'api_version': 'str', - 'resource_id': 'str', - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'associations': 'list[StackAssociations]', - 'links': 'StackLinks' - } - - attribute_map = { - 'api_version': 'apiVersion', - 'resource_id': 'resourceID', - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'associations': 'associations', - 'links': 'links' - } - - def __init__(self, api_version=None, resource_id=None, kind=None, template_meta_name=None, associations=None, links=None): # noqa: E501,D401,D403 - """StackResources - a model defined in OpenAPI.""" # noqa: E501 - self._api_version = None - self._resource_id = None - self._kind = None - self._template_meta_name = None - self._associations = None - self._links = None - self.discriminator = None - - if api_version is not None: - self.api_version = api_version - if resource_id is not None: - self.resource_id = resource_id - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if associations is not None: - self.associations = associations - if links is not None: - self.links = links - - @property - def api_version(self): - """Get the api_version of this StackResources. - - :return: The api_version of this StackResources. - :rtype: str - """ # noqa: E501 - return self._api_version - - @api_version.setter - def api_version(self, api_version): - """Set the api_version of this StackResources. - - :param api_version: The api_version of this StackResources. - :type: str - """ # noqa: E501 - self._api_version = api_version - - @property - def resource_id(self): - """Get the resource_id of this StackResources. - - :return: The resource_id of this StackResources. - :rtype: str - """ # noqa: E501 - return self._resource_id - - @resource_id.setter - def resource_id(self, resource_id): - """Set the resource_id of this StackResources. - - :param resource_id: The resource_id of this StackResources. - :type: str - """ # noqa: E501 - self._resource_id = resource_id - - @property - def kind(self): - """Get the kind of this StackResources. - - :return: The kind of this StackResources. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this StackResources. - - :param kind: The kind of this StackResources. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this StackResources. - - :return: The template_meta_name of this StackResources. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this StackResources. - - :param template_meta_name: The template_meta_name of this StackResources. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def associations(self): - """Get the associations of this StackResources. - - :return: The associations of this StackResources. - :rtype: list[StackAssociations] - """ # noqa: E501 - return self._associations - - @associations.setter - def associations(self, associations): - """Set the associations of this StackResources. - - :param associations: The associations of this StackResources. - :type: list[StackAssociations] - """ # noqa: E501 - self._associations = associations - - @property - def links(self): - """Get the links of this StackResources. - - :return: The links of this StackResources. - :rtype: StackLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this StackResources. - - :param links: The links of this StackResources. - :type: StackLinks - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, StackResources): - 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/frogpilot/third_party/influxdb_client/domain/statement.py b/frogpilot/third_party/influxdb_client/domain/statement.py deleted file mode 100644 index bb19fc356..000000000 --- a/frogpilot/third_party/influxdb_client/domain/statement.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Statement(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501,D401,D403 - """Statement - 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 self.openapi_types.items(): - 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, Statement): - 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/frogpilot/third_party/influxdb_client/domain/static_legend.py b/frogpilot/third_party/influxdb_client/domain/static_legend.py deleted file mode 100644 index cff694394..000000000 --- a/frogpilot/third_party/influxdb_client/domain/static_legend.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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', - 'show': 'bool', - 'opacity': 'float', - 'orientation_threshold': 'int', - 'value_axis': 'str', - 'width_ratio': 'float' - } - - attribute_map = { - 'colorize_rows': 'colorizeRows', - 'height_ratio': 'heightRatio', - 'show': 'show', - 'opacity': 'opacity', - 'orientation_threshold': 'orientationThreshold', - 'value_axis': 'valueAxis', - 'width_ratio': 'widthRatio' - } - - def __init__(self, colorize_rows=None, height_ratio=None, show=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._show = 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 show is not None: - self.show = show - 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 show(self): - """Get the show of this StaticLegend. - - :return: The show of this StaticLegend. - :rtype: bool - """ # noqa: E501 - return self._show - - @show.setter - def show(self, show): - """Set the show of this StaticLegend. - - :param show: The show of this StaticLegend. - :type: bool - """ # noqa: E501 - self._show = show - - @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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/status_rule.py b/frogpilot/third_party/influxdb_client/domain/status_rule.py deleted file mode 100644 index bac05845a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/status_rule.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class StatusRule(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 = { - 'current_level': 'RuleStatusLevel', - 'previous_level': 'RuleStatusLevel', - 'count': 'int', - 'period': 'str' - } - - attribute_map = { - 'current_level': 'currentLevel', - 'previous_level': 'previousLevel', - 'count': 'count', - 'period': 'period' - } - - def __init__(self, current_level=None, previous_level=None, count=None, period=None): # noqa: E501,D401,D403 - """StatusRule - a model defined in OpenAPI.""" # noqa: E501 - self._current_level = None - self._previous_level = None - self._count = None - self._period = None - self.discriminator = None - - if current_level is not None: - self.current_level = current_level - if previous_level is not None: - self.previous_level = previous_level - if count is not None: - self.count = count - if period is not None: - self.period = period - - @property - def current_level(self): - """Get the current_level of this StatusRule. - - :return: The current_level of this StatusRule. - :rtype: RuleStatusLevel - """ # noqa: E501 - return self._current_level - - @current_level.setter - def current_level(self, current_level): - """Set the current_level of this StatusRule. - - :param current_level: The current_level of this StatusRule. - :type: RuleStatusLevel - """ # noqa: E501 - self._current_level = current_level - - @property - def previous_level(self): - """Get the previous_level of this StatusRule. - - :return: The previous_level of this StatusRule. - :rtype: RuleStatusLevel - """ # noqa: E501 - return self._previous_level - - @previous_level.setter - def previous_level(self, previous_level): - """Set the previous_level of this StatusRule. - - :param previous_level: The previous_level of this StatusRule. - :type: RuleStatusLevel - """ # noqa: E501 - self._previous_level = previous_level - - @property - def count(self): - """Get the count of this StatusRule. - - :return: The count of this StatusRule. - :rtype: int - """ # noqa: E501 - return self._count - - @count.setter - def count(self, count): - """Set the count of this StatusRule. - - :param count: The count of this StatusRule. - :type: int - """ # noqa: E501 - self._count = count - - @property - def period(self): - """Get the period of this StatusRule. - - :return: The period of this StatusRule. - :rtype: str - """ # noqa: E501 - return self._period - - @period.setter - def period(self, period): - """Set the period of this StatusRule. - - :param period: The period of this StatusRule. - :type: str - """ # noqa: E501 - self._period = period - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, StatusRule): - 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/frogpilot/third_party/influxdb_client/domain/string_literal.py b/frogpilot/third_party/influxdb_client/domain/string_literal.py deleted file mode 100644 index 643ca4254..000000000 --- a/frogpilot/third_party/influxdb_client/domain/string_literal.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.property_key import PropertyKey - - -class StringLiteral(PropertyKey): - """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', - 'value': 'str' - } - - attribute_map = { - 'type': 'type', - 'value': 'value' - } - - 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 - - if type is not None: - self.type = type - if value is not None: - self.value = value - - @property - def type(self): - """Get the type of this StringLiteral. - - Type of AST node - - :return: The type of this StringLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this StringLiteral. - - Type of AST node - - :param type: The type of this StringLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def value(self): - """Get the value of this StringLiteral. - - :return: The value of this StringLiteral. - :rtype: str - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this StringLiteral. - - :param value: The value of this StringLiteral. - :type: str - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, StringLiteral): - 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/frogpilot/third_party/influxdb_client/domain/subscription_manifest.py b/frogpilot/third_party/influxdb_client/domain/subscription_manifest.py deleted file mode 100644 index 7366561e8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/subscription_manifest.py +++ /dev/null @@ -1,156 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class SubscriptionManifest(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', - 'mode': 'str', - 'destinations': 'list[str]' - } - - attribute_map = { - 'name': 'name', - 'mode': 'mode', - 'destinations': 'destinations' - } - - def __init__(self, name=None, mode=None, destinations=None): # noqa: E501,D401,D403 - """SubscriptionManifest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._mode = None - self._destinations = None - self.discriminator = None - - self.name = name - self.mode = mode - self.destinations = destinations - - @property - def name(self): - """Get the name of this SubscriptionManifest. - - :return: The name of this SubscriptionManifest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this SubscriptionManifest. - - :param name: The name of this SubscriptionManifest. - :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 mode(self): - """Get the mode of this SubscriptionManifest. - - :return: The mode of this SubscriptionManifest. - :rtype: str - """ # noqa: E501 - return self._mode - - @mode.setter - def mode(self, mode): - """Set the mode of this SubscriptionManifest. - - :param mode: The mode of this SubscriptionManifest. - :type: str - """ # noqa: E501 - if mode is None: - raise ValueError("Invalid value for `mode`, must not be `None`") # noqa: E501 - self._mode = mode - - @property - def destinations(self): - """Get the destinations of this SubscriptionManifest. - - :return: The destinations of this SubscriptionManifest. - :rtype: list[str] - """ # noqa: E501 - return self._destinations - - @destinations.setter - def destinations(self, destinations): - """Set the destinations of this SubscriptionManifest. - - :param destinations: The destinations of this SubscriptionManifest. - :type: list[str] - """ # noqa: E501 - if destinations is None: - raise ValueError("Invalid value for `destinations`, must not be `None`") # noqa: E501 - self._destinations = destinations - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, SubscriptionManifest): - 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/frogpilot/third_party/influxdb_client/domain/table_view_properties.py b/frogpilot/third_party/influxdb_client/domain/table_view_properties.py deleted file mode 100644 index bd8ec0d99..000000000 --- a/frogpilot/third_party/influxdb_client/domain/table_view_properties.py +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class TableViewProperties(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 = { - 'type': 'str', - 'queries': 'list[DashboardQuery]', - 'colors': 'list[DashboardColor]', - 'shape': 'str', - 'note': 'str', - 'show_note_when_empty': 'bool', - 'table_options': 'TableViewPropertiesTableOptions', - 'field_options': 'list[RenamableField]', - 'time_format': 'str', - 'decimal_places': 'DecimalPlaces' - } - - attribute_map = { - 'type': 'type', - 'queries': 'queries', - 'colors': 'colors', - 'shape': 'shape', - 'note': 'note', - 'show_note_when_empty': 'showNoteWhenEmpty', - 'table_options': 'tableOptions', - 'field_options': 'fieldOptions', - 'time_format': 'timeFormat', - 'decimal_places': 'decimalPlaces' - } - - def __init__(self, type=None, queries=None, colors=None, shape=None, note=None, show_note_when_empty=None, table_options=None, field_options=None, time_format=None, decimal_places=None): # noqa: E501,D401,D403 - """TableViewProperties - a model defined in OpenAPI.""" # noqa: E501 - ViewProperties.__init__(self) # noqa: E501 - - self._type = None - self._queries = None - self._colors = None - self._shape = None - self._note = None - self._show_note_when_empty = None - self._table_options = None - self._field_options = None - self._time_format = None - self._decimal_places = None - self.discriminator = None - - 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.table_options = table_options - self.field_options = field_options - self.time_format = time_format - self.decimal_places = decimal_places - - @property - def type(self): - """Get the type of this TableViewProperties. - - :return: The type of this TableViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this TableViewProperties. - - :param type: The type of this TableViewProperties. - :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 TableViewProperties. - - :return: The queries of this TableViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this TableViewProperties. - - :param queries: The queries of this TableViewProperties. - :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 TableViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this TableViewProperties. - :rtype: list[DashboardColor] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this TableViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this TableViewProperties. - :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 TableViewProperties. - - :return: The shape of this TableViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this TableViewProperties. - - :param shape: The shape of this TableViewProperties. - :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 TableViewProperties. - - :return: The note of this TableViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this TableViewProperties. - - :param note: The note of this TableViewProperties. - :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 TableViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this TableViewProperties. - :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 TableViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this TableViewProperties. - :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 table_options(self): - """Get the table_options of this TableViewProperties. - - :return: The table_options of this TableViewProperties. - :rtype: TableViewPropertiesTableOptions - """ # noqa: E501 - return self._table_options - - @table_options.setter - def table_options(self, table_options): - """Set the table_options of this TableViewProperties. - - :param table_options: The table_options of this TableViewProperties. - :type: TableViewPropertiesTableOptions - """ # noqa: E501 - if table_options is None: - raise ValueError("Invalid value for `table_options`, must not be `None`") # noqa: E501 - self._table_options = table_options - - @property - def field_options(self): - """Get the field_options of this TableViewProperties. - - fieldOptions represent the fields retrieved by the query with customization options - - :return: The field_options of this TableViewProperties. - :rtype: list[RenamableField] - """ # noqa: E501 - return self._field_options - - @field_options.setter - def field_options(self, field_options): - """Set the field_options of this TableViewProperties. - - fieldOptions represent the fields retrieved by the query with customization options - - :param field_options: The field_options of this TableViewProperties. - :type: list[RenamableField] - """ # noqa: E501 - if field_options is None: - raise ValueError("Invalid value for `field_options`, must not be `None`") # noqa: E501 - self._field_options = field_options - - @property - def time_format(self): - """Get the time_format of this TableViewProperties. - - timeFormat describes the display format for time values according to moment.js date formatting - - :return: The time_format of this TableViewProperties. - :rtype: str - """ # noqa: E501 - return self._time_format - - @time_format.setter - def time_format(self, time_format): - """Set the time_format of this TableViewProperties. - - timeFormat describes the display format for time values according to moment.js date formatting - - :param time_format: The time_format of this TableViewProperties. - :type: str - """ # noqa: E501 - if time_format is None: - raise ValueError("Invalid value for `time_format`, must not be `None`") # noqa: E501 - self._time_format = time_format - - @property - def decimal_places(self): - """Get the decimal_places of this TableViewProperties. - - :return: The decimal_places of this TableViewProperties. - :rtype: DecimalPlaces - """ # noqa: E501 - return self._decimal_places - - @decimal_places.setter - def decimal_places(self, decimal_places): - """Set the decimal_places of this TableViewProperties. - - :param decimal_places: The decimal_places of this TableViewProperties. - :type: DecimalPlaces - """ # noqa: E501 - if decimal_places is None: - raise ValueError("Invalid value for `decimal_places`, must not be `None`") # noqa: E501 - self._decimal_places = decimal_places - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TableViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/table_view_properties_table_options.py b/frogpilot/third_party/influxdb_client/domain/table_view_properties_table_options.py deleted file mode 100644 index 71193ca95..000000000 --- a/frogpilot/third_party/influxdb_client/domain/table_view_properties_table_options.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/tag_rule.py b/frogpilot/third_party/influxdb_client/domain/tag_rule.py deleted file mode 100644 index 9683856d9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/tag_rule.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TagRule(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 = { - 'key': 'str', - 'value': 'str', - 'operator': 'str' - } - - attribute_map = { - 'key': 'key', - 'value': 'value', - 'operator': 'operator' - } - - def __init__(self, key=None, value=None, operator=None): # noqa: E501,D401,D403 - """TagRule - a model defined in OpenAPI.""" # noqa: E501 - self._key = None - self._value = None - self._operator = None - self.discriminator = None - - if key is not None: - self.key = key - if value is not None: - self.value = value - if operator is not None: - self.operator = operator - - @property - def key(self): - """Get the key of this TagRule. - - :return: The key of this TagRule. - :rtype: str - """ # noqa: E501 - return self._key - - @key.setter - def key(self, key): - """Set the key of this TagRule. - - :param key: The key of this TagRule. - :type: str - """ # noqa: E501 - self._key = key - - @property - def value(self): - """Get the value of this TagRule. - - :return: The value of this TagRule. - :rtype: str - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this TagRule. - - :param value: The value of this TagRule. - :type: str - """ # noqa: E501 - self._value = value - - @property - def operator(self): - """Get the operator of this TagRule. - - :return: The operator of this TagRule. - :rtype: str - """ # noqa: E501 - return self._operator - - @operator.setter - def operator(self, operator): - """Set the operator of this TagRule. - - :param operator: The operator of this TagRule. - :type: str - """ # noqa: E501 - self._operator = operator - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TagRule): - 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/frogpilot/third_party/influxdb_client/domain/task.py b/frogpilot/third_party/influxdb_client/domain/task.py deleted file mode 100644 index 531babca3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/task.py +++ /dev/null @@ -1,569 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Task(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'org': 'str', - 'name': 'str', - 'owner_id': 'str', - 'description': 'str', - 'status': 'TaskStatusType', - 'labels': 'list[Label]', - 'authorization_id': 'str', - 'flux': 'str', - 'every': 'str', - 'cron': 'str', - 'offset': 'str', - 'latest_completed': 'datetime', - 'last_run_status': 'str', - 'last_run_error': 'str', - 'created_at': 'datetime', - 'updated_at': 'datetime', - 'links': 'TaskLinks' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'org': 'org', - 'name': 'name', - 'owner_id': 'ownerID', - 'description': 'description', - 'status': 'status', - 'labels': 'labels', - 'authorization_id': 'authorizationID', - 'flux': 'flux', - 'every': 'every', - 'cron': 'cron', - 'offset': 'offset', - 'latest_completed': 'latestCompleted', - 'last_run_status': 'lastRunStatus', - 'last_run_error': 'lastRunError', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt', - 'links': 'links' - } - - def __init__(self, id=None, org_id=None, org=None, name=None, owner_id=None, description=None, status=None, labels=None, authorization_id=None, flux=None, every=None, cron=None, offset=None, latest_completed=None, last_run_status=None, last_run_error=None, created_at=None, updated_at=None, links=None): # noqa: E501,D401,D403 - """Task - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._org = None - self._name = None - self._owner_id = None - self._description = None - self._status = None - self._labels = None - self._authorization_id = None - self._flux = None - self._every = None - self._cron = None - self._offset = None - self._latest_completed = None - self._last_run_status = None - self._last_run_error = None - self._created_at = None - self._updated_at = None - self._links = None - self.discriminator = None - - self.id = id - self.org_id = org_id - if org is not None: - self.org = org - self.name = name - if owner_id is not None: - self.owner_id = owner_id - if description is not None: - self.description = description - if status is not None: - self.status = status - if labels is not None: - self.labels = labels - if authorization_id is not None: - self.authorization_id = authorization_id - self.flux = flux - if every is not None: - self.every = every - if cron is not None: - self.cron = cron - if offset is not None: - self.offset = offset - if latest_completed is not None: - self.latest_completed = latest_completed - if last_run_status is not None: - self.last_run_status = last_run_status - if last_run_error is not None: - self.last_run_error = last_run_error - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - if links is not None: - self.links = links - - @property - def id(self): - """Get the id of this Task. - - :return: The id of this Task. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Task. - - :param id: The id of this Task. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this Task. - - An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Specifies the organization that owns the task. - - :return: The org_id of this Task. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Task. - - An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Specifies the organization that owns the task. - - :param org_id: The org_id of this Task. - :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 - def org(self): - """Get the org of this Task. - - An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Specifies the organization that owns the task. - - :return: The org of this Task. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this Task. - - An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Specifies the organization that owns the task. - - :param org: The org of this Task. - :type: str - """ # noqa: E501 - self._org = org - - @property - def name(self): - """Get the name of this Task. - - The name of the task. - - :return: The name of this Task. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Task. - - The name of the task. - - :param name: The name of this Task. - :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 owner_id(self): - """Get the owner_id of this Task. - - A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Specifies the owner of the task. To find a user ID, you can use the [`GET /api/v2/users` endpoint](#operation/GetUsers) to list users. - - :return: The owner_id of this Task. - :rtype: str - """ # noqa: E501 - return self._owner_id - - @owner_id.setter - def owner_id(self, owner_id): - """Set the owner_id of this Task. - - A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Specifies the owner of the task. To find a user ID, you can use the [`GET /api/v2/users` endpoint](#operation/GetUsers) to list users. - - :param owner_id: The owner_id of this Task. - :type: str - """ # noqa: E501 - self._owner_id = owner_id - - @property - def description(self): - """Get the description of this Task. - - A description of the task. - - :return: The description of this Task. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this Task. - - A description of the task. - - :param description: The description of this Task. - :type: str - """ # noqa: E501 - self._description = description - - @property - def status(self): - """Get the status of this Task. - - :return: The status of this Task. - :rtype: TaskStatusType - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this Task. - - :param status: The status of this Task. - :type: TaskStatusType - """ # noqa: E501 - self._status = status - - @property - def labels(self): - """Get the labels of this Task. - - :return: The labels of this Task. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this Task. - - :param labels: The labels of this Task. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - @property - def authorization_id(self): - """Get the authorization_id of this Task. - - An authorization ID. Specifies the authorization used when the task communicates with the query engine. To find an authorization ID, use the [`GET /api/v2/authorizations` endpoint](#operation/GetAuthorizations) to list authorizations. - - :return: The authorization_id of this Task. - :rtype: str - """ # noqa: E501 - return self._authorization_id - - @authorization_id.setter - def authorization_id(self, authorization_id): - """Set the authorization_id of this Task. - - An authorization ID. Specifies the authorization used when the task communicates with the query engine. To find an authorization ID, use the [`GET /api/v2/authorizations` endpoint](#operation/GetAuthorizations) to list authorizations. - - :param authorization_id: The authorization_id of this Task. - :type: str - """ # noqa: E501 - self._authorization_id = authorization_id - - @property - def flux(self): - """Get the flux of this Task. - - The Flux script that the task executes. - - :return: The flux of this Task. - :rtype: str - """ # noqa: E501 - return self._flux - - @flux.setter - def flux(self, flux): - """Set the flux of this Task. - - The Flux script that the task executes. - - :param flux: The flux of this Task. - :type: str - """ # noqa: E501 - if flux is None: - raise ValueError("Invalid value for `flux`, must not be `None`") # noqa: E501 - self._flux = flux - - @property - def every(self): - """Get the every of this Task. - - The interval ([duration literal](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. - - :return: The every of this Task. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this Task. - - The interval ([duration literal](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) at which the task runs. `every` also determines when the task first runs, depending on the specified time. - - :param every: The every of this Task. - :type: str - """ # noqa: E501 - self._every = every - - @property - def cron(self): - """Get the cron of this Task. - - A [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions. - - :return: The cron of this Task. - :rtype: str - """ # noqa: E501 - return self._cron - - @cron.setter - def cron(self, cron): - """Set the cron of this Task. - - A [Cron expression](https://en.wikipedia.org/wiki/Cron#Overview) that defines the schedule on which the task runs. InfluxDB uses the system time when evaluating Cron expressions. - - :param cron: The cron of this Task. - :type: str - """ # noqa: E501 - self._cron = cron - - @property - def offset(self): - """Get the offset of this Task. - - A [duration](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals) to delay execution of the task after the scheduled time has elapsed. `0` removes the offset. - - :return: The offset of this Task. - :rtype: str - """ # noqa: E501 - return self._offset - - @offset.setter - def offset(self, offset): - """Set the offset of this Task. - - A [duration](https://docs.influxdata.com/flux/v0.x/spec/lexical-elements/#duration-literals) to delay execution of the task after the scheduled time has elapsed. `0` removes the offset. - - :param offset: The offset of this Task. - :type: str - """ # noqa: E501 - self._offset = offset - - @property - def latest_completed(self): - """Get the latest_completed of this Task. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. - - :return: The latest_completed of this Task. - :rtype: datetime - """ # noqa: E501 - return self._latest_completed - - @latest_completed.setter - def latest_completed(self, latest_completed): - """Set the latest_completed of this Task. - - A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)) of the latest scheduled and completed run. - - :param latest_completed: The latest_completed of this Task. - :type: datetime - """ # noqa: E501 - self._latest_completed = latest_completed - - @property - def last_run_status(self): - """Get the last_run_status of this Task. - - :return: The last_run_status of this Task. - :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 Task. - - :param last_run_status: The last_run_status of this Task. - :type: str - """ # noqa: E501 - self._last_run_status = last_run_status - - @property - def last_run_error(self): - """Get the last_run_error of this Task. - - :return: The last_run_error of this Task. - :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 Task. - - :param last_run_error: The last_run_error of this Task. - :type: str - """ # noqa: E501 - self._last_run_error = last_run_error - - @property - def created_at(self): - """Get the created_at of this Task. - - :return: The created_at of this Task. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this Task. - - :param created_at: The created_at of this Task. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this Task. - - :return: The updated_at of this Task. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this Task. - - :param updated_at: The updated_at of this Task. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - @property - def links(self): - """Get the links of this Task. - - :return: The links of this Task. - :rtype: TaskLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Task. - - :param links: The links of this Task. - :type: TaskLinks - """ # noqa: E501 - self._links = links - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Task): - 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/frogpilot/third_party/influxdb_client/domain/task_create_request.py b/frogpilot/third_party/influxdb_client/domain/task_create_request.py deleted file mode 100644 index 462c008f5..000000000 --- a/frogpilot/third_party/influxdb_client/domain/task_create_request.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TaskCreateRequest(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'org_id': 'str', - 'org': 'str', - 'status': 'TaskStatusType', - 'flux': 'str', - 'description': 'str' - } - - attribute_map = { - 'org_id': 'orgID', - 'org': 'org', - 'status': 'status', - 'flux': 'flux', - 'description': 'description' - } - - 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._org_id = None - self._org = None - self._status = None - self._flux = None - self._description = None - self.discriminator = None - - if org_id is not None: - self.org_id = org_id - if org is not None: - self.org = org - if status is not None: - self.status = status - self.flux = flux - if description is not None: - self.description = description - - @property - def org_id(self): - """Get the org_id of this TaskCreateRequest. - - The ID of the organization that owns this Task. - - :return: The org_id of this TaskCreateRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TaskCreateRequest. - - The ID of the organization that owns this Task. - - :param org_id: The org_id of this TaskCreateRequest. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def org(self): - """Get the org of this TaskCreateRequest. - - The name of the organization that owns this Task. - - :return: The org of this TaskCreateRequest. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this TaskCreateRequest. - - The name of the organization that owns this Task. - - :param org: The org of this TaskCreateRequest. - :type: str - """ # noqa: E501 - self._org = org - - @property - def status(self): - """Get the status of this TaskCreateRequest. - - :return: The status of this TaskCreateRequest. - :rtype: TaskStatusType - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TaskCreateRequest. - - :param status: The status of this TaskCreateRequest. - :type: TaskStatusType - """ # noqa: E501 - self._status = status - - @property - def flux(self): - """Get the flux of this TaskCreateRequest. - - The Flux script to run for this task. - - :return: The flux of this TaskCreateRequest. - :rtype: str - """ # noqa: E501 - return self._flux - - @flux.setter - def flux(self, flux): - """Set the flux of this TaskCreateRequest. - - The Flux script to run for this task. - - :param flux: The flux of this TaskCreateRequest. - :type: str - """ # noqa: E501 - if flux is None: - raise ValueError("Invalid value for `flux`, must not be `None`") # noqa: E501 - self._flux = flux - - @property - def description(self): - """Get the description of this TaskCreateRequest. - - An optional description of the task. - - :return: The description of this TaskCreateRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TaskCreateRequest. - - An optional description of the task. - - :param description: The description of this TaskCreateRequest. - :type: str - """ # noqa: E501 - self._description = description - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TaskCreateRequest): - 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/frogpilot/third_party/influxdb_client/domain/task_links.py b/frogpilot/third_party/influxdb_client/domain/task_links.py deleted file mode 100644 index 86465f09e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/task_links.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TaskLinks(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 = { - '_self': 'str', - 'owners': 'str', - 'members': 'str', - 'runs': 'str', - 'logs': 'str', - 'labels': 'str' - } - - attribute_map = { - '_self': 'self', - 'owners': 'owners', - 'members': 'members', - 'runs': 'runs', - 'logs': 'logs', - 'labels': 'labels' - } - - def __init__(self, _self=None, owners=None, members=None, runs=None, logs=None, labels=None): # noqa: E501,D401,D403 - """TaskLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._owners = None - self._members = None - self._runs = None - self._logs = None - self._labels = None - self.discriminator = None - - if _self is not None: - self._self = _self - if owners is not None: - self.owners = owners - if members is not None: - self.members = members - if runs is not None: - self.runs = runs - if logs is not None: - self.logs = logs - if labels is not None: - self.labels = labels - - @property - def _self(self): - """Get the _self of this TaskLinks. - - URI of resource. - - :return: The _self of this TaskLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this TaskLinks. - - URI of resource. - - :param _self: The _self of this TaskLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def owners(self): - """Get the owners of this TaskLinks. - - URI of resource. - - :return: The owners of this TaskLinks. - :rtype: str - """ # noqa: E501 - return self._owners - - @owners.setter - def owners(self, owners): - """Set the owners of this TaskLinks. - - URI of resource. - - :param owners: The owners of this TaskLinks. - :type: str - """ # noqa: E501 - self._owners = owners - - @property - def members(self): - """Get the members of this TaskLinks. - - URI of resource. - - :return: The members of this TaskLinks. - :rtype: str - """ # noqa: E501 - return self._members - - @members.setter - def members(self, members): - """Set the members of this TaskLinks. - - URI of resource. - - :param members: The members of this TaskLinks. - :type: str - """ # noqa: E501 - self._members = members - - @property - def runs(self): - """Get the runs of this TaskLinks. - - URI of resource. - - :return: The runs of this TaskLinks. - :rtype: str - """ # noqa: E501 - return self._runs - - @runs.setter - def runs(self, runs): - """Set the runs of this TaskLinks. - - URI of resource. - - :param runs: The runs of this TaskLinks. - :type: str - """ # noqa: E501 - self._runs = runs - - @property - def logs(self): - """Get the logs of this TaskLinks. - - URI of resource. - - :return: The logs of this TaskLinks. - :rtype: str - """ # noqa: E501 - return self._logs - - @logs.setter - def logs(self, logs): - """Set the logs of this TaskLinks. - - URI of resource. - - :param logs: The logs of this TaskLinks. - :type: str - """ # noqa: E501 - self._logs = logs - - @property - def labels(self): - """Get the labels of this TaskLinks. - - URI of resource. - - :return: The labels of this TaskLinks. - :rtype: str - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this TaskLinks. - - URI of resource. - - :param labels: The labels of this TaskLinks. - :type: str - """ # noqa: E501 - self._labels = labels - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TaskLinks): - 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/frogpilot/third_party/influxdb_client/domain/task_status_type.py b/frogpilot/third_party/influxdb_client/domain/task_status_type.py deleted file mode 100644 index c775c39c0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/task_status_type.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TaskStatusType(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - ACTIVE = "active" - INACTIVE = "inactive" - - """ - 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 - """TaskStatusType - 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 self.openapi_types.items(): - 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, TaskStatusType): - 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/frogpilot/third_party/influxdb_client/domain/task_update_request.py b/frogpilot/third_party/influxdb_client/domain/task_update_request.py deleted file mode 100644 index 1755a43fc..000000000 --- a/frogpilot/third_party/influxdb_client/domain/task_update_request.py +++ /dev/null @@ -1,269 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TaskUpdateRequest(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 = { - 'status': 'TaskStatusType', - 'flux': 'str', - 'name': 'str', - 'every': 'str', - 'cron': 'str', - 'offset': 'str', - 'description': 'str' - } - - attribute_map = { - 'status': 'status', - 'flux': 'flux', - 'name': 'name', - 'every': 'every', - 'cron': 'cron', - 'offset': 'offset', - 'description': 'description' - } - - def __init__(self, status=None, flux=None, name=None, every=None, cron=None, offset=None, description=None): # noqa: E501,D401,D403 - """TaskUpdateRequest - a model defined in OpenAPI.""" # noqa: E501 - self._status = None - self._flux = None - self._name = None - self._every = None - self._cron = None - self._offset = None - self._description = None - self.discriminator = None - - if status is not None: - self.status = status - if flux is not None: - self.flux = flux - if name is not None: - self.name = name - if every is not None: - self.every = every - if cron is not None: - self.cron = cron - if offset is not None: - self.offset = offset - if description is not None: - self.description = description - - @property - def status(self): - """Get the status of this TaskUpdateRequest. - - :return: The status of this TaskUpdateRequest. - :rtype: TaskStatusType - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TaskUpdateRequest. - - :param status: The status of this TaskUpdateRequest. - :type: TaskStatusType - """ # noqa: E501 - self._status = status - - @property - def flux(self): - """Get the flux of this TaskUpdateRequest. - - The Flux script that the task runs. - - :return: The flux of this TaskUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._flux - - @flux.setter - def flux(self, flux): - """Set the flux of this TaskUpdateRequest. - - The Flux script that the task runs. - - :param flux: The flux of this TaskUpdateRequest. - :type: str - """ # noqa: E501 - self._flux = flux - - @property - def name(self): - """Get the name of this TaskUpdateRequest. - - Update the 'name' option in the flux script. - - :return: The name of this TaskUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TaskUpdateRequest. - - Update the 'name' option in the flux script. - - :param name: The name of this TaskUpdateRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def every(self): - """Get the every of this TaskUpdateRequest. - - Update the 'every' option in the flux script. - - :return: The every of this TaskUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this TaskUpdateRequest. - - Update the 'every' option in the flux script. - - :param every: The every of this TaskUpdateRequest. - :type: str - """ # noqa: E501 - self._every = every - - @property - def cron(self): - """Get the cron of this TaskUpdateRequest. - - Update the 'cron' option in the flux script. - - :return: The cron of this TaskUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._cron - - @cron.setter - def cron(self, cron): - """Set the cron of this TaskUpdateRequest. - - Update the 'cron' option in the flux script. - - :param cron: The cron of this TaskUpdateRequest. - :type: str - """ # noqa: E501 - self._cron = cron - - @property - def offset(self): - """Get the offset of this TaskUpdateRequest. - - Update the 'offset' option in the flux script. - - :return: The offset of this TaskUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._offset - - @offset.setter - def offset(self, offset): - """Set the offset of this TaskUpdateRequest. - - Update the 'offset' option in the flux script. - - :param offset: The offset of this TaskUpdateRequest. - :type: str - """ # noqa: E501 - self._offset = offset - - @property - def description(self): - """Get the description of this TaskUpdateRequest. - - Update the description of the task. - - :return: The description of this TaskUpdateRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TaskUpdateRequest. - - Update the description of the task. - - :param description: The description of this TaskUpdateRequest. - :type: str - """ # noqa: E501 - self._description = description - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TaskUpdateRequest): - 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/frogpilot/third_party/influxdb_client/domain/tasks.py b/frogpilot/third_party/influxdb_client/domain/tasks.py deleted file mode 100644 index 4174b04e2..000000000 --- a/frogpilot/third_party/influxdb_client/domain/tasks.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Tasks(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 = { - 'links': 'Links', - 'tasks': 'list[Task]' - } - - attribute_map = { - 'links': 'links', - 'tasks': 'tasks' - } - - def __init__(self, links=None, tasks=None): # noqa: E501,D401,D403 - """Tasks - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._tasks = None - self.discriminator = None - - if links is not None: - self.links = links - if tasks is not None: - self.tasks = tasks - - @property - def links(self): - """Get the links of this Tasks. - - :return: The links of this Tasks. - :rtype: Links - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Tasks. - - :param links: The links of this Tasks. - :type: Links - """ # noqa: E501 - self._links = links - - @property - def tasks(self): - """Get the tasks of this Tasks. - - :return: The tasks of this Tasks. - :rtype: list[Task] - """ # noqa: E501 - return self._tasks - - @tasks.setter - def tasks(self, tasks): - """Set the tasks of this Tasks. - - :param tasks: The tasks of this Tasks. - :type: list[Task] - """ # noqa: E501 - self._tasks = tasks - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Tasks): - 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/frogpilot/third_party/influxdb_client/domain/telegraf.py b/frogpilot/third_party/influxdb_client/domain/telegraf.py deleted file mode 100644 index 05e2a412b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegraf.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.telegraf_request import TelegrafRequest - - -class Telegraf(TelegrafRequest): - """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', - 'links': 'object', - 'labels': 'list[Label]', - 'name': 'str', - 'description': 'str', - 'metadata': 'TelegrafRequestMetadata', - 'config': 'str', - 'org_id': 'str' - } - - attribute_map = { - 'id': 'id', - 'links': 'links', - 'labels': 'labels', - 'name': 'name', - 'description': 'description', - 'metadata': 'metadata', - 'config': 'config', - 'org_id': 'orgID' - } - - def __init__(self, id=None, links=None, labels=None, name=None, description=None, metadata=None, config=None, org_id=None): # noqa: E501,D401,D403 - """Telegraf - a model defined in OpenAPI.""" # noqa: E501 - TelegrafRequest.__init__(self, name=name, description=description, metadata=metadata, config=config, org_id=org_id) # noqa: E501 - - self._id = None - self._links = None - self._labels = None - self.discriminator = None - - if id is not None: - self.id = id - if links is not None: - self.links = links - if labels is not None: - self.labels = labels - - @property - def id(self): - """Get the id of this Telegraf. - - :return: The id of this Telegraf. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Telegraf. - - :param id: The id of this Telegraf. - :type: str - """ # noqa: E501 - self._id = id - - @property - def links(self): - """Get the links of this Telegraf. - - :return: The links of this Telegraf. - :rtype: object - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Telegraf. - - :param links: The links of this Telegraf. - :type: object - """ # noqa: E501 - self._links = links - - @property - def labels(self): - """Get the labels of this Telegraf. - - :return: The labels of this Telegraf. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this Telegraf. - - :param labels: The labels of this Telegraf. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Telegraf): - 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/frogpilot/third_party/influxdb_client/domain/telegraf_plugin.py b/frogpilot/third_party/influxdb_client/domain/telegraf_plugin.py deleted file mode 100644 index a01c2ef71..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegraf_plugin.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TelegrafPlugin(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', - 'name': 'str', - 'description': 'str', - 'config': 'dict(str, object)' - } - - attribute_map = { - 'type': 'type', - 'name': 'name', - 'description': 'description', - 'config': 'config' - } - - def __init__(self, type=None, name=None, description=None, config=None): # noqa: E501,D401,D403 - """TelegrafPlugin - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._name = None - self._description = None - self._config = None - self.discriminator = None - - if type is not None: - self.type = type - if name is not None: - self.name = name - if description is not None: - self.description = description - if config is not None: - self.config = config - - @property - def type(self): - """Get the type of this TelegrafPlugin. - - :return: The type of this TelegrafPlugin. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this TelegrafPlugin. - - :param type: The type of this TelegrafPlugin. - :type: str - """ # noqa: E501 - self._type = type - - @property - def name(self): - """Get the name of this TelegrafPlugin. - - :return: The name of this TelegrafPlugin. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TelegrafPlugin. - - :param name: The name of this TelegrafPlugin. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TelegrafPlugin. - - :return: The description of this TelegrafPlugin. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TelegrafPlugin. - - :param description: The description of this TelegrafPlugin. - :type: str - """ # noqa: E501 - self._description = description - - @property - def config(self): - """Get the config of this TelegrafPlugin. - - :return: The config of this TelegrafPlugin. - :rtype: dict(str, object) - """ # noqa: E501 - return self._config - - @config.setter - def config(self, config): - """Set the config of this TelegrafPlugin. - - :param config: The config of this TelegrafPlugin. - :type: dict(str, object) - """ # noqa: E501 - self._config = config - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TelegrafPlugin): - 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/frogpilot/third_party/influxdb_client/domain/telegraf_plugin_request.py b/frogpilot/third_party/influxdb_client/domain/telegraf_plugin_request.py deleted file mode 100644 index 79287c334..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegraf_plugin_request.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TelegrafPluginRequest(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', - 'plugins': 'list[TelegrafPluginRequestPlugins]', - 'metadata': 'TelegrafRequestMetadata', - 'config': 'str', - 'org_id': 'str' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'plugins': 'plugins', - 'metadata': 'metadata', - 'config': 'config', - 'org_id': 'orgID' - } - - def __init__(self, name=None, description=None, plugins=None, metadata=None, config=None, org_id=None): # noqa: E501,D401,D403 - """TelegrafPluginRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._plugins = None - self._metadata = None - self._config = None - self._org_id = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if plugins is not None: - self.plugins = plugins - if metadata is not None: - self.metadata = metadata - if config is not None: - self.config = config - if org_id is not None: - self.org_id = org_id - - @property - def name(self): - """Get the name of this TelegrafPluginRequest. - - :return: The name of this TelegrafPluginRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TelegrafPluginRequest. - - :param name: The name of this TelegrafPluginRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TelegrafPluginRequest. - - :return: The description of this TelegrafPluginRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TelegrafPluginRequest. - - :param description: The description of this TelegrafPluginRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def plugins(self): - """Get the plugins of this TelegrafPluginRequest. - - :return: The plugins of this TelegrafPluginRequest. - :rtype: list[TelegrafPluginRequestPlugins] - """ # noqa: E501 - return self._plugins - - @plugins.setter - def plugins(self, plugins): - """Set the plugins of this TelegrafPluginRequest. - - :param plugins: The plugins of this TelegrafPluginRequest. - :type: list[TelegrafPluginRequestPlugins] - """ # noqa: E501 - self._plugins = plugins - - @property - def metadata(self): - """Get the metadata of this TelegrafPluginRequest. - - :return: The metadata of this TelegrafPluginRequest. - :rtype: TelegrafRequestMetadata - """ # noqa: E501 - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Set the metadata of this TelegrafPluginRequest. - - :param metadata: The metadata of this TelegrafPluginRequest. - :type: TelegrafRequestMetadata - """ # noqa: E501 - self._metadata = metadata - - @property - def config(self): - """Get the config of this TelegrafPluginRequest. - - :return: The config of this TelegrafPluginRequest. - :rtype: str - """ # noqa: E501 - return self._config - - @config.setter - def config(self, config): - """Set the config of this TelegrafPluginRequest. - - :param config: The config of this TelegrafPluginRequest. - :type: str - """ # noqa: E501 - self._config = config - - @property - def org_id(self): - """Get the org_id of this TelegrafPluginRequest. - - :return: The org_id of this TelegrafPluginRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TelegrafPluginRequest. - - :param org_id: The org_id of this TelegrafPluginRequest. - :type: str - """ # noqa: E501 - self._org_id = org_id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TelegrafPluginRequest): - 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/frogpilot/third_party/influxdb_client/domain/telegraf_plugin_request_plugins.py b/frogpilot/third_party/influxdb_client/domain/telegraf_plugin_request_plugins.py deleted file mode 100644 index 1ccf0dbf8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegraf_plugin_request_plugins.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TelegrafPluginRequestPlugins(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', - 'name': 'str', - 'alias': 'str', - 'description': 'str', - 'config': 'dict(str, object)' - } - - attribute_map = { - 'type': 'type', - 'name': 'name', - 'alias': 'alias', - 'description': 'description', - 'config': 'config' - } - - def __init__(self, type=None, name=None, alias=None, description=None, config=None): # noqa: E501,D401,D403 - """TelegrafPluginRequestPlugins - a model defined in OpenAPI.""" # noqa: E501 - self._type = None - self._name = None - self._alias = None - self._description = None - self._config = None - self.discriminator = None - - if type is not None: - self.type = type - if name is not None: - self.name = name - if alias is not None: - self.alias = alias - if description is not None: - self.description = description - if config is not None: - self.config = config - - @property - def type(self): - """Get the type of this TelegrafPluginRequestPlugins. - - :return: The type of this TelegrafPluginRequestPlugins. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this TelegrafPluginRequestPlugins. - - :param type: The type of this TelegrafPluginRequestPlugins. - :type: str - """ # noqa: E501 - self._type = type - - @property - def name(self): - """Get the name of this TelegrafPluginRequestPlugins. - - :return: The name of this TelegrafPluginRequestPlugins. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TelegrafPluginRequestPlugins. - - :param name: The name of this TelegrafPluginRequestPlugins. - :type: str - """ # noqa: E501 - self._name = name - - @property - def alias(self): - """Get the alias of this TelegrafPluginRequestPlugins. - - :return: The alias of this TelegrafPluginRequestPlugins. - :rtype: str - """ # noqa: E501 - return self._alias - - @alias.setter - def alias(self, alias): - """Set the alias of this TelegrafPluginRequestPlugins. - - :param alias: The alias of this TelegrafPluginRequestPlugins. - :type: str - """ # noqa: E501 - self._alias = alias - - @property - def description(self): - """Get the description of this TelegrafPluginRequestPlugins. - - :return: The description of this TelegrafPluginRequestPlugins. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TelegrafPluginRequestPlugins. - - :param description: The description of this TelegrafPluginRequestPlugins. - :type: str - """ # noqa: E501 - self._description = description - - @property - def config(self): - """Get the config of this TelegrafPluginRequestPlugins. - - :return: The config of this TelegrafPluginRequestPlugins. - :rtype: dict(str, object) - """ # noqa: E501 - return self._config - - @config.setter - def config(self, config): - """Set the config of this TelegrafPluginRequestPlugins. - - :param config: The config of this TelegrafPluginRequestPlugins. - :type: dict(str, object) - """ # noqa: E501 - self._config = config - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TelegrafPluginRequestPlugins): - 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/frogpilot/third_party/influxdb_client/domain/telegraf_plugins.py b/frogpilot/third_party/influxdb_client/domain/telegraf_plugins.py deleted file mode 100644 index 80a1842eb..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegraf_plugins.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/telegraf_request.py b/frogpilot/third_party/influxdb_client/domain/telegraf_request.py deleted file mode 100644 index 898deb88e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegraf_request.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TelegrafRequest(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', - 'metadata': 'TelegrafRequestMetadata', - 'config': 'str', - 'org_id': 'str' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'metadata': 'metadata', - 'config': 'config', - 'org_id': 'orgID' - } - - def __init__(self, name=None, description=None, metadata=None, config=None, org_id=None): # noqa: E501,D401,D403 - """TelegrafRequest - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._metadata = None - self._config = None - self._org_id = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if metadata is not None: - self.metadata = metadata - if config is not None: - self.config = config - if org_id is not None: - self.org_id = org_id - - @property - def name(self): - """Get the name of this TelegrafRequest. - - :return: The name of this TelegrafRequest. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TelegrafRequest. - - :param name: The name of this TelegrafRequest. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TelegrafRequest. - - :return: The description of this TelegrafRequest. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TelegrafRequest. - - :param description: The description of this TelegrafRequest. - :type: str - """ # noqa: E501 - self._description = description - - @property - def metadata(self): - """Get the metadata of this TelegrafRequest. - - :return: The metadata of this TelegrafRequest. - :rtype: TelegrafRequestMetadata - """ # noqa: E501 - return self._metadata - - @metadata.setter - def metadata(self, metadata): - """Set the metadata of this TelegrafRequest. - - :param metadata: The metadata of this TelegrafRequest. - :type: TelegrafRequestMetadata - """ # noqa: E501 - self._metadata = metadata - - @property - def config(self): - """Get the config of this TelegrafRequest. - - :return: The config of this TelegrafRequest. - :rtype: str - """ # noqa: E501 - return self._config - - @config.setter - def config(self, config): - """Set the config of this TelegrafRequest. - - :param config: The config of this TelegrafRequest. - :type: str - """ # noqa: E501 - self._config = config - - @property - def org_id(self): - """Get the org_id of this TelegrafRequest. - - :return: The org_id of this TelegrafRequest. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TelegrafRequest. - - :param org_id: The org_id of this TelegrafRequest. - :type: str - """ # noqa: E501 - self._org_id = org_id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TelegrafRequest): - 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/frogpilot/third_party/influxdb_client/domain/telegraf_request_metadata.py b/frogpilot/third_party/influxdb_client/domain/telegraf_request_metadata.py deleted file mode 100644 index e7a9f813d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegraf_request_metadata.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TelegrafRequestMetadata(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'buckets': 'list[str]' - } - - attribute_map = { - 'buckets': 'buckets' - } - - def __init__(self, buckets=None): # noqa: E501,D401,D403 - """TelegrafRequestMetadata - a model defined in OpenAPI.""" # noqa: E501 - self._buckets = None - self.discriminator = None - - if buckets is not None: - self.buckets = buckets - - @property - def buckets(self): - """Get the buckets of this TelegrafRequestMetadata. - - :return: The buckets of this TelegrafRequestMetadata. - :rtype: list[str] - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this TelegrafRequestMetadata. - - :param buckets: The buckets of this TelegrafRequestMetadata. - :type: list[str] - """ # noqa: E501 - self._buckets = buckets - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TelegrafRequestMetadata): - 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/frogpilot/third_party/influxdb_client/domain/telegrafs.py b/frogpilot/third_party/influxdb_client/domain/telegrafs.py deleted file mode 100644 index 17d7760e0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegrafs.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Telegrafs(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 = { - 'configurations': 'list[Telegraf]' - } - - attribute_map = { - 'configurations': 'configurations' - } - - def __init__(self, configurations=None): # noqa: E501,D401,D403 - """Telegrafs - a model defined in OpenAPI.""" # noqa: E501 - self._configurations = None - self.discriminator = None - - if configurations is not None: - self.configurations = configurations - - @property - def configurations(self): - """Get the configurations of this Telegrafs. - - :return: The configurations of this Telegrafs. - :rtype: list[Telegraf] - """ # noqa: E501 - return self._configurations - - @configurations.setter - def configurations(self, configurations): - """Set the configurations of this Telegrafs. - - :param configurations: The configurations of this Telegrafs. - :type: list[Telegraf] - """ # noqa: E501 - self._configurations = configurations - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Telegrafs): - 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/frogpilot/third_party/influxdb_client/domain/telegram_notification_endpoint.py b/frogpilot/third_party/influxdb_client/domain/telegram_notification_endpoint.py deleted file mode 100644 index 44c22dff4..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegram_notification_endpoint.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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. - - The 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. - - The 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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/telegram_notification_rule.py b/frogpilot/third_party/influxdb_client/domain/telegram_notification_rule.py deleted file mode 100644 index 2238909cb..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegram_notification_rule.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/telegram_notification_rule_base.py b/frogpilot/third_party/influxdb_client/domain/telegram_notification_rule_base.py deleted file mode 100644 index 8d3aeb1b3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/telegram_notification_rule_base.py +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/template_apply.py b/frogpilot/third_party/influxdb_client/domain/template_apply.py deleted file mode 100644 index 6f8d5e404..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_apply.py +++ /dev/null @@ -1,323 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateApply(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 = { - 'dry_run': 'bool', - 'org_id': 'str', - 'stack_id': 'str', - 'template': 'TemplateApplyTemplate', - 'templates': 'list[TemplateApplyTemplate]', - 'env_refs': 'dict(str, object)', - 'secrets': 'dict(str, str)', - 'remotes': 'list[TemplateApplyRemotes]', - 'actions': 'list[object]' - } - - attribute_map = { - 'dry_run': 'dryRun', - 'org_id': 'orgID', - 'stack_id': 'stackID', - 'template': 'template', - 'templates': 'templates', - 'env_refs': 'envRefs', - 'secrets': 'secrets', - 'remotes': 'remotes', - 'actions': 'actions' - } - - def __init__(self, dry_run=None, org_id=None, stack_id=None, template=None, templates=None, env_refs=None, secrets=None, remotes=None, actions=None): # noqa: E501,D401,D403 - """TemplateApply - a model defined in OpenAPI.""" # noqa: E501 - self._dry_run = None - self._org_id = None - self._stack_id = None - self._template = None - self._templates = None - self._env_refs = None - self._secrets = None - self._remotes = None - self._actions = None - self.discriminator = None - - if dry_run is not None: - self.dry_run = dry_run - if org_id is not None: - self.org_id = org_id - if stack_id is not None: - self.stack_id = stack_id - if template is not None: - self.template = template - if templates is not None: - self.templates = templates - if env_refs is not None: - self.env_refs = env_refs - if secrets is not None: - self.secrets = secrets - if remotes is not None: - self.remotes = remotes - if actions is not None: - self.actions = actions - - @property - def dry_run(self): - """Get the dry_run of this TemplateApply. - - Only applies a dry run of the templates passed in the request. - Validates the template and generates a resource diff and summary. - Doesn't install templates or make changes to the InfluxDB instance. - - :return: The dry_run of this TemplateApply. - :rtype: bool - """ # noqa: E501 - return self._dry_run - - @dry_run.setter - def dry_run(self, dry_run): - """Set the dry_run of this TemplateApply. - - Only applies a dry run of the templates passed in the request. - Validates the template and generates a resource diff and summary. - Doesn't install templates or make changes to the InfluxDB instance. - - :param dry_run: The dry_run of this TemplateApply. - :type: bool - """ # noqa: E501 - self._dry_run = dry_run - - @property - def org_id(self): - """Get the org_id of this TemplateApply. - - Organization ID. InfluxDB applies templates to this organization. The organization owns all resources created by the template. To find your organization, see how to [view organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/). - - :return: The org_id of this TemplateApply. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TemplateApply. - - Organization ID. InfluxDB applies templates to this organization. The organization owns all resources created by the template. To find your organization, see how to [view organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/). - - :param org_id: The org_id of this TemplateApply. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def stack_id(self): - """Get the stack_id of this TemplateApply. - - ID of the stack to update. To apply templates to an existing stack in the organization, use the `stackID` parameter. If you apply templates without providing a stack ID, InfluxDB initializes a new stack with all new resources. To find a stack ID, use the InfluxDB [`/api/v2/stacks` API endpoint](#operation/ListStacks) to list stacks. #### Related guides - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) - [View stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/view/) - - :return: The stack_id of this TemplateApply. - :rtype: str - """ # noqa: E501 - return self._stack_id - - @stack_id.setter - def stack_id(self, stack_id): - """Set the stack_id of this TemplateApply. - - ID of the stack to update. To apply templates to an existing stack in the organization, use the `stackID` parameter. If you apply templates without providing a stack ID, InfluxDB initializes a new stack with all new resources. To find a stack ID, use the InfluxDB [`/api/v2/stacks` API endpoint](#operation/ListStacks) to list stacks. #### Related guides - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) - [View stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/view/) - - :param stack_id: The stack_id of this TemplateApply. - :type: str - """ # noqa: E501 - self._stack_id = stack_id - - @property - def template(self): - """Get the template of this TemplateApply. - - :return: The template of this TemplateApply. - :rtype: TemplateApplyTemplate - """ # noqa: E501 - return self._template - - @template.setter - def template(self, template): - """Set the template of this TemplateApply. - - :param template: The template of this TemplateApply. - :type: TemplateApplyTemplate - """ # noqa: E501 - self._template = template - - @property - def templates(self): - """Get the templates of this TemplateApply. - - A list of template objects to apply. A template object has a `contents` property with an array of InfluxDB resource configurations. Use the `templates` parameter to apply multiple template objects. If you use `templates`, you can't use the `template` parameter. - - :return: The templates of this TemplateApply. - :rtype: list[TemplateApplyTemplate] - """ # noqa: E501 - return self._templates - - @templates.setter - def templates(self, templates): - """Set the templates of this TemplateApply. - - A list of template objects to apply. A template object has a `contents` property with an array of InfluxDB resource configurations. Use the `templates` parameter to apply multiple template objects. If you use `templates`, you can't use the `template` parameter. - - :param templates: The templates of this TemplateApply. - :type: list[TemplateApplyTemplate] - """ # noqa: E501 - self._templates = templates - - @property - def env_refs(self): - """Get the env_refs of this TemplateApply. - - An object with key-value pairs that map to **environment references** in templates. Environment references in templates are `envRef` objects with an `envRef.key` property. To substitute a custom environment reference value when applying templates, pass `envRefs` with the `envRef.key` and the value. When you apply a template, InfluxDB replaces `envRef` objects in the template with the values that you provide in the `envRefs` parameter. For more examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). The following template fields may use environment references: - `metadata.name` - `spec.endpointName` - `spec.associations.name` For more information about including environment references in template fields, see how to [include user-definable resource names](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names). - - :return: The env_refs of this TemplateApply. - :rtype: dict(str, object) - """ # noqa: E501 - return self._env_refs - - @env_refs.setter - def env_refs(self, env_refs): - """Set the env_refs of this TemplateApply. - - An object with key-value pairs that map to **environment references** in templates. Environment references in templates are `envRef` objects with an `envRef.key` property. To substitute a custom environment reference value when applying templates, pass `envRefs` with the `envRef.key` and the value. When you apply a template, InfluxDB replaces `envRef` objects in the template with the values that you provide in the `envRefs` parameter. For more examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). The following template fields may use environment references: - `metadata.name` - `spec.endpointName` - `spec.associations.name` For more information about including environment references in template fields, see how to [include user-definable resource names](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names). - - :param env_refs: The env_refs of this TemplateApply. - :type: dict(str, object) - """ # noqa: E501 - self._env_refs = env_refs - - @property - def secrets(self): - """Get the secrets of this TemplateApply. - - An object with key-value pairs that map to **secrets** in queries. Queries may reference secrets stored in InfluxDB--for example, the following Flux script retrieves `POSTGRES_USERNAME` and `POSTGRES_PASSWORD` secrets and then uses them to connect to a PostgreSQL database: ```js import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USERNAME") password = secrets.get(key: "POSTGRES_PASSWORD") sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost:5432", query: "SELECT * FROM example_table", ) ``` To define secret values in your `/api/v2/templates/apply` request, pass the `secrets` parameter with key-value pairs--for example: ```json { ... "secrets": { "POSTGRES_USERNAME": "pguser", "POSTGRES_PASSWORD": "foo" } ... } ``` InfluxDB stores the key-value pairs as secrets that you can access with `secrets.get()`. Once stored, you can't view secret values in InfluxDB. #### Related guides - [How to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template) - - :return: The secrets of this TemplateApply. - :rtype: dict(str, str) - """ # noqa: E501 - return self._secrets - - @secrets.setter - def secrets(self, secrets): - """Set the secrets of this TemplateApply. - - An object with key-value pairs that map to **secrets** in queries. Queries may reference secrets stored in InfluxDB--for example, the following Flux script retrieves `POSTGRES_USERNAME` and `POSTGRES_PASSWORD` secrets and then uses them to connect to a PostgreSQL database: ```js import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USERNAME") password = secrets.get(key: "POSTGRES_PASSWORD") sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost:5432", query: "SELECT * FROM example_table", ) ``` To define secret values in your `/api/v2/templates/apply` request, pass the `secrets` parameter with key-value pairs--for example: ```json { ... "secrets": { "POSTGRES_USERNAME": "pguser", "POSTGRES_PASSWORD": "foo" } ... } ``` InfluxDB stores the key-value pairs as secrets that you can access with `secrets.get()`. Once stored, you can't view secret values in InfluxDB. #### Related guides - [How to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template) - - :param secrets: The secrets of this TemplateApply. - :type: dict(str, str) - """ # noqa: E501 - self._secrets = secrets - - @property - def remotes(self): - """Get the remotes of this TemplateApply. - - A list of URLs for template files. To apply a template manifest file located at a URL, pass `remotes` with an array that contains the URL. - - :return: The remotes of this TemplateApply. - :rtype: list[TemplateApplyRemotes] - """ # noqa: E501 - return self._remotes - - @remotes.setter - def remotes(self, remotes): - """Set the remotes of this TemplateApply. - - A list of URLs for template files. To apply a template manifest file located at a URL, pass `remotes` with an array that contains the URL. - - :param remotes: The remotes of this TemplateApply. - :type: list[TemplateApplyRemotes] - """ # noqa: E501 - self._remotes = remotes - - @property - def actions(self): - """Get the actions of this TemplateApply. - - A list of `action` objects. Actions let you customize how InfluxDB applies templates in the request. You can use the following actions to prevent creating or updating resources: - A `skipKind` action skips template resources of a specified `kind`. - A `skipResource` action skips template resources with a specified `metadata.name` and `kind`. - - :return: The actions of this TemplateApply. - :rtype: list[object] - """ # noqa: E501 - return self._actions - - @actions.setter - def actions(self, actions): - """Set the actions of this TemplateApply. - - A list of `action` objects. Actions let you customize how InfluxDB applies templates in the request. You can use the following actions to prevent creating or updating resources: - A `skipKind` action skips template resources of a specified `kind`. - A `skipResource` action skips template resources with a specified `metadata.name` and `kind`. - - :param actions: The actions of this TemplateApply. - :type: list[object] - """ # noqa: E501 - self._actions = actions - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateApply): - 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/frogpilot/third_party/influxdb_client/domain/template_apply_remotes.py b/frogpilot/third_party/influxdb_client/domain/template_apply_remotes.py deleted file mode 100644 index bdb835bc0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_apply_remotes.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateApplyRemotes(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 = { - 'url': 'str', - 'content_type': 'str' - } - - attribute_map = { - 'url': 'url', - 'content_type': 'contentType' - } - - def __init__(self, url=None, content_type=None): # noqa: E501,D401,D403 - """TemplateApplyRemotes - a model defined in OpenAPI.""" # noqa: E501 - self._url = None - self._content_type = None - self.discriminator = None - - self.url = url - if content_type is not None: - self.content_type = content_type - - @property - def url(self): - """Get the url of this TemplateApplyRemotes. - - :return: The url of this TemplateApplyRemotes. - :rtype: str - """ # noqa: E501 - return self._url - - @url.setter - def url(self, url): - """Set the url of this TemplateApplyRemotes. - - :param url: The url of this TemplateApplyRemotes. - :type: str - """ # noqa: E501 - if url is None: - raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 - self._url = url - - @property - def content_type(self): - """Get the content_type of this TemplateApplyRemotes. - - :return: The content_type of this TemplateApplyRemotes. - :rtype: str - """ # noqa: E501 - return self._content_type - - @content_type.setter - def content_type(self, content_type): - """Set the content_type of this TemplateApplyRemotes. - - :param content_type: The content_type of this TemplateApplyRemotes. - :type: str - """ # noqa: E501 - self._content_type = content_type - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateApplyRemotes): - 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/frogpilot/third_party/influxdb_client/domain/template_apply_template.py b/frogpilot/third_party/influxdb_client/domain/template_apply_template.py deleted file mode 100644 index 0fee8e97c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_apply_template.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateApplyTemplate(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 = { - 'content_type': 'str', - 'sources': 'list[str]', - 'contents': 'list[object]' - } - - attribute_map = { - 'content_type': 'contentType', - 'sources': 'sources', - 'contents': 'contents' - } - - def __init__(self, content_type=None, sources=None, contents=None): # noqa: E501,D401,D403 - """TemplateApplyTemplate - a model defined in OpenAPI.""" # noqa: E501 - self._content_type = None - self._sources = None - self._contents = None - self.discriminator = None - - if content_type is not None: - self.content_type = content_type - if sources is not None: - self.sources = sources - if contents is not None: - self.contents = contents - - @property - def content_type(self): - """Get the content_type of this TemplateApplyTemplate. - - :return: The content_type of this TemplateApplyTemplate. - :rtype: str - """ # noqa: E501 - return self._content_type - - @content_type.setter - def content_type(self, content_type): - """Set the content_type of this TemplateApplyTemplate. - - :param content_type: The content_type of this TemplateApplyTemplate. - :type: str - """ # noqa: E501 - self._content_type = content_type - - @property - def sources(self): - """Get the sources of this TemplateApplyTemplate. - - :return: The sources of this TemplateApplyTemplate. - :rtype: list[str] - """ # noqa: E501 - return self._sources - - @sources.setter - def sources(self, sources): - """Set the sources of this TemplateApplyTemplate. - - :param sources: The sources of this TemplateApplyTemplate. - :type: list[str] - """ # noqa: E501 - self._sources = sources - - @property - def contents(self): - """Get the contents of this TemplateApplyTemplate. - - :return: The contents of this TemplateApplyTemplate. - :rtype: list[object] - """ # noqa: E501 - return self._contents - - @contents.setter - def contents(self, contents): - """Set the contents of this TemplateApplyTemplate. - - :param contents: The contents of this TemplateApplyTemplate. - :type: list[object] - """ # noqa: E501 - self._contents = contents - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateApplyTemplate): - 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/frogpilot/third_party/influxdb_client/domain/template_chart.py b/frogpilot/third_party/influxdb_client/domain/template_chart.py deleted file mode 100644 index 7ae7b357a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_chart.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateChart(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'x_pos': 'int', - 'y_pos': 'int', - 'height': 'int', - 'width': 'int', - 'properties': 'ViewProperties' - } - - attribute_map = { - 'x_pos': 'xPos', - 'y_pos': 'yPos', - 'height': 'height', - 'width': 'width', - 'properties': 'properties' - } - - def __init__(self, x_pos=None, y_pos=None, height=None, width=None, properties=None): # noqa: E501,D401,D403 - """TemplateChart - a model defined in OpenAPI.""" # noqa: E501 - self._x_pos = None - self._y_pos = None - self._height = None - self._width = None - self._properties = None - self.discriminator = None - - if x_pos is not None: - self.x_pos = x_pos - if y_pos is not None: - self.y_pos = y_pos - if height is not None: - self.height = height - if width is not None: - self.width = width - if properties is not None: - self.properties = properties - - @property - def x_pos(self): - """Get the x_pos of this TemplateChart. - - :return: The x_pos of this TemplateChart. - :rtype: int - """ # noqa: E501 - return self._x_pos - - @x_pos.setter - def x_pos(self, x_pos): - """Set the x_pos of this TemplateChart. - - :param x_pos: The x_pos of this TemplateChart. - :type: int - """ # noqa: E501 - self._x_pos = x_pos - - @property - def y_pos(self): - """Get the y_pos of this TemplateChart. - - :return: The y_pos of this TemplateChart. - :rtype: int - """ # noqa: E501 - return self._y_pos - - @y_pos.setter - def y_pos(self, y_pos): - """Set the y_pos of this TemplateChart. - - :param y_pos: The y_pos of this TemplateChart. - :type: int - """ # noqa: E501 - self._y_pos = y_pos - - @property - def height(self): - """Get the height of this TemplateChart. - - :return: The height of this TemplateChart. - :rtype: int - """ # noqa: E501 - return self._height - - @height.setter - def height(self, height): - """Set the height of this TemplateChart. - - :param height: The height of this TemplateChart. - :type: int - """ # noqa: E501 - self._height = height - - @property - def width(self): - """Get the width of this TemplateChart. - - :return: The width of this TemplateChart. - :rtype: int - """ # noqa: E501 - return self._width - - @width.setter - def width(self, width): - """Set the width of this TemplateChart. - - :param width: The width of this TemplateChart. - :type: int - """ # noqa: E501 - self._width = width - - @property - def properties(self): - """Get the properties of this TemplateChart. - - :return: The properties of this TemplateChart. - :rtype: ViewProperties - """ # noqa: E501 - return self._properties - - @properties.setter - def properties(self, properties): - """Set the properties of this TemplateChart. - - :param properties: The properties of this TemplateChart. - :type: ViewProperties - """ # noqa: E501 - self._properties = properties - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateChart): - 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/frogpilot/third_party/influxdb_client/domain/template_export_by_id.py b/frogpilot/third_party/influxdb_client/domain/template_export_by_id.py deleted file mode 100644 index 7b5f21234..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_export_by_id.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateExportByID(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 = { - 'stack_id': 'str', - 'org_ids': 'list[TemplateExportByIDOrgIDs]', - 'resources': 'list[TemplateExportByIDResources]' - } - - attribute_map = { - 'stack_id': 'stackID', - 'org_ids': 'orgIDs', - 'resources': 'resources' - } - - def __init__(self, stack_id=None, org_ids=None, resources=None): # noqa: E501,D401,D403 - """TemplateExportByID - a model defined in OpenAPI.""" # noqa: E501 - self._stack_id = None - self._org_ids = None - self._resources = None - self.discriminator = None - - if stack_id is not None: - self.stack_id = stack_id - if org_ids is not None: - self.org_ids = org_ids - if resources is not None: - self.resources = resources - - @property - def stack_id(self): - """Get the stack_id of this TemplateExportByID. - - :return: The stack_id of this TemplateExportByID. - :rtype: str - """ # noqa: E501 - return self._stack_id - - @stack_id.setter - def stack_id(self, stack_id): - """Set the stack_id of this TemplateExportByID. - - :param stack_id: The stack_id of this TemplateExportByID. - :type: str - """ # noqa: E501 - self._stack_id = stack_id - - @property - def org_ids(self): - """Get the org_ids of this TemplateExportByID. - - :return: The org_ids of this TemplateExportByID. - :rtype: list[TemplateExportByIDOrgIDs] - """ # noqa: E501 - return self._org_ids - - @org_ids.setter - def org_ids(self, org_ids): - """Set the org_ids of this TemplateExportByID. - - :param org_ids: The org_ids of this TemplateExportByID. - :type: list[TemplateExportByIDOrgIDs] - """ # noqa: E501 - self._org_ids = org_ids - - @property - def resources(self): - """Get the resources of this TemplateExportByID. - - :return: The resources of this TemplateExportByID. - :rtype: list[TemplateExportByIDResources] - """ # noqa: E501 - return self._resources - - @resources.setter - def resources(self, resources): - """Set the resources of this TemplateExportByID. - - :param resources: The resources of this TemplateExportByID. - :type: list[TemplateExportByIDResources] - """ # noqa: E501 - self._resources = resources - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateExportByID): - 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/frogpilot/third_party/influxdb_client/domain/template_export_by_id_org_ids.py b/frogpilot/third_party/influxdb_client/domain/template_export_by_id_org_ids.py deleted file mode 100644 index f29886e50..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_export_by_id_org_ids.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateExportByIDOrgIDs(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'org_id': 'str', - 'resource_filters': 'TemplateExportByIDResourceFilters' - } - - attribute_map = { - 'org_id': 'orgID', - 'resource_filters': 'resourceFilters' - } - - def __init__(self, org_id=None, resource_filters=None): # noqa: E501,D401,D403 - """TemplateExportByIDOrgIDs - a model defined in OpenAPI.""" # noqa: E501 - self._org_id = None - self._resource_filters = None - self.discriminator = None - - if org_id is not None: - self.org_id = org_id - if resource_filters is not None: - self.resource_filters = resource_filters - - @property - def org_id(self): - """Get the org_id of this TemplateExportByIDOrgIDs. - - :return: The org_id of this TemplateExportByIDOrgIDs. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TemplateExportByIDOrgIDs. - - :param org_id: The org_id of this TemplateExportByIDOrgIDs. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def resource_filters(self): - """Get the resource_filters of this TemplateExportByIDOrgIDs. - - :return: The resource_filters of this TemplateExportByIDOrgIDs. - :rtype: TemplateExportByIDResourceFilters - """ # noqa: E501 - return self._resource_filters - - @resource_filters.setter - def resource_filters(self, resource_filters): - """Set the resource_filters of this TemplateExportByIDOrgIDs. - - :param resource_filters: The resource_filters of this TemplateExportByIDOrgIDs. - :type: TemplateExportByIDResourceFilters - """ # noqa: E501 - self._resource_filters = resource_filters - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateExportByIDOrgIDs): - 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/frogpilot/third_party/influxdb_client/domain/template_export_by_id_resource_filters.py b/frogpilot/third_party/influxdb_client/domain/template_export_by_id_resource_filters.py deleted file mode 100644 index 33cd9f769..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_export_by_id_resource_filters.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateExportByIDResourceFilters(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 = { - 'by_label': 'list[str]', - 'by_resource_kind': 'list[TemplateKind]' - } - - attribute_map = { - 'by_label': 'byLabel', - 'by_resource_kind': 'byResourceKind' - } - - def __init__(self, by_label=None, by_resource_kind=None): # noqa: E501,D401,D403 - """TemplateExportByIDResourceFilters - a model defined in OpenAPI.""" # noqa: E501 - self._by_label = None - self._by_resource_kind = None - self.discriminator = None - - if by_label is not None: - self.by_label = by_label - if by_resource_kind is not None: - self.by_resource_kind = by_resource_kind - - @property - def by_label(self): - """Get the by_label of this TemplateExportByIDResourceFilters. - - :return: The by_label of this TemplateExportByIDResourceFilters. - :rtype: list[str] - """ # noqa: E501 - return self._by_label - - @by_label.setter - def by_label(self, by_label): - """Set the by_label of this TemplateExportByIDResourceFilters. - - :param by_label: The by_label of this TemplateExportByIDResourceFilters. - :type: list[str] - """ # noqa: E501 - self._by_label = by_label - - @property - def by_resource_kind(self): - """Get the by_resource_kind of this TemplateExportByIDResourceFilters. - - :return: The by_resource_kind of this TemplateExportByIDResourceFilters. - :rtype: list[TemplateKind] - """ # noqa: E501 - return self._by_resource_kind - - @by_resource_kind.setter - def by_resource_kind(self, by_resource_kind): - """Set the by_resource_kind of this TemplateExportByIDResourceFilters. - - :param by_resource_kind: The by_resource_kind of this TemplateExportByIDResourceFilters. - :type: list[TemplateKind] - """ # noqa: E501 - self._by_resource_kind = by_resource_kind - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateExportByIDResourceFilters): - 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/frogpilot/third_party/influxdb_client/domain/template_export_by_id_resources.py b/frogpilot/third_party/influxdb_client/domain/template_export_by_id_resources.py deleted file mode 100644 index ddbc0b42a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_export_by_id_resources.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateExportByIDResources(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'kind': 'TemplateKind', - 'name': 'str' - } - - attribute_map = { - 'id': 'id', - 'kind': 'kind', - 'name': 'name' - } - - def __init__(self, id=None, kind=None, name=None): # noqa: E501,D401,D403 - """TemplateExportByIDResources - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._kind = None - self._name = None - self.discriminator = None - - self.id = id - self.kind = kind - if name is not None: - self.name = name - - @property - def id(self): - """Get the id of this TemplateExportByIDResources. - - :return: The id of this TemplateExportByIDResources. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateExportByIDResources. - - :param id: The id of this TemplateExportByIDResources. - :type: str - """ # noqa: E501 - if id is None: - raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 - self._id = id - - @property - def kind(self): - """Get the kind of this TemplateExportByIDResources. - - :return: The kind of this TemplateExportByIDResources. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateExportByIDResources. - - :param kind: The kind of this TemplateExportByIDResources. - :type: TemplateKind - """ # noqa: E501 - if kind is None: - raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 - self._kind = kind - - @property - def name(self): - """Get the name of this TemplateExportByIDResources. - - if defined with id, name is used for resource exported by id. if defined independently, resources strictly matching name are exported - - :return: The name of this TemplateExportByIDResources. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateExportByIDResources. - - if defined with id, name is used for resource exported by id. if defined independently, resources strictly matching name are exported - - :param name: The name of this TemplateExportByIDResources. - :type: str - """ # noqa: E501 - self._name = name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateExportByIDResources): - 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/frogpilot/third_party/influxdb_client/domain/template_export_by_name.py b/frogpilot/third_party/influxdb_client/domain/template_export_by_name.py deleted file mode 100644 index aa096dea9..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_export_by_name.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateExportByName(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 = { - 'stack_id': 'str', - 'org_ids': 'list[TemplateExportByIDOrgIDs]', - 'resources': 'list[TemplateExportByNameResources]' - } - - attribute_map = { - 'stack_id': 'stackID', - 'org_ids': 'orgIDs', - 'resources': 'resources' - } - - def __init__(self, stack_id=None, org_ids=None, resources=None): # noqa: E501,D401,D403 - """TemplateExportByName - a model defined in OpenAPI.""" # noqa: E501 - self._stack_id = None - self._org_ids = None - self._resources = None - self.discriminator = None - - if stack_id is not None: - self.stack_id = stack_id - if org_ids is not None: - self.org_ids = org_ids - if resources is not None: - self.resources = resources - - @property - def stack_id(self): - """Get the stack_id of this TemplateExportByName. - - :return: The stack_id of this TemplateExportByName. - :rtype: str - """ # noqa: E501 - return self._stack_id - - @stack_id.setter - def stack_id(self, stack_id): - """Set the stack_id of this TemplateExportByName. - - :param stack_id: The stack_id of this TemplateExportByName. - :type: str - """ # noqa: E501 - self._stack_id = stack_id - - @property - def org_ids(self): - """Get the org_ids of this TemplateExportByName. - - :return: The org_ids of this TemplateExportByName. - :rtype: list[TemplateExportByIDOrgIDs] - """ # noqa: E501 - return self._org_ids - - @org_ids.setter - def org_ids(self, org_ids): - """Set the org_ids of this TemplateExportByName. - - :param org_ids: The org_ids of this TemplateExportByName. - :type: list[TemplateExportByIDOrgIDs] - """ # noqa: E501 - self._org_ids = org_ids - - @property - def resources(self): - """Get the resources of this TemplateExportByName. - - :return: The resources of this TemplateExportByName. - :rtype: list[TemplateExportByNameResources] - """ # noqa: E501 - return self._resources - - @resources.setter - def resources(self, resources): - """Set the resources of this TemplateExportByName. - - :param resources: The resources of this TemplateExportByName. - :type: list[TemplateExportByNameResources] - """ # noqa: E501 - self._resources = resources - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateExportByName): - 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/frogpilot/third_party/influxdb_client/domain/template_export_by_name_resources.py b/frogpilot/third_party/influxdb_client/domain/template_export_by_name_resources.py deleted file mode 100644 index 35e955b39..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_export_by_name_resources.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateExportByNameResources(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'name': 'str' - } - - attribute_map = { - 'kind': 'kind', - 'name': 'name' - } - - def __init__(self, kind=None, name=None): # noqa: E501,D401,D403 - """TemplateExportByNameResources - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._name = None - self.discriminator = None - - self.kind = kind - self.name = name - - @property - def kind(self): - """Get the kind of this TemplateExportByNameResources. - - :return: The kind of this TemplateExportByNameResources. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateExportByNameResources. - - :param kind: The kind of this TemplateExportByNameResources. - :type: TemplateKind - """ # noqa: E501 - if kind is None: - raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 - self._kind = kind - - @property - def name(self): - """Get the name of this TemplateExportByNameResources. - - :return: The name of this TemplateExportByNameResources. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateExportByNameResources. - - :param name: The name of this TemplateExportByNameResources. - :type: str - """ # noqa: E501 - if name is None: - raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - self._name = name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateExportByNameResources): - 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/frogpilot/third_party/influxdb_client/domain/template_kind.py b/frogpilot/third_party/influxdb_client/domain/template_kind.py deleted file mode 100644 index 256408a54..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_kind.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateKind(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - BUCKET = "Bucket" - CHECK = "Check" - CHECKDEADMAN = "CheckDeadman" - CHECKTHRESHOLD = "CheckThreshold" - DASHBOARD = "Dashboard" - LABEL = "Label" - NOTIFICATIONENDPOINT = "NotificationEndpoint" - NOTIFICATIONENDPOINTHTTP = "NotificationEndpointHTTP" - NOTIFICATIONENDPOINTPAGERDUTY = "NotificationEndpointPagerDuty" - NOTIFICATIONENDPOINTSLACK = "NotificationEndpointSlack" - NOTIFICATIONRULE = "NotificationRule" - TASK = "Task" - TELEGRAF = "Telegraf" - VARIABLE = "Variable" - - """ - 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 - """TemplateKind - 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 self.openapi_types.items(): - 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, TemplateKind): - 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/frogpilot/third_party/influxdb_client/domain/template_summary.py b/frogpilot/third_party/influxdb_client/domain/template_summary.py deleted file mode 100644 index bdb2e20a3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummary(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 = { - 'sources': 'list[str]', - 'stack_id': 'str', - 'summary': 'TemplateSummarySummary', - 'diff': 'TemplateSummaryDiff', - 'errors': 'list[TemplateSummaryErrors]' - } - - attribute_map = { - 'sources': 'sources', - 'stack_id': 'stackID', - 'summary': 'summary', - 'diff': 'diff', - 'errors': 'errors' - } - - def __init__(self, sources=None, stack_id=None, summary=None, diff=None, errors=None): # noqa: E501,D401,D403 - """TemplateSummary - a model defined in OpenAPI.""" # noqa: E501 - self._sources = None - self._stack_id = None - self._summary = None - self._diff = None - self._errors = None - self.discriminator = None - - if sources is not None: - self.sources = sources - if stack_id is not None: - self.stack_id = stack_id - if summary is not None: - self.summary = summary - if diff is not None: - self.diff = diff - if errors is not None: - self.errors = errors - - @property - def sources(self): - """Get the sources of this TemplateSummary. - - :return: The sources of this TemplateSummary. - :rtype: list[str] - """ # noqa: E501 - return self._sources - - @sources.setter - def sources(self, sources): - """Set the sources of this TemplateSummary. - - :param sources: The sources of this TemplateSummary. - :type: list[str] - """ # noqa: E501 - self._sources = sources - - @property - def stack_id(self): - """Get the stack_id of this TemplateSummary. - - :return: The stack_id of this TemplateSummary. - :rtype: str - """ # noqa: E501 - return self._stack_id - - @stack_id.setter - def stack_id(self, stack_id): - """Set the stack_id of this TemplateSummary. - - :param stack_id: The stack_id of this TemplateSummary. - :type: str - """ # noqa: E501 - self._stack_id = stack_id - - @property - def summary(self): - """Get the summary of this TemplateSummary. - - :return: The summary of this TemplateSummary. - :rtype: TemplateSummarySummary - """ # noqa: E501 - return self._summary - - @summary.setter - def summary(self, summary): - """Set the summary of this TemplateSummary. - - :param summary: The summary of this TemplateSummary. - :type: TemplateSummarySummary - """ # noqa: E501 - self._summary = summary - - @property - def diff(self): - """Get the diff of this TemplateSummary. - - :return: The diff of this TemplateSummary. - :rtype: TemplateSummaryDiff - """ # noqa: E501 - return self._diff - - @diff.setter - def diff(self, diff): - """Set the diff of this TemplateSummary. - - :param diff: The diff of this TemplateSummary. - :type: TemplateSummaryDiff - """ # noqa: E501 - self._diff = diff - - @property - def errors(self): - """Get the errors of this TemplateSummary. - - :return: The errors of this TemplateSummary. - :rtype: list[TemplateSummaryErrors] - """ # noqa: E501 - return self._errors - - @errors.setter - def errors(self, errors): - """Set the errors of this TemplateSummary. - - :param errors: The errors of this TemplateSummary. - :type: list[TemplateSummaryErrors] - """ # noqa: E501 - self._errors = errors - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummary): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff.py deleted file mode 100644 index 468fd4f82..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff.py +++ /dev/null @@ -1,314 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiff(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'buckets': 'list[TemplateSummaryDiffBuckets]', - 'checks': 'list[TemplateSummaryDiffChecks]', - 'dashboards': 'list[TemplateSummaryDiffDashboards]', - 'labels': 'list[TemplateSummaryDiffLabels]', - 'label_mappings': 'list[TemplateSummaryDiffLabelMappings]', - 'notification_endpoints': 'list[TemplateSummaryDiffNotificationEndpoints]', - 'notification_rules': 'list[TemplateSummaryDiffNotificationRules]', - 'tasks': 'list[TemplateSummaryDiffTasks]', - 'telegraf_configs': 'list[TemplateSummaryDiffTelegrafConfigs]', - 'variables': 'list[TemplateSummaryDiffVariables]' - } - - attribute_map = { - 'buckets': 'buckets', - 'checks': 'checks', - 'dashboards': 'dashboards', - 'labels': 'labels', - 'label_mappings': 'labelMappings', - 'notification_endpoints': 'notificationEndpoints', - 'notification_rules': 'notificationRules', - 'tasks': 'tasks', - 'telegraf_configs': 'telegrafConfigs', - 'variables': 'variables' - } - - def __init__(self, buckets=None, checks=None, dashboards=None, labels=None, label_mappings=None, notification_endpoints=None, notification_rules=None, tasks=None, telegraf_configs=None, variables=None): # noqa: E501,D401,D403 - """TemplateSummaryDiff - a model defined in OpenAPI.""" # noqa: E501 - self._buckets = None - self._checks = None - self._dashboards = None - self._labels = None - self._label_mappings = None - self._notification_endpoints = None - self._notification_rules = None - self._tasks = None - self._telegraf_configs = None - self._variables = None - self.discriminator = None - - if buckets is not None: - self.buckets = buckets - if checks is not None: - self.checks = checks - if dashboards is not None: - self.dashboards = dashboards - if labels is not None: - self.labels = labels - if label_mappings is not None: - self.label_mappings = label_mappings - if notification_endpoints is not None: - self.notification_endpoints = notification_endpoints - if notification_rules is not None: - self.notification_rules = notification_rules - if tasks is not None: - self.tasks = tasks - if telegraf_configs is not None: - self.telegraf_configs = telegraf_configs - if variables is not None: - self.variables = variables - - @property - def buckets(self): - """Get the buckets of this TemplateSummaryDiff. - - :return: The buckets of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffBuckets] - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this TemplateSummaryDiff. - - :param buckets: The buckets of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffBuckets] - """ # noqa: E501 - self._buckets = buckets - - @property - def checks(self): - """Get the checks of this TemplateSummaryDiff. - - :return: The checks of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffChecks] - """ # noqa: E501 - return self._checks - - @checks.setter - def checks(self, checks): - """Set the checks of this TemplateSummaryDiff. - - :param checks: The checks of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffChecks] - """ # noqa: E501 - self._checks = checks - - @property - def dashboards(self): - """Get the dashboards of this TemplateSummaryDiff. - - :return: The dashboards of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffDashboards] - """ # noqa: E501 - return self._dashboards - - @dashboards.setter - def dashboards(self, dashboards): - """Set the dashboards of this TemplateSummaryDiff. - - :param dashboards: The dashboards of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffDashboards] - """ # noqa: E501 - self._dashboards = dashboards - - @property - def labels(self): - """Get the labels of this TemplateSummaryDiff. - - :return: The labels of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffLabels] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this TemplateSummaryDiff. - - :param labels: The labels of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffLabels] - """ # noqa: E501 - self._labels = labels - - @property - def label_mappings(self): - """Get the label_mappings of this TemplateSummaryDiff. - - :return: The label_mappings of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffLabelMappings] - """ # noqa: E501 - return self._label_mappings - - @label_mappings.setter - def label_mappings(self, label_mappings): - """Set the label_mappings of this TemplateSummaryDiff. - - :param label_mappings: The label_mappings of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffLabelMappings] - """ # noqa: E501 - self._label_mappings = label_mappings - - @property - def notification_endpoints(self): - """Get the notification_endpoints of this TemplateSummaryDiff. - - :return: The notification_endpoints of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffNotificationEndpoints] - """ # noqa: E501 - return self._notification_endpoints - - @notification_endpoints.setter - def notification_endpoints(self, notification_endpoints): - """Set the notification_endpoints of this TemplateSummaryDiff. - - :param notification_endpoints: The notification_endpoints of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffNotificationEndpoints] - """ # noqa: E501 - self._notification_endpoints = notification_endpoints - - @property - def notification_rules(self): - """Get the notification_rules of this TemplateSummaryDiff. - - :return: The notification_rules of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffNotificationRules] - """ # noqa: E501 - return self._notification_rules - - @notification_rules.setter - def notification_rules(self, notification_rules): - """Set the notification_rules of this TemplateSummaryDiff. - - :param notification_rules: The notification_rules of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffNotificationRules] - """ # noqa: E501 - self._notification_rules = notification_rules - - @property - def tasks(self): - """Get the tasks of this TemplateSummaryDiff. - - :return: The tasks of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffTasks] - """ # noqa: E501 - return self._tasks - - @tasks.setter - def tasks(self, tasks): - """Set the tasks of this TemplateSummaryDiff. - - :param tasks: The tasks of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffTasks] - """ # noqa: E501 - self._tasks = tasks - - @property - def telegraf_configs(self): - """Get the telegraf_configs of this TemplateSummaryDiff. - - :return: The telegraf_configs of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffTelegrafConfigs] - """ # noqa: E501 - return self._telegraf_configs - - @telegraf_configs.setter - def telegraf_configs(self, telegraf_configs): - """Set the telegraf_configs of this TemplateSummaryDiff. - - :param telegraf_configs: The telegraf_configs of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffTelegrafConfigs] - """ # noqa: E501 - self._telegraf_configs = telegraf_configs - - @property - def variables(self): - """Get the variables of this TemplateSummaryDiff. - - :return: The variables of this TemplateSummaryDiff. - :rtype: list[TemplateSummaryDiffVariables] - """ # noqa: E501 - return self._variables - - @variables.setter - def variables(self, variables): - """Set the variables of this TemplateSummaryDiff. - - :param variables: The variables of this TemplateSummaryDiff. - :type: list[TemplateSummaryDiffVariables] - """ # noqa: E501 - self._variables = variables - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiff): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_buckets.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_buckets.py deleted file mode 100644 index 48e1c0469..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_buckets.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffBuckets(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'state_status': 'str', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'TemplateSummaryDiffBucketsNewOld', - 'old': 'TemplateSummaryDiffBucketsNewOld' - } - - attribute_map = { - 'kind': 'kind', - 'state_status': 'stateStatus', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, kind=None, state_status=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffBuckets - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._state_status = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffBuckets. - - :return: The kind of this TemplateSummaryDiffBuckets. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffBuckets. - - :param kind: The kind of this TemplateSummaryDiffBuckets. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffBuckets. - - :return: The state_status of this TemplateSummaryDiffBuckets. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffBuckets. - - :param state_status: The state_status of this TemplateSummaryDiffBuckets. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffBuckets. - - :return: The id of this TemplateSummaryDiffBuckets. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffBuckets. - - :param id: The id of this TemplateSummaryDiffBuckets. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffBuckets. - - :return: The template_meta_name of this TemplateSummaryDiffBuckets. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffBuckets. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffBuckets. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffBuckets. - - :return: The new of this TemplateSummaryDiffBuckets. - :rtype: TemplateSummaryDiffBucketsNewOld - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffBuckets. - - :param new: The new of this TemplateSummaryDiffBuckets. - :type: TemplateSummaryDiffBucketsNewOld - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffBuckets. - - :return: The old of this TemplateSummaryDiffBuckets. - :rtype: TemplateSummaryDiffBucketsNewOld - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffBuckets. - - :param old: The old of this TemplateSummaryDiffBuckets. - :type: TemplateSummaryDiffBucketsNewOld - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffBuckets): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_buckets_new_old.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_buckets_new_old.py deleted file mode 100644 index 7caf27911..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_buckets_new_old.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffBucketsNewOld(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[BucketRetentionRules]' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'retention_rules': 'retentionRules' - } - - def __init__(self, name=None, description=None, retention_rules=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffBucketsNewOld - 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 TemplateSummaryDiffBucketsNewOld. - - :return: The name of this TemplateSummaryDiffBucketsNewOld. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummaryDiffBucketsNewOld. - - :param name: The name of this TemplateSummaryDiffBucketsNewOld. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummaryDiffBucketsNewOld. - - :return: The description of this TemplateSummaryDiffBucketsNewOld. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummaryDiffBucketsNewOld. - - :param description: The description of this TemplateSummaryDiffBucketsNewOld. - :type: str - """ # noqa: E501 - self._description = description - - @property - def retention_rules(self): - """Get the retention_rules of this TemplateSummaryDiffBucketsNewOld. - - Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. - - :return: The retention_rules of this TemplateSummaryDiffBucketsNewOld. - :rtype: list[BucketRetentionRules] - """ # noqa: E501 - return self._retention_rules - - @retention_rules.setter - def retention_rules(self, retention_rules): - """Set the retention_rules of this TemplateSummaryDiffBucketsNewOld. - - Retention rules to expire or retain data. The InfluxDB `/api/v2` API uses `RetentionRules` to configure the [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period). #### InfluxDB Cloud - `retentionRules` is required. #### InfluxDB OSS - `retentionRules` isn't required. - - :param retention_rules: The retention_rules of this TemplateSummaryDiffBucketsNewOld. - :type: list[BucketRetentionRules] - """ # noqa: E501 - self._retention_rules = retention_rules - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffBucketsNewOld): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_checks.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_checks.py deleted file mode 100644 index 3617fa36e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_checks.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffChecks(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'state_status': 'str', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'CheckDiscriminator', - 'old': 'CheckDiscriminator' - } - - attribute_map = { - 'kind': 'kind', - 'state_status': 'stateStatus', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, kind=None, state_status=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffChecks - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._state_status = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffChecks. - - :return: The kind of this TemplateSummaryDiffChecks. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffChecks. - - :param kind: The kind of this TemplateSummaryDiffChecks. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffChecks. - - :return: The state_status of this TemplateSummaryDiffChecks. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffChecks. - - :param state_status: The state_status of this TemplateSummaryDiffChecks. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffChecks. - - :return: The id of this TemplateSummaryDiffChecks. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffChecks. - - :param id: The id of this TemplateSummaryDiffChecks. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffChecks. - - :return: The template_meta_name of this TemplateSummaryDiffChecks. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffChecks. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffChecks. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffChecks. - - :return: The new of this TemplateSummaryDiffChecks. - :rtype: CheckDiscriminator - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffChecks. - - :param new: The new of this TemplateSummaryDiffChecks. - :type: CheckDiscriminator - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffChecks. - - :return: The old of this TemplateSummaryDiffChecks. - :rtype: CheckDiscriminator - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffChecks. - - :param old: The old of this TemplateSummaryDiffChecks. - :type: CheckDiscriminator - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffChecks): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_dashboards.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_dashboards.py deleted file mode 100644 index 748b2a097..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_dashboards.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffDashboards(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 = { - 'state_status': 'str', - 'id': 'str', - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'new': 'TemplateSummaryDiffDashboardsNewOld', - 'old': 'TemplateSummaryDiffDashboardsNewOld' - } - - attribute_map = { - 'state_status': 'stateStatus', - 'id': 'id', - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, state_status=None, id=None, kind=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffDashboards - a model defined in OpenAPI.""" # noqa: E501 - self._state_status = None - self._id = None - self._kind = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffDashboards. - - :return: The state_status of this TemplateSummaryDiffDashboards. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffDashboards. - - :param state_status: The state_status of this TemplateSummaryDiffDashboards. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffDashboards. - - :return: The id of this TemplateSummaryDiffDashboards. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffDashboards. - - :param id: The id of this TemplateSummaryDiffDashboards. - :type: str - """ # noqa: E501 - self._id = id - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffDashboards. - - :return: The kind of this TemplateSummaryDiffDashboards. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffDashboards. - - :param kind: The kind of this TemplateSummaryDiffDashboards. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffDashboards. - - :return: The template_meta_name of this TemplateSummaryDiffDashboards. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffDashboards. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffDashboards. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffDashboards. - - :return: The new of this TemplateSummaryDiffDashboards. - :rtype: TemplateSummaryDiffDashboardsNewOld - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffDashboards. - - :param new: The new of this TemplateSummaryDiffDashboards. - :type: TemplateSummaryDiffDashboardsNewOld - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffDashboards. - - :return: The old of this TemplateSummaryDiffDashboards. - :rtype: TemplateSummaryDiffDashboardsNewOld - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffDashboards. - - :param old: The old of this TemplateSummaryDiffDashboards. - :type: TemplateSummaryDiffDashboardsNewOld - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffDashboards): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_dashboards_new_old.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_dashboards_new_old.py deleted file mode 100644 index a2b727d4a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_dashboards_new_old.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffDashboardsNewOld(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'name': 'str', - 'description': 'str', - 'charts': 'list[TemplateChart]' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'charts': 'charts' - } - - def __init__(self, name=None, description=None, charts=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffDashboardsNewOld - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._charts = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if charts is not None: - self.charts = charts - - @property - def name(self): - """Get the name of this TemplateSummaryDiffDashboardsNewOld. - - :return: The name of this TemplateSummaryDiffDashboardsNewOld. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummaryDiffDashboardsNewOld. - - :param name: The name of this TemplateSummaryDiffDashboardsNewOld. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummaryDiffDashboardsNewOld. - - :return: The description of this TemplateSummaryDiffDashboardsNewOld. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummaryDiffDashboardsNewOld. - - :param description: The description of this TemplateSummaryDiffDashboardsNewOld. - :type: str - """ # noqa: E501 - self._description = description - - @property - def charts(self): - """Get the charts of this TemplateSummaryDiffDashboardsNewOld. - - :return: The charts of this TemplateSummaryDiffDashboardsNewOld. - :rtype: list[TemplateChart] - """ # noqa: E501 - return self._charts - - @charts.setter - def charts(self, charts): - """Set the charts of this TemplateSummaryDiffDashboardsNewOld. - - :param charts: The charts of this TemplateSummaryDiffDashboardsNewOld. - :type: list[TemplateChart] - """ # noqa: E501 - self._charts = charts - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffDashboardsNewOld): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_label_mappings.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_label_mappings.py deleted file mode 100644 index 2abb3dd7f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_label_mappings.py +++ /dev/null @@ -1,268 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffLabelMappings(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 = { - 'status': 'str', - 'resource_type': 'str', - 'resource_id': 'str', - 'resource_template_meta_name': 'str', - 'resource_name': 'str', - 'label_id': 'str', - 'label_template_meta_name': 'str', - 'label_name': 'str' - } - - attribute_map = { - 'status': 'status', - 'resource_type': 'resourceType', - 'resource_id': 'resourceID', - 'resource_template_meta_name': 'resourceTemplateMetaName', - 'resource_name': 'resourceName', - 'label_id': 'labelID', - 'label_template_meta_name': 'labelTemplateMetaName', - 'label_name': 'labelName' - } - - def __init__(self, status=None, resource_type=None, resource_id=None, resource_template_meta_name=None, resource_name=None, label_id=None, label_template_meta_name=None, label_name=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffLabelMappings - a model defined in OpenAPI.""" # noqa: E501 - self._status = None - self._resource_type = None - self._resource_id = None - self._resource_template_meta_name = None - self._resource_name = None - self._label_id = None - self._label_template_meta_name = None - self._label_name = None - self.discriminator = None - - if status is not None: - self.status = status - if resource_type is not None: - self.resource_type = resource_type - if resource_id is not None: - self.resource_id = resource_id - if resource_template_meta_name is not None: - self.resource_template_meta_name = resource_template_meta_name - if resource_name is not None: - self.resource_name = resource_name - if label_id is not None: - self.label_id = label_id - if label_template_meta_name is not None: - self.label_template_meta_name = label_template_meta_name - if label_name is not None: - self.label_name = label_name - - @property - def status(self): - """Get the status of this TemplateSummaryDiffLabelMappings. - - :return: The status of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TemplateSummaryDiffLabelMappings. - - :param status: The status of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._status = status - - @property - def resource_type(self): - """Get the resource_type of this TemplateSummaryDiffLabelMappings. - - :return: The resource_type of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_type - - @resource_type.setter - def resource_type(self, resource_type): - """Set the resource_type of this TemplateSummaryDiffLabelMappings. - - :param resource_type: The resource_type of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._resource_type = resource_type - - @property - def resource_id(self): - """Get the resource_id of this TemplateSummaryDiffLabelMappings. - - :return: The resource_id of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_id - - @resource_id.setter - def resource_id(self, resource_id): - """Set the resource_id of this TemplateSummaryDiffLabelMappings. - - :param resource_id: The resource_id of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._resource_id = resource_id - - @property - def resource_template_meta_name(self): - """Get the resource_template_meta_name of this TemplateSummaryDiffLabelMappings. - - :return: The resource_template_meta_name of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_template_meta_name - - @resource_template_meta_name.setter - def resource_template_meta_name(self, resource_template_meta_name): - """Set the resource_template_meta_name of this TemplateSummaryDiffLabelMappings. - - :param resource_template_meta_name: The resource_template_meta_name of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._resource_template_meta_name = resource_template_meta_name - - @property - def resource_name(self): - """Get the resource_name of this TemplateSummaryDiffLabelMappings. - - :return: The resource_name of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_name - - @resource_name.setter - def resource_name(self, resource_name): - """Set the resource_name of this TemplateSummaryDiffLabelMappings. - - :param resource_name: The resource_name of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._resource_name = resource_name - - @property - def label_id(self): - """Get the label_id of this TemplateSummaryDiffLabelMappings. - - :return: The label_id of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._label_id - - @label_id.setter - def label_id(self, label_id): - """Set the label_id of this TemplateSummaryDiffLabelMappings. - - :param label_id: The label_id of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._label_id = label_id - - @property - def label_template_meta_name(self): - """Get the label_template_meta_name of this TemplateSummaryDiffLabelMappings. - - :return: The label_template_meta_name of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._label_template_meta_name - - @label_template_meta_name.setter - def label_template_meta_name(self, label_template_meta_name): - """Set the label_template_meta_name of this TemplateSummaryDiffLabelMappings. - - :param label_template_meta_name: The label_template_meta_name of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._label_template_meta_name = label_template_meta_name - - @property - def label_name(self): - """Get the label_name of this TemplateSummaryDiffLabelMappings. - - :return: The label_name of this TemplateSummaryDiffLabelMappings. - :rtype: str - """ # noqa: E501 - return self._label_name - - @label_name.setter - def label_name(self, label_name): - """Set the label_name of this TemplateSummaryDiffLabelMappings. - - :param label_name: The label_name of this TemplateSummaryDiffLabelMappings. - :type: str - """ # noqa: E501 - self._label_name = label_name - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffLabelMappings): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_labels.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_labels.py deleted file mode 100644 index ab6b9c065..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_labels.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffLabels(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 = { - 'state_status': 'str', - 'kind': 'TemplateKind', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'TemplateSummaryDiffLabelsNewOld', - 'old': 'TemplateSummaryDiffLabelsNewOld' - } - - attribute_map = { - 'state_status': 'stateStatus', - 'kind': 'kind', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, state_status=None, kind=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffLabels - a model defined in OpenAPI.""" # noqa: E501 - self._state_status = None - self._kind = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if state_status is not None: - self.state_status = state_status - if kind is not None: - self.kind = kind - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffLabels. - - :return: The state_status of this TemplateSummaryDiffLabels. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffLabels. - - :param state_status: The state_status of this TemplateSummaryDiffLabels. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffLabels. - - :return: The kind of this TemplateSummaryDiffLabels. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffLabels. - - :param kind: The kind of this TemplateSummaryDiffLabels. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def id(self): - """Get the id of this TemplateSummaryDiffLabels. - - :return: The id of this TemplateSummaryDiffLabels. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffLabels. - - :param id: The id of this TemplateSummaryDiffLabels. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffLabels. - - :return: The template_meta_name of this TemplateSummaryDiffLabels. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffLabels. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffLabels. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffLabels. - - :return: The new of this TemplateSummaryDiffLabels. - :rtype: TemplateSummaryDiffLabelsNewOld - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffLabels. - - :param new: The new of this TemplateSummaryDiffLabels. - :type: TemplateSummaryDiffLabelsNewOld - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffLabels. - - :return: The old of this TemplateSummaryDiffLabels. - :rtype: TemplateSummaryDiffLabelsNewOld - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffLabels. - - :param old: The old of this TemplateSummaryDiffLabels. - :type: TemplateSummaryDiffLabelsNewOld - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffLabels): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_labels_new_old.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_labels_new_old.py deleted file mode 100644 index 27e7bdd1d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_labels_new_old.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffLabelsNewOld(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', - 'color': 'str', - 'description': 'str' - } - - attribute_map = { - 'name': 'name', - 'color': 'color', - 'description': 'description' - } - - def __init__(self, name=None, color=None, description=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffLabelsNewOld - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._color = None - self._description = None - self.discriminator = None - - if name is not None: - self.name = name - if color is not None: - self.color = color - if description is not None: - self.description = description - - @property - def name(self): - """Get the name of this TemplateSummaryDiffLabelsNewOld. - - :return: The name of this TemplateSummaryDiffLabelsNewOld. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummaryDiffLabelsNewOld. - - :param name: The name of this TemplateSummaryDiffLabelsNewOld. - :type: str - """ # noqa: E501 - self._name = name - - @property - def color(self): - """Get the color of this TemplateSummaryDiffLabelsNewOld. - - :return: The color of this TemplateSummaryDiffLabelsNewOld. - :rtype: str - """ # noqa: E501 - return self._color - - @color.setter - def color(self, color): - """Set the color of this TemplateSummaryDiffLabelsNewOld. - - :param color: The color of this TemplateSummaryDiffLabelsNewOld. - :type: str - """ # noqa: E501 - self._color = color - - @property - def description(self): - """Get the description of this TemplateSummaryDiffLabelsNewOld. - - :return: The description of this TemplateSummaryDiffLabelsNewOld. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummaryDiffLabelsNewOld. - - :param description: The description of this TemplateSummaryDiffLabelsNewOld. - :type: str - """ # noqa: E501 - self._description = description - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffLabelsNewOld): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_endpoints.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_endpoints.py deleted file mode 100644 index 47dc4caf0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_endpoints.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffNotificationEndpoints(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'state_status': 'str', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'NotificationEndpointDiscriminator', - 'old': 'NotificationEndpointDiscriminator' - } - - attribute_map = { - 'kind': 'kind', - 'state_status': 'stateStatus', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, kind=None, state_status=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffNotificationEndpoints - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._state_status = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffNotificationEndpoints. - - :return: The kind of this TemplateSummaryDiffNotificationEndpoints. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffNotificationEndpoints. - - :param kind: The kind of this TemplateSummaryDiffNotificationEndpoints. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffNotificationEndpoints. - - :return: The state_status of this TemplateSummaryDiffNotificationEndpoints. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffNotificationEndpoints. - - :param state_status: The state_status of this TemplateSummaryDiffNotificationEndpoints. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffNotificationEndpoints. - - :return: The id of this TemplateSummaryDiffNotificationEndpoints. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffNotificationEndpoints. - - :param id: The id of this TemplateSummaryDiffNotificationEndpoints. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffNotificationEndpoints. - - :return: The template_meta_name of this TemplateSummaryDiffNotificationEndpoints. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffNotificationEndpoints. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffNotificationEndpoints. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffNotificationEndpoints. - - :return: The new of this TemplateSummaryDiffNotificationEndpoints. - :rtype: NotificationEndpointDiscriminator - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffNotificationEndpoints. - - :param new: The new of this TemplateSummaryDiffNotificationEndpoints. - :type: NotificationEndpointDiscriminator - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffNotificationEndpoints. - - :return: The old of this TemplateSummaryDiffNotificationEndpoints. - :rtype: NotificationEndpointDiscriminator - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffNotificationEndpoints. - - :param old: The old of this TemplateSummaryDiffNotificationEndpoints. - :type: NotificationEndpointDiscriminator - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffNotificationEndpoints): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_rules.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_rules.py deleted file mode 100644 index cc4ab1ea5..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_rules.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffNotificationRules(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'state_status': 'str', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'TemplateSummaryDiffNotificationRulesNewOld', - 'old': 'TemplateSummaryDiffNotificationRulesNewOld' - } - - attribute_map = { - 'kind': 'kind', - 'state_status': 'stateStatus', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, kind=None, state_status=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffNotificationRules - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._state_status = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffNotificationRules. - - :return: The kind of this TemplateSummaryDiffNotificationRules. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffNotificationRules. - - :param kind: The kind of this TemplateSummaryDiffNotificationRules. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffNotificationRules. - - :return: The state_status of this TemplateSummaryDiffNotificationRules. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffNotificationRules. - - :param state_status: The state_status of this TemplateSummaryDiffNotificationRules. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffNotificationRules. - - :return: The id of this TemplateSummaryDiffNotificationRules. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffNotificationRules. - - :param id: The id of this TemplateSummaryDiffNotificationRules. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffNotificationRules. - - :return: The template_meta_name of this TemplateSummaryDiffNotificationRules. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffNotificationRules. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffNotificationRules. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffNotificationRules. - - :return: The new of this TemplateSummaryDiffNotificationRules. - :rtype: TemplateSummaryDiffNotificationRulesNewOld - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffNotificationRules. - - :param new: The new of this TemplateSummaryDiffNotificationRules. - :type: TemplateSummaryDiffNotificationRulesNewOld - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffNotificationRules. - - :return: The old of this TemplateSummaryDiffNotificationRules. - :rtype: TemplateSummaryDiffNotificationRulesNewOld - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffNotificationRules. - - :param old: The old of this TemplateSummaryDiffNotificationRules. - :type: TemplateSummaryDiffNotificationRulesNewOld - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffNotificationRules): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_rules_new_old.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_rules_new_old.py deleted file mode 100644 index b769118f3..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_notification_rules_new_old.py +++ /dev/null @@ -1,337 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffNotificationRulesNewOld(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', - 'endpoint_name': 'str', - 'endpoint_id': 'str', - 'endpoint_type': 'str', - 'every': 'str', - 'offset': 'str', - 'message_template': 'str', - 'status': 'str', - 'status_rules': 'list[TemplateSummarySummaryStatusRules]', - 'tag_rules': 'list[TemplateSummarySummaryTagRules]' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'endpoint_name': 'endpointName', - 'endpoint_id': 'endpointID', - 'endpoint_type': 'endpointType', - 'every': 'every', - 'offset': 'offset', - 'message_template': 'messageTemplate', - 'status': 'status', - 'status_rules': 'statusRules', - 'tag_rules': 'tagRules' - } - - def __init__(self, name=None, description=None, endpoint_name=None, endpoint_id=None, endpoint_type=None, every=None, offset=None, message_template=None, status=None, status_rules=None, tag_rules=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffNotificationRulesNewOld - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._endpoint_name = None - self._endpoint_id = None - self._endpoint_type = None - self._every = None - self._offset = None - self._message_template = None - self._status = None - self._status_rules = None - self._tag_rules = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if endpoint_name is not None: - self.endpoint_name = endpoint_name - if endpoint_id is not None: - self.endpoint_id = endpoint_id - if endpoint_type is not None: - self.endpoint_type = endpoint_type - if every is not None: - self.every = every - if offset is not None: - self.offset = offset - if message_template is not None: - self.message_template = message_template - if status is not None: - self.status = status - if status_rules is not None: - self.status_rules = status_rules - if tag_rules is not None: - self.tag_rules = tag_rules - - @property - def name(self): - """Get the name of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The name of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummaryDiffNotificationRulesNewOld. - - :param name: The name of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The description of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummaryDiffNotificationRulesNewOld. - - :param description: The description of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._description = description - - @property - def endpoint_name(self): - """Get the endpoint_name of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The endpoint_name of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._endpoint_name - - @endpoint_name.setter - def endpoint_name(self, endpoint_name): - """Set the endpoint_name of this TemplateSummaryDiffNotificationRulesNewOld. - - :param endpoint_name: The endpoint_name of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._endpoint_name = endpoint_name - - @property - def endpoint_id(self): - """Get the endpoint_id of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The endpoint_id of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._endpoint_id - - @endpoint_id.setter - def endpoint_id(self, endpoint_id): - """Set the endpoint_id of this TemplateSummaryDiffNotificationRulesNewOld. - - :param endpoint_id: The endpoint_id of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._endpoint_id = endpoint_id - - @property - def endpoint_type(self): - """Get the endpoint_type of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The endpoint_type of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._endpoint_type - - @endpoint_type.setter - def endpoint_type(self, endpoint_type): - """Set the endpoint_type of this TemplateSummaryDiffNotificationRulesNewOld. - - :param endpoint_type: The endpoint_type of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._endpoint_type = endpoint_type - - @property - def every(self): - """Get the every of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The every of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this TemplateSummaryDiffNotificationRulesNewOld. - - :param every: The every of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._every = every - - @property - def offset(self): - """Get the offset of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The offset of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._offset - - @offset.setter - def offset(self, offset): - """Set the offset of this TemplateSummaryDiffNotificationRulesNewOld. - - :param offset: The offset of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._offset = offset - - @property - def message_template(self): - """Get the message_template of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The message_template of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._message_template - - @message_template.setter - def message_template(self, message_template): - """Set the message_template of this TemplateSummaryDiffNotificationRulesNewOld. - - :param message_template: The message_template of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._message_template = message_template - - @property - def status(self): - """Get the status of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The status of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TemplateSummaryDiffNotificationRulesNewOld. - - :param status: The status of this TemplateSummaryDiffNotificationRulesNewOld. - :type: str - """ # noqa: E501 - self._status = status - - @property - def status_rules(self): - """Get the status_rules of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The status_rules of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: list[TemplateSummarySummaryStatusRules] - """ # noqa: E501 - return self._status_rules - - @status_rules.setter - def status_rules(self, status_rules): - """Set the status_rules of this TemplateSummaryDiffNotificationRulesNewOld. - - :param status_rules: The status_rules of this TemplateSummaryDiffNotificationRulesNewOld. - :type: list[TemplateSummarySummaryStatusRules] - """ # noqa: E501 - self._status_rules = status_rules - - @property - def tag_rules(self): - """Get the tag_rules of this TemplateSummaryDiffNotificationRulesNewOld. - - :return: The tag_rules of this TemplateSummaryDiffNotificationRulesNewOld. - :rtype: list[TemplateSummarySummaryTagRules] - """ # noqa: E501 - return self._tag_rules - - @tag_rules.setter - def tag_rules(self, tag_rules): - """Set the tag_rules of this TemplateSummaryDiffNotificationRulesNewOld. - - :param tag_rules: The tag_rules of this TemplateSummaryDiffNotificationRulesNewOld. - :type: list[TemplateSummarySummaryTagRules] - """ # noqa: E501 - self._tag_rules = tag_rules - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffNotificationRulesNewOld): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_tasks.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_tasks.py deleted file mode 100644 index 8dca893c8..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_tasks.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffTasks(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'state_status': 'str', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'TemplateSummaryDiffTasksNewOld', - 'old': 'TemplateSummaryDiffTasksNewOld' - } - - attribute_map = { - 'kind': 'kind', - 'state_status': 'stateStatus', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, kind=None, state_status=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffTasks - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._state_status = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffTasks. - - :return: The kind of this TemplateSummaryDiffTasks. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffTasks. - - :param kind: The kind of this TemplateSummaryDiffTasks. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffTasks. - - :return: The state_status of this TemplateSummaryDiffTasks. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffTasks. - - :param state_status: The state_status of this TemplateSummaryDiffTasks. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffTasks. - - :return: The id of this TemplateSummaryDiffTasks. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffTasks. - - :param id: The id of this TemplateSummaryDiffTasks. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffTasks. - - :return: The template_meta_name of this TemplateSummaryDiffTasks. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffTasks. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffTasks. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffTasks. - - :return: The new of this TemplateSummaryDiffTasks. - :rtype: TemplateSummaryDiffTasksNewOld - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffTasks. - - :param new: The new of this TemplateSummaryDiffTasks. - :type: TemplateSummaryDiffTasksNewOld - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffTasks. - - :return: The old of this TemplateSummaryDiffTasks. - :rtype: TemplateSummaryDiffTasksNewOld - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffTasks. - - :param old: The old of this TemplateSummaryDiffTasks. - :type: TemplateSummaryDiffTasksNewOld - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffTasks): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_tasks_new_old.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_tasks_new_old.py deleted file mode 100644 index 57a83e8a0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_tasks_new_old.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffTasksNewOld(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', - 'cron': 'str', - 'description': 'str', - 'every': 'str', - 'offset': 'str', - 'query': 'str', - 'status': 'str' - } - - attribute_map = { - 'name': 'name', - 'cron': 'cron', - 'description': 'description', - 'every': 'every', - 'offset': 'offset', - 'query': 'query', - 'status': 'status' - } - - def __init__(self, name=None, cron=None, description=None, every=None, offset=None, query=None, status=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffTasksNewOld - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._cron = None - self._description = None - self._every = None - self._offset = None - self._query = None - self._status = None - self.discriminator = None - - if name is not None: - self.name = name - if cron is not None: - self.cron = cron - if description is not None: - self.description = description - if every is not None: - self.every = every - if offset is not None: - self.offset = offset - if query is not None: - self.query = query - if status is not None: - self.status = status - - @property - def name(self): - """Get the name of this TemplateSummaryDiffTasksNewOld. - - :return: The name of this TemplateSummaryDiffTasksNewOld. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummaryDiffTasksNewOld. - - :param name: The name of this TemplateSummaryDiffTasksNewOld. - :type: str - """ # noqa: E501 - self._name = name - - @property - def cron(self): - """Get the cron of this TemplateSummaryDiffTasksNewOld. - - :return: The cron of this TemplateSummaryDiffTasksNewOld. - :rtype: str - """ # noqa: E501 - return self._cron - - @cron.setter - def cron(self, cron): - """Set the cron of this TemplateSummaryDiffTasksNewOld. - - :param cron: The cron of this TemplateSummaryDiffTasksNewOld. - :type: str - """ # noqa: E501 - self._cron = cron - - @property - def description(self): - """Get the description of this TemplateSummaryDiffTasksNewOld. - - :return: The description of this TemplateSummaryDiffTasksNewOld. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummaryDiffTasksNewOld. - - :param description: The description of this TemplateSummaryDiffTasksNewOld. - :type: str - """ # noqa: E501 - self._description = description - - @property - def every(self): - """Get the every of this TemplateSummaryDiffTasksNewOld. - - :return: The every of this TemplateSummaryDiffTasksNewOld. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this TemplateSummaryDiffTasksNewOld. - - :param every: The every of this TemplateSummaryDiffTasksNewOld. - :type: str - """ # noqa: E501 - self._every = every - - @property - def offset(self): - """Get the offset of this TemplateSummaryDiffTasksNewOld. - - :return: The offset of this TemplateSummaryDiffTasksNewOld. - :rtype: str - """ # noqa: E501 - return self._offset - - @offset.setter - def offset(self, offset): - """Set the offset of this TemplateSummaryDiffTasksNewOld. - - :param offset: The offset of this TemplateSummaryDiffTasksNewOld. - :type: str - """ # noqa: E501 - self._offset = offset - - @property - def query(self): - """Get the query of this TemplateSummaryDiffTasksNewOld. - - :return: The query of this TemplateSummaryDiffTasksNewOld. - :rtype: str - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this TemplateSummaryDiffTasksNewOld. - - :param query: The query of this TemplateSummaryDiffTasksNewOld. - :type: str - """ # noqa: E501 - self._query = query - - @property - def status(self): - """Get the status of this TemplateSummaryDiffTasksNewOld. - - :return: The status of this TemplateSummaryDiffTasksNewOld. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TemplateSummaryDiffTasksNewOld. - - :param status: The status of this TemplateSummaryDiffTasksNewOld. - :type: str - """ # noqa: E501 - self._status = status - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffTasksNewOld): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_telegraf_configs.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_telegraf_configs.py deleted file mode 100644 index 2aa8ef868..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_telegraf_configs.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffTelegrafConfigs(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'state_status': 'str', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'TelegrafRequest', - 'old': 'TelegrafRequest' - } - - attribute_map = { - 'kind': 'kind', - 'state_status': 'stateStatus', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, kind=None, state_status=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffTelegrafConfigs - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._state_status = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffTelegrafConfigs. - - :return: The kind of this TemplateSummaryDiffTelegrafConfigs. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffTelegrafConfigs. - - :param kind: The kind of this TemplateSummaryDiffTelegrafConfigs. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffTelegrafConfigs. - - :return: The state_status of this TemplateSummaryDiffTelegrafConfigs. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffTelegrafConfigs. - - :param state_status: The state_status of this TemplateSummaryDiffTelegrafConfigs. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffTelegrafConfigs. - - :return: The id of this TemplateSummaryDiffTelegrafConfigs. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffTelegrafConfigs. - - :param id: The id of this TemplateSummaryDiffTelegrafConfigs. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffTelegrafConfigs. - - :return: The template_meta_name of this TemplateSummaryDiffTelegrafConfigs. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffTelegrafConfigs. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffTelegrafConfigs. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffTelegrafConfigs. - - :return: The new of this TemplateSummaryDiffTelegrafConfigs. - :rtype: TelegrafRequest - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffTelegrafConfigs. - - :param new: The new of this TemplateSummaryDiffTelegrafConfigs. - :type: TelegrafRequest - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffTelegrafConfigs. - - :return: The old of this TemplateSummaryDiffTelegrafConfigs. - :rtype: TelegrafRequest - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffTelegrafConfigs. - - :param old: The old of this TemplateSummaryDiffTelegrafConfigs. - :type: TelegrafRequest - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffTelegrafConfigs): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_variables.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_variables.py deleted file mode 100644 index 3d4712ebb..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_variables.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffVariables(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'state_status': 'str', - 'id': 'str', - 'template_meta_name': 'str', - 'new': 'TemplateSummaryDiffVariablesNewOld', - 'old': 'TemplateSummaryDiffVariablesNewOld' - } - - attribute_map = { - 'kind': 'kind', - 'state_status': 'stateStatus', - 'id': 'id', - 'template_meta_name': 'templateMetaName', - 'new': 'new', - 'old': 'old' - } - - def __init__(self, kind=None, state_status=None, id=None, template_meta_name=None, new=None, old=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffVariables - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._state_status = None - self._id = None - self._template_meta_name = None - self._new = None - self._old = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if state_status is not None: - self.state_status = state_status - if id is not None: - self.id = id - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if new is not None: - self.new = new - if old is not None: - self.old = old - - @property - def kind(self): - """Get the kind of this TemplateSummaryDiffVariables. - - :return: The kind of this TemplateSummaryDiffVariables. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryDiffVariables. - - :param kind: The kind of this TemplateSummaryDiffVariables. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def state_status(self): - """Get the state_status of this TemplateSummaryDiffVariables. - - :return: The state_status of this TemplateSummaryDiffVariables. - :rtype: str - """ # noqa: E501 - return self._state_status - - @state_status.setter - def state_status(self, state_status): - """Set the state_status of this TemplateSummaryDiffVariables. - - :param state_status: The state_status of this TemplateSummaryDiffVariables. - :type: str - """ # noqa: E501 - self._state_status = state_status - - @property - def id(self): - """Get the id of this TemplateSummaryDiffVariables. - - :return: The id of this TemplateSummaryDiffVariables. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryDiffVariables. - - :param id: The id of this TemplateSummaryDiffVariables. - :type: str - """ # noqa: E501 - self._id = id - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryDiffVariables. - - :return: The template_meta_name of this TemplateSummaryDiffVariables. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryDiffVariables. - - :param template_meta_name: The template_meta_name of this TemplateSummaryDiffVariables. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def new(self): - """Get the new of this TemplateSummaryDiffVariables. - - :return: The new of this TemplateSummaryDiffVariables. - :rtype: TemplateSummaryDiffVariablesNewOld - """ # noqa: E501 - return self._new - - @new.setter - def new(self, new): - """Set the new of this TemplateSummaryDiffVariables. - - :param new: The new of this TemplateSummaryDiffVariables. - :type: TemplateSummaryDiffVariablesNewOld - """ # noqa: E501 - self._new = new - - @property - def old(self): - """Get the old of this TemplateSummaryDiffVariables. - - :return: The old of this TemplateSummaryDiffVariables. - :rtype: TemplateSummaryDiffVariablesNewOld - """ # noqa: E501 - return self._old - - @old.setter - def old(self, old): - """Set the old of this TemplateSummaryDiffVariables. - - :param old: The old of this TemplateSummaryDiffVariables. - :type: TemplateSummaryDiffVariablesNewOld - """ # noqa: E501 - self._old = old - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffVariables): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_diff_variables_new_old.py b/frogpilot/third_party/influxdb_client/domain/template_summary_diff_variables_new_old.py deleted file mode 100644 index 1537e5daf..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_diff_variables_new_old.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryDiffVariablesNewOld(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', - 'args': 'VariableProperties' - } - - attribute_map = { - 'name': 'name', - 'description': 'description', - 'args': 'args' - } - - def __init__(self, name=None, description=None, args=None): # noqa: E501,D401,D403 - """TemplateSummaryDiffVariablesNewOld - a model defined in OpenAPI.""" # noqa: E501 - self._name = None - self._description = None - self._args = None - self.discriminator = None - - if name is not None: - self.name = name - if description is not None: - self.description = description - if args is not None: - self.args = args - - @property - def name(self): - """Get the name of this TemplateSummaryDiffVariablesNewOld. - - :return: The name of this TemplateSummaryDiffVariablesNewOld. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummaryDiffVariablesNewOld. - - :param name: The name of this TemplateSummaryDiffVariablesNewOld. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummaryDiffVariablesNewOld. - - :return: The description of this TemplateSummaryDiffVariablesNewOld. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummaryDiffVariablesNewOld. - - :param description: The description of this TemplateSummaryDiffVariablesNewOld. - :type: str - """ # noqa: E501 - self._description = description - - @property - def args(self): - """Get the args of this TemplateSummaryDiffVariablesNewOld. - - :return: The args of this TemplateSummaryDiffVariablesNewOld. - :rtype: VariableProperties - """ # noqa: E501 - return self._args - - @args.setter - def args(self, args): - """Set the args of this TemplateSummaryDiffVariablesNewOld. - - :param args: The args of this TemplateSummaryDiffVariablesNewOld. - :type: VariableProperties - """ # noqa: E501 - self._args = args - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryDiffVariablesNewOld): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_errors.py b/frogpilot/third_party/influxdb_client/domain/template_summary_errors.py deleted file mode 100644 index 3d41ef4eb..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_errors.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryErrors(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'reason': 'str', - 'fields': 'list[str]', - 'indexes': 'list[int]' - } - - attribute_map = { - 'kind': 'kind', - 'reason': 'reason', - 'fields': 'fields', - 'indexes': 'indexes' - } - - def __init__(self, kind=None, reason=None, fields=None, indexes=None): # noqa: E501,D401,D403 - """TemplateSummaryErrors - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._reason = None - self._fields = None - self._indexes = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if reason is not None: - self.reason = reason - if fields is not None: - self.fields = fields - if indexes is not None: - self.indexes = indexes - - @property - def kind(self): - """Get the kind of this TemplateSummaryErrors. - - :return: The kind of this TemplateSummaryErrors. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryErrors. - - :param kind: The kind of this TemplateSummaryErrors. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def reason(self): - """Get the reason of this TemplateSummaryErrors. - - :return: The reason of this TemplateSummaryErrors. - :rtype: str - """ # noqa: E501 - return self._reason - - @reason.setter - def reason(self, reason): - """Set the reason of this TemplateSummaryErrors. - - :param reason: The reason of this TemplateSummaryErrors. - :type: str - """ # noqa: E501 - self._reason = reason - - @property - def fields(self): - """Get the fields of this TemplateSummaryErrors. - - :return: The fields of this TemplateSummaryErrors. - :rtype: list[str] - """ # noqa: E501 - return self._fields - - @fields.setter - def fields(self, fields): - """Set the fields of this TemplateSummaryErrors. - - :param fields: The fields of this TemplateSummaryErrors. - :type: list[str] - """ # noqa: E501 - self._fields = fields - - @property - def indexes(self): - """Get the indexes of this TemplateSummaryErrors. - - :return: The indexes of this TemplateSummaryErrors. - :rtype: list[int] - """ # noqa: E501 - return self._indexes - - @indexes.setter - def indexes(self, indexes): - """Set the indexes of this TemplateSummaryErrors. - - :param indexes: The indexes of this TemplateSummaryErrors. - :type: list[int] - """ # noqa: E501 - self._indexes = indexes - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryErrors): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_label.py b/frogpilot/third_party/influxdb_client/domain/template_summary_label.py deleted file mode 100644 index 727260ad7..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_label.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryLabel(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'name': 'str', - 'properties': 'TemplateSummaryLabelProperties', - 'env_references': 'list[object]' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'name': 'name', - 'properties': 'properties', - 'env_references': 'envReferences' - } - - def __init__(self, id=None, org_id=None, kind=None, template_meta_name=None, name=None, properties=None, env_references=None): # noqa: E501,D401,D403 - """TemplateSummaryLabel - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._kind = None - self._template_meta_name = None - self._name = None - self._properties = None - self._env_references = None - self.discriminator = None - - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if name is not None: - self.name = name - if properties is not None: - self.properties = properties - if env_references is not None: - self.env_references = env_references - - @property - def id(self): - """Get the id of this TemplateSummaryLabel. - - :return: The id of this TemplateSummaryLabel. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummaryLabel. - - :param id: The id of this TemplateSummaryLabel. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this TemplateSummaryLabel. - - :return: The org_id of this TemplateSummaryLabel. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TemplateSummaryLabel. - - :param org_id: The org_id of this TemplateSummaryLabel. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def kind(self): - """Get the kind of this TemplateSummaryLabel. - - :return: The kind of this TemplateSummaryLabel. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummaryLabel. - - :param kind: The kind of this TemplateSummaryLabel. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummaryLabel. - - :return: The template_meta_name of this TemplateSummaryLabel. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummaryLabel. - - :param template_meta_name: The template_meta_name of this TemplateSummaryLabel. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def name(self): - """Get the name of this TemplateSummaryLabel. - - :return: The name of this TemplateSummaryLabel. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummaryLabel. - - :param name: The name of this TemplateSummaryLabel. - :type: str - """ # noqa: E501 - self._name = name - - @property - def properties(self): - """Get the properties of this TemplateSummaryLabel. - - :return: The properties of this TemplateSummaryLabel. - :rtype: TemplateSummaryLabelProperties - """ # noqa: E501 - return self._properties - - @properties.setter - def properties(self, properties): - """Set the properties of this TemplateSummaryLabel. - - :param properties: The properties of this TemplateSummaryLabel. - :type: TemplateSummaryLabelProperties - """ # noqa: E501 - self._properties = properties - - @property - def env_references(self): - """Get the env_references of this TemplateSummaryLabel. - - :return: The env_references of this TemplateSummaryLabel. - :rtype: list[object] - """ # noqa: E501 - return self._env_references - - @env_references.setter - def env_references(self, env_references): - """Set the env_references of this TemplateSummaryLabel. - - :param env_references: The env_references of this TemplateSummaryLabel. - :type: list[object] - """ # noqa: E501 - self._env_references = env_references - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryLabel): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_label_properties.py b/frogpilot/third_party/influxdb_client/domain/template_summary_label_properties.py deleted file mode 100644 index 82bab1e72..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_label_properties.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummaryLabelProperties(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 = { - 'color': 'str', - 'description': 'str' - } - - attribute_map = { - 'color': 'color', - 'description': 'description' - } - - def __init__(self, color=None, description=None): # noqa: E501,D401,D403 - """TemplateSummaryLabelProperties - a model defined in OpenAPI.""" # noqa: E501 - self._color = None - self._description = None - self.discriminator = None - - if color is not None: - self.color = color - if description is not None: - self.description = description - - @property - def color(self): - """Get the color of this TemplateSummaryLabelProperties. - - :return: The color of this TemplateSummaryLabelProperties. - :rtype: str - """ # noqa: E501 - return self._color - - @color.setter - def color(self, color): - """Set the color of this TemplateSummaryLabelProperties. - - :param color: The color of this TemplateSummaryLabelProperties. - :type: str - """ # noqa: E501 - self._color = color - - @property - def description(self): - """Get the description of this TemplateSummaryLabelProperties. - - :return: The description of this TemplateSummaryLabelProperties. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummaryLabelProperties. - - :param description: The description of this TemplateSummaryLabelProperties. - :type: str - """ # noqa: E501 - self._description = description - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummaryLabelProperties): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary.py deleted file mode 100644 index 5ca10021a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary.py +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummary(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'buckets': 'list[TemplateSummarySummaryBuckets]', - 'checks': 'list[CheckDiscriminator]', - 'dashboards': 'list[TemplateSummarySummaryDashboards]', - 'labels': 'list[TemplateSummaryLabel]', - 'label_mappings': 'list[TemplateSummarySummaryLabelMappings]', - 'missing_env_refs': 'list[str]', - 'missing_secrets': 'list[str]', - 'notification_endpoints': 'list[NotificationEndpointDiscriminator]', - 'notification_rules': 'list[TemplateSummarySummaryNotificationRules]', - 'tasks': 'list[TemplateSummarySummaryTasks]', - 'telegraf_configs': 'list[TelegrafRequest]', - 'variables': 'list[TemplateSummarySummaryVariables]' - } - - attribute_map = { - 'buckets': 'buckets', - 'checks': 'checks', - 'dashboards': 'dashboards', - 'labels': 'labels', - 'label_mappings': 'labelMappings', - 'missing_env_refs': 'missingEnvRefs', - 'missing_secrets': 'missingSecrets', - 'notification_endpoints': 'notificationEndpoints', - 'notification_rules': 'notificationRules', - 'tasks': 'tasks', - 'telegraf_configs': 'telegrafConfigs', - 'variables': 'variables' - } - - def __init__(self, buckets=None, checks=None, dashboards=None, labels=None, label_mappings=None, missing_env_refs=None, missing_secrets=None, notification_endpoints=None, notification_rules=None, tasks=None, telegraf_configs=None, variables=None): # noqa: E501,D401,D403 - """TemplateSummarySummary - a model defined in OpenAPI.""" # noqa: E501 - self._buckets = None - self._checks = None - self._dashboards = None - self._labels = None - self._label_mappings = None - self._missing_env_refs = None - self._missing_secrets = None - self._notification_endpoints = None - self._notification_rules = None - self._tasks = None - self._telegraf_configs = None - self._variables = None - self.discriminator = None - - if buckets is not None: - self.buckets = buckets - if checks is not None: - self.checks = checks - if dashboards is not None: - self.dashboards = dashboards - if labels is not None: - self.labels = labels - if label_mappings is not None: - self.label_mappings = label_mappings - if missing_env_refs is not None: - self.missing_env_refs = missing_env_refs - if missing_secrets is not None: - self.missing_secrets = missing_secrets - if notification_endpoints is not None: - self.notification_endpoints = notification_endpoints - if notification_rules is not None: - self.notification_rules = notification_rules - if tasks is not None: - self.tasks = tasks - if telegraf_configs is not None: - self.telegraf_configs = telegraf_configs - if variables is not None: - self.variables = variables - - @property - def buckets(self): - """Get the buckets of this TemplateSummarySummary. - - :return: The buckets of this TemplateSummarySummary. - :rtype: list[TemplateSummarySummaryBuckets] - """ # noqa: E501 - return self._buckets - - @buckets.setter - def buckets(self, buckets): - """Set the buckets of this TemplateSummarySummary. - - :param buckets: The buckets of this TemplateSummarySummary. - :type: list[TemplateSummarySummaryBuckets] - """ # noqa: E501 - self._buckets = buckets - - @property - def checks(self): - """Get the checks of this TemplateSummarySummary. - - :return: The checks of this TemplateSummarySummary. - :rtype: list[CheckDiscriminator] - """ # noqa: E501 - return self._checks - - @checks.setter - def checks(self, checks): - """Set the checks of this TemplateSummarySummary. - - :param checks: The checks of this TemplateSummarySummary. - :type: list[CheckDiscriminator] - """ # noqa: E501 - self._checks = checks - - @property - def dashboards(self): - """Get the dashboards of this TemplateSummarySummary. - - :return: The dashboards of this TemplateSummarySummary. - :rtype: list[TemplateSummarySummaryDashboards] - """ # noqa: E501 - return self._dashboards - - @dashboards.setter - def dashboards(self, dashboards): - """Set the dashboards of this TemplateSummarySummary. - - :param dashboards: The dashboards of this TemplateSummarySummary. - :type: list[TemplateSummarySummaryDashboards] - """ # noqa: E501 - self._dashboards = dashboards - - @property - def labels(self): - """Get the labels of this TemplateSummarySummary. - - :return: The labels of this TemplateSummarySummary. - :rtype: list[TemplateSummaryLabel] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this TemplateSummarySummary. - - :param labels: The labels of this TemplateSummarySummary. - :type: list[TemplateSummaryLabel] - """ # noqa: E501 - self._labels = labels - - @property - def label_mappings(self): - """Get the label_mappings of this TemplateSummarySummary. - - :return: The label_mappings of this TemplateSummarySummary. - :rtype: list[TemplateSummarySummaryLabelMappings] - """ # noqa: E501 - return self._label_mappings - - @label_mappings.setter - def label_mappings(self, label_mappings): - """Set the label_mappings of this TemplateSummarySummary. - - :param label_mappings: The label_mappings of this TemplateSummarySummary. - :type: list[TemplateSummarySummaryLabelMappings] - """ # noqa: E501 - self._label_mappings = label_mappings - - @property - def missing_env_refs(self): - """Get the missing_env_refs of this TemplateSummarySummary. - - :return: The missing_env_refs of this TemplateSummarySummary. - :rtype: list[str] - """ # noqa: E501 - return self._missing_env_refs - - @missing_env_refs.setter - def missing_env_refs(self, missing_env_refs): - """Set the missing_env_refs of this TemplateSummarySummary. - - :param missing_env_refs: The missing_env_refs of this TemplateSummarySummary. - :type: list[str] - """ # noqa: E501 - self._missing_env_refs = missing_env_refs - - @property - def missing_secrets(self): - """Get the missing_secrets of this TemplateSummarySummary. - - :return: The missing_secrets of this TemplateSummarySummary. - :rtype: list[str] - """ # noqa: E501 - return self._missing_secrets - - @missing_secrets.setter - def missing_secrets(self, missing_secrets): - """Set the missing_secrets of this TemplateSummarySummary. - - :param missing_secrets: The missing_secrets of this TemplateSummarySummary. - :type: list[str] - """ # noqa: E501 - self._missing_secrets = missing_secrets - - @property - def notification_endpoints(self): - """Get the notification_endpoints of this TemplateSummarySummary. - - :return: The notification_endpoints of this TemplateSummarySummary. - :rtype: list[NotificationEndpointDiscriminator] - """ # noqa: E501 - return self._notification_endpoints - - @notification_endpoints.setter - def notification_endpoints(self, notification_endpoints): - """Set the notification_endpoints of this TemplateSummarySummary. - - :param notification_endpoints: The notification_endpoints of this TemplateSummarySummary. - :type: list[NotificationEndpointDiscriminator] - """ # noqa: E501 - self._notification_endpoints = notification_endpoints - - @property - def notification_rules(self): - """Get the notification_rules of this TemplateSummarySummary. - - :return: The notification_rules of this TemplateSummarySummary. - :rtype: list[TemplateSummarySummaryNotificationRules] - """ # noqa: E501 - return self._notification_rules - - @notification_rules.setter - def notification_rules(self, notification_rules): - """Set the notification_rules of this TemplateSummarySummary. - - :param notification_rules: The notification_rules of this TemplateSummarySummary. - :type: list[TemplateSummarySummaryNotificationRules] - """ # noqa: E501 - self._notification_rules = notification_rules - - @property - def tasks(self): - """Get the tasks of this TemplateSummarySummary. - - :return: The tasks of this TemplateSummarySummary. - :rtype: list[TemplateSummarySummaryTasks] - """ # noqa: E501 - return self._tasks - - @tasks.setter - def tasks(self, tasks): - """Set the tasks of this TemplateSummarySummary. - - :param tasks: The tasks of this TemplateSummarySummary. - :type: list[TemplateSummarySummaryTasks] - """ # noqa: E501 - self._tasks = tasks - - @property - def telegraf_configs(self): - """Get the telegraf_configs of this TemplateSummarySummary. - - :return: The telegraf_configs of this TemplateSummarySummary. - :rtype: list[TelegrafRequest] - """ # noqa: E501 - return self._telegraf_configs - - @telegraf_configs.setter - def telegraf_configs(self, telegraf_configs): - """Set the telegraf_configs of this TemplateSummarySummary. - - :param telegraf_configs: The telegraf_configs of this TemplateSummarySummary. - :type: list[TelegrafRequest] - """ # noqa: E501 - self._telegraf_configs = telegraf_configs - - @property - def variables(self): - """Get the variables of this TemplateSummarySummary. - - :return: The variables of this TemplateSummarySummary. - :rtype: list[TemplateSummarySummaryVariables] - """ # noqa: E501 - return self._variables - - @variables.setter - def variables(self, variables): - """Set the variables of this TemplateSummarySummary. - - :param variables: The variables of this TemplateSummarySummary. - :type: list[TemplateSummarySummaryVariables] - """ # noqa: E501 - self._variables = variables - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummary): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_buckets.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_buckets.py deleted file mode 100644 index ba43e8ca1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_buckets.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryBuckets(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'name': 'str', - 'description': 'str', - 'retention_period': 'int', - 'label_associations': 'list[TemplateSummaryLabel]', - 'env_references': 'list[object]' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'name': 'name', - 'description': 'description', - 'retention_period': 'retentionPeriod', - 'label_associations': 'labelAssociations', - 'env_references': 'envReferences' - } - - def __init__(self, id=None, org_id=None, kind=None, template_meta_name=None, name=None, description=None, retention_period=None, label_associations=None, env_references=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryBuckets - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._kind = None - self._template_meta_name = None - self._name = None - self._description = None - self._retention_period = None - self._label_associations = None - self._env_references = None - self.discriminator = None - - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if name is not None: - self.name = name - if description is not None: - self.description = description - if retention_period is not None: - self.retention_period = retention_period - if label_associations is not None: - self.label_associations = label_associations - if env_references is not None: - self.env_references = env_references - - @property - def id(self): - """Get the id of this TemplateSummarySummaryBuckets. - - :return: The id of this TemplateSummarySummaryBuckets. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummarySummaryBuckets. - - :param id: The id of this TemplateSummarySummaryBuckets. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this TemplateSummarySummaryBuckets. - - :return: The org_id of this TemplateSummarySummaryBuckets. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TemplateSummarySummaryBuckets. - - :param org_id: The org_id of this TemplateSummarySummaryBuckets. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def kind(self): - """Get the kind of this TemplateSummarySummaryBuckets. - - :return: The kind of this TemplateSummarySummaryBuckets. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummarySummaryBuckets. - - :param kind: The kind of this TemplateSummarySummaryBuckets. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummarySummaryBuckets. - - :return: The template_meta_name of this TemplateSummarySummaryBuckets. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummarySummaryBuckets. - - :param template_meta_name: The template_meta_name of this TemplateSummarySummaryBuckets. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def name(self): - """Get the name of this TemplateSummarySummaryBuckets. - - :return: The name of this TemplateSummarySummaryBuckets. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummarySummaryBuckets. - - :param name: The name of this TemplateSummarySummaryBuckets. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummarySummaryBuckets. - - :return: The description of this TemplateSummarySummaryBuckets. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummarySummaryBuckets. - - :param description: The description of this TemplateSummarySummaryBuckets. - :type: str - """ # noqa: E501 - self._description = description - - @property - def retention_period(self): - """Get the retention_period of this TemplateSummarySummaryBuckets. - - :return: The retention_period of this TemplateSummarySummaryBuckets. - :rtype: int - """ # noqa: E501 - return self._retention_period - - @retention_period.setter - def retention_period(self, retention_period): - """Set the retention_period of this TemplateSummarySummaryBuckets. - - :param retention_period: The retention_period of this TemplateSummarySummaryBuckets. - :type: int - """ # noqa: E501 - self._retention_period = retention_period - - @property - def label_associations(self): - """Get the label_associations of this TemplateSummarySummaryBuckets. - - :return: The label_associations of this TemplateSummarySummaryBuckets. - :rtype: list[TemplateSummaryLabel] - """ # noqa: E501 - return self._label_associations - - @label_associations.setter - def label_associations(self, label_associations): - """Set the label_associations of this TemplateSummarySummaryBuckets. - - :param label_associations: The label_associations of this TemplateSummarySummaryBuckets. - :type: list[TemplateSummaryLabel] - """ # noqa: E501 - self._label_associations = label_associations - - @property - def env_references(self): - """Get the env_references of this TemplateSummarySummaryBuckets. - - :return: The env_references of this TemplateSummarySummaryBuckets. - :rtype: list[object] - """ # noqa: E501 - return self._env_references - - @env_references.setter - def env_references(self, env_references): - """Set the env_references of this TemplateSummarySummaryBuckets. - - :param env_references: The env_references of this TemplateSummarySummaryBuckets. - :type: list[object] - """ # noqa: E501 - self._env_references = env_references - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryBuckets): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_dashboards.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_dashboards.py deleted file mode 100644 index 91a548494..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_dashboards.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryDashboards(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'org_id': 'str', - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'name': 'str', - 'description': 'str', - 'label_associations': 'list[TemplateSummaryLabel]', - 'charts': 'list[TemplateChart]', - 'env_references': 'list[object]' - } - - attribute_map = { - 'id': 'id', - 'org_id': 'orgID', - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'name': 'name', - 'description': 'description', - 'label_associations': 'labelAssociations', - 'charts': 'charts', - 'env_references': 'envReferences' - } - - def __init__(self, id=None, org_id=None, kind=None, template_meta_name=None, name=None, description=None, label_associations=None, charts=None, env_references=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryDashboards - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._org_id = None - self._kind = None - self._template_meta_name = None - self._name = None - self._description = None - self._label_associations = None - self._charts = None - self._env_references = None - self.discriminator = None - - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if name is not None: - self.name = name - if description is not None: - self.description = description - if label_associations is not None: - self.label_associations = label_associations - if charts is not None: - self.charts = charts - if env_references is not None: - self.env_references = env_references - - @property - def id(self): - """Get the id of this TemplateSummarySummaryDashboards. - - :return: The id of this TemplateSummarySummaryDashboards. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummarySummaryDashboards. - - :param id: The id of this TemplateSummarySummaryDashboards. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this TemplateSummarySummaryDashboards. - - :return: The org_id of this TemplateSummarySummaryDashboards. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TemplateSummarySummaryDashboards. - - :param org_id: The org_id of this TemplateSummarySummaryDashboards. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def kind(self): - """Get the kind of this TemplateSummarySummaryDashboards. - - :return: The kind of this TemplateSummarySummaryDashboards. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummarySummaryDashboards. - - :param kind: The kind of this TemplateSummarySummaryDashboards. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummarySummaryDashboards. - - :return: The template_meta_name of this TemplateSummarySummaryDashboards. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummarySummaryDashboards. - - :param template_meta_name: The template_meta_name of this TemplateSummarySummaryDashboards. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def name(self): - """Get the name of this TemplateSummarySummaryDashboards. - - :return: The name of this TemplateSummarySummaryDashboards. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummarySummaryDashboards. - - :param name: The name of this TemplateSummarySummaryDashboards. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummarySummaryDashboards. - - :return: The description of this TemplateSummarySummaryDashboards. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummarySummaryDashboards. - - :param description: The description of this TemplateSummarySummaryDashboards. - :type: str - """ # noqa: E501 - self._description = description - - @property - def label_associations(self): - """Get the label_associations of this TemplateSummarySummaryDashboards. - - :return: The label_associations of this TemplateSummarySummaryDashboards. - :rtype: list[TemplateSummaryLabel] - """ # noqa: E501 - return self._label_associations - - @label_associations.setter - def label_associations(self, label_associations): - """Set the label_associations of this TemplateSummarySummaryDashboards. - - :param label_associations: The label_associations of this TemplateSummarySummaryDashboards. - :type: list[TemplateSummaryLabel] - """ # noqa: E501 - self._label_associations = label_associations - - @property - def charts(self): - """Get the charts of this TemplateSummarySummaryDashboards. - - :return: The charts of this TemplateSummarySummaryDashboards. - :rtype: list[TemplateChart] - """ # noqa: E501 - return self._charts - - @charts.setter - def charts(self, charts): - """Set the charts of this TemplateSummarySummaryDashboards. - - :param charts: The charts of this TemplateSummarySummaryDashboards. - :type: list[TemplateChart] - """ # noqa: E501 - self._charts = charts - - @property - def env_references(self): - """Get the env_references of this TemplateSummarySummaryDashboards. - - :return: The env_references of this TemplateSummarySummaryDashboards. - :rtype: list[object] - """ # noqa: E501 - return self._env_references - - @env_references.setter - def env_references(self, env_references): - """Set the env_references of this TemplateSummarySummaryDashboards. - - :param env_references: The env_references of this TemplateSummarySummaryDashboards. - :type: list[object] - """ # noqa: E501 - self._env_references = env_references - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryDashboards): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_label_mappings.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_label_mappings.py deleted file mode 100644 index 9051866ce..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_label_mappings.py +++ /dev/null @@ -1,268 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryLabelMappings(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 = { - 'status': 'str', - 'resource_template_meta_name': 'str', - 'resource_name': 'str', - 'resource_id': 'str', - 'resource_type': 'str', - 'label_template_meta_name': 'str', - 'label_name': 'str', - 'label_id': 'str' - } - - attribute_map = { - 'status': 'status', - 'resource_template_meta_name': 'resourceTemplateMetaName', - 'resource_name': 'resourceName', - 'resource_id': 'resourceID', - 'resource_type': 'resourceType', - 'label_template_meta_name': 'labelTemplateMetaName', - 'label_name': 'labelName', - 'label_id': 'labelID' - } - - def __init__(self, status=None, resource_template_meta_name=None, resource_name=None, resource_id=None, resource_type=None, label_template_meta_name=None, label_name=None, label_id=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryLabelMappings - a model defined in OpenAPI.""" # noqa: E501 - self._status = None - self._resource_template_meta_name = None - self._resource_name = None - self._resource_id = None - self._resource_type = None - self._label_template_meta_name = None - self._label_name = None - self._label_id = None - self.discriminator = None - - if status is not None: - self.status = status - if resource_template_meta_name is not None: - self.resource_template_meta_name = resource_template_meta_name - if resource_name is not None: - self.resource_name = resource_name - if resource_id is not None: - self.resource_id = resource_id - if resource_type is not None: - self.resource_type = resource_type - if label_template_meta_name is not None: - self.label_template_meta_name = label_template_meta_name - if label_name is not None: - self.label_name = label_name - if label_id is not None: - self.label_id = label_id - - @property - def status(self): - """Get the status of this TemplateSummarySummaryLabelMappings. - - :return: The status of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TemplateSummarySummaryLabelMappings. - - :param status: The status of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._status = status - - @property - def resource_template_meta_name(self): - """Get the resource_template_meta_name of this TemplateSummarySummaryLabelMappings. - - :return: The resource_template_meta_name of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_template_meta_name - - @resource_template_meta_name.setter - def resource_template_meta_name(self, resource_template_meta_name): - """Set the resource_template_meta_name of this TemplateSummarySummaryLabelMappings. - - :param resource_template_meta_name: The resource_template_meta_name of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._resource_template_meta_name = resource_template_meta_name - - @property - def resource_name(self): - """Get the resource_name of this TemplateSummarySummaryLabelMappings. - - :return: The resource_name of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_name - - @resource_name.setter - def resource_name(self, resource_name): - """Set the resource_name of this TemplateSummarySummaryLabelMappings. - - :param resource_name: The resource_name of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._resource_name = resource_name - - @property - def resource_id(self): - """Get the resource_id of this TemplateSummarySummaryLabelMappings. - - :return: The resource_id of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_id - - @resource_id.setter - def resource_id(self, resource_id): - """Set the resource_id of this TemplateSummarySummaryLabelMappings. - - :param resource_id: The resource_id of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._resource_id = resource_id - - @property - def resource_type(self): - """Get the resource_type of this TemplateSummarySummaryLabelMappings. - - :return: The resource_type of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._resource_type - - @resource_type.setter - def resource_type(self, resource_type): - """Set the resource_type of this TemplateSummarySummaryLabelMappings. - - :param resource_type: The resource_type of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._resource_type = resource_type - - @property - def label_template_meta_name(self): - """Get the label_template_meta_name of this TemplateSummarySummaryLabelMappings. - - :return: The label_template_meta_name of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._label_template_meta_name - - @label_template_meta_name.setter - def label_template_meta_name(self, label_template_meta_name): - """Set the label_template_meta_name of this TemplateSummarySummaryLabelMappings. - - :param label_template_meta_name: The label_template_meta_name of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._label_template_meta_name = label_template_meta_name - - @property - def label_name(self): - """Get the label_name of this TemplateSummarySummaryLabelMappings. - - :return: The label_name of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._label_name - - @label_name.setter - def label_name(self, label_name): - """Set the label_name of this TemplateSummarySummaryLabelMappings. - - :param label_name: The label_name of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._label_name = label_name - - @property - def label_id(self): - """Get the label_id of this TemplateSummarySummaryLabelMappings. - - :return: The label_id of this TemplateSummarySummaryLabelMappings. - :rtype: str - """ # noqa: E501 - return self._label_id - - @label_id.setter - def label_id(self, label_id): - """Set the label_id of this TemplateSummarySummaryLabelMappings. - - :param label_id: The label_id of this TemplateSummarySummaryLabelMappings. - :type: str - """ # noqa: E501 - self._label_id = label_id - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryLabelMappings): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_notification_rules.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_notification_rules.py deleted file mode 100644 index 63168ed0e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_notification_rules.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryNotificationRules(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'name': 'str', - 'description': 'str', - 'endpoint_template_meta_name': 'str', - 'endpoint_id': 'str', - 'endpoint_type': 'str', - 'every': 'str', - 'offset': 'str', - 'message_template': 'str', - 'status': 'str', - 'status_rules': 'list[TemplateSummarySummaryStatusRules]', - 'tag_rules': 'list[TemplateSummarySummaryTagRules]', - 'label_associations': 'list[TemplateSummaryLabel]', - 'env_references': 'list[object]' - } - - attribute_map = { - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'name': 'name', - 'description': 'description', - 'endpoint_template_meta_name': 'endpointTemplateMetaName', - 'endpoint_id': 'endpointID', - 'endpoint_type': 'endpointType', - 'every': 'every', - 'offset': 'offset', - 'message_template': 'messageTemplate', - 'status': 'status', - 'status_rules': 'statusRules', - 'tag_rules': 'tagRules', - 'label_associations': 'labelAssociations', - 'env_references': 'envReferences' - } - - def __init__(self, kind=None, template_meta_name=None, name=None, description=None, endpoint_template_meta_name=None, endpoint_id=None, endpoint_type=None, every=None, offset=None, message_template=None, status=None, status_rules=None, tag_rules=None, label_associations=None, env_references=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryNotificationRules - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._template_meta_name = None - self._name = None - self._description = None - self._endpoint_template_meta_name = None - self._endpoint_id = None - self._endpoint_type = None - self._every = None - self._offset = None - self._message_template = None - self._status = None - self._status_rules = None - self._tag_rules = None - self._label_associations = None - self._env_references = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if name is not None: - self.name = name - if description is not None: - self.description = description - if endpoint_template_meta_name is not None: - self.endpoint_template_meta_name = endpoint_template_meta_name - if endpoint_id is not None: - self.endpoint_id = endpoint_id - if endpoint_type is not None: - self.endpoint_type = endpoint_type - if every is not None: - self.every = every - if offset is not None: - self.offset = offset - if message_template is not None: - self.message_template = message_template - if status is not None: - self.status = status - if status_rules is not None: - self.status_rules = status_rules - if tag_rules is not None: - self.tag_rules = tag_rules - if label_associations is not None: - self.label_associations = label_associations - if env_references is not None: - self.env_references = env_references - - @property - def kind(self): - """Get the kind of this TemplateSummarySummaryNotificationRules. - - :return: The kind of this TemplateSummarySummaryNotificationRules. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummarySummaryNotificationRules. - - :param kind: The kind of this TemplateSummarySummaryNotificationRules. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummarySummaryNotificationRules. - - :return: The template_meta_name of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummarySummaryNotificationRules. - - :param template_meta_name: The template_meta_name of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def name(self): - """Get the name of this TemplateSummarySummaryNotificationRules. - - :return: The name of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummarySummaryNotificationRules. - - :param name: The name of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummarySummaryNotificationRules. - - :return: The description of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummarySummaryNotificationRules. - - :param description: The description of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._description = description - - @property - def endpoint_template_meta_name(self): - """Get the endpoint_template_meta_name of this TemplateSummarySummaryNotificationRules. - - :return: The endpoint_template_meta_name of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._endpoint_template_meta_name - - @endpoint_template_meta_name.setter - def endpoint_template_meta_name(self, endpoint_template_meta_name): - """Set the endpoint_template_meta_name of this TemplateSummarySummaryNotificationRules. - - :param endpoint_template_meta_name: The endpoint_template_meta_name of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._endpoint_template_meta_name = endpoint_template_meta_name - - @property - def endpoint_id(self): - """Get the endpoint_id of this TemplateSummarySummaryNotificationRules. - - :return: The endpoint_id of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._endpoint_id - - @endpoint_id.setter - def endpoint_id(self, endpoint_id): - """Set the endpoint_id of this TemplateSummarySummaryNotificationRules. - - :param endpoint_id: The endpoint_id of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._endpoint_id = endpoint_id - - @property - def endpoint_type(self): - """Get the endpoint_type of this TemplateSummarySummaryNotificationRules. - - :return: The endpoint_type of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._endpoint_type - - @endpoint_type.setter - def endpoint_type(self, endpoint_type): - """Set the endpoint_type of this TemplateSummarySummaryNotificationRules. - - :param endpoint_type: The endpoint_type of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._endpoint_type = endpoint_type - - @property - def every(self): - """Get the every of this TemplateSummarySummaryNotificationRules. - - :return: The every of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this TemplateSummarySummaryNotificationRules. - - :param every: The every of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._every = every - - @property - def offset(self): - """Get the offset of this TemplateSummarySummaryNotificationRules. - - :return: The offset of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._offset - - @offset.setter - def offset(self, offset): - """Set the offset of this TemplateSummarySummaryNotificationRules. - - :param offset: The offset of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._offset = offset - - @property - def message_template(self): - """Get the message_template of this TemplateSummarySummaryNotificationRules. - - :return: The message_template of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._message_template - - @message_template.setter - def message_template(self, message_template): - """Set the message_template of this TemplateSummarySummaryNotificationRules. - - :param message_template: The message_template of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._message_template = message_template - - @property - def status(self): - """Get the status of this TemplateSummarySummaryNotificationRules. - - :return: The status of this TemplateSummarySummaryNotificationRules. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TemplateSummarySummaryNotificationRules. - - :param status: The status of this TemplateSummarySummaryNotificationRules. - :type: str - """ # noqa: E501 - self._status = status - - @property - def status_rules(self): - """Get the status_rules of this TemplateSummarySummaryNotificationRules. - - :return: The status_rules of this TemplateSummarySummaryNotificationRules. - :rtype: list[TemplateSummarySummaryStatusRules] - """ # noqa: E501 - return self._status_rules - - @status_rules.setter - def status_rules(self, status_rules): - """Set the status_rules of this TemplateSummarySummaryNotificationRules. - - :param status_rules: The status_rules of this TemplateSummarySummaryNotificationRules. - :type: list[TemplateSummarySummaryStatusRules] - """ # noqa: E501 - self._status_rules = status_rules - - @property - def tag_rules(self): - """Get the tag_rules of this TemplateSummarySummaryNotificationRules. - - :return: The tag_rules of this TemplateSummarySummaryNotificationRules. - :rtype: list[TemplateSummarySummaryTagRules] - """ # noqa: E501 - return self._tag_rules - - @tag_rules.setter - def tag_rules(self, tag_rules): - """Set the tag_rules of this TemplateSummarySummaryNotificationRules. - - :param tag_rules: The tag_rules of this TemplateSummarySummaryNotificationRules. - :type: list[TemplateSummarySummaryTagRules] - """ # noqa: E501 - self._tag_rules = tag_rules - - @property - def label_associations(self): - """Get the label_associations of this TemplateSummarySummaryNotificationRules. - - :return: The label_associations of this TemplateSummarySummaryNotificationRules. - :rtype: list[TemplateSummaryLabel] - """ # noqa: E501 - return self._label_associations - - @label_associations.setter - def label_associations(self, label_associations): - """Set the label_associations of this TemplateSummarySummaryNotificationRules. - - :param label_associations: The label_associations of this TemplateSummarySummaryNotificationRules. - :type: list[TemplateSummaryLabel] - """ # noqa: E501 - self._label_associations = label_associations - - @property - def env_references(self): - """Get the env_references of this TemplateSummarySummaryNotificationRules. - - :return: The env_references of this TemplateSummarySummaryNotificationRules. - :rtype: list[object] - """ # noqa: E501 - return self._env_references - - @env_references.setter - def env_references(self, env_references): - """Set the env_references of this TemplateSummarySummaryNotificationRules. - - :param env_references: The env_references of this TemplateSummarySummaryNotificationRules. - :type: list[object] - """ # noqa: E501 - self._env_references = env_references - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryNotificationRules): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_status_rules.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_status_rules.py deleted file mode 100644 index 90a7c5a9c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_status_rules.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryStatusRules(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 = { - 'current_level': 'str', - 'previous_level': 'str' - } - - attribute_map = { - 'current_level': 'currentLevel', - 'previous_level': 'previousLevel' - } - - def __init__(self, current_level=None, previous_level=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryStatusRules - a model defined in OpenAPI.""" # noqa: E501 - self._current_level = None - self._previous_level = None - self.discriminator = None - - if current_level is not None: - self.current_level = current_level - if previous_level is not None: - self.previous_level = previous_level - - @property - def current_level(self): - """Get the current_level of this TemplateSummarySummaryStatusRules. - - :return: The current_level of this TemplateSummarySummaryStatusRules. - :rtype: str - """ # noqa: E501 - return self._current_level - - @current_level.setter - def current_level(self, current_level): - """Set the current_level of this TemplateSummarySummaryStatusRules. - - :param current_level: The current_level of this TemplateSummarySummaryStatusRules. - :type: str - """ # noqa: E501 - self._current_level = current_level - - @property - def previous_level(self): - """Get the previous_level of this TemplateSummarySummaryStatusRules. - - :return: The previous_level of this TemplateSummarySummaryStatusRules. - :rtype: str - """ # noqa: E501 - return self._previous_level - - @previous_level.setter - def previous_level(self, previous_level): - """Set the previous_level of this TemplateSummarySummaryStatusRules. - - :param previous_level: The previous_level of this TemplateSummarySummaryStatusRules. - :type: str - """ # noqa: E501 - self._previous_level = previous_level - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryStatusRules): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_tag_rules.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_tag_rules.py deleted file mode 100644 index 3c1a4475c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_tag_rules.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryTagRules(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 = { - 'key': 'str', - 'value': 'str', - 'operator': 'str' - } - - attribute_map = { - 'key': 'key', - 'value': 'value', - 'operator': 'operator' - } - - def __init__(self, key=None, value=None, operator=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryTagRules - a model defined in OpenAPI.""" # noqa: E501 - self._key = None - self._value = None - self._operator = None - self.discriminator = None - - if key is not None: - self.key = key - if value is not None: - self.value = value - if operator is not None: - self.operator = operator - - @property - def key(self): - """Get the key of this TemplateSummarySummaryTagRules. - - :return: The key of this TemplateSummarySummaryTagRules. - :rtype: str - """ # noqa: E501 - return self._key - - @key.setter - def key(self, key): - """Set the key of this TemplateSummarySummaryTagRules. - - :param key: The key of this TemplateSummarySummaryTagRules. - :type: str - """ # noqa: E501 - self._key = key - - @property - def value(self): - """Get the value of this TemplateSummarySummaryTagRules. - - :return: The value of this TemplateSummarySummaryTagRules. - :rtype: str - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this TemplateSummarySummaryTagRules. - - :param value: The value of this TemplateSummarySummaryTagRules. - :type: str - """ # noqa: E501 - self._value = value - - @property - def operator(self): - """Get the operator of this TemplateSummarySummaryTagRules. - - :return: The operator of this TemplateSummarySummaryTagRules. - :rtype: str - """ # noqa: E501 - return self._operator - - @operator.setter - def operator(self, operator): - """Set the operator of this TemplateSummarySummaryTagRules. - - :param operator: The operator of this TemplateSummarySummaryTagRules. - :type: str - """ # noqa: E501 - self._operator = operator - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryTagRules): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_tasks.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_tasks.py deleted file mode 100644 index 7b8db7518..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_tasks.py +++ /dev/null @@ -1,337 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryTasks(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'id': 'str', - 'name': 'str', - 'cron': 'str', - 'description': 'str', - 'every': 'str', - 'offset': 'str', - 'query': 'str', - 'status': 'str', - 'env_references': 'list[object]' - } - - attribute_map = { - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'id': 'id', - 'name': 'name', - 'cron': 'cron', - 'description': 'description', - 'every': 'every', - 'offset': 'offset', - 'query': 'query', - 'status': 'status', - 'env_references': 'envReferences' - } - - def __init__(self, kind=None, template_meta_name=None, id=None, name=None, cron=None, description=None, every=None, offset=None, query=None, status=None, env_references=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryTasks - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._template_meta_name = None - self._id = None - self._name = None - self._cron = None - self._description = None - self._every = None - self._offset = None - self._query = None - self._status = None - self._env_references = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if id is not None: - self.id = id - if name is not None: - self.name = name - if cron is not None: - self.cron = cron - if description is not None: - self.description = description - if every is not None: - self.every = every - if offset is not None: - self.offset = offset - if query is not None: - self.query = query - if status is not None: - self.status = status - if env_references is not None: - self.env_references = env_references - - @property - def kind(self): - """Get the kind of this TemplateSummarySummaryTasks. - - :return: The kind of this TemplateSummarySummaryTasks. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummarySummaryTasks. - - :param kind: The kind of this TemplateSummarySummaryTasks. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummarySummaryTasks. - - :return: The template_meta_name of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummarySummaryTasks. - - :param template_meta_name: The template_meta_name of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def id(self): - """Get the id of this TemplateSummarySummaryTasks. - - :return: The id of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummarySummaryTasks. - - :param id: The id of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this TemplateSummarySummaryTasks. - - :return: The name of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummarySummaryTasks. - - :param name: The name of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._name = name - - @property - def cron(self): - """Get the cron of this TemplateSummarySummaryTasks. - - :return: The cron of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._cron - - @cron.setter - def cron(self, cron): - """Set the cron of this TemplateSummarySummaryTasks. - - :param cron: The cron of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._cron = cron - - @property - def description(self): - """Get the description of this TemplateSummarySummaryTasks. - - :return: The description of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummarySummaryTasks. - - :param description: The description of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._description = description - - @property - def every(self): - """Get the every of this TemplateSummarySummaryTasks. - - :return: The every of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._every - - @every.setter - def every(self, every): - """Set the every of this TemplateSummarySummaryTasks. - - :param every: The every of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._every = every - - @property - def offset(self): - """Get the offset of this TemplateSummarySummaryTasks. - - :return: The offset of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._offset - - @offset.setter - def offset(self, offset): - """Set the offset of this TemplateSummarySummaryTasks. - - :param offset: The offset of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._offset = offset - - @property - def query(self): - """Get the query of this TemplateSummarySummaryTasks. - - :return: The query of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._query - - @query.setter - def query(self, query): - """Set the query of this TemplateSummarySummaryTasks. - - :param query: The query of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._query = query - - @property - def status(self): - """Get the status of this TemplateSummarySummaryTasks. - - :return: The status of this TemplateSummarySummaryTasks. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this TemplateSummarySummaryTasks. - - :param status: The status of this TemplateSummarySummaryTasks. - :type: str - """ # noqa: E501 - self._status = status - - @property - def env_references(self): - """Get the env_references of this TemplateSummarySummaryTasks. - - :return: The env_references of this TemplateSummarySummaryTasks. - :rtype: list[object] - """ # noqa: E501 - return self._env_references - - @env_references.setter - def env_references(self, env_references): - """Set the env_references of this TemplateSummarySummaryTasks. - - :param env_references: The env_references of this TemplateSummarySummaryTasks. - :type: list[object] - """ # noqa: E501 - self._env_references = env_references - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryTasks): - 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/frogpilot/third_party/influxdb_client/domain/template_summary_summary_variables.py b/frogpilot/third_party/influxdb_client/domain/template_summary_summary_variables.py deleted file mode 100644 index 458ea473d..000000000 --- a/frogpilot/third_party/influxdb_client/domain/template_summary_summary_variables.py +++ /dev/null @@ -1,291 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class TemplateSummarySummaryVariables(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'kind': 'TemplateKind', - 'template_meta_name': 'str', - 'id': 'str', - 'org_id': 'str', - 'name': 'str', - 'description': 'str', - 'arguments': 'VariableProperties', - 'label_associations': 'list[TemplateSummaryLabel]', - 'env_references': 'list[object]' - } - - attribute_map = { - 'kind': 'kind', - 'template_meta_name': 'templateMetaName', - 'id': 'id', - 'org_id': 'orgID', - 'name': 'name', - 'description': 'description', - 'arguments': 'arguments', - 'label_associations': 'labelAssociations', - 'env_references': 'envReferences' - } - - def __init__(self, kind=None, template_meta_name=None, id=None, org_id=None, name=None, description=None, arguments=None, label_associations=None, env_references=None): # noqa: E501,D401,D403 - """TemplateSummarySummaryVariables - a model defined in OpenAPI.""" # noqa: E501 - self._kind = None - self._template_meta_name = None - self._id = None - self._org_id = None - self._name = None - self._description = None - self._arguments = None - self._label_associations = None - self._env_references = None - self.discriminator = None - - if kind is not None: - self.kind = kind - if template_meta_name is not None: - self.template_meta_name = template_meta_name - if id is not None: - self.id = id - if org_id is not None: - self.org_id = org_id - if name is not None: - self.name = name - if description is not None: - self.description = description - if arguments is not None: - self.arguments = arguments - if label_associations is not None: - self.label_associations = label_associations - if env_references is not None: - self.env_references = env_references - - @property - def kind(self): - """Get the kind of this TemplateSummarySummaryVariables. - - :return: The kind of this TemplateSummarySummaryVariables. - :rtype: TemplateKind - """ # noqa: E501 - return self._kind - - @kind.setter - def kind(self, kind): - """Set the kind of this TemplateSummarySummaryVariables. - - :param kind: The kind of this TemplateSummarySummaryVariables. - :type: TemplateKind - """ # noqa: E501 - self._kind = kind - - @property - def template_meta_name(self): - """Get the template_meta_name of this TemplateSummarySummaryVariables. - - :return: The template_meta_name of this TemplateSummarySummaryVariables. - :rtype: str - """ # noqa: E501 - return self._template_meta_name - - @template_meta_name.setter - def template_meta_name(self, template_meta_name): - """Set the template_meta_name of this TemplateSummarySummaryVariables. - - :param template_meta_name: The template_meta_name of this TemplateSummarySummaryVariables. - :type: str - """ # noqa: E501 - self._template_meta_name = template_meta_name - - @property - def id(self): - """Get the id of this TemplateSummarySummaryVariables. - - :return: The id of this TemplateSummarySummaryVariables. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this TemplateSummarySummaryVariables. - - :param id: The id of this TemplateSummarySummaryVariables. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this TemplateSummarySummaryVariables. - - :return: The org_id of this TemplateSummarySummaryVariables. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this TemplateSummarySummaryVariables. - - :param org_id: The org_id of this TemplateSummarySummaryVariables. - :type: str - """ # noqa: E501 - self._org_id = org_id - - @property - def name(self): - """Get the name of this TemplateSummarySummaryVariables. - - :return: The name of this TemplateSummarySummaryVariables. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this TemplateSummarySummaryVariables. - - :param name: The name of this TemplateSummarySummaryVariables. - :type: str - """ # noqa: E501 - self._name = name - - @property - def description(self): - """Get the description of this TemplateSummarySummaryVariables. - - :return: The description of this TemplateSummarySummaryVariables. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this TemplateSummarySummaryVariables. - - :param description: The description of this TemplateSummarySummaryVariables. - :type: str - """ # noqa: E501 - self._description = description - - @property - def arguments(self): - """Get the arguments of this TemplateSummarySummaryVariables. - - :return: The arguments of this TemplateSummarySummaryVariables. - :rtype: VariableProperties - """ # noqa: E501 - return self._arguments - - @arguments.setter - def arguments(self, arguments): - """Set the arguments of this TemplateSummarySummaryVariables. - - :param arguments: The arguments of this TemplateSummarySummaryVariables. - :type: VariableProperties - """ # noqa: E501 - self._arguments = arguments - - @property - def label_associations(self): - """Get the label_associations of this TemplateSummarySummaryVariables. - - :return: The label_associations of this TemplateSummarySummaryVariables. - :rtype: list[TemplateSummaryLabel] - """ # noqa: E501 - return self._label_associations - - @label_associations.setter - def label_associations(self, label_associations): - """Set the label_associations of this TemplateSummarySummaryVariables. - - :param label_associations: The label_associations of this TemplateSummarySummaryVariables. - :type: list[TemplateSummaryLabel] - """ # noqa: E501 - self._label_associations = label_associations - - @property - def env_references(self): - """Get the env_references of this TemplateSummarySummaryVariables. - - :return: The env_references of this TemplateSummarySummaryVariables. - :rtype: list[object] - """ # noqa: E501 - return self._env_references - - @env_references.setter - def env_references(self, env_references): - """Set the env_references of this TemplateSummarySummaryVariables. - - :param env_references: The env_references of this TemplateSummarySummaryVariables. - :type: list[object] - """ # noqa: E501 - self._env_references = env_references - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TemplateSummarySummaryVariables): - 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/frogpilot/third_party/influxdb_client/domain/test_statement.py b/frogpilot/third_party/influxdb_client/domain/test_statement.py deleted file mode 100644 index e95753659..000000000 --- a/frogpilot/third_party/influxdb_client/domain/test_statement.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class TestStatement(Statement): - """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', - 'assignment': 'VariableAssignment' - } - - attribute_map = { - 'type': 'type', - 'assignment': 'assignment' - } - - 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 - - if type is not None: - self.type = type - if assignment is not None: - self.assignment = assignment - - @property - def type(self): - """Get the type of this TestStatement. - - Type of AST node - - :return: The type of this TestStatement. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this TestStatement. - - Type of AST node - - :param type: The type of this TestStatement. - :type: str - """ # noqa: E501 - self._type = type - - @property - def assignment(self): - """Get the assignment of this TestStatement. - - :return: The assignment of this TestStatement. - :rtype: VariableAssignment - """ # noqa: E501 - return self._assignment - - @assignment.setter - def assignment(self, assignment): - """Set the assignment of this TestStatement. - - :param assignment: The assignment of this TestStatement. - :type: VariableAssignment - """ # noqa: E501 - self._assignment = assignment - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, TestStatement): - 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/frogpilot/third_party/influxdb_client/domain/threshold.py b/frogpilot/third_party/influxdb_client/domain/threshold.py deleted file mode 100644 index 0999dc79c..000000000 --- a/frogpilot/third_party/influxdb_client/domain/threshold.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Threshold(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', - } - - attribute_map = { - 'type': 'type', - } - - discriminator_value_class_map = { - 'greater': 'GreaterThreshold', - 'lesser': 'LesserThreshold', - 'range': 'RangeThreshold' - } - - def __init__(self, type=None): # noqa: E501,D401,D403 - """Threshold - 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 Threshold. - - :return: The type of this Threshold. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this Threshold. - - :param type: The type of this Threshold. - :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.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Threshold): - 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/frogpilot/third_party/influxdb_client/domain/threshold_base.py b/frogpilot/third_party/influxdb_client/domain/threshold_base.py deleted file mode 100644 index dad715ca0..000000000 --- a/frogpilot/third_party/influxdb_client/domain/threshold_base.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ThresholdBase(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 = { - 'level': 'CheckStatusLevel', - 'all_values': 'bool' - } - - attribute_map = { - 'level': 'level', - 'all_values': 'allValues' - } - - def __init__(self, level=None, all_values=None): # noqa: E501,D401,D403 - """ThresholdBase - a model defined in OpenAPI.""" # noqa: E501 - self._level = None - self._all_values = None - self.discriminator = None - - if level is not None: - self.level = level - if all_values is not None: - self.all_values = all_values - - @property - def level(self): - """Get the level of this ThresholdBase. - - :return: The level of this ThresholdBase. - :rtype: CheckStatusLevel - """ # noqa: E501 - return self._level - - @level.setter - def level(self, level): - """Set the level of this ThresholdBase. - - :param level: The level of this ThresholdBase. - :type: CheckStatusLevel - """ # noqa: E501 - self._level = level - - @property - def all_values(self): - """Get the all_values of this ThresholdBase. - - If true, only alert if all values meet threshold. - - :return: The all_values of this ThresholdBase. - :rtype: bool - """ # noqa: E501 - return self._all_values - - @all_values.setter - def all_values(self, all_values): - """Set the all_values of this ThresholdBase. - - If true, only alert if all values meet threshold. - - :param all_values: The all_values of this ThresholdBase. - :type: bool - """ # noqa: E501 - self._all_values = all_values - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ThresholdBase): - 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/frogpilot/third_party/influxdb_client/domain/threshold_check.py b/frogpilot/third_party/influxdb_client/domain/threshold_check.py deleted file mode 100644 index 30504cb02..000000000 --- a/frogpilot/third_party/influxdb_client/domain/threshold_check.py +++ /dev/null @@ -1,273 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.check_discriminator import CheckDiscriminator - - -class ThresholdCheck(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', - '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', - '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="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 - 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 - - 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): - """Get the type of this ThresholdCheck. - - :return: The type of this ThresholdCheck. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this ThresholdCheck. - - :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 - def thresholds(self): - """Get the thresholds of this ThresholdCheck. - - :return: The thresholds of this ThresholdCheck. - :rtype: list[Threshold] - """ # noqa: E501 - return self._thresholds - - @thresholds.setter - def thresholds(self, thresholds): - """Set the thresholds of this ThresholdCheck. - - :param thresholds: The thresholds of this ThresholdCheck. - :type: list[Threshold] - """ # 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, ThresholdCheck): - 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/frogpilot/third_party/influxdb_client/domain/unary_expression.py b/frogpilot/third_party/influxdb_client/domain/unary_expression.py deleted file mode 100644 index 0d6fae08a..000000000 --- a/frogpilot/third_party/influxdb_client/domain/unary_expression.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class UnaryExpression(Expression): - """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', - 'operator': 'str', - 'argument': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'operator': 'operator', - 'argument': 'argument' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if operator is not None: - self.operator = operator - if argument is not None: - self.argument = argument - - @property - def type(self): - """Get the type of this UnaryExpression. - - Type of AST node - - :return: The type of this UnaryExpression. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this UnaryExpression. - - Type of AST node - - :param type: The type of this UnaryExpression. - :type: str - """ # noqa: E501 - self._type = type - - @property - def operator(self): - """Get the operator of this UnaryExpression. - - :return: The operator of this UnaryExpression. - :rtype: str - """ # noqa: E501 - return self._operator - - @operator.setter - def operator(self, operator): - """Set the operator of this UnaryExpression. - - :param operator: The operator of this UnaryExpression. - :type: str - """ # noqa: E501 - self._operator = operator - - @property - def argument(self): - """Get the argument of this UnaryExpression. - - :return: The argument of this UnaryExpression. - :rtype: Expression - """ # noqa: E501 - return self._argument - - @argument.setter - def argument(self, argument): - """Set the argument of this UnaryExpression. - - :param argument: The argument of this UnaryExpression. - :type: Expression - """ # noqa: E501 - self._argument = argument - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, UnaryExpression): - 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/frogpilot/third_party/influxdb_client/domain/unsigned_integer_literal.py b/frogpilot/third_party/influxdb_client/domain/unsigned_integer_literal.py deleted file mode 100644 index b7692a15f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/unsigned_integer_literal.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.expression import Expression - - -class UnsignedIntegerLiteral(Expression): - """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', - 'value': 'str' - } - - attribute_map = { - 'type': 'type', - 'value': 'value' - } - - 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 - - if type is not None: - self.type = type - if value is not None: - self.value = value - - @property - def type(self): - """Get the type of this UnsignedIntegerLiteral. - - Type of AST node - - :return: The type of this UnsignedIntegerLiteral. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this UnsignedIntegerLiteral. - - Type of AST node - - :param type: The type of this UnsignedIntegerLiteral. - :type: str - """ # noqa: E501 - self._type = type - - @property - def value(self): - """Get the value of this UnsignedIntegerLiteral. - - :return: The value of this UnsignedIntegerLiteral. - :rtype: str - """ # noqa: E501 - return self._value - - @value.setter - def value(self, value): - """Set the value of this UnsignedIntegerLiteral. - - :param value: The value of this UnsignedIntegerLiteral. - :type: str - """ # noqa: E501 - self._value = value - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, UnsignedIntegerLiteral): - 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/frogpilot/third_party/influxdb_client/domain/user.py b/frogpilot/third_party/influxdb_client/domain/user.py deleted file mode 100644 index 6b7a28c68..000000000 --- a/frogpilot/third_party/influxdb_client/domain/user.py +++ /dev/null @@ -1,166 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class User(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - 'id': 'str', - 'name': 'str', - 'status': 'str' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'status': 'status' - } - - def __init__(self, id=None, name=None, status='active'): # noqa: E501,D401,D403 - """User - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._name = None - self._status = None - self.discriminator = None - - if id is not None: - self.id = id - self.name = name - if status is not None: - self.status = status - - @property - def id(self): - """Get the id of this User. - - The user ID. - - :return: The id of this User. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this User. - - The user ID. - - :param id: The id of this User. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this User. - - The user name. - - :return: The name of this User. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this User. - - The user name. - - :param name: The name of this User. - :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 User. - - If `inactive`, the user is inactive. Default is `active`. - - :return: The status of this User. - :rtype: str - """ # noqa: E501 - return self._status - - @status.setter - def status(self, status): - """Set the status of this User. - - If `inactive`, the user is inactive. Default is `active`. - - :param status: The status of this User. - :type: str - """ # noqa: E501 - self._status = status - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, User): - 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/frogpilot/third_party/influxdb_client/domain/user_response.py b/frogpilot/third_party/influxdb_client/domain/user_response.py deleted file mode 100644 index a4a163f78..000000000 --- a/frogpilot/third_party/influxdb_client/domain/user_response.py +++ /dev/null @@ -1,189 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -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', - 'name': 'str', - 'status': 'str', - 'links': 'UserResponseLinks' - } - - attribute_map = { - 'id': 'id', - 'name': 'name', - 'status': 'status', - 'links': 'links' - } - - def __init__(self, id=None, name=None, status='active', links=None): # noqa: E501,D401,D403 - """UserResponse - a model defined in OpenAPI.""" # noqa: E501 - self._id = None - self._name = None - self._status = None - self._links = None - self.discriminator = None - - if id is not None: - self.id = 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. - - The user ID. - - :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. - - The user ID. - - :param id: The id of this UserResponse. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this UserResponse. - - The user name. - - :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. - - The user name. - - :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. - - The status of a user. An inactive user can't read or write resources. - - :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. - - The status of a user. An inactive user can't read or write resources. - - :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 self.openapi_types.items(): - 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/frogpilot/third_party/influxdb_client/domain/user_response_links.py b/frogpilot/third_party/influxdb_client/domain/user_response_links.py deleted file mode 100644 index bf825cf2b..000000000 --- a/frogpilot/third_party/influxdb_client/domain/user_response_links.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class UserResponseLinks(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 = { - '_self': 'str' - } - - attribute_map = { - '_self': 'self' - } - - def __init__(self, _self=None): # noqa: E501,D401,D403 - """UserResponseLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self.discriminator = None - - if _self is not None: - self._self = _self - - @property - def _self(self): - """Get the _self of this UserResponseLinks. - - :return: The _self of this UserResponseLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this UserResponseLinks. - - :param _self: The _self of this UserResponseLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, UserResponseLinks): - 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/frogpilot/third_party/influxdb_client/domain/users.py b/frogpilot/third_party/influxdb_client/domain/users.py deleted file mode 100644 index 067116c98..000000000 --- a/frogpilot/third_party/influxdb_client/domain/users.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Users(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 = { - 'links': 'ResourceMembersLinks', - 'users': 'list[UserResponse]' - } - - attribute_map = { - 'links': 'links', - 'users': 'users' - } - - def __init__(self, links=None, users=None): # noqa: E501,D401,D403 - """Users - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._users = None - self.discriminator = None - - if links is not None: - self.links = links - if users is not None: - self.users = users - - @property - def links(self): - """Get the links of this Users. - - :return: The links of this Users. - :rtype: ResourceMembersLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Users. - - :param links: The links of this Users. - :type: ResourceMembersLinks - """ # noqa: E501 - self._links = links - - @property - def users(self): - """Get the users of this Users. - - :return: The users of this Users. - :rtype: list[UserResponse] - """ # noqa: E501 - return self._users - - @users.setter - def users(self, users): - """Set the users of this Users. - - :param users: The users of this Users. - :type: list[UserResponse] - """ # noqa: E501 - self._users = users - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Users): - 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/frogpilot/third_party/influxdb_client/domain/variable.py b/frogpilot/third_party/influxdb_client/domain/variable.py deleted file mode 100644 index 4c1b2800f..000000000 --- a/frogpilot/third_party/influxdb_client/domain/variable.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Variable(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 = { - 'links': 'VariableLinks', - 'id': 'str', - 'org_id': 'str', - 'name': 'str', - 'description': 'str', - 'selected': 'list[str]', - 'labels': 'list[Label]', - 'arguments': 'VariableProperties', - 'created_at': 'datetime', - 'updated_at': 'datetime' - } - - attribute_map = { - 'links': 'links', - 'id': 'id', - 'org_id': 'orgID', - 'name': 'name', - 'description': 'description', - 'selected': 'selected', - 'labels': 'labels', - 'arguments': 'arguments', - 'created_at': 'createdAt', - 'updated_at': 'updatedAt' - } - - def __init__(self, links=None, id=None, org_id=None, name=None, description=None, selected=None, labels=None, arguments=None, created_at=None, updated_at=None): # noqa: E501,D401,D403 - """Variable - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._id = None - self._org_id = None - self._name = None - self._description = None - self._selected = None - self._labels = None - self._arguments = None - self._created_at = None - self._updated_at = None - self.discriminator = None - - if links is not None: - self.links = links - if id is not None: - self.id = id - self.org_id = org_id - self.name = name - if description is not None: - self.description = description - if selected is not None: - self.selected = selected - if labels is not None: - self.labels = labels - self.arguments = arguments - if created_at is not None: - self.created_at = created_at - if updated_at is not None: - self.updated_at = updated_at - - @property - def links(self): - """Get the links of this Variable. - - :return: The links of this Variable. - :rtype: VariableLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Variable. - - :param links: The links of this Variable. - :type: VariableLinks - """ # noqa: E501 - self._links = links - - @property - def id(self): - """Get the id of this Variable. - - :return: The id of this Variable. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this Variable. - - :param id: The id of this Variable. - :type: str - """ # noqa: E501 - self._id = id - - @property - def org_id(self): - """Get the org_id of this Variable. - - :return: The org_id of this Variable. - :rtype: str - """ # noqa: E501 - return self._org_id - - @org_id.setter - def org_id(self, org_id): - """Set the org_id of this Variable. - - :param org_id: The org_id of this Variable. - :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 - def name(self): - """Get the name of this Variable. - - :return: The name of this Variable. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this Variable. - - :param name: The name of this Variable. - :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 Variable. - - :return: The description of this Variable. - :rtype: str - """ # noqa: E501 - return self._description - - @description.setter - def description(self, description): - """Set the description of this Variable. - - :param description: The description of this Variable. - :type: str - """ # noqa: E501 - self._description = description - - @property - def selected(self): - """Get the selected of this Variable. - - :return: The selected of this Variable. - :rtype: list[str] - """ # noqa: E501 - return self._selected - - @selected.setter - def selected(self, selected): - """Set the selected of this Variable. - - :param selected: The selected of this Variable. - :type: list[str] - """ # noqa: E501 - self._selected = selected - - @property - def labels(self): - """Get the labels of this Variable. - - :return: The labels of this Variable. - :rtype: list[Label] - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this Variable. - - :param labels: The labels of this Variable. - :type: list[Label] - """ # noqa: E501 - self._labels = labels - - @property - def arguments(self): - """Get the arguments of this Variable. - - :return: The arguments of this Variable. - :rtype: VariableProperties - """ # noqa: E501 - return self._arguments - - @arguments.setter - def arguments(self, arguments): - """Set the arguments of this Variable. - - :param arguments: The arguments of this Variable. - :type: VariableProperties - """ # noqa: E501 - if arguments is None: - raise ValueError("Invalid value for `arguments`, must not be `None`") # noqa: E501 - self._arguments = arguments - - @property - def created_at(self): - """Get the created_at of this Variable. - - :return: The created_at of this Variable. - :rtype: datetime - """ # noqa: E501 - return self._created_at - - @created_at.setter - def created_at(self, created_at): - """Set the created_at of this Variable. - - :param created_at: The created_at of this Variable. - :type: datetime - """ # noqa: E501 - self._created_at = created_at - - @property - def updated_at(self): - """Get the updated_at of this Variable. - - :return: The updated_at of this Variable. - :rtype: datetime - """ # noqa: E501 - return self._updated_at - - @updated_at.setter - def updated_at(self, updated_at): - """Set the updated_at of this Variable. - - :param updated_at: The updated_at of this Variable. - :type: datetime - """ # noqa: E501 - self._updated_at = updated_at - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Variable): - 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/frogpilot/third_party/influxdb_client/domain/variable_assignment.py b/frogpilot/third_party/influxdb_client/domain/variable_assignment.py deleted file mode 100644 index c13e54939..000000000 --- a/frogpilot/third_party/influxdb_client/domain/variable_assignment.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.statement import Statement - - -class VariableAssignment(Statement): - """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': 'Identifier', - 'init': 'Expression' - } - - attribute_map = { - 'type': 'type', - 'id': 'id', - 'init': 'init' - } - - 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 - self.discriminator = None - - if type is not None: - self.type = type - if id is not None: - self.id = id - if init is not None: - self.init = init - - @property - def type(self): - """Get the type of this VariableAssignment. - - Type of AST node - - :return: The type of this VariableAssignment. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this VariableAssignment. - - Type of AST node - - :param type: The type of this VariableAssignment. - :type: str - """ # noqa: E501 - self._type = type - - @property - def id(self): - """Get the id of this VariableAssignment. - - :return: The id of this VariableAssignment. - :rtype: Identifier - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this VariableAssignment. - - :param id: The id of this VariableAssignment. - :type: Identifier - """ # noqa: E501 - self._id = id - - @property - def init(self): - """Get the init of this VariableAssignment. - - :return: The init of this VariableAssignment. - :rtype: Expression - """ # noqa: E501 - return self._init - - @init.setter - def init(self, init): - """Set the init of this VariableAssignment. - - :param init: The init of this VariableAssignment. - :type: Expression - """ # noqa: E501 - self._init = init - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, VariableAssignment): - 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/frogpilot/third_party/influxdb_client/domain/variable_links.py b/frogpilot/third_party/influxdb_client/domain/variable_links.py deleted file mode 100644 index 44a8237d1..000000000 --- a/frogpilot/third_party/influxdb_client/domain/variable_links.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class VariableLinks(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 = { - '_self': 'str', - 'org': 'str', - 'labels': 'str' - } - - attribute_map = { - '_self': 'self', - 'org': 'org', - 'labels': 'labels' - } - - def __init__(self, _self=None, org=None, labels=None): # noqa: E501,D401,D403 - """VariableLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self._org = None - self._labels = None - self.discriminator = None - - if _self is not None: - self._self = _self - if org is not None: - self.org = org - if labels is not None: - self.labels = labels - - @property - def _self(self): - """Get the _self of this VariableLinks. - - :return: The _self of this VariableLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this VariableLinks. - - :param _self: The _self of this VariableLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - @property - def org(self): - """Get the org of this VariableLinks. - - :return: The org of this VariableLinks. - :rtype: str - """ # noqa: E501 - return self._org - - @org.setter - def org(self, org): - """Set the org of this VariableLinks. - - :param org: The org of this VariableLinks. - :type: str - """ # noqa: E501 - self._org = org - - @property - def labels(self): - """Get the labels of this VariableLinks. - - :return: The labels of this VariableLinks. - :rtype: str - """ # noqa: E501 - return self._labels - - @labels.setter - def labels(self, labels): - """Set the labels of this VariableLinks. - - :param labels: The labels of this VariableLinks. - :type: str - """ # noqa: E501 - self._labels = labels - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, VariableLinks): - 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/frogpilot/third_party/influxdb_client/domain/variable_properties.py b/frogpilot/third_party/influxdb_client/domain/variable_properties.py deleted file mode 100644 index c9d9d1532..000000000 --- a/frogpilot/third_party/influxdb_client/domain/variable_properties.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class VariableProperties(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501,D401,D403 - """VariableProperties - 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 self.openapi_types.items(): - 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, VariableProperties): - 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/frogpilot/third_party/influxdb_client/domain/variables.py b/frogpilot/third_party/influxdb_client/domain/variables.py deleted file mode 100644 index 50ebbf3c6..000000000 --- a/frogpilot/third_party/influxdb_client/domain/variables.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Variables(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 = { - 'variables': 'list[Variable]' - } - - attribute_map = { - 'variables': 'variables' - } - - def __init__(self, variables=None): # noqa: E501,D401,D403 - """Variables - a model defined in OpenAPI.""" # noqa: E501 - self._variables = None - self.discriminator = None - - if variables is not None: - self.variables = variables - - @property - def variables(self): - """Get the variables of this Variables. - - :return: The variables of this Variables. - :rtype: list[Variable] - """ # noqa: E501 - return self._variables - - @variables.setter - def variables(self, variables): - """Set the variables of this Variables. - - :param variables: The variables of this Variables. - :type: list[Variable] - """ # noqa: E501 - self._variables = variables - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Variables): - 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/frogpilot/third_party/influxdb_client/domain/view.py b/frogpilot/third_party/influxdb_client/domain/view.py deleted file mode 100644 index 567125364..000000000 --- a/frogpilot/third_party/influxdb_client/domain/view.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class View(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 = { - 'links': 'ViewLinks', - 'id': 'str', - 'name': 'str', - 'properties': 'ViewProperties' - } - - attribute_map = { - 'links': 'links', - 'id': 'id', - 'name': 'name', - 'properties': 'properties' - } - - def __init__(self, links=None, id=None, name=None, properties=None): # noqa: E501,D401,D403 - """View - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._id = None - self._name = None - self._properties = None - self.discriminator = None - - if links is not None: - self.links = links - if id is not None: - self.id = id - self.name = name - self.properties = properties - - @property - def links(self): - """Get the links of this View. - - :return: The links of this View. - :rtype: ViewLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this View. - - :param links: The links of this View. - :type: ViewLinks - """ # noqa: E501 - self._links = links - - @property - def id(self): - """Get the id of this View. - - :return: The id of this View. - :rtype: str - """ # noqa: E501 - return self._id - - @id.setter - def id(self, id): - """Set the id of this View. - - :param id: The id of this View. - :type: str - """ # noqa: E501 - self._id = id - - @property - def name(self): - """Get the name of this View. - - :return: The name of this View. - :rtype: str - """ # noqa: E501 - return self._name - - @name.setter - def name(self, name): - """Set the name of this View. - - :param name: The name of this View. - :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 properties(self): - """Get the properties of this View. - - :return: The properties of this View. - :rtype: ViewProperties - """ # noqa: E501 - return self._properties - - @properties.setter - def properties(self, properties): - """Set the properties of this View. - - :param properties: The properties of this View. - :type: ViewProperties - """ # noqa: E501 - if properties is None: - raise ValueError("Invalid value for `properties`, must not be `None`") # noqa: E501 - self._properties = properties - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, View): - 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/frogpilot/third_party/influxdb_client/domain/view_links.py b/frogpilot/third_party/influxdb_client/domain/view_links.py deleted file mode 100644 index 8705bc1f4..000000000 --- a/frogpilot/third_party/influxdb_client/domain/view_links.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ViewLinks(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 = { - '_self': 'str' - } - - attribute_map = { - '_self': 'self' - } - - def __init__(self, _self=None): # noqa: E501,D401,D403 - """ViewLinks - a model defined in OpenAPI.""" # noqa: E501 - self.__self = None - self.discriminator = None - - if _self is not None: - self._self = _self - - @property - def _self(self): - """Get the _self of this ViewLinks. - - :return: The _self of this ViewLinks. - :rtype: str - """ # noqa: E501 - return self.__self - - @_self.setter - def _self(self, _self): - """Set the _self of this ViewLinks. - - :param _self: The _self of this ViewLinks. - :type: str - """ # noqa: E501 - self.__self = _self - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, ViewLinks): - 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/frogpilot/third_party/influxdb_client/domain/view_properties.py b/frogpilot/third_party/influxdb_client/domain/view_properties.py deleted file mode 100644 index e08c354ae..000000000 --- a/frogpilot/third_party/influxdb_client/domain/view_properties.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class ViewProperties(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = { - } - - attribute_map = { - } - - def __init__(self): # noqa: E501,D401,D403 - """ViewProperties - 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 self.openapi_types.items(): - 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, ViewProperties): - 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/frogpilot/third_party/influxdb_client/domain/views.py b/frogpilot/third_party/influxdb_client/domain/views.py deleted file mode 100644 index a9bbb6490..000000000 --- a/frogpilot/third_party/influxdb_client/domain/views.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class Views(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 = { - 'links': 'ViewLinks', - 'views': 'list[View]' - } - - attribute_map = { - 'links': 'links', - 'views': 'views' - } - - def __init__(self, links=None, views=None): # noqa: E501,D401,D403 - """Views - a model defined in OpenAPI.""" # noqa: E501 - self._links = None - self._views = None - self.discriminator = None - - if links is not None: - self.links = links - if views is not None: - self.views = views - - @property - def links(self): - """Get the links of this Views. - - :return: The links of this Views. - :rtype: ViewLinks - """ # noqa: E501 - return self._links - - @links.setter - def links(self, links): - """Set the links of this Views. - - :param links: The links of this Views. - :type: ViewLinks - """ # noqa: E501 - self._links = links - - @property - def views(self): - """Get the views of this Views. - - :return: The views of this Views. - :rtype: list[View] - """ # noqa: E501 - return self._views - - @views.setter - def views(self, views): - """Set the views of this Views. - - :param views: The views of this Views. - :type: list[View] - """ # noqa: E501 - self._views = views - - def to_dict(self): - """Return the model properties as a dict.""" - result = {} - - for attr, _ in self.openapi_types.items(): - 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, Views): - 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/frogpilot/third_party/influxdb_client/domain/write_precision.py b/frogpilot/third_party/influxdb_client/domain/write_precision.py deleted file mode 100644 index 41a0db934..000000000 --- a/frogpilot/third_party/influxdb_client/domain/write_precision.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class WritePrecision(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - MS = "ms" - S = "s" - US = "us" - NS = "ns" - - """ - 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 - """WritePrecision - 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 self.openapi_types.items(): - 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, WritePrecision): - 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/frogpilot/third_party/influxdb_client/domain/xy_geom.py b/frogpilot/third_party/influxdb_client/domain/xy_geom.py deleted file mode 100644 index 367806b4e..000000000 --- a/frogpilot/third_party/influxdb_client/domain/xy_geom.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - - -class XYGeom(object): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - allowed enum values - """ - LINE = "line" - STEP = "step" - STACKED = "stacked" - BAR = "bar" - MONOTONEX = "monotoneX" - STEPBEFORE = "stepBefore" - STEPAFTER = "stepAfter" - - """ - 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 - """XYGeom - 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 self.openapi_types.items(): - 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, XYGeom): - 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/frogpilot/third_party/influxdb_client/domain/xy_view_properties.py b/frogpilot/third_party/influxdb_client/domain/xy_view_properties.py deleted file mode 100644 index 817967c21..000000000 --- a/frogpilot/third_party/influxdb_client/domain/xy_view_properties.py +++ /dev/null @@ -1,776 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -from influxdb_client.domain.view_properties import ViewProperties - - -class XYViewProperties(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 = { - 'adaptive_zoom_hide': 'bool', - 'time_format': 'str', - 'type': 'str', - 'queries': 'list[DashboardQuery]', - 'colors': 'list[DashboardColor]', - 'color_mapping': 'dict(str, str)', - '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', - 'shade_below': 'bool', - 'hover_dimension': 'str', - 'position': 'str', - 'geom': 'XYGeom', - 'legend_colorize_rows': 'bool', - 'legend_hide': 'bool', - 'legend_opacity': 'float', - 'legend_orientation_threshold': 'int' - } - - attribute_map = { - 'adaptive_zoom_hide': 'adaptiveZoomHide', - 'time_format': 'timeFormat', - 'type': 'type', - 'queries': 'queries', - 'colors': 'colors', - 'color_mapping': 'colorMapping', - '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', - 'shade_below': 'shadeBelow', - 'hover_dimension': 'hoverDimension', - 'position': 'position', - 'geom': 'geom', - 'legend_colorize_rows': 'legendColorizeRows', - 'legend_hide': 'legendHide', - 'legend_opacity': 'legendOpacity', - 'legend_orientation_threshold': 'legendOrientationThreshold' - } - - def __init__(self, adaptive_zoom_hide=None, time_format=None, type=None, queries=None, colors=None, color_mapping=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 - - self._adaptive_zoom_hide = None - self._time_format = None - self._type = None - self._queries = None - self._colors = None - self._color_mapping = 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._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 adaptive_zoom_hide is not None: - self.adaptive_zoom_hide = adaptive_zoom_hide - if time_format is not None: - self.time_format = time_format - self.type = type - self.queries = queries - self.colors = colors - if color_mapping is not None: - self.color_mapping = color_mapping - 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 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 adaptive_zoom_hide(self): - """Get the adaptive_zoom_hide of this XYViewProperties. - - :return: The adaptive_zoom_hide of this XYViewProperties. - :rtype: bool - """ # noqa: E501 - return self._adaptive_zoom_hide - - @adaptive_zoom_hide.setter - def adaptive_zoom_hide(self, adaptive_zoom_hide): - """Set the adaptive_zoom_hide of this XYViewProperties. - - :param adaptive_zoom_hide: The adaptive_zoom_hide of this XYViewProperties. - :type: bool - """ # noqa: E501 - self._adaptive_zoom_hide = adaptive_zoom_hide - - @property - def time_format(self): - """Get the time_format of this XYViewProperties. - - :return: The time_format of this XYViewProperties. - :rtype: str - """ # noqa: E501 - return self._time_format - - @time_format.setter - def time_format(self, time_format): - """Set the time_format of this XYViewProperties. - - :param time_format: The time_format of this XYViewProperties. - :type: str - """ # noqa: E501 - self._time_format = time_format - - @property - def type(self): - """Get the type of this XYViewProperties. - - :return: The type of this XYViewProperties. - :rtype: str - """ # noqa: E501 - return self._type - - @type.setter - def type(self, type): - """Set the type of this XYViewProperties. - - :param type: The type of this XYViewProperties. - :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 XYViewProperties. - - :return: The queries of this XYViewProperties. - :rtype: list[DashboardQuery] - """ # noqa: E501 - return self._queries - - @queries.setter - def queries(self, queries): - """Set the queries of this XYViewProperties. - - :param queries: The queries of this XYViewProperties. - :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 XYViewProperties. - - Colors define color encoding of data into a visualization - - :return: The colors of this XYViewProperties. - :rtype: list[DashboardColor] - """ # noqa: E501 - return self._colors - - @colors.setter - def colors(self, colors): - """Set the colors of this XYViewProperties. - - Colors define color encoding of data into a visualization - - :param colors: The colors of this XYViewProperties. - :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 color_mapping(self): - """Get the color_mapping of this XYViewProperties. - - A color mapping is an object that maps time series data to a UI color scheme to allow the UI to render graphs consistent colors across reloads. - - :return: The color_mapping of this XYViewProperties. - :rtype: dict(str, str) - """ # noqa: E501 - return self._color_mapping - - @color_mapping.setter - def color_mapping(self, color_mapping): - """Set the color_mapping of this XYViewProperties. - - A color mapping is an object that maps time series data to a UI color scheme to allow the UI to render graphs consistent colors across reloads. - - :param color_mapping: The color_mapping of this XYViewProperties. - :type: dict(str, str) - """ # noqa: E501 - self._color_mapping = color_mapping - - @property - def shape(self): - """Get the shape of this XYViewProperties. - - :return: The shape of this XYViewProperties. - :rtype: str - """ # noqa: E501 - return self._shape - - @shape.setter - def shape(self, shape): - """Set the shape of this XYViewProperties. - - :param shape: The shape of this XYViewProperties. - :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 XYViewProperties. - - :return: The note of this XYViewProperties. - :rtype: str - """ # noqa: E501 - return self._note - - @note.setter - def note(self, note): - """Set the note of this XYViewProperties. - - :param note: The note of this XYViewProperties. - :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 XYViewProperties. - - If true, will display note when empty - - :return: The show_note_when_empty of this XYViewProperties. - :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 XYViewProperties. - - If true, will display note when empty - - :param show_note_when_empty: The show_note_when_empty of this XYViewProperties. - :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 XYViewProperties. - - :return: The axes of this XYViewProperties. - :rtype: Axes - """ # noqa: E501 - return self._axes - - @axes.setter - def axes(self, axes): - """Set the axes of this XYViewProperties. - - :param axes: The axes of this XYViewProperties. - :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 XYViewProperties. - - :return: The static_legend of this XYViewProperties. - :rtype: StaticLegend - """ # noqa: E501 - return self._static_legend - - @static_legend.setter - def static_legend(self, static_legend): - """Set the static_legend of this XYViewProperties. - - :param static_legend: The static_legend of this XYViewProperties. - :type: StaticLegend - """ # noqa: E501 - self._static_legend = static_legend - - @property - def x_column(self): - """Get the x_column of this XYViewProperties. - - :return: The x_column of this XYViewProperties. - :rtype: str - """ # noqa: E501 - return self._x_column - - @x_column.setter - def x_column(self, x_column): - """Set the x_column of this XYViewProperties. - - :param x_column: The x_column of this XYViewProperties. - :type: str - """ # 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. - - :return: The y_column of this XYViewProperties. - :rtype: str - """ # noqa: E501 - return self._y_column - - @y_column.setter - def y_column(self, y_column): - """Set the y_column of this XYViewProperties. - - :param y_column: The y_column of this XYViewProperties. - :type: str - """ # 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. - - :return: The shade_below of this XYViewProperties. - :rtype: bool - """ # noqa: E501 - return self._shade_below - - @shade_below.setter - def shade_below(self, shade_below): - """Set the shade_below of this XYViewProperties. - - :param shade_below: The shade_below of this XYViewProperties. - :type: bool - """ # 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. - - :return: The position of this XYViewProperties. - :rtype: str - """ # noqa: E501 - return self._position - - @position.setter - def position(self, position): - """Set the position of this XYViewProperties. - - :param position: The position of this XYViewProperties. - :type: str - """ # noqa: E501 - if position is None: - raise ValueError("Invalid value for `position`, must not be `None`") # noqa: E501 - self._position = position - - @property - def geom(self): - """Get the geom of this XYViewProperties. - - :return: The geom of this XYViewProperties. - :rtype: XYGeom - """ # noqa: E501 - return self._geom - - @geom.setter - def geom(self, geom): - """Set the geom of this XYViewProperties. - - :param geom: The geom of this XYViewProperties. - :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 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 = {} - - for attr, _ in self.openapi_types.items(): - 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, XYViewProperties): - 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/frogpilot/third_party/influxdb_client/extras.py b/frogpilot/third_party/influxdb_client/extras.py deleted file mode 100644 index 63ceb3b34..000000000 --- a/frogpilot/third_party/influxdb_client/extras.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Extras to selectively import Pandas or NumPy.""" - -try: - import pandas as pd -except ModuleNotFoundError as err: - raise ImportError(f"`query_data_frame` requires Pandas which couldn't be imported due: {err}") - -try: - import numpy as np -except ModuleNotFoundError as err: - raise ImportError(f"`data_frame` requires numpy which couldn't be imported due: {err}") - -__all__ = ['pd', 'np'] diff --git a/frogpilot/third_party/influxdb_client/py.typed b/frogpilot/third_party/influxdb_client/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/frogpilot/third_party/influxdb_client/rest.py b/frogpilot/third_party/influxdb_client/rest.py deleted file mode 100644 index cd4dbff45..000000000 --- a/frogpilot/third_party/influxdb_client/rest.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - -from __future__ import absolute_import - -import logging -from typing import Dict -from urllib3 import HTTPResponse -from influxdb_client.client.exceptions import InfluxDBError -from influxdb_client.configuration import Configuration - -_UTF_8_encoding = 'utf-8' - - -class ApiException(InfluxDBError): - """NOTE: This class is auto generated by OpenAPI Generator. - - Ref: https://openapi-generator.tech - Do not edit the class manually. - """ - - def __init__(self, status=None, reason=None, http_resp=None): - """Initialize with HTTP response.""" - super().__init__(response=http_resp) - if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data - if isinstance(http_resp, HTTPResponse): # response is HTTPResponse - self.headers = http_resp.headers - else: # response is RESTResponse - self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None - - def __str__(self): - """Get custom error messages for exception.""" - error_message = "({0})\n" \ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -class _BaseRESTClient(object): - logger = logging.getLogger('influxdb_client.client.http') - - @staticmethod - def log_request(method: str, url: str): - _BaseRESTClient.logger.debug(f">>> Request: '{method} {url}'") - - @staticmethod - def log_response(status: str): - _BaseRESTClient.logger.debug(f"<<< Response: {status}") - - @staticmethod - def log_body(body: object, prefix: str): - _BaseRESTClient.logger.debug(f"{prefix} Body: {body}") - - @staticmethod - def log_headers(headers: Dict[str, str], prefix: str): - for key, v in headers.items(): - value = v - if 'authorization' == key.lower(): - value = '***' - _BaseRESTClient.logger.debug(f"{prefix} {key}: {value}") - - -def _requires_create_user_session(configuration: Configuration, cookie: str, resource_path: str): - _unauthorized = ['/api/v2/signin', '/api/v2/signout'] - return configuration.username and configuration.password and not cookie and resource_path not in _unauthorized - - -def _requires_expire_user_session(configuration: Configuration, cookie: str): - return configuration.username and configuration.password and cookie diff --git a/frogpilot/third_party/influxdb_client/service/__init__.py b/frogpilot/third_party/influxdb_client/service/__init__.py deleted file mode 100644 index 0d21a4384..000000000 --- a/frogpilot/third_party/influxdb_client/service/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -# flake8: noqa - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -# import apis into api package -from influxdb_client.service.authorizations_service import AuthorizationsService -from influxdb_client.service.backup_service import BackupService -from influxdb_client.service.bucket_schemas_service import BucketSchemasService -from influxdb_client.service.buckets_service import BucketsService -from influxdb_client.service.cells_service import CellsService -from influxdb_client.service.checks_service import ChecksService -from influxdb_client.service.config_service import ConfigService -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.invokable_scripts_service import InvokableScriptsService -from influxdb_client.service.labels_service import LabelsService -from influxdb_client.service.legacy_authorizations_service import LegacyAuthorizationsService -from influxdb_client.service.metrics_service import MetricsService -from influxdb_client.service.notification_endpoints_service import NotificationEndpointsService -from influxdb_client.service.notification_rules_service import NotificationRulesService -from influxdb_client.service.organizations_service import OrganizationsService -from influxdb_client.service.ping_service import PingService -from influxdb_client.service.query_service import QueryService -from influxdb_client.service.ready_service import ReadyService -from influxdb_client.service.remote_connections_service import RemoteConnectionsService -from influxdb_client.service.replications_service import ReplicationsService -from influxdb_client.service.resources_service import ResourcesService -from influxdb_client.service.restore_service import RestoreService -from influxdb_client.service.routes_service import RoutesService -from influxdb_client.service.rules_service import RulesService -from influxdb_client.service.scraper_targets_service import ScraperTargetsService -from influxdb_client.service.secrets_service import SecretsService -from influxdb_client.service.setup_service import SetupService -from influxdb_client.service.signin_service import SigninService -from influxdb_client.service.signout_service import SignoutService -from influxdb_client.service.sources_service import SourcesService -from influxdb_client.service.tasks_service import TasksService -from influxdb_client.service.telegraf_plugins_service import TelegrafPluginsService -from influxdb_client.service.telegrafs_service import TelegrafsService -from influxdb_client.service.templates_service import TemplatesService -from influxdb_client.service.users_service import UsersService -from influxdb_client.service.variables_service import VariablesService -from influxdb_client.service.views_service import ViewsService -from influxdb_client.service.write_service import WriteService diff --git a/frogpilot/third_party/influxdb_client/service/_base_service.py b/frogpilot/third_party/influxdb_client/service/_base_service.py deleted file mode 100644 index d3e8f9955..000000000 --- a/frogpilot/third_party/influxdb_client/service/_base_service.py +++ /dev/null @@ -1,67 +0,0 @@ - - -# noinspection PyMethodMayBeStatic -class _BaseService(object): - - def __init__(self, api_client=None): - """Init common services operation.""" - if api_client is None: - raise ValueError("Invalid value for `api_client`, must be defined.") - self.api_client = api_client - self._build_type = None - - def _check_operation_params(self, operation_id, supported_params, local_params): - supported_params.append('async_req') - supported_params.append('_return_http_data_only') - supported_params.append('_preload_content') - supported_params.append('_request_timeout') - supported_params.append('urlopen_kw') - for key, val in local_params['kwargs'].items(): - if key not in supported_params: - raise TypeError( - f"Got an unexpected keyword argument '{key}'" - f" to method {operation_id}" - ) - local_params[key] = val - del local_params['kwargs'] - - def _is_cloud_instance(self) -> bool: - if not self._build_type: - self._build_type = self.build_type() - return 'cloud' in self._build_type.lower() - - async def _is_cloud_instance_async(self) -> bool: - if not self._build_type: - self._build_type = await self.build_type_async() - return 'cloud' in self._build_type.lower() - - def build_type(self) -> str: - """ - Return the build type of the connected InfluxDB Server. - - :return: The type of InfluxDB build. - """ - from influxdb_client import PingService - ping_service = PingService(self.api_client) - - response = ping_service.get_ping_with_http_info(_return_http_data_only=False) - return self.response_header(response, header_name='X-Influxdb-Build') - - async def build_type_async(self) -> str: - """ - Return the build type of the connected InfluxDB Server. - - :return: The type of InfluxDB build. - """ - from influxdb_client import PingService - ping_service = PingService(self.api_client) - - response = await ping_service.get_ping_async(_return_http_data_only=False) - return self.response_header(response, header_name='X-Influxdb-Build') - - def response_header(self, response, header_name='X-Influxdb-Version') -> str: - if response is not None and len(response) >= 3: - if header_name in response[2]: - return response[2][header_name] - - return "unknown" diff --git a/frogpilot/third_party/influxdb_client/service/authorizations_service.py b/frogpilot/third_party/influxdb_client/service/authorizations_service.py deleted file mode 100644 index 100160e29..000000000 --- a/frogpilot/third_party/influxdb_client/service/authorizations_service.py +++ /dev/null @@ -1,658 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class AuthorizationsService(_BaseService): - """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 - """AuthorizationsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete an authorization. - - Deletes an authorization. Use the endpoint to delete an API token. If you want to disable an API token instead of delete it, [update the authorization's status to `inactive`](#operation/PatchAuthorizationsID). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_authorizations_id(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization 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_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - return data - - def delete_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete an authorization. - - Deletes an authorization. Use the endpoint to delete an API token. If you want to disable an API token instead of delete it, [update the authorization's status to `inactive`](#operation/PatchAuthorizationsID). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_authorizations_id_with_http_info(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization 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, path_params, query_params, header_params, body_params = \ - self._delete_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/authorizations/{authID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_authorizations_id_async(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete an authorization. - - Deletes an authorization. Use the endpoint to delete an API token. If you want to disable an API token instead of delete it, [update the authorization's status to `inactive`](#operation/PatchAuthorizationsID). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization 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, path_params, query_params, header_params, body_params = \ - self._delete_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/authorizations/{authID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_authorizations_id_prepare(self, auth_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['auth_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_authorizations_id', all_params, local_var_params) - # verify the required parameter 'auth_id' is set - if ('auth_id' not in local_var_params or - local_var_params['auth_id'] is None): - raise ValueError("Missing the required parameter `auth_id` when calling `delete_authorizations_id`") # noqa: E501 - - path_params = {} - if 'auth_id' in local_var_params: - path_params['authID'] = local_var_params['auth_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_authorizations(self, **kwargs): # noqa: E501,D401,D403 - """List authorizations. - - Lists authorizations. To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations. #### InfluxDB Cloud - InfluxDB Cloud doesn't expose [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations. #### Required permissions To retrieve an authorization, the request must use an API token that has the following permissions: - `read-authorizations` - `read-user` for the user that the authorization is scoped to #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authorizations(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str user_id: A user ID. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str user: A user name. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str org_id: An organization ID. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str org: An organization name. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str token: An API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) value. Specifies an authorization by its `token` property value and returns the authorization. #### InfluxDB OSS - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. #### Limitations - The parameter is non-repeatable. If you specify more than one, only the first one is used. If a resource with the specified property value doesn't exist, then the response body contains an empty list. - :return: Authorizations - 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_authorizations_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_authorizations_with_http_info(**kwargs) # noqa: E501 - return data - - def get_authorizations_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List authorizations. - - Lists authorizations. To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations. #### InfluxDB Cloud - InfluxDB Cloud doesn't expose [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations. #### Required permissions To retrieve an authorization, the request must use an API token that has the following permissions: - `read-authorizations` - `read-user` for the user that the authorization is scoped to #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authorizations_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str user_id: A user ID. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str user: A user name. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str org_id: An organization ID. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str org: An organization name. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str token: An API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) value. Specifies an authorization by its `token` property value and returns the authorization. #### InfluxDB OSS - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. #### Limitations - The parameter is non-repeatable. If you specify more than one, only the first one is used. If a resource with the specified property value doesn't exist, then the response body contains an empty list. - :return: Authorizations - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/authorizations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorizations', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_authorizations_async(self, **kwargs): # noqa: E501,D401,D403 - """List authorizations. - - Lists authorizations. To limit which authorizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all authorizations. #### InfluxDB Cloud - InfluxDB Cloud doesn't expose [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in `GET /api/v2/authorizations` responses; returns `token: redacted` for all authorizations. #### Required permissions To retrieve an authorization, the request must use an API token that has the following permissions: - `read-authorizations` - `read-user` for the user that the authorization is scoped to #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str user_id: A user ID. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str user: A user name. Only returns authorizations scoped to the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str org_id: An organization ID. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str org: An organization name. Only returns authorizations that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str token: An API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) value. Specifies an authorization by its `token` property value and returns the authorization. #### InfluxDB OSS - Doesn't support this parameter. InfluxDB OSS ignores the `token=` parameter, applies other parameters, and then returns the result. #### Limitations - The parameter is non-repeatable. If you specify more than one, only the first one is used. If a resource with the specified property value doesn't exist, then the response body contains an empty list. - :return: Authorizations - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/authorizations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorizations', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_authorizations_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'user_id', 'user', 'org_id', 'org', 'token'] # noqa: E501 - self._check_operation_params('get_authorizations', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'user_id' in local_var_params: - query_params.append(('userID', local_var_params['user_id'])) # noqa: E501 - if 'user' in local_var_params: - query_params.append(('user', local_var_params['user'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'token' in local_var_params: - query_params.append(('token', local_var_params['token'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve an authorization. - - Retrieves an authorization. Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. #### InfluxDB OSS - InfluxDB OSS returns [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in authorizations. - If the request uses an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authorizations_id(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - 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_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - else: - (data) = self.get_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - return data - - def get_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve an authorization. - - Retrieves an authorization. Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. #### InfluxDB OSS - InfluxDB OSS returns [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in authorizations. - If the request uses an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_authorizations_id_with_http_info(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/authorizations/{authID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_authorizations_id_async(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve an authorization. - - Retrieves an authorization. Use this endpoint to retrieve information about an API token, including the token's permissions and the user that the token is scoped to. #### InfluxDB OSS - InfluxDB OSS returns [API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token) values in authorizations. - If the request uses an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_, InfluxDB OSS returns authorizations for all organizations in the instance. #### Related guides - [View tokens](https://docs.influxdata.com/influxdb/latest/security/tokens/view-tokens/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_authorizations_id_prepare(auth_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/authorizations/{authID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_authorizations_id_prepare(self, auth_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['auth_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_authorizations_id', all_params, local_var_params) - # verify the required parameter 'auth_id' is set - if ('auth_id' not in local_var_params or - local_var_params['auth_id'] is None): - raise ValueError("Missing the required parameter `auth_id` when calling `get_authorizations_id`") # noqa: E501 - - path_params = {} - if 'auth_id' in local_var_params: - path_params['authID'] = local_var_params['auth_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_authorizations_id(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update an API token to be active or inactive. - - Updates an authorization. Use this endpoint to set an API token's status to be _active_ or _inactive_. InfluxDB rejects requests that use inactive API tokens. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_authorizations_id(auth_id, authorization_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: In the request body, provide the authorization properties to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - 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_authorizations_id_with_http_info(auth_id, authorization_update_request, **kwargs) # noqa: E501 - else: - (data) = self.patch_authorizations_id_with_http_info(auth_id, authorization_update_request, **kwargs) # noqa: E501 - return data - - def patch_authorizations_id_with_http_info(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update an API token to be active or inactive. - - Updates an authorization. Use this endpoint to set an API token's status to be _active_ or _inactive_. InfluxDB rejects requests that use inactive API tokens. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_authorizations_id_with_http_info(auth_id, authorization_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: In the request body, provide the authorization properties to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/authorizations/{authID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_authorizations_id_async(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update an API token to be active or inactive. - - Updates an authorization. Use this endpoint to set an API token's status to be _active_ or _inactive_. InfluxDB rejects requests that use inactive API tokens. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str auth_id: An authorization ID. Specifies the authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: In the request body, provide the authorization properties to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/authorizations/{authID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_authorizations_id_prepare(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['auth_id', 'authorization_update_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_authorizations_id', all_params, local_var_params) - # verify the required parameter 'auth_id' is set - if ('auth_id' not in local_var_params or - local_var_params['auth_id'] is None): - raise ValueError("Missing the required parameter `auth_id` when calling `patch_authorizations_id`") # noqa: E501 - # verify the required parameter 'authorization_update_request' is set - if ('authorization_update_request' not in local_var_params or - local_var_params['authorization_update_request'] is None): - raise ValueError("Missing the required parameter `authorization_update_request` when calling `patch_authorizations_id`") # noqa: E501 - - path_params = {} - if 'auth_id' in local_var_params: - path_params['authID'] = local_var_params['auth_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 - - body_params = None - if 'authorization_update_request' in local_var_params: - body_params = local_var_params['authorization_update_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_authorizations(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 - """Create an authorization. - - Creates an authorization and returns the authorization with the generated API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token). Use this endpoint to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The API token is the authorization's `token` property value. To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens. - InfluxDB allows access to the API token value immediately after the authorization is created. - You can’t change access (read/write) permissions for an API token after it’s created. - Tokens stop working when the user who created the token is deleted. We recommend the following for managing your tokens: - Create a generic user to create and manage tokens for writing data. - Store your tokens in a secure password vault for future access. #### Required permissions - `write-authorizations` - `write-user` for the user that the authorization is scoped to #### Related guides - [Create a token](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/) - 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_post_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AuthorizationPostRequest authorization_post_request: The authorization to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - 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_authorizations_with_http_info(authorization_post_request, **kwargs) # noqa: E501 - else: - (data) = self.post_authorizations_with_http_info(authorization_post_request, **kwargs) # noqa: E501 - return data - - def post_authorizations_with_http_info(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 - """Create an authorization. - - Creates an authorization and returns the authorization with the generated API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token). Use this endpoint to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The API token is the authorization's `token` property value. To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens. - InfluxDB allows access to the API token value immediately after the authorization is created. - You can’t change access (read/write) permissions for an API token after it’s created. - Tokens stop working when the user who created the token is deleted. We recommend the following for managing your tokens: - Create a generic user to create and manage tokens for writing data. - Store your tokens in a secure password vault for future access. #### Required permissions - `write-authorizations` - `write-user` for the user that the authorization is scoped to #### Related guides - [Create a token](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/) - 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_post_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param AuthorizationPostRequest authorization_post_request: The authorization to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_authorizations_prepare(authorization_post_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/authorizations', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_authorizations_async(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 - """Create an authorization. - - Creates an authorization and returns the authorization with the generated API [token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token). Use this endpoint to create an authorization, which generates an API token with permissions to `read` or `write` to a specific resource or `type` of resource. The API token is the authorization's `token` property value. To follow best practices for secure API token generation and retrieval, InfluxDB enforces access restrictions on API tokens. - InfluxDB allows access to the API token value immediately after the authorization is created. - You can’t change access (read/write) permissions for an API token after it’s created. - Tokens stop working when the user who created the token is deleted. We recommend the following for managing your tokens: - Create a generic user to create and manage tokens for writing data. - Store your tokens in a secure password vault for future access. #### Required permissions - `write-authorizations` - `write-user` for the user that the authorization is scoped to #### Related guides - [Create a token](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param AuthorizationPostRequest authorization_post_request: The authorization to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_authorizations_prepare(authorization_post_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/authorizations', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_authorizations_prepare(self, authorization_post_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['authorization_post_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_authorizations', all_params, local_var_params) - # 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 - - 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 - - body_params = None - 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 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/backup_service.py b/frogpilot/third_party/influxdb_client/service/backup_service.py deleted file mode 100644 index 0bc520c9f..000000000 --- a/frogpilot/third_party/influxdb_client/service/backup_service.py +++ /dev/null @@ -1,378 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class BackupService(_BaseService): - """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 - """BackupService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_backup_kv(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.. - - Retrieves a snapshot of metadata stored in the server's embedded KV store. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL; avoid using this endpoint with versions greater than 2.1.x. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_backup_kv(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: file - 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_backup_kv_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_backup_kv_with_http_info(**kwargs) # noqa: E501 - return data - - def get_backup_kv_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.. - - Retrieves a snapshot of metadata stored in the server's embedded KV store. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL; avoid using this endpoint with versions greater than 2.1.x. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_backup_kv_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: file - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_kv_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/backup/kv', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='file', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_backup_kv_async(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of metadata stored in the server's embedded KV store. Don't use with InfluxDB versions greater than InfluxDB 2.1.x.. - - Retrieves a snapshot of metadata stored in the server's embedded KV store. InfluxDB versions greater than 2.1.x don't include metadata stored in embedded SQL; avoid using this endpoint with versions greater than 2.1.x. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: file - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_kv_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/backup/kv', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='file', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_backup_kv_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_backup_kv', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/octet-stream', 'application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_backup_metadata(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of all metadata in the server. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_backup_metadata(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :return: MetadataBackup - 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_backup_metadata_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_backup_metadata_with_http_info(**kwargs) # noqa: E501 - return data - - def get_backup_metadata_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of all metadata in the server. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_backup_metadata_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :return: MetadataBackup - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_metadata_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/backup/metadata', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MetadataBackup', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_backup_metadata_async(self, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of all metadata in the server. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :return: MetadataBackup - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_metadata_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/backup/metadata', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MetadataBackup', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_backup_metadata_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'accept_encoding'] # noqa: E501 - self._check_operation_params('get_backup_metadata', all_params, local_var_params) - - 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 - if 'accept_encoding' in local_var_params: - header_params['Accept-Encoding'] = local_var_params['accept_encoding'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['multipart/mixed', 'application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_backup_shard_id(self, shard_id, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of all TSM data in a shard. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_backup_shard_id(shard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int shard_id: The shard ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :param datetime since: The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) to include in the snapshot. - :return: file - 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_backup_shard_id_with_http_info(shard_id, **kwargs) # noqa: E501 - else: - (data) = self.get_backup_shard_id_with_http_info(shard_id, **kwargs) # noqa: E501 - return data - - def get_backup_shard_id_with_http_info(self, shard_id, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of all TSM data in a shard. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_backup_shard_id_with_http_info(shard_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int shard_id: The shard ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :param datetime since: The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) to include in the snapshot. - :return: file - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_shard_id_prepare(shard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/backup/shards/{shardID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='file', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_backup_shard_id_async(self, shard_id, **kwargs): # noqa: E501,D401,D403 - """Download snapshot of all TSM data in a shard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param int shard_id: The shard ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: Indicates the content encoding (usually a compression algorithm) that the client can understand. - :param datetime since: The earliest time [RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp) to include in the snapshot. - :return: file - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_backup_shard_id_prepare(shard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/backup/shards/{shardID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='file', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_backup_shard_id_prepare(self, shard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['shard_id', 'zap_trace_span', 'accept_encoding', 'since'] # noqa: E501 - self._check_operation_params('get_backup_shard_id', all_params, local_var_params) - # verify the required parameter 'shard_id' is set - if ('shard_id' not in local_var_params or - local_var_params['shard_id'] is None): - raise ValueError("Missing the required parameter `shard_id` when calling `get_backup_shard_id`") # noqa: E501 - - path_params = {} - if 'shard_id' in local_var_params: - path_params['shardID'] = local_var_params['shard_id'] # noqa: E501 - - query_params = [] - if 'since' in local_var_params: - query_params.append(('since', local_var_params['since'])) # 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 - if 'accept_encoding' in local_var_params: - header_params['Accept-Encoding'] = local_var_params['accept_encoding'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/octet-stream', 'application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/bucket_schemas_service.py b/frogpilot/third_party/influxdb_client/service/bucket_schemas_service.py deleted file mode 100644 index 7a25338c3..000000000 --- a/frogpilot/third_party/influxdb_client/service/bucket_schemas_service.py +++ /dev/null @@ -1,607 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class BucketSchemasService(_BaseService): - """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 - """BucketSchemasService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def create_measurement_schema(self, bucket_id, measurement_schema_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a measurement schema for a bucket. - - Creates an _explict_ measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema) for a bucket. _Explicit_ schemas are used to enforce column names, tags, fields, and data types for your data. By default, buckets have an _implicit_ schema-type (`"schemaType": "implicit"`) that conforms to your data. Use this endpoint to create schemas that prevent non-conforming write requests. #### Limitations - Buckets must be created with the "explict" `schemaType` in order to use schemas. #### Related guides - [Manage bucket schemas](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/). - [Create a bucket with an explicit schema](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/create-bucket/#create-a-bucket-with-an-explicit-schema) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_measurement_schema(bucket_id, measurement_schema_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Adds a schema for the specified bucket. (required) - :param MeasurementSchemaCreateRequest measurement_schema_create_request: (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - 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.create_measurement_schema_with_http_info(bucket_id, measurement_schema_create_request, **kwargs) # noqa: E501 - else: - (data) = self.create_measurement_schema_with_http_info(bucket_id, measurement_schema_create_request, **kwargs) # noqa: E501 - return data - - def create_measurement_schema_with_http_info(self, bucket_id, measurement_schema_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a measurement schema for a bucket. - - Creates an _explict_ measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema) for a bucket. _Explicit_ schemas are used to enforce column names, tags, fields, and data types for your data. By default, buckets have an _implicit_ schema-type (`"schemaType": "implicit"`) that conforms to your data. Use this endpoint to create schemas that prevent non-conforming write requests. #### Limitations - Buckets must be created with the "explict" `schemaType` in order to use schemas. #### Related guides - [Manage bucket schemas](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/). - [Create a bucket with an explicit schema](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/create-bucket/#create-a-bucket-with-an-explicit-schema) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_measurement_schema_with_http_info(bucket_id, measurement_schema_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Adds a schema for the specified bucket. (required) - :param MeasurementSchemaCreateRequest measurement_schema_create_request: (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_measurement_schema_prepare(bucket_id, measurement_schema_create_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchema', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def create_measurement_schema_async(self, bucket_id, measurement_schema_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a measurement schema for a bucket. - - Creates an _explict_ measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema) for a bucket. _Explicit_ schemas are used to enforce column names, tags, fields, and data types for your data. By default, buckets have an _implicit_ schema-type (`"schemaType": "implicit"`) that conforms to your data. Use this endpoint to create schemas that prevent non-conforming write requests. #### Limitations - Buckets must be created with the "explict" `schemaType` in order to use schemas. #### Related guides - [Manage bucket schemas](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/). - [Create a bucket with an explicit schema](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/create-bucket/#create-a-bucket-with-an-explicit-schema) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: A bucket ID. Adds a schema for the specified bucket. (required) - :param MeasurementSchemaCreateRequest measurement_schema_create_request: (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_measurement_schema_prepare(bucket_id, measurement_schema_create_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchema', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _create_measurement_schema_prepare(self, bucket_id, measurement_schema_create_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'measurement_schema_create_request', 'org', 'org_id'] # noqa: E501 - self._check_operation_params('create_measurement_schema', all_params, local_var_params) - # 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 `create_measurement_schema`") # noqa: E501 - # verify the required parameter 'measurement_schema_create_request' is set - if ('measurement_schema_create_request' not in local_var_params or - local_var_params['measurement_schema_create_request'] is None): - raise ValueError("Missing the required parameter `measurement_schema_create_request` when calling `create_measurement_schema`") # noqa: E501 - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - - header_params = {} - - body_params = None - if 'measurement_schema_create_request' in local_var_params: - body_params = local_var_params['measurement_schema_create_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_measurement_schema(self, bucket_id, measurement_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a measurement schema. - - Retrieves an explicit measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_measurement_schema(bucket_id, measurement_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Retrieves schemas for the specified bucket. (required) - :param str measurement_id: The measurement schema ID. Specifies the measurement schema to retrieve. (required) - :param str org: Organization name. Specifies the organization that owns the schema. - :param str org_id: Organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - 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_measurement_schema_with_http_info(bucket_id, measurement_id, **kwargs) # noqa: E501 - else: - (data) = self.get_measurement_schema_with_http_info(bucket_id, measurement_id, **kwargs) # noqa: E501 - return data - - def get_measurement_schema_with_http_info(self, bucket_id, measurement_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a measurement schema. - - Retrieves an explicit measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_measurement_schema_with_http_info(bucket_id, measurement_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Retrieves schemas for the specified bucket. (required) - :param str measurement_id: The measurement schema ID. Specifies the measurement schema to retrieve. (required) - :param str org: Organization name. Specifies the organization that owns the schema. - :param str org_id: Organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_measurement_schema_prepare(bucket_id, measurement_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements/{measurementID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchema', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_measurement_schema_async(self, bucket_id, measurement_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a measurement schema. - - Retrieves an explicit measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: A bucket ID. Retrieves schemas for the specified bucket. (required) - :param str measurement_id: The measurement schema ID. Specifies the measurement schema to retrieve. (required) - :param str org: Organization name. Specifies the organization that owns the schema. - :param str org_id: Organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_measurement_schema_prepare(bucket_id, measurement_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements/{measurementID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchema', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_measurement_schema_prepare(self, bucket_id, measurement_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'measurement_id', 'org', 'org_id'] # noqa: E501 - self._check_operation_params('get_measurement_schema', all_params, local_var_params) - # 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_measurement_schema`") # noqa: E501 - # verify the required parameter 'measurement_id' is set - if ('measurement_id' not in local_var_params or - local_var_params['measurement_id'] is None): - raise ValueError("Missing the required parameter `measurement_id` when calling `get_measurement_schema`") # noqa: E501 - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - if 'measurement_id' in local_var_params: - path_params['measurementID'] = local_var_params['measurement_id'] # noqa: E501 - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_measurement_schemas(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List measurement schemas of a bucket. - - Lists _explicit_ [schemas](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema) (`"schemaType": "explicit"`) for a bucket. _Explicit_ schemas are used to enforce column names, tags, fields, and data types for your data. By default, buckets have an _implicit_ schema-type (`"schemaType": "implicit"`) that conforms to your data. #### Related guides - [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_measurement_schemas(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Lists measurement schemas for the specified bucket. (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :param str name: A measurement name. Only returns measurement schemas with the specified name. - :return: MeasurementSchemaList - 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_measurement_schemas_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.get_measurement_schemas_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def get_measurement_schemas_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List measurement schemas of a bucket. - - Lists _explicit_ [schemas](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema) (`"schemaType": "explicit"`) for a bucket. _Explicit_ schemas are used to enforce column names, tags, fields, and data types for your data. By default, buckets have an _implicit_ schema-type (`"schemaType": "implicit"`) that conforms to your data. #### Related guides - [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_measurement_schemas_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Lists measurement schemas for the specified bucket. (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :param str name: A measurement name. Only returns measurement schemas with the specified name. - :return: MeasurementSchemaList - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_measurement_schemas_prepare(bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchemaList', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_measurement_schemas_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List measurement schemas of a bucket. - - Lists _explicit_ [schemas](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema) (`"schemaType": "explicit"`) for a bucket. _Explicit_ schemas are used to enforce column names, tags, fields, and data types for your data. By default, buckets have an _implicit_ schema-type (`"schemaType": "implicit"`) that conforms to your data. #### Related guides - [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: A bucket ID. Lists measurement schemas for the specified bucket. (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :param str name: A measurement name. Only returns measurement schemas with the specified name. - :return: MeasurementSchemaList - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_measurement_schemas_prepare(bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchemaList', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_measurement_schemas_prepare(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'org', 'org_id', 'name'] # noqa: E501 - self._check_operation_params('get_measurement_schemas', all_params, local_var_params) - # 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_measurement_schemas`") # noqa: E501 - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - 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 - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def update_measurement_schema(self, bucket_id, measurement_id, measurement_schema_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a measurement schema. - - Updates a measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema). Use this endpoint to update the fields (`name`, `type`, and `dataType`) of a measurement schema. #### Limitations - You can't update the `name` of a measurement. #### Related guides - [Manage bucket schemas](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/). - [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_measurement_schema(bucket_id, measurement_id, measurement_schema_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Specifies the bucket to retrieve schemas for. (required) - :param str measurement_id: A measurement schema ID. Retrieves the specified measurement schema. (required) - :param MeasurementSchemaUpdateRequest measurement_schema_update_request: (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - 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.update_measurement_schema_with_http_info(bucket_id, measurement_id, measurement_schema_update_request, **kwargs) # noqa: E501 - else: - (data) = self.update_measurement_schema_with_http_info(bucket_id, measurement_id, measurement_schema_update_request, **kwargs) # noqa: E501 - return data - - def update_measurement_schema_with_http_info(self, bucket_id, measurement_id, measurement_schema_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a measurement schema. - - Updates a measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema). Use this endpoint to update the fields (`name`, `type`, and `dataType`) of a measurement schema. #### Limitations - You can't update the `name` of a measurement. #### Related guides - [Manage bucket schemas](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/). - [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_measurement_schema_with_http_info(bucket_id, measurement_id, measurement_schema_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: A bucket ID. Specifies the bucket to retrieve schemas for. (required) - :param str measurement_id: A measurement schema ID. Retrieves the specified measurement schema. (required) - :param MeasurementSchemaUpdateRequest measurement_schema_update_request: (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._update_measurement_schema_prepare(bucket_id, measurement_id, measurement_schema_update_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements/{measurementID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchema', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def update_measurement_schema_async(self, bucket_id, measurement_id, measurement_schema_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a measurement schema. - - Updates a measurement [schema](https://docs.influxdata.com/influxdb/cloud/reference/glossary/#schema). Use this endpoint to update the fields (`name`, `type`, and `dataType`) of a measurement schema. #### Limitations - You can't update the `name` of a measurement. #### Related guides - [Manage bucket schemas](https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/). - [Using bucket schemas](https://www.influxdata.com/blog/new-bucket-schema-option-protect-from-unwanted-schema-changes/). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: A bucket ID. Specifies the bucket to retrieve schemas for. (required) - :param str measurement_id: A measurement schema ID. Retrieves the specified measurement schema. (required) - :param MeasurementSchemaUpdateRequest measurement_schema_update_request: (required) - :param str org: An organization name. Specifies the organization that owns the schema. - :param str org_id: An organization ID. Specifies the organization that owns the schema. - :return: MeasurementSchema - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('BucketSchemasService', - 'https://docs.influxdata.com/influxdb/cloud/organizations/buckets/bucket-schema/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._update_measurement_schema_prepare(bucket_id, measurement_id, measurement_schema_update_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/schema/measurements/{measurementID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='MeasurementSchema', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _update_measurement_schema_prepare(self, bucket_id, measurement_id, measurement_schema_update_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'measurement_id', 'measurement_schema_update_request', 'org', 'org_id'] # noqa: E501 - self._check_operation_params('update_measurement_schema', all_params, local_var_params) - # 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 `update_measurement_schema`") # noqa: E501 - # verify the required parameter 'measurement_id' is set - if ('measurement_id' not in local_var_params or - local_var_params['measurement_id'] is None): - raise ValueError("Missing the required parameter `measurement_id` when calling `update_measurement_schema`") # noqa: E501 - # verify the required parameter 'measurement_schema_update_request' is set - if ('measurement_schema_update_request' not in local_var_params or - local_var_params['measurement_schema_update_request'] is None): - raise ValueError("Missing the required parameter `measurement_schema_update_request` when calling `update_measurement_schema`") # noqa: E501 - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - if 'measurement_id' in local_var_params: - path_params['measurementID'] = local_var_params['measurement_id'] # noqa: E501 - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - - header_params = {} - - body_params = None - if 'measurement_schema_update_request' in local_var_params: - body_params = local_var_params['measurement_schema_update_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/buckets_service.py b/frogpilot/third_party/influxdb_client/service/buckets_service.py deleted file mode 100644 index 05cf0e1f8..000000000 --- a/frogpilot/third_party/influxdb_client/service/buckets_service.py +++ /dev/null @@ -1,1929 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class BucketsService(_BaseService): - """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 - """BucketsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_buckets_id(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Delete a bucket. - - Deletes a bucket and all associated records. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one bucket can be deleted per request. #### Related Guides - [Delete a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui) - 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(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: Bucket ID. The ID of the bucket 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_buckets_id_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_buckets_id_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def delete_buckets_id_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Delete a bucket. - - Deletes a bucket and all associated records. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one bucket can be deleted per request. #### Related Guides - [Delete a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui) - 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_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: Bucket ID. The ID of the bucket 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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_buckets_id_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Delete a bucket. - - Deletes a bucket and all associated records. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one bucket can be deleted per request. #### Related Guides - [Delete a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/delete-bucket/#delete-a-bucket-in-the-influxdb-ui) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: Bucket ID. The ID of the bucket 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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_buckets_id_prepare(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_buckets_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_buckets_id_labels_id(self, bucket_id, label_id, **kwargs): # noqa: E501,D401,D403 - """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 - >>> thread = api.delete_buckets_id_labels_id(bucket_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str label_id: The ID of the label 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_buckets_id_labels_id_with_http_info(bucket_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_buckets_id_labels_id_with_http_info(bucket_id, label_id, **kwargs) # noqa: E501 - 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. - - 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_labels_id_with_http_info(bucket_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_labels_id_prepare(bucket_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_buckets_id_labels_id_async(self, bucket_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a bucket. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_labels_id_prepare(bucket_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_buckets_id_labels_id_prepare(self, bucket_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_buckets_id_labels_id', all_params, local_var_params) - # 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_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_buckets_id_labels_id`") # noqa: E501 - - path_params = {} - if 'bucket_id' in local_var_params: - path_params['bucketID'] = local_var_params['bucket_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_buckets_id_members_id(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a bucket. - - Removes a member from a bucket. Use this endpoint to remove a user's member privileges from a bucket. This removes the user's `read` and `write` permissions for the bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str bucket_id: The ID of the bucket to remove a user from. (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_buckets_id_members_id_with_http_info(user_id, bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_buckets_id_members_id_with_http_info(user_id, bucket_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. - - Removes a member from a bucket. Use this endpoint to remove a user's member privileges from a bucket. This removes the user's `read` and `write` permissions for the bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str bucket_id: The ID of the bucket to remove a user from. (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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_members_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_buckets_id_members_id_async(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a bucket. - - Removes a member from a bucket. Use this endpoint to remove a user's member privileges from a bucket. This removes the user's `read` and `write` permissions for the bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str bucket_id: The ID of the bucket to remove a user from. (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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_members_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_buckets_id_members_id_prepare(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'bucket_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_buckets_id_members_id', all_params, local_var_params) - # 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 - - 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 = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_buckets_id_owners_id(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a bucket. - - Removes an owner from a bucket. Use this endpoint to remove a user's `owner` role for a bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str bucket_id: The ID of the bucket to remove an owner from. (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_buckets_id_owners_id_with_http_info(user_id, bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, **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. - - Removes an owner from a bucket. Use this endpoint to remove a user's `owner` role for a bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str bucket_id: The ID of the bucket to remove an owner from. (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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_owners_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_buckets_id_owners_id_async(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a bucket. - - Removes an owner from a bucket. Use this endpoint to remove a user's `owner` role for a bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: The ID of the owner to remove. (required) - :param str bucket_id: The ID of the bucket to remove an owner from. (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, path_params, query_params, header_params, body_params = \ - self._delete_buckets_id_owners_id_prepare(user_id, bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_buckets_id_owners_id_prepare(self, user_id, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'bucket_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_buckets_id_owners_id', all_params, local_var_params) - # 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 - - 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 = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_buckets(self, **kwargs): # noqa: E501,D401,D403 - """List buckets. - - Lists [buckets](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket). InfluxDB retrieves buckets owned by the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) associated with the authorization ([API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token)). To limit which buckets are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. #### InfluxDB OSS - If you use an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all organizations_ in the instance. To retrieve resources for only a specific organization, use the `org` parameter or the `orgID` parameter to specify the organization. #### Required permissions | Action | Permission required | |:--------------------------|:--------------------| | Retrieve _user buckets_ | `read-buckets` | | Retrieve [_system buckets_](https://docs.influxdata.com/influxdb/latest/reference/internals/system-buckets/) | `read-orgs` | #### Related Guides - [Manage buckets](https://docs.influxdata.com/influxdb/latest/organizations/buckets/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param str org: An organization name. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Lists buckets for the specified organization. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. - :param str name: A bucket name. Only returns buckets with the specified name. - :param str id: A bucket ID. Only returns the bucket with the specified ID. - :return: Buckets - 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_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_buckets_with_http_info(**kwargs) # noqa: E501 - return data - - def get_buckets_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List buckets. - - Lists [buckets](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket). InfluxDB retrieves buckets owned by the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) associated with the authorization ([API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token)). To limit which buckets are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. #### InfluxDB OSS - If you use an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all organizations_ in the instance. To retrieve resources for only a specific organization, use the `org` parameter or the `orgID` parameter to specify the organization. #### Required permissions | Action | Permission required | |:--------------------------|:--------------------| | Retrieve _user buckets_ | `read-buckets` | | Retrieve [_system buckets_](https://docs.influxdata.com/influxdb/latest/reference/internals/system-buckets/) | `read-orgs` | #### Related Guides - [Manage buckets](https://docs.influxdata.com/influxdb/latest/organizations/buckets/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_buckets_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param str org: An organization name. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Lists buckets for the specified organization. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. - :param str name: A bucket name. Only returns buckets with the specified name. - :param str id: A bucket ID. Only returns the bucket with the specified ID. - :return: Buckets - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Buckets', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_buckets_async(self, **kwargs): # noqa: E501,D401,D403 - """List buckets. - - Lists [buckets](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket). InfluxDB retrieves buckets owned by the [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) associated with the authorization ([API token](https://docs.influxdata.com/influxdb/latest/reference/glossary/#token)). To limit which buckets are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all buckets up to the default `limit`. #### InfluxDB OSS - If you use an _[operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ to authenticate your request, InfluxDB retrieves resources for _all organizations_ in the instance. To retrieve resources for only a specific organization, use the `org` parameter or the `orgID` parameter to specify the organization. #### Required permissions | Action | Permission required | |:--------------------------|:--------------------| | Retrieve _user buckets_ | `read-buckets` | | Retrieve [_system buckets_](https://docs.influxdata.com/influxdb/latest/reference/internals/system-buckets/) | `read-orgs` | #### Related Guides - [Manage buckets](https://docs.influxdata.com/influxdb/latest/organizations/buckets/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param str org: An organization name. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Lists buckets for the specified organization. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Lists buckets for the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Lists buckets for the specified organization. - :param str name: A bucket name. Only returns buckets with the specified name. - :param str id: A bucket ID. Only returns the bucket with the specified ID. - :return: Buckets - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Buckets', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_buckets_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'offset', 'limit', 'after', 'org', 'org_id', 'name', 'id'] # noqa: E501 - self._check_operation_params('get_buckets', all_params, local_var_params) - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_buckets`, 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_buckets`, 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_buckets`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'after' in local_var_params: - query_params.append(('after', local_var_params['after'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - 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: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_buckets_id(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a bucket. - - Retrieves a bucket. Use this endpoint to retrieve information for a specific 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(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - 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_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.get_buckets_id_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def get_buckets_id_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a bucket. - - Retrieves a bucket. Use this endpoint to retrieve information for a specific 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_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Bucket', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_buckets_id_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a bucket. - - Retrieves a bucket. Use this endpoint to retrieve information for a specific bucket. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_prepare(bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Bucket', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_buckets_id_prepare(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_buckets_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_buckets_id_labels(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a bucket. - - Lists all labels for a bucket. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering InfluxDB resources. Labels are also capable of grouping across different resources--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) - 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_labels(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve labels for. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - 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_labels_with_http_info(bucket_id, **kwargs) # noqa: E501 - else: - (data) = self.get_buckets_id_labels_with_http_info(bucket_id, **kwargs) # noqa: E501 - return data - - def get_buckets_id_labels_with_http_info(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a bucket. - - Lists all labels for a bucket. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering InfluxDB resources. Labels are also capable of grouping across different resources--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) - 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_labels_with_http_info(bucket_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve labels for. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_labels_prepare(bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_buckets_id_labels_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a bucket. - - Lists all labels for a bucket. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering InfluxDB resources. Labels are also capable of grouping across different resources--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve labels for. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_labels_prepare(bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_buckets_id_labels_prepare(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_buckets_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_buckets_id_members(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a bucket. - - Lists all users for a bucket. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users in an organization with access to the specified resource. Use this endpoint to retrieve all users with access to a bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the bucket to retrieve users for. (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. - - Lists all users for a bucket. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users in an organization with access to the specified resource. Use this endpoint to retrieve all users with access to a bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the bucket to retrieve users for. (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, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_members_prepare(bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_buckets_id_members_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a bucket. - - Lists all users for a bucket. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users in an organization with access to the specified resource. Use this endpoint to retrieve all users with access to a bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve users for. (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, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_members_prepare(bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_buckets_id_members_prepare(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_buckets_id_members', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_buckets_id_owners(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a bucket. - - Lists all [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) of a bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - 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 ID of the bucket to retrieve owners for. (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. - - Lists all [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) of a bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - 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 ID of the bucket to retrieve owners for. (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, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_owners_prepare(bucket_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_buckets_id_owners_async(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a bucket. - - Lists all [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) of a bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve owners for. (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, path_params, query_params, header_params, body_params = \ - self._get_buckets_id_owners_prepare(bucket_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_buckets_id_owners_prepare(self, bucket_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_buckets_id_owners', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_sources_id_buckets(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get buckets in a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id_buckets(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Buckets - 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_sources_id_buckets_with_http_info(source_id, **kwargs) # noqa: E501 - else: - (data) = self.get_sources_id_buckets_with_http_info(source_id, **kwargs) # noqa: E501 - return data - - def get_sources_id_buckets_with_http_info(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get buckets in a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id_buckets_with_http_info(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Buckets - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources/{sourceID}/buckets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Buckets', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_sources_id_buckets_async(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get buckets in a source. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Buckets - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources/{sourceID}/buckets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Buckets', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_sources_id_buckets_prepare(self, source_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['source_id', 'zap_trace_span', 'org'] # noqa: E501 - self._check_operation_params('get_sources_id_buckets', all_params, local_var_params) - # verify the required parameter 'source_id' is set - if ('source_id' not in local_var_params or - local_var_params['source_id'] is None): - raise ValueError("Missing the required parameter `source_id` when calling `get_sources_id_buckets`") # noqa: E501 - - path_params = {} - if 'source_id' in local_var_params: - path_params['sourceID'] = local_var_params['source_id'] # noqa: E501 - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_buckets_id(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 - """Update a bucket. - - Updates a bucket. Use this endpoint to update properties (`name`, `description`, and `retentionRules`) of a bucket. #### InfluxDB Cloud - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. #### InfluxDB OSS - Doesn't require `retentionRules`. #### Related Guides - [Update a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/update-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, patch_bucket_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param PatchBucketRequest patch_bucket_request: The bucket update to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - 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_buckets_id_with_http_info(bucket_id, patch_bucket_request, **kwargs) # noqa: E501 - else: - (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, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 - """Update a bucket. - - Updates a bucket. Use this endpoint to update properties (`name`, `description`, and `retentionRules`) of a bucket. #### InfluxDB Cloud - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. #### InfluxDB OSS - Doesn't require `retentionRules`. #### Related Guides - [Update a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/update-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, patch_bucket_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param PatchBucketRequest patch_bucket_request: The bucket update to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_buckets_id_prepare(bucket_id, patch_bucket_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Bucket', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_buckets_id_async(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 - """Update a bucket. - - Updates a bucket. Use this endpoint to update properties (`name`, `description`, and `retentionRules`) of a bucket. #### InfluxDB Cloud - Requires the `retentionRules` property in the request body. If you don't provide `retentionRules`, InfluxDB responds with an HTTP `403` status code. #### InfluxDB OSS - Doesn't require `retentionRules`. #### Related Guides - [Update a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/update-bucket/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param PatchBucketRequest patch_bucket_request: The bucket update to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_buckets_id_prepare(bucket_id, patch_bucket_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Bucket', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_buckets_id_prepare(self, bucket_id, patch_bucket_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'patch_bucket_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_buckets_id', all_params, local_var_params) - # 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 `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 - - 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 - - body_params = None - 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 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_buckets(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 - """Create a bucket. - - Creates a [bucket](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket) and returns the bucket resource. The default data [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period) is 30 days. #### InfluxDB OSS - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. Reading or writing to more than 20 buckets at a time can adversely affect performance. #### Limitations - InfluxDB Cloud Free Plan allows users to create up to two buckets. Exceeding the bucket quota will result in an HTTP `403` status code. For additional information regarding InfluxDB Cloud offerings, see [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/). #### Related Guides - [Create a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/create-bucket/) - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/bucket/create) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets(post_bucket_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostBucketRequest post_bucket_request: The bucket to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - 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_with_http_info(post_bucket_request, **kwargs) # noqa: E501 - else: - (data) = self.post_buckets_with_http_info(post_bucket_request, **kwargs) # noqa: E501 - return data - - def post_buckets_with_http_info(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 - """Create a bucket. - - Creates a [bucket](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket) and returns the bucket resource. The default data [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period) is 30 days. #### InfluxDB OSS - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. Reading or writing to more than 20 buckets at a time can adversely affect performance. #### Limitations - InfluxDB Cloud Free Plan allows users to create up to two buckets. Exceeding the bucket quota will result in an HTTP `403` status code. For additional information regarding InfluxDB Cloud offerings, see [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/). #### Related Guides - [Create a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/create-bucket/) - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/bucket/create) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_buckets_with_http_info(post_bucket_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostBucketRequest post_bucket_request: The bucket to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_prepare(post_bucket_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Bucket', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_buckets_async(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 - """Create a bucket. - - Creates a [bucket](https://docs.influxdata.com/influxdb/latest/reference/glossary/#bucket) and returns the bucket resource. The default data [retention period](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-period) is 30 days. #### InfluxDB OSS - A single InfluxDB OSS instance supports active writes or queries for approximately 20 buckets across all organizations at a given time. Reading or writing to more than 20 buckets at a time can adversely affect performance. #### Limitations - InfluxDB Cloud Free Plan allows users to create up to two buckets. Exceeding the bucket quota will result in an HTTP `403` status code. For additional information regarding InfluxDB Cloud offerings, see [InfluxDB Cloud Pricing](https://www.influxdata.com/influxdb-cloud-pricing/). #### Related Guides - [Create a bucket](https://docs.influxdata.com/influxdb/latest/organizations/buckets/create-bucket/) - [Create bucket CLI reference](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/bucket/create) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param PostBucketRequest post_bucket_request: The bucket to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Bucket - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_prepare(post_bucket_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Bucket', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_buckets_prepare(self, post_bucket_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['post_bucket_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_buckets', all_params, local_var_params) - # verify the required parameter 'post_bucket_request' is set - if ('post_bucket_request' not in local_var_params or - local_var_params['post_bucket_request'] is None): - raise ValueError("Missing the required parameter `post_bucket_request` when calling `post_buckets`") # noqa: E501 - - 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 - - body_params = None - if 'post_bucket_request' in local_var_params: - body_params = local_var_params['post_bucket_request'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_buckets_id_labels(self, bucket_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a bucket. - - Adds a label to a bucket and returns the new label information. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering across one or more kinds of **resources**--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Limitations - Before adding a label to a bucket, you must create the label if you haven't already. To create a label with the InfluxDB API, send a `POST` request to the [`/api/v2/labels` endpoint](#operation/PostLabels)). #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) - 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_labels(bucket_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: Bucket ID. The ID of the bucket to label. (required) - :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the bucket. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_labels_with_http_info(bucket_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_buckets_id_labels_with_http_info(bucket_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_buckets_id_labels_with_http_info(self, bucket_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a bucket. - - Adds a label to a bucket and returns the new label information. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering across one or more kinds of **resources**--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Limitations - Before adding a label to a bucket, you must create the label if you haven't already. To create a label with the InfluxDB API, send a `POST` request to the [`/api/v2/labels` endpoint](#operation/PostLabels)). #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) - 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_labels_with_http_info(bucket_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: Bucket ID. The ID of the bucket to label. (required) - :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the bucket. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_labels_prepare(bucket_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_buckets_id_labels_async(self, bucket_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a bucket. - - Adds a label to a bucket and returns the new label information. Labels are objects that contain `labelID`, `name`, `description`, and `color` key-value pairs. They may be used for grouping and filtering across one or more kinds of **resources**--for example, you can apply a label named `air_sensor` to a bucket and a task to quickly organize resources. #### Limitations - Before adding a label to a bucket, you must create the label if you haven't already. To create a label with the InfluxDB API, send a `POST` request to the [`/api/v2/labels` endpoint](#operation/PostLabels)). #### Related guides - Use the [`/api/v2/labels` InfluxDB API endpoint](#tag/Labels) to retrieve and manage labels. - [Manage labels in the InfluxDB UI](https://docs.influxdata.com/influxdb/latest/visualize-data/labels/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: Bucket ID. The ID of the bucket to label. (required) - :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the bucket. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_labels_prepare(bucket_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_buckets_id_labels_prepare(self, bucket_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_buckets_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_buckets_id_labels`") # noqa: E501 - - 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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_buckets_id_members(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a bucket. - - Add a user to a bucket and return the new user information. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users in an organization. Use this endpoint to give a user member privileges to a bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the bucket to retrieve users for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member to the bucket. (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. - - Add a user to a bucket and return the new user information. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users in an organization. Use this endpoint to give a user member privileges to a bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the bucket to retrieve users for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member to the bucket. (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, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_members_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_buckets_id_members_async(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a bucket. - - Add a user to a bucket and return the new user information. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users in an organization. Use this endpoint to give a user member privileges to a bucket. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The ID of the bucket to retrieve users for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member to the bucket. (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, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_members_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_buckets_id_members_prepare(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_buckets_id_members', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_buckets_id_owners(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a bucket. - - Adds an owner to a bucket and returns the [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) with role and user detail. Use this endpoint to create a _resource owner_ for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - 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 ID of the bucket to add an owner for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner for the bucket. (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. - - Adds an owner to a bucket and returns the [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) with role and user detail. Use this endpoint to create a _resource owner_ for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - 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 ID of the bucket to add an owner for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner for the bucket. (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, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_owners_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_buckets_id_owners_async(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a bucket. - - Adds an owner to a bucket and returns the [owners](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) with role and user detail. Use this endpoint to create a _resource owner_ for the bucket. Bucket owners have permission to delete buckets and remove user and member permissions from the bucket. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The ID of the bucket to add an owner for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner for the bucket. (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, path_params, query_params, header_params, body_params = \ - self._post_buckets_id_owners_prepare(bucket_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/buckets/{bucketID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_buckets_id_owners_prepare(self, bucket_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_buckets_id_owners', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/cells_service.py b/frogpilot/third_party/influxdb_client/service/cells_service.py deleted file mode 100644 index 13c811b5d..000000000 --- a/frogpilot/third_party/influxdb_client/service/cells_service.py +++ /dev/null @@ -1,820 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class CellsService(_BaseService): - """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 - """CellsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_dashboards_id_cells_id(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard cell. - - 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_cells_id(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to delete. (required) - :param str cell_id: The ID of the cell 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_dashboards_id_cells_id_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_dashboards_id_cells_id_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - return data - - def delete_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard cell. - - 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_cells_id_with_http_info(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to delete. (required) - :param str cell_id: The ID of the cell 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, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_dashboards_id_cells_id_async(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to delete. (required) - :param str cell_id: The ID of the cell 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, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_dashboards_id_cells_id_prepare(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_dashboards_id_cells_id', all_params, local_var_params) - # 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_cells_id`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `delete_dashboards_id_cells_id`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_dashboards_id_cells_id_view(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - 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_cells_id_view(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - 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_cells_id_view_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_cells_id_view_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - 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_cells_id_view_with_http_info(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_id_cells_id_view_prepare(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_dashboards_id_cells_id_view', all_params, local_var_params) - # 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_cells_id_view`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `get_dashboards_id_cells_id_view`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_dashboards_id_cells_id(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - """Update the non-positional information related to a cell. - - Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. - 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_cells_id(dashboard_id, cell_id, cell_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param CellUpdate cell_update: (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - 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_cells_id_with_http_info(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - else: - (data) = self.patch_dashboards_id_cells_id_with_http_info(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - return data - - def patch_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - """Update the non-positional information related to a cell. - - Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. - 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_cells_id_with_http_info(dashboard_id, cell_id, cell_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param CellUpdate cell_update: (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_dashboards_id_cells_id_async(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - """Update the non-positional information related to a cell. - - Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param CellUpdate cell_update: (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_dashboards_id_cells_id_prepare(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'cell_update', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_dashboards_id_cells_id', all_params, local_var_params) - # 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 `patch_dashboards_id_cells_id`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `patch_dashboards_id_cells_id`") # noqa: E501 - # verify the required parameter 'cell_update' is set - if ('cell_update' not in local_var_params or - local_var_params['cell_update'] is None): - raise ValueError("Missing the required parameter `cell_update` when calling `patch_dashboards_id_cells_id`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - if 'cell_update' in local_var_params: - body_params = local_var_params['cell_update'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_dashboards_id_cells_id_view(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - 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_cells_id_view(dashboard_id, cell_id, view, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - 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_cells_id_view_with_http_info(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - else: - (data) = self.patch_dashboards_id_cells_id_view_with_http_info(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - return data - - def patch_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - 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_cells_id_view_with_http_info(dashboard_id, cell_id, view, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_dashboards_id_cells_id_view_prepare(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'view', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_dashboards_id_cells_id_view', all_params, local_var_params) - # 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 `patch_dashboards_id_cells_id_view`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `patch_dashboards_id_cells_id_view`") # noqa: E501 - # verify the required parameter 'view' is set - if ('view' not in local_var_params or - local_var_params['view'] is None): - raise ValueError("Missing the required parameter `view` when calling `patch_dashboards_id_cells_id_view`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - if 'view' in local_var_params: - body_params = local_var_params['view'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_dashboards_id_cells(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - """Create a dashboard cell. - - 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_cells(dashboard_id, create_cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param CreateCell create_cell: Cell that will be added (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - 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_cells_with_http_info(dashboard_id, create_cell, **kwargs) # noqa: E501 - else: - (data) = self.post_dashboards_id_cells_with_http_info(dashboard_id, create_cell, **kwargs) # noqa: E501 - return data - - def post_dashboards_id_cells_with_http_info(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - """Create a dashboard cell. - - 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_cells_with_http_info(dashboard_id, create_cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param CreateCell create_cell: Cell that will be added (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_dashboards_id_cells_async(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - """Create a dashboard cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param CreateCell create_cell: Cell that will be added (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_dashboards_id_cells_prepare(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'create_cell', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_dashboards_id_cells', all_params, local_var_params) - # 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_cells`") # noqa: E501 - # verify the required parameter 'create_cell' is set - if ('create_cell' not in local_var_params or - local_var_params['create_cell'] is None): - raise ValueError("Missing the required parameter `create_cell` when calling `post_dashboards_id_cells`") # noqa: E501 - - 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 - - body_params = None - if 'create_cell' in local_var_params: - body_params = local_var_params['create_cell'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_dashboards_id_cells(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - """Replace cells in a dashboard. - - Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_dashboards_id_cells(dashboard_id, cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param list[Cell] cell: (required) - :param str zap_trace_span: OpenTracing span context - :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.put_dashboards_id_cells_with_http_info(dashboard_id, cell, **kwargs) # noqa: E501 - else: - (data) = self.put_dashboards_id_cells_with_http_info(dashboard_id, cell, **kwargs) # noqa: E501 - return data - - def put_dashboards_id_cells_with_http_info(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - """Replace cells in a dashboard. - - Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_dashboards_id_cells_with_http_info(dashboard_id, cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param list[Cell] cell: (required) - :param str zap_trace_span: OpenTracing span context - :return: Dashboard - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_dashboards_id_cells_async(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - """Replace cells in a dashboard. - - Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param list[Cell] cell: (required) - :param str zap_trace_span: OpenTracing span context - :return: Dashboard - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_dashboards_id_cells_prepare(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('put_dashboards_id_cells', all_params, local_var_params) - # 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 `put_dashboards_id_cells`") # noqa: E501 - # verify the required parameter 'cell' is set - if ('cell' not in local_var_params or - local_var_params['cell'] is None): - raise ValueError("Missing the required parameter `cell` when calling `put_dashboards_id_cells`") # noqa: E501 - - 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 - - body_params = None - if 'cell' in local_var_params: - body_params = local_var_params['cell'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/checks_service.py b/frogpilot/third_party/influxdb_client/service/checks_service.py deleted file mode 100644 index 2c780f351..000000000 --- a/frogpilot/third_party/influxdb_client/service/checks_service.py +++ /dev/null @@ -1,1253 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class ChecksService(_BaseService): - """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 - """ChecksService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def create_check(self, post_check, **kwargs): # noqa: E501,D401,D403 - """Add new check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_check(post_check, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostCheck post_check: Check to create (required) - :return: Check - 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.create_check_with_http_info(post_check, **kwargs) # noqa: E501 - else: - (data) = self.create_check_with_http_info(post_check, **kwargs) # noqa: E501 - return data - - def create_check_with_http_info(self, post_check, **kwargs): # noqa: E501,D401,D403 - """Add new check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_check_with_http_info(post_check, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostCheck post_check: Check to create (required) - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_check_prepare(post_check, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def create_check_async(self, post_check, **kwargs): # noqa: E501,D401,D403 - """Add new check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param PostCheck post_check: Check to create (required) - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_check_prepare(post_check, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _create_check_prepare(self, post_check, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['post_check'] # noqa: E501 - self._check_operation_params('create_check', all_params, local_var_params) - # verify the required parameter 'post_check' is set - if ('post_check' not in local_var_params or - local_var_params['post_check'] is None): - raise ValueError("Missing the required parameter `post_check` when calling `create_check`") # noqa: E501 - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'post_check' in local_var_params: - body_params = local_var_params['post_check'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_checks_id(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Delete a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_checks_id(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check 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_checks_id_with_http_info(check_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_checks_id_with_http_info(check_id, **kwargs) # noqa: E501 - return data - - def delete_checks_id_with_http_info(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Delete a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_checks_id_with_http_info(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check 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, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_prepare(check_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_checks_id_async(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Delete a check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check 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, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_prepare(check_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_checks_id_prepare(self, check_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_checks_id', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `delete_checks_id`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_checks_id_labels_id(self, check_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete label from a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_checks_id_labels_id(check_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str label_id: The ID of the label 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_checks_id_labels_id_with_http_info(check_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_checks_id_labels_id_with_http_info(check_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_checks_id_labels_id_with_http_info(self, check_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete label from a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_checks_id_labels_id_with_http_info(check_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_labels_id_prepare(check_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_checks_id_labels_id_async(self, check_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete label from a check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_checks_id_labels_id_prepare(check_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_checks_id_labels_id_prepare(self, check_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_checks_id_labels_id', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `delete_checks_id_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_checks_id_labels_id`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_checks(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all checks. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: Only show checks that belong to a specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :return: Checks - 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_checks_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_checks_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_checks_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all checks. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: Only show checks that belong to a specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :return: Checks - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Checks', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_checks_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all checks. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: Only show checks that belong to a specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :return: Checks - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Checks', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_checks_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - self._check_operation_params('get_checks', all_params, local_var_params) - # 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_checks`") # 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_checks`, 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_checks`, 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_checks`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_checks_id(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks_id(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - 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_checks_id_with_http_info(check_id, **kwargs) # noqa: E501 - else: - (data) = self.get_checks_id_with_http_info(check_id, **kwargs) # noqa: E501 - return data - - def get_checks_id_with_http_info(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks_id_with_http_info(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_prepare(check_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_checks_id_async(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_prepare(check_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_checks_id_prepare(self, check_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_checks_id', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `get_checks_id`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_checks_id_labels(self, check_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks_id_labels(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - 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_checks_id_labels_with_http_info(check_id, **kwargs) # noqa: E501 - else: - (data) = self.get_checks_id_labels_with_http_info(check_id, **kwargs) # noqa: E501 - return data - - def get_checks_id_labels_with_http_info(self, check_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks_id_labels_with_http_info(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_labels_prepare(check_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_checks_id_labels_async(self, check_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_labels_prepare(check_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_checks_id_labels_prepare(self, check_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_checks_id_labels', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `get_checks_id_labels`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_checks_id_query(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a check query. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks_id_query(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxResponse - 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_checks_id_query_with_http_info(check_id, **kwargs) # noqa: E501 - else: - (data) = self.get_checks_id_query_with_http_info(check_id, **kwargs) # noqa: E501 - return data - - def get_checks_id_query_with_http_info(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a check query. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_checks_id_query_with_http_info(check_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_query_prepare(check_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}/query', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_checks_id_query_async(self, check_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a check query. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_checks_id_query_prepare(check_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}/query', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_checks_id_query_prepare(self, check_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_checks_id_query', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `get_checks_id_query`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_checks_id(self, check_id, check_patch, **kwargs): # noqa: E501,D401,D403 - """Update a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_checks_id(check_id, check_patch, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param CheckPatch check_patch: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - 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_checks_id_with_http_info(check_id, check_patch, **kwargs) # noqa: E501 - else: - (data) = self.patch_checks_id_with_http_info(check_id, check_patch, **kwargs) # noqa: E501 - return data - - def patch_checks_id_with_http_info(self, check_id, check_patch, **kwargs): # noqa: E501,D401,D403 - """Update a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_checks_id_with_http_info(check_id, check_patch, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param CheckPatch check_patch: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_checks_id_prepare(check_id, check_patch, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_checks_id_async(self, check_id, check_patch, **kwargs): # noqa: E501,D401,D403 - """Update a check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check ID. (required) - :param CheckPatch check_patch: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_checks_id_prepare(check_id, check_patch, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_checks_id_prepare(self, check_id, check_patch, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'check_patch', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_checks_id', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `patch_checks_id`") # noqa: E501 - # verify the required parameter 'check_patch' is set - if ('check_patch' not in local_var_params or - local_var_params['check_patch'] is None): - raise ValueError("Missing the required parameter `check_patch` when calling `patch_checks_id`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_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 - - body_params = None - if 'check_patch' in local_var_params: - body_params = local_var_params['check_patch'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_checks_id_labels(self, check_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_checks_id_labels(check_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_checks_id_labels_with_http_info(check_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_checks_id_labels_with_http_info(check_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_checks_id_labels_with_http_info(self, check_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_checks_id_labels_with_http_info(check_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_checks_id_labels_prepare(check_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_checks_id_labels_async(self, check_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_checks_id_labels_prepare(check_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_checks_id_labels_prepare(self, check_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_checks_id_labels', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `post_checks_id_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_checks_id_labels`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_checks_id(self, check_id, check, **kwargs): # noqa: E501,D401,D403 - """Update a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_checks_id(check_id, check, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param Check check: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - 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.put_checks_id_with_http_info(check_id, check, **kwargs) # noqa: E501 - else: - (data) = self.put_checks_id_with_http_info(check_id, check, **kwargs) # noqa: E501 - return data - - def put_checks_id_with_http_info(self, check_id, check, **kwargs): # noqa: E501,D401,D403 - """Update a check. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_checks_id_with_http_info(check_id, check, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str check_id: The check ID. (required) - :param Check check: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_checks_id_prepare(check_id, check, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/checks/{checkID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_checks_id_async(self, check_id, check, **kwargs): # noqa: E501,D401,D403 - """Update a check. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str check_id: The check ID. (required) - :param Check check: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Check - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_checks_id_prepare(check_id, check, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/checks/{checkID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Check', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_checks_id_prepare(self, check_id, check, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['check_id', 'check', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('put_checks_id', all_params, local_var_params) - # verify the required parameter 'check_id' is set - if ('check_id' not in local_var_params or - local_var_params['check_id'] is None): - raise ValueError("Missing the required parameter `check_id` when calling `put_checks_id`") # noqa: E501 - # verify the required parameter 'check' is set - if ('check' not in local_var_params or - local_var_params['check'] is None): - raise ValueError("Missing the required parameter `check` when calling `put_checks_id`") # noqa: E501 - - path_params = {} - if 'check_id' in local_var_params: - path_params['checkID'] = local_var_params['check_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 - - body_params = None - if 'check' in local_var_params: - body_params = local_var_params['check'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/config_service.py b/frogpilot/third_party/influxdb_client/service/config_service.py deleted file mode 100644 index 2dd85d670..000000000 --- a/frogpilot/third_party/influxdb_client/service/config_service.py +++ /dev/null @@ -1,250 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class ConfigService(_BaseService): - """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 - """ConfigService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_config(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve runtime configuration. - - Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/latest/reference/config-options/#view-your-runtime-server-configuration) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_config(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Config - 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_config_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_config_with_http_info(**kwargs) # noqa: E501 - return data - - def get_config_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve runtime configuration. - - Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/latest/reference/config-options/#view-your-runtime-server-configuration) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_config_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Config - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_config_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/config', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Config', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_config_async(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve runtime configuration. - - Returns the active runtime configuration of the InfluxDB instance. In InfluxDB v2.2+, use this endpoint to view your active runtime configuration, including flags and environment variables. #### Related guides - [View your runtime server configuration](https://docs.influxdata.com/influxdb/latest/reference/config-options/#view-your-runtime-server-configuration) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Config - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_config_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/config', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Config', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_config_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_config', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_flags(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve feature flags. - - Retrieves the feature flag key-value pairs configured for the InfluxDB instance. _Feature flags_ are configuration options used to develop and test experimental InfluxDB features and are intended for internal use only. This endpoint represents the first step in the following three-step process to configure feature flags: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. 2. Follow the instructions to [enable, disable, or override values for feature flags](https://docs.influxdata.com/influxdb/latest/reference/config-options/#feature-flags). 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. - Send a request to the [`GET /api/v2/config` endpoint](#operation/GetConfig) to retrieve the current runtime server configuration. #### Related guides - [InfluxDB configuration options](https://docs.influxdata.com/influxdb/latest/reference/config-options/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_flags(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: dict(str, object) - 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_flags_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_flags_with_http_info(**kwargs) # noqa: E501 - return data - - def get_flags_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve feature flags. - - Retrieves the feature flag key-value pairs configured for the InfluxDB instance. _Feature flags_ are configuration options used to develop and test experimental InfluxDB features and are intended for internal use only. This endpoint represents the first step in the following three-step process to configure feature flags: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. 2. Follow the instructions to [enable, disable, or override values for feature flags](https://docs.influxdata.com/influxdb/latest/reference/config-options/#feature-flags). 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. - Send a request to the [`GET /api/v2/config` endpoint](#operation/GetConfig) to retrieve the current runtime server configuration. #### Related guides - [InfluxDB configuration options](https://docs.influxdata.com/influxdb/latest/reference/config-options/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_flags_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: dict(str, object) - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_flags_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/flags', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='dict(str, object)', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_flags_async(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve feature flags. - - Retrieves the feature flag key-value pairs configured for the InfluxDB instance. _Feature flags_ are configuration options used to develop and test experimental InfluxDB features and are intended for internal use only. This endpoint represents the first step in the following three-step process to configure feature flags: 1. Use [token authentication](#section/Authentication/TokenAuthentication) or a [user session](#tag/Signin) with this endpoint to retrieve feature flags and their values. 2. Follow the instructions to [enable, disable, or override values for feature flags](https://docs.influxdata.com/influxdb/latest/reference/config-options/#feature-flags). 3. **Optional**: To confirm that your change is applied, do one of the following: - Send a request to this endpoint to retrieve the current feature flag values. - Send a request to the [`GET /api/v2/config` endpoint](#operation/GetConfig) to retrieve the current runtime server configuration. #### Related guides - [InfluxDB configuration options](https://docs.influxdata.com/influxdb/latest/reference/config-options/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: dict(str, object) - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_flags_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/flags', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='dict(str, object)', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_flags_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_flags', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/dashboards_service.py b/frogpilot/third_party/influxdb_client/service/dashboards_service.py deleted file mode 100644 index 801c6c76f..000000000 --- a/frogpilot/third_party/influxdb_client/service/dashboards_service.py +++ /dev/null @@ -1,2568 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class DashboardsService(_BaseService): - """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 - """DashboardsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_dashboards_id(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard. - - 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(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 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_dashboards_id_with_http_info(dashboard_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_dashboards_id_with_http_info(dashboard_id, **kwargs) # noqa: E501 - return data - - def delete_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard. - - 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_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 str zap_trace_span: OpenTracing span context - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_dashboards_id_async(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (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, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_dashboards_id_prepare(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_dashboards_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_dashboards_id_cells_id(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard cell. - - 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_cells_id(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to delete. (required) - :param str cell_id: The ID of the cell 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_dashboards_id_cells_id_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_dashboards_id_cells_id_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - return data - - def delete_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard cell. - - 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_cells_id_with_http_info(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to delete. (required) - :param str cell_id: The ID of the cell 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, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_dashboards_id_cells_id_async(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Delete a dashboard cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to delete. (required) - :param str cell_id: The ID of the cell 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, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_cells_id_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_dashboards_id_cells_id_prepare(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_dashboards_id_cells_id', all_params, local_var_params) - # 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_cells_id`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `delete_dashboards_id_cells_id`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_dashboards_id_labels_id(self, dashboard_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a dashboard. - - 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_labels_id(dashboard_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str label_id: The ID of the label 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_dashboards_id_labels_id_with_http_info(dashboard_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_dashboards_id_labels_id_with_http_info(dashboard_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_dashboards_id_labels_id_with_http_info(self, dashboard_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a dashboard. - - 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_labels_id_with_http_info(dashboard_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_labels_id_prepare(dashboard_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_dashboards_id_labels_id_async(self, dashboard_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a dashboard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_labels_id_prepare(dashboard_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_dashboards_id_labels_id_prepare(self, dashboard_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_dashboards_id_labels_id', all_params, local_var_params) - # 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_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_dashboards_id_labels_id`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_dashboards_id_members_id(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a dashboard. - - 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) - >>> 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 - 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 - else: - (data) = self.delete_dashboards_id_members_id_with_http_info(user_id, dashboard_id, **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. - - 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) - >>> 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 - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_members_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_dashboards_id_members_id_async(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a dashboard. - - This method makes an asynchronous HTTP request. - - :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 - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_members_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_dashboards_id_members_id_prepare(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'dashboard_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_dashboards_id_members_id', all_params, local_var_params) - # 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 - - 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 = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_dashboards_id_owners_id(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a dashboard. - - 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) - >>> 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 - 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 - else: - (data) = self.delete_dashboards_id_owners_id_with_http_info(user_id, dashboard_id, **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. - - 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) - >>> 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 - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_owners_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_dashboards_id_owners_id_async(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a dashboard. - - This method makes an asynchronous HTTP request. - - :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 - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dashboards_id_owners_id_prepare(user_id, dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_dashboards_id_owners_id_prepare(self, user_id, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'dashboard_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_dashboards_id_owners_id', all_params, local_var_params) - # 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 - - 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 = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_dashboards(self, **kwargs): # noqa: E501,D401,D403 - """List dashboards. - - Lists [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). #### Related guides - [Manage dashboards](https://docs.influxdata.com/influxdb/latest/visualize-data/dashboards/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param bool descending: - :param str owner: A user ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) where the specified user has the `owner` role. - :param str sort_by: The column to sort by. - :param list[str] id: A list of dashboard IDs. Returns only the specified [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). If you specify `id` and `owner`, only `id` is used. - :param str org_id: An organization ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str org: An organization name. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :return: Dashboards - 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_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_with_http_info(**kwargs) # noqa: E501 - return data - - def get_dashboards_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List dashboards. - - Lists [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). #### Related guides - [Manage dashboards](https://docs.influxdata.com/influxdb/latest/visualize-data/dashboards/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dashboards_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param bool descending: - :param str owner: A user ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) where the specified user has the `owner` role. - :param str sort_by: The column to sort by. - :param list[str] id: A list of dashboard IDs. Returns only the specified [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). If you specify `id` and `owner`, only `id` is used. - :param str org_id: An organization ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str org: An organization name. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :return: Dashboards - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboards', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_async(self, **kwargs): # noqa: E501,D401,D403 - """List dashboards. - - Lists [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). #### Related guides - [Manage dashboards](https://docs.influxdata.com/influxdb/latest/visualize-data/dashboards/). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param bool descending: - :param str owner: A user ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) where the specified user has the `owner` role. - :param str sort_by: The column to sort by. - :param list[str] id: A list of dashboard IDs. Returns only the specified [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard). If you specify `id` and `owner`, only `id` is used. - :param str org_id: An organization ID. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :param str org: An organization name. Only returns [dashboards](https://docs.influxdata.com/influxdb/latest/reference/glossary/#dashboard) that belong to the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). - :return: Dashboards - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboards', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'offset', 'limit', 'descending', 'owner', 'sort_by', 'id', 'org_id', 'org'] # noqa: E501 - self._check_operation_params('get_dashboards', all_params, local_var_params) - - 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 - 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: - query_params.append(('sortBy', local_var_params['sort_by'])) # noqa: E501 - if 'id' in local_var_params: - query_params.append(('id', local_var_params['id'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_dashboards_id(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a dashboard. - - 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(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 str zap_trace_span: OpenTracing span context - :param str include: If `properties`, includes the cell view properties in the response. - :return: DashboardWithViewProperties - 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_with_http_info(dashboard_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_with_http_info(dashboard_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_with_http_info(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a dashboard. - - 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_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 str zap_trace_span: OpenTracing span context - :param str include: If `properties`, includes the cell view properties in the response. - :return: DashboardWithViewProperties - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DashboardWithViewProperties', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_id_async(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a dashboard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str zap_trace_span: OpenTracing span context - :param str include: If `properties`, includes the cell view properties in the response. - :return: DashboardWithViewProperties - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DashboardWithViewProperties', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_id_prepare(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span', 'include'] # noqa: E501 - self._check_operation_params('get_dashboards_id', all_params, local_var_params) - # 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`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - - query_params = [] - if 'include' in local_var_params: - query_params.append(('include', local_var_params['include'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_dashboards_id_cells_id_view(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - 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_cells_id_view(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - 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_cells_id_view_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_cells_id_view_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - 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_cells_id_view_with_http_info(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_id_cells_id_view_prepare(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_dashboards_id_cells_id_view', all_params, local_var_params) - # 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_cells_id_view`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `get_dashboards_id_cells_id_view`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_dashboards_id_labels(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """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 - >>> thread = api.get_dashboards_id_labels(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: LabelsResponse - 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_labels_with_http_info(dashboard_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_labels_with_http_info(dashboard_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_labels_with_http_info(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """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 - >>> thread = api.get_dashboards_id_labels_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: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_labels_prepare(dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_id_labels_async(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a dashboard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_labels_prepare(dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_id_labels_prepare(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_dashboards_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_members_prepare(dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_id_members_async(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """List all dashboard members. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_members_prepare(dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_id_members_prepare(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_dashboards_id_members', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_owners_prepare(dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_id_owners_async(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """List all dashboard owners. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_owners_prepare(dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_id_owners_prepare(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_dashboards_id_owners', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (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, **kwargs) # noqa: E501 - else: - (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, **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, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (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, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_dashboards_id_async(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - """Update a dashboard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (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, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_prepare(dashboard_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_dashboards_id_prepare(self, dashboard_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'zap_trace_span', 'patch_dashboard_request'] # noqa: E501 - self._check_operation_params('patch_dashboards_id', all_params, local_var_params) - # 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 `patch_dashboards_id`") # noqa: E501 - - 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 - - body_params = None - 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 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_dashboards_id_cells_id(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - """Update the non-positional information related to a cell. - - Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. - 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_cells_id(dashboard_id, cell_id, cell_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param CellUpdate cell_update: (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - 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_cells_id_with_http_info(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - else: - (data) = self.patch_dashboards_id_cells_id_with_http_info(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - return data - - def patch_dashboards_id_cells_id_with_http_info(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - """Update the non-positional information related to a cell. - - Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. - 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_cells_id_with_http_info(dashboard_id, cell_id, cell_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param CellUpdate cell_update: (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_dashboards_id_cells_id_async(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - """Update the non-positional information related to a cell. - - Updates the non positional information related to a cell. Updates to a single cell's positional data could cause grid conflicts. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param CellUpdate cell_update: (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_prepare(dashboard_id, cell_id, cell_update, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_dashboards_id_cells_id_prepare(self, dashboard_id, cell_id, cell_update, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'cell_update', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_dashboards_id_cells_id', all_params, local_var_params) - # 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 `patch_dashboards_id_cells_id`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `patch_dashboards_id_cells_id`") # noqa: E501 - # verify the required parameter 'cell_update' is set - if ('cell_update' not in local_var_params or - local_var_params['cell_update'] is None): - raise ValueError("Missing the required parameter `cell_update` when calling `patch_dashboards_id_cells_id`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - if 'cell_update' in local_var_params: - body_params = local_var_params['cell_update'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_dashboards_id_cells_id_view(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - 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_cells_id_view(dashboard_id, cell_id, view, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - 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_cells_id_view_with_http_info(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - else: - (data) = self.patch_dashboards_id_cells_id_view_with_http_info(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - return data - - def patch_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - 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_cells_id_view_with_http_info(dashboard_id, cell_id, view, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_dashboards_id_cells_id_view_prepare(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'view', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_dashboards_id_cells_id_view', all_params, local_var_params) - # 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 `patch_dashboards_id_cells_id_view`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `patch_dashboards_id_cells_id_view`") # noqa: E501 - # verify the required parameter 'view' is set - if ('view' not in local_var_params or - local_var_params['view'] is None): - raise ValueError("Missing the required parameter `view` when calling `patch_dashboards_id_cells_id_view`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - if 'view' in local_var_params: - body_params = local_var_params['view'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_dashboards(self, create_dashboard_request, **kwargs): # noqa: E501,D401,D403 - """Create 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(create_dashboard_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CreateDashboardRequest create_dashboard_request: Dashboard to create (required) - :param str zap_trace_span: OpenTracing span context - :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.post_dashboards_with_http_info(create_dashboard_request, **kwargs) # noqa: E501 - else: - (data) = self.post_dashboards_with_http_info(create_dashboard_request, **kwargs) # noqa: E501 - return data - - def post_dashboards_with_http_info(self, create_dashboard_request, **kwargs): # noqa: E501,D401,D403 - """Create 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_with_http_info(create_dashboard_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param CreateDashboardRequest create_dashboard_request: Dashboard to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Dashboard - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_prepare(create_dashboard_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_dashboards_async(self, create_dashboard_request, **kwargs): # noqa: E501,D401,D403 - """Create a dashboard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param CreateDashboardRequest create_dashboard_request: Dashboard to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Dashboard - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_prepare(create_dashboard_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_dashboards_prepare(self, create_dashboard_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['create_dashboard_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_dashboards', all_params, local_var_params) - # verify the required parameter 'create_dashboard_request' is set - if ('create_dashboard_request' not in local_var_params or - local_var_params['create_dashboard_request'] is None): - raise ValueError("Missing the required parameter `create_dashboard_request` when calling `post_dashboards`") # noqa: E501 - - 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 - - body_params = None - if 'create_dashboard_request' in local_var_params: - body_params = local_var_params['create_dashboard_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_dashboards_id_cells(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - """Create a dashboard cell. - - 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_cells(dashboard_id, create_cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param CreateCell create_cell: Cell that will be added (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - 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_cells_with_http_info(dashboard_id, create_cell, **kwargs) # noqa: E501 - else: - (data) = self.post_dashboards_id_cells_with_http_info(dashboard_id, create_cell, **kwargs) # noqa: E501 - return data - - def post_dashboards_id_cells_with_http_info(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - """Create a dashboard cell. - - 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_cells_with_http_info(dashboard_id, create_cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param CreateCell create_cell: Cell that will be added (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_dashboards_id_cells_async(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - """Create a dashboard cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param CreateCell create_cell: Cell that will be added (required) - :param str zap_trace_span: OpenTracing span context - :return: Cell - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_cells_prepare(dashboard_id, create_cell, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Cell', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_dashboards_id_cells_prepare(self, dashboard_id, create_cell, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'create_cell', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_dashboards_id_cells', all_params, local_var_params) - # 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_cells`") # noqa: E501 - # verify the required parameter 'create_cell' is set - if ('create_cell' not in local_var_params or - local_var_params['create_cell'] is None): - raise ValueError("Missing the required parameter `create_cell` when calling `post_dashboards_id_cells`") # noqa: E501 - - 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 - - body_params = None - if 'create_cell' in local_var_params: - body_params = local_var_params['create_cell'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_dashboards_id_labels(self, dashboard_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label 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_labels(dashboard_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_labels_with_http_info(dashboard_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_dashboards_id_labels_with_http_info(dashboard_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_dashboards_id_labels_with_http_info(self, dashboard_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label 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_labels_with_http_info(dashboard_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_labels_prepare(dashboard_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_dashboards_id_labels_async(self, dashboard_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a dashboard. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_labels_prepare(dashboard_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_dashboards_id_labels_prepare(self, dashboard_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_dashboards_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_dashboards_id_labels`") # noqa: E501 - - 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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_members_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_dashboards_id_members_async(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a dashboard. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_members_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_dashboards_id_members_prepare(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_dashboards_id_members', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_owners_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_dashboards_id_owners_async(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a dashboard. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._post_dashboards_id_owners_prepare(dashboard_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_dashboards_id_owners_prepare(self, dashboard_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_dashboards_id_owners', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_dashboards_id_cells(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - """Replace cells in a dashboard. - - Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_dashboards_id_cells(dashboard_id, cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param list[Cell] cell: (required) - :param str zap_trace_span: OpenTracing span context - :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.put_dashboards_id_cells_with_http_info(dashboard_id, cell, **kwargs) # noqa: E501 - else: - (data) = self.put_dashboards_id_cells_with_http_info(dashboard_id, cell, **kwargs) # noqa: E501 - return data - - def put_dashboards_id_cells_with_http_info(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - """Replace cells in a dashboard. - - Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_dashboards_id_cells_with_http_info(dashboard_id, cell, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param list[Cell] cell: (required) - :param str zap_trace_span: OpenTracing span context - :return: Dashboard - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_dashboards_id_cells_async(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - """Replace cells in a dashboard. - - Replaces all cells in a dashboard. This is used primarily to update the positional information of all cells. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param list[Cell] cell: (required) - :param str zap_trace_span: OpenTracing span context - :return: Dashboard - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_dashboards_id_cells_prepare(dashboard_id, cell, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Dashboard', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_dashboards_id_cells_prepare(self, dashboard_id, cell, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('put_dashboards_id_cells', all_params, local_var_params) - # 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 `put_dashboards_id_cells`") # noqa: E501 - # verify the required parameter 'cell' is set - if ('cell' not in local_var_params or - local_var_params['cell'] is None): - raise ValueError("Missing the required parameter `cell` when calling `put_dashboards_id_cells`") # noqa: E501 - - 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 - - body_params = None - if 'cell' in local_var_params: - body_params = local_var_params['cell'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/dbr_ps_service.py b/frogpilot/third_party/influxdb_client/service/dbr_ps_service.py deleted file mode 100644 index 4fb20aef3..000000000 --- a/frogpilot/third_party/influxdb_client/service/dbr_ps_service.py +++ /dev/null @@ -1,695 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class DBRPsService(_BaseService): - """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 - """DBRPsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_dbrpid(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - """Delete a database retention policy. - - Deletes the specified database retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_dbrpid(dbrp_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Only returns the specified DBRP mapping. (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :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_dbrpid_with_http_info(dbrp_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_dbrpid_with_http_info(dbrp_id, **kwargs) # noqa: E501 - return data - - def delete_dbrpid_with_http_info(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - """Delete a database retention policy. - - Deletes the specified database retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_dbrpid_with_http_info(dbrp_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Only returns the specified DBRP mapping. (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dbrpid_prepare(dbrp_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dbrps/{dbrpID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_dbrpid_async(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - """Delete a database retention policy. - - Deletes the specified database retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Only returns the specified DBRP mapping. (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_dbrpid_prepare(dbrp_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dbrps/{dbrpID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_dbrpid_prepare(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dbrp_id', 'zap_trace_span', 'org_id', 'org'] # noqa: E501 - self._check_operation_params('delete_dbrpid', all_params, local_var_params) - # verify the required parameter 'dbrp_id' is set - if ('dbrp_id' not in local_var_params or - local_var_params['dbrp_id'] is None): - raise ValueError("Missing the required parameter `dbrp_id` when calling `delete_dbrpid`") # noqa: E501 - - path_params = {} - if 'dbrp_id' in local_var_params: - path_params['dbrpID'] = local_var_params['dbrp_id'] # noqa: E501 - - query_params = [] - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_dbr_ps(self, **kwargs): # noqa: E501,D401,D403 - """List database retention policy mappings. - - Lists database retention policy (DBRP) mappings. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dbr_ps(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Only returns DBRP mappings for the specified organization. - :param str org: An organization name. Only returns DBRP mappings for the specified organization. - :param str id: A DBPR mapping ID. Only returns the specified DBRP mapping. - :param str bucket_id: A bucket ID. Only returns DBRP mappings that belong to the specified bucket. - :param bool default: Specifies filtering on default - :param str db: A database. Only returns DBRP mappings that belong to the 1.x database. - :param str rp: A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. - :return: DBRPs - 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_dbr_ps_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_dbr_ps_with_http_info(**kwargs) # noqa: E501 - return data - - def get_dbr_ps_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List database retention policy mappings. - - Lists database retention policy (DBRP) mappings. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dbr_ps_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Only returns DBRP mappings for the specified organization. - :param str org: An organization name. Only returns DBRP mappings for the specified organization. - :param str id: A DBPR mapping ID. Only returns the specified DBRP mapping. - :param str bucket_id: A bucket ID. Only returns DBRP mappings that belong to the specified bucket. - :param bool default: Specifies filtering on default - :param str db: A database. Only returns DBRP mappings that belong to the 1.x database. - :param str rp: A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. - :return: DBRPs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dbrps', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRPs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dbr_ps_async(self, **kwargs): # noqa: E501,D401,D403 - """List database retention policy mappings. - - Lists database retention policy (DBRP) mappings. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Only returns DBRP mappings for the specified organization. - :param str org: An organization name. Only returns DBRP mappings for the specified organization. - :param str id: A DBPR mapping ID. Only returns the specified DBRP mapping. - :param str bucket_id: A bucket ID. Only returns DBRP mappings that belong to the specified bucket. - :param bool default: Specifies filtering on default - :param str db: A database. Only returns DBRP mappings that belong to the 1.x database. - :param str rp: A [retention policy](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#retention-policy-rp). Specifies the 1.x retention policy to filter on. - :return: DBRPs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dbrps', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRPs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dbr_ps_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'org_id', 'org', 'id', 'bucket_id', 'default', 'db', 'rp'] # noqa: E501 - self._check_operation_params('get_dbr_ps', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'id' in local_var_params: - query_params.append(('id', local_var_params['id'])) # noqa: E501 - if 'bucket_id' in local_var_params: - query_params.append(('bucketID', local_var_params['bucket_id'])) # noqa: E501 - if 'default' in local_var_params: - query_params.append(('default', local_var_params['default'])) # noqa: E501 - if 'db' in local_var_params: - query_params.append(('db', local_var_params['db'])) # noqa: E501 - if 'rp' in local_var_params: - query_params.append(('rp', local_var_params['rp'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_dbr_ps_id(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a database retention policy mapping. - - Retrieves the specified retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dbr_ps_id(dbrp_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: DBRPGet - 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_dbr_ps_id_with_http_info(dbrp_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dbr_ps_id_with_http_info(dbrp_id, **kwargs) # noqa: E501 - return data - - def get_dbr_ps_id_with_http_info(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a database retention policy mapping. - - Retrieves the specified retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_dbr_ps_id_with_http_info(dbrp_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: DBRPGet - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_id_prepare(dbrp_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dbrps/{dbrpID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRPGet', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dbr_ps_id_async(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a database retention policy mapping. - - Retrieves the specified retention policy (DBRP) mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: DBRPGet - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dbr_ps_id_prepare(dbrp_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dbrps/{dbrpID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRPGet', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dbr_ps_id_prepare(self, dbrp_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dbrp_id', 'zap_trace_span', 'org_id', 'org'] # noqa: E501 - self._check_operation_params('get_dbr_ps_id', all_params, local_var_params) - # verify the required parameter 'dbrp_id' is set - if ('dbrp_id' not in local_var_params or - local_var_params['dbrp_id'] is None): - raise ValueError("Missing the required parameter `dbrp_id` when calling `get_dbr_ps_id`") # noqa: E501 - - path_params = {} - if 'dbrp_id' in local_var_params: - path_params['dbrpID'] = local_var_params['dbrp_id'] # noqa: E501 - - query_params = [] - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_dbrpid(self, dbrp_id, dbrp_update, **kwargs): # noqa: E501,D401,D403 - """Update a database retention policy mapping. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_dbrpid(dbrp_id, dbrp_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) - :param DBRPUpdate dbrp_update: Updates the database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to modify the _retention policy_ (`retention_policy` property) of a DBRP mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: DBRPGet - 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_dbrpid_with_http_info(dbrp_id, dbrp_update, **kwargs) # noqa: E501 - else: - (data) = self.patch_dbrpid_with_http_info(dbrp_id, dbrp_update, **kwargs) # noqa: E501 - return data - - def patch_dbrpid_with_http_info(self, dbrp_id, dbrp_update, **kwargs): # noqa: E501,D401,D403 - """Update a database retention policy mapping. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_dbrpid_with_http_info(dbrp_id, dbrp_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) - :param DBRPUpdate dbrp_update: Updates the database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to modify the _retention policy_ (`retention_policy` property) of a DBRP mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: DBRPGet - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dbrpid_prepare(dbrp_id, dbrp_update, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dbrps/{dbrpID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRPGet', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_dbrpid_async(self, dbrp_id, dbrp_update, **kwargs): # noqa: E501,D401,D403 - """Update a database retention policy mapping. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dbrp_id: A DBRP mapping ID. Specifies the DBRP mapping. (required) - :param DBRPUpdate dbrp_update: Updates the database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to modify the _retention policy_ (`retention_policy` property) of a DBRP mapping. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) (required) - :param str zap_trace_span: OpenTracing span context - :param str org_id: An organization ID. Specifies the organization that owns the DBRP mapping. - :param str org: An organization name. Specifies the organization that owns the DBRP mapping. - :return: DBRPGet - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dbrpid_prepare(dbrp_id, dbrp_update, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dbrps/{dbrpID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRPGet', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_dbrpid_prepare(self, dbrp_id, dbrp_update, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dbrp_id', 'dbrp_update', 'zap_trace_span', 'org_id', 'org'] # noqa: E501 - self._check_operation_params('patch_dbrpid', all_params, local_var_params) - # verify the required parameter 'dbrp_id' is set - if ('dbrp_id' not in local_var_params or - local_var_params['dbrp_id'] is None): - raise ValueError("Missing the required parameter `dbrp_id` when calling `patch_dbrpid`") # noqa: E501 - # verify the required parameter 'dbrp_update' is set - if ('dbrp_update' not in local_var_params or - local_var_params['dbrp_update'] is None): - raise ValueError("Missing the required parameter `dbrp_update` when calling `patch_dbrpid`") # noqa: E501 - - path_params = {} - if 'dbrp_id' in local_var_params: - path_params['dbrpID'] = local_var_params['dbrp_id'] # noqa: E501 - - query_params = [] - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - if 'dbrp_update' in local_var_params: - body_params = local_var_params['dbrp_update'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_dbrp(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 - """Add a database retention policy mapping. - - Creates a database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to add InfluxDB 1.x API compatibility to your InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a DBRP mapping in order to query and write using the InfluxDB 1.x API. object. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_dbrp(dbrp_create, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DBRPCreate dbrp_create: The database retention policy mapping to add. Note that _`retention_policy`_ is a required parameter in the request body. The value of _`retention_policy`_ can be any arbitrary `string` name or value, with the default value commonly set as `autogen`. The value of _`retention_policy`_ isn't a [retention_policy](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-policy-rp) (required) - :param str zap_trace_span: OpenTracing span context - :return: DBRP - 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_dbrp_with_http_info(dbrp_create, **kwargs) # noqa: E501 - else: - (data) = self.post_dbrp_with_http_info(dbrp_create, **kwargs) # noqa: E501 - return data - - def post_dbrp_with_http_info(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 - """Add a database retention policy mapping. - - Creates a database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to add InfluxDB 1.x API compatibility to your InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a DBRP mapping in order to query and write using the InfluxDB 1.x API. object. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_dbrp_with_http_info(dbrp_create, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param DBRPCreate dbrp_create: The database retention policy mapping to add. Note that _`retention_policy`_ is a required parameter in the request body. The value of _`retention_policy`_ can be any arbitrary `string` name or value, with the default value commonly set as `autogen`. The value of _`retention_policy`_ isn't a [retention_policy](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-policy-rp) (required) - :param str zap_trace_span: OpenTracing span context - :return: DBRP - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dbrp_prepare(dbrp_create, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dbrps', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRP', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_dbrp_async(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 - """Add a database retention policy mapping. - - Creates a database retention policy (DBRP) mapping and returns the mapping. Use this endpoint to add InfluxDB 1.x API compatibility to your InfluxDB Cloud or InfluxDB OSS 2.x buckets. Your buckets must contain a DBRP mapping in order to query and write using the InfluxDB 1.x API. object. #### Related guide - [Database and retention policy mapping](https://docs.influxdata.com/influxdb/latest/reference/api/influxdb-1x/dbrp/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param DBRPCreate dbrp_create: The database retention policy mapping to add. Note that _`retention_policy`_ is a required parameter in the request body. The value of _`retention_policy`_ can be any arbitrary `string` name or value, with the default value commonly set as `autogen`. The value of _`retention_policy`_ isn't a [retention_policy](https://docs.influxdata.com/influxdb/latest/reference/glossary/#retention-policy-rp) (required) - :param str zap_trace_span: OpenTracing span context - :return: DBRP - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_dbrp_prepare(dbrp_create, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dbrps', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='DBRP', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_dbrp_prepare(self, dbrp_create, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dbrp_create', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_dbrp', all_params, local_var_params) - # verify the required parameter 'dbrp_create' is set - if ('dbrp_create' not in local_var_params or - local_var_params['dbrp_create'] is None): - raise ValueError("Missing the required parameter `dbrp_create` when calling `post_dbrp`") # noqa: E501 - - 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 - - body_params = None - if 'dbrp_create' in local_var_params: - body_params = local_var_params['dbrp_create'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/delete_service.py b/frogpilot/third_party/influxdb_client/service/delete_service.py deleted file mode 100644 index 7fef4ea94..000000000 --- a/frogpilot/third_party/influxdb_client/service/delete_service.py +++ /dev/null @@ -1,173 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class DeleteService(_BaseService): - """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.""" - super().__init__(api_client) - - def post_delete(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 - """Delete data. - - Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). - 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: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). (required) - :param str zap_trace_span: OpenTracing span context - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. - :param str bucket: A bucket name or ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. - :param str bucket_id: A bucket ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :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 data. - - Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). - 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: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). (required) - :param str zap_trace_span: OpenTracing span context - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. - :param str bucket: A bucket name or ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. - :param str bucket_id: A bucket ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_delete_prepare(delete_predicate_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/delete', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_delete_async(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 - """Delete data. - - Deletes data from a bucket. Use this endpoint to delete points from a bucket in a specified time range. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). - Learn how InfluxDB handles [deleted tags](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementtagkeys/) and [deleted fields](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/schema/measurementfieldkeys/). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param DeletePredicateRequest delete_predicate_request: Time range parameters and an optional **delete predicate expression**. To select points to delete within the specified time range, pass a **delete predicate expression** in the `predicate` property of the request body. If you don't pass a `predicate`, InfluxDB deletes all data with timestamps in the specified time range. #### Related guides - [Delete data](https://docs.influxdata.com/influxdb/latest/write-data/delete-data/) - Learn how to use [delete predicate syntax](https://docs.influxdata.com/influxdb/latest/reference/syntax/delete-predicate/). (required) - :param str zap_trace_span: OpenTracing span context - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. - :param str bucket: A bucket name or ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Deletes data from the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - Deletes data from the bucket in the specified organization. - If you pass both `orgID` and `org`, they must both be valid. - :param str bucket_id: A bucket ID. Specifies the bucket to delete data from. If you pass both `bucket` and `bucketID`, `bucketID` takes precedence. - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_delete_prepare(delete_predicate_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/delete', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_delete_prepare(self, delete_predicate_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['delete_predicate_request', 'zap_trace_span', 'org', 'bucket', 'org_id', 'bucket_id'] # noqa: E501 - self._check_operation_params('post_delete', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/health_service.py b/frogpilot/third_party/influxdb_client/service/health_service.py deleted file mode 100644 index 6a87da7a4..000000000 --- a/frogpilot/third_party/influxdb_client/service/health_service.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class HealthService(_BaseService): - """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 - """HealthService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_health(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve the health of the instance. - - Returns the health of the instance. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_health(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: HealthCheck - 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_health_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_health_with_http_info(**kwargs) # noqa: E501 - return data - - def get_health_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve the health of the instance. - - Returns the health of the instance. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_health_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: HealthCheck - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_health_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/health', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='HealthCheck', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_health_async(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve the health of the instance. - - Returns the health of the instance. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: HealthCheck - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_health_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/health', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='HealthCheck', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_health_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_health', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/invokable_scripts_service.py b/frogpilot/third_party/influxdb_client/service/invokable_scripts_service.py deleted file mode 100644 index 9c84503d7..000000000 --- a/frogpilot/third_party/influxdb_client/service/invokable_scripts_service.py +++ /dev/null @@ -1,922 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class InvokableScriptsService(_BaseService): - """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 - """InvokableScriptsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Delete a script. - - Deletes a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) and all associated records. #### Limitations - You can delete only one script per request. - If the script ID you provide doesn't exist for the organization, InfluxDB responds with an HTTP `204` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_scripts_id(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Deletes the specified script. (required) - :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_scripts_id_with_http_info(script_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_scripts_id_with_http_info(script_id, **kwargs) # noqa: E501 - return data - - def delete_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Delete a script. - - Deletes a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) and all associated records. #### Limitations - You can delete only one script per request. - If the script ID you provide doesn't exist for the organization, InfluxDB responds with an HTTP `204` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_scripts_id_with_http_info(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Deletes the specified script. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scripts_id_prepare(script_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scripts/{scriptID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Delete a script. - - Deletes a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) and all associated records. #### Limitations - You can delete only one script per request. - If the script ID you provide doesn't exist for the organization, InfluxDB responds with an HTTP `204` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str script_id: A script ID. Deletes the specified script. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_scripts_id_prepare(script_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scripts/{scriptID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_scripts_id_prepare(self, script_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['script_id'] # noqa: E501 - self._check_operation_params('delete_scripts_id', all_params, local_var_params) - # verify the required parameter 'script_id' is set - if ('script_id' not in local_var_params or - local_var_params['script_id'] is None): - raise ValueError("Missing the required parameter `script_id` when calling `delete_scripts_id`") # noqa: E501 - - path_params = {} - if 'script_id' in local_var_params: - path_params['scriptID'] = local_var_params['script_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_scripts(self, **kwargs): # noqa: E501,D401,D403 - """List scripts. - - Lists [scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scripts(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination). - :param int limit: The maximum number of scripts to return. Default is `100`. - :param str name: The script name. Lists scripts with the specified name. - :return: Scripts - 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_scripts_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_scripts_with_http_info(**kwargs) # noqa: E501 - return data - - def get_scripts_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List scripts. - - Lists [scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scripts_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination). - :param int limit: The maximum number of scripts to return. Default is `100`. - :param str name: The script name. Lists scripts with the specified name. - :return: Scripts - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scripts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Scripts', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scripts_async(self, **kwargs): # noqa: E501,D401,D403 - """List scripts. - - Lists [scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination]({{% INFLUXDB_DOCS_URL %}}/api/#tag/Pagination). - :param int limit: The maximum number of scripts to return. Default is `100`. - :param str name: The script name. Lists scripts with the specified name. - :return: Scripts - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scripts', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Scripts', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scripts_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['offset', 'limit', 'name'] # noqa: E501 - self._check_operation_params('get_scripts', all_params, local_var_params) - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_scripts`, must be a value greater than or equal to `0`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_scripts`, must be a value less than or equal to `500`") # noqa: E501 - if 'limit' in local_var_params and local_var_params['limit'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_scripts`, must be a value greater than or equal to `0`") # noqa: E501 - 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 'name' in local_var_params: - query_params.append(('name', local_var_params['name'])) # noqa: E501 - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_scripts_id(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a script. - - Retrieves a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scripts_id(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Retrieves the specified script. (required) - :return: Script - 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_scripts_id_with_http_info(script_id, **kwargs) # noqa: E501 - else: - (data) = self.get_scripts_id_with_http_info(script_id, **kwargs) # noqa: E501 - return data - - def get_scripts_id_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a script. - - Retrieves a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scripts_id_with_http_info(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Retrieves the specified script. (required) - :return: Script - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_id_prepare(script_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scripts/{scriptID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Script', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scripts_id_async(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a script. - - Retrieves a [script](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/). #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str script_id: A script ID. Retrieves the specified script. (required) - :return: Script - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_id_prepare(script_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scripts/{scriptID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Script', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scripts_id_prepare(self, script_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['script_id'] # noqa: E501 - self._check_operation_params('get_scripts_id', all_params, local_var_params) - # verify the required parameter 'script_id' is set - if ('script_id' not in local_var_params or - local_var_params['script_id'] is None): - raise ValueError("Missing the required parameter `script_id` when calling `get_scripts_id`") # noqa: E501 - - path_params = {} - if 'script_id' in local_var_params: - path_params['scriptID'] = local_var_params['script_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_scripts_id_params(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Find script parameters.. - - Analyzes a script and determines required parameters. Find all `params` keys referenced in a script and return a list of keys. If it is possible to determine the type of the value from the context then the type is also returned -- for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` Requesting the parameters using `GET /api/v2/scripts/SCRIPT_ID/params` returns the following: ```json { "params": { "mybucket": "string" } } ``` The type name returned for a parameter will be one of: - `any` - `bool` - `duration` - `float` - `int` - `string` - `time` - `uint` The type name `any` is used when the type of a parameter cannot be determined from the context, or the type is determined to be a structured type such as an array or record. #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scripts_id_params(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. The script to analyze for params. (required) - :return: Params - 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_scripts_id_params_with_http_info(script_id, **kwargs) # noqa: E501 - else: - (data) = self.get_scripts_id_params_with_http_info(script_id, **kwargs) # noqa: E501 - return data - - def get_scripts_id_params_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Find script parameters.. - - Analyzes a script and determines required parameters. Find all `params` keys referenced in a script and return a list of keys. If it is possible to determine the type of the value from the context then the type is also returned -- for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` Requesting the parameters using `GET /api/v2/scripts/SCRIPT_ID/params` returns the following: ```json { "params": { "mybucket": "string" } } ``` The type name returned for a parameter will be one of: - `any` - `bool` - `duration` - `float` - `int` - `string` - `time` - `uint` The type name `any` is used when the type of a parameter cannot be determined from the context, or the type is determined to be a structured type such as an array or record. #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scripts_id_params_with_http_info(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. The script to analyze for params. (required) - :return: Params - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_id_params_prepare(script_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scripts/{scriptID}/params', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Params', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scripts_id_params_async(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Find script parameters.. - - Analyzes a script and determines required parameters. Find all `params` keys referenced in a script and return a list of keys. If it is possible to determine the type of the value from the context then the type is also returned -- for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` Requesting the parameters using `GET /api/v2/scripts/SCRIPT_ID/params` returns the following: ```json { "params": { "mybucket": "string" } } ``` The type name returned for a parameter will be one of: - `any` - `bool` - `duration` - `float` - `int` - `string` - `time` - `uint` The type name `any` is used when the type of a parameter cannot be determined from the context, or the type is determined to be a structured type such as an array or record. #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str script_id: A script ID. The script to analyze for params. (required) - :return: Params - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scripts_id_params_prepare(script_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scripts/{scriptID}/params', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Params', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scripts_id_params_prepare(self, script_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['script_id'] # noqa: E501 - self._check_operation_params('get_scripts_id_params', all_params, local_var_params) - # verify the required parameter 'script_id' is set - if ('script_id' not in local_var_params or - local_var_params['script_id'] is None): - raise ValueError("Missing the required parameter `script_id` when calling `get_scripts_id_params`") # noqa: E501 - - path_params = {} - if 'script_id' in local_var_params: - path_params['scriptID'] = local_var_params['script_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_scripts_id(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a script. - - Updates an invokable script. Use this endpoint to modify values for script properties (`description` and `script`). To update a script, pass an object that contains the updated key-value pairs. #### Limitations - If you send an empty request body, the script will neither update nor store an empty script, but InfluxDB will respond with an HTTP `200` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_scripts_id(script_id, script_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Updates the specified script. (required) - :param ScriptUpdateRequest script_update_request: An object that contains the updated script properties to apply. (required) - :return: Script - 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_scripts_id_with_http_info(script_id, script_update_request, **kwargs) # noqa: E501 - else: - (data) = self.patch_scripts_id_with_http_info(script_id, script_update_request, **kwargs) # noqa: E501 - return data - - def patch_scripts_id_with_http_info(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a script. - - Updates an invokable script. Use this endpoint to modify values for script properties (`description` and `script`). To update a script, pass an object that contains the updated key-value pairs. #### Limitations - If you send an empty request body, the script will neither update nor store an empty script, but InfluxDB will respond with an HTTP `200` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_scripts_id_with_http_info(script_id, script_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Updates the specified script. (required) - :param ScriptUpdateRequest script_update_request: An object that contains the updated script properties to apply. (required) - :return: Script - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scripts_id_prepare(script_id, script_update_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scripts/{scriptID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Script', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_scripts_id_async(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a script. - - Updates an invokable script. Use this endpoint to modify values for script properties (`description` and `script`). To update a script, pass an object that contains the updated key-value pairs. #### Limitations - If you send an empty request body, the script will neither update nor store an empty script, but InfluxDB will respond with an HTTP `200` status code. #### Related Guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str script_id: A script ID. Updates the specified script. (required) - :param ScriptUpdateRequest script_update_request: An object that contains the updated script properties to apply. (required) - :return: Script - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scripts_id_prepare(script_id, script_update_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scripts/{scriptID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Script', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_scripts_id_prepare(self, script_id, script_update_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['script_id', 'script_update_request'] # noqa: E501 - self._check_operation_params('patch_scripts_id', all_params, local_var_params) - # verify the required parameter 'script_id' is set - if ('script_id' not in local_var_params or - local_var_params['script_id'] is None): - raise ValueError("Missing the required parameter `script_id` when calling `patch_scripts_id`") # noqa: E501 - # verify the required parameter 'script_update_request' is set - if ('script_update_request' not in local_var_params or - local_var_params['script_update_request'] is None): - raise ValueError("Missing the required parameter `script_update_request` when calling `patch_scripts_id`") # noqa: E501 - - path_params = {} - if 'script_id' in local_var_params: - path_params['scriptID'] = local_var_params['script_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - if 'script_update_request' in local_var_params: - body_params = local_var_params['script_update_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_scripts(self, script_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a script. - - Creates an [invokable script](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) and returns the script. #### Related guides - [Invokable scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - [Creating custom InfluxDB endpoints](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scripts(script_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ScriptCreateRequest script_create_request: The script to create. (required) - :return: Script - 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_scripts_with_http_info(script_create_request, **kwargs) # noqa: E501 - else: - (data) = self.post_scripts_with_http_info(script_create_request, **kwargs) # noqa: E501 - return data - - def post_scripts_with_http_info(self, script_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a script. - - Creates an [invokable script](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) and returns the script. #### Related guides - [Invokable scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - [Creating custom InfluxDB endpoints](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scripts_with_http_info(script_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ScriptCreateRequest script_create_request: The script to create. (required) - :return: Script - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_prepare(script_create_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scripts', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Script', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_scripts_async(self, script_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a script. - - Creates an [invokable script](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) and returns the script. #### Related guides - [Invokable scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - [Creating custom InfluxDB endpoints](https://docs.influxdata.com/resources/videos/api-invokable-scripts/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param ScriptCreateRequest script_create_request: The script to create. (required) - :return: Script - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_prepare(script_create_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scripts', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Script', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_scripts_prepare(self, script_create_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['script_create_request'] # noqa: E501 - self._check_operation_params('post_scripts', all_params, local_var_params) - # verify the required parameter 'script_create_request' is set - if ('script_create_request' not in local_var_params or - local_var_params['script_create_request'] is None): - raise ValueError("Missing the required parameter `script_create_request` when calling `post_scripts`") # noqa: E501 - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'script_create_request' in local_var_params: - body_params = local_var_params['script_create_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_scripts_id_invoke(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Invoke a script. - - Runs a script and returns the result. When the script runs, InfluxDB replaces `params` keys referenced in the script with `params` key-values passed in the request body--for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` The following example `POST /api/v2/scripts/SCRIPT_ID/invoke` request body passes a value for the _`mybucket`_ parameter: ```json { "params": { "mybucket": "air_sensor" } } ``` #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scripts_id_invoke(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Runs the specified script. (required) - :param ScriptInvocationParams script_invocation_params: - :return: file - 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_scripts_id_invoke_with_http_info(script_id, **kwargs) # noqa: E501 - else: - (data) = self.post_scripts_id_invoke_with_http_info(script_id, **kwargs) # noqa: E501 - return data - - def post_scripts_id_invoke_with_http_info(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Invoke a script. - - Runs a script and returns the result. When the script runs, InfluxDB replaces `params` keys referenced in the script with `params` key-values passed in the request body--for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` The following example `POST /api/v2/scripts/SCRIPT_ID/invoke` request body passes a value for the _`mybucket`_ parameter: ```json { "params": { "mybucket": "air_sensor" } } ``` #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_scripts_id_invoke_with_http_info(script_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str script_id: A script ID. Runs the specified script. (required) - :param ScriptInvocationParams script_invocation_params: - :return: file - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not self._is_cloud_instance(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_id_invoke_prepare(script_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scripts/{scriptID}/invoke', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='file', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_scripts_id_invoke_async(self, script_id, **kwargs): # noqa: E501,D401,D403 - """Invoke a script. - - Runs a script and returns the result. When the script runs, InfluxDB replaces `params` keys referenced in the script with `params` key-values passed in the request body--for example: The following sample script contains a _`mybucket`_ parameter : ```json "script": "from(bucket: params.mybucket) |> range(start: -7d) |> limit(n:1)" ``` The following example `POST /api/v2/scripts/SCRIPT_ID/invoke` request body passes a value for the _`mybucket`_ parameter: ```json { "params": { "mybucket": "air_sensor" } } ``` #### Related guides - [Invoke custom scripts](https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str script_id: A script ID. Runs the specified script. (required) - :param ScriptInvocationParams script_invocation_params: - :return: file - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - if not await self._is_cloud_instance_async(): - from influxdb_client.client.warnings import CloudOnlyWarning - CloudOnlyWarning.print_warning('InvokableScriptsService', - 'https://docs.influxdata.com/influxdb/cloud/api-guide/api-invokable-scripts/') # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scripts_id_invoke_prepare(script_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scripts/{scriptID}/invoke', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='file', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_scripts_id_invoke_prepare(self, script_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['script_id', 'script_invocation_params'] # noqa: E501 - self._check_operation_params('post_scripts_id_invoke', all_params, local_var_params) - # verify the required parameter 'script_id' is set - if ('script_id' not in local_var_params or - local_var_params['script_id'] is None): - raise ValueError("Missing the required parameter `script_id` when calling `post_scripts_id_invoke`") # noqa: E501 - - path_params = {} - if 'script_id' in local_var_params: - path_params['scriptID'] = local_var_params['script_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - if 'script_invocation_params' in local_var_params: - body_params = local_var_params['script_invocation_params'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/csv', '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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/labels_service.py b/frogpilot/third_party/influxdb_client/service/labels_service.py deleted file mode 100644 index aa88f41d3..000000000 --- a/frogpilot/third_party/influxdb_client/service/labels_service.py +++ /dev/null @@ -1,618 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class LabelsService(_BaseService): - """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 - """LabelsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_labels_id(self, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_labels_id(label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str label_id: The ID of the label 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_labels_id_with_http_info(label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_labels_id_with_http_info(label_id, **kwargs) # noqa: E501 - return data - - def delete_labels_id_with_http_info(self, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_labels_id_with_http_info(label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_labels_id_prepare(label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_labels_id_async(self, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_labels_id_prepare(label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_labels_id_prepare(self, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_labels_id', all_params, local_var_params) - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_labels_id`") # noqa: E501 - - path_params = {} - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_labels(self, **kwargs): # noqa: E501,D401,D403 - """List all labels. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_labels(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: The organization ID. - :return: LabelsResponse - 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_labels_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_labels_with_http_info(**kwargs) # noqa: E501 - return data - - def get_labels_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all labels. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_labels_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: The organization ID. - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_labels_async(self, **kwargs): # noqa: E501,D401,D403 - """List all labels. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: The organization ID. - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_labels_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'org_id'] # noqa: E501 - self._check_operation_params('get_labels', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_labels_id(self, label_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_labels_id(label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str label_id: The ID of the label to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_labels_id_with_http_info(label_id, **kwargs) # noqa: E501 - else: - (data) = self.get_labels_id_with_http_info(label_id, **kwargs) # noqa: E501 - return data - - def get_labels_id_with_http_info(self, label_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_labels_id_with_http_info(label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str label_id: The ID of the label to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_id_prepare(label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/labels/{labelID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_labels_id_async(self, label_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a label. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str label_id: The ID of the label to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_labels_id_prepare(label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/labels/{labelID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_labels_id_prepare(self, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_labels_id', all_params, local_var_params) - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `get_labels_id`") # noqa: E501 - - path_params = {} - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_labels_id(self, label_id, label_update, **kwargs): # noqa: E501,D401,D403 - """Update a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_labels_id(label_id, label_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str label_id: The ID of the label to update. (required) - :param LabelUpdate label_update: A label update. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_labels_id_with_http_info(label_id, label_update, **kwargs) # noqa: E501 - else: - (data) = self.patch_labels_id_with_http_info(label_id, label_update, **kwargs) # noqa: E501 - return data - - def patch_labels_id_with_http_info(self, label_id, label_update, **kwargs): # noqa: E501,D401,D403 - """Update a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_labels_id_with_http_info(label_id, label_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str label_id: The ID of the label to update. (required) - :param LabelUpdate label_update: A label update. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_labels_id_prepare(label_id, label_update, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/labels/{labelID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_labels_id_async(self, label_id, label_update, **kwargs): # noqa: E501,D401,D403 - """Update a label. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str label_id: The ID of the label to update. (required) - :param LabelUpdate label_update: A label update. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_labels_id_prepare(label_id, label_update, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/labels/{labelID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_labels_id_prepare(self, label_id, label_update, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['label_id', 'label_update', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_labels_id', all_params, local_var_params) - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `patch_labels_id`") # noqa: E501 - # verify the required parameter 'label_update' is set - if ('label_update' not in local_var_params or - local_var_params['label_update'] is None): - raise ValueError("Missing the required parameter `label_update` when calling `patch_labels_id`") # noqa: E501 - - path_params = {} - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - if 'label_update' in local_var_params: - body_params = local_var_params['label_update'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_labels(self, label_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_labels(label_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LabelCreateRequest label_create_request: The label to create. (required) - :return: LabelResponse - 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_labels_with_http_info(label_create_request, **kwargs) # noqa: E501 - else: - (data) = self.post_labels_with_http_info(label_create_request, **kwargs) # noqa: E501 - return data - - def post_labels_with_http_info(self, label_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a label. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_labels_with_http_info(label_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LabelCreateRequest label_create_request: The label to create. (required) - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_labels_prepare(label_create_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_labels_async(self, label_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a label. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param LabelCreateRequest label_create_request: The label to create. (required) - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_labels_prepare(label_create_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_labels_prepare(self, label_create_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['label_create_request'] # noqa: E501 - self._check_operation_params('post_labels', all_params, local_var_params) - # verify the required parameter 'label_create_request' is set - if ('label_create_request' not in local_var_params or - local_var_params['label_create_request'] is None): - raise ValueError("Missing the required parameter `label_create_request` when calling `post_labels`") # noqa: E501 - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'label_create_request' in local_var_params: - body_params = local_var_params['label_create_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/legacy_authorizations_service.py b/frogpilot/third_party/influxdb_client/service/legacy_authorizations_service.py deleted file mode 100644 index 622ef49c6..000000000 --- a/frogpilot/third_party/influxdb_client/service/legacy_authorizations_service.py +++ /dev/null @@ -1,777 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class LegacyAuthorizationsService(_BaseService): - """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 - """LegacyAuthorizationsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_legacy_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete a legacy authorization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_legacy_authorizations_id(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization 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_legacy_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_legacy_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - return data - - def delete_legacy_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete a legacy authorization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_legacy_authorizations_id_with_http_info(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization 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, path_params, query_params, header_params, body_params = \ - self._delete_legacy_authorizations_id_prepare(auth_id, **kwargs) - - return self.api_client.call_api( - '/private/legacy/authorizations/{authID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_legacy_authorizations_id_async(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Delete a legacy authorization. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str auth_id: The ID of the legacy authorization 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, path_params, query_params, header_params, body_params = \ - self._delete_legacy_authorizations_id_prepare(auth_id, **kwargs) - - return await self.api_client.call_api( - '/private/legacy/authorizations/{authID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_legacy_authorizations_id_prepare(self, auth_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['auth_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_legacy_authorizations_id', all_params, local_var_params) - # verify the required parameter 'auth_id' is set - if ('auth_id' not in local_var_params or - local_var_params['auth_id'] is None): - raise ValueError("Missing the required parameter `auth_id` when calling `delete_legacy_authorizations_id`") # noqa: E501 - - path_params = {} - if 'auth_id' in local_var_params: - path_params['authID'] = local_var_params['auth_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_legacy_authorizations(self, **kwargs): # noqa: E501,D401,D403 - """List all legacy authorizations. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_legacy_authorizations(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str user_id: Only show legacy authorizations that belong to a user ID. - :param str user: Only show legacy authorizations that belong to a user name. - :param str org_id: Only show legacy authorizations that belong to an organization ID. - :param str org: Only show legacy authorizations that belong to a organization name. - :param str token: Only show legacy authorizations with a specified token (auth name). - :param str auth_id: Only show legacy authorizations with a specified auth ID. - :return: Authorizations - 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_legacy_authorizations_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_legacy_authorizations_with_http_info(**kwargs) # noqa: E501 - return data - - def get_legacy_authorizations_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all legacy authorizations. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_legacy_authorizations_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str user_id: Only show legacy authorizations that belong to a user ID. - :param str user: Only show legacy authorizations that belong to a user name. - :param str org_id: Only show legacy authorizations that belong to an organization ID. - :param str org: Only show legacy authorizations that belong to a organization name. - :param str token: Only show legacy authorizations with a specified token (auth name). - :param str auth_id: Only show legacy authorizations with a specified auth ID. - :return: Authorizations - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_legacy_authorizations_prepare(**kwargs) - - return self.api_client.call_api( - '/private/legacy/authorizations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorizations', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_legacy_authorizations_async(self, **kwargs): # noqa: E501,D401,D403 - """List all legacy authorizations. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str user_id: Only show legacy authorizations that belong to a user ID. - :param str user: Only show legacy authorizations that belong to a user name. - :param str org_id: Only show legacy authorizations that belong to an organization ID. - :param str org: Only show legacy authorizations that belong to a organization name. - :param str token: Only show legacy authorizations with a specified token (auth name). - :param str auth_id: Only show legacy authorizations with a specified auth ID. - :return: Authorizations - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_legacy_authorizations_prepare(**kwargs) - - return await self.api_client.call_api( - '/private/legacy/authorizations', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorizations', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_legacy_authorizations_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'user_id', 'user', 'org_id', 'org', 'token', 'auth_id'] # noqa: E501 - self._check_operation_params('get_legacy_authorizations', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'user_id' in local_var_params: - query_params.append(('userID', local_var_params['user_id'])) # noqa: E501 - if 'user' in local_var_params: - query_params.append(('user', local_var_params['user'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'token' in local_var_params: - query_params.append(('token', local_var_params['token'])) # noqa: E501 - if 'auth_id' in local_var_params: - query_params.append(('authID', local_var_params['auth_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_legacy_authorizations_id(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a legacy authorization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_legacy_authorizations_id(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to get. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - 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_legacy_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - else: - (data) = self.get_legacy_authorizations_id_with_http_info(auth_id, **kwargs) # noqa: E501 - return data - - def get_legacy_authorizations_id_with_http_info(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a legacy authorization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_legacy_authorizations_id_with_http_info(auth_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to get. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_legacy_authorizations_id_prepare(auth_id, **kwargs) - - return self.api_client.call_api( - '/private/legacy/authorizations/{authID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_legacy_authorizations_id_async(self, auth_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a legacy authorization. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to get. (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_legacy_authorizations_id_prepare(auth_id, **kwargs) - - return await self.api_client.call_api( - '/private/legacy/authorizations/{authID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_legacy_authorizations_id_prepare(self, auth_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['auth_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_legacy_authorizations_id', all_params, local_var_params) - # verify the required parameter 'auth_id' is set - if ('auth_id' not in local_var_params or - local_var_params['auth_id'] is None): - raise ValueError("Missing the required parameter `auth_id` when calling `get_legacy_authorizations_id`") # noqa: E501 - - path_params = {} - if 'auth_id' in local_var_params: - path_params['authID'] = local_var_params['auth_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_legacy_authorizations_id(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a legacy authorization to be active or inactive. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_legacy_authorizations_id(auth_id, authorization_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: Legacy authorization to update (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - 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_legacy_authorizations_id_with_http_info(auth_id, authorization_update_request, **kwargs) # noqa: E501 - else: - (data) = self.patch_legacy_authorizations_id_with_http_info(auth_id, authorization_update_request, **kwargs) # noqa: E501 - return data - - def patch_legacy_authorizations_id_with_http_info(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a legacy authorization to be active or inactive. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_legacy_authorizations_id_with_http_info(auth_id, authorization_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: Legacy authorization to update (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_legacy_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) - - return self.api_client.call_api( - '/private/legacy/authorizations/{authID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_legacy_authorizations_id_async(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a legacy authorization to be active or inactive. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to update. (required) - :param AuthorizationUpdateRequest authorization_update_request: Legacy authorization to update (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_legacy_authorizations_id_prepare(auth_id, authorization_update_request, **kwargs) - - return await self.api_client.call_api( - '/private/legacy/authorizations/{authID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_legacy_authorizations_id_prepare(self, auth_id, authorization_update_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['auth_id', 'authorization_update_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_legacy_authorizations_id', all_params, local_var_params) - # verify the required parameter 'auth_id' is set - if ('auth_id' not in local_var_params or - local_var_params['auth_id'] is None): - raise ValueError("Missing the required parameter `auth_id` when calling `patch_legacy_authorizations_id`") # noqa: E501 - # verify the required parameter 'authorization_update_request' is set - if ('authorization_update_request' not in local_var_params or - local_var_params['authorization_update_request'] is None): - raise ValueError("Missing the required parameter `authorization_update_request` when calling `patch_legacy_authorizations_id`") # noqa: E501 - - path_params = {} - if 'auth_id' in local_var_params: - path_params['authID'] = local_var_params['auth_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 - - body_params = None - if 'authorization_update_request' in local_var_params: - body_params = local_var_params['authorization_update_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_legacy_authorizations(self, legacy_authorization_post_request, **kwargs): # noqa: E501,D401,D403 - """Create a legacy authorization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_legacy_authorizations(legacy_authorization_post_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LegacyAuthorizationPostRequest legacy_authorization_post_request: Legacy authorization to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - 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_legacy_authorizations_with_http_info(legacy_authorization_post_request, **kwargs) # noqa: E501 - else: - (data) = self.post_legacy_authorizations_with_http_info(legacy_authorization_post_request, **kwargs) # noqa: E501 - return data - - def post_legacy_authorizations_with_http_info(self, legacy_authorization_post_request, **kwargs): # noqa: E501,D401,D403 - """Create a legacy authorization. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_legacy_authorizations_with_http_info(legacy_authorization_post_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param LegacyAuthorizationPostRequest legacy_authorization_post_request: Legacy authorization to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_legacy_authorizations_prepare(legacy_authorization_post_request, **kwargs) - - return self.api_client.call_api( - '/private/legacy/authorizations', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_legacy_authorizations_async(self, legacy_authorization_post_request, **kwargs): # noqa: E501,D401,D403 - """Create a legacy authorization. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param LegacyAuthorizationPostRequest legacy_authorization_post_request: Legacy authorization to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Authorization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_legacy_authorizations_prepare(legacy_authorization_post_request, **kwargs) - - return await self.api_client.call_api( - '/private/legacy/authorizations', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Authorization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_legacy_authorizations_prepare(self, legacy_authorization_post_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['legacy_authorization_post_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_legacy_authorizations', all_params, local_var_params) - # verify the required parameter 'legacy_authorization_post_request' is set - if ('legacy_authorization_post_request' not in local_var_params or - local_var_params['legacy_authorization_post_request'] is None): - raise ValueError("Missing the required parameter `legacy_authorization_post_request` when calling `post_legacy_authorizations`") # noqa: E501 - - 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 - - body_params = None - if 'legacy_authorization_post_request' in local_var_params: - body_params = local_var_params['legacy_authorization_post_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_legacy_authorizations_id_password(self, auth_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Set a legacy authorization password. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_legacy_authorizations_id_password(auth_id, password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to update. (required) - :param PasswordResetBody password_reset_body: New password (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.post_legacy_authorizations_id_password_with_http_info(auth_id, password_reset_body, **kwargs) # noqa: E501 - else: - (data) = self.post_legacy_authorizations_id_password_with_http_info(auth_id, password_reset_body, **kwargs) # noqa: E501 - return data - - def post_legacy_authorizations_id_password_with_http_info(self, auth_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Set a legacy authorization password. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_legacy_authorizations_id_password_with_http_info(auth_id, password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to update. (required) - :param PasswordResetBody password_reset_body: New password (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, path_params, query_params, header_params, body_params = \ - self._post_legacy_authorizations_id_password_prepare(auth_id, password_reset_body, **kwargs) - - return self.api_client.call_api( - '/private/legacy/authorizations/{authID}/password', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_legacy_authorizations_id_password_async(self, auth_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Set a legacy authorization password. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str auth_id: The ID of the legacy authorization to update. (required) - :param PasswordResetBody password_reset_body: New password (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, path_params, query_params, header_params, body_params = \ - self._post_legacy_authorizations_id_password_prepare(auth_id, password_reset_body, **kwargs) - - return await self.api_client.call_api( - '/private/legacy/authorizations/{authID}/password', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_legacy_authorizations_id_password_prepare(self, auth_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['auth_id', 'password_reset_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_legacy_authorizations_id_password', all_params, local_var_params) - # verify the required parameter 'auth_id' is set - if ('auth_id' not in local_var_params or - local_var_params['auth_id'] is None): - raise ValueError("Missing the required parameter `auth_id` when calling `post_legacy_authorizations_id_password`") # noqa: E501 - # verify the required parameter 'password_reset_body' is set - if ('password_reset_body' not in local_var_params or - local_var_params['password_reset_body'] is None): - raise ValueError("Missing the required parameter `password_reset_body` when calling `post_legacy_authorizations_id_password`") # noqa: E501 - - path_params = {} - if 'auth_id' in local_var_params: - path_params['authID'] = local_var_params['auth_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 - - body_params = None - if 'password_reset_body' in local_var_params: - body_params = local_var_params['password_reset_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/metrics_service.py b/frogpilot/third_party/influxdb_client/service/metrics_service.py deleted file mode 100644 index 9e99de033..000000000 --- a/frogpilot/third_party/influxdb_client/service/metrics_service.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class MetricsService(_BaseService): - """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 - """MetricsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_metrics(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve workload performance metrics. - - Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/latest/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/latest/reference/prometheus-metrics/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_metrics(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: str - 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_metrics_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_metrics_with_http_info(**kwargs) # noqa: E501 - return data - - def get_metrics_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve workload performance metrics. - - Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/latest/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/latest/reference/prometheus-metrics/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_metrics_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_metrics_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/metrics', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_metrics_async(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve workload performance metrics. - - Returns metrics about the workload performance of an InfluxDB instance. Use this endpoint to get performance, resource, and usage metrics. #### Related guides - For the list of metrics categories, see [InfluxDB OSS metrics](https://docs.influxdata.com/influxdb/latest/reference/internals/metrics/). - Learn how to use InfluxDB to [scrape Prometheus metrics](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/scrape-prometheus-metrics/). - Learn how InfluxDB [parses the Prometheus exposition format](https://docs.influxdata.com/influxdb/latest/reference/prometheus-metrics/). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_metrics_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/metrics', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_metrics_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_metrics', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain', 'application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/notification_endpoints_service.py b/frogpilot/third_party/influxdb_client/service/notification_endpoints_service.py deleted file mode 100644 index 151b486a0..000000000 --- a/frogpilot/third_party/influxdb_client/service/notification_endpoints_service.py +++ /dev/null @@ -1,1137 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class NotificationEndpointsService(_BaseService): - """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 - """NotificationEndpointsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def create_notification_endpoint(self, post_notification_endpoint, **kwargs): # noqa: E501,D401,D403 - """Add a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_endpoint(post_notification_endpoint, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostNotificationEndpoint post_notification_endpoint: Notification endpoint to create (required) - :return: NotificationEndpoint - 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.create_notification_endpoint_with_http_info(post_notification_endpoint, **kwargs) # noqa: E501 - else: - (data) = self.create_notification_endpoint_with_http_info(post_notification_endpoint, **kwargs) # noqa: E501 - return data - - def create_notification_endpoint_with_http_info(self, post_notification_endpoint, **kwargs): # noqa: E501,D401,D403 - """Add a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_endpoint_with_http_info(post_notification_endpoint, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostNotificationEndpoint post_notification_endpoint: Notification endpoint to create (required) - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_endpoint_prepare(post_notification_endpoint, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def create_notification_endpoint_async(self, post_notification_endpoint, **kwargs): # noqa: E501,D401,D403 - """Add a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param PostNotificationEndpoint post_notification_endpoint: Notification endpoint to create (required) - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_endpoint_prepare(post_notification_endpoint, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _create_notification_endpoint_prepare(self, post_notification_endpoint, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['post_notification_endpoint'] # noqa: E501 - self._check_operation_params('create_notification_endpoint', all_params, local_var_params) - # verify the required parameter 'post_notification_endpoint' is set - if ('post_notification_endpoint' not in local_var_params or - local_var_params['post_notification_endpoint'] is None): - raise ValueError("Missing the required parameter `post_notification_endpoint` when calling `create_notification_endpoint`") # noqa: E501 - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'post_notification_endpoint' in local_var_params: - body_params = local_var_params['post_notification_endpoint'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_notification_endpoints_id(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """Delete a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_endpoints_id(endpoint_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint 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_notification_endpoints_id_with_http_info(endpoint_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_notification_endpoints_id_with_http_info(endpoint_id, **kwargs) # noqa: E501 - return data - - def delete_notification_endpoints_id_with_http_info(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """Delete a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_endpoints_id_with_http_info(endpoint_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_notification_endpoints_id_async(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """Delete a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str endpoint_id: The notification endpoint 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_notification_endpoints_id_prepare(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['endpoint_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_notification_endpoints_id', all_params, local_var_params) - # verify the required parameter 'endpoint_id' is set - if ('endpoint_id' not in local_var_params or - local_var_params['endpoint_id'] is None): - raise ValueError("Missing the required parameter `endpoint_id` when calling `delete_notification_endpoints_id`") # noqa: E501 - - path_params = {} - if 'endpoint_id' in local_var_params: - path_params['endpointID'] = local_var_params['endpoint_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_notification_endpoints_id_labels_id(self, endpoint_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_endpoints_id_labels_id(endpoint_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str label_id: The ID of the label 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_notification_endpoints_id_labels_id_with_http_info(endpoint_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_notification_endpoints_id_labels_id_with_http_info(endpoint_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_notification_endpoints_id_labels_id_with_http_info(self, endpoint_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_endpoints_id_labels_id_with_http_info(endpoint_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_labels_id_prepare(endpoint_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_notification_endpoints_id_labels_id_async(self, endpoint_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_endpoints_id_labels_id_prepare(endpoint_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_notification_endpoints_id_labels_id_prepare(self, endpoint_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['endpoint_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_notification_endpoints_id_labels_id', all_params, local_var_params) - # verify the required parameter 'endpoint_id' is set - if ('endpoint_id' not in local_var_params or - local_var_params['endpoint_id'] is None): - raise ValueError("Missing the required parameter `endpoint_id` when calling `delete_notification_endpoints_id_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_notification_endpoints_id_labels_id`") # noqa: E501 - - path_params = {} - if 'endpoint_id' in local_var_params: - path_params['endpointID'] = local_var_params['endpoint_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_notification_endpoints(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all notification endpoints. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_endpoints(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: Only show notification endpoints that belong to specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :return: NotificationEndpoints - 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_notification_endpoints_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_notification_endpoints_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_notification_endpoints_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all notification endpoints. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_endpoints_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: Only show notification endpoints that belong to specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :return: NotificationEndpoints - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoints', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_notification_endpoints_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all notification endpoints. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: Only show notification endpoints that belong to specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :return: NotificationEndpoints - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoints', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_notification_endpoints_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span', 'offset', 'limit'] # noqa: E501 - self._check_operation_params('get_notification_endpoints', all_params, local_var_params) - # 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_notification_endpoints`") # 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_notification_endpoints`, 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_notification_endpoints`, 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_notification_endpoints`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_notification_endpoints_id(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_endpoints_id(endpoint_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - 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_notification_endpoints_id_with_http_info(endpoint_id, **kwargs) # noqa: E501 - else: - (data) = self.get_notification_endpoints_id_with_http_info(endpoint_id, **kwargs) # noqa: E501 - return data - - def get_notification_endpoints_id_with_http_info(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_endpoints_id_with_http_info(endpoint_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_notification_endpoints_id_async(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_prepare(endpoint_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_notification_endpoints_id_prepare(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['endpoint_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_notification_endpoints_id', all_params, local_var_params) - # verify the required parameter 'endpoint_id' is set - if ('endpoint_id' not in local_var_params or - local_var_params['endpoint_id'] is None): - raise ValueError("Missing the required parameter `endpoint_id` when calling `get_notification_endpoints_id`") # noqa: E501 - - path_params = {} - if 'endpoint_id' in local_var_params: - path_params['endpointID'] = local_var_params['endpoint_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_notification_endpoints_id_labels(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_endpoints_id_labels(endpoint_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - 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_notification_endpoints_id_labels_with_http_info(endpoint_id, **kwargs) # noqa: E501 - else: - (data) = self.get_notification_endpoints_id_labels_with_http_info(endpoint_id, **kwargs) # noqa: E501 - return data - - def get_notification_endpoints_id_labels_with_http_info(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_endpoints_id_labels_with_http_info(endpoint_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_labels_prepare(endpoint_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_notification_endpoints_id_labels_async(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_endpoints_id_labels_prepare(endpoint_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_notification_endpoints_id_labels_prepare(self, endpoint_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['endpoint_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_notification_endpoints_id_labels', all_params, local_var_params) - # verify the required parameter 'endpoint_id' is set - if ('endpoint_id' not in local_var_params or - local_var_params['endpoint_id'] is None): - raise ValueError("Missing the required parameter `endpoint_id` when calling `get_notification_endpoints_id_labels`") # noqa: E501 - - path_params = {} - if 'endpoint_id' in local_var_params: - path_params['endpointID'] = local_var_params['endpoint_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_notification_endpoints_id(self, endpoint_id, notification_endpoint_update, **kwargs): # noqa: E501,D401,D403 - """Update a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_notification_endpoints_id(endpoint_id, notification_endpoint_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param NotificationEndpointUpdate notification_endpoint_update: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - 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_notification_endpoints_id_with_http_info(endpoint_id, notification_endpoint_update, **kwargs) # noqa: E501 - else: - (data) = self.patch_notification_endpoints_id_with_http_info(endpoint_id, notification_endpoint_update, **kwargs) # noqa: E501 - return data - - def patch_notification_endpoints_id_with_http_info(self, endpoint_id, notification_endpoint_update, **kwargs): # noqa: E501,D401,D403 - """Update a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_notification_endpoints_id_with_http_info(endpoint_id, notification_endpoint_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param NotificationEndpointUpdate notification_endpoint_update: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_endpoints_id_prepare(endpoint_id, notification_endpoint_update, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_notification_endpoints_id_async(self, endpoint_id, notification_endpoint_update, **kwargs): # noqa: E501,D401,D403 - """Update a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param NotificationEndpointUpdate notification_endpoint_update: Check update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_endpoints_id_prepare(endpoint_id, notification_endpoint_update, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_notification_endpoints_id_prepare(self, endpoint_id, notification_endpoint_update, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['endpoint_id', 'notification_endpoint_update', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_notification_endpoints_id', all_params, local_var_params) - # verify the required parameter 'endpoint_id' is set - if ('endpoint_id' not in local_var_params or - local_var_params['endpoint_id'] is None): - raise ValueError("Missing the required parameter `endpoint_id` when calling `patch_notification_endpoints_id`") # noqa: E501 - # verify the required parameter 'notification_endpoint_update' is set - if ('notification_endpoint_update' not in local_var_params or - local_var_params['notification_endpoint_update'] is None): - raise ValueError("Missing the required parameter `notification_endpoint_update` when calling `patch_notification_endpoints_id`") # noqa: E501 - - path_params = {} - if 'endpoint_id' in local_var_params: - path_params['endpointID'] = local_var_params['endpoint_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 - - body_params = None - if 'notification_endpoint_update' in local_var_params: - body_params = local_var_params['notification_endpoint_update'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_notification_endpoint_id_labels(self, endpoint_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_notification_endpoint_id_labels(endpoint_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_notification_endpoint_id_labels_with_http_info(endpoint_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_notification_endpoint_id_labels_with_http_info(endpoint_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_notification_endpoint_id_labels_with_http_info(self, endpoint_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_notification_endpoint_id_labels_with_http_info(endpoint_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_endpoint_id_labels_prepare(endpoint_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_notification_endpoint_id_labels_async(self, endpoint_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_endpoint_id_labels_prepare(endpoint_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_notification_endpoint_id_labels_prepare(self, endpoint_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['endpoint_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_notification_endpoint_id_labels', all_params, local_var_params) - # verify the required parameter 'endpoint_id' is set - if ('endpoint_id' not in local_var_params or - local_var_params['endpoint_id'] is None): - raise ValueError("Missing the required parameter `endpoint_id` when calling `post_notification_endpoint_id_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_notification_endpoint_id_labels`") # noqa: E501 - - path_params = {} - if 'endpoint_id' in local_var_params: - path_params['endpointID'] = local_var_params['endpoint_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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_notification_endpoints_id(self, endpoint_id, notification_endpoint, **kwargs): # noqa: E501,D401,D403 - """Update a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_notification_endpoints_id(endpoint_id, notification_endpoint, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param NotificationEndpoint notification_endpoint: A new notification endpoint to replace the existing endpoint with (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - 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.put_notification_endpoints_id_with_http_info(endpoint_id, notification_endpoint, **kwargs) # noqa: E501 - else: - (data) = self.put_notification_endpoints_id_with_http_info(endpoint_id, notification_endpoint, **kwargs) # noqa: E501 - return data - - def put_notification_endpoints_id_with_http_info(self, endpoint_id, notification_endpoint, **kwargs): # noqa: E501,D401,D403 - """Update a notification endpoint. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_notification_endpoints_id_with_http_info(endpoint_id, notification_endpoint, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param NotificationEndpoint notification_endpoint: A new notification endpoint to replace the existing endpoint with (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_endpoints_id_prepare(endpoint_id, notification_endpoint, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_notification_endpoints_id_async(self, endpoint_id, notification_endpoint, **kwargs): # noqa: E501,D401,D403 - """Update a notification endpoint. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str endpoint_id: The notification endpoint ID. (required) - :param NotificationEndpoint notification_endpoint: A new notification endpoint to replace the existing endpoint with (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationEndpoint - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_endpoints_id_prepare(endpoint_id, notification_endpoint, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationEndpoints/{endpointID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationEndpoint', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_notification_endpoints_id_prepare(self, endpoint_id, notification_endpoint, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['endpoint_id', 'notification_endpoint', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('put_notification_endpoints_id', all_params, local_var_params) - # verify the required parameter 'endpoint_id' is set - if ('endpoint_id' not in local_var_params or - local_var_params['endpoint_id'] is None): - raise ValueError("Missing the required parameter `endpoint_id` when calling `put_notification_endpoints_id`") # noqa: E501 - # verify the required parameter 'notification_endpoint' is set - if ('notification_endpoint' not in local_var_params or - local_var_params['notification_endpoint'] is None): - raise ValueError("Missing the required parameter `notification_endpoint` when calling `put_notification_endpoints_id`") # noqa: E501 - - path_params = {} - if 'endpoint_id' in local_var_params: - path_params['endpointID'] = local_var_params['endpoint_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 - - body_params = None - if 'notification_endpoint' in local_var_params: - body_params = local_var_params['notification_endpoint'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/notification_rules_service.py b/frogpilot/third_party/influxdb_client/service/notification_rules_service.py deleted file mode 100644 index 208feebbc..000000000 --- a/frogpilot/third_party/influxdb_client/service/notification_rules_service.py +++ /dev/null @@ -1,1149 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class NotificationRulesService(_BaseService): - """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 - """NotificationRulesService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def create_notification_rule(self, post_notification_rule, **kwargs): # noqa: E501,D401,D403 - """Add a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_rule(post_notification_rule, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostNotificationRule post_notification_rule: Notification rule to create (required) - :return: NotificationRule - 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.create_notification_rule_with_http_info(post_notification_rule, **kwargs) # noqa: E501 - else: - (data) = self.create_notification_rule_with_http_info(post_notification_rule, **kwargs) # noqa: E501 - return data - - def create_notification_rule_with_http_info(self, post_notification_rule, **kwargs): # noqa: E501,D401,D403 - """Add a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_notification_rule_with_http_info(post_notification_rule, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostNotificationRule post_notification_rule: Notification rule to create (required) - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_rule_prepare(post_notification_rule, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def create_notification_rule_async(self, post_notification_rule, **kwargs): # noqa: E501,D401,D403 - """Add a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param PostNotificationRule post_notification_rule: Notification rule to create (required) - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_notification_rule_prepare(post_notification_rule, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _create_notification_rule_prepare(self, post_notification_rule, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['post_notification_rule'] # noqa: E501 - self._check_operation_params('create_notification_rule', all_params, local_var_params) - # verify the required parameter 'post_notification_rule' is set - if ('post_notification_rule' not in local_var_params or - local_var_params['post_notification_rule'] is None): - raise ValueError("Missing the required parameter `post_notification_rule` when calling `create_notification_rule`") # noqa: E501 - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'post_notification_rule' in local_var_params: - body_params = local_var_params['post_notification_rule'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_notification_rules_id(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Delete a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_rules_id(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule 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_notification_rules_id_with_http_info(rule_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_notification_rules_id_with_http_info(rule_id, **kwargs) # noqa: E501 - return data - - def delete_notification_rules_id_with_http_info(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Delete a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_rules_id_with_http_info(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_notification_rules_id_async(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Delete a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_notification_rules_id_prepare(self, rule_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_notification_rules_id', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `delete_notification_rules_id`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_notification_rules_id_labels_id(self, rule_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete label from a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_rules_id_labels_id(rule_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str label_id: The ID of the label 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_notification_rules_id_labels_id_with_http_info(rule_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_notification_rules_id_labels_id_with_http_info(rule_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_notification_rules_id_labels_id_with_http_info(self, rule_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete label from a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_notification_rules_id_labels_id_with_http_info(rule_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_labels_id_prepare(rule_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_notification_rules_id_labels_id_async(self, rule_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete label from a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_notification_rules_id_labels_id_prepare(rule_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_notification_rules_id_labels_id_prepare(self, rule_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_notification_rules_id_labels_id', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `delete_notification_rules_id_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_notification_rules_id_labels_id`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_notification_rules(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all notification rules. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: Only show notification rules that belong to a specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str check_id: Only show notifications that belong to the specific check ID. - :param str tag: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. - :return: NotificationRules - 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_notification_rules_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_notification_rules_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_notification_rules_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all notification rules. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: Only show notification rules that belong to a specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str check_id: Only show notifications that belong to the specific check ID. - :param str tag: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. - :return: NotificationRules - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRules', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_notification_rules_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all notification rules. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: Only show notification rules that belong to a specific organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str check_id: Only show notifications that belong to the specific check ID. - :param str tag: Only return notification rules that "would match" statuses which contain the tag key value pairs provided. - :return: NotificationRules - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRules', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_notification_rules_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span', 'offset', 'limit', 'check_id', 'tag'] # noqa: E501 - self._check_operation_params('get_notification_rules', all_params, local_var_params) - # 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_notification_rules`") # 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_notification_rules`, 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_notification_rules`, 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_notification_rules`, must be a value greater than or equal to `1`") # noqa: E501 - if 'tag' in local_var_params and not re.search(r'^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$', local_var_params['tag']): # noqa: E501 - raise ValueError("Invalid value for parameter `tag` when calling `get_notification_rules`, must conform to the pattern `/^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$/`") # noqa: E501 - 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 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'check_id' in local_var_params: - query_params.append(('checkID', local_var_params['check_id'])) # noqa: E501 - if 'tag' in local_var_params: - query_params.append(('tag', local_var_params['tag'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_notification_rules_id(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules_id(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - 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_notification_rules_id_with_http_info(rule_id, **kwargs) # noqa: E501 - else: - (data) = self.get_notification_rules_id_with_http_info(rule_id, **kwargs) # noqa: E501 - return data - - def get_notification_rules_id_with_http_info(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules_id_with_http_info(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_notification_rules_id_async(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_prepare(rule_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_notification_rules_id_prepare(self, rule_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_notification_rules_id', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `get_notification_rules_id`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_notification_rules_id_labels(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules_id_labels(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - 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_notification_rules_id_labels_with_http_info(rule_id, **kwargs) # noqa: E501 - else: - (data) = self.get_notification_rules_id_labels_with_http_info(rule_id, **kwargs) # noqa: E501 - return data - - def get_notification_rules_id_labels_with_http_info(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules_id_labels_with_http_info(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_labels_prepare(rule_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_notification_rules_id_labels_async(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_labels_prepare(rule_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_notification_rules_id_labels_prepare(self, rule_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_notification_rules_id_labels', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `get_notification_rules_id_labels`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_notification_rules_id(self, rule_id, notification_rule_update, **kwargs): # noqa: E501,D401,D403 - """Update a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_notification_rules_id(rule_id, notification_rule_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param NotificationRuleUpdate notification_rule_update: Notification rule update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - 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_notification_rules_id_with_http_info(rule_id, notification_rule_update, **kwargs) # noqa: E501 - else: - (data) = self.patch_notification_rules_id_with_http_info(rule_id, notification_rule_update, **kwargs) # noqa: E501 - return data - - def patch_notification_rules_id_with_http_info(self, rule_id, notification_rule_update, **kwargs): # noqa: E501,D401,D403 - """Update a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_notification_rules_id_with_http_info(rule_id, notification_rule_update, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param NotificationRuleUpdate notification_rule_update: Notification rule update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_rules_id_prepare(rule_id, notification_rule_update, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_notification_rules_id_async(self, rule_id, notification_rule_update, **kwargs): # noqa: E501,D401,D403 - """Update a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param NotificationRuleUpdate notification_rule_update: Notification rule update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_notification_rules_id_prepare(rule_id, notification_rule_update, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_notification_rules_id_prepare(self, rule_id, notification_rule_update, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'notification_rule_update', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_notification_rules_id', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `patch_notification_rules_id`") # noqa: E501 - # verify the required parameter 'notification_rule_update' is set - if ('notification_rule_update' not in local_var_params or - local_var_params['notification_rule_update'] is None): - raise ValueError("Missing the required parameter `notification_rule_update` when calling `patch_notification_rules_id`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_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 - - body_params = None - if 'notification_rule_update' in local_var_params: - body_params = local_var_params['notification_rule_update'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_notification_rule_id_labels(self, rule_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_notification_rule_id_labels(rule_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_notification_rule_id_labels_with_http_info(rule_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_notification_rule_id_labels_with_http_info(rule_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_notification_rule_id_labels_with_http_info(self, rule_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_notification_rule_id_labels_with_http_info(rule_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_rule_id_labels_prepare(rule_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_notification_rule_id_labels_async(self, rule_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_notification_rule_id_labels_prepare(rule_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_notification_rule_id_labels_prepare(self, rule_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_notification_rule_id_labels', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `post_notification_rule_id_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_notification_rule_id_labels`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_notification_rules_id(self, rule_id, notification_rule, **kwargs): # noqa: E501,D401,D403 - """Update a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_notification_rules_id(rule_id, notification_rule, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param NotificationRule notification_rule: Notification rule update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - 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.put_notification_rules_id_with_http_info(rule_id, notification_rule, **kwargs) # noqa: E501 - else: - (data) = self.put_notification_rules_id_with_http_info(rule_id, notification_rule, **kwargs) # noqa: E501 - return data - - def put_notification_rules_id_with_http_info(self, rule_id, notification_rule, **kwargs): # noqa: E501,D401,D403 - """Update a notification rule. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_notification_rules_id_with_http_info(rule_id, notification_rule, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param NotificationRule notification_rule: Notification rule update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_rules_id_prepare(rule_id, notification_rule, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_notification_rules_id_async(self, rule_id, notification_rule, **kwargs): # noqa: E501,D401,D403 - """Update a notification rule. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param NotificationRule notification_rule: Notification rule update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: NotificationRule - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_notification_rules_id_prepare(rule_id, notification_rule, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='NotificationRule', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_notification_rules_id_prepare(self, rule_id, notification_rule, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'notification_rule', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('put_notification_rules_id', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `put_notification_rules_id`") # noqa: E501 - # verify the required parameter 'notification_rule' is set - if ('notification_rule' not in local_var_params or - local_var_params['notification_rule'] is None): - raise ValueError("Missing the required parameter `notification_rule` when calling `put_notification_rules_id`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_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 - - body_params = None - if 'notification_rule' in local_var_params: - body_params = local_var_params['notification_rule'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/organizations_service.py b/frogpilot/third_party/influxdb_client/service/organizations_service.py deleted file mode 100644 index 6d845a318..000000000 --- a/frogpilot/third_party/influxdb_client/service/organizations_service.py +++ /dev/null @@ -1,1427 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class OrganizationsService(_BaseService): - """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 - """OrganizationsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_orgs_id(self, org_id, **kwargs): # noqa: E501,D401,D403 - """Delete an organization. - - Deletes an organization. Deleting an organization from InfluxDB Cloud can't be undone. Once deleted, all data associated with the organization is removed. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one organization can be deleted per request. #### Related guides - [Delete organizations](https://docs.influxdata.com/influxdb/latest/organizations/delete-orgs/) - 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(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The ID of the organization 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_orgs_id_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_orgs_id_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def delete_orgs_id_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """Delete an organization. - - Deletes an organization. Deleting an organization from InfluxDB Cloud can't be undone. Once deleted, all data associated with the organization is removed. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one organization can be deleted per request. #### Related guides - [Delete organizations](https://docs.influxdata.com/influxdb/latest/organizations/delete-orgs/) - 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_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The ID of the organization 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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_orgs_id_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """Delete an organization. - - Deletes an organization. Deleting an organization from InfluxDB Cloud can't be undone. Once deleted, all data associated with the organization is removed. #### InfluxDB Cloud - Does the following when you send a delete request: 1. Validates the request and queues the delete. 2. Returns an HTTP `204` status code if queued; _error_ otherwise. 3. Handles the delete asynchronously. #### InfluxDB OSS - Validates the request, handles the delete synchronously, and then responds with success or failure. #### Limitations - Only one organization can be deleted per request. #### Related guides - [Delete organizations](https://docs.influxdata.com/influxdb/latest/organizations/delete-orgs/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The ID of the organization 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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_orgs_id_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_orgs_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_orgs_id_members_id(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from an organization. - - Removes a member from an organization. Use this endpoint to remove a user's member privileges for an organization. Removing member privileges removes the user's `read` and `write` permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related guides - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str org_id: The ID of the organization to remove a user from. (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_orgs_id_members_id_with_http_info(user_id, org_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_orgs_id_members_id_with_http_info(user_id, org_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. - - Removes a member from an organization. Use this endpoint to remove a user's member privileges for an organization. Removing member privileges removes the user's `read` and `write` permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related guides - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str org_id: The ID of the organization to remove a user from. (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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_members_id_prepare(user_id, org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_orgs_id_members_id_async(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from an organization. - - Removes a member from an organization. Use this endpoint to remove a user's member privileges for an organization. Removing member privileges removes the user's `read` and `write` permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related guides - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str org_id: The ID of the organization to remove a user from. (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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_members_id_prepare(user_id, org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_orgs_id_members_id_prepare(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'org_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_orgs_id_members_id', all_params, local_var_params) - # 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 - - 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 = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_orgs_id_owners_id(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from an organization. - - Removes an [owner](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) from the organization. Organization owners have permission to delete organizations and remove user and member permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str org_id: The ID of the organization to remove an owner from. (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_orgs_id_owners_id_with_http_info(user_id, org_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_orgs_id_owners_id_with_http_info(user_id, org_id, **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. - - Removes an [owner](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) from the organization. Organization owners have permission to delete organizations and remove user and member permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) - 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) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str org_id: The ID of the organization to remove an owner from. (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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_owners_id_prepare(user_id, org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_orgs_id_owners_id_async(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from an organization. - - Removes an [owner](https://docs.influxdata.com/influxdb/latest/reference/glossary/#owner) from the organization. Organization owners have permission to delete organizations and remove user and member permissions from the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Owner permissions are separate from API token permissions. - Owner permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to remove an owner from. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: The ID of the user to remove. (required) - :param str org_id: The ID of the organization to remove an owner from. (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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_owners_id_prepare(user_id, org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_orgs_id_owners_id_prepare(self, user_id, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'org_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_orgs_id_owners_id', all_params, local_var_params) - # 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 - - 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 = [] - - header_params = {} - if 'zap_trace_span' in local_var_params: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_orgs(self, **kwargs): # noqa: E501,D401,D403 - """List organizations. - - Lists [organizations](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization/). To limit which organizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`. #### InfluxDB Cloud - Only returns the organization that owns the token passed in the request. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param bool descending: - :param str org: An organization name. Only returns the specified organization. - :param str org_id: An organization ID. Only returns the specified organization. - :param str user_id: A user ID. Only returns organizations where the specified user is a member or owner. - :return: Organizations - 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_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_orgs_with_http_info(**kwargs) # noqa: E501 - return data - - def get_orgs_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List organizations. - - Lists [organizations](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization/). To limit which organizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`. #### InfluxDB Cloud - Only returns the organization that owns the token passed in the request. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_orgs_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param bool descending: - :param str org: An organization name. Only returns the specified organization. - :param str org_id: An organization ID. Only returns the specified organization. - :param str user_id: A user ID. Only returns organizations where the specified user is a member or owner. - :return: Organizations - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organizations', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_orgs_async(self, **kwargs): # noqa: E501,D401,D403 - """List organizations. - - Lists [organizations](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization/). To limit which organizations are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all organizations up to the default `limit`. #### InfluxDB Cloud - Only returns the organization that owns the token passed in the request. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param bool descending: - :param str org: An organization name. Only returns the specified organization. - :param str org_id: An organization ID. Only returns the specified organization. - :param str user_id: A user ID. Only returns organizations where the specified user is a member or owner. - :return: Organizations - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organizations', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_orgs_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'offset', 'limit', 'descending', 'org', 'org_id', 'user_id'] # noqa: E501 - self._check_operation_params('get_orgs', all_params, local_var_params) - - if 'offset' in local_var_params and local_var_params['offset'] < 0: # noqa: E501 - raise ValueError("Invalid value for parameter `offset` when calling `get_orgs`, 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_orgs`, 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_orgs`, must be a value greater than or equal to `1`") # noqa: E501 - 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 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'user_id' in local_var_params: - query_params.append(('userID', local_var_params['user_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_orgs_id(self, org_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve an organization. - - Retrieves an organization. Use this endpoint to retrieve information for a specific organization. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) - 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(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The ID of the organization to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - 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_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_orgs_id_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_orgs_id_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve an organization. - - Retrieves an organization. Use this endpoint to retrieve information for a specific organization. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) - 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_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The ID of the organization to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_orgs_id_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve an organization. - - Retrieves an organization. Use this endpoint to retrieve information for a specific organization. #### Related guides - [View organizations](https://docs.influxdata.com/influxdb/latest/organizations/view-orgs/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The ID of the organization to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_orgs_id_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_orgs_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_orgs_id_members(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all members of an organization. - - Lists all users that belong to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve members for. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the organization to retrieve users for. (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. - - Lists all users that belong to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve members for. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the organization to retrieve users for. (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, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_members_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_orgs_id_members_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all members of an organization. - - Lists all users that belong to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve members for. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The ID of the organization to retrieve users for. (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, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_members_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_orgs_id_members_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_orgs_id_members', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_orgs_id_owners(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of an organization. - - Lists all owners of an organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners from. - 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 ID of the organization to list owners for. (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. - - Lists all owners of an organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners from. - 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 ID of the organization to list owners for. (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, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_owners_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_orgs_id_owners_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of an organization. - - Lists all owners of an organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `read-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to retrieve a list of owners from. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The ID of the organization to list owners for. (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, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_owners_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_orgs_id_owners_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_orgs_id_owners', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_orgs_id(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 - """Update an organization. - - Updates an organization. Use this endpoint to update properties (`name`, `description`) of an organization. Updating an organization’s name affects all resources that reference the organization by name, including the following: - Queries - Dashboards - Tasks - Telegraf configurations - Templates If you change an organization name, be sure to update the organization name in these resources as well. #### Related Guides - [Update an organization](https://docs.influxdata.com/influxdb/latest/organizations/update-org/) - 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, patch_organization_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The ID of the organization to update. (required) - :param PatchOrganizationRequest patch_organization_request: The organization update to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - 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_orgs_id_with_http_info(org_id, patch_organization_request, **kwargs) # noqa: E501 - else: - (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, patch_organization_request, **kwargs): # noqa: E501,D401,D403 - """Update an organization. - - Updates an organization. Use this endpoint to update properties (`name`, `description`) of an organization. Updating an organization’s name affects all resources that reference the organization by name, including the following: - Queries - Dashboards - Tasks - Telegraf configurations - Templates If you change an organization name, be sure to update the organization name in these resources as well. #### Related Guides - [Update an organization](https://docs.influxdata.com/influxdb/latest/organizations/update-org/) - 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, patch_organization_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The ID of the organization to update. (required) - :param PatchOrganizationRequest patch_organization_request: The organization update to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_prepare(org_id, patch_organization_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_orgs_id_async(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 - """Update an organization. - - Updates an organization. Use this endpoint to update properties (`name`, `description`) of an organization. Updating an organization’s name affects all resources that reference the organization by name, including the following: - Queries - Dashboards - Tasks - Telegraf configurations - Templates If you change an organization name, be sure to update the organization name in these resources as well. #### Related Guides - [Update an organization](https://docs.influxdata.com/influxdb/latest/organizations/update-org/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The ID of the organization to update. (required) - :param PatchOrganizationRequest patch_organization_request: The organization update to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_prepare(org_id, patch_organization_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_orgs_id_prepare(self, org_id, patch_organization_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'patch_organization_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_orgs_id', all_params, local_var_params) - # 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 `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 - - 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 - - body_params = None - 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 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_orgs(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 - """Create an organization. - - Creates an [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) and returns the newly created organization. #### InfluxDB Cloud - Doesn't allow you to use this endpoint to create organizations. #### Related guides - [Manage organizations](https://docs.influxdata.com/influxdb/latest/organizations) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_orgs(post_organization_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostOrganizationRequest post_organization_request: The organization to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - 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_with_http_info(post_organization_request, **kwargs) # noqa: E501 - else: - (data) = self.post_orgs_with_http_info(post_organization_request, **kwargs) # noqa: E501 - return data - - def post_orgs_with_http_info(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 - """Create an organization. - - Creates an [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) and returns the newly created organization. #### InfluxDB Cloud - Doesn't allow you to use this endpoint to create organizations. #### Related guides - [Manage organizations](https://docs.influxdata.com/influxdb/latest/organizations) - 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(post_organization_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostOrganizationRequest post_organization_request: The organization to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_prepare(post_organization_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_orgs_async(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 - """Create an organization. - - Creates an [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) and returns the newly created organization. #### InfluxDB Cloud - Doesn't allow you to use this endpoint to create organizations. #### Related guides - [Manage organizations](https://docs.influxdata.com/influxdb/latest/organizations) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param PostOrganizationRequest post_organization_request: The organization to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Organization - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_orgs_prepare(post_organization_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Organization', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_orgs_prepare(self, post_organization_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['post_organization_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_orgs', all_params, local_var_params) - # 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 - - 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 - - body_params = None - 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 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_orgs_id_members(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to an organization. - - Add a user to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add a member to. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the organization. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add to the organization. (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. - - Add a user to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add a member to. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - 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 ID of the organization. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add to the organization. (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, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_members_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_orgs_id_members_async(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to an organization. - - Add a user to an organization. InfluxDB [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) have permission to access InfluxDB. [Members](https://docs.influxdata.com/influxdb/latest/reference/glossary/#member) are users within the organization. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Limitations - Member permissions are separate from API token permissions. - Member permissions are used in the context of the InfluxDB UI. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add a member to. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/users/) - [Manage members](https://docs.influxdata.com/influxdb/latest/organizations/members/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The ID of the organization. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add to the organization. (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, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_members_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_orgs_id_members_prepare(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_orgs_id_members', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_orgs_id_owners(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to an organization. - - Adds an owner to an organization. Use this endpoint to assign the organization `owner` role to a user. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) - 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 ID of the organization that you want to add an owner for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add as an owner of the organization. (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. - - Adds an owner to an organization. Use this endpoint to assign the organization `owner` role to a user. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) - 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 ID of the organization that you want to add an owner for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add as an owner of the organization. (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, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_owners_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_orgs_id_owners_async(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to an organization. - - Adds an owner to an organization. Use this endpoint to assign the organization `owner` role to a user. #### InfluxDB Cloud - Doesn't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. #### Required permissions - `write-orgs INFLUX_ORG_ID` *`INFLUX_ORG_ID`* is the ID of the organization that you want to add an owner for. #### Related endpoints - [Authorizations](#tag/Authorizations-(API-tokens)) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The ID of the organization that you want to add an owner for. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: The user to add as an owner of the organization. (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, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_owners_prepare(org_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_orgs_id_owners_prepare(self, org_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_orgs_id_owners', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/ping_service.py b/frogpilot/third_party/influxdb_client/service/ping_service.py deleted file mode 100644 index 2d89a745d..000000000 --- a/frogpilot/third_party/influxdb_client/service/ping_service.py +++ /dev/null @@ -1,232 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class PingService(_BaseService): - """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 - """PingService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_ping(self, **kwargs): # noqa: E501,D401,D403 - """Get the status of the instance. - - Retrieves the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_ping(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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.get_ping_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_ping_with_http_info(**kwargs) # noqa: E501 - return data - - def get_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Get the status of the instance. - - Retrieves the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_ping_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ping_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/ping', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_ping_async(self, **kwargs): # noqa: E501,D401,D403 - """Get the status of the instance. - - Retrieves the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ping_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/ping', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_ping_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = [] # noqa: E501 - self._check_operation_params('get_ping', all_params, local_var_params) - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - return local_var_params, path_params, query_params, header_params, body_params - - def head_ping(self, **kwargs): # noqa: E501,D401,D403 - """Get the status of the instance. - - Returns the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.head_ping(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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.head_ping_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.head_ping_with_http_info(**kwargs) # noqa: E501 - return data - - def head_ping_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Get the status of the instance. - - Returns the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.head_ping_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._head_ping_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/ping', 'HEAD', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def head_ping_async(self, **kwargs): # noqa: E501,D401,D403 - """Get the status of the instance. - - Returns the status and InfluxDB version of the instance. Use this endpoint to monitor uptime for the InfluxDB instance. The response returns a HTTP `204` status code to inform you the instance is available. #### InfluxDB Cloud - Isn't versioned and doesn't return `X-Influxdb-Version` in the headers. #### Related guides - [Influx ping](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/ping/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._head_ping_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/ping', 'HEAD', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _head_ping_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = [] # noqa: E501 - self._check_operation_params('head_ping', all_params, local_var_params) - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/query_service.py b/frogpilot/third_party/influxdb_client/service/query_service.py deleted file mode 100644 index 0be81222a..000000000 --- a/frogpilot/third_party/influxdb_client/service/query_service.py +++ /dev/null @@ -1,646 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class QueryService(_BaseService): - """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 - """QueryService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_query_suggestions(self, **kwargs): # noqa: E501,D401,D403 - """List Flux query suggestions. - - Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_query_suggestions(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: FluxSuggestions - 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_query_suggestions_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_query_suggestions_with_http_info(**kwargs) # noqa: E501 - return data - - def get_query_suggestions_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List Flux query suggestions. - - Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_query_suggestions_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: FluxSuggestions - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/query/suggestions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxSuggestions', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_query_suggestions_async(self, **kwargs): # noqa: E501,D401,D403 - """List Flux query suggestions. - - Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: FluxSuggestions - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/query/suggestions', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxSuggestions', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_query_suggestions_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_query_suggestions', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'text/html']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_query_suggestions_name(self, name, **kwargs): # noqa: E501,D401,D403 - """Retrieve a query suggestion for a branching suggestion. - - Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_query_suggestions_name(name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxSuggestion - 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_query_suggestions_name_with_http_info(name, **kwargs) # noqa: E501 - else: - (data) = self.get_query_suggestions_name_with_http_info(name, **kwargs) # noqa: E501 - return data - - def get_query_suggestions_name_with_http_info(self, name, **kwargs): # noqa: E501,D401,D403 - """Retrieve a query suggestion for a branching suggestion. - - Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_query_suggestions_name_with_http_info(name, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxSuggestion - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_name_prepare(name, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/query/suggestions/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxSuggestion', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_query_suggestions_name_async(self, name, **kwargs): # noqa: E501,D401,D403 - """Retrieve a query suggestion for a branching suggestion. - - Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxSuggestion - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_query_suggestions_name_prepare(name, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/query/suggestions/{name}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxSuggestion', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_query_suggestions_name_prepare(self, name, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['name', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_query_suggestions_name', all_params, local_var_params) - # verify the required parameter 'name' is set - if ('name' not in local_var_params or - local_var_params['name'] is None): - raise ValueError("Missing the required parameter `name` when calling `get_query_suggestions_name`") # noqa: E501 - - path_params = {} - if 'name' in local_var_params: - path_params['name'] = local_var_params['name'] # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_query(self, **kwargs): # noqa: E501,D401,D403 - """Query data. - - Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_query(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. - :param str content_type: - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. - :param Query query: Flux query or specification to execute - :return: str - 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_query_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.post_query_with_http_info(**kwargs) # noqa: E501 - return data - - def post_query_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Query data. - - Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_query_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. - :param str content_type: - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. - :param Query query: Flux query or specification to execute - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/query', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_query_async(self, **kwargs): # noqa: E501,D401,D403 - """Query data. - - Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. - :param str content_type: - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. - :param Query query: Flux query or specification to execute - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/query', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_query_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'accept_encoding', 'content_type', 'org', 'org_id', 'query'] # noqa: E501 - self._check_operation_params('post_query', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_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 - if 'accept_encoding' in local_var_params: - header_params['Accept-Encoding'] = local_var_params['accept_encoding'] # noqa: E501 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - - body_params = None - if 'query' in local_var_params: - body_params = local_var_params['query'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/csv', 'application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'application/vnd.flux']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_query_analyze(self, **kwargs): # noqa: E501,D401,D403 - r"""Analyze a Flux query. - - Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_query_analyze(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :param Query query: Flux query to analyze - :return: AnalyzeQueryResponse - 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_query_analyze_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.post_query_analyze_with_http_info(**kwargs) # noqa: E501 - return data - - def post_query_analyze_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - r"""Analyze a Flux query. - - Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_query_analyze_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :param Query query: Flux query to analyze - :return: AnalyzeQueryResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_analyze_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/query/analyze', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='AnalyzeQueryResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_query_analyze_async(self, **kwargs): # noqa: E501,D401,D403 - r"""Analyze a Flux query. - - Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :param Query query: Flux query to analyze - :return: AnalyzeQueryResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_analyze_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/query/analyze', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='AnalyzeQueryResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_query_analyze_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'content_type', 'query'] # noqa: E501 - self._check_operation_params('post_query_analyze', all_params, local_var_params) - - 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 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - - body_params = None - if 'query' in local_var_params: - body_params = local_var_params['query'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_query_ast(self, **kwargs): # noqa: E501,D401,D403 - r"""Generate a query Abstract Syntax Tree (AST). - - Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_query_ast(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :param LanguageRequest language_request: The Flux query to analyze. - :return: ASTResponse - 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_query_ast_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.post_query_ast_with_http_info(**kwargs) # noqa: E501 - return data - - def post_query_ast_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - r"""Generate a query Abstract Syntax Tree (AST). - - Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_query_ast_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :param LanguageRequest language_request: The Flux query to analyze. - :return: ASTResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_ast_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/query/ast', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ASTResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_query_ast_async(self, **kwargs): # noqa: E501,D401,D403 - r"""Generate a query Abstract Syntax Tree (AST). - - Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :param LanguageRequest language_request: The Flux query to analyze. - :return: ASTResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_query_ast_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/query/ast', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ASTResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_query_ast_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'content_type', 'language_request'] # noqa: E501 - self._check_operation_params('post_query_ast', all_params, local_var_params) - - 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 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - - body_params = None - if 'language_request' in local_var_params: - body_params = local_var_params['language_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/ready_service.py b/frogpilot/third_party/influxdb_client/service/ready_service.py deleted file mode 100644 index 407435ba7..000000000 --- a/frogpilot/third_party/influxdb_client/service/ready_service.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class ReadyService(_BaseService): - """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 - """ReadyService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_ready(self, **kwargs): # noqa: E501,D401,D403 - """Get the readiness of an instance at startup. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_ready(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Ready - 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_ready_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_ready_with_http_info(**kwargs) # noqa: E501 - return data - - def get_ready_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Get the readiness of an instance at startup. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_ready_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Ready - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ready_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/ready', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Ready', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_ready_async(self, **kwargs): # noqa: E501,D401,D403 - """Get the readiness of an instance at startup. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Ready - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_ready_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/ready', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Ready', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_ready_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_ready', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/remote_connections_service.py b/frogpilot/third_party/influxdb_client/service/remote_connections_service.py deleted file mode 100644 index 7c591078a..000000000 --- a/frogpilot/third_party/influxdb_client/service/remote_connections_service.py +++ /dev/null @@ -1,632 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class RemoteConnectionsService(_BaseService): - """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 - """RemoteConnectionsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_remote_connection_by_id(self, remote_id, **kwargs): # noqa: E501,D401,D403 - """Delete a remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_remote_connection_by_id(remote_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str remote_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_remote_connection_by_id_with_http_info(remote_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_remote_connection_by_id_with_http_info(remote_id, **kwargs) # noqa: E501 - return data - - def delete_remote_connection_by_id_with_http_info(self, remote_id, **kwargs): # noqa: E501,D401,D403 - """Delete a remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_remote_connection_by_id_with_http_info(remote_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str remote_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, path_params, query_params, header_params, body_params = \ - self._delete_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/remotes/{remoteID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_remote_connection_by_id_async(self, remote_id, **kwargs): # noqa: E501,D401,D403 - """Delete a remote connection. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str remote_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, path_params, query_params, header_params, body_params = \ - self._delete_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/remotes/{remoteID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_remote_connection_by_id_prepare(self, remote_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['remote_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_remote_connection_by_id', all_params, local_var_params) - # verify the required parameter 'remote_id' is set - if ('remote_id' not in local_var_params or - local_var_params['remote_id'] is None): - raise ValueError("Missing the required parameter `remote_id` when calling `delete_remote_connection_by_id`") # noqa: E501 - - path_params = {} - if 'remote_id' in local_var_params: - path_params['remoteID'] = local_var_params['remote_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_remote_connection_by_id(self, remote_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_connection_by_id(remote_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str remote_id: (required) - :param str zap_trace_span: OpenTracing span context - :return: RemoteConnection - 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_remote_connection_by_id_with_http_info(remote_id, **kwargs) # noqa: E501 - else: - (data) = self.get_remote_connection_by_id_with_http_info(remote_id, **kwargs) # noqa: E501 - return data - - def get_remote_connection_by_id_with_http_info(self, remote_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_connection_by_id_with_http_info(remote_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str remote_id: (required) - :param str zap_trace_span: OpenTracing span context - :return: RemoteConnection - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/remotes/{remoteID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnection', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_remote_connection_by_id_async(self, remote_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a remote connection. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str remote_id: (required) - :param str zap_trace_span: OpenTracing span context - :return: RemoteConnection - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connection_by_id_prepare(remote_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/remotes/{remoteID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnection', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_remote_connection_by_id_prepare(self, remote_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['remote_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_remote_connection_by_id', all_params, local_var_params) - # verify the required parameter 'remote_id' is set - if ('remote_id' not in local_var_params or - local_var_params['remote_id'] is None): - raise ValueError("Missing the required parameter `remote_id` when calling `get_remote_connection_by_id`") # noqa: E501 - - path_params = {} - if 'remote_id' in local_var_params: - path_params['remoteID'] = local_var_params['remote_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_remote_connections(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all remote connections. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_connections(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 - :param str name: - :param str remote_url: - :return: RemoteConnections - 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_remote_connections_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_remote_connections_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_remote_connections_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all remote connections. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_remote_connections_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 - :param str name: - :param str remote_url: - :return: RemoteConnections - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connections_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/remotes', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnections', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_remote_connections_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all remote connections. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str name: - :param str remote_url: - :return: RemoteConnections - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_remote_connections_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/remotes', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnections', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_remote_connections_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span', 'name', 'remote_url'] # noqa: E501 - self._check_operation_params('get_remote_connections', all_params, local_var_params) - # 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_remote_connections`") # noqa: E501 - - path_params = {} - - query_params = [] - if 'org_id' in local_var_params: - 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 'remote_url' in local_var_params: - query_params.append(('remoteURL', local_var_params['remote_url'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_remote_connection_by_id(self, remote_id, remote_connection_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_remote_connection_by_id(remote_id, remote_connection_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str remote_id: (required) - :param RemoteConnectionUpdateRequest remote_connection_update_request: (required) - :param str zap_trace_span: OpenTracing span context - :return: RemoteConnection - 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_remote_connection_by_id_with_http_info(remote_id, remote_connection_update_request, **kwargs) # noqa: E501 - else: - (data) = self.patch_remote_connection_by_id_with_http_info(remote_id, remote_connection_update_request, **kwargs) # noqa: E501 - return data - - def patch_remote_connection_by_id_with_http_info(self, remote_id, remote_connection_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_remote_connection_by_id_with_http_info(remote_id, remote_connection_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str remote_id: (required) - :param RemoteConnectionUpdateRequest remote_connection_update_request: (required) - :param str zap_trace_span: OpenTracing span context - :return: RemoteConnection - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_remote_connection_by_id_prepare(remote_id, remote_connection_update_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/remotes/{remoteID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnection', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_remote_connection_by_id_async(self, remote_id, remote_connection_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a remote connection. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str remote_id: (required) - :param RemoteConnectionUpdateRequest remote_connection_update_request: (required) - :param str zap_trace_span: OpenTracing span context - :return: RemoteConnection - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_remote_connection_by_id_prepare(remote_id, remote_connection_update_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/remotes/{remoteID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnection', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_remote_connection_by_id_prepare(self, remote_id, remote_connection_update_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['remote_id', 'remote_connection_update_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_remote_connection_by_id', all_params, local_var_params) - # verify the required parameter 'remote_id' is set - if ('remote_id' not in local_var_params or - local_var_params['remote_id'] is None): - raise ValueError("Missing the required parameter `remote_id` when calling `patch_remote_connection_by_id`") # noqa: E501 - # verify the required parameter 'remote_connection_update_request' is set - if ('remote_connection_update_request' not in local_var_params or - local_var_params['remote_connection_update_request'] is None): - raise ValueError("Missing the required parameter `remote_connection_update_request` when calling `patch_remote_connection_by_id`") # noqa: E501 - - path_params = {} - if 'remote_id' in local_var_params: - path_params['remoteID'] = local_var_params['remote_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 - - body_params = None - if 'remote_connection_update_request' in local_var_params: - body_params = local_var_params['remote_connection_update_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_remote_connection(self, remote_connection_creation_request, **kwargs): # noqa: E501,D401,D403 - """Register a new remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_remote_connection(remote_connection_creation_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RemoteConnectionCreationRequest remote_connection_creation_request: (required) - :return: RemoteConnection - 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_remote_connection_with_http_info(remote_connection_creation_request, **kwargs) # noqa: E501 - else: - (data) = self.post_remote_connection_with_http_info(remote_connection_creation_request, **kwargs) # noqa: E501 - return data - - def post_remote_connection_with_http_info(self, remote_connection_creation_request, **kwargs): # noqa: E501,D401,D403 - """Register a new remote connection. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_remote_connection_with_http_info(remote_connection_creation_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param RemoteConnectionCreationRequest remote_connection_creation_request: (required) - :return: RemoteConnection - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_remote_connection_prepare(remote_connection_creation_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/remotes', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnection', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_remote_connection_async(self, remote_connection_creation_request, **kwargs): # noqa: E501,D401,D403 - """Register a new remote connection. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param RemoteConnectionCreationRequest remote_connection_creation_request: (required) - :return: RemoteConnection - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_remote_connection_prepare(remote_connection_creation_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/remotes', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RemoteConnection', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_remote_connection_prepare(self, remote_connection_creation_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['remote_connection_creation_request'] # noqa: E501 - self._check_operation_params('post_remote_connection', all_params, local_var_params) - # verify the required parameter 'remote_connection_creation_request' is set - if ('remote_connection_creation_request' not in local_var_params or - local_var_params['remote_connection_creation_request'] is None): - raise ValueError("Missing the required parameter `remote_connection_creation_request` when calling `post_remote_connection`") # noqa: E501 - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'remote_connection_creation_request' in local_var_params: - body_params = local_var_params['remote_connection_creation_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/replications_service.py b/frogpilot/third_party/influxdb_client/service/replications_service.py deleted file mode 100644 index 2130490ab..000000000 --- a/frogpilot/third_party/influxdb_client/service/replications_service.py +++ /dev/null @@ -1,768 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class ReplicationsService(_BaseService): - """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 - """ReplicationsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_replication_by_id(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Delete a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_replication_by_id(replication_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_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_replication_by_id_with_http_info(replication_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_replication_by_id_with_http_info(replication_id, **kwargs) # noqa: E501 - return data - - def delete_replication_by_id_with_http_info(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Delete a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_replication_by_id_with_http_info(replication_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_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, path_params, query_params, header_params, body_params = \ - self._delete_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/replications/{replicationID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_replication_by_id_async(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Delete a replication. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str replication_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, path_params, query_params, header_params, body_params = \ - self._delete_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/replications/{replicationID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_replication_by_id_prepare(self, replication_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['replication_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_replication_by_id', all_params, local_var_params) - # verify the required parameter 'replication_id' is set - if ('replication_id' not in local_var_params or - local_var_params['replication_id'] is None): - raise ValueError("Missing the required parameter `replication_id` when calling `delete_replication_by_id`") # noqa: E501 - - path_params = {} - if 'replication_id' in local_var_params: - path_params['replicationID'] = local_var_params['replication_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_replication_by_id(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_replication_by_id(replication_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_id: (required) - :param str zap_trace_span: OpenTracing span context - :return: Replication - 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_replication_by_id_with_http_info(replication_id, **kwargs) # noqa: E501 - else: - (data) = self.get_replication_by_id_with_http_info(replication_id, **kwargs) # noqa: E501 - return data - - def get_replication_by_id_with_http_info(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_replication_by_id_with_http_info(replication_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_id: (required) - :param str zap_trace_span: OpenTracing span context - :return: Replication - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/replications/{replicationID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replication', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_replication_by_id_async(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a replication. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str replication_id: (required) - :param str zap_trace_span: OpenTracing span context - :return: Replication - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/replications/{replicationID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replication', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_replication_by_id_prepare(self, replication_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['replication_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_replication_by_id', all_params, local_var_params) - # verify the required parameter 'replication_id' is set - if ('replication_id' not in local_var_params or - local_var_params['replication_id'] is None): - raise ValueError("Missing the required parameter `replication_id` when calling `get_replication_by_id`") # noqa: E501 - - path_params = {} - if 'replication_id' in local_var_params: - path_params['replicationID'] = local_var_params['replication_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_replications(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all replications. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_replications(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 - :param str name: - :param str remote_id: - :param str local_bucket_id: - :return: Replications - 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_replications_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_replications_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_replications_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all replications. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_replications_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 - :param str name: - :param str remote_id: - :param str local_bucket_id: - :return: Replications - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replications_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/replications', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replications', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_replications_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all replications. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str name: - :param str remote_id: - :param str local_bucket_id: - :return: Replications - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_replications_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/replications', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replications', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_replications_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span', 'name', 'remote_id', 'local_bucket_id'] # noqa: E501 - self._check_operation_params('get_replications', all_params, local_var_params) - # 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_replications`") # noqa: E501 - - path_params = {} - - query_params = [] - if 'org_id' in local_var_params: - 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 'remote_id' in local_var_params: - query_params.append(('remoteID', local_var_params['remote_id'])) # noqa: E501 - if 'local_bucket_id' in local_var_params: - query_params.append(('localBucketID', local_var_params['local_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_replication_by_id(self, replication_id, replication_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_replication_by_id(replication_id, replication_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_id: (required) - :param ReplicationUpdateRequest replication_update_request: (required) - :param str zap_trace_span: OpenTracing span context - :param bool validate: If true, validate the updated information, but don't save it. - :return: Replication - 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_replication_by_id_with_http_info(replication_id, replication_update_request, **kwargs) # noqa: E501 - else: - (data) = self.patch_replication_by_id_with_http_info(replication_id, replication_update_request, **kwargs) # noqa: E501 - return data - - def patch_replication_by_id_with_http_info(self, replication_id, replication_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_replication_by_id_with_http_info(replication_id, replication_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_id: (required) - :param ReplicationUpdateRequest replication_update_request: (required) - :param str zap_trace_span: OpenTracing span context - :param bool validate: If true, validate the updated information, but don't save it. - :return: Replication - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_replication_by_id_prepare(replication_id, replication_update_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/replications/{replicationID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replication', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_replication_by_id_async(self, replication_id, replication_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a replication. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str replication_id: (required) - :param ReplicationUpdateRequest replication_update_request: (required) - :param str zap_trace_span: OpenTracing span context - :param bool validate: If true, validate the updated information, but don't save it. - :return: Replication - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_replication_by_id_prepare(replication_id, replication_update_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/replications/{replicationID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replication', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_replication_by_id_prepare(self, replication_id, replication_update_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['replication_id', 'replication_update_request', 'zap_trace_span', 'validate'] # noqa: E501 - self._check_operation_params('patch_replication_by_id', all_params, local_var_params) - # verify the required parameter 'replication_id' is set - if ('replication_id' not in local_var_params or - local_var_params['replication_id'] is None): - raise ValueError("Missing the required parameter `replication_id` when calling `patch_replication_by_id`") # noqa: E501 - # verify the required parameter 'replication_update_request' is set - if ('replication_update_request' not in local_var_params or - local_var_params['replication_update_request'] is None): - raise ValueError("Missing the required parameter `replication_update_request` when calling `patch_replication_by_id`") # noqa: E501 - - path_params = {} - if 'replication_id' in local_var_params: - path_params['replicationID'] = local_var_params['replication_id'] # noqa: E501 - - query_params = [] - if 'validate' in local_var_params: - query_params.append(('validate', local_var_params['validate'])) # 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 - - body_params = None - if 'replication_update_request' in local_var_params: - body_params = local_var_params['replication_update_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_replication(self, replication_creation_request, **kwargs): # noqa: E501,D401,D403 - """Register a new replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_replication(replication_creation_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ReplicationCreationRequest replication_creation_request: (required) - :param str zap_trace_span: OpenTracing span context - :param bool validate: If true, validate the replication, but don't save it. - :return: Replication - 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_replication_with_http_info(replication_creation_request, **kwargs) # noqa: E501 - else: - (data) = self.post_replication_with_http_info(replication_creation_request, **kwargs) # noqa: E501 - return data - - def post_replication_with_http_info(self, replication_creation_request, **kwargs): # noqa: E501,D401,D403 - """Register a new replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_replication_with_http_info(replication_creation_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ReplicationCreationRequest replication_creation_request: (required) - :param str zap_trace_span: OpenTracing span context - :param bool validate: If true, validate the replication, but don't save it. - :return: Replication - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_replication_prepare(replication_creation_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/replications', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replication', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_replication_async(self, replication_creation_request, **kwargs): # noqa: E501,D401,D403 - """Register a new replication. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param ReplicationCreationRequest replication_creation_request: (required) - :param str zap_trace_span: OpenTracing span context - :param bool validate: If true, validate the replication, but don't save it. - :return: Replication - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_replication_prepare(replication_creation_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/replications', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Replication', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_replication_prepare(self, replication_creation_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['replication_creation_request', 'zap_trace_span', 'validate'] # noqa: E501 - self._check_operation_params('post_replication', all_params, local_var_params) - # verify the required parameter 'replication_creation_request' is set - if ('replication_creation_request' not in local_var_params or - local_var_params['replication_creation_request'] is None): - raise ValueError("Missing the required parameter `replication_creation_request` when calling `post_replication`") # noqa: E501 - - path_params = {} - - query_params = [] - if 'validate' in local_var_params: - query_params.append(('validate', local_var_params['validate'])) # 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 - - body_params = None - if 'replication_creation_request' in local_var_params: - body_params = local_var_params['replication_creation_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_validate_replication_by_id(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Validate a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_validate_replication_by_id(replication_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_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.post_validate_replication_by_id_with_http_info(replication_id, **kwargs) # noqa: E501 - else: - (data) = self.post_validate_replication_by_id_with_http_info(replication_id, **kwargs) # noqa: E501 - return data - - def post_validate_replication_by_id_with_http_info(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Validate a replication. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_validate_replication_by_id_with_http_info(replication_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str replication_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, path_params, query_params, header_params, body_params = \ - self._post_validate_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/replications/{replicationID}/validate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_validate_replication_by_id_async(self, replication_id, **kwargs): # noqa: E501,D401,D403 - """Validate a replication. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str replication_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, path_params, query_params, header_params, body_params = \ - self._post_validate_replication_by_id_prepare(replication_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/replications/{replicationID}/validate', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_validate_replication_by_id_prepare(self, replication_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['replication_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_validate_replication_by_id', all_params, local_var_params) - # verify the required parameter 'replication_id' is set - if ('replication_id' not in local_var_params or - local_var_params['replication_id'] is None): - raise ValueError("Missing the required parameter `replication_id` when calling `post_validate_replication_by_id`") # noqa: E501 - - path_params = {} - if 'replication_id' in local_var_params: - path_params['replicationID'] = local_var_params['replication_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/resources_service.py b/frogpilot/third_party/influxdb_client/service/resources_service.py deleted file mode 100644 index d86cfe393..000000000 --- a/frogpilot/third_party/influxdb_client/service/resources_service.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class ResourcesService(_BaseService): - """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 - """ResourcesService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_resources(self, **kwargs): # noqa: E501,D401,D403 - """List all known resources. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_resources(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: list[str] - 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_resources_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_resources_with_http_info(**kwargs) # noqa: E501 - return data - - def get_resources_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all known resources. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_resources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: list[str] - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_resources_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/resources', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='list[str]', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_resources_async(self, **kwargs): # noqa: E501,D401,D403 - """List all known resources. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: list[str] - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_resources_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/resources', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='list[str]', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_resources_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_resources', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/restore_service.py b/frogpilot/third_party/influxdb_client/service/restore_service.py deleted file mode 100644 index 6275ed018..000000000 --- a/frogpilot/third_party/influxdb_client/service/restore_service.py +++ /dev/null @@ -1,683 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class RestoreService(_BaseService): - """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 - """RestoreService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def post_restore_bucket_id(self, bucket_id, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite storage metadata for a bucket with shard info from a backup.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_bucket_id(bucket_id, body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str body: Database info serialized as protobuf. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :return: str - 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_restore_bucket_id_with_http_info(bucket_id, body, **kwargs) # noqa: E501 - else: - (data) = self.post_restore_bucket_id_with_http_info(bucket_id, body, **kwargs) # noqa: E501 - return data - - def post_restore_bucket_id_with_http_info(self, bucket_id, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite storage metadata for a bucket with shard info from a backup.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_bucket_id_with_http_info(bucket_id, body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str body: Database info serialized as protobuf. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_id_prepare(bucket_id, body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/restore/bucket/{bucketID}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_restore_bucket_id_async(self, bucket_id, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite storage metadata for a bucket with shard info from a backup.. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str bucket_id: The bucket ID. (required) - :param str body: Database info serialized as protobuf. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_type: - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_id_prepare(bucket_id, body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/restore/bucket/{bucketID}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_restore_bucket_id_prepare(self, bucket_id, body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_id', 'body', 'zap_trace_span', 'content_type'] # noqa: E501 - self._check_operation_params('post_restore_bucket_id', all_params, local_var_params) - # 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_restore_bucket_id`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `post_restore_bucket_id`") # noqa: E501 - - 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 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - - 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 - ['text/plain']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_restore_bucket_metadata(self, bucket_metadata_manifest, **kwargs): # noqa: E501,D401,D403 - """Create a new bucket pre-seeded with shard info from a backup.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_bucket_metadata(bucket_metadata_manifest, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param BucketMetadataManifest bucket_metadata_manifest: Metadata manifest for a bucket. (required) - :param str zap_trace_span: OpenTracing span context - :return: RestoredBucketMappings - 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_restore_bucket_metadata_with_http_info(bucket_metadata_manifest, **kwargs) # noqa: E501 - else: - (data) = self.post_restore_bucket_metadata_with_http_info(bucket_metadata_manifest, **kwargs) # noqa: E501 - return data - - def post_restore_bucket_metadata_with_http_info(self, bucket_metadata_manifest, **kwargs): # noqa: E501,D401,D403 - """Create a new bucket pre-seeded with shard info from a backup.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_bucket_metadata_with_http_info(bucket_metadata_manifest, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param BucketMetadataManifest bucket_metadata_manifest: Metadata manifest for a bucket. (required) - :param str zap_trace_span: OpenTracing span context - :return: RestoredBucketMappings - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_metadata_prepare(bucket_metadata_manifest, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/restore/bucketMetadata', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RestoredBucketMappings', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_restore_bucket_metadata_async(self, bucket_metadata_manifest, **kwargs): # noqa: E501,D401,D403 - """Create a new bucket pre-seeded with shard info from a backup.. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param BucketMetadataManifest bucket_metadata_manifest: Metadata manifest for a bucket. (required) - :param str zap_trace_span: OpenTracing span context - :return: RestoredBucketMappings - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_bucket_metadata_prepare(bucket_metadata_manifest, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/restore/bucketMetadata', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='RestoredBucketMappings', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_restore_bucket_metadata_prepare(self, bucket_metadata_manifest, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['bucket_metadata_manifest', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_restore_bucket_metadata', all_params, local_var_params) - # verify the required parameter 'bucket_metadata_manifest' is set - if ('bucket_metadata_manifest' not in local_var_params or - local_var_params['bucket_metadata_manifest'] is None): - raise ValueError("Missing the required parameter `bucket_metadata_manifest` when calling `post_restore_bucket_metadata`") # noqa: E501 - - 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 - - body_params = None - if 'bucket_metadata_manifest' in local_var_params: - body_params = local_var_params['bucket_metadata_manifest'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_restore_kv(self, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite the embedded KV store on the server with a backed-up snapshot.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_kv(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param file body: Full KV snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :return: PostRestoreKVResponse - 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_restore_kv_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.post_restore_kv_with_http_info(body, **kwargs) # noqa: E501 - return data - - def post_restore_kv_with_http_info(self, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite the embedded KV store on the server with a backed-up snapshot.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_kv_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param file body: Full KV snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :return: PostRestoreKVResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_kv_prepare(body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/restore/kv', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='PostRestoreKVResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_restore_kv_async(self, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite the embedded KV store on the server with a backed-up snapshot.. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param file body: Full KV snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :return: PostRestoreKVResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_kv_prepare(body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/restore/kv', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='PostRestoreKVResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_restore_kv_prepare(self, body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['body', 'zap_trace_span', 'content_encoding', 'content_type'] # noqa: E501 - self._check_operation_params('post_restore_kv', all_params, local_var_params) - # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `post_restore_kv`") # noqa: E501 - - 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 - if 'content_encoding' in local_var_params: - header_params['Content-Encoding'] = local_var_params['content_encoding'] # noqa: E501 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - - 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 - ['text/plain']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_restore_shard_id(self, shard_id, body, **kwargs): # noqa: E501,D401,D403 - """Restore a TSM snapshot into a shard.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_shard_id(shard_id, body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str shard_id: The shard ID. (required) - :param file body: TSM snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :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_restore_shard_id_with_http_info(shard_id, body, **kwargs) # noqa: E501 - else: - (data) = self.post_restore_shard_id_with_http_info(shard_id, body, **kwargs) # noqa: E501 - return data - - def post_restore_shard_id_with_http_info(self, shard_id, body, **kwargs): # noqa: E501,D401,D403 - """Restore a TSM snapshot into a shard.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_shard_id_with_http_info(shard_id, body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str shard_id: The shard ID. (required) - :param file body: TSM snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_shard_id_prepare(shard_id, body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/restore/shards/{shardID}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_restore_shard_id_async(self, shard_id, body, **kwargs): # noqa: E501,D401,D403 - """Restore a TSM snapshot into a shard.. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str shard_id: The shard ID. (required) - :param file body: TSM snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_shard_id_prepare(shard_id, body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/restore/shards/{shardID}', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_restore_shard_id_prepare(self, shard_id, body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['shard_id', 'body', 'zap_trace_span', 'content_encoding', 'content_type'] # noqa: E501 - self._check_operation_params('post_restore_shard_id', all_params, local_var_params) - # verify the required parameter 'shard_id' is set - if ('shard_id' not in local_var_params or - local_var_params['shard_id'] is None): - raise ValueError("Missing the required parameter `shard_id` when calling `post_restore_shard_id`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `post_restore_shard_id`") # noqa: E501 - - path_params = {} - if 'shard_id' in local_var_params: - path_params['shardID'] = local_var_params['shard_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 - if 'content_encoding' in local_var_params: - header_params['Content-Encoding'] = local_var_params['content_encoding'] # noqa: E501 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - - 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 - ['text/plain']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_restore_sql(self, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite the embedded SQL store on the server with a backed-up snapshot.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_sql(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param file body: Full SQL snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :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_restore_sql_with_http_info(body, **kwargs) # noqa: E501 - else: - (data) = self.post_restore_sql_with_http_info(body, **kwargs) # noqa: E501 - return data - - def post_restore_sql_with_http_info(self, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite the embedded SQL store on the server with a backed-up snapshot.. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_restore_sql_with_http_info(body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param file body: Full SQL snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_sql_prepare(body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/restore/sql', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_restore_sql_async(self, body, **kwargs): # noqa: E501,D401,D403 - """Overwrite the embedded SQL store on the server with a backed-up snapshot.. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param file body: Full SQL snapshot. (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The value tells InfluxDB what compression is applied to the line protocol in the request payload. To make an API request with a GZIP payload, send `Content-Encoding: gzip` as a request header. - :param str content_type: - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_restore_sql_prepare(body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/restore/sql', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_restore_sql_prepare(self, body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['body', 'zap_trace_span', 'content_encoding', 'content_type'] # noqa: E501 - self._check_operation_params('post_restore_sql', all_params, local_var_params) - # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `post_restore_sql`") # noqa: E501 - - 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 - if 'content_encoding' in local_var_params: - header_params['Content-Encoding'] = local_var_params['content_encoding'] # noqa: E501 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - - 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 - ['text/plain']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/routes_service.py b/frogpilot/third_party/influxdb_client/service/routes_service.py deleted file mode 100644 index 8b79c4f67..000000000 --- a/frogpilot/third_party/influxdb_client/service/routes_service.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class RoutesService(_BaseService): - """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 - """RoutesService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_routes(self, **kwargs): # noqa: E501,D401,D403 - """List all top level routes. - - Retrieves all the top level routes for the InfluxDB API. #### Limitations - Only returns top level routes--for example, the response contains `"tasks":"/api/v2/tasks"`, and doesn't contain resource-specific routes for tasks (`/api/v2/tasks/TASK_ID/...`). - 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) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :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.get_routes_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_routes_with_http_info(**kwargs) # noqa: E501 - return data - - def get_routes_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all top level routes. - - Retrieves all the top level routes for the InfluxDB API. #### Limitations - Only returns top level routes--for example, the response contains `"tasks":"/api/v2/tasks"`, and doesn't contain resource-specific routes for tasks (`/api/v2/tasks/TASK_ID/...`). - 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) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Routes - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_routes_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Routes', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_routes_async(self, **kwargs): # noqa: E501,D401,D403 - """List all top level routes. - - Retrieves all the top level routes for the InfluxDB API. #### Limitations - Only returns top level routes--for example, the response contains `"tasks":"/api/v2/tasks"`, and doesn't contain resource-specific routes for tasks (`/api/v2/tasks/TASK_ID/...`). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: Routes - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_routes_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Routes', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_routes_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_routes', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/rules_service.py b/frogpilot/third_party/influxdb_client/service/rules_service.py deleted file mode 100644 index 38a74f4a6..000000000 --- a/frogpilot/third_party/influxdb_client/service/rules_service.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class RulesService(_BaseService): - """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 - """RulesService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_notification_rules_id_query(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification rule query. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules_id_query(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxResponse - 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_notification_rules_id_query_with_http_info(rule_id, **kwargs) # noqa: E501 - else: - (data) = self.get_notification_rules_id_query_with_http_info(rule_id, **kwargs) # noqa: E501 - return data - - def get_notification_rules_id_query_with_http_info(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification rule query. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_notification_rules_id_query_with_http_info(rule_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_query_prepare(rule_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/query', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_notification_rules_id_query_async(self, rule_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a notification rule query. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str rule_id: The notification rule ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: FluxResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_notification_rules_id_query_prepare(rule_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/notificationRules/{ruleID}/query', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='FluxResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_notification_rules_id_query_prepare(self, rule_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['rule_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_notification_rules_id_query', all_params, local_var_params) - # verify the required parameter 'rule_id' is set - if ('rule_id' not in local_var_params or - local_var_params['rule_id'] is None): - raise ValueError("Missing the required parameter `rule_id` when calling `get_notification_rules_id_query`") # noqa: E501 - - path_params = {} - if 'rule_id' in local_var_params: - path_params['ruleID'] = local_var_params['rule_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/scraper_targets_service.py b/frogpilot/third_party/influxdb_client/service/scraper_targets_service.py deleted file mode 100644 index 144a39314..000000000 --- a/frogpilot/third_party/influxdb_client/service/scraper_targets_service.py +++ /dev/null @@ -1,1748 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class ScraperTargetsService(_BaseService): - """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 - """ScraperTargetsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_scrapers_id(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Delete 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(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (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_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_scrapers_id_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - return data - - def delete_scrapers_id_with_http_info(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Delete 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_with_http_info(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_scrapers_id_async(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Delete a scraper target. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_scrapers_id_prepare(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_scrapers_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_scrapers_id_labels_id(self, scraper_target_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label 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_labels_id(scraper_target_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str label_id: The label 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_labels_id_with_http_info(scraper_target_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_scrapers_id_labels_id_with_http_info(scraper_target_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_scrapers_id_labels_id_with_http_info(self, scraper_target_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label 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_labels_id_with_http_info(scraper_target_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str label_id: The label 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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_labels_id_prepare(scraper_target_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_scrapers_id_labels_id_async(self, scraper_target_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a scraper target. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str label_id: The label 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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_labels_id_prepare(scraper_target_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_scrapers_id_labels_id_prepare(self, scraper_target_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_scrapers_id_labels_id', all_params, local_var_params) - # 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_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_scrapers_id_labels_id`") # noqa: E501 - - path_params = {} - if 'scraper_target_id' in local_var_params: - path_params['scraperTargetID'] = local_var_params['scraper_target_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_members_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_scrapers_id_members_id_async(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a scraper target. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_members_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_scrapers_id_members_id_prepare(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'scraper_target_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_scrapers_id_members_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_owners_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_scrapers_id_owners_id_async(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a scraper target. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._delete_scrapers_id_owners_id_prepare(user_id, scraper_target_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_scrapers_id_owners_id_prepare(self, user_id, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'scraper_target_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_scrapers_id_owners_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_scrapers(self, **kwargs): # noqa: E501,D401,D403 - """List all scraper targets. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scrapers(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str name: Specifies the name of the scraper target. - :param list[str] id: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. - :param str org_id: Specifies the organization ID of the scraper target. - :param str org: Specifies the organization name of the scraper target. - :return: ScraperTargetResponses - 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_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_scrapers_with_http_info(**kwargs) # noqa: E501 - return data - - def get_scrapers_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all scraper targets. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_scrapers_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str name: Specifies the name of the scraper target. - :param list[str] id: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. - :param str org_id: Specifies the organization ID of the scraper target. - :param str org: Specifies the organization name of the scraper target. - :return: ScraperTargetResponses - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponses', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scrapers_async(self, **kwargs): # noqa: E501,D401,D403 - """List all scraper targets. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str name: Specifies the name of the scraper target. - :param list[str] id: List of scraper target IDs to return. If both `id` and `owner` are specified, only `id` is used. - :param str org_id: Specifies the organization ID of the scraper target. - :param str org: Specifies the organization name of the scraper target. - :return: ScraperTargetResponses - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponses', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scrapers_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'name', 'id', 'org_id', 'org'] # noqa: E501 - self._check_operation_params('get_scrapers', all_params, local_var_params) - - path_params = {} - - query_params = [] - 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 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_scrapers_id(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve 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(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - 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_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - else: - (data) = self.get_scrapers_id_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - return data - - def get_scrapers_id_with_http_info(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve 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_with_http_info(scraper_target_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scrapers_id_async(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a scraper target. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scrapers_id_prepare(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_scrapers_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_scrapers_id_labels(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all labels 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_labels(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: LabelsResponse - 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_labels_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - else: - (data) = self.get_scrapers_id_labels_with_http_info(scraper_target_id, **kwargs) # noqa: E501 - return data - - def get_scrapers_id_labels_with_http_info(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all labels 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_labels_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: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_labels_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scrapers_id_labels_async(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a scraper target. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_labels_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scrapers_id_labels_prepare(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_scrapers_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_members_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scrapers_id_members_async(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a scraper target. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_members_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scrapers_id_members_prepare(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_scrapers_id_members', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_owners_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_scrapers_id_owners_async(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a scraper target. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._get_scrapers_id_owners_prepare(scraper_target_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_scrapers_id_owners_prepare(self, scraper_target_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_scrapers_id_owners', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_scrapers_id(self, scraper_target_id, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - """Update 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.patch_scrapers_id(scraper_target_id, scraper_target_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (required) - :param ScraperTargetRequest scraper_target_request: Scraper target update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - 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_scrapers_id_with_http_info(scraper_target_id, scraper_target_request, **kwargs) # noqa: E501 - else: - (data) = self.patch_scrapers_id_with_http_info(scraper_target_id, scraper_target_request, **kwargs) # noqa: E501 - return data - - def patch_scrapers_id_with_http_info(self, scraper_target_id, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - """Update 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.patch_scrapers_id_with_http_info(scraper_target_id, scraper_target_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (required) - :param ScraperTargetRequest scraper_target_request: Scraper target update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scrapers_id_prepare(scraper_target_id, scraper_target_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_scrapers_id_async(self, scraper_target_id, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - """Update a scraper target. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str scraper_target_id: The identifier of the scraper target. (required) - :param ScraperTargetRequest scraper_target_request: Scraper target update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_scrapers_id_prepare(scraper_target_id, scraper_target_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_scrapers_id_prepare(self, scraper_target_id, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'scraper_target_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_scrapers_id', all_params, local_var_params) - # 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 `patch_scrapers_id`") # noqa: E501 - # verify the required parameter 'scraper_target_request' is set - if ('scraper_target_request' not in local_var_params or - local_var_params['scraper_target_request'] is None): - raise ValueError("Missing the required parameter `scraper_target_request` when calling `patch_scrapers_id`") # noqa: E501 - - 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 - - body_params = None - if 'scraper_target_request' in local_var_params: - body_params = local_var_params['scraper_target_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_scrapers(self, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - """Create 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(scraper_target_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ScraperTargetRequest scraper_target_request: Scraper target to create (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - 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_with_http_info(scraper_target_request, **kwargs) # noqa: E501 - else: - (data) = self.post_scrapers_with_http_info(scraper_target_request, **kwargs) # noqa: E501 - return data - - def post_scrapers_with_http_info(self, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - """Create 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_with_http_info(scraper_target_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param ScraperTargetRequest scraper_target_request: Scraper target to create (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_prepare(scraper_target_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_scrapers_async(self, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - """Create a scraper target. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param ScraperTargetRequest scraper_target_request: Scraper target to create (required) - :param str zap_trace_span: OpenTracing span context - :return: ScraperTargetResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_prepare(scraper_target_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ScraperTargetResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_scrapers_prepare(self, scraper_target_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_scrapers', all_params, local_var_params) - # verify the required parameter 'scraper_target_request' is set - if ('scraper_target_request' not in local_var_params or - local_var_params['scraper_target_request'] is None): - raise ValueError("Missing the required parameter `scraper_target_request` when calling `post_scrapers`") # noqa: E501 - - 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 - - body_params = None - if 'scraper_target_request' in local_var_params: - body_params = local_var_params['scraper_target_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_scrapers_id_labels(self, scraper_target_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label 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_labels(scraper_target_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_labels_with_http_info(scraper_target_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_scrapers_id_labels_with_http_info(scraper_target_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_scrapers_id_labels_with_http_info(self, scraper_target_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label 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_labels_with_http_info(scraper_target_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_labels_prepare(scraper_target_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_scrapers_id_labels_async(self, scraper_target_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a scraper target. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str scraper_target_id: The scraper target ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_labels_prepare(scraper_target_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_scrapers_id_labels_prepare(self, scraper_target_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_scrapers_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_scrapers_id_labels`") # noqa: E501 - - 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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_members_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_scrapers_id_members_async(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a scraper target. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_members_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_scrapers_id_members_prepare(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_scrapers_id_members', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_owners_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_scrapers_id_owners_async(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a scraper target. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._post_scrapers_id_owners_prepare(scraper_target_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/scrapers/{scraperTargetID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_scrapers_id_owners_prepare(self, scraper_target_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['scraper_target_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_scrapers_id_owners', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/secrets_service.py b/frogpilot/third_party/influxdb_client/service/secrets_service.py deleted file mode 100644 index 495ac9520..000000000 --- a/frogpilot/third_party/influxdb_client/service/secrets_service.py +++ /dev/null @@ -1,529 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class SecretsService(_BaseService): - """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 - """SecretsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_orgs_id_secrets_id(self, org_id, secret_id, **kwargs): # noqa: E501,D401,D403 - """Delete a secret from an organization. - - 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_secrets_id(org_id, secret_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str secret_id: The secret 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_orgs_id_secrets_id_with_http_info(org_id, secret_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_orgs_id_secrets_id_with_http_info(org_id, secret_id, **kwargs) # noqa: E501 - return data - - def delete_orgs_id_secrets_id_with_http_info(self, org_id, secret_id, **kwargs): # noqa: E501,D401,D403 - """Delete a secret from an organization. - - 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_secrets_id_with_http_info(org_id, secret_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str secret_id: The secret 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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_secrets_id_prepare(org_id, secret_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets/{secretID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_orgs_id_secrets_id_async(self, org_id, secret_id, **kwargs): # noqa: E501,D401,D403 - """Delete a secret from an organization. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str secret_id: The secret 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, path_params, query_params, header_params, body_params = \ - self._delete_orgs_id_secrets_id_prepare(org_id, secret_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets/{secretID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_orgs_id_secrets_id_prepare(self, org_id, secret_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'secret_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_orgs_id_secrets_id', all_params, local_var_params) - # 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_secrets_id`") # noqa: E501 - # verify the required parameter 'secret_id' is set - if ('secret_id' not in local_var_params or - local_var_params['secret_id'] is None): - raise ValueError("Missing the required parameter `secret_id` when calling `delete_orgs_id_secrets_id`") # noqa: E501 - - path_params = {} - if 'org_id' in local_var_params: - path_params['orgID'] = local_var_params['org_id'] # noqa: E501 - if 'secret_id' in local_var_params: - path_params['secretID'] = local_var_params['secret_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_orgs_id_secrets(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all secret keys for 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_secrets(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: SecretKeysResponse - 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_secrets_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.get_orgs_id_secrets_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def get_orgs_id_secrets_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all secret keys for 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_secrets_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: SecretKeysResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_secrets_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='SecretKeysResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_orgs_id_secrets_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List all secret keys for an organization. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The organization ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: SecretKeysResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_orgs_id_secrets_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='SecretKeysResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_orgs_id_secrets_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_orgs_id_secrets', all_params, local_var_params) - # 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_secrets`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_orgs_id_secrets(self, org_id, request_body, **kwargs): # noqa: E501,D401,D403 - """Update secrets in 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_secrets(org_id, request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param dict(str, str) request_body: Secret key value pairs to update/add (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.patch_orgs_id_secrets_with_http_info(org_id, request_body, **kwargs) # noqa: E501 - else: - (data) = self.patch_orgs_id_secrets_with_http_info(org_id, request_body, **kwargs) # noqa: E501 - return data - - def patch_orgs_id_secrets_with_http_info(self, org_id, request_body, **kwargs): # noqa: E501,D401,D403 - """Update secrets in 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_secrets_with_http_info(org_id, request_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param dict(str, str) request_body: Secret key value pairs to update/add (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, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_secrets_prepare(org_id, request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_orgs_id_secrets_async(self, org_id, request_body, **kwargs): # noqa: E501,D401,D403 - """Update secrets in an organization. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The organization ID. (required) - :param dict(str, str) request_body: Secret key value pairs to update/add (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, path_params, query_params, header_params, body_params = \ - self._patch_orgs_id_secrets_prepare(org_id, request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_orgs_id_secrets_prepare(self, org_id, request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_orgs_id_secrets', all_params, local_var_params) - # 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 `patch_orgs_id_secrets`") # noqa: E501 - # verify the required parameter 'request_body' is set - if ('request_body' not in local_var_params or - local_var_params['request_body'] is None): - raise ValueError("Missing the required parameter `request_body` when calling `patch_orgs_id_secrets`") # noqa: E501 - - 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 - - body_params = None - if 'request_body' in local_var_params: - body_params = local_var_params['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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_orgs_id_secrets(self, org_id, secret_keys, **kwargs): # noqa: E501,D401,D403 - """Delete secrets from 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_secrets(org_id, secret_keys, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param SecretKeys secret_keys: Secret key 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.post_orgs_id_secrets_with_http_info(org_id, secret_keys, **kwargs) # noqa: E501 - else: - (data) = self.post_orgs_id_secrets_with_http_info(org_id, secret_keys, **kwargs) # noqa: E501 - return data - - def post_orgs_id_secrets_with_http_info(self, org_id, secret_keys, **kwargs): # noqa: E501,D401,D403 - """Delete secrets from 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_secrets_with_http_info(org_id, secret_keys, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: The organization ID. (required) - :param SecretKeys secret_keys: Secret key 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, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_secrets_prepare(org_id, secret_keys, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets/delete', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_orgs_id_secrets_async(self, org_id, secret_keys, **kwargs): # noqa: E501,D401,D403 - """Delete secrets from an organization. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: The organization ID. (required) - :param SecretKeys secret_keys: Secret key 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, path_params, query_params, header_params, body_params = \ - self._post_orgs_id_secrets_prepare(org_id, secret_keys, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/orgs/{orgID}/secrets/delete', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_orgs_id_secrets_prepare(self, org_id, secret_keys, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'secret_keys', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_orgs_id_secrets', all_params, local_var_params) - # 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_secrets`") # noqa: E501 - # verify the required parameter 'secret_keys' is set - if ('secret_keys' not in local_var_params or - local_var_params['secret_keys'] is None): - raise ValueError("Missing the required parameter `secret_keys` when calling `post_orgs_id_secrets`") # noqa: E501 - - 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 - - body_params = None - if 'secret_keys' in local_var_params: - body_params = local_var_params['secret_keys'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/setup_service.py b/frogpilot/third_party/influxdb_client/service/setup_service.py deleted file mode 100644 index ed12bde0c..000000000 --- a/frogpilot/third_party/influxdb_client/service/setup_service.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class SetupService(_BaseService): - """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 - """SetupService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_setup(self, **kwargs): # noqa: E501,D401,D403 - """Check if database has default user, org, bucket. - - Returns `true` if no default user, organization, or bucket has been created. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_setup(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: IsOnboarding - 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_setup_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_setup_with_http_info(**kwargs) # noqa: E501 - return data - - def get_setup_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Check if database has default user, org, bucket. - - Returns `true` if no default user, organization, or bucket has been created. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_setup_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: IsOnboarding - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_setup_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/setup', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='IsOnboarding', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_setup_async(self, **kwargs): # noqa: E501,D401,D403 - """Check if database has default user, org, bucket. - - Returns `true` if no default user, organization, or bucket has been created. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: IsOnboarding - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_setup_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/setup', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='IsOnboarding', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_setup_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_setup', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_setup(self, onboarding_request, **kwargs): # noqa: E501,D401,D403 - """Set up initial user, org and bucket. - - Post an onboarding request to set up initial 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(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_with_http_info(onboarding_request, **kwargs) # noqa: E501 - else: - (data) = self.post_setup_with_http_info(onboarding_request, **kwargs) # noqa: E501 - return data - - def post_setup_with_http_info(self, onboarding_request, **kwargs): # noqa: E501,D401,D403 - """Set up initial user, org and bucket. - - Post an onboarding request to set up initial 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_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, path_params, query_params, header_params, body_params = \ - self._post_setup_prepare(onboarding_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/setup', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='OnboardingResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_setup_async(self, onboarding_request, **kwargs): # noqa: E501,D401,D403 - """Set up initial user, org and bucket. - - Post an onboarding request to set up initial user, org and bucket. - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._post_setup_prepare(onboarding_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/setup', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='OnboardingResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_setup_prepare(self, onboarding_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['onboarding_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_setup', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/signin_service.py b/frogpilot/third_party/influxdb_client/service/signin_service.py deleted file mode 100644 index f3ca698a5..000000000 --- a/frogpilot/third_party/influxdb_client/service/signin_service.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class SigninService(_BaseService): - """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 - """SigninService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def post_signin(self, **kwargs): # noqa: E501,D401,D403 - """Create a user session.. - - Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication) for a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user), and then, if successful, generates a user session. To authenticate a user, pass the HTTP `Authorization` header with the `Basic` scheme and the base64-encoded username and password. For syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for syntax and more information. If authentication is successful, InfluxDB creates a new session for the user and then returns the session cookie in the `Set-Cookie` response header. InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance. #### User sessions with authorizations - In InfluxDB Cloud, a user session inherits all the user's permissions for the organization. - In InfluxDB OSS, a user session inherits all the user's permissions for all the organizations that the user belongs to. #### Related endpoints - [Signout](#tag/Signout) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_signin(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :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_signin_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.post_signin_with_http_info(**kwargs) # noqa: E501 - return data - - def post_signin_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Create a user session.. - - Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication) for a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user), and then, if successful, generates a user session. To authenticate a user, pass the HTTP `Authorization` header with the `Basic` scheme and the base64-encoded username and password. For syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for syntax and more information. If authentication is successful, InfluxDB creates a new session for the user and then returns the session cookie in the `Set-Cookie` response header. InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance. #### User sessions with authorizations - In InfluxDB Cloud, a user session inherits all the user's permissions for the organization. - In InfluxDB OSS, a user session inherits all the user's permissions for all the organizations that the user belongs to. #### Related endpoints - [Signout](#tag/Signout) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_signin_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_signin_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/signin', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - auth_settings=['BasicAuthentication'], - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_signin_async(self, **kwargs): # noqa: E501,D401,D403 - """Create a user session.. - - Authenticates [Basic authentication credentials](#section/Authentication/BasicAuthentication) for a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user), and then, if successful, generates a user session. To authenticate a user, pass the HTTP `Authorization` header with the `Basic` scheme and the base64-encoded username and password. For syntax and more information, see [Basic Authentication](#section/Authentication/BasicAuthentication) for syntax and more information. If authentication is successful, InfluxDB creates a new session for the user and then returns the session cookie in the `Set-Cookie` response header. InfluxDB stores user sessions in memory only. They expire within ten minutes and during restarts of the InfluxDB instance. #### User sessions with authorizations - In InfluxDB Cloud, a user session inherits all the user's permissions for the organization. - In InfluxDB OSS, a user session inherits all the user's permissions for all the organizations that the user belongs to. #### Related endpoints - [Signout](#tag/Signout) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_signin_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/signin', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - auth_settings=['BasicAuthentication'], - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_signin_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'authorization'] # noqa: E501 - self._check_operation_params('post_signin', all_params, local_var_params) - - 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 - if 'authorization' in local_var_params: - header_params['Authorization'] = local_var_params['authorization'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/signout_service.py b/frogpilot/third_party/influxdb_client/service/signout_service.py deleted file mode 100644 index 882e78732..000000000 --- a/frogpilot/third_party/influxdb_client/service/signout_service.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class SignoutService(_BaseService): - """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 - """SignoutService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def post_signout(self, **kwargs): # noqa: E501,D401,D403 - """Expire a user session. - - Expires a user session specified by a session cookie. Use this endpoint to expire a user session that was generated when the user authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint. For example, the `POST /api/v2/signout` endpoint represents the third step in the following three-step process to authenticate a user, retrieve the `user` resource, and then expire the session: 1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie from step 1 to retrieve user information. 3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session cookie to expire the session. _See the complete example in request samples._ InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance. To learn more about cookies in HTTP requests, see [Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). #### Related endpoints - [Signin](#tag/Signin) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_signout(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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.post_signout_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.post_signout_with_http_info(**kwargs) # noqa: E501 - return data - - def post_signout_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Expire a user session. - - Expires a user session specified by a session cookie. Use this endpoint to expire a user session that was generated when the user authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint. For example, the `POST /api/v2/signout` endpoint represents the third step in the following three-step process to authenticate a user, retrieve the `user` resource, and then expire the session: 1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie from step 1 to retrieve user information. 3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session cookie to expire the session. _See the complete example in request samples._ InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance. To learn more about cookies in HTTP requests, see [Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). #### Related endpoints - [Signin](#tag/Signin) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_signout_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :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, path_params, query_params, header_params, body_params = \ - self._post_signout_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/signout', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_signout_async(self, **kwargs): # noqa: E501,D401,D403 - """Expire a user session. - - Expires a user session specified by a session cookie. Use this endpoint to expire a user session that was generated when the user authenticated with the InfluxDB Developer Console (UI) or the `POST /api/v2/signin` endpoint. For example, the `POST /api/v2/signout` endpoint represents the third step in the following three-step process to authenticate a user, retrieve the `user` resource, and then expire the session: 1. Send a request with the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. Send a request to the `GET /api/v2/me` endpoint, passing the stored session cookie from step 1 to retrieve user information. 3. Send a request to the `POST /api/v2/signout` endpoint, passing the stored session cookie to expire the session. _See the complete example in request samples._ InfluxDB stores user sessions in memory only. If a user doesn't sign out, then the user session automatically expires within ten minutes or during a restart of the InfluxDB instance. To learn more about cookies in HTTP requests, see [Mozilla Developer Network (MDN) Web Docs, HTTP cookies](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies). #### Related endpoints - [Signin](#tag/Signin) - This method makes an asynchronous HTTP request. - - :param async_req bool - :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, path_params, query_params, header_params, body_params = \ - self._post_signout_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/signout', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_signout_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('post_signout', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/sources_service.py b/frogpilot/third_party/influxdb_client/service/sources_service.py deleted file mode 100644 index 5bb381f15..000000000 --- a/frogpilot/third_party/influxdb_client/service/sources_service.py +++ /dev/null @@ -1,860 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class SourcesService(_BaseService): - """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 - """SourcesService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_sources_id(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Delete a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_sources_id(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source 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_sources_id_with_http_info(source_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_sources_id_with_http_info(source_id, **kwargs) # noqa: E501 - return data - - def delete_sources_id_with_http_info(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Delete a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_sources_id_with_http_info(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source 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, path_params, query_params, header_params, body_params = \ - self._delete_sources_id_prepare(source_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources/{sourceID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_sources_id_async(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Delete a source. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str source_id: The source 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, path_params, query_params, header_params, body_params = \ - self._delete_sources_id_prepare(source_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources/{sourceID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_sources_id_prepare(self, source_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['source_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_sources_id', all_params, local_var_params) - # verify the required parameter 'source_id' is set - if ('source_id' not in local_var_params or - local_var_params['source_id'] is None): - raise ValueError("Missing the required parameter `source_id` when calling `delete_sources_id`") # noqa: E501 - - path_params = {} - if 'source_id' in local_var_params: - path_params['sourceID'] = local_var_params['source_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_sources(self, **kwargs): # noqa: E501,D401,D403 - """List all sources. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Sources - 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_sources_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_sources_with_http_info(**kwargs) # noqa: E501 - return data - - def get_sources_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all sources. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Sources - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Sources', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_sources_async(self, **kwargs): # noqa: E501,D401,D403 - """List all sources. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Sources - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Sources', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_sources_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'org'] # noqa: E501 - self._check_operation_params('get_sources', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_sources_id(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - 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_sources_id_with_http_info(source_id, **kwargs) # noqa: E501 - else: - (data) = self.get_sources_id_with_http_info(source_id, **kwargs) # noqa: E501 - return data - - def get_sources_id_with_http_info(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id_with_http_info(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_prepare(source_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources/{sourceID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Source', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_sources_id_async(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a source. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_prepare(source_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources/{sourceID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Source', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_sources_id_prepare(self, source_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['source_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_sources_id', all_params, local_var_params) - # verify the required parameter 'source_id' is set - if ('source_id' not in local_var_params or - local_var_params['source_id'] is None): - raise ValueError("Missing the required parameter `source_id` when calling `get_sources_id`") # noqa: E501 - - path_params = {} - if 'source_id' in local_var_params: - path_params['sourceID'] = local_var_params['source_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_sources_id_buckets(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get buckets in a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id_buckets(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Buckets - 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_sources_id_buckets_with_http_info(source_id, **kwargs) # noqa: E501 - else: - (data) = self.get_sources_id_buckets_with_http_info(source_id, **kwargs) # noqa: E501 - return data - - def get_sources_id_buckets_with_http_info(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get buckets in a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id_buckets_with_http_info(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Buckets - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources/{sourceID}/buckets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Buckets', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_sources_id_buckets_async(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get buckets in a source. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :return: Buckets - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_buckets_prepare(source_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources/{sourceID}/buckets', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Buckets', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_sources_id_buckets_prepare(self, source_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['source_id', 'zap_trace_span', 'org'] # noqa: E501 - self._check_operation_params('get_sources_id_buckets', all_params, local_var_params) - # verify the required parameter 'source_id' is set - if ('source_id' not in local_var_params or - local_var_params['source_id'] is None): - raise ValueError("Missing the required parameter `source_id` when calling `get_sources_id_buckets`") # noqa: E501 - - path_params = {} - if 'source_id' in local_var_params: - path_params['sourceID'] = local_var_params['source_id'] # noqa: E501 - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_sources_id_health(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get the health of a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id_health(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: HealthCheck - 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_sources_id_health_with_http_info(source_id, **kwargs) # noqa: E501 - else: - (data) = self.get_sources_id_health_with_http_info(source_id, **kwargs) # noqa: E501 - return data - - def get_sources_id_health_with_http_info(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get the health of a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_sources_id_health_with_http_info(source_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: HealthCheck - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_health_prepare(source_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources/{sourceID}/health', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='HealthCheck', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_sources_id_health_async(self, source_id, **kwargs): # noqa: E501,D401,D403 - """Get the health of a source. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str source_id: The source ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: HealthCheck - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_sources_id_health_prepare(source_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources/{sourceID}/health', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='HealthCheck', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_sources_id_health_prepare(self, source_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['source_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_sources_id_health', all_params, local_var_params) - # verify the required parameter 'source_id' is set - if ('source_id' not in local_var_params or - local_var_params['source_id'] is None): - raise ValueError("Missing the required parameter `source_id` when calling `get_sources_id_health`") # noqa: E501 - - path_params = {} - if 'source_id' in local_var_params: - path_params['sourceID'] = local_var_params['source_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_sources_id(self, source_id, source, **kwargs): # noqa: E501,D401,D403 - """Update a Source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_sources_id(source_id, source, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param Source source: Source update (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - 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_sources_id_with_http_info(source_id, source, **kwargs) # noqa: E501 - else: - (data) = self.patch_sources_id_with_http_info(source_id, source, **kwargs) # noqa: E501 - return data - - def patch_sources_id_with_http_info(self, source_id, source, **kwargs): # noqa: E501,D401,D403 - """Update a Source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_sources_id_with_http_info(source_id, source, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str source_id: The source ID. (required) - :param Source source: Source update (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_sources_id_prepare(source_id, source, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources/{sourceID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Source', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_sources_id_async(self, source_id, source, **kwargs): # noqa: E501,D401,D403 - """Update a Source. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str source_id: The source ID. (required) - :param Source source: Source update (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_sources_id_prepare(source_id, source, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources/{sourceID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Source', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_sources_id_prepare(self, source_id, source, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['source_id', 'source', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_sources_id', all_params, local_var_params) - # verify the required parameter 'source_id' is set - if ('source_id' not in local_var_params or - local_var_params['source_id'] is None): - raise ValueError("Missing the required parameter `source_id` when calling `patch_sources_id`") # noqa: E501 - # verify the required parameter 'source' is set - if ('source' not in local_var_params or - local_var_params['source'] is None): - raise ValueError("Missing the required parameter `source` when calling `patch_sources_id`") # noqa: E501 - - path_params = {} - if 'source_id' in local_var_params: - path_params['sourceID'] = local_var_params['source_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 - - body_params = None - if 'source' in local_var_params: - body_params = local_var_params['source'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_sources(self, source, **kwargs): # noqa: E501,D401,D403 - """Create a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_sources(source, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Source source: Source to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - 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_sources_with_http_info(source, **kwargs) # noqa: E501 - else: - (data) = self.post_sources_with_http_info(source, **kwargs) # noqa: E501 - return data - - def post_sources_with_http_info(self, source, **kwargs): # noqa: E501,D401,D403 - """Create a source. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_sources_with_http_info(source, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Source source: Source to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_sources_prepare(source, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/sources', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Source', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_sources_async(self, source, **kwargs): # noqa: E501,D401,D403 - """Create a source. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param Source source: Source to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Source - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_sources_prepare(source, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/sources', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Source', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_sources_prepare(self, source, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['source', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_sources', all_params, local_var_params) - # verify the required parameter 'source' is set - if ('source' not in local_var_params or - local_var_params['source'] is None): - raise ValueError("Missing the required parameter `source` when calling `post_sources`") # noqa: E501 - - 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 - - body_params = None - if 'source' in local_var_params: - body_params = local_var_params['source'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/tasks_service.py b/frogpilot/third_party/influxdb_client/service/tasks_service.py deleted file mode 100644 index 914295141..000000000 --- a/frogpilot/third_party/influxdb_client/service/tasks_service.py +++ /dev/null @@ -1,2725 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class TasksService(_BaseService): - """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 - """TasksService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_tasks_id(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Delete a task. - - Deletes a task and associated records. Use this endpoint to delete a task and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID). - 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(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task 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_tasks_id_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_tasks_id_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def delete_tasks_id_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Delete a task. - - Deletes a task and associated records. Use this endpoint to delete a task and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID). - 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_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task 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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_tasks_id_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Delete a task. - - Deletes a task and associated records. Use this endpoint to delete a task and all associated records (task runs, logs, and labels). Once the task is deleted, InfluxDB cancels all scheduled runs of the task. If you want to disable a task instead of delete it, [update the task status to `inactive`](#operation/PatchTasksID). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task 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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_tasks_id_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_tasks_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_tasks_id_labels_id(self, task_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a task. - - Deletes a label 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_labels_id(task_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to delete the label from. (required) - :param str label_id: The ID of the label 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_tasks_id_labels_id_with_http_info(task_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_tasks_id_labels_id_with_http_info(task_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_tasks_id_labels_id_with_http_info(self, task_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a task. - - Deletes a label 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_labels_id_with_http_info(task_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to delete the label from. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_labels_id_prepare(task_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_tasks_id_labels_id_async(self, task_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a task. - - Deletes a label from a task. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to delete the label from. (required) - :param str label_id: The ID of the label 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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_labels_id_prepare(task_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_tasks_id_labels_id_prepare(self, task_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_tasks_id_labels_id', all_params, local_var_params) - # 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_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_tasks_id_labels_id`") # noqa: E501 - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_tasks_id_members_id(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_members_id_prepare(user_id, task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_tasks_id_members_id_async(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Removes a member from a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_members_id_prepare(user_id, task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_tasks_id_members_id_prepare(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_tasks_id_members_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_tasks_id_owners_id(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. - 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. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. - 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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_owners_id_prepare(user_id, task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_tasks_id_owners_id_async(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_owners_id_prepare(user_id, task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_tasks_id_owners_id_prepare(self, user_id, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_tasks_id_owners_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_tasks_id_runs_id(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Cancel a running task. - - Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint with InfluxDB OSS to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. - 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_runs_id(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to cancel. (required) - :param str run_id: The ID of the task run to cancel. (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_runs_id_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_tasks_id_runs_id_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - return data - - def delete_tasks_id_runs_id_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Cancel a running task. - - Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint with InfluxDB OSS to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. - 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_runs_id_with_http_info(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to cancel. (required) - :param str run_id: The ID of the task run to cancel. (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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_tasks_id_runs_id_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Cancel a running task. - - Cancels a running [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint with InfluxDB OSS to cancel a running task. #### InfluxDB Cloud - Doesn't support this operation. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to cancel. (required) - :param str run_id: The ID of the task run to cancel. (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, path_params, query_params, header_params, body_params = \ - self._delete_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_tasks_id_runs_id_prepare(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'run_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_tasks_id_runs_id', all_params, local_var_params) - # 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_runs_id`") # noqa: E501 - # verify the required parameter 'run_id' is set - if ('run_id' not in local_var_params or - local_var_params['run_id'] is None): - raise ValueError("Missing the required parameter `run_id` when calling `delete_tasks_id_runs_id`") # noqa: E501 - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - if 'run_id' in local_var_params: - path_params['runID'] = local_var_params['run_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks(self, **kwargs): # noqa: E501,D401,D403 - """List tasks. - - Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tasks(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str name: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) name. Only returns tasks with the specified name. Different tasks may have the same name. - :param str after: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Only returns tasks created after the specified task. - :param str user: A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Only returns tasks owned by the specified user. - :param str org: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Only returns tasks owned by the specified organization. - :param str org_id: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Only returns tasks owned by the specified organization. - :param str status: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) status. Only returns tasks that have the specified status (`active` or `inactive`). - :param int limit: The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter. - :param str type: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) type (`basic` or `system`). Default is `system`. Specifies the level of detail for tasks in the response. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`). - :return: Tasks - 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_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_tasks_with_http_info(**kwargs) # noqa: E501 - return data - - def get_tasks_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List tasks. - - Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_tasks_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str name: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) name. Only returns tasks with the specified name. Different tasks may have the same name. - :param str after: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Only returns tasks created after the specified task. - :param str user: A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Only returns tasks owned by the specified user. - :param str org: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Only returns tasks owned by the specified organization. - :param str org_id: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Only returns tasks owned by the specified organization. - :param str status: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) status. Only returns tasks that have the specified status (`active` or `inactive`). - :param int limit: The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter. - :param str type: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) type (`basic` or `system`). Default is `system`. Specifies the level of detail for tasks in the response. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`). - :return: Tasks - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Tasks', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_async(self, **kwargs): # noqa: E501,D401,D403 - """List tasks. - - Retrieves a list of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). To limit which tasks are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all tasks up to the default `limit`. #### Related guide - [Process data with InfluxDB tasks](https://docs.influxdata.com/influxdb/latest/process-data/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str name: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) name. Only returns tasks with the specified name. Different tasks may have the same name. - :param str after: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Only returns tasks created after the specified task. - :param str user: A [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) ID. Only returns tasks owned by the specified user. - :param str org: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) name. Only returns tasks owned by the specified organization. - :param str org_id: An [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization) ID. Only returns tasks owned by the specified organization. - :param str status: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) status. Only returns tasks that have the specified status (`active` or `inactive`). - :param int limit: The maximum number of [tasks](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) to return. Default is `100`. The minimum is `1` and the maximum is `500`. To reduce the payload size, combine _`type=basic`_ and _`limit`_ (see _Request samples_). For more information about the `basic` response, see the _`type`_ parameter. - :param str type: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) type (`basic` or `system`). Default is `system`. Specifies the level of detail for tasks in the response. The default (`system`) response contains all the metadata properties for tasks. To reduce the response size, pass `basic` to omit some task properties (`flux`, `createdAt`, `updatedAt`). - :return: Tasks - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Tasks', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'name', 'after', 'user', 'org', 'org_id', 'status', 'limit', 'type'] # noqa: E501 - self._check_operation_params('get_tasks', all_params, local_var_params) - - if 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_tasks`, must be a value less than or equal to `500`") # 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_tasks`, must be a value greater than or equal to `1`") # noqa: E501 - path_params = {} - - query_params = [] - if 'name' in local_var_params: - query_params.append(('name', local_var_params['name'])) # noqa: E501 - if 'after' in local_var_params: - query_params.append(('after', local_var_params['after'])) # noqa: E501 - if 'user' in local_var_params: - query_params.append(('user', local_var_params['user'])) # noqa: E501 - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'status' in local_var_params: - query_params.append(('status', local_var_params['status'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - 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: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a task. - - Retrieves a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - 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_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a task. - - Retrieves a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Task', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a task. - - Retrieves a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Task', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_tasks_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id_labels(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List labels for a task. - - Retrieves a list of all labels for a task. Labels may be used for grouping and filtering tasks. - 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_labels(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to retrieve labels for. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - 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_labels_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_labels_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_labels_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List labels for a task. - - Retrieves a list of all labels for a task. Labels may be used for grouping and filtering tasks. - 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_labels_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to retrieve labels for. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_labels_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_labels_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List labels for a task. - - Retrieves a list of all labels for a task. Labels may be used for grouping and filtering tasks. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to retrieve labels for. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_labels_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_labels_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_tasks_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id_logs(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve all logs for a task. - - Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata. - 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_logs(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: Logs - 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_logs_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_logs_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_logs_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve all logs for a task. - - Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata. - 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_logs_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: Logs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_logs_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Logs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_logs_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve all logs for a task. - - Retrieves a list of all logs for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). When an InfluxDB task runs, a “run” record is created in the task’s history. Logs associated with each run provide relevant log messages, timestamps, and the exit status of the run attempt. Use this endpoint to retrieve only the log events for a task, without additional task metadata. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The task ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Logs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_logs_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Logs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_logs_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_tasks_id_logs', all_params, local_var_params) - # 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_logs`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id_members(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all task members. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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_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. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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_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, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_members_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_members_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all task members. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Lists all users that have the `member` role for the specified [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_members_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_members_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_tasks_id_members', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id_owners(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Retrieves all users that have owner permission for 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 ID of the task to retrieve owners for. (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. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Retrieves all users that have owner permission for 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 ID of the task to retrieve owners for. (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, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_owners_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_owners_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Retrieves all users that have owner permission for a task. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to retrieve owners for. (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, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_owners_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_owners_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_tasks_id_owners', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id_runs(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List runs for a task. - - Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`. - 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_runs(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to get runs for. Only returns runs for this task. (required) - :param str zap_trace_span: OpenTracing span context - :param str after: A task run ID. Only returns runs created after this run. - :param int limit: Limits the number of task runs returned. Default is `100`. - :param datetime after_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. - :param datetime before_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. - :return: Runs - 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_runs_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_runs_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_runs_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List runs for a task. - - Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`. - 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_runs_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to get runs for. Only returns runs for this task. (required) - :param str zap_trace_span: OpenTracing span context - :param str after: A task run ID. Only returns runs created after this run. - :param int limit: Limits the number of task runs returned. Default is `100`. - :param datetime after_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. - :param datetime before_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. - :return: Runs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Runs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_runs_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """List runs for a task. - - Retrieves a list of runs for a [task](https://docs.influxdata.com/influxdb/latest/process-data/). To limit which task runs are returned, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all task runs up to the default `limit`. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to get runs for. Only returns runs for this task. (required) - :param str zap_trace_span: OpenTracing span context - :param str after: A task run ID. Only returns runs created after this run. - :param int limit: Limits the number of task runs returned. Default is `100`. - :param datetime after_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled after this time. - :param datetime before_time: A timestamp ([RFC3339 date/time format](https://docs.influxdata.com/influxdb/latest/reference/glossary/#rfc3339-timestamp)). Only returns runs scheduled before this time. - :return: Runs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Runs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_runs_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span', 'after', 'limit', 'after_time', 'before_time'] # noqa: E501 - self._check_operation_params('get_tasks_id_runs', all_params, local_var_params) - # 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_runs`") # noqa: E501 - - if 'limit' in local_var_params and local_var_params['limit'] > 500: # noqa: E501 - raise ValueError("Invalid value for parameter `limit` when calling `get_tasks_id_runs`, must be a value less than or equal to `500`") # 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_tasks_id_runs`, must be a value greater than or equal to `1`") # noqa: E501 - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - - query_params = [] - if 'after' in local_var_params: - query_params.append(('after', local_var_params['after'])) # noqa: E501 - if 'limit' in local_var_params: - query_params.append(('limit', local_var_params['limit'])) # noqa: E501 - if 'after_time' in local_var_params: - query_params.append(('afterTime', local_var_params['after_time'])) # noqa: E501 - if 'before_time' in local_var_params: - query_params.append(('beforeTime', local_var_params['before_time'])) # 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id_runs_id(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a run for a task.. - - Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run. - 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_runs_id(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to retrieve runs for. (required) - :param str run_id: The ID of the run to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Run - 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_runs_id_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_runs_id_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_runs_id_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a run for a task.. - - Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run. - 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_runs_id_with_http_info(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to retrieve runs for. (required) - :param str run_id: The ID of the run to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Run - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Run', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_runs_id_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a run for a task.. - - Retrieves a specific run for a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task). Use this endpoint to retrieve detail and logs for a specific task run. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to retrieve runs for. (required) - :param str run_id: The ID of the run to retrieve. (required) - :param str zap_trace_span: OpenTracing span context - :return: Run - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Run', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_runs_id_prepare(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'run_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_tasks_id_runs_id', all_params, local_var_params) - # 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_runs_id`") # noqa: E501 - # verify the required parameter 'run_id' is set - if ('run_id' not in local_var_params or - local_var_params['run_id'] is None): - raise ValueError("Missing the required parameter `run_id` when calling `get_tasks_id_runs_id`") # noqa: E501 - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - if 'run_id' in local_var_params: - path_params['runID'] = local_var_params['run_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_tasks_id_runs_id_logs(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve all logs for a run. - - Retrieves all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze task performance and troubleshoot failed task runs. - 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_runs_id_logs(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to get logs for. (required) - :param str run_id: The ID of the run to get logs for. (required) - :param str zap_trace_span: OpenTracing span context - :return: Logs - 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_runs_id_logs_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - else: - (data) = self.get_tasks_id_runs_id_logs_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - return data - - def get_tasks_id_runs_id_logs_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve all logs for a run. - - Retrieves all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze task performance and troubleshoot failed task runs. - 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_runs_id_logs_with_http_info(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to get logs for. (required) - :param str run_id: The ID of the run to get logs for. (required) - :param str zap_trace_span: OpenTracing span context - :return: Logs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_logs_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Logs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_tasks_id_runs_id_logs_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve all logs for a run. - - Retrieves all logs for a task run. A log is a list of run events with `runID`, `time`, and `message` properties. Use this endpoint to help analyze task performance and troubleshoot failed task runs. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to get logs for. (required) - :param str run_id: The ID of the run to get logs for. (required) - :param str zap_trace_span: OpenTracing span context - :return: Logs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_tasks_id_runs_id_logs_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}/logs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Logs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_tasks_id_runs_id_logs_prepare(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'run_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_tasks_id_runs_id_logs', all_params, local_var_params) - # 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_runs_id_logs`") # noqa: E501 - # verify the required parameter 'run_id' is set - if ('run_id' not in local_var_params or - local_var_params['run_id'] is None): - raise ValueError("Missing the required parameter `run_id` when calling `get_tasks_id_runs_id_logs`") # noqa: E501 - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - if 'run_id' in local_var_params: - path_params['runID'] = local_var_params['run_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_tasks_id(self, task_id, task_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a task. - - Updates a task and then cancels all scheduled runs of the task. Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`). Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. To update a task, pass an object that contains the updated key-value pairs. To activate or inactivate a task, set the `status` property. _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_tasks_id(task_id, task_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to update. (required) - :param TaskUpdateRequest task_update_request: An object that contains updated task properties to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - 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_tasks_id_with_http_info(task_id, task_update_request, **kwargs) # noqa: E501 - else: - (data) = self.patch_tasks_id_with_http_info(task_id, task_update_request, **kwargs) # noqa: E501 - return data - - def patch_tasks_id_with_http_info(self, task_id, task_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a task. - - Updates a task and then cancels all scheduled runs of the task. Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`). Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. To update a task, pass an object that contains the updated key-value pairs. To activate or inactivate a task, set the `status` property. _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task. - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_tasks_id_with_http_info(task_id, task_update_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to update. (required) - :param TaskUpdateRequest task_update_request: An object that contains updated task properties to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_tasks_id_prepare(task_id, task_update_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Task', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_tasks_id_async(self, task_id, task_update_request, **kwargs): # noqa: E501,D401,D403 - """Update a task. - - Updates a task and then cancels all scheduled runs of the task. Use this endpoint to set, modify, and clear task properties (for example: `cron`, `name`, `flux`, `status`). Once InfluxDB applies the update, it cancels all previously scheduled runs of the task. To update a task, pass an object that contains the updated key-value pairs. To activate or inactivate a task, set the `status` property. _`"status": "inactive"`_ cancels scheduled runs and prevents manual runs of the task. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to update. (required) - :param TaskUpdateRequest task_update_request: An object that contains updated task properties to apply. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_tasks_id_prepare(task_id, task_update_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Task', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_tasks_id_prepare(self, task_id, task_update_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'task_update_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_tasks_id', all_params, local_var_params) - # 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 `patch_tasks_id`") # noqa: E501 - # verify the required parameter 'task_update_request' is set - if ('task_update_request' not in local_var_params or - local_var_params['task_update_request'] is None): - raise ValueError("Missing the required parameter `task_update_request` when calling `patch_tasks_id`") # noqa: E501 - - 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 - - body_params = None - if 'task_update_request' in local_var_params: - body_params = local_var_params['task_update_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_tasks(self, task_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a task. - - Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_tasks(task_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TaskCreateRequest task_create_request: The task to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - 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_with_http_info(task_create_request, **kwargs) # noqa: E501 - else: - (data) = self.post_tasks_with_http_info(task_create_request, **kwargs) # noqa: E501 - return data - - def post_tasks_with_http_info(self, task_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a task. - - Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_tasks_with_http_info(task_create_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TaskCreateRequest task_create_request: The task to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_prepare(task_create_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Task', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_tasks_async(self, task_create_request, **kwargs): # noqa: E501,D401,D403 - """Create a task. - - Creates a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) and returns the task. #### Related guides - [Get started with tasks](https://docs.influxdata.com/influxdb/latest/process-data/get-started/) - [Create a task](https://docs.influxdata.com/influxdb/latest/process-data/manage-tasks/create-task/) - [Common tasks](https://docs.influxdata.com/influxdb/latest/process-data/common-tasks/) - [Task configuration options](https://docs.influxdata.com/influxdb/latest/process-data/task-options/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param TaskCreateRequest task_create_request: The task to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: Task - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_prepare(task_create_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Task', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_tasks_prepare(self, task_create_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_create_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_tasks', all_params, local_var_params) - # verify the required parameter 'task_create_request' is set - if ('task_create_request' not in local_var_params or - local_var_params['task_create_request'] is None): - raise ValueError("Missing the required parameter `task_create_request` when calling `post_tasks`") # noqa: E501 - - 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 - - body_params = None - if 'task_create_request' in local_var_params: - body_params = local_var_params['task_create_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_tasks_id_labels(self, task_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a task. - - Adds a label to a task. Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI. - 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_labels(task_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to label. (required) - :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the task. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_labels_with_http_info(task_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_tasks_id_labels_with_http_info(task_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_tasks_id_labels_with_http_info(self, task_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a task. - - Adds a label to a task. Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI. - 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_labels_with_http_info(task_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: The ID of the task to label. (required) - :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the task. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_labels_prepare(task_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_tasks_id_labels_async(self, task_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a task. - - Adds a label to a task. Use this endpoint to add a label that you can use to filter tasks in the InfluxDB UI. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The ID of the task to label. (required) - :param LabelMapping label_mapping: An object that contains a _`labelID`_ to add to the task. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_labels_prepare(task_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_tasks_id_labels_prepare(self, task_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_tasks_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_tasks_id_labels`") # noqa: E501 - - 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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_tasks_id_members(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a user to members of a task and returns the member. - 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: A user to add as a member of the task. (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. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a user to members of a task and returns the member. - 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: A user to add as a member of the task. (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, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_members_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_tasks_id_members_async(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Adds a user to members of a task and returns the member. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as a member of the task. (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, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_members_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_tasks_id_members_prepare(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_tasks_id_members', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_tasks_id_owners(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner for a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Assigns a task `owner` role to a user. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource. - 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: A user to add as an owner of the task. (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 for a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Assigns a task `owner` role to a user. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource. - 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: A user to add as an owner of the task. (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, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_owners_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_tasks_id_owners_async(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner for a task. - - **Deprecated**: Tasks don't use `owner` and `member` roles. Use [`/api/v2/authorizations`](#tag/Authorizations-(API-tokens)) to assign user permissions. Assigns a task `owner` role to a user. Use this endpoint to create a _resource owner_ for the task. A _resource owner_ is a user with `role: owner` for a specific resource. - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: The task ID. (required) - :param AddResourceMemberRequestBody add_resource_member_request_body: A user to add as an owner of the task. (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, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_owners_prepare(task_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_tasks_id_owners_prepare(self, task_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_tasks_id_owners', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_tasks_id_runs(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Start a task run, overriding the schedule. - - Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). - 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_runs(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: (required) - :param str zap_trace_span: OpenTracing span context - :param RunManually run_manually: - :return: Run - 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_runs_with_http_info(task_id, **kwargs) # noqa: E501 - else: - (data) = self.post_tasks_id_runs_with_http_info(task_id, **kwargs) # noqa: E501 - return data - - def post_tasks_id_runs_with_http_info(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Start a task run, overriding the schedule. - - Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). - 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_runs_with_http_info(task_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: (required) - :param str zap_trace_span: OpenTracing span context - :param RunManually run_manually: - :return: Run - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Run', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_tasks_id_runs_async(self, task_id, **kwargs): # noqa: E501,D401,D403 - """Start a task run, overriding the schedule. - - Schedules a task run to start immediately, ignoring scheduled runs. Use this endpoint to manually start a task run. Scheduled runs will continue to run as scheduled. This may result in concurrently running tasks. To _retry_ a previous run (and avoid creating a new run), use the [`POST /api/v2/tasks/{taskID}/runs/{runID}/retry` endpoint](#operation/PostTasksIDRunsIDRetry). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: (required) - :param str zap_trace_span: OpenTracing span context - :param RunManually run_manually: - :return: Run - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_prepare(task_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Run', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_tasks_id_runs_prepare(self, task_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'zap_trace_span', 'run_manually'] # noqa: E501 - self._check_operation_params('post_tasks_id_runs', all_params, local_var_params) - # 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_runs`") # noqa: E501 - - 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 - - body_params = None - if 'run_manually' in local_var_params: - body_params = local_var_params['run_manually'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_tasks_id_runs_id_retry(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retry a task run. - - Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - The task must be _active_ (`status: "active"`). - 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_runs_id_retry(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task to retry. (required) - :param str run_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs. (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 - kwargs['_return_http_data_only'] = True - if kwargs.get('async_req'): - return self.post_tasks_id_runs_id_retry_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - else: - (data) = self.post_tasks_id_runs_id_retry_with_http_info(task_id, run_id, **kwargs) # noqa: E501 - return data - - def post_tasks_id_runs_id_retry_with_http_info(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retry a task run. - - Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - The task must be _active_ (`status: "active"`). - 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_runs_id_retry_with_http_info(task_id, run_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str task_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task to retry. (required) - :param str run_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs. (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, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_id_retry_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}/retry', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Run', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_tasks_id_runs_id_retry_async(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - """Retry a task run. - - Queues a [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run to retry and returns the scheduled run. To manually start a _new_ task run, use the [`POST /api/v2/tasks/{taskID}/runs` endpoint](#operation/PostTasksIDRuns). #### Limitations - The task must be _active_ (`status: "active"`). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str task_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) ID. Specifies the task to retry. (required) - :param str run_id: A [task](https://docs.influxdata.com/influxdb/latest/reference/glossary/#task) run ID. Specifies the task run to retry. To find a task run ID, use the [`GET /api/v2/tasks/{taskID}/runs` endpoint](#operation/GetTasksIDRuns) to list task runs. (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, path_params, query_params, header_params, body_params = \ - self._post_tasks_id_runs_id_retry_prepare(task_id, run_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/tasks/{taskID}/runs/{runID}/retry', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Run', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_tasks_id_runs_id_retry_prepare(self, task_id, run_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['task_id', 'run_id', 'zap_trace_span', 'body'] # noqa: E501 - self._check_operation_params('post_tasks_id_runs_id_retry', all_params, local_var_params) - # 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_runs_id_retry`") # noqa: E501 - # verify the required parameter 'run_id' is set - if ('run_id' not in local_var_params or - local_var_params['run_id'] is None): - raise ValueError("Missing the required parameter `run_id` when calling `post_tasks_id_runs_id_retry`") # noqa: E501 - - path_params = {} - if 'task_id' in local_var_params: - path_params['taskID'] = local_var_params['task_id'] # noqa: E501 - if 'run_id' in local_var_params: - path_params['runID'] = local_var_params['run_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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/telegraf_plugins_service.py b/frogpilot/third_party/influxdb_client/service/telegraf_plugins_service.py deleted file mode 100644 index 905fdd343..000000000 --- a/frogpilot/third_party/influxdb_client/service/telegraf_plugins_service.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class TelegrafPluginsService(_BaseService): - """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 - """TelegrafPluginsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_telegraf_plugins(self, **kwargs): # noqa: E501,D401,D403 - """List all 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_telegraf_plugins(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :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_telegraf_plugins_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_telegraf_plugins_with_http_info(**kwargs) # noqa: E501 - return data - - def get_telegraf_plugins_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all 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_telegraf_plugins_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :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, path_params, query_params, header_params, body_params = \ - self._get_telegraf_plugins_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegraf/plugins', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='TelegrafPlugins', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_telegraf_plugins_async(self, **kwargs): # noqa: E501,D401,D403 - """List all Telegraf plugins. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :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, path_params, query_params, header_params, body_params = \ - self._get_telegraf_plugins_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegraf/plugins', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='TelegrafPlugins', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_telegraf_plugins_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'type'] # noqa: E501 - self._check_operation_params('get_telegraf_plugins', all_params, local_var_params) - - 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: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/telegrafs_service.py b/frogpilot/third_party/influxdb_client/service/telegrafs_service.py deleted file mode 100644 index 4c3bfe9ee..000000000 --- a/frogpilot/third_party/influxdb_client/service/telegrafs_service.py +++ /dev/null @@ -1,1738 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class TelegrafsService(_BaseService): - """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 - """TelegrafsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_telegrafs_id(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Delete a Telegraf configuration. - - 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(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf configuration 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_with_http_info(telegraf_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_telegrafs_id_with_http_info(telegraf_id, **kwargs) # noqa: E501 - return data - - def delete_telegrafs_id_with_http_info(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Delete a Telegraf configuration. - - 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_with_http_info(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf configuration 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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_telegrafs_id_async(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Delete a Telegraf configuration. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf configuration 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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_telegrafs_id_prepare(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_telegrafs_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_telegrafs_id_labels_id(self, telegraf_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label 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_labels_id(telegraf_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str label_id: The label 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_labels_id_with_http_info(telegraf_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_telegrafs_id_labels_id_with_http_info(telegraf_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_telegrafs_id_labels_id_with_http_info(self, telegraf_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label 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_labels_id_with_http_info(telegraf_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str label_id: The label 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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_labels_id_prepare(telegraf_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_telegrafs_id_labels_id_async(self, telegraf_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a Telegraf config. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str label_id: The label 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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_labels_id_prepare(telegraf_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_telegrafs_id_labels_id_prepare(self, telegraf_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_telegrafs_id_labels_id', all_params, local_var_params) - # 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_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_telegrafs_id_labels_id`") # noqa: E501 - - path_params = {} - if 'telegraf_id' in local_var_params: - path_params['telegrafID'] = local_var_params['telegraf_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_members_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_telegrafs_id_members_id_async(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Remove a member from a Telegraf config. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_members_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_telegrafs_id_members_id_prepare(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'telegraf_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_telegrafs_id_members_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_owners_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_telegrafs_id_owners_id_async(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Remove an owner from a Telegraf config. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._delete_telegrafs_id_owners_id_prepare(user_id, telegraf_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_telegrafs_id_owners_id_prepare(self, user_id, telegraf_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'telegraf_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_telegrafs_id_owners_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_telegrafs(self, **kwargs): # noqa: E501,D401,D403 - """List all Telegraf configurations. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_telegrafs(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: The organization ID the Telegraf config belongs to. - :return: Telegrafs - 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_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_telegrafs_with_http_info(**kwargs) # noqa: E501 - return data - - def get_telegrafs_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all Telegraf configurations. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_telegrafs_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: The organization ID the Telegraf config belongs to. - :return: Telegrafs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Telegrafs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_telegrafs_async(self, **kwargs): # noqa: E501,D401,D403 - """List all Telegraf configurations. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org_id: The organization ID the Telegraf config belongs to. - :return: Telegrafs - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Telegrafs', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_telegrafs_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'org_id'] # noqa: E501 - self._check_operation_params('get_telegrafs', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_telegrafs_id(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a Telegraf configuration. - - 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(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf configuration ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str accept: - :return: str - 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_with_http_info(telegraf_id, **kwargs) # noqa: E501 - else: - (data) = self.get_telegrafs_id_with_http_info(telegraf_id, **kwargs) # noqa: E501 - return data - - def get_telegrafs_id_with_http_info(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a Telegraf configuration. - - 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_with_http_info(telegraf_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf configuration ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str accept: - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_telegrafs_id_async(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a Telegraf configuration. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf configuration ID. (required) - :param str zap_trace_span: OpenTracing span context - :param str accept: - :return: str - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_prepare(telegraf_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='str', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_telegrafs_id_prepare(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'zap_trace_span', 'accept'] # noqa: E501 - self._check_operation_params('get_telegrafs_id', all_params, local_var_params) - # 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`") # noqa: E501 - - 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 - if 'accept' in local_var_params: - header_params['Accept'] = local_var_params['accept'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/toml', 'application/json', 'application/octet-stream']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_telegrafs_id_labels(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all labels 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_labels(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: LabelsResponse - 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_labels_with_http_info(telegraf_id, **kwargs) # noqa: E501 - else: - (data) = self.get_telegrafs_id_labels_with_http_info(telegraf_id, **kwargs) # noqa: E501 - return data - - def get_telegrafs_id_labels_with_http_info(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all labels 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_labels_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: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_labels_prepare(telegraf_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_telegrafs_id_labels_async(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a Telegraf config. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_labels_prepare(telegraf_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_telegrafs_id_labels_prepare(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_telegrafs_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_members_prepare(telegraf_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_telegrafs_id_members_async(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all users with member privileges for a Telegraf config. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_members_prepare(telegraf_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMembers', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_telegrafs_id_members_prepare(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_telegrafs_id_members', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_telegrafs_id_owners(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a Telegraf configuration. - - 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 configuration 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 configuration. - - 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 configuration 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, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_owners_prepare(telegraf_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_telegrafs_id_owners_async(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - """List all owners of a Telegraf configuration. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf configuration 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, path_params, query_params, header_params, body_params = \ - self._get_telegrafs_id_owners_prepare(telegraf_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwners', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_telegrafs_id_owners_prepare(self, telegraf_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_telegrafs_id_owners', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_telegrafs(self, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - """Create a Telegraf configuration. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_telegrafs(telegraf_plugin_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TelegrafPluginRequest telegraf_plugin_request: Telegraf configuration to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Telegraf - 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_with_http_info(telegraf_plugin_request, **kwargs) # noqa: E501 - else: - (data) = self.post_telegrafs_with_http_info(telegraf_plugin_request, **kwargs) # noqa: E501 - return data - - def post_telegrafs_with_http_info(self, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - """Create a Telegraf configuration. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_telegrafs_with_http_info(telegraf_plugin_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TelegrafPluginRequest telegraf_plugin_request: Telegraf configuration to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Telegraf - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_prepare(telegraf_plugin_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Telegraf', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_telegrafs_async(self, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - """Create a Telegraf configuration. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param TelegrafPluginRequest telegraf_plugin_request: Telegraf configuration to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Telegraf - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_prepare(telegraf_plugin_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Telegraf', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_telegrafs_prepare(self, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_plugin_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_telegrafs', all_params, local_var_params) - # verify the required parameter 'telegraf_plugin_request' is set - if ('telegraf_plugin_request' not in local_var_params or - local_var_params['telegraf_plugin_request'] is None): - raise ValueError("Missing the required parameter `telegraf_plugin_request` when calling `post_telegrafs`") # noqa: E501 - - 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 - - body_params = None - if 'telegraf_plugin_request' in local_var_params: - body_params = local_var_params['telegraf_plugin_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_telegrafs_id_labels(self, telegraf_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label 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_labels(telegraf_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_labels_with_http_info(telegraf_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_telegrafs_id_labels_with_http_info(telegraf_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_telegrafs_id_labels_with_http_info(self, telegraf_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label 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_labels_with_http_info(telegraf_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_labels_prepare(telegraf_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_telegrafs_id_labels_async(self, telegraf_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a Telegraf config. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_labels_prepare(telegraf_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_telegrafs_id_labels_prepare(self, telegraf_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_telegrafs_id_labels', all_params, local_var_params) - # 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_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_telegrafs_id_labels`") # noqa: E501 - - 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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - 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, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_members_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_telegrafs_id_members_async(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add a member to a Telegraf config. - - This method makes an asynchronous HTTP request. - - :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, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_members_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/members', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceMember', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_telegrafs_id_members_prepare(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_telegrafs_id_members', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_telegrafs_id_owners(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a Telegraf configuration. - - 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 configuration 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 configuration. - - 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 configuration 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, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_owners_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_telegrafs_id_owners_async(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - """Add an owner to a Telegraf configuration. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf configuration 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, path_params, query_params, header_params, body_params = \ - self._post_telegrafs_id_owners_prepare(telegraf_id, add_resource_member_request_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}/owners', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ResourceOwner', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_telegrafs_id_owners_prepare(self, telegraf_id, add_resource_member_request_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'add_resource_member_request_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_telegrafs_id_owners', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_telegrafs_id(self, telegraf_id, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - """Update a Telegraf configuration. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_telegrafs_id(telegraf_id, telegraf_plugin_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param TelegrafPluginRequest telegraf_plugin_request: Telegraf configuration update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Telegraf - 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.put_telegrafs_id_with_http_info(telegraf_id, telegraf_plugin_request, **kwargs) # noqa: E501 - else: - (data) = self.put_telegrafs_id_with_http_info(telegraf_id, telegraf_plugin_request, **kwargs) # noqa: E501 - return data - - def put_telegrafs_id_with_http_info(self, telegraf_id, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - """Update a Telegraf configuration. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_telegrafs_id_with_http_info(telegraf_id, telegraf_plugin_request, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param TelegrafPluginRequest telegraf_plugin_request: Telegraf configuration update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Telegraf - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_telegrafs_id_prepare(telegraf_id, telegraf_plugin_request, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Telegraf', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_telegrafs_id_async(self, telegraf_id, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - """Update a Telegraf configuration. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str telegraf_id: The Telegraf config ID. (required) - :param TelegrafPluginRequest telegraf_plugin_request: Telegraf configuration update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Telegraf - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_telegrafs_id_prepare(telegraf_id, telegraf_plugin_request, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/telegrafs/{telegrafID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Telegraf', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_telegrafs_id_prepare(self, telegraf_id, telegraf_plugin_request, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['telegraf_id', 'telegraf_plugin_request', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('put_telegrafs_id', all_params, local_var_params) - # 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 `put_telegrafs_id`") # noqa: E501 - # verify the required parameter 'telegraf_plugin_request' is set - if ('telegraf_plugin_request' not in local_var_params or - local_var_params['telegraf_plugin_request'] is None): - raise ValueError("Missing the required parameter `telegraf_plugin_request` when calling `put_telegrafs_id`") # noqa: E501 - - 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 - - body_params = None - if 'telegraf_plugin_request' in local_var_params: - body_params = local_var_params['telegraf_plugin_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/templates_service.py b/frogpilot/third_party/influxdb_client/service/templates_service.py deleted file mode 100644 index 92780a0ca..000000000 --- a/frogpilot/third_party/influxdb_client/service/templates_service.py +++ /dev/null @@ -1,959 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class TemplatesService(_BaseService): - """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 - """TemplatesService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def apply_template(self, template_apply, **kwargs): # noqa: E501,D401,D403 - """Apply or dry-run a template. - - Applies a template to create or update a [stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) of InfluxDB [resources](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/export/all/#resources). The response contains the diff of changes and the stack ID. Use this endpoint to install an InfluxDB template to an organization. Provide template URLs or template objects in your request. To customize which template resources are installed, use the `actions` parameter. By default, when you apply a template, InfluxDB installs the template to create and update stack resources and then generates a diff of the changes. If you pass `dryRun: true` in the request body, InfluxDB validates the template and generates the resource diff, but doesn’t make any changes to your instance. #### Custom values for templates - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. To provide custom values for environment references, pass the _`envRefs`_ property in the request body. For more information and examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). - Some templates may contain queries that use [secrets](https://docs.influxdata.com/influxdb/latest/security/secrets/). To provide custom secret values, pass the _`secrets`_ property in the request body. Don't expose secret values in templates. For more information, see [how to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template). #### Required permissions - `write` permissions for resource types in the template. #### Rate limits (with InfluxDB Cloud) - Adjustable service quotas apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Use templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/) - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.apply_template(template_apply, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TemplateApply template_apply: Parameters for applying templates. (required) - :return: TemplateSummary - 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.apply_template_with_http_info(template_apply, **kwargs) # noqa: E501 - else: - (data) = self.apply_template_with_http_info(template_apply, **kwargs) # noqa: E501 - return data - - def apply_template_with_http_info(self, template_apply, **kwargs): # noqa: E501,D401,D403 - """Apply or dry-run a template. - - Applies a template to create or update a [stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) of InfluxDB [resources](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/export/all/#resources). The response contains the diff of changes and the stack ID. Use this endpoint to install an InfluxDB template to an organization. Provide template URLs or template objects in your request. To customize which template resources are installed, use the `actions` parameter. By default, when you apply a template, InfluxDB installs the template to create and update stack resources and then generates a diff of the changes. If you pass `dryRun: true` in the request body, InfluxDB validates the template and generates the resource diff, but doesn’t make any changes to your instance. #### Custom values for templates - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. To provide custom values for environment references, pass the _`envRefs`_ property in the request body. For more information and examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). - Some templates may contain queries that use [secrets](https://docs.influxdata.com/influxdb/latest/security/secrets/). To provide custom secret values, pass the _`secrets`_ property in the request body. Don't expose secret values in templates. For more information, see [how to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template). #### Required permissions - `write` permissions for resource types in the template. #### Rate limits (with InfluxDB Cloud) - Adjustable service quotas apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Use templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/) - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.apply_template_with_http_info(template_apply, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TemplateApply template_apply: Parameters for applying templates. (required) - :return: TemplateSummary - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._apply_template_prepare(template_apply, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/templates/apply', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='TemplateSummary', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def apply_template_async(self, template_apply, **kwargs): # noqa: E501,D401,D403 - """Apply or dry-run a template. - - Applies a template to create or update a [stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) of InfluxDB [resources](https://docs.influxdata.com/influxdb/latest/reference/cli/influx/export/all/#resources). The response contains the diff of changes and the stack ID. Use this endpoint to install an InfluxDB template to an organization. Provide template URLs or template objects in your request. To customize which template resources are installed, use the `actions` parameter. By default, when you apply a template, InfluxDB installs the template to create and update stack resources and then generates a diff of the changes. If you pass `dryRun: true` in the request body, InfluxDB validates the template and generates the resource diff, but doesn’t make any changes to your instance. #### Custom values for templates - Some templates may contain [environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/create/#include-user-definable-resource-names) for custom metadata. To provide custom values for environment references, pass the _`envRefs`_ property in the request body. For more information and examples, see how to [define environment references](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#define-environment-references). - Some templates may contain queries that use [secrets](https://docs.influxdata.com/influxdb/latest/security/secrets/). To provide custom secret values, pass the _`secrets`_ property in the request body. Don't expose secret values in templates. For more information, see [how to pass secrets when installing a template](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#pass-secrets-when-installing-a-template). #### Required permissions - `write` permissions for resource types in the template. #### Rate limits (with InfluxDB Cloud) - Adjustable service quotas apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Use templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/) - [Stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param TemplateApply template_apply: Parameters for applying templates. (required) - :return: TemplateSummary - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._apply_template_prepare(template_apply, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/templates/apply', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='TemplateSummary', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _apply_template_prepare(self, template_apply, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['template_apply'] # noqa: E501 - self._check_operation_params('apply_template', all_params, local_var_params) - # verify the required parameter 'template_apply' is set - if ('template_apply' not in local_var_params or - local_var_params['template_apply'] is None): - raise ValueError("Missing the required parameter `template_apply` when calling `apply_template`") # noqa: E501 - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'template_apply' in local_var_params: - body_params = local_var_params['template_apply'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'application/x-jsonnet', 'text/yml']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def create_stack(self, **kwargs): # noqa: E501,D401,D403 - """Create a stack. - - Creates or initializes a stack. Use this endpoint to _manually_ initialize a new stack with the following optional information: - Stack name - Stack description - URLs for template manifest files To automatically create a stack when applying templates, use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate). #### Required permissions - `write` permission for the organization #### Related guides - [Initialize an InfluxDB stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/init/). - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_stack(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostStackRequest post_stack_request: - :return: Stack - 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.create_stack_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.create_stack_with_http_info(**kwargs) # noqa: E501 - return data - - def create_stack_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Create a stack. - - Creates or initializes a stack. Use this endpoint to _manually_ initialize a new stack with the following optional information: - Stack name - Stack description - URLs for template manifest files To automatically create a stack when applying templates, use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate). #### Required permissions - `write` permission for the organization #### Related guides - [Initialize an InfluxDB stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/init/). - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_stack_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PostStackRequest post_stack_request: - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_stack_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/stacks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def create_stack_async(self, **kwargs): # noqa: E501,D401,D403 - """Create a stack. - - Creates or initializes a stack. Use this endpoint to _manually_ initialize a new stack with the following optional information: - Stack name - Stack description - URLs for template manifest files To automatically create a stack when applying templates, use the [/api/v2/templates/apply endpoint](#operation/ApplyTemplate). #### Required permissions - `write` permission for the organization #### Related guides - [Initialize an InfluxDB stack](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/init/). - [Use InfluxDB templates](https://docs.influxdata.com/influxdb/latest/influxdb-templates/use/#apply-templates-to-an-influxdb-instance). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param PostStackRequest post_stack_request: - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._create_stack_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/stacks', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _create_stack_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['post_stack_request'] # noqa: E501 - self._check_operation_params('create_stack', all_params, local_var_params) - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'post_stack_request' in local_var_params: - body_params = local_var_params['post_stack_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_stack(self, stack_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Delete a stack and associated resources. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_stack(stack_id, org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :param str org_id: The identifier of the organization. (required) - :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_stack_with_http_info(stack_id, org_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_stack_with_http_info(stack_id, org_id, **kwargs) # noqa: E501 - return data - - def delete_stack_with_http_info(self, stack_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Delete a stack and associated resources. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_stack_with_http_info(stack_id, org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :param str org_id: The identifier of the organization. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_stack_prepare(stack_id, org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/stacks/{stack_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_stack_async(self, stack_id, org_id, **kwargs): # noqa: E501,D401,D403 - """Delete a stack and associated resources. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :param str org_id: The identifier of the organization. (required) - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._delete_stack_prepare(stack_id, org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/stacks/{stack_id}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_stack_prepare(self, stack_id, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['stack_id', 'org_id'] # noqa: E501 - self._check_operation_params('delete_stack', all_params, local_var_params) - # verify the required parameter 'stack_id' is set - if ('stack_id' not in local_var_params or - local_var_params['stack_id'] is None): - raise ValueError("Missing the required parameter `stack_id` when calling `delete_stack`") # 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_stack`") # noqa: E501 - - path_params = {} - if 'stack_id' in local_var_params: - path_params['stack_id'] = local_var_params['stack_id'] # noqa: E501 - - query_params = [] - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def export_template(self, **kwargs): # noqa: E501,D401,D403 - """Export a new template. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export_template(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TemplateExportByID template_export_by_id: Export resources as an InfluxDB template. - :return: list[object] - 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.export_template_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.export_template_with_http_info(**kwargs) # noqa: E501 - return data - - def export_template_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """Export a new template. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.export_template_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param TemplateExportByID template_export_by_id: Export resources as an InfluxDB template. - :return: list[object] - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._export_template_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/templates/export', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='list[object]', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def export_template_async(self, **kwargs): # noqa: E501,D401,D403 - """Export a new template. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param TemplateExportByID template_export_by_id: Export resources as an InfluxDB template. - :return: list[object] - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._export_template_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/templates/export', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='list[object]', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _export_template_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['template_export_by_id'] # noqa: E501 - self._check_operation_params('export_template', all_params, local_var_params) - - path_params = {} - - query_params = [] - - header_params = {} - - body_params = None - if 'template_export_by_id' in local_var_params: - body_params = local_var_params['template_export_by_id'] - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/x-yaml']) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def list_stacks(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List installed stacks. - - Lists installed InfluxDB stacks. To limit stacks in the response, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all installed stacks for the organization. #### Related guides - [View InfluxDB stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_stacks(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: An organization ID. Only returns stacks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). #### InfluxDB Cloud - Doesn't require this parameter; InfluxDB only returns resources allowed by the API token. (required) - :param str name: A stack name. Finds stack `events` with this name and returns the stacks. Repeatable. To filter for more than one stack name, repeat this parameter with each name--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1` - :param str stack_id: A stack ID. Only returns the specified stack. Repeatable. To filter for more than one stack ID, repeat this parameter with each ID--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000` - :return: ListStacksResponse - 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.list_stacks_with_http_info(org_id, **kwargs) # noqa: E501 - else: - (data) = self.list_stacks_with_http_info(org_id, **kwargs) # noqa: E501 - return data - - def list_stacks_with_http_info(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List installed stacks. - - Lists installed InfluxDB stacks. To limit stacks in the response, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all installed stacks for the organization. #### Related guides - [View InfluxDB stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/). - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_stacks_with_http_info(org_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org_id: An organization ID. Only returns stacks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). #### InfluxDB Cloud - Doesn't require this parameter; InfluxDB only returns resources allowed by the API token. (required) - :param str name: A stack name. Finds stack `events` with this name and returns the stacks. Repeatable. To filter for more than one stack name, repeat this parameter with each name--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1` - :param str stack_id: A stack ID. Only returns the specified stack. Repeatable. To filter for more than one stack ID, repeat this parameter with each ID--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000` - :return: ListStacksResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._list_stacks_prepare(org_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/stacks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ListStacksResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def list_stacks_async(self, org_id, **kwargs): # noqa: E501,D401,D403 - """List installed stacks. - - Lists installed InfluxDB stacks. To limit stacks in the response, pass query parameters in your request. If no query parameters are passed, InfluxDB returns all installed stacks for the organization. #### Related guides - [View InfluxDB stacks](https://docs.influxdata.com/influxdb/latest/influxdb-templates/stacks/). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org_id: An organization ID. Only returns stacks owned by the specified [organization](https://docs.influxdata.com/influxdb/latest/reference/glossary/#organization). #### InfluxDB Cloud - Doesn't require this parameter; InfluxDB only returns resources allowed by the API token. (required) - :param str name: A stack name. Finds stack `events` with this name and returns the stacks. Repeatable. To filter for more than one stack name, repeat this parameter with each name--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&name=project-stack-0&name=project-stack-1` - :param str stack_id: A stack ID. Only returns the specified stack. Repeatable. To filter for more than one stack ID, repeat this parameter with each ID--for example: - `INFLUX_URL/api/v2/stacks?&orgID=INFLUX_ORG_ID&stackID=09bd87cd33be3000&stackID=09bef35081fe3000` - :return: ListStacksResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._list_stacks_prepare(org_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/stacks', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='ListStacksResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _list_stacks_prepare(self, org_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org_id', 'name', 'stack_id'] # noqa: E501 - self._check_operation_params('list_stacks', all_params, local_var_params) - # 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 `list_stacks`") # noqa: E501 - - path_params = {} - - query_params = [] - if 'org_id' in local_var_params: - 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 'stack_id' in local_var_params: - query_params.append(('stackID', local_var_params['stack_id'])) # noqa: E501 - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def read_stack(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a stack. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_stack(stack_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :return: Stack - 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.read_stack_with_http_info(stack_id, **kwargs) # noqa: E501 - else: - (data) = self.read_stack_with_http_info(stack_id, **kwargs) # noqa: E501 - return data - - def read_stack_with_http_info(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a stack. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.read_stack_with_http_info(stack_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._read_stack_prepare(stack_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/stacks/{stack_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def read_stack_async(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a stack. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._read_stack_prepare(stack_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/stacks/{stack_id}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _read_stack_prepare(self, stack_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['stack_id'] # noqa: E501 - self._check_operation_params('read_stack', all_params, local_var_params) - # verify the required parameter 'stack_id' is set - if ('stack_id' not in local_var_params or - local_var_params['stack_id'] is None): - raise ValueError("Missing the required parameter `stack_id` when calling `read_stack`") # noqa: E501 - - path_params = {} - if 'stack_id' in local_var_params: - path_params['stack_id'] = local_var_params['stack_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def uninstall_stack(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Uninstall a stack. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.uninstall_stack(stack_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :return: Stack - 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.uninstall_stack_with_http_info(stack_id, **kwargs) # noqa: E501 - else: - (data) = self.uninstall_stack_with_http_info(stack_id, **kwargs) # noqa: E501 - return data - - def uninstall_stack_with_http_info(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Uninstall a stack. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.uninstall_stack_with_http_info(stack_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._uninstall_stack_prepare(stack_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/stacks/{stack_id}/uninstall', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def uninstall_stack_async(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Uninstall a stack. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._uninstall_stack_prepare(stack_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/stacks/{stack_id}/uninstall', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _uninstall_stack_prepare(self, stack_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['stack_id'] # noqa: E501 - self._check_operation_params('uninstall_stack', all_params, local_var_params) - # verify the required parameter 'stack_id' is set - if ('stack_id' not in local_var_params or - local_var_params['stack_id'] is None): - raise ValueError("Missing the required parameter `stack_id` when calling `uninstall_stack`") # noqa: E501 - - path_params = {} - if 'stack_id' in local_var_params: - path_params['stack_id'] = local_var_params['stack_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def update_stack(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Update a stack. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_stack(stack_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :param PatchStackRequest patch_stack_request: - :return: Stack - 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.update_stack_with_http_info(stack_id, **kwargs) # noqa: E501 - else: - (data) = self.update_stack_with_http_info(stack_id, **kwargs) # noqa: E501 - return data - - def update_stack_with_http_info(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Update a stack. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_stack_with_http_info(stack_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :param PatchStackRequest patch_stack_request: - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._update_stack_prepare(stack_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/stacks/{stack_id}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def update_stack_async(self, stack_id, **kwargs): # noqa: E501,D401,D403 - """Update a stack. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str stack_id: The identifier of the stack. (required) - :param PatchStackRequest patch_stack_request: - :return: Stack - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._update_stack_prepare(stack_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/stacks/{stack_id}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Stack', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _update_stack_prepare(self, stack_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['stack_id', 'patch_stack_request'] # noqa: E501 - self._check_operation_params('update_stack', all_params, local_var_params) - # verify the required parameter 'stack_id' is set - if ('stack_id' not in local_var_params or - local_var_params['stack_id'] is None): - raise ValueError("Missing the required parameter `stack_id` when calling `update_stack`") # noqa: E501 - - path_params = {} - if 'stack_id' in local_var_params: - path_params['stack_id'] = local_var_params['stack_id'] # noqa: E501 - - query_params = [] - - header_params = {} - - body_params = None - if 'patch_stack_request' in local_var_params: - body_params = local_var_params['patch_stack_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/users_service.py b/frogpilot/third_party/influxdb_client/service/users_service.py deleted file mode 100644 index b53232446..000000000 --- a/frogpilot/third_party/influxdb_client/service/users_service.py +++ /dev/null @@ -1,1168 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class UsersService(_BaseService): - """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 - """UsersService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Delete a user. - - Deletes a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Delete a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to delete. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) - 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: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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. - - Deletes a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Delete a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to delete. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) - 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: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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, path_params, query_params, header_params, body_params = \ - self._delete_users_id_prepare(user_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_users_id_async(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Delete a user. - - Deletes a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Delete a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to delete. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#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, path_params, query_params, header_params, body_params = \ - self._delete_users_id_prepare(user_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/users/{userID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_users_id_prepare(self, user_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_users_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_me(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve 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.get_me(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :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.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 - """Retrieve 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.get_me_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_me_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/me', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_me_async(self, **kwargs): # noqa: E501,D401,D403 - """Retrieve the currently authenticated user. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_me_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/me', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_me_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span'] # noqa: E501 - self._check_operation_params('get_me', all_params, local_var_params) - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_users(self, **kwargs): # noqa: E501,D401,D403 - """List users. - - Lists [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions for InfluxDB OSS | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | List all users | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | | List a specific user | `read-users` or `read-user USER_ID` | | *`USER_ID`* is the ID of the user that you want to retrieve. #### Related guides - [View users](https://docs.influxdata.com/influxdb/latest/users/view-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 - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param str name: A user name. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str id: A user ID. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :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 users. - - Lists [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions for InfluxDB OSS | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | List all users | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | | List a specific user | `read-users` or `read-user USER_ID` | | *`USER_ID`* is the ID of the user that you want to retrieve. #### Related guides - [View users](https://docs.influxdata.com/influxdb/latest/users/view-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 - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param str name: A user name. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str id: A user ID. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :return: Users - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Users', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_users_async(self, **kwargs): # noqa: E501,D401,D403 - """List users. - - Lists [users](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). Default limit is `20`. To limit which users are returned, pass query parameters in your request. #### Required permissions for InfluxDB OSS | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | List all users | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | | List a specific user | `read-users` or `read-user USER_ID` | | *`USER_ID`* is the ID of the user that you want to retrieve. #### Related guides - [View users](https://docs.influxdata.com/influxdb/latest/users/view-users/). - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param int offset: The offset for pagination. The number of records to skip. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param int limit: Limits the number of records returned. Default is `20`. - :param str after: A resource ID to seek from. Returns records created after the specified record; results don't include the specified record. Use `after` instead of the `offset` parameter. For more information about pagination parameters, see [Pagination](https://docs.influxdata.com/influxdb/latest/api/#tag/Pagination). - :param str name: A user name. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :param str id: A user ID. Only lists the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). - :return: Users - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/users', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Users', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_users_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'offset', 'limit', 'after', 'name', 'id'] # noqa: E501 - self._check_operation_params('get_users', all_params, local_var_params) - - 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 - 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 '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: - header_params['Zap-Trace-Span'] = local_var_params['zap_trace_span'] # noqa: E501 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_users_id(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a user. - - Retrieves a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/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_id(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: A user ID. Retrieves the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). (required) - :param str zap_trace_span: OpenTracing span context - :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.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. - - Retrieves a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/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_id_with_http_info(user_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: A user ID. Retrieves the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). (required) - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_id_prepare(user_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users/{userID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_users_id_async(self, user_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a user. - - Retrieves a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: A user ID. Retrieves the specified [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). (required) - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_users_id_prepare(user_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/users/{userID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_users_id_prepare(self, user_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_users_id', all_params, local_var_params) - # 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 - - 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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_users_id(self, user_id, user, **kwargs): # noqa: E501,D401,D403 - """Update a user. - - Updates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) and returns the user. #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Update a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to update. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) - 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: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to update. (required) - :param User user: In the request body, provide the user properties to update. (required) - :param str zap_trace_span: OpenTracing span context - :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.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. - - Updates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) and returns the user. #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Update a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to update. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) - 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: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to update. (required) - :param User user: In the request body, provide the user properties to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_users_id_prepare(user_id, user, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users/{userID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_users_id_async(self, user_id, user, **kwargs): # noqa: E501,D401,D403 - """Update a user. - - Updates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) and returns the user. #### Required permissions | Action | Permission required | |:------------|:-----------------------------------------------| | Update a user | `write-users` or `write-user USER_ID` | *`USER_ID`* is the ID of the user that you want to update. #### Related guides - [Manage users](https://docs.influxdata.com/influxdb/latest/organizations/users/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: A user ID. Specifies the [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) to update. (required) - :param User user: In the request body, provide the user properties to update. (required) - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_users_id_prepare(user_id, user, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/users/{userID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_users_id_prepare(self, user_id, user, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'user', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_users_id', all_params, local_var_params) - # 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 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_users(self, user, **kwargs): # noqa: E501,D401,D403 - """Create a user. - - Creates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that can access InfluxDB. Returns the user. Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces: - InfluxDB UI - `/api/v2/signin` InfluxDB API endpoint - InfluxDB CLI This endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization: 1. Create a user: send a `POST` request to `POST /api/v2/users`. The `name` property is required. 2. Extract the user ID (`id` property) value from the API response for _step 1_. 3. Create an authorization (and API token) for the user: send a `POST` request to [`POST /api/v2/authorizations`](#operation/PostAuthorizations), passing the user ID (`id`) from _step 2_. 4. Create a password for the user: send a `POST` request to [`POST /api/v2/users/USER_ID/password`](#operation/PostUsersIDPassword), passing the user ID from _step 2_. #### Required permissions | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | Create a user | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | #### Related guides - [Create a user](https://docs.influxdata.com/influxdb/latest/users/create-user/) - [Create an API token scoped to a user](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_users(user, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param User user: The user to create. (required) - :param str zap_trace_span: OpenTracing span context - :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.post_users_with_http_info(user, **kwargs) # noqa: E501 - else: - (data) = self.post_users_with_http_info(user, **kwargs) # noqa: E501 - return data - - def post_users_with_http_info(self, user, **kwargs): # noqa: E501,D401,D403 - """Create a user. - - Creates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that can access InfluxDB. Returns the user. Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces: - InfluxDB UI - `/api/v2/signin` InfluxDB API endpoint - InfluxDB CLI This endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization: 1. Create a user: send a `POST` request to `POST /api/v2/users`. The `name` property is required. 2. Extract the user ID (`id` property) value from the API response for _step 1_. 3. Create an authorization (and API token) for the user: send a `POST` request to [`POST /api/v2/authorizations`](#operation/PostAuthorizations), passing the user ID (`id`) from _step 2_. 4. Create a password for the user: send a `POST` request to [`POST /api/v2/users/USER_ID/password`](#operation/PostUsersIDPassword), passing the user ID from _step 2_. #### Required permissions | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | Create a user | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | #### Related guides - [Create a user](https://docs.influxdata.com/influxdb/latest/users/create-user/) - [Create an API token scoped to a user](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_users_with_http_info(user, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param User user: The user to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_users_prepare(user, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_users_async(self, user, **kwargs): # noqa: E501,D401,D403 - """Create a user. - - Creates a [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user) that can access InfluxDB. Returns the user. Use this endpoint to create a user that can sign in to start a user session through one of the following interfaces: - InfluxDB UI - `/api/v2/signin` InfluxDB API endpoint - InfluxDB CLI This endpoint represents the first two steps in a four-step process to allow a user to authenticate with a username and password, and then access data in an organization: 1. Create a user: send a `POST` request to `POST /api/v2/users`. The `name` property is required. 2. Extract the user ID (`id` property) value from the API response for _step 1_. 3. Create an authorization (and API token) for the user: send a `POST` request to [`POST /api/v2/authorizations`](#operation/PostAuthorizations), passing the user ID (`id`) from _step 2_. 4. Create a password for the user: send a `POST` request to [`POST /api/v2/users/USER_ID/password`](#operation/PostUsersIDPassword), passing the user ID from _step 2_. #### Required permissions | Action | Permission required | Restriction | |:-------|:--------------------|:------------| | Create a user | _[Operator token](https://docs.influxdata.com/influxdb/latest/security/tokens/#operator-token)_ | | #### Related guides - [Create a user](https://docs.influxdata.com/influxdb/latest/users/create-user/) - [Create an API token scoped to a user](https://docs.influxdata.com/influxdb/latest/security/tokens/create-token/#create-a-token-scoped-to-a-user) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param User user: The user to create. (required) - :param str zap_trace_span: OpenTracing span context - :return: UserResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_users_prepare(user, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/users', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='UserResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_users_prepare(self, user, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_users', all_params, local_var_params) - # 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 `post_users`") # noqa: E501 - - 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 - - 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates a user password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_users_id_password(user_id, password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to set the password for. (required) - :param PasswordResetBody password_reset_body: The new password to set for the user. (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.post_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 - else: - (data) = self.post_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 - return data - - def post_users_id_password_with_http_info(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates a user password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_users_id_password_with_http_info(user_id, password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to set the password for. (required) - :param PasswordResetBody password_reset_body: The new password to set for the user. (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, path_params, query_params, header_params, body_params = \ - self._post_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users/{userID}/password', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_users_id_password_async(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates a user password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: The ID of the user to set the password for. (required) - :param PasswordResetBody password_reset_body: The new password to set for the user. (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, path_params, query_params, header_params, body_params = \ - self._post_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/users/{userID}/password', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_users_id_password_prepare(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'password_reset_body', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_users_id_password', all_params, local_var_params) - # 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 `post_users_id_password`") # noqa: E501 - # verify the required parameter 'password_reset_body' is set - if ('password_reset_body' not in local_var_params or - local_var_params['password_reset_body'] is None): - raise ValueError("Missing the required parameter `password_reset_body` when calling `post_users_id_password`") # noqa: E501 - - 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 - - body_params = None - if 'password_reset_body' in local_var_params: - body_params = local_var_params['password_reset_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_me_password(self, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates the password for the signed-in [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). This endpoint represents the third step in the following three-step process to let a user with a user session update their password: 1. Pass the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. From the response in the first step, extract the session cookie (`Set-Cookie`) header. 3. Pass the following in a request to the `PUT /api/v2/me/password` endpoint: - The `Set-Cookie` header from the second step - The `Authorization Basic` header with the user's _Basic authentication_ credentials - `{"password": "NEW_PASSWORD"}` in the request body #### InfluxDB Cloud - Doesn't let you manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update your password. #### Related endpoints - [Signin](#tag/Signin) - [Signout](#tag/Signout) - [Users](#tag/Users) #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_me_password(password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PasswordResetBody password_reset_body: The new password. (required) - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :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.put_me_password_with_http_info(password_reset_body, **kwargs) # noqa: E501 - else: - (data) = self.put_me_password_with_http_info(password_reset_body, **kwargs) # noqa: E501 - return data - - def put_me_password_with_http_info(self, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates the password for the signed-in [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). This endpoint represents the third step in the following three-step process to let a user with a user session update their password: 1. Pass the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. From the response in the first step, extract the session cookie (`Set-Cookie`) header. 3. Pass the following in a request to the `PUT /api/v2/me/password` endpoint: - The `Set-Cookie` header from the second step - The `Authorization Basic` header with the user's _Basic authentication_ credentials - `{"password": "NEW_PASSWORD"}` in the request body #### InfluxDB Cloud - Doesn't let you manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update your password. #### Related endpoints - [Signin](#tag/Signin) - [Signout](#tag/Signout) - [Users](#tag/Users) #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_me_password_with_http_info(password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param PasswordResetBody password_reset_body: The new password. (required) - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_me_password_prepare(password_reset_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/me/password', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - auth_settings=['BasicAuthentication'], - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_me_password_async(self, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates the password for the signed-in [user](https://docs.influxdata.com/influxdb/latest/reference/glossary/#user). This endpoint represents the third step in the following three-step process to let a user with a user session update their password: 1. Pass the user's [Basic authentication credentials](#section/Authentication/BasicAuthentication) to the `POST /api/v2/signin` endpoint to create a user session and generate a session cookie. 2. From the response in the first step, extract the session cookie (`Set-Cookie`) header. 3. Pass the following in a request to the `PUT /api/v2/me/password` endpoint: - The `Set-Cookie` header from the second step - The `Authorization Basic` header with the user's _Basic authentication_ credentials - `{"password": "NEW_PASSWORD"}` in the request body #### InfluxDB Cloud - Doesn't let you manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update your password. #### Related endpoints - [Signin](#tag/Signin) - [Signout](#tag/Signout) - [Users](#tag/Users) #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param PasswordResetBody password_reset_body: The new password. (required) - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_me_password_prepare(password_reset_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/me/password', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - auth_settings=['BasicAuthentication'], - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_me_password_prepare(self, password_reset_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['password_reset_body', 'zap_trace_span', 'authorization'] # noqa: E501 - self._check_operation_params('put_me_password', all_params, local_var_params) - # verify the required parameter 'password_reset_body' is set - if ('password_reset_body' not in local_var_params or - local_var_params['password_reset_body'] is None): - raise ValueError("Missing the required parameter `password_reset_body` when calling `put_me_password`") # noqa: E501 - - 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 - if 'authorization' in local_var_params: - header_params['Authorization'] = local_var_params['authorization'] # noqa: E501 - - body_params = None - if 'password_reset_body' in local_var_params: - body_params = local_var_params['password_reset_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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_users_id_password(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates a user password. Use this endpoint to let a user authenticate with [Basic authentication credentials](#section/Authentication/BasicAuthentication) and set a new password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_users_id_password(user_id, password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to set the password for. (required) - :param PasswordResetBody password_reset_body: The new password to set for the user. (required) - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :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.put_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 - else: - (data) = self.put_users_id_password_with_http_info(user_id, password_reset_body, **kwargs) # noqa: E501 - return data - - def put_users_id_password_with_http_info(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates a user password. Use this endpoint to let a user authenticate with [Basic authentication credentials](#section/Authentication/BasicAuthentication) and set a new password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_users_id_password_with_http_info(user_id, password_reset_body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str user_id: The ID of the user to set the password for. (required) - :param PasswordResetBody password_reset_body: The new password to set for the user. (required) - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/users/{userID}/password', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - auth_settings=['BasicAuthentication'], - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_users_id_password_async(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - """Update a password. - - Updates a user password. Use this endpoint to let a user authenticate with [Basic authentication credentials](#section/Authentication/BasicAuthentication) and set a new password. #### InfluxDB Cloud - Doesn't allow you to manage user passwords through the API. Use the InfluxDB Cloud user interface (UI) to update a password. #### Related guides - [InfluxDB Cloud - Change your password](https://docs.influxdata.com/influxdb/cloud/account-management/change-password/) - [InfluxDB OSS - Change your password](https://docs.influxdata.com/influxdb/latest/users/change-password/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str user_id: The ID of the user to set the password for. (required) - :param PasswordResetBody password_reset_body: The new password to set for the user. (required) - :param str zap_trace_span: OpenTracing span context - :param str authorization: An auth credential for the Basic scheme - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_users_id_password_prepare(user_id, password_reset_body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/users/{userID}/password', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - auth_settings=['BasicAuthentication'], - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_users_id_password_prepare(self, user_id, password_reset_body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['user_id', 'password_reset_body', 'zap_trace_span', 'authorization'] # noqa: E501 - self._check_operation_params('put_users_id_password', all_params, local_var_params) - # 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 `put_users_id_password`") # noqa: E501 - # verify the required parameter 'password_reset_body' is set - if ('password_reset_body' not in local_var_params or - local_var_params['password_reset_body'] is None): - raise ValueError("Missing the required parameter `password_reset_body` when calling `put_users_id_password`") # noqa: E501 - - 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 - if 'authorization' in local_var_params: - header_params['Authorization'] = local_var_params['authorization'] # noqa: E501 - - body_params = None - if 'password_reset_body' in local_var_params: - body_params = local_var_params['password_reset_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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/variables_service.py b/frogpilot/third_party/influxdb_client/service/variables_service.py deleted file mode 100644 index 143bd7cc6..000000000 --- a/frogpilot/third_party/influxdb_client/service/variables_service.py +++ /dev/null @@ -1,1127 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class VariablesService(_BaseService): - """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 - """VariablesService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def delete_variables_id(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """Delete a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_variables_id(variable_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable 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_variables_id_with_http_info(variable_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_variables_id_with_http_info(variable_id, **kwargs) # noqa: E501 - return data - - def delete_variables_id_with_http_info(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """Delete a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_variables_id_with_http_info(variable_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable 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, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_prepare(variable_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables/{variableID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_variables_id_async(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """Delete a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str variable_id: The variable 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, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_prepare(variable_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables/{variableID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_variables_id_prepare(self, variable_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_variables_id', all_params, local_var_params) - # verify the required parameter 'variable_id' is set - if ('variable_id' not in local_var_params or - local_var_params['variable_id'] is None): - raise ValueError("Missing the required parameter `variable_id` when calling `delete_variables_id`") # noqa: E501 - - path_params = {} - if 'variable_id' in local_var_params: - path_params['variableID'] = local_var_params['variable_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def delete_variables_id_labels_id(self, variable_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_variables_id_labels_id(variable_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str label_id: The label ID 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_variables_id_labels_id_with_http_info(variable_id, label_id, **kwargs) # noqa: E501 - else: - (data) = self.delete_variables_id_labels_id_with_http_info(variable_id, label_id, **kwargs) # noqa: E501 - return data - - def delete_variables_id_labels_id_with_http_info(self, variable_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_variables_id_labels_id_with_http_info(variable_id, label_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str label_id: The label ID 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, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_labels_id_prepare(variable_id, label_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables/{variableID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def delete_variables_id_labels_id_async(self, variable_id, label_id, **kwargs): # noqa: E501,D401,D403 - """Delete a label from a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str label_id: The label ID 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, path_params, query_params, header_params, body_params = \ - self._delete_variables_id_labels_id_prepare(variable_id, label_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables/{variableID}/labels/{labelID}', 'DELETE', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _delete_variables_id_labels_id_prepare(self, variable_id, label_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable_id', 'label_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('delete_variables_id_labels_id', all_params, local_var_params) - # verify the required parameter 'variable_id' is set - if ('variable_id' not in local_var_params or - local_var_params['variable_id'] is None): - raise ValueError("Missing the required parameter `variable_id` when calling `delete_variables_id_labels_id`") # noqa: E501 - # verify the required parameter 'label_id' is set - if ('label_id' not in local_var_params or - local_var_params['label_id'] is None): - raise ValueError("Missing the required parameter `label_id` when calling `delete_variables_id_labels_id`") # noqa: E501 - - path_params = {} - if 'variable_id' in local_var_params: - path_params['variableID'] = local_var_params['variable_id'] # noqa: E501 - if 'label_id' in local_var_params: - path_params['labelID'] = local_var_params['label_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_variables(self, **kwargs): # noqa: E501,D401,D403 - """List all variables. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_variables(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :param str org_id: The organization ID. - :return: Variables - 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_variables_with_http_info(**kwargs) # noqa: E501 - else: - (data) = self.get_variables_with_http_info(**kwargs) # noqa: E501 - return data - - def get_variables_with_http_info(self, **kwargs): # noqa: E501,D401,D403 - """List all variables. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_variables_with_http_info(async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :param str org_id: The organization ID. - :return: Variables - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_prepare(**kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variables', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_variables_async(self, **kwargs): # noqa: E501,D401,D403 - """List all variables. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str zap_trace_span: OpenTracing span context - :param str org: The name of the organization. - :param str org_id: The organization ID. - :return: Variables - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_prepare(**kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variables', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_variables_prepare(self, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['zap_trace_span', 'org', 'org_id'] # noqa: E501 - self._check_operation_params('get_variables', all_params, local_var_params) - - path_params = {} - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_variables_id(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_variables_id(variable_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - 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_variables_id_with_http_info(variable_id, **kwargs) # noqa: E501 - else: - (data) = self.get_variables_id_with_http_info(variable_id, **kwargs) # noqa: E501 - return data - - def get_variables_id_with_http_info(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_variables_id_with_http_info(variable_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_prepare(variable_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables/{variableID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_variables_id_async(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_prepare(variable_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables/{variableID}', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_variables_id_prepare(self, variable_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_variables_id', all_params, local_var_params) - # verify the required parameter 'variable_id' is set - if ('variable_id' not in local_var_params or - local_var_params['variable_id'] is None): - raise ValueError("Missing the required parameter `variable_id` when calling `get_variables_id`") # noqa: E501 - - path_params = {} - if 'variable_id' in local_var_params: - path_params['variableID'] = local_var_params['variable_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def get_variables_id_labels(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_variables_id_labels(variable_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - 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_variables_id_labels_with_http_info(variable_id, **kwargs) # noqa: E501 - else: - (data) = self.get_variables_id_labels_with_http_info(variable_id, **kwargs) # noqa: E501 - return data - - def get_variables_id_labels_with_http_info(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.get_variables_id_labels_with_http_info(variable_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_labels_prepare(variable_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables/{variableID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_variables_id_labels_async(self, variable_id, **kwargs): # noqa: E501,D401,D403 - """List all labels for a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelsResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_variables_id_labels_prepare(variable_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables/{variableID}/labels', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelsResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_variables_id_labels_prepare(self, variable_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_variables_id_labels', all_params, local_var_params) - # verify the required parameter 'variable_id' is set - if ('variable_id' not in local_var_params or - local_var_params['variable_id'] is None): - raise ValueError("Missing the required parameter `variable_id` when calling `get_variables_id_labels`") # noqa: E501 - - path_params = {} - if 'variable_id' in local_var_params: - path_params['variableID'] = local_var_params['variable_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_variables_id(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - """Update a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_variables_id(variable_id, variable, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param Variable variable: Variable update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - 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_variables_id_with_http_info(variable_id, variable, **kwargs) # noqa: E501 - else: - (data) = self.patch_variables_id_with_http_info(variable_id, variable, **kwargs) # noqa: E501 - return data - - def patch_variables_id_with_http_info(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - """Update a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.patch_variables_id_with_http_info(variable_id, variable, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param Variable variable: Variable update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables/{variableID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_variables_id_async(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - """Update a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param Variable variable: Variable update to apply (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables/{variableID}', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_variables_id_prepare(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable_id', 'variable', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_variables_id', all_params, local_var_params) - # verify the required parameter 'variable_id' is set - if ('variable_id' not in local_var_params or - local_var_params['variable_id'] is None): - raise ValueError("Missing the required parameter `variable_id` when calling `patch_variables_id`") # noqa: E501 - # verify the required parameter 'variable' is set - if ('variable' not in local_var_params or - local_var_params['variable'] is None): - raise ValueError("Missing the required parameter `variable` when calling `patch_variables_id`") # noqa: E501 - - path_params = {} - if 'variable_id' in local_var_params: - path_params['variableID'] = local_var_params['variable_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 - - body_params = None - if 'variable' in local_var_params: - body_params = local_var_params['variable'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_variables(self, variable, **kwargs): # noqa: E501,D401,D403 - """Create a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_variables(variable, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Variable variable: Variable to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - 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_variables_with_http_info(variable, **kwargs) # noqa: E501 - else: - (data) = self.post_variables_with_http_info(variable, **kwargs) # noqa: E501 - return data - - def post_variables_with_http_info(self, variable, **kwargs): # noqa: E501,D401,D403 - """Create a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_variables_with_http_info(variable, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param Variable variable: Variable to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_prepare(variable, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_variables_async(self, variable, **kwargs): # noqa: E501,D401,D403 - """Create a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param Variable variable: Variable to create (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_prepare(variable, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_variables_prepare(self, variable, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_variables', all_params, local_var_params) - # verify the required parameter 'variable' is set - if ('variable' not in local_var_params or - local_var_params['variable'] is None): - raise ValueError("Missing the required parameter `variable` when calling `post_variables`") # noqa: E501 - - 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 - - body_params = None - if 'variable' in local_var_params: - body_params = local_var_params['variable'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def post_variables_id_labels(self, variable_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_variables_id_labels(variable_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - 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_variables_id_labels_with_http_info(variable_id, label_mapping, **kwargs) # noqa: E501 - else: - (data) = self.post_variables_id_labels_with_http_info(variable_id, label_mapping, **kwargs) # noqa: E501 - return data - - def post_variables_id_labels_with_http_info(self, variable_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_variables_id_labels_with_http_info(variable_id, label_mapping, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_id_labels_prepare(variable_id, label_mapping, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables/{variableID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_variables_id_labels_async(self, variable_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - """Add a label to a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param LabelMapping label_mapping: Label to add (required) - :param str zap_trace_span: OpenTracing span context - :return: LabelResponse - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_variables_id_labels_prepare(variable_id, label_mapping, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables/{variableID}/labels', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='LabelResponse', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_variables_id_labels_prepare(self, variable_id, label_mapping, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable_id', 'label_mapping', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('post_variables_id_labels', all_params, local_var_params) - # verify the required parameter 'variable_id' is set - if ('variable_id' not in local_var_params or - local_var_params['variable_id'] is None): - raise ValueError("Missing the required parameter `variable_id` when calling `post_variables_id_labels`") # noqa: E501 - # verify the required parameter 'label_mapping' is set - if ('label_mapping' not in local_var_params or - local_var_params['label_mapping'] is None): - raise ValueError("Missing the required parameter `label_mapping` when calling `post_variables_id_labels`") # noqa: E501 - - path_params = {} - if 'variable_id' in local_var_params: - path_params['variableID'] = local_var_params['variable_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 - - body_params = None - if 'label_mapping' in local_var_params: - body_params = local_var_params['label_mapping'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params - - def put_variables_id(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - """Replace a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_variables_id(variable_id, variable, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param Variable variable: Variable to replace (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - 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.put_variables_id_with_http_info(variable_id, variable, **kwargs) # noqa: E501 - else: - (data) = self.put_variables_id_with_http_info(variable_id, variable, **kwargs) # noqa: E501 - return data - - def put_variables_id_with_http_info(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - """Replace a variable. - - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.put_variables_id_with_http_info(variable_id, variable, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param Variable variable: Variable to replace (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/variables/{variableID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def put_variables_id_async(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - """Replace a variable. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str variable_id: The variable ID. (required) - :param Variable variable: Variable to replace (required) - :param str zap_trace_span: OpenTracing span context - :return: Variable - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._put_variables_id_prepare(variable_id, variable, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/variables/{variableID}', 'PUT', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='Variable', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _put_variables_id_prepare(self, variable_id, variable, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['variable_id', 'variable', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('put_variables_id', all_params, local_var_params) - # verify the required parameter 'variable_id' is set - if ('variable_id' not in local_var_params or - local_var_params['variable_id'] is None): - raise ValueError("Missing the required parameter `variable_id` when calling `put_variables_id`") # noqa: E501 - # verify the required parameter 'variable' is set - if ('variable' not in local_var_params or - local_var_params['variable'] is None): - raise ValueError("Missing the required parameter `variable` when calling `put_variables_id`") # noqa: E501 - - path_params = {} - if 'variable_id' in local_var_params: - path_params['variableID'] = local_var_params['variable_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 - - body_params = None - if 'variable' in local_var_params: - body_params = local_var_params['variable'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/views_service.py b/frogpilot/third_party/influxdb_client/service/views_service.py deleted file mode 100644 index 203f6c640..000000000 --- a/frogpilot/third_party/influxdb_client/service/views_service.py +++ /dev/null @@ -1,293 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class ViewsService(_BaseService): - """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 - """ViewsService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def get_dashboards_id_cells_id_view(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - 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_cells_id_view(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - 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_cells_id_view_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - else: - (data) = self.get_dashboards_id_cells_id_view_with_http_info(dashboard_id, cell_id, **kwargs) # noqa: E501 - return data - - def get_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - 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_cells_id_view_with_http_info(dashboard_id, cell_id, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def get_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - """Retrieve the view for a cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The dashboard ID. (required) - :param str cell_id: The cell ID. (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._get_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'GET', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _get_dashboards_id_cells_id_view_prepare(self, dashboard_id, cell_id, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('get_dashboards_id_cells_id_view', all_params, local_var_params) - # 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_cells_id_view`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `get_dashboards_id_cells_id_view`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - # HTTP header `Accept` - header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params - - def patch_dashboards_id_cells_id_view(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - 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_cells_id_view(dashboard_id, cell_id, view, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - 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_cells_id_view_with_http_info(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - else: - (data) = self.patch_dashboards_id_cells_id_view_with_http_info(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - return data - - def patch_dashboards_id_cells_id_view_with_http_info(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - 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_cells_id_view_with_http_info(dashboard_id, cell_id, view, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def patch_dashboards_id_cells_id_view_async(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - """Update the view for a cell. - - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str dashboard_id: The ID of the dashboard to update. (required) - :param str cell_id: The ID of the cell to update. (required) - :param View view: (required) - :param str zap_trace_span: OpenTracing span context - :return: View - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._patch_dashboards_id_cells_id_view_prepare(dashboard_id, cell_id, view, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/dashboards/{dashboardID}/cells/{cellID}/view', 'PATCH', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type='View', # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _patch_dashboards_id_cells_id_view_prepare(self, dashboard_id, cell_id, view, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['dashboard_id', 'cell_id', 'view', 'zap_trace_span'] # noqa: E501 - self._check_operation_params('patch_dashboards_id_cells_id_view', all_params, local_var_params) - # 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 `patch_dashboards_id_cells_id_view`") # noqa: E501 - # verify the required parameter 'cell_id' is set - if ('cell_id' not in local_var_params or - local_var_params['cell_id'] is None): - raise ValueError("Missing the required parameter `cell_id` when calling `patch_dashboards_id_cells_id_view`") # noqa: E501 - # verify the required parameter 'view' is set - if ('view' not in local_var_params or - local_var_params['view'] is None): - raise ValueError("Missing the required parameter `view` when calling `patch_dashboards_id_cells_id_view`") # noqa: E501 - - path_params = {} - if 'dashboard_id' in local_var_params: - path_params['dashboardID'] = local_var_params['dashboard_id'] # noqa: E501 - if 'cell_id' in local_var_params: - path_params['cellID'] = local_var_params['cell_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 - - body_params = None - if 'view' in local_var_params: - body_params = local_var_params['view'] - # 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 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/service/write_service.py b/frogpilot/third_party/influxdb_client/service/write_service.py deleted file mode 100644 index bcd970dbb..000000000 --- a/frogpilot/third_party/influxdb_client/service/write_service.py +++ /dev/null @@ -1,201 +0,0 @@ -# coding: utf-8 - -""" -InfluxDB OSS API Service. - -The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 - -OpenAPI spec version: 2.0.0 -Generated by: https://openapi-generator.tech -""" - - -from __future__ import absolute_import - -import re # noqa: F401 - -from influxdb_client.service._base_service import _BaseService - - -class WriteService(_BaseService): - """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 - """WriteService - a operation defined in OpenAPI.""" - super().__init__(api_client) - - def post_write(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 - """Write data. - - Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Does the following when you send a write request: 1. Validates the request and queues the write. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; otherwise, returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/api) - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_write(org, bucket, body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. (required) - :param str bucket: A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. (required) - :param str body: In the request body, provide data in [line protocol format](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/). To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. - :param str content_type: The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. - :param int content_length: The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. - :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. - :param WritePrecision precision: The precision for unix timestamps in the line protocol batch. - :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_write_with_http_info(org, bucket, body, **kwargs) # noqa: E501 - else: - (data) = self.post_write_with_http_info(org, bucket, body, **kwargs) # noqa: E501 - return data - - def post_write_with_http_info(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 - """Write data. - - Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Does the following when you send a write request: 1. Validates the request and queues the write. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; otherwise, returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/api) - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - >>> thread = api.post_write_with_http_info(org, bucket, body, async_req=True) - >>> result = thread.get() - - :param async_req bool - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. (required) - :param str bucket: A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. (required) - :param str body: In the request body, provide data in [line protocol format](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/). To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. - :param str content_type: The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. - :param int content_length: The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. - :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. - :param WritePrecision precision: The precision for unix timestamps in the line protocol batch. - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_write_prepare(org, bucket, body, **kwargs) # noqa: E501 - - return self.api_client.call_api( - '/api/v2/write', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - async def post_write_async(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 - """Write data. - - Writes data to a bucket. Use this endpoint to send data in [line protocol](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/) format to InfluxDB. #### InfluxDB Cloud - Does the following when you send a write request: 1. Validates the request and queues the write. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. 3. Handles the delete asynchronously and reaches eventual consistency. To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. Because writes and deletes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS - Validates the request and handles the write synchronously. - If all points were written successfully, responds with HTTP `2xx` status code; otherwise, returns the first line that failed. #### Required permissions - `write-buckets` or `write-bucket BUCKET_ID`. *`BUCKET_ID`* is the ID of the destination bucket. #### Rate limits (with InfluxDB Cloud) `write` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Write data with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/write-data/developer-tools/api) - [Optimize writes to InfluxDB](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) - This method makes an asynchronous HTTP request. - - :param async_req bool - :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. (required) - :param str bucket: A bucket name or ID. InfluxDB writes all points in the batch to the specified bucket. (required) - :param str body: In the request body, provide data in [line protocol format](https://docs.influxdata.com/influxdb/latest/reference/syntax/line-protocol/). To send compressed data, do the following: 1. Use [GZIP](https://www.gzip.org/) to compress the line protocol data. 2. In your request, send the compressed data and the `Content-Encoding: gzip` header. #### Related guides - [Best practices for optimizing writes](https://docs.influxdata.com/influxdb/latest/write-data/best-practices/optimize-writes/) (required) - :param str zap_trace_span: OpenTracing span context - :param str content_encoding: The compression applied to the line protocol in the request payload. To send a GZIP payload, pass `Content-Encoding: gzip` header. - :param str content_type: The format of the data in the request body. To send a line protocol payload, pass `Content-Type: text/plain; charset=utf-8`. - :param int content_length: The size of the entity-body, in bytes, sent to InfluxDB. If the length is greater than the `max body` configuration option, the server responds with status code `413`. - :param str accept: The content type that the client can understand. Writes only return a response body if they fail--for example, due to a formatting problem or quota limit. #### InfluxDB Cloud - Returns only `application/json` for format and limit errors. - Returns only `text/html` for some quota limit errors. #### InfluxDB OSS - Returns only `application/json` for format and limit errors. #### Related guides - [Troubleshoot issues writing data](https://docs.influxdata.com/influxdb/latest/write-data/troubleshoot/) - :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Writes data to the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or the `orgID` parameter. - If you pass both `orgID` and `org`, they must both be valid. - Writes data to the bucket in the specified organization. - :param WritePrecision precision: The precision for unix timestamps in the line protocol batch. - :return: None - If the method is called asynchronously, - returns the request thread. - """ # noqa: E501 - local_var_params, path_params, query_params, header_params, body_params = \ - self._post_write_prepare(org, bucket, body, **kwargs) # noqa: E501 - - return await self.api_client.call_api( - '/api/v2/write', 'POST', - path_params, - query_params, - header_params, - body=body_params, - post_params=[], - files={}, - response_type=None, # noqa: E501 - 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={}, - urlopen_kw=kwargs.get('urlopen_kw', None)) - - def _post_write_prepare(self, org, bucket, body, **kwargs): # noqa: E501,D401,D403 - local_var_params = locals() - - all_params = ['org', 'bucket', 'body', 'zap_trace_span', 'content_encoding', 'content_type', 'content_length', 'accept', 'org_id', 'precision'] # noqa: E501 - self._check_operation_params('post_write', all_params, local_var_params) - # verify the required parameter 'org' is set - if ('org' not in local_var_params or - local_var_params['org'] is None): - raise ValueError("Missing the required parameter `org` when calling `post_write`") # 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 `post_write`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in local_var_params or - local_var_params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `post_write`") # noqa: E501 - - path_params = {} - - query_params = [] - if 'org' in local_var_params: - query_params.append(('org', local_var_params['org'])) # noqa: E501 - if 'org_id' in local_var_params: - query_params.append(('orgID', local_var_params['org_id'])) # noqa: E501 - if 'bucket' in local_var_params: - query_params.append(('bucket', local_var_params['bucket'])) # noqa: E501 - if 'precision' in local_var_params: - query_params.append(('precision', local_var_params['precision'])) # 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 - if 'content_encoding' in local_var_params: - header_params['Content-Encoding'] = local_var_params['content_encoding'] # noqa: E501 - if 'content_type' in local_var_params: - header_params['Content-Type'] = local_var_params['content_type'] # noqa: E501 - if 'content_length' in local_var_params: - header_params['Content-Length'] = local_var_params['content_length'] # noqa: E501 - if 'accept' in local_var_params: - header_params['Accept'] = local_var_params['accept'] # noqa: E501 - - 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', 'text/html', ]) # noqa: E501 - - # HTTP header `Content-Type` - header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['text/plain']) # noqa: E501 - - return local_var_params, path_params, query_params, header_params, body_params diff --git a/frogpilot/third_party/influxdb_client/version.py b/frogpilot/third_party/influxdb_client/version.py deleted file mode 100644 index 9c626c0c8..000000000 --- a/frogpilot/third_party/influxdb_client/version.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Version of the Client that is used in User-Agent header.""" - -VERSION = '1.49.0' diff --git a/frogpilot/ui/layouts/settings/toggle_metadata.py b/frogpilot/ui/layouts/settings/toggle_metadata.py new file mode 100644 index 000000000..3c270be4d --- /dev/null +++ b/frogpilot/ui/layouts/settings/toggle_metadata.py @@ -0,0 +1,2877 @@ +from dataclasses import dataclass +from enum import Enum + + + +class ToggleType(Enum): + BOOLEAN = "boolean" + BUTTON = "button" + BUTTON_PARAM = "button_param" + BUTTON_TOGGLE = "button_toggle" + LABEL = "label" + MANAGE = "manage" + MULTI_BUTTON = "multi_button" + NUMERIC = "numeric" + NUMERIC_WITH_BUTTON = "numeric_with_button" + + +@dataclass(frozen=True) +class ToggleDefinition: + button_labels: list[str] | None = None + button_options: list[str] | None = None + car_params: list[str] | None = None + depends_on: list[str] | None = None + description: str | None = None + icon: str | None = None + max_value: float | int | None = None + min_value: float | int | None = None + param: str | None = None + parent_param: str | None = None + reboot_required: bool | None = None + step: float | int | None = None + title: str | None = None + toggle_type: ToggleType | None = None + tuning_level: int | None = None + unit: str | None = None + value_map: dict[int, str] | None = None + + +TUNING_LEVEL_TOGGLE = ToggleDefinition( + title=("Tuning Level"), + param="TuningLevel", + description=( + "Choose your tuning level. Lower levels keep it simple; higher levels unlock more toggles for finer control. " + + "Minimal - Ideal for those who prefer simplicity or ease of use " + + "Standard - Recommended for most users for a balanced experience " + + "Advanced - Fine-tuning for experienced users " + + "Developer - Highly customizable settings for seasoned enthusiasts" + ), + icon="../../../frogpilot/assets/toggle_icons/icon_tuning.png", + max_value=3, + min_value=0, + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + value_map={ + 0: "Minimal", + 1: "Standard", + 2: "Advanced", + 3: "Developer", + }, +) + + +STOCK_OPENPILOT_TOGGLES = ( + ToggleDefinition( + title=("Enable openpilot"), + param="OpenpilotEnabledToggle", + description=("Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off."), + icon="../assets/offroad/icon_openpilot.png", + tuning_level=0, + ), + ToggleDefinition( + title=("openpilot Longitudinal Control (Alpha)"), + param="ExperimentalLongitudinalEnabled", + description=("WARNING: openpilot longitudinal control is in alpha for this car and will disable Automatic Emergency Braking (AEB).

On this car, openpilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha."), + icon="../assets/offroad/icon_speed_limit.png", + tuning_level=0, + ), + ToggleDefinition( + title=("Experimental Mode"), + param="ExperimentalMode", + description=("openpilot defaults to chill mode. Experimental mode enables alpha-level features that are not ready for chill mode."), + icon="../assets/img_experimental_white.svg", + tuning_level=0, + ), + ToggleDefinition( + title=("Disengage on Accelerator Pedal"), + param="DisengageOnAccelerator", + description=("When enabled, pressing the accelerator pedal will disengage openpilot."), + icon="../assets/offroad/icon_disengage_on_accelerator.svg", + tuning_level=0, + ), + ToggleDefinition( + title=("Driving Personality"), + param="LongitudinalPersonality", + button_labels=["SELECT"], + button_options=["Aggressive", "Standard", "Relaxed"], + description=("Standard is recommended. In aggressive mode, openpilot follows lead cars closer and uses more assertive gas and brake behavior. In relaxed mode, openpilot follows further away."), + icon="../assets/offroad/icon_speed_limit.png", + toggle_type=ToggleType.BUTTON_PARAM, + tuning_level=0, + ), + ToggleDefinition( + title=("Enable Lane Departure Warnings"), + param="IsLdwEnabled", + description=("Receive alerts to steer back into lane when your vehicle drifts over a detected lane line without a turn signal active while driving over 31 mph (50 km/h)."), + icon="../assets/offroad/icon_warning.png", + tuning_level=0, + ), + ToggleDefinition( + title=("Record and Upload Driver Camera"), + param="RecordFront", + description=("Upload data from the driver-facing camera and help improve the driver monitoring algorithm."), + icon="../assets/offroad/icon_monitoring.png", + tuning_level=0, + ), + ToggleDefinition( + title=("Use Metric System"), + param="IsMetric", + description=("Display speed in km/h instead of mph."), + icon="../assets/offroad/icon_metric.png", + tuning_level=0, + ), + ToggleDefinition( + title=("Show ETA in 24h Format"), + param="NavSettingTime24h", + description=("Use 24h format instead of am/pm."), + icon="../assets/offroad/icon_metric.png", + tuning_level=0, + ), + ToggleDefinition( + title=("Show Map on Left Side of UI"), + param="NavSettingLeftSide", + description=("Show map on the left side when in split-screen view."), + icon="../assets/offroad/icon_road.png", + tuning_level=0, + ), +) + + +SOFTWARE_TOGGLES = ( + ToggleDefinition( + title=("Automatically Update FrogPilot"), + param="AutomaticUpdates", + description=("FrogPilot will automatically update itself and its assets when you are offroad with an active internet connection."), + tuning_level=0, + ), +) + + +ALERTS_AND_SOUNDS_TOGGLES = ( + ToggleDefinition( + title=("Alert Volume Controller"), + param="AlertVolumeControl", + description=("Set how loud each type of openpilot alert is to keep routine prompts from becoming distracting."), + icon="../../../frogpilot/assets/toggle_icons/icon_mute.png", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Disengage Volume"), + param="DisengageVolume", + button_labels=["Test"], + description=("Set the volume for alerts when openpilot disengages.

Examples include: \"Cruise Fault: Restart the Car\", \"Parking Brake Engaged\", \"Pedal Pressed\"."), + max_value=101, + min_value=0, + parent_param="AlertVolumeControl", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="%", + value_map={0: "Muted", 101: "Auto"}, + ), + ToggleDefinition( + title=("Engage Volume"), + param="EngageVolume", + button_labels=["Test"], + description=("Set the volume for the chime when openpilot engages, such as after pressing the \"RESUME\" or \"SET\" steering wheel buttons."), + max_value=101, + min_value=0, + parent_param="AlertVolumeControl", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="%", + value_map={0: "Muted", 101: "Auto"}, + ), + ToggleDefinition( + title=("Prompt Volume"), + param="PromptVolume", + button_labels=["Test"], + description=("Set the volume for prompts that need attention.

Examples include: \"Car Detected in Blindspot\", \"Steering Temporarily Unavailable\", \"Turn Exceeds Steering Limit\"."), + max_value=101, + min_value=0, + parent_param="AlertVolumeControl", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="%", + value_map={0: "Muted", 101: "Auto"}, + ), + ToggleDefinition( + title=("Prompt Distracted Volume"), + param="PromptDistractedVolume", + button_labels=["Test"], + description=("Set the volume for prompts when openpilot detects driver distraction or unresponsiveness.

Examples include: \"Pay Attention\", \"Touch Steering Wheel\"."), + max_value=101, + min_value=0, + parent_param="AlertVolumeControl", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="%", + value_map={0: "Muted", 101: "Auto"}, + ), + ToggleDefinition( + title=("Refuse Volume"), + param="RefuseVolume", + button_labels=["Test"], + description=("Set the volume for alerts when openpilot refuses to engage.

Examples include: \"Brake Hold Active\", \"Door Open\", \"Seatbelt Unlatched\"."), + max_value=101, + min_value=0, + parent_param="AlertVolumeControl", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="%", + value_map={0: "Muted", 101: "Auto"}, + ), + ToggleDefinition( + title=("Warning Soft Volume"), + param="WarningSoftVolume", + button_labels=["Test"], + description=("Set the volume for softer warnings about potential risks.

Examples include: \"BRAKE! Risk of Collision\", \"Steering Temporarily Unavailable\"."), + max_value=101, + min_value=25, + parent_param="AlertVolumeControl", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="%", + value_map={0: "Muted", 101: "Auto"}, + ), + ToggleDefinition( + title=("Warning Immediate Volume"), + param="WarningImmediateVolume", + button_labels=["Test"], + description=("Set the volume for the loudest warnings that require urgent attention.

Examples include: \"DISENGAGE IMMEDIATELY — Driver Distracted\", \"DISENGAGE IMMEDIATELY — Driver Unresponsive\"."), + max_value=101, + min_value=25, + parent_param="AlertVolumeControl", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="%", + value_map={0: "Muted", 101: "Auto"}, + ), + ToggleDefinition( + title=("FrogPilot Alerts"), + param="CustomAlerts", + description=("Optional FrogPilot alerts that highlight driving events in a more noticeable way."), + icon="../../../frogpilot/assets/toggle_icons/icon_green_light.png", + toggle_type=ToggleType.MANAGE, + tuning_level=0, + ), + ToggleDefinition( + title=("Goat Scream"), + param="GoatScream", + description=("Play the infamous \"Goat Scream\" when the steering controller reaches its limit. Based on the \"Turn Exceeds Steering Limit\" event."), + parent_param="CustomAlerts", + tuning_level=1, + ), + ToggleDefinition( + title=("Green Light Alert"), + param="GreenLightAlert", + description=("Play an alert when the model predicts a red light has turned green.

Disclaimer: openpilot does not explicitly detect traffic lights. This alert is based on end-to-end model predictions from camera input and may trigger even when the light has not changed."), + parent_param="CustomAlerts", + tuning_level=0, + ), + ToggleDefinition( + title=("Lead Departing Alert"), + param="LeadDepartingAlert", + description=("Play an alert when the lead vehicle departs from a stop."), + parent_param="CustomAlerts", + tuning_level=0, + ), + ToggleDefinition( + title=("Loud \"Car Detected in Blindspot\" Alert"), + param="LoudBlindspotAlert", + car_params=["blind_spot_monitoring"], + description=("Play a louder alert if a vehicle is in the blind spot when attempting to change lanes. Based on the \"Car Detected in Blindspot\" event."), + parent_param="CustomAlerts", + tuning_level=0, + ), + ToggleDefinition( + title=("Speed Limit Changed Alert"), + param="SpeedLimitChangedAlert", + depends_on=["ShowSpeedLimits", "SpeedLimitController"], + description=("Play an alert when the posted speed limit changes."), + parent_param="CustomAlerts", + tuning_level=0, + ), +) + + +DRIVING_MODEL_TOGGLES = ( + ToggleDefinition( + title=("Automatically Download New Models"), + param="AutomaticallyDownloadModels", + description=("Automatically download new driving models as they become available."), + tuning_level=1, + ), + ToggleDefinition( + title=("Model Randomizer"), + param="ModelRandomizer", + description=("Select a random driving model each drive and use feedback prompts at the end of the drive to help find the model that best suits you!"), + tuning_level=2, + ), + ToggleDefinition( + title=("Update Model Manager"), + param="UpdateTinygrad", + button_labels=["UPDATE"], + description=("Update the \"Model Manager\" to support the latest models."), + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), +) + + +GAS_BRAKE_TOGGLES = ( + ToggleDefinition( + title=("Advanced Longitudinal Tuning"), + param="AdvancedLongitudinalTune", + car_params=["openpilot_longitudinal"], + description=("Advanced acceleration and braking control changes to fine-tune how openpilot drives."), + icon="../../../frogpilot/assets/toggle_icons/icon_advanced_longitudinal_tune.png", + toggle_type=ToggleType.MANAGE, + tuning_level=3, + ), + ToggleDefinition( + title=("Actuator Delay"), + param="LongitudinalActuatorDelay", + description=("The time between openpilot's throttle or brake command and the vehicle's response. Increase if the vehicle feels slow to react; decrease if it feels too eager or overshoots."), + max_value=1, + min_value=0, + parent_param="AdvancedLongitudinalTune", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="seconds", + ), + ToggleDefinition( + title=("Maximum Acceleration"), + param="MaxDesiredAcceleration", + description=("Limit the strongest acceleration openpilot can command."), + max_value=4.0, + min_value=0.1, + parent_param="AdvancedLongitudinalTune", + step=0.1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="m/s²", + ), + ToggleDefinition( + title=("Start Acceleration"), + param="StartAccel", + depends_on=["!HumanAcceleration", "!LongitudinalTune"], + description=("Extra acceleration applied when starting from a stop. Increase for quicker takeoffs; decrease for smoother, gentler starts."), + max_value=4, + min_value=0, + parent_param="AdvancedLongitudinalTune", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="m/s²", + ), + ToggleDefinition( + title=("Start Speed"), + param="VEgoStarting", + depends_on=["!ExperimentalGMTune", "!FrogsGoMoosTweak"], + description=("The speed at which openpilot exits the stopped state. Increase to reduce creeping; decrease to move sooner after stopping."), + max_value=1, + min_value=0.01, + parent_param="AdvancedLongitudinalTune", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="m/s²", + ), + ToggleDefinition( + title=("Stop Acceleration"), + param="StopAccel", + description=("Brake force applied to hold the vehicle at a standstill. Increase to prevent rolling on hills; decrease for smoother, softer stops."), + max_value=0, + min_value=-4, + parent_param="AdvancedLongitudinalTune", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="m/s²", + ), + ToggleDefinition( + title=("Stopping Rate"), + param="StoppingDecelRate", + depends_on=["!ExperimentalGMTune", "!FrogsGoMoosTweak"], + description=("How quickly braking ramps up when stopping. Increase for shorter, firmer stops; decrease for smoother, longer stops."), + max_value=1, + min_value=0.001, + parent_param="AdvancedLongitudinalTune", + step=0.001, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="m/s²", + ), + ToggleDefinition( + title=("Stop Speed"), + param="VEgoStopping", + depends_on=["!ExperimentalGMTune", "!FrogsGoMoosTweak"], + description=("The speed at which openpilot considers the vehicle stopped. Increase to brake earlier and stop smoothly; decrease to wait longer but risk overshooting."), + max_value=1, + min_value=0.01, + parent_param="AdvancedLongitudinalTune", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="m/s²", + ), + ToggleDefinition( + title=("Conditional Experimental Mode"), + param="ConditionalExperimental", + car_params=["openpilot_longitudinal"], + description=("Automatically switch to \"Experimental Mode\" when set conditions are met. Allows the model to handle challenging situations with smarter decision making."), + icon="../../../frogpilot/assets/toggle_icons/icon_conditional.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Below"), + param="CESpeed", + description=("Switch to \"Experimental Mode\" when driving below this speed without a lead to help openpilot handle low-speed situations more smoothly."), + max_value=99, + min_value=0, + parent_param="ConditionalExperimental", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=1, + unit="mph", + value_map={0: "Off"}, + ), + ToggleDefinition( + title=("With Lead"), + param="CESpeedLead", + description=("Switch to \"Experimental Mode\" when driving below this speed with a lead to help openpilot handle low-speed situations more smoothly."), + max_value=99, + min_value=0, + parent_param="ConditionalExperimental", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=1, + unit="mph", + value_map={0: "Off"}, + ), + ToggleDefinition( + title=("Curve Detected Ahead"), + param="CECurves", + button_labels=["With Lead"], + button_options=["CECurvesLead"], + description=("Switch to \"Experimental Mode\" when a curve is detected to allow the model to set an appropriate speed for the curve."), + parent_param="ConditionalExperimental", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=1, + ), + ToggleDefinition( + title=("With Lead"), + param="CECurvesLead", + description=("Also switch to \"Experimental Mode\" for curve detections when a lead vehicle is present."), + parent_param="CECurves", + tuning_level=1, + ), + ToggleDefinition( + title=("\"Detected\" Stop Lights/Signs"), + param="CEStopLights", + depends_on=["!visible:CEModelStopTime"], + description=("Switch to \"Experimental Mode\" whenever the driving model \"detects\" a red light or stop sign.

Disclaimer: openpilot does not explicitly detect traffic lights or stop signs. In \"Experimental Mode\", openpilot makes end-to-end driving decisions from camera input, which means it may stop even when there's no clear reason!"), + parent_param="ConditionalExperimental", + tuning_level=1, + ), + ToggleDefinition( + title=("Lead Detected Ahead"), + param="CELead", + button_labels=["Slower Lead", "Stopped Lead"], + button_options=["CESlowerLead", "CEStoppedLead"], + description=("Switch to \"Experimental Mode\" when a slower or stopped vehicle is detected. Can make braking smoother and more reliable on some vehicles."), + parent_param="ConditionalExperimental", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=1, + ), + ToggleDefinition( + title=("Slower Lead"), + param="CESlowerLead", + description=("Switch to \"Experimental Mode\" when a slower lead vehicle is detected."), + parent_param="CELead", + tuning_level=1, + ), + ToggleDefinition( + title=("Stopped Lead"), + param="CEStoppedLead", + description=("Switch to \"Experimental Mode\" when a stopped lead vehicle is detected."), + parent_param="CELead", + tuning_level=1, + ), + ToggleDefinition( + title=("Navigation-Based"), + param="CENavigation", + button_labels=["Intersections", "Turns", "With Lead"], + button_options=["CENavigationIntersections", "CENavigationTurns", "CENavigationLead"], + description=("Switch to \"Experimental Mode\" when approaching intersections or turns on the active route while using \"Navigate on openpilot\" (NOO) to allow the model to set an appropriate speed for upcoming maneuvers."), + parent_param="ConditionalExperimental", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=2, + ), + ToggleDefinition( + title=("Predicted Stop In"), + param="CEModelStopTime", + description=("Switch to \"Experimental Mode\" when openpilot predicts a stop within the set time. This is usually triggered when the model \"sees\" a red light or stop sign ahead.

Disclaimer: openpilot does not explicitly detect traffic lights or stop signs. In \"Experimental Mode\", openpilot makes end-to-end driving decisions from camera input, which means it may stop even when there's no clear reason!"), + max_value=9, + min_value=0, + parent_param="ConditionalExperimental", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + value_map={0: "Off", 1: "1 second", 2: "2 seconds", 3: "3 seconds", 4: "4 seconds", 5: "5 seconds", 6: "6 seconds", 7: "7 seconds", 8: "8 seconds", 9: "9 seconds"}, + ), + ToggleDefinition( + title=("Turn Signal Below"), + param="CESignalSpeed", + button_labels=["Not For Detected Lanes"], + button_options=["CESignalLaneDetection"], + description=("Switch to \"Experimental Mode\" when using a turn signal below the set speed to allow the model to choose an appropriate speed for smoother left and right turns."), + max_value=99, + min_value=0, + parent_param="ConditionalExperimental", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="mph", + value_map={0: "Off"}, + ), + ToggleDefinition( + title=("Not For Detected Lanes"), + param="CESignalLaneDetection", + description=("Ignore the turn-signal condition when a clear lane is detected."), + parent_param="CESignalSpeed", + tuning_level=2, + ), + ToggleDefinition( + title=("Status Widget"), + param="ShowCEMStatus", + description=("Show which condition triggered \"Experimental Mode\" on the driving screen."), + parent_param="ConditionalExperimental", + tuning_level=2, + ), + ToggleDefinition( + title=("Curve Speed Controller"), + param="CurveSpeedController", + car_params=["openpilot_longitudinal"], + description=("Automatically slow down for upcoming curves using data learned from your driving style, adapting to curves as you would."), + icon="../../../frogpilot/assets/toggle_icons/icon_speed_map.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Calibrated Lateral Acceleration"), + param="CalibratedLateralAcceleration", + description=("The learned lateral acceleration from collected driving data. This sets how fast openpilot will take curves. Higher values allow faster cornering; lower values slow the vehicle for gentler turns."), + parent_param="CurveSpeedController", + toggle_type=ToggleType.LABEL, + tuning_level=2, + ), + ToggleDefinition( + title=("Calibration Progress"), + param="CalibrationProgress", + description=("How much curve data has been collected. This is a progress meter; it is normal for the value to stay low and rarely reach 100%."), + parent_param="CurveSpeedController", + toggle_type=ToggleType.LABEL, + tuning_level=3, + ), + ToggleDefinition( + title=("Status Widget"), + param="ShowCSCStatus", + description=("Show the \"Curve Speed Controller\" target speed on the driving screen."), + parent_param="CurveSpeedController", + tuning_level=2, + ), + ToggleDefinition( + title=("Driving Personalities"), + param="CustomPersonalities", + car_params=["openpilot_longitudinal"], + description=("Customize the \"Driving Personalities\" to better match your driving style."), + icon="../../../frogpilot/assets/toggle_icons/icon_personality.png", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Traffic Mode"), + param="TrafficPersonalityProfile", + description=("Customize the \"Traffic Mode\" personality profile. Designed for stop-and-go driving."), + icon="../../../frogpilot/assets/stock_theme/distance_icons/traffic.png", + parent_param="CustomPersonalities", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Following Distance"), + param="TrafficFollow", + description=("The minimum following distance to the lead vehicle in \"Traffic Mode\". openpilot blends between this value and the \"Aggressive\" profile as speed increases. Increase for more space; decrease for tighter gaps."), + max_value=3, + min_value=0.5, + parent_param="TrafficPersonalityProfile", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Acceleration Smoothness"), + param="TrafficJerkAcceleration", + description=("How smoothly openpilot accelerates in \"Traffic Mode\". Increase for gentler starts; decrease for faster but more abrupt takeoffs."), + max_value=200, + min_value=25, + parent_param="TrafficPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Braking Smoothness"), + param="TrafficJerkDeceleration", + description=("How smoothly openpilot brakes in \"Traffic Mode\". Increase for gentler stops; decrease for quicker but sharper braking."), + max_value=200, + min_value=25, + parent_param="TrafficPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Safety Gap Bias"), + param="TrafficJerkDanger", + description=("How much extra space openpilot keeps from the vehicle ahead in \"Traffic Mode\". Increase for larger gaps and more cautious following; decrease for tighter gaps and closer following."), + max_value=200, + min_value=25, + parent_param="TrafficPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Slowdown Response"), + param="TrafficJerkSpeedDecrease", + description=("How smoothly openpilot slows down in \"Traffic Mode\". Increase for more gradual deceleration; decrease for faster but sharper slowdowns."), + max_value=200, + min_value=25, + parent_param="TrafficPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Speed-Up Response"), + param="TrafficJerkSpeed", + description=("How smoothly openpilot speeds up in \"Traffic Mode\". Increase for more gradual acceleration; decrease for quicker but more jolting acceleration."), + max_value=200, + min_value=25, + parent_param="TrafficPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Aggressive"), + param="AggressivePersonalityProfile", + description=("Customize the \"Aggressive\" personality profile. Designed for assertive driving with tighter gaps."), + icon="../../../frogpilot/assets/stock_theme/distance_icons/aggressive.png", + parent_param="CustomPersonalities", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Following Distance"), + param="AggressiveFollow", + description=("How many seconds openpilot follows behind lead vehicles when using the \"Aggressive\" profile. Increase for more space; decrease for tighter gaps.

Default: 1.25 seconds."), + max_value=3, + min_value=1, + parent_param="AggressivePersonalityProfile", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Acceleration Smoothness"), + param="AggressiveJerkAcceleration", + description=("How smoothly openpilot accelerates with the \"Aggressive\" profile. Increase for gentler starts; decrease for faster but more abrupt takeoffs."), + max_value=200, + min_value=25, + parent_param="AggressivePersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Braking Smoothness"), + param="AggressiveJerkDeceleration", + description=("How smoothly openpilot brakes with the \"Aggressive\" profile. Increase for gentler stops; decrease for quicker but sharper braking."), + max_value=200, + min_value=25, + parent_param="AggressivePersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Safety Gap Bias"), + param="AggressiveJerkDanger", + description=("How much extra space openpilot keeps from the vehicle ahead with the \"Aggressive\" profile. Increase for larger gaps and more cautious following; decrease for tighter gaps and closer following."), + max_value=200, + min_value=25, + parent_param="AggressivePersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Slowdown Response"), + param="AggressiveJerkSpeedDecrease", + description=("How smoothly openpilot slows down with the \"Aggressive\" profile. Increase for more gradual deceleration; decrease for faster but sharper slowdowns."), + max_value=200, + min_value=25, + parent_param="AggressivePersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Speed-Up Response"), + param="AggressiveJerkSpeed", + description=("How smoothly openpilot speeds up with the \"Aggressive\" profile. Increase for more gradual acceleration; decrease for quicker but more jolting acceleration."), + max_value=200, + min_value=25, + parent_param="AggressivePersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Standard"), + param="StandardPersonalityProfile", + description=("Customize the \"Standard\" personality profile. Designed for balanced driving with moderate gaps."), + icon="../../../frogpilot/assets/stock_theme/distance_icons/standard.png", + parent_param="CustomPersonalities", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Following Distance"), + param="StandardFollow", + description=("How many seconds openpilot follows behind lead vehicles when using the \"Standard\" profile. Increase for more space; decrease for tighter gaps.

Default: 1.45 seconds."), + max_value=3, + min_value=1, + parent_param="StandardPersonalityProfile", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Acceleration Smoothness"), + param="StandardJerkAcceleration", + description=("How smoothly openpilot accelerates with the \"Standard\" profile. Increase for gentler starts; decrease for faster but more abrupt takeoffs."), + max_value=200, + min_value=25, + parent_param="StandardPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Braking Smoothness"), + param="StandardJerkDeceleration", + description=("How smoothly openpilot brakes with the \"Standard\" profile. Increase for gentler stops; decrease for quicker but sharper braking."), + max_value=200, + min_value=25, + parent_param="StandardPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Safety Gap Bias"), + param="StandardJerkDanger", + description=("How much extra space openpilot keeps from the vehicle ahead with the \"Standard\" profile. Increase for larger gaps and more cautious following; decrease for tighter gaps and closer following."), + max_value=200, + min_value=25, + parent_param="StandardPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Slowdown Response"), + param="StandardJerkSpeedDecrease", + description=("How smoothly openpilot slows down with the \"Standard\" profile. Increase for more gradual deceleration; decrease for faster but sharper slowdowns."), + max_value=200, + min_value=25, + parent_param="StandardPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Speed-Up Response"), + param="StandardJerkSpeed", + description=("How smoothly openpilot speeds up with the \"Standard\" profile. Increase for more gradual acceleration; decrease for quicker but more jolting acceleration."), + max_value=200, + min_value=25, + parent_param="StandardPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Relaxed"), + param="RelaxedPersonalityProfile", + description=("Customize the \"Relaxed\" personality profile. Designed for smoother, more comfortable driving with larger gaps."), + icon="../../../frogpilot/assets/stock_theme/distance_icons/relaxed.png", + parent_param="CustomPersonalities", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Following Distance"), + param="RelaxedFollow", + description=("How many seconds openpilot follows behind lead vehicles when using the \"Relaxed\" profile. Increase for more space; decrease for tighter gaps.

Default: 1.75 seconds."), + max_value=3, + min_value=1, + parent_param="RelaxedPersonalityProfile", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Acceleration Smoothness"), + param="RelaxedJerkAcceleration", + description=("How smoothly openpilot accelerates with the \"Relaxed\" profile. Increase for gentler starts; decrease for faster but more abrupt takeoffs."), + max_value=200, + min_value=25, + parent_param="RelaxedPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Braking Smoothness"), + param="RelaxedJerkDeceleration", + description=("How smoothly openpilot brakes with the \"Relaxed\" profile. Increase for gentler stops; decrease for quicker but sharper braking."), + max_value=200, + min_value=25, + parent_param="RelaxedPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Safety Gap Bias"), + param="RelaxedJerkDanger", + description=("How much extra space openpilot keeps from the vehicle ahead with the \"Relaxed\" profile. Increase for larger gaps and more cautious following; decrease for tighter gaps and closer following."), + max_value=200, + min_value=25, + parent_param="RelaxedPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Slowdown Response"), + param="RelaxedJerkSpeedDecrease", + description=("How smoothly openpilot slows down with the \"Relaxed\" profile. Increase for more gradual deceleration; decrease for faster but sharper slowdowns."), + max_value=200, + min_value=25, + parent_param="RelaxedPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Speed-Up Response"), + param="RelaxedJerkSpeed", + description=("How smoothly openpilot speeds up with the \"Relaxed\" profile. Increase for more gradual acceleration; decrease for quicker but more jolting acceleration."), + max_value=200, + min_value=25, + parent_param="RelaxedPersonalityProfile", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("Longitudinal Tuning"), + param="LongitudinalTune", + car_params=["openpilot_longitudinal"], + description=("Acceleration and braking control changes to fine-tune how openpilot drives."), + icon="../../../frogpilot/assets/toggle_icons/icon_longitudinal_tune.png", + toggle_type=ToggleType.MANAGE, + tuning_level=0, + ), + ToggleDefinition( + title=("Acceleration Profile"), + param="AccelerationProfile", + button_labels=["SELECT"], + button_options=["Standard", "Eco", "Sport", "Sport+"], + description=("How quickly openpilot speeds up. \"Eco\" is gentle and efficient, \"Sport\" is firmer and more responsive, and \"Sport+\" accelerates at the maximum rate allowed."), + parent_param="LongitudinalTune", + toggle_type=ToggleType.BUTTON_PARAM, + tuning_level=0, + ), + ToggleDefinition( + title=("Deceleration Profile"), + param="DecelerationProfile", + button_labels=["SELECT"], + button_options=["Standard", "Eco", "Sport"], + description=("How firmly openpilot slows down. \"Eco\" favors coasting, \"Sport\" applies stronger braking."), + parent_param="LongitudinalTune", + toggle_type=ToggleType.BUTTON_PARAM, + tuning_level=2, + ), + ToggleDefinition( + title=("Human-Like Acceleration"), + param="HumanAcceleration", + description=("Acceleration that mimics human behavior by easing the throttle at low speeds and adding extra power when taking off from a stop."), + parent_param="LongitudinalTune", + tuning_level=2, + ), + ToggleDefinition( + title=("Human-Like Following"), + param="HumanFollowing", + description=("Following behavior that mimics human drivers by closing gaps behind faster vehicles for quicker takeoffs and dynamically adjusting the desired following distance for gentler, more efficient braking."), + parent_param="LongitudinalTune", + tuning_level=2, + ), + ToggleDefinition( + title=("Human-Like Lane Changes"), + param="HumanLaneChanges", + car_params=["radar_support"], + description=("Lane-change behavior that mimics human drivers by anticipating and tracking adjacent vehicles during lane changes."), + parent_param="LongitudinalTune", + tuning_level=2, + ), + ToggleDefinition( + title=("Lead Detection Sensitivity"), + param="LeadDetectionThreshold", + description=("How sensitive openpilot is to detecting vehicles. Higher sensitivity allows quicker detection at longer distances but may react to non-vehicle objects; lower sensitivity is more conservative and reduces false detections."), + max_value=50, + min_value=25, + parent_param="LongitudinalTune", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="%", + ), + ToggleDefinition( + title=("\"Taco Bell Run\" Turn Speed Hack"), + param="TacoTune", + description=("The turn-speed hack from comma's 2022 \"Taco Bell Run\". Designed to slow down for left and right turns."), + parent_param="LongitudinalTune", + tuning_level=2, + ), + ToggleDefinition( + title=("Quality of Life"), + param="QOLLongitudinal", + car_params=["openpilot_longitudinal"], + description=("Miscellaneous acceleration and braking control changes to fine-tune how openpilot drives."), + icon="../../../frogpilot/assets/toggle_icons/icon_quality_of_life.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Cruise Interval"), + param="CustomCruise", + car_params=["!pcm_cruise", "openpilot_longitudinal"], + description=("How much the set speed increases or decreases for each + or – cruise control button press."), + max_value=99, + min_value=1, + parent_param="QOLLongitudinal", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="mph", + ), + ToggleDefinition( + title=("Cruise Interval (Hold)"), + param="CustomCruiseLong", + car_params=["!pcm_cruise", "openpilot_longitudinal"], + description=("How much the set speed increases or decreases while holding the + or – cruise control buttons."), + max_value=99, + min_value=1, + parent_param="QOLLongitudinal", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="mph", + ), + ToggleDefinition( + title=("Force Stop at \"Detected\" Stop Lights/Signs"), + param="ForceStops", + description=("Force openpilot to stop whenever the driving model \"detects\" a red light or stop sign.

Disclaimer: openpilot does not explicitly detect traffic lights or stop signs. In \"Experimental Mode\", openpilot makes end-to-end driving decisions from camera input, which means it may stop even when there's no clear reason!"), + parent_param="QOLLongitudinal", + tuning_level=2, + ), + ToggleDefinition( + title=("Increase Stopped Distance by:"), + param="IncreasedStoppedDistance", + description=("Add extra space when stopped behind vehicles. Increase for more room; decrease for shorter gaps."), + max_value=10, + min_value=0, + parent_param="QOLLongitudinal", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=1, + unit="feet", + ), + ToggleDefinition( + title=("Map Accel/Decel to Gears"), + param="MapGears", + button_labels=["Acceleration", "Deceleration"], + button_options=["MapAcceleration", "MapDeceleration"], + car_params=["toyota_brand"], + description=("Map the Acceleration or Deceleration profiles to the vehicle's \"Eco\" and \"Sport\" gear modes."), + parent_param="QOLLongitudinal", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=2, + ), + ToggleDefinition( + title=("Acceleration"), + param="MapAcceleration", + car_params=["toyota_brand"], + description=("Apply acceleration profile mapping to gear changes."), + parent_param="MapGears", + tuning_level=1, + ), + ToggleDefinition( + title=("Deceleration"), + param="MapDeceleration", + car_params=["toyota_brand"], + description=("Apply deceleration profile mapping to gear changes."), + parent_param="MapGears", + tuning_level=1, + ), + ToggleDefinition( + title=("Offset Set Speed by:"), + param="SetSpeedOffset", + car_params=["!pcm_cruise", "openpilot_longitudinal"], + description=("Increase the set speed by the chosen offset. For example, set +5 if you usually drive 5 over the limit."), + max_value=99, + min_value=0, + parent_param="QOLLongitudinal", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="mph", + ), + ToggleDefinition( + title=("Reverse Cruise Increase"), + param="ReverseCruise", + car_params=["toyota_brand", "openpilot_longitudinal", "pcm_cruise"], + description=("Reverse the cruise control button behavior so a short press increases the set speed by 5 instead of 1."), + parent_param="QOLLongitudinal", + tuning_level=1, + ), + ToggleDefinition( + title=("Weather Condition Offsets"), + param="WeatherPresets", + description=("Automatically adjust driving behavior based on real-time weather. Helps maintain comfort and safety in low visibility, rain, or snow."), + parent_param="QOLLongitudinal", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Low Visibility"), + param="LowVisibilityOffsets", + button_labels=["MANAGE"], + description=("Driving adjustments for fog, haze, or other low-visibility conditions."), + parent_param="WeatherPresets", + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Increase Following Distance by:"), + param="IncreaseFollowingLowVisibility", + description=("Add extra space behind lead vehicles in low visibility. Increase for more space; decrease for tighter gaps."), + max_value=3, + min_value=0, + parent_param="LowVisibilityOffsets", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Increase Stopped Distance by:"), + param="IncreasedStoppedDistanceLowVisibility", + description=("Add extra buffer when stopped behind vehicles in low visibility. Increase for more room; decrease for shorter gaps."), + max_value=10, + min_value=0, + parent_param="LowVisibilityOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="feet", + ), + ToggleDefinition( + title=("Reduce Acceleration by:"), + param="ReduceAccelerationLowVisibility", + description=("Lower the maximum acceleration in low visibility. Increase for softer takeoffs; decrease for quicker but less stable takeoffs."), + max_value=99, + min_value=0, + parent_param="LowVisibilityOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Reduce Speed in Curves by:"), + param="ReduceLateralAccelerationLowVisibility", + description=("Lower the desired speed while driving through curves in low visibility. Increase for safer, gentler turns; decrease for more aggressive driving in curves."), + max_value=99, + min_value=0, + parent_param="LowVisibilityOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Rain"), + param="RainOffsets", + button_labels=["MANAGE"], + description=("Driving adjustments for rainy conditions."), + parent_param="WeatherPresets", + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Increase Following Distance by:"), + param="IncreaseFollowingRain", + description=("Add extra space behind lead vehicles in rain. Increase for more space; decrease for tighter gaps."), + max_value=3, + min_value=0, + parent_param="RainOffsets", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Increase Stopped Distance by:"), + param="IncreasedStoppedDistanceRain", + description=("Add extra buffer when stopped behind vehicles in rain. Increase for more room; decrease for shorter gaps."), + max_value=10, + min_value=0, + parent_param="RainOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="feet", + ), + ToggleDefinition( + title=("Reduce Acceleration by:"), + param="ReduceAccelerationRain", + description=("Lower the maximum acceleration in rain. Increase for softer takeoffs; decrease for quicker but less stable takeoffs."), + max_value=99, + min_value=0, + parent_param="RainOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Reduce Speed in Curves by:"), + param="ReduceLateralAccelerationRain", + description=("Lower the desired speed while driving through curves in rain. Increase for safer, gentler turns; decrease for more aggressive driving in curves."), + max_value=99, + min_value=0, + parent_param="RainOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Rainstorms"), + param="RainStormOffsets", + button_labels=["MANAGE"], + description=("Driving adjustments for rainstorms."), + parent_param="WeatherPresets", + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Increase Following Distance by:"), + param="IncreaseFollowingRainStorm", + description=("Add extra space behind lead vehicles in a rainstorm. Increase for more space; decrease for tighter gaps."), + max_value=3, + min_value=0, + parent_param="RainStormOffsets", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Increase Stopped Distance by:"), + param="IncreasedStoppedDistanceRainStorm", + description=("Add extra buffer when stopped behind vehicles in a rainstorm. Increase for more room; decrease for shorter gaps."), + max_value=10, + min_value=0, + parent_param="RainStormOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="feet", + ), + ToggleDefinition( + title=("Reduce Acceleration by:"), + param="ReduceAccelerationRainStorm", + description=("Lower the maximum acceleration in a rainstorm. Increase for softer takeoffs; decrease for quicker but less stable takeoffs."), + max_value=99, + min_value=0, + parent_param="RainStormOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Reduce Speed in Curves by:"), + param="ReduceLateralAccelerationRainStorm", + description=("Lower the desired speed while driving through curves in a rainstorm. Increase for safer, gentler turns; decrease for more aggressive driving in curves."), + max_value=99, + min_value=0, + parent_param="RainStormOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Snow"), + param="SnowOffsets", + button_labels=["MANAGE"], + description=("Driving adjustments for snowy conditions."), + parent_param="WeatherPresets", + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Increase Following Distance by:"), + param="IncreaseFollowingSnow", + description=("Add extra space behind lead vehicles in snow. Increase for more space; decrease for tighter gaps."), + max_value=3, + min_value=0, + parent_param="SnowOffsets", + step=0.01, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Increase Stopped Distance by:"), + param="IncreasedStoppedDistanceSnow", + description=("Add extra buffer when stopped behind vehicles in snow. Increase for more room; decrease for shorter gaps."), + max_value=10, + min_value=0, + parent_param="SnowOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="feet", + ), + ToggleDefinition( + title=("Reduce Acceleration by:"), + param="ReduceAccelerationSnow", + description=("Lower the maximum acceleration in snow. Increase for softer takeoffs; decrease for quicker but less stable takeoffs."), + max_value=99, + min_value=0, + parent_param="SnowOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Reduce Speed in Curves by:"), + param="ReduceLateralAccelerationSnow", + description=("Lower the desired speed while driving through curves in snow. Increase for safer, gentler turns; decrease for more aggressive driving in curves."), + max_value=99, + min_value=0, + parent_param="SnowOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + ), + ToggleDefinition( + title=("Speed Limit Controller"), + param="SpeedLimitController", + car_params=["openpilot_longitudinal"], + description=("Limit openpilot's maximum driving speed to the current speed limit obtained from downloaded maps, Mapbox, or the dashboard for supported vehicles (Ford, Genesis, Hyundai, Kia, Lexus, Toyota)."), + icon="../../../frogpilot/assets/toggle_icons/icon_speed_limit.png", + toggle_type=ToggleType.MANAGE, + tuning_level=0, + ), + ToggleDefinition( + title=("Fallback Speed"), + param="SLCFallback", + button_labels=["SELECT"], + button_options=["Set Speed", "Experimental Mode", "Previous Limit"], + description=("The speed used by \"Speed Limit Controller\" when no speed limit is found.

- Set Speed: Use the cruise set speed
- Experimental Mode: Estimate the limit using the driving model
- Previous Limit: Keep using the last confirmed limit"), + parent_param="SpeedLimitController", + toggle_type=ToggleType.BUTTON_PARAM, + tuning_level=1, + ), + ToggleDefinition( + title=("Override Speed"), + param="SLCOverride", + button_labels=["SELECT"], + button_options=["None", "Set With Gas Pedal", "Max Set Speed"], + description=("The speed used by \"Speed Limit Controller\" after you manually drive faster than the posted limit.

- Set with Gas Pedal: Use the highest speed reached while pressing the gas
- Max Set Speed: Use the cruise set speed

Overrides clear when openpilot disengages."), + parent_param="SpeedLimitController", + toggle_type=ToggleType.BUTTON_PARAM, + tuning_level=1, + ), + ToggleDefinition( + title=("Quality of Life"), + param="SLCQOL", + button_labels=["MANAGE"], + description=("Miscellaneous \"Speed Limit Controller\" changes to fine-tune how openpilot drives."), + parent_param="SpeedLimitController", + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Confirm New Speed Limits"), + param="SLCConfirmation", + button_labels=["Lower Limits", "Higher Limits"], + button_options=["SLCConfirmationLower", "SLCConfirmationHigher"], + description=("Ask before changing to a new speed limit. To accept, tap the flashing on-screen widget or press the Cruise Increase button. To deny, press the Cruise Decrease button or ignore the prompt for 30 seconds."), + parent_param="SLCQOL", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=0, + ), + ToggleDefinition( + title=("Lower Limits"), + param="SLCConfirmationLower", + description=("Request confirmation when the detected speed limit decreases."), + parent_param="SLCConfirmation", + tuning_level=0, + ), + ToggleDefinition( + title=("Higher Limits"), + param="SLCConfirmationHigher", + description=("Request confirmation when the detected speed limit increases."), + parent_param="SLCConfirmation", + tuning_level=0, + ), + ToggleDefinition( + title=("Force MPH from Dashboard"), + param="ForceMPHDashboard", + description=("Always read dashboard speed limit signs in mph. Turn this on if the cluster shows mph but the limit is interpreted as km/h."), + parent_param="SLCQOL", + tuning_level=3, + ), + ToggleDefinition( + title=("Higher Limit Lookahead Time"), + param="SLCLookaheadHigher", + description=("How far ahead openpilot anticipates upcoming higher speed limits from downloaded map data."), + max_value=30, + min_value=0, + parent_param="SLCQOL", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="seconds", + ), + ToggleDefinition( + title=("Lower Limit Lookahead Time"), + param="SLCLookaheadLower", + description=("How far ahead openpilot anticipates upcoming lower speed limits from downloaded map data."), + max_value=30, + min_value=0, + parent_param="SLCQOL", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="seconds", + ), + ToggleDefinition( + title=("Match Speed Limit on Engage"), + param="SetSpeedLimit", + car_params=["!pcm_cruise"], + description=("When openpilot is first enabled, automatically set the max speed to the current posted limit."), + parent_param="SLCQOL", + tuning_level=1, + ), + ToggleDefinition( + title=("Use Mapbox as Fallback"), + param="SLCMapboxFiller", + depends_on=["MapboxSecretKey"], + description=("Use Mapbox speed-limit data when no other source is available."), + parent_param="SLCQOL", + tuning_level=1, + ), + ToggleDefinition( + title=("Speed Limit Source Priority"), + param="SLCPriority", + button_labels=["SELECT"], + description=("The source order for speed limits when more than one is available."), + parent_param="SpeedLimitController", + toggle_type=ToggleType.BUTTON, + tuning_level=2, + ), + ToggleDefinition( + title=("Speed Limit Offsets"), + param="SLCOffsets", + button_labels=["MANAGE"], + description=("Add an offset to the posted speed limit to better match your driving style."), + parent_param="SpeedLimitController", + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Speed Offset (0–24 mph)"), + param="Offset1", + description=("How much to offset posted speed-limits between 0 and 24 mph."), + max_value=99, + min_value=-99, + parent_param="SLCOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="mph", + ), + ToggleDefinition( + title=("Speed Offset (25–34 mph)"), + param="Offset2", + description=("How much to offset posted speed-limits between 25 and 34 mph."), + max_value=99, + min_value=-99, + parent_param="SLCOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="mph", + ), + ToggleDefinition( + title=("Speed Offset (35–44 mph)"), + param="Offset3", + description=("How much to offset posted speed-limits between 35 and 44 mph."), + max_value=99, + min_value=-99, + parent_param="SLCOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="mph", + ), + ToggleDefinition( + title=("Speed Offset (45–54 mph)"), + param="Offset4", + description=("How much to offset posted speed-limits between 45 and 54 mph."), + max_value=99, + min_value=-99, + parent_param="SLCOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="mph", + ), + ToggleDefinition( + title=("Speed Offset (55–64 mph)"), + param="Offset5", + description=("How much to offset posted speed-limits between 55 and 64 mph."), + max_value=99, + min_value=-99, + parent_param="SLCOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="mph", + ), + ToggleDefinition( + title=("Speed Offset (65–74 mph)"), + param="Offset6", + description=("How much to offset posted speed-limits between 65 and 74 mph."), + max_value=99, + min_value=-99, + parent_param="SLCOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="mph", + ), + ToggleDefinition( + title=("Speed Offset (75–99 mph)"), + param="Offset7", + description=("How much to offset posted speed-limits between 75 and 99 mph."), + max_value=99, + min_value=-99, + parent_param="SLCOffsets", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="mph", + ), + ToggleDefinition( + title=("Visual Settings"), + param="SLCVisuals", + button_labels=["MANAGE"], + description=("Visual \"Speed Limit Controller\" changes to fine-tune how the driving screen looks."), + parent_param="SpeedLimitController", + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Show Speed Limit Offset"), + param="ShowSLCOffset", + description=("Show the current offset from the posted limit on the driving screen."), + parent_param="SLCVisuals", + tuning_level=0, + ), + ToggleDefinition( + title=("Show Speed Limit Sources"), + param="SpeedLimitSources", + description=("Display the speed-limit sources and their current values on the driving screen."), + parent_param="SLCVisuals", + tuning_level=3, + ), +) + + +STEERING_TOGGLES = ( + ToggleDefinition( + title=("Advanced Lateral Tuning"), + param="AdvancedLateralTune", + description=("Advanced steering control changes to fine-tune how openpilot drives."), + icon="../../../frogpilot/assets/toggle_icons/icon_advanced_lateral_tune.png", + toggle_type=ToggleType.MANAGE, + tuning_level=3, + ), + ToggleDefinition( + title=("Actuator Delay"), + param="SteerDelay", + button_labels=["Reset"], + description=("The time between openpilot's steering command and the vehicle's response. Increase if the vehicle reacts late; decrease if it feels jumpy. Auto-learned by default."), + max_value=1, + min_value=0.01, + parent_param="AdvancedLateralTune", + step=0.01, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Friction"), + param="SteerFriction", + button_labels=["Reset"], + depends_on=["!ForceAutoTune", "!LateralTune", "!NNFF", "ForceAutoTuneOff", "ForceTorqueController"], + description=("Compensates for steering friction. Increase if the wheel sticks near center; decrease if it jitters. Auto-learned by default."), + max_value=1, + min_value=0, + parent_param="AdvancedLateralTune", + step=0.01, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Kp Factor"), + param="SteerKP", + car_params=["torque_lateral_tuning"], + button_labels=["Reset"], + depends_on=["ForceTorqueController", "LateralTune", "NNFF"], + description=("How strongly openpilot corrects lane position. Higher is tighter but twitchier; lower is smoother but slower. Auto-learned by default."), + parent_param="AdvancedLateralTune", + step=0.01, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Lateral Acceleration"), + param="SteerLatAccel", + button_labels=["Reset"], + depends_on=["!ForceAutoTune", "!LateralTune", "!NNFF", "ForceAutoTuneOff", "ForceTorqueController"], + description=("Maps steering torque to turning response. Increase for sharper turns; decrease for gentler steering. Auto-learned by default."), + parent_param="AdvancedLateralTune", + step=0.01, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Steer Ratio"), + param="SteerRatio", + button_labels=["Reset"], + depends_on=["!ForceAutoTune", "ForceAutoTuneOff"], + description=("The relationship between steering wheel rotation and road wheel angle. Increase if steering feels too quick or twitchy; decrease if it feels too slow or weak. Auto-learned by default."), + parent_param="AdvancedLateralTune", + step=0.01, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Force Auto-Tune On"), + param="ForceAutoTune", + car_params=["torque_lateral_tuning", "!has_auto_lateral_tune"], + depends_on=["ForceTorqueController", "LateralTune", "NNFF"], + description=("Force-enable openpilot's live auto-tuning for \"Friction\" and \"Lateral Acceleration\"."), + parent_param="AdvancedLateralTune", + tuning_level=3, + ), + ToggleDefinition( + title=("Force Auto-Tune Off"), + param="ForceAutoTuneOff", + car_params=["torque_lateral_tuning", "has_auto_lateral_tune"], + description=("Force-disable openpilot's live auto-tuning for \"Friction\" and \"Lateral Acceleration\" and use the set value instead."), + parent_param="AdvancedLateralTune", + tuning_level=3, + ), + ToggleDefinition( + title=("Force Torque Controller"), + param="ForceTorqueController", + car_params=["!torque_lateral_tuning"], + description=("Use torque-based steering control instead of angle-based control for smoother lane keeping, especially in curves."), + parent_param="AdvancedLateralTune", + reboot_required=True, + tuning_level=3, + ), + ToggleDefinition( + title=("Always On Lateral"), + param="AlwaysOnLateral", + description=("openpilot's steering remains active even when the accelerator or brake pedals are pressed."), + icon="../../../frogpilot/assets/toggle_icons/icon_always_on_lateral.png", + reboot_required=True, + toggle_type=ToggleType.MANAGE, + tuning_level=0, + ), + ToggleDefinition( + title=("Enable With Cruise Control"), + param="AlwaysOnLateralMain", + description=("Enable \"Always On Lateral\" whenever \"Cruise Control\" is on, even when openpilot is not engaged."), + parent_param="AlwaysOnLateral", + tuning_level=2, + ), + ToggleDefinition( + title=("Enable With LKAS"), + param="AlwaysOnLateralLKAS", + description=("Enable \"Always On Lateral\" whenever \"LKAS\" is on, even when openpilot is not engaged."), + parent_param="AlwaysOnLateral", + tuning_level=2, + ), + ToggleDefinition( + title=("Pause on Brake Press Below"), + param="PauseAOLOnBrake", + description=("Pause \"Always On Lateral\" below the set speed while the brake pedal is pressed."), + max_value=99, + min_value=0, + parent_param="AlwaysOnLateral", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=1, + ), + ToggleDefinition( + title=("Lane Changes"), + param="LaneChanges", + description=("Allow openpilot to change lanes."), + icon="../../../frogpilot/assets/toggle_icons/icon_lane.png", + toggle_type=ToggleType.MANAGE, + tuning_level=0, + ), + ToggleDefinition( + title=("Automatic Lane Changes"), + param="NudgelessLaneChange", + description=("When the turn signal is on, openpilot will automatically change lanes. No steering-wheel nudge required!"), + parent_param="LaneChanges", + tuning_level=0, + ), + ToggleDefinition( + title=("Lane Change Delay"), + param="LaneChangeTime", + depends_on=["LaneChanges", "NudgelessLaneChange"], + description=("Delay between turn signal activation and the start of an automatic lane change."), + max_value=5, + min_value=0, + parent_param="LaneChanges", + step=0.1, + toggle_type=ToggleType.NUMERIC, + tuning_level=1, + value_map={0: "Instant"}, + ), + ToggleDefinition( + title=("Minimum Lane Change Speed"), + param="MinimumLaneChangeSpeed", + description=("Lowest speed at which openpilot will change lanes."), + max_value=99, + min_value=0, + parent_param="LaneChanges", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + ), + ToggleDefinition( + title=("Minimum Lane Width"), + param="LaneDetectionWidth", + depends_on=["LaneChanges", "NudgelessLaneChange"], + description=("Prevent automatic lane changes into lanes narrower than the set width."), + max_value=15, + min_value=0, + parent_param="LaneChanges", + step=0.1, + toggle_type=ToggleType.NUMERIC, + tuning_level=1, + ), + ToggleDefinition( + title=("One Lane Change Per Signal"), + param="OneLaneChange", + description=("Limit automatic lane changes to one per turn-signal activation."), + parent_param="LaneChanges", + tuning_level=2, + ), + ToggleDefinition( + title=("Lateral Tuning"), + param="LateralTune", + description=("Miscellaneous steering control changes to fine-tune how openpilot drives."), + icon="../../../frogpilot/assets/toggle_icons/icon_lateral_tune.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Force Turn Desires Below Lane Change Speed"), + param="TurnDesires", + description=("While driving below the minimum lane change speed with an active turn signal, instruct openpilot to turn left/right."), + parent_param="LateralTune", + tuning_level=2, + ), + ToggleDefinition( + title=("Neural Network Feedforward (NNFF)"), + param="NNFF", + description=("Twilsonco's \"Neural Network FeedForward\" controller. Uses a trained neural network model to predict steering torque based on vehicle speed, roll, and past/future planned path data for smoother, model-based steering."), + parent_param="LateralTune", + reboot_required=True, + tuning_level=2, + ), + ToggleDefinition( + title=("Neural Network Feedforward (NNFF) Lite"), + param="NNFFLite", + depends_on=["!LateralTune", "!NNFF"], + description=("A lightweight version of Twilsonco's \"Neural Network FeedForward\" controller. Uses the \"look-ahead\" planned lateral jerk logic from the full model to help smoothen steering adjustments in curves, but does not use the full neural network for torque calculation."), + parent_param="LateralTune", + reboot_required=True, + tuning_level=2, + ), + ToggleDefinition( + title=("Quality of Life"), + param="QOLLateral", + description=("Steering control changes to fine-tune how openpilot drives."), + icon="../../../frogpilot/assets/toggle_icons/icon_quality_of_life.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Pause Steering Below"), + param="PauseLateralSpeed", + button_labels=["Turn Signal Only"], + description=("Pause steering below the set speed."), + max_value=99, + min_value=0, + parent_param="QOLLateral", + step=1, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=1, + ), + ToggleDefinition( + title=("Turn Signal Only"), + param="PauseLateralOnSignal", + description=("Only pause steering below the set speed while a turn signal is active."), + parent_param="PauseLateralSpeed", + tuning_level=1, + ), +) + + +DEVICE_CONTROLS_TOGGLES = ( + ToggleDefinition( + title=("Device Settings"), + param="DeviceManagement", + description=("Settings that control how the device runs, powers off, and manages driving data."), + icon="../../../frogpilot/assets/toggle_icons/icon_device.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Device Shutdown Timer"), + param="DeviceShutdown", + description=("Keep the device on for the set amount of time after a drive before it shuts down automatically."), + max_value=33, + min_value=0, + parent_param="DeviceManagement", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=1, + value_map={0: "5 mins", 1: "15 mins", 2: "30 mins", 3: "45 mins", 4: "1 hour", 5: "2 hours", 6: "3 hours", 7: "4 hours", 8: "5 hours", 9: "6 hours", 10: "7 hours", 11: "8 hours", 12: "9 hours", 13: "10 hours", 14: "11 hours", 15: "12 hours", 16: "13 hours", 17: "14 hours", 18: "15 hours", 19: "16 hours", 20: "17 hours", 21: "18 hours", 22: "19 hours", 23: "20 hours", 24: "21 hours", 25: "22 hours", 26: "23 hours", 27: "24 hours", 28: "25 hours", 29: "26 hours", 30: "27 hours", 31: "28 hours", 32: "29 hours", 33: "30 hours"}, + ), + ToggleDefinition( + title=("Disable Logging"), + param="NoLogging", + description=("WARNING: This will prevent your drives from being recorded and all data will be unobtainable!

Prevent the device from saving driving data."), + parent_param="DeviceManagement", + tuning_level=2, + ), + ToggleDefinition( + title=("Disable Uploads"), + param="NoUploads", + button_labels=["Disable Onroad Only"], + button_options=["DisableOnroadUploads"], + description=("WARNING: This will prevent your drives from being uploaded to comma connect which will impact debugging and official support from comma!

Prevent the device from uploading driving data."), + parent_param="DeviceManagement", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=2, + ), + ToggleDefinition( + title=("Disable Onroad Only"), + param="DisableOnroadUploads", + description=("Disable uploads only while driving. Offroad uploads remain enabled."), + parent_param="NoUploads", + tuning_level=2, + ), + ToggleDefinition( + title=("High-Quality Recording"), + param="HigherBitrate", + depends_on=["!DisableOnroadUploads", "DeviceManagement", "NoUploads"], + description=("Save drive footage in higher video quality."), + parent_param="DeviceManagement", + reboot_required=True, + tuning_level=2, + ), + ToggleDefinition( + title=("Low-Voltage Cutoff"), + param="LowVoltageShutdown", + description=("While parked, if the battery voltage falls below the set level, the device shuts down to prevent excessive battery drain."), + max_value=12.5, + min_value=11.8, + parent_param="DeviceManagement", + step=0.1, + toggle_type=ToggleType.NUMERIC, + tuning_level=3, + unit="volts", + ), + ToggleDefinition( + title=("Raise Temperature Limits"), + param="IncreaseThermalLimits", + description=("WARNING: Running at higher temperatures may damage your device!

Allow the device to run at higher temperatures before throttling or shutting down. Use only if you understand the risks!"), + parent_param="DeviceManagement", + tuning_level=2, + ), + ToggleDefinition( + title=("Use Konik Server"), + param="UseKonikServer", + description=("Upload driving data to \"stable.konik.ai\" instead of \"connect.comma.ai\"."), + parent_param="DeviceManagement", + reboot_required=True, + tuning_level=2, + ), + ToggleDefinition( + title=("Screen Settings"), + param="ScreenManagement", + description=("Settings that control screen brightness, screen recording, and timeout duration."), + icon="../../../frogpilot/assets/toggle_icons/icon_light.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Screen Brightness (Offroad)"), + param="ScreenBrightness", + description=("The screen brightness while not driving."), + max_value=101, + min_value=1, + parent_param="ScreenManagement", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + value_map={0: "Screen Off", 101: "Auto"}, + ), + ToggleDefinition( + title=("Screen Brightness (Onroad)"), + param="ScreenBrightnessOnroad", + description=("The screen brightness while driving."), + max_value=101, + min_value=0, + parent_param="ScreenManagement", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + value_map={0: "Screen Off", 101: "Auto"}, + ), + ToggleDefinition( + title=("Screen Recorder"), + param="ScreenRecorder", + description=("Add a button to the driving screen to record the display."), + parent_param="ScreenManagement", + tuning_level=2, + ), + ToggleDefinition( + title=("Screen Timeout (Offroad)"), + param="ScreenTimeout", + description=("How long the screen stays on after being tapped while not driving."), + max_value=60, + min_value=5, + parent_param="ScreenManagement", + step=5, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="seconds", + ), + ToggleDefinition( + title=("Screen Timeout (Onroad)"), + param="ScreenTimeoutOnroad", + description=("How long the screen stays on after being tapped while driving."), + max_value=60, + min_value=5, + parent_param="ScreenManagement", + step=5, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="seconds", + ), + ToggleDefinition( + title=("Standby Mode"), + param="StandbyMode", + description=("Turn the screen off while driving and automatically wake it up for alerts or engagement state changes."), + parent_param="ScreenManagement", + tuning_level=1, + ), +) + + +THEME_TOGGLES = ( + ToggleDefinition( + title=("Custom Themes"), + param="PersonalizeOpenpilot", + description=("The overall look and feel of openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), + icon="../../../frogpilot/assets/toggle_icons/icon_frog.png", + toggle_type=ToggleType.MANAGE, + tuning_level=0, + ), + ToggleDefinition( + title=("Color Scheme"), + param="CustomColors", + button_labels=["DELETE", "DOWNLOAD", "SELECT"], + description=("The color scheme used throughout openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), + parent_param="PersonalizeOpenpilot", + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Distance Button"), + param="CustomDistanceIcons", + button_labels=["DELETE", "DOWNLOAD", "SELECT"], + depends_on=["OnroadDistanceButton", "QOLVisuals"], + description=("The distance button icons shown on the driving screen. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), + parent_param="PersonalizeOpenpilot", + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Icon Pack"), + param="CustomIcons", + button_labels=["DELETE", "DOWNLOAD", "SELECT"], + description=("The icon style used across openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), + parent_param="PersonalizeOpenpilot", + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Sound Pack"), + param="CustomSounds", + button_labels=["DELETE", "DOWNLOAD", "SELECT"], + description=("The sound pack used by openpilot. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), + parent_param="PersonalizeOpenpilot", + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Steering Wheel"), + param="WheelIcon", + button_labels=["DELETE", "DOWNLOAD", "SELECT"], + description=("The steering-wheel icon shown at the top-right of the driving screen. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), + parent_param="PersonalizeOpenpilot", + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Turn Signal"), + param="CustomSignals", + button_labels=["DELETE", "DOWNLOAD", "SELECT"], + description=("Themed turn-signal animations. Use the \"Theme Maker\" in \"The Pond\" to create and share your own themes!"), + parent_param="PersonalizeOpenpilot", + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Holiday Themes"), + param="HolidayThemes", + description=("Themes based on U.S. holidays. Minor holidays last one day; major holidays (Christmas, Easter, Halloween) run for a full week."), + icon="../../../frogpilot/assets/toggle_icons/icon_calendar.png", + tuning_level=0, + ), + ToggleDefinition( + title=("Rainbow Path"), + param="RainbowPath", + description=("Color the driving path like a Mario Kart–style \"Rainbow Road\"."), + icon="../../../frogpilot/assets/toggle_icons/icon_rainbow.png", + tuning_level=1, + ), + ToggleDefinition( + title=("Random Events"), + param="RandomEvents", + description=("Occasional on-screen effects triggered by driving conditions. These are purely a visual and don't impact how openpilot drives!"), + icon="../../../frogpilot/assets/toggle_icons/icon_random.png", + tuning_level=1, + ), + ToggleDefinition( + title=("Random Themes"), + param="RandomThemes", + depends_on=["PersonalizeOpenpilot"], + description=("Pick a random theme between each drive from the themes you have downloaded. Great for variety without changing settings while driving."), + icon="../../../frogpilot/assets/toggle_icons/icon_random_themes.png", + tuning_level=1, + ), +) + + +VEHICLE_SETTINGS_TOGGLES = ( + ToggleDefinition( + title=("Disable Automatic Fingerprint Detection"), + param="ForceFingerprint", + description=("Force the selected fingerprint and prevent it from ever changing."), + tuning_level=2, + ), + ToggleDefinition( + title=("Disable openpilot Longitudinal Control"), + param="DisableOpenpilotLongitudinal", + description=("Disable openpilot longitudinal and use the car's stock ACC instead."), + reboot_required=True, + tuning_level=0, + ), + ToggleDefinition( + title=("General Motors Settings"), + param="GMToggles", + button_labels=["MANAGE"], + car_params=["gm_brand"], + description=("FrogPilot features for General Motors vehicles."), + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("FrogsGoMoo's Experimental Tune"), + param="ExperimentalGMTune", + car_params=["gm_brand", "openpilot_longitudinal"], + description=("Experimental GM tune by FrogsGoMoo that attempts to smoothen stopping and takeoff control. Use at your own risk!"), + parent_param="GMToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Smooth Pedal Response on Hills"), + param="LongPitch", + car_params=["gm_brand", "openpilot_longitudinal"], + description=("Smoothen acceleration and braking when driving downhill/uphill."), + parent_param="GMToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Stop-and-Go Hack"), + param="VoltSNG", + car_params=["gm_brand", "chevrolet_volt_model"], + description=("Force stop-and-go on the 2017 Chevy Volt."), + parent_param="GMToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Hyundai/Kia/Genesis Settings"), + param="HKGToggles", + button_labels=["MANAGE"], + car_params=["hyundai_brand"], + description=("FrogPilot features for Genesis, Hyundai, and Kia vehicles."), + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("comma's New Longitudinal API"), + param="NewLongAPI", + car_params=["hyundai_brand", "openpilot_longitudinal"], + description=("comma's new gas and brake control system that improves acceleration and braking but may cause issues on some Genesis/Hyundai/Kia vehicles."), + parent_param="HKGToggles", + tuning_level=3, + ), + ToggleDefinition( + title=("\"Taco Bell Run\" Torque Hack"), + param="TacoTuneHacks", + car_params=["hyundai_brand", "hyundai_canfd_platform"], + description=("The steering torque hack from comma's 2022 \"Taco Bell Run\". Designed to increase steering torque at low speeds for left and right turns."), + parent_param="HKGToggles", + reboot_required=True, + tuning_level=2, + ), + ToggleDefinition( + title=("Acura/Honda Settings"), + param="HondaToggles", + button_labels=["MANAGE"], + car_params=["honda_brand"], + description=("FrogPilot features for Acura and Honda vehicles."), + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Gentle Following"), + param="HondaAltTune", + car_params=["honda_brand", "openpilot_longitudinal", "honda_nidec_platform"], + description=("Reduces jerky acceleration and braking when following a lead vehicle. Ideal for stop-and-go traffic."), + parent_param="HondaToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Increased Braking Force"), + param="HondaMaxBrake", + car_params=["honda_brand", "openpilot_longitudinal", "honda_nidec_platform"], + description=("Increases the maximum braking force for improved stopping performance."), + parent_param="HondaToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Responsive Pedal at Low Speeds"), + param="HondaLowSpeedPedal", + car_params=["honda_brand", "openpilot_longitudinal", "gas_interceptor"], + description=("Improves acceleration from a standstill for a more responsive throttle feel in city driving."), + parent_param="HondaToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Subaru Settings"), + param="SubaruToggles", + button_labels=["MANAGE"], + car_params=["subaru_brand"], + description=("FrogPilot features for Subaru vehicles."), + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Stop and Go"), + param="SubaruSNG", + car_params=["subaru_brand", "!subaru_global_gen2", "!subaru_hybrid"], + description=("Stop and go for supported Subaru vehicles."), + parent_param="SubaruToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Toyota/Lexus Settings"), + param="ToyotaToggles", + button_labels=["MANAGE"], + car_params=["toyota_brand"], + description=("FrogPilot features for Lexus and Toyota vehicles."), + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Automatically Lock/Unlock Doors"), + param="ToyotaDoors", + button_labels=["Lock", "Unlock"], + button_options=["LockDoors", "UnlockDoors"], + car_params=["toyota_brand"], + description=("Automatically lock/unlock doors when shifting in and out of drive."), + parent_param="ToyotaToggles", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=0, + ), + ToggleDefinition( + title=("Lock"), + param="LockDoors", + car_params=["toyota_brand"], + description=("Automatically lock doors when shifting into drive."), + parent_param="ToyotaDoors", + tuning_level=0, + ), + ToggleDefinition( + title=("Unlock"), + param="UnlockDoors", + car_params=["toyota_brand"], + description=("Automatically unlock doors when shifting out of drive."), + parent_param="ToyotaDoors", + tuning_level=0, + ), + ToggleDefinition( + title=("Dashboard Speed Offset"), + param="ClusterOffset", + button_labels=["Reset"], + car_params=["toyota_brand"], + description=("The speed offset openpilot uses to match the speed on the dashboard display."), + max_value=1.050, + min_value=1.000, + parent_param="ToyotaToggles", + step=0.001, + toggle_type=ToggleType.NUMERIC_WITH_BUTTON, + tuning_level=2, + unit="x", + ), + ToggleDefinition( + title=("FrogsGoMoo's Personal Tweaks"), + param="FrogsGoMoosTweak", + car_params=["toyota_brand", "openpilot_longitudinal"], + description=("Personal tweaks by FrogsGoMoo for quicker acceleration and smoother braking."), + parent_param="ToyotaToggles", + tuning_level=2, + ), + ToggleDefinition( + title=("Lock Doors On Ignition Off After"), + param="LockDoorsTimer", + car_params=["toyota_brand"], + description=("Automatically lock the doors on ignition off when no one is detected in the front seats."), + max_value=300, + min_value=0, + parent_param="ToyotaToggles", + step=5, + toggle_type=ToggleType.NUMERIC, + tuning_level=0, + unit="seconds", + value_map={0: "Never"}, + ), + ToggleDefinition( + title=("Stop-and-Go Hack"), + param="SNGHack", + car_params=["toyota_brand", "openpilot_longitudinal", "!gas_interceptor", "!stock_sng"], + description=("Force stop-and-go on Lexus/Toyota vehicles without stock stop-and-go functionality."), + parent_param="ToyotaToggles", + tuning_level=2, + ), +) + + +APPEARANCE_TOGGLES = ( + ToggleDefinition( + title=("Advanced UI Controls"), + param="AdvancedCustomUI", + description=("Advanced visual changes to fine-tune how the driving screen looks."), + icon="../../../frogpilot/assets/toggle_icons/icon_advanced_device.png", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Hide Current Speed"), + param="HideSpeed", + description=("Hide the current speed from the driving screen."), + parent_param="AdvancedCustomUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Hide Lead Marker"), + param="HideLeadMarker", + car_params=["openpilot_longitudinal"], + description=("Hide the lead-vehicle marker from the driving screen."), + parent_param="AdvancedCustomUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Hide Map Settings Button"), + param="HideMapIcon", + button_labels=["Hide Map"], + button_options=["HideMap"], + description=("Hide the map settings button or map from the driving screen."), + parent_param="AdvancedCustomUI", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=2, + ), + ToggleDefinition( + title=("Hide Max Speed"), + param="HideMaxSpeed", + description=("Hide the max speed from the driving screen."), + parent_param="AdvancedCustomUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Hide Non-Critical Alerts"), + param="HideAlerts", + description=("Hide non-critical alerts from the driving screen."), + parent_param="AdvancedCustomUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Hide Speed Limits"), + param="HideSpeedLimit", + car_params=["openpilot_longitudinal"], + depends_on=["SpeedLimitController"], + description=("Hide posted speed limits from the driving screen."), + parent_param="AdvancedCustomUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Use Wheel Speed"), + param="WheelSpeed", + description=("Use the vehicle's wheel speed instead of the cluster speed. This is purely a visual change and doesn't impact how openpilot drives!"), + parent_param="AdvancedCustomUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Developer UI"), + param="DeveloperUI", + description=("Detailed information about openpilot's internal operations."), + icon="../../../frogpilot/assets/toggle_icons/icon_advanced_device.png", + toggle_type=ToggleType.MANAGE, + tuning_level=3, + ), + ToggleDefinition( + title=("Developer Metrics"), + param="DeveloperMetrics", + description=("Performance data, sensor readings, and system metrics for debugging and optimizing openpilot."), + parent_param="DeveloperUI", + toggle_type=ToggleType.MANAGE, + tuning_level=3, + ), + ToggleDefinition( + title=("Adjacent Lane Metrics"), + param="AdjacentPathMetrics", + description=("Show the width of the adjacent lanes."), + parent_param="DeveloperMetrics", + tuning_level=3, + ), + ToggleDefinition( + title=("Border Metrics"), + param="BorderMetrics", + button_labels=["Blind Spot", "Steering Torque", "Turn Signal"], + button_options=["BlindSpotMetrics", "ShowSteering", "SignalMetrics"], + description=("Show statuses along the border of the driving screen.

Blind Spot: The border turns red when a vehicle is in a blind spot
Steering Torque: The border goes from green to red according to how much steering torque is being used
Turn Signal: The border flashes yellow when a turn signal is on"), + parent_param="DeveloperMetrics", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=3, + ), + ToggleDefinition( + title=("Blind Spot"), + param="BlindSpotMetrics", + car_params=["blind_spot_monitoring"], + description=("Turn the border red when a vehicle is in a blind spot."), + parent_param="BorderMetrics", + tuning_level=3, + ), + ToggleDefinition( + title=("Steering Torque"), + param="ShowSteering", + description=("Color the border from green to red based on steering torque usage."), + parent_param="BorderMetrics", + tuning_level=3, + ), + ToggleDefinition( + title=("Turn Signal"), + param="SignalMetrics", + description=("Flash the border yellow when the turn signal is on."), + parent_param="BorderMetrics", + tuning_level=3, + ), + ToggleDefinition( + title=("Lead Info"), + param="LeadInfo", + description=("Show each tracked vehicle's distance and speed below its marker."), + parent_param="DeveloperMetrics", + tuning_level=3, + ), + ToggleDefinition( + title=("FPS Display"), + param="FPSCounter", + description=("Show the frames per second (FPS) at the bottom of the driving screen."), + parent_param="DeveloperMetrics", + tuning_level=3, + ), + ToggleDefinition( + title=("Numerical Temperature Gauge"), + param="NumericalTemp", + button_labels=["Fahrenheit"], + button_options=["Fahrenheit"], + description=("Show a numerical temperature in the sidebar instead of the status labels."), + parent_param="DeveloperMetrics", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=3, + ), + ToggleDefinition( + title=("Sidebar Metrics"), + param="SidebarMetrics", + button_labels=["CPU", "GPU", "IP", "RAM", "SSD Left", "SSD Used"], + button_options=["ShowCPU", "ShowGPU", "ShowIP", "ShowMemoryUsage", "ShowStorageLeft", "ShowStorageUsed"], + description=("Display system information (CPU, GPU, RAM usage, IP address, device storage) in the sidebar."), + parent_param="DeveloperMetrics", + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Use International System of Units"), + param="UseSI", + description=("Display measurements using the \"International System of Units\" (SI) standard."), + parent_param="DeveloperMetrics", + tuning_level=3, + ), + ToggleDefinition( + title=("Developer Sidebar"), + param="DeveloperSidebar", + description=("Display debugging info and metrics in a dedicated sidebar on the right side of the screen."), + parent_param="DeveloperUI", + toggle_type=ToggleType.MANAGE, + tuning_level=3, + ), + ToggleDefinition( + title=("Metric #1"), + param="DeveloperSidebarMetric1", + button_labels=["SELECT"], + description=("Select the metric shown in the first \"Developer Sidebar\" widget."), + parent_param="DeveloperSidebar", + toggle_type=ToggleType.BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Metric #2"), + param="DeveloperSidebarMetric2", + button_labels=["SELECT"], + description=("Select the metric shown in the second \"Developer Sidebar\" widget."), + parent_param="DeveloperSidebar", + toggle_type=ToggleType.BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Metric #3"), + param="DeveloperSidebarMetric3", + button_labels=["SELECT"], + description=("Select the metric shown in the third \"Developer Sidebar\" widget."), + parent_param="DeveloperSidebar", + toggle_type=ToggleType.BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Metric #4"), + param="DeveloperSidebarMetric4", + button_labels=["SELECT"], + description=("Select the metric shown in the fourth \"Developer Sidebar\" widget."), + parent_param="DeveloperSidebar", + toggle_type=ToggleType.BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Metric #5"), + param="DeveloperSidebarMetric5", + button_labels=["SELECT"], + description=("Select the metric shown in the fifth \"Developer Sidebar\" widget."), + parent_param="DeveloperSidebar", + toggle_type=ToggleType.BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Metric #6"), + param="DeveloperSidebarMetric6", + button_labels=["SELECT"], + description=("Select the metric shown in the sixth \"Developer Sidebar\" widget."), + parent_param="DeveloperSidebar", + toggle_type=ToggleType.BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Metric #7"), + param="DeveloperSidebarMetric7", + button_labels=["SELECT"], + description=("Select the metric shown in the seventh \"Developer Sidebar\" widget."), + parent_param="DeveloperSidebar", + toggle_type=ToggleType.BUTTON, + tuning_level=3, + ), + ToggleDefinition( + title=("Developer Widgets"), + param="DeveloperWidgets", + description=("Overlays for debugging visuals, internal states, and model predictions on the driving screen."), + parent_param="DeveloperUI", + toggle_type=ToggleType.MANAGE, + tuning_level=3, + ), + ToggleDefinition( + title=("Adjacent Leads Tracking"), + param="AdjacentLeadsUI", + description=("Display adjacent leads detected by the car's radar to the left and right of the current driving path."), + parent_param="DeveloperWidgets", + tuning_level=3, + ), + ToggleDefinition( + title=("Model Stopping Point"), + param="ShowStoppingPoint", + car_params=["openpilot_longitudinal"], + button_labels=["Show Distance"], + button_options=["ShowStoppingPointMetrics"], + description=("Show a stop-sign marker where the model intends to stop."), + parent_param="DeveloperWidgets", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=3, + ), + ToggleDefinition( + title=("Radar Tracks"), + param="RadarTracksUI", + description=("Display all radar points produced by the car's radar."), + parent_param="DeveloperWidgets", + tuning_level=3, + ), + ToggleDefinition( + title=("Driving Screen Widgets"), + param="CustomUI", + description=("Custom FrogPilot widgets for the driving screen."), + icon="../assets/icons/calibration.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Acceleration Path"), + param="AccelerationPath", + car_params=["openpilot_longitudinal"], + description=("Color the driving path by planned acceleration and braking."), + parent_param="CustomUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Adjacent Lanes"), + param="AdjacentPath", + description=("Show the driving paths for the left and right lanes."), + parent_param="CustomUI", + tuning_level=3, + ), + ToggleDefinition( + title=("Blind Spot Path"), + param="BlindSpotPath", + car_params=["blind_spot_monitoring"], + description=("Show a red path when a vehicle is in that lane's blind spot."), + parent_param="CustomUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Compass"), + param="Compass", + description=("Show the current driving direction with a simple on-screen compass."), + parent_param="CustomUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Driving Personality Button"), + param="OnroadDistanceButton", + car_params=["openpilot_longitudinal"], + description=("Control and view the current driving personality via a driving screen widget."), + parent_param="CustomUI", + tuning_level=0, + ), + ToggleDefinition( + title=("Gas / Brake Pedal Indicators"), + param="PedalsOnUI", + button_labels=["Dynamic", "Static"], + button_options=["DynamicPedalsOnUI", "StaticPedalsOnUI"], + car_params=["openpilot_longitudinal"], + description=("On-screen gas and brake indicators.

Dynamic: Opacity changes according to how much openpilot is accelerating or braking
Static: Full when active, dim when not"), + parent_param="CustomUI", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=1, + ), + ToggleDefinition( + title=("Dynamic"), + param="DynamicPedalsOnUI", + car_params=["openpilot_longitudinal"], + description=("Show dynamic pedal indicator intensity based on acceleration/braking amount."), + parent_param="PedalsOnUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Static"), + param="StaticPedalsOnUI", + car_params=["openpilot_longitudinal"], + description=("Show static pedal indicators that are full when active and dim when inactive."), + parent_param="PedalsOnUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Rotating Steering Wheel"), + param="RotatingWheel", + description=("Rotate the driving screen wheel with the physical steering wheel."), + parent_param="CustomUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Model UI"), + param="ModelUI", + description=("Model visualizations for the driving path, lane lines, path edges, and road edges."), + icon="../../../frogpilot/assets/toggle_icons/icon_road.png", + toggle_type=ToggleType.MANAGE, + tuning_level=2, + ), + ToggleDefinition( + title=("Dynamic Path Width"), + param="DynamicPathWidth", + description=("Change the path width based on engagement.

Fully Engaged: 100%
Always On Lateral: 75%
Disengaged: 50%"), + parent_param="ModelUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Lane Lines Width"), + param="LaneLinesWidth", + description=("Set the lane-line thickness.

Default matches the MUTCD lane-line width standard of 4 inches."), + max_value=24, + min_value=0, + parent_param="ModelUI", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="inches", + ), + ToggleDefinition( + title=("Path Edges Width"), + param="PathEdgeWidth", + description=("Set the driving-path edge width that represents different driving modes and statuses.

Default is 20% of the total path width.

Color Guide:

- Light Blue: Always On Lateral
- Green: Default
- Orange: Experimental Mode
- Red: Traffic Mode
- Yellow: Conditional Experimental Mode overridden"), + max_value=100, + min_value=0, + parent_param="ModelUI", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="%", + value_map={0: "Off"}, + ), + ToggleDefinition( + title=("Path Width"), + param="PathWidth", + description=("Set the driving-path width.

Default (6.1 feet) matches the width of a 2019 Lexus ES 350."), + max_value=10, + min_value=0, + parent_param="ModelUI", + step=0.1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="feet", + value_map={0: "Off"}, + ), + ToggleDefinition( + title=("Road Edges Width"), + param="RoadEdgesWidth", + description=("Set the road-edge thickness.

Default matches half of the MUTCD lane-line width standard of 4 inches."), + max_value=24, + min_value=0, + parent_param="ModelUI", + step=1, + toggle_type=ToggleType.NUMERIC, + tuning_level=2, + unit="inches", + ), + ToggleDefinition( + title=("\"Unlimited\" Road UI"), + param="UnlimitedLength", + description=("Extend the length of the driving path, lane lines, and road edges for as far as the model can see."), + parent_param="ModelUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Navigation Widgets"), + param="NavigationUI", + description=("Speed limits, and other navigation widgets."), + icon="../../../frogpilot/assets/toggle_icons/icon_map.png", + toggle_type=ToggleType.MANAGE, + tuning_level=1, + ), + ToggleDefinition( + title=("Larger Map Display"), + param="BigMap", + button_labels=["Full Map"], + button_options=["FullMap"], + description=("Increase the map size for easier navigation readings."), + parent_param="NavigationUI", + toggle_type=ToggleType.BUTTON_TOGGLE, + tuning_level=2, + ), + ToggleDefinition( + title=("Map Style"), + param="MapStyle", + description=("Select the map style for \"Navigate on openpilot\" (NOO):

Stock openpilot: Default comma.ai style
FrogPilot: Official FrogPilot map style
Mapbox Streets: Standard street-focused view
Mapbox Outdoors: Emphasizes outdoor and terrain features
Mapbox Light: Minimalist, bright theme
Mapbox Dark: Minimalist, dark theme
Mapbox Navigation Day: Optimized for daytime navigation
Mapbox Navigation Night: Optimized for nighttime navigation
Mapbox Satellite: Satellite imagery only
Mapbox Satellite Streets: Hybrid satellite imagery with street labels
Mapbox Traffic Night: Dark theme emphasizing traffic conditions
Mike's Personalized Style: Customized hybrid satellite view"), + parent_param="NavigationUI", + tuning_level=2, + ), + ToggleDefinition( + title=("Road Name"), + param="RoadNameUI", + description=("Display the road name at the bottom of the driving screen using data from \"OpenStreetMap (OSM)\"."), + parent_param="NavigationUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Show Speed Limits"), + param="ShowSpeedLimits", + depends_on=["!SpeedLimitController"], + description=("Show speed limits in the top-left corner of the driving screen. Uses data from the car's dashboard (if supported) and \"OpenStreetMap (OSM)\"."), + parent_param="NavigationUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Show Speed Limits from Mapbox"), + param="SLCMapboxFiller", + depends_on=["!SpeedLimitController", "MapboxSecretKey", "ShowSpeedLimits"], + description=("Use Mapbox speed-limit data when no other source is available."), + parent_param="NavigationUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Use Vienna-Style Speed Signs"), + param="UseVienna", + depends_on=["ShowSpeedLimits", "SpeedLimitController"], + description=("Show Vienna-style (EU) speed-limit signs instead of MUTCD (US)."), + parent_param="NavigationUI", + tuning_level=1, + ), + ToggleDefinition( + title=("Quality of Life"), + param="QOLVisuals", + description=("Miscellaneous visual changes to fine-tune how the driving screen looks."), + icon="../../../frogpilot/assets/toggle_icons/icon_quality_of_life.png", + toggle_type=ToggleType.MANAGE, + tuning_level=0, + ), + ToggleDefinition( + title=("Camera View"), + param="CameraView", + button_labels=["SELECT"], + button_options=["Auto", "Driver", "Standard", "Wide"], + description=("Select the active camera view. This is purely a visual change and doesn't impact how openpilot drives!"), + parent_param="QOLVisuals", + toggle_type=ToggleType.BUTTON_PARAM, + tuning_level=2, + ), + ToggleDefinition( + title=("Show Driver Camera When In Reverse"), + param="DriverCamera", + description=("Show the driver camera feed when the vehicle is in reverse."), + parent_param="QOLVisuals", + tuning_level=1, + ), + ToggleDefinition( + title=("Stopped Timer"), + param="StoppedTimer", + description=("Show a timer when stopped in place of the current speed to indicate how long the vehicle has been stopped."), + parent_param="QOLVisuals", + tuning_level=1, + ), +) + + +WHEEL_CONTROLS_TOGGLES = ( + ToggleDefinition( + title=("Distance Button"), + param="DistanceButtonControl", + button_labels=["SELECT"], + description=("Action performed when the \"Distance\" button is pressed."), + icon="../../../frogpilot/assets/toggle_icons/icon_mute.png", + toggle_type=ToggleType.BUTTON, + tuning_level=2, + ), + ToggleDefinition( + title=("Distance Button (Long Press)"), + param="LongDistanceButtonControl", + button_labels=["SELECT"], + description=("Action performed when the \"Distance\" button is pressed for more than 0.5 seconds."), + icon="../../../frogpilot/assets/toggle_icons/icon_mute.png", + toggle_type=ToggleType.BUTTON, + tuning_level=2, + ), + ToggleDefinition( + title=("Distance Button (Very Long Press)"), + param="VeryLongDistanceButtonControl", + button_labels=["SELECT"], + description=("Action performed when the \"Distance\" button is pressed for more than 2.5 seconds."), + icon="../../../frogpilot/assets/toggle_icons/icon_mute.png", + toggle_type=ToggleType.BUTTON, + tuning_level=2, + ), + ToggleDefinition( + title=("LKAS Button"), + param="LKASButtonControl", + button_labels=["SELECT"], + car_params=["!subaru_brand"], + depends_on=["!AlwaysOnLateral", "!AlwaysOnLateralLKAS"], + description=("Action performed when the \"LKAS\" button is pressed."), + icon="../../../frogpilot/assets/toggle_icons/icon_mute.png", + toggle_type=ToggleType.BUTTON, + tuning_level=2, + ), +) + + +NAVIGATION_TOGGLES = ( + ToggleDefinition( + title=("Public Mapbox Key"), + param="MapboxPublicKey", + button_labels=["ADD", "TEST"], + description=("Manage your Public Mapbox Key."), + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Secret Mapbox Key"), + param="MapboxSecretKey", + button_labels=["ADD", "TEST"], + description=("Manage your Secret Mapbox Key."), + toggle_type=ToggleType.MULTI_BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Automatically Update Maps"), + param="PreferredSchedule", + button_labels=["SELECT"], + button_options=["Never", "Weekly", "Monthly"], + description=("How often maps update from \"OpenStreetMap (OSM)\" with the latest speed limit information. Weekly updates run every Sunday; monthly updates run on the 1st."), + toggle_type=ToggleType.BUTTON_PARAM, + tuning_level=0, + ), + ToggleDefinition( + title=("Speed Limit Filler"), + param="SpeedLimitFiller", + description=("Automatically collect missing or incorrect speed limits while you drive using speeds limits sourced from your dashboard (if supported), Mapbox, and \"Navigate on openpilot\".

When you're parked and connected to Wi-Fi, FrogPilot will automatically processes this data into a file to be used with the tool located at \"SpeedLimitFiller.frogpilot.com\".

You can download this file from \"The Pond\" in the \"Download Speed Limits\" menu.

Need a step-by-step guide? Visit #speed-limit-filler in the FrogPilot Discord!"), + tuning_level=0, + ), +) + + +UTILITIES_TOGGLES = ( + ToggleDefinition( + title=("Debug Mode"), + param="DebugMode", + description=("Use all of FrogPilot's developer metrics on your next drive to diagnose issues and improve bug reports."), + tuning_level=0, + ), + ToggleDefinition( + title=("Reset Toggles to Default"), + param="DoToggleReset", + button_labels=["RESET"], + description=("Reset all toggles to their default values."), + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), + ToggleDefinition( + title=("Reset Toggles to Stock openpilot"), + param="DoToggleResetStock", + button_labels=["RESET"], + description=("Reset all toggles to match stock openpilot."), + toggle_type=ToggleType.BUTTON, + tuning_level=0, + ), +) + diff --git a/frogpilot/ui/qt/offroad/data_settings.cc b/frogpilot/ui/qt/offroad/data_settings.cc index 4b4e82dc4..27e8d731e 100644 --- a/frogpilot/ui/qt/offroad/data_settings.cc +++ b/frogpilot/ui/qt/offroad/data_settings.cc @@ -650,10 +650,10 @@ void FrogPilotDataPanel::updateStatsLabels(FrogPilotListWidget *labelsList) { {"FrogPilotSeconds", {tr("Total Driving Time"), "time"}}, {"FrogSqueaks", {tr("Total Frog Squeaks"), "count"}}, {"GoatScreams", {tr("Total Goat Screams"), "count"}}, - {"HighestAcceleration", {tr("Highest Acceleration Rate"), "accel"}}, {"LateralTime", {tr("Time Using Lateral Control"), "timePercent"}}, {"LongestDistanceWithoutOverride", {tr("Longest Distance Without an Override"), "distance"}}, {"LongitudinalTime", {tr("Time Using Longitudinal Control"), "timePercent"}}, + {"MaxAcceleration", {tr("Highest Acceleration Rate"), "accel"}}, {"ModelTimes", {tr("Driving Models:"), "parent"}}, {"Month", {tr("Month"), "other"}}, {"NightTime", {tr("Time Driving (Nighttime)"), "timePercent"}}, diff --git a/frogpilot/ui/qt/offroad/device_settings.cc b/frogpilot/ui/qt/offroad/device_settings.cc index 40a147dce..c7a9ecf67 100644 --- a/frogpilot/ui/qt/offroad/device_settings.cc +++ b/frogpilot/ui/qt/offroad/device_settings.cc @@ -48,13 +48,7 @@ FrogPilotDevicePanel::FrogPilotDevicePanel(FrogPilotSettingsWindow *parent) : Fr {"ScreenRecorder", tr("Screen Recorder"), tr("Add a button to the driving screen to record the display."), ""}, {"ScreenTimeout", tr("Screen Timeout (Offroad)"), tr("How long the screen stays on after being tapped while not driving."), ""}, {"ScreenTimeoutOnroad", tr("Screen Timeout (Onroad)"), tr("How long the screen stays on after being tapped while driving."), ""}, - {"StandbyMode", tr("Standby Mode"), tr("Turn the screen off while driving and automatically wake it up for alerts or engagement state changes."), ""}, - - {"IgnoreMe", "Ignore Me", "This is simply used to fix the layout when the user opens the descriptions and the menu gets wonky. No idea why it happens, but I can't be asked to properly fix it so whatever. Sue me.", ""}, - {"IgnoreMe2", "Ignore Me", "This is simply used to fix the layout when the user opens the descriptions and the menu gets wonky. No idea why it happens, but I can't be asked to properly fix it so whatever. Sue me.", ""}, - {"IgnoreMe3", "Ignore Me", "This is simply used to fix the layout when the user opens the descriptions and the menu gets wonky. No idea why it happens, but I can't be asked to properly fix it so whatever. Sue me.", ""}, - {"IgnoreMe4", "Ignore Me", "This is simply used to fix the layout when the user opens the descriptions and the menu gets wonky. No idea why it happens, but I can't be asked to properly fix it so whatever. Sue me.", ""}, - {"IgnoreMe5", "Ignore Me", "This is simply used to fix the layout when the user opens the descriptions and the menu gets wonky. No idea why it happens, but I can't be asked to properly fix it so whatever. Sue me.", ""} + {"StandbyMode", tr("Standby Mode"), tr("Turn the screen off while driving and automatically wake it up for alerts or engagement state changes."), ""} }; for (const auto &[param, title, desc, icon] : deviceToggles) { diff --git a/frogpilot/ui/qt/offroad/frogpilot_settings.cc b/frogpilot/ui/qt/offroad/frogpilot_settings.cc index 19300498d..4c3171fe6 100644 --- a/frogpilot/ui/qt/offroad/frogpilot_settings.cc +++ b/frogpilot/ui/qt/offroad/frogpilot_settings.cc @@ -231,6 +231,8 @@ void FrogPilotSettingsWindow::updateTuningLevel() { } void FrogPilotSettingsWindow::showEvent(QShowEvent *event) { + updateTuningLevel(); + static bool alertShown = false; if (forceOpenDescriptions) { diff --git a/frogpilot/ui/qt/offroad/lateral_settings.cc b/frogpilot/ui/qt/offroad/lateral_settings.cc index aa7a9c8c6..dcf154394 100644 --- a/frogpilot/ui/qt/offroad/lateral_settings.cc +++ b/frogpilot/ui/qt/offroad/lateral_settings.cc @@ -66,10 +66,7 @@ FrogPilotLateralPanel::FrogPilotLateralPanel(FrogPilotSettingsWindow *parent) : {"NNFFLite", tr("Neural Network Feedforward (NNFF) Lite"), tr("A lightweight version of Twilsonco's \"Neural Network FeedForward\" controller. Uses the \"look-ahead\" planned lateral jerk logic from the full model to help smoothen steering adjustments in curves, but does not use the full neural network for torque calculation."), ""}, {"QOLLateral", tr("Quality of Life"), tr("Steering control changes to fine-tune how openpilot drives."), "../../frogpilot/assets/toggle_icons/icon_quality_of_life.png"}, - {"PauseLateralSpeed", tr("Pause Steering Below"), tr("Pause steering below the set speed."), ""}, - - {"IgnoreMe", "Ignore Me", "This is simply used to fix the layout when the user opens the descriptions and the menu gets wonky. No idea why it happens, but I can't be asked to properly fix it so whatever. Sue me.", ""}, - {"IgnoreMe2", "Ignore Me", "This is simply used to fix the layout when the user opens the descriptions and the menu gets wonky. No idea why it happens, but I can't be asked to properly fix it so whatever. Sue me.", ""} + {"PauseLateralSpeed", tr("Pause Steering Below"), tr("Pause steering below the set speed."), ""} }; for (const auto &[param, title, desc, icon] : lateralToggles) { diff --git a/frogpilot/ui/qt/offroad/theme_settings.cc b/frogpilot/ui/qt/offroad/theme_settings.cc index 04063c708..cfb56cecf 100644 --- a/frogpilot/ui/qt/offroad/theme_settings.cc +++ b/frogpilot/ui/qt/offroad/theme_settings.cc @@ -67,6 +67,7 @@ void deleteThemeAsset(QDir &directory, const QString &subFolder, const QString & void downloadThemeAsset(const QString &input, const std::string ¶mKey, const QString &assetParam, Params ¶ms, Params ¶ms_memory) { QString output = input; + output.replace(" - by: ", "~"); int tilde = output.indexOf("~"); if (tilde >= 0) { output = output.left(tilde).toLower() + "~" + output.mid(tilde + 1); @@ -140,7 +141,7 @@ QStringList getThemeList(const bool &randomThemes, const QDir &themePacksDirecto if (userCreated) { displayName = parts.join(" "); } else { - displayName = (parts.size() <= 1 || useFiles) ? parts.join(" ") : QString("%1 (%2)").arg(parts[0], parts.mid(1).join(" ")); + displayName = (parts.size() <= 1 || useFiles || !baseName.contains("-")) ? parts.join(" ") : QString("%1 (%2)").arg(parts[0], parts.mid(1).join(" ")); } if (userCreated) { diff --git a/frogpilot/ui/qt/onroad/frogpilot_annotated_camera.cc b/frogpilot/ui/qt/onroad/frogpilot_annotated_camera.cc index 40c75d730..ae004cecb 100644 --- a/frogpilot/ui/qt/onroad/frogpilot_annotated_camera.cc +++ b/frogpilot/ui/qt/onroad/frogpilot_annotated_camera.cc @@ -1008,15 +1008,13 @@ void FrogPilotAnnotatedCameraWidget::paintWeather(QPainter &p, const cereal::Fro p.setPen(QPen(blackColor(), 10)); p.drawRoundedRect(weatherRect, 24, 24); - QSharedPointer icon = weatherClearDay; + QSharedPointer icon = frogpilotPlan.getWeatherDaytime() ? weatherClearDay : weatherClearNight; if ((weatherId >= 200 && weatherId <= 232) || (weatherId >= 300 && weatherId <= 321) || (weatherId >= 500 && weatherId <= 531)) { icon = weatherRain; } else if (weatherId >= 600 && weatherId <= 622) { icon = weatherSnow; } else if (weatherId >= 701 && weatherId <= 762) { icon = weatherLowVisibility; - } else if (weatherId == 800) { - icon = frogpilotPlan.getWeatherDaytime() ? weatherClearDay : weatherClearNight; } p.drawPixmap(weatherRect, icon->currentPixmap()); diff --git a/frogpilot/ui/qt/widgets/frogpilot_controls.h b/frogpilot/ui/qt/widgets/frogpilot_controls.h index 8c9baa78b..93725e581 100644 --- a/frogpilot/ui/qt/widgets/frogpilot_controls.h +++ b/frogpilot/ui/qt/widgets/frogpilot_controls.h @@ -67,7 +67,7 @@ class FrogPilotListWidget : public QWidget { outer_layout.addStretch(); } inline void addItem(QWidget *w, bool expanding = false) { - w->setSizePolicy(QSizePolicy::Preferred, expanding ? QSizePolicy::Expanding : QSizePolicy::Fixed); + w->setSizePolicy(QSizePolicy::Preferred, expanding ? QSizePolicy::Expanding : QSizePolicy::Maximum); inner_layout.addWidget(w); } inline void addItem(QLayout *layout) { inner_layout.addLayout(layout); } diff --git a/launch_env.sh b/launch_env.sh index 87f3376a7..81578aff0 100755 --- a/launch_env.sh +++ b/launch_env.sh @@ -11,5 +11,3 @@ if [ -z "$AGNOS_VERSION" ]; then fi export STAGING_ROOT="/data/safe_staging" - -eval "$(/data/openpilot/frogpilot/system/environment_variables)" diff --git a/system/sentry.py b/system/sentry.py index b40f02c4c..5093f0c5a 100644 --- a/system/sentry.py +++ b/system/sentry.py @@ -1,5 +1,4 @@ """Install exception handler for process crash.""" -import os import sentry_sdk import subprocess import traceback @@ -16,9 +15,9 @@ from openpilot.frogpilot.common.frogpilot_variables import ERROR_LOGS_PATH, para class SentryProject(Enum): # python project - SELFDRIVE = os.environ.get("SENTRY_DSN", "") + SELFDRIVE = "https://7ba43fba4cfcf1a6c0eff83d40374e43@o4505034923769856.ingest.us.sentry.io/4505034930651136" # native project - SELFDRIVE_NATIVE = os.environ.get("SENTRY_DSN", "") + SELFDRIVE_NATIVE = "https://7ba43fba4cfcf1a6c0eff83d40374e43@o4505034923769856.ingest.us.sentry.io/4505034930651136" def report_tombstone(fn: str, message: str, contents: str) -> None: @@ -119,7 +118,7 @@ def init(project: SentryProject) -> bool: short_branch = build_metadata.channel if short_branch in ["COMMA", "HEAD"]: - return + return False elif short_branch == "FrogPilot-Development": env = "Development" elif build_metadata.release_channel: diff --git a/system/updated/updated.py b/system/updated/updated.py index a3a842fbc..e18ce1577 100644 --- a/system/updated/updated.py +++ b/system/updated/updated.py @@ -196,15 +196,6 @@ def finalize_update() -> None: run(["git", "reset", "--hard"], FINALIZED) run(["git", "submodule", "foreach", "--recursive", "git", "reset", "--hard"], FINALIZED) - cloudlog.info("Starting git cleanup in finalized update") - t = time.monotonic() - try: - run(["git", "gc"], FINALIZED) - run(["git", "lfs", "prune"], FINALIZED) - cloudlog.event("Done git cleanup", duration=time.monotonic() - t) - except subprocess.CalledProcessError: - cloudlog.exception(f"Failed git cleanup, took {time.monotonic() - t:.3f} s") - if os.path.isfile(BACKUP_PATH): os.remove(BACKUP_PATH)