intuned-client 0.4.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. intuned_client/__init__.py +17 -0
  2. intuned_client/_hooks/__init__.py +4 -0
  3. intuned_client/_hooks/sdkhooks.py +74 -0
  4. intuned_client/_hooks/types.py +112 -0
  5. intuned_client/_version.py +15 -0
  6. intuned_client/authsessions.py +592 -0
  7. intuned_client/basesdk.py +368 -0
  8. intuned_client/create.py +441 -0
  9. intuned_client/errors/__init__.py +251 -0
  10. intuned_client/errors/createjobop.py +125 -0
  11. intuned_client/errors/deletejobop.py +87 -0
  12. intuned_client/errors/getjobop.py +125 -0
  13. intuned_client/errors/getjobrunop.py +125 -0
  14. intuned_client/errors/getjobrunsop.py +125 -0
  15. intuned_client/errors/getjobsop.py +125 -0
  16. intuned_client/errors/intunedclientdefaulterror.py +40 -0
  17. intuned_client/errors/intunedclienterror.py +30 -0
  18. intuned_client/errors/no_response_error.py +17 -0
  19. intuned_client/errors/pausejobop.py +125 -0
  20. intuned_client/errors/responsevalidationerror.py +27 -0
  21. intuned_client/errors/resumejobop.py +125 -0
  22. intuned_client/errors/terminatejobrunop.py +87 -0
  23. intuned_client/errors/triggerjobop.py +125 -0
  24. intuned_client/httpclient.py +125 -0
  25. intuned_client/jobs.py +1624 -0
  26. intuned_client/models/__init__.py +2350 -0
  27. intuned_client/models/createauthsessionresultop.py +241 -0
  28. intuned_client/models/createjobop.py +1408 -0
  29. intuned_client/models/createorupdateauthsessionstartop.py +144 -0
  30. intuned_client/models/deleteauthsessionop.py +45 -0
  31. intuned_client/models/deletejobop.py +69 -0
  32. intuned_client/models/getauthsessionop.py +79 -0
  33. intuned_client/models/getauthsessionsop.py +66 -0
  34. intuned_client/models/getjobop.py +1411 -0
  35. intuned_client/models/getjobrunop.py +627 -0
  36. intuned_client/models/getjobrunsop.py +621 -0
  37. intuned_client/models/getjobsop.py +1493 -0
  38. intuned_client/models/internal/__init__.py +54 -0
  39. intuned_client/models/internal/globals.py +22 -0
  40. intuned_client/models/pausejobop.py +96 -0
  41. intuned_client/models/resumejobop.py +96 -0
  42. intuned_client/models/runapiresultop.py +208 -0
  43. intuned_client/models/runapistartop.py +473 -0
  44. intuned_client/models/security.py +25 -0
  45. intuned_client/models/startauthsessionrecorderop.py +75 -0
  46. intuned_client/models/terminatejobrunop.py +92 -0
  47. intuned_client/models/triggerjobop.py +100 -0
  48. intuned_client/models/updateauthsessionresultop.py +250 -0
  49. intuned_client/models/updateauthsessionstartop.py +142 -0
  50. intuned_client/project.py +31 -0
  51. intuned_client/py.typed +1 -0
  52. intuned_client/recorder.py +227 -0
  53. intuned_client/run.py +465 -0
  54. intuned_client/runs.py +687 -0
  55. intuned_client/sdk.py +188 -0
  56. intuned_client/sdkconfiguration.py +51 -0
  57. intuned_client/types/__init__.py +21 -0
  58. intuned_client/types/basemodel.py +39 -0
  59. intuned_client/update.py +447 -0
  60. intuned_client/utils/__init__.py +200 -0
  61. intuned_client/utils/annotations.py +79 -0
  62. intuned_client/utils/datetimes.py +23 -0
  63. intuned_client/utils/enums.py +74 -0
  64. intuned_client/utils/eventstreaming.py +248 -0
  65. intuned_client/utils/forms.py +223 -0
  66. intuned_client/utils/headers.py +136 -0
  67. intuned_client/utils/logger.py +27 -0
  68. intuned_client/utils/metadata.py +118 -0
  69. intuned_client/utils/queryparams.py +205 -0
  70. intuned_client/utils/requestbodies.py +66 -0
  71. intuned_client/utils/retries.py +217 -0
  72. intuned_client/utils/security.py +192 -0
  73. intuned_client/utils/serializers.py +249 -0
  74. intuned_client/utils/unmarshal_json_response.py +24 -0
  75. intuned_client/utils/url.py +155 -0
  76. intuned_client/utils/values.py +137 -0
  77. intuned_client-0.4.1.dist-info/METADATA +883 -0
  78. intuned_client-0.4.1.dist-info/RECORD +80 -0
  79. intuned_client-0.4.1.dist-info/WHEEL +5 -0
  80. intuned_client-0.4.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,17 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from ._version import (
4
+ __title__,
5
+ __version__,
6
+ __openapi_doc_version__,
7
+ __gen_version__,
8
+ __user_agent__,
9
+ )
10
+ from .sdk import *
11
+ from .sdkconfiguration import *
12
+
13
+
14
+ VERSION: str = __version__
15
+ OPENAPI_DOC_VERSION = __openapi_doc_version__
16
+ SPEAKEASY_GENERATOR_VERSION = __gen_version__
17
+ USER_AGENT = __user_agent__
@@ -0,0 +1,4 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .sdkhooks import *
4
+ from .types import *
@@ -0,0 +1,74 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ import httpx
4
+ from .types import (
5
+ SDKInitHook,
6
+ BeforeRequestContext,
7
+ BeforeRequestHook,
8
+ AfterSuccessContext,
9
+ AfterSuccessHook,
10
+ AfterErrorContext,
11
+ AfterErrorHook,
12
+ Hooks,
13
+ )
14
+ from typing import List, Optional, Tuple
15
+ from intuned_client.sdkconfiguration import SDKConfiguration
16
+
17
+
18
+ class SDKHooks(Hooks):
19
+ def __init__(self) -> None:
20
+ self.sdk_init_hooks: List[SDKInitHook] = []
21
+ self.before_request_hooks: List[BeforeRequestHook] = []
22
+ self.after_success_hooks: List[AfterSuccessHook] = []
23
+ self.after_error_hooks: List[AfterErrorHook] = []
24
+
25
+ def register_sdk_init_hook(self, hook: SDKInitHook) -> None:
26
+ self.sdk_init_hooks.append(hook)
27
+
28
+ def register_before_request_hook(self, hook: BeforeRequestHook) -> None:
29
+ self.before_request_hooks.append(hook)
30
+
31
+ def register_after_success_hook(self, hook: AfterSuccessHook) -> None:
32
+ self.after_success_hooks.append(hook)
33
+
34
+ def register_after_error_hook(self, hook: AfterErrorHook) -> None:
35
+ self.after_error_hooks.append(hook)
36
+
37
+ def sdk_init(self, config: SDKConfiguration) -> SDKConfiguration:
38
+ for hook in self.sdk_init_hooks:
39
+ config = hook.sdk_init(config)
40
+ return config
41
+
42
+ def before_request(
43
+ self, hook_ctx: BeforeRequestContext, request: httpx.Request
44
+ ) -> httpx.Request:
45
+ for hook in self.before_request_hooks:
46
+ out = hook.before_request(hook_ctx, request)
47
+ if isinstance(out, Exception):
48
+ raise out
49
+ request = out
50
+
51
+ return request
52
+
53
+ def after_success(
54
+ self, hook_ctx: AfterSuccessContext, response: httpx.Response
55
+ ) -> httpx.Response:
56
+ for hook in self.after_success_hooks:
57
+ out = hook.after_success(hook_ctx, response)
58
+ if isinstance(out, Exception):
59
+ raise out
60
+ response = out
61
+ return response
62
+
63
+ def after_error(
64
+ self,
65
+ hook_ctx: AfterErrorContext,
66
+ response: Optional[httpx.Response],
67
+ error: Optional[Exception],
68
+ ) -> Tuple[Optional[httpx.Response], Optional[Exception]]:
69
+ for hook in self.after_error_hooks:
70
+ result = hook.after_error(hook_ctx, response, error)
71
+ if isinstance(result, Exception):
72
+ raise result
73
+ response, error = result
74
+ return response, error
@@ -0,0 +1,112 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from abc import ABC, abstractmethod
4
+ import httpx
5
+ from intuned_client.sdkconfiguration import SDKConfiguration
6
+ from typing import Any, Callable, List, Optional, Tuple, Union
7
+
8
+
9
+ class HookContext:
10
+ config: SDKConfiguration
11
+ base_url: str
12
+ operation_id: str
13
+ oauth2_scopes: Optional[List[str]] = None
14
+ security_source: Optional[Union[Any, Callable[[], Any]]] = None
15
+
16
+ def __init__(
17
+ self,
18
+ config: SDKConfiguration,
19
+ base_url: str,
20
+ operation_id: str,
21
+ oauth2_scopes: Optional[List[str]],
22
+ security_source: Optional[Union[Any, Callable[[], Any]]],
23
+ ):
24
+ self.config = config
25
+ self.base_url = base_url
26
+ self.operation_id = operation_id
27
+ self.oauth2_scopes = oauth2_scopes
28
+ self.security_source = security_source
29
+
30
+
31
+ class BeforeRequestContext(HookContext):
32
+ def __init__(self, hook_ctx: HookContext):
33
+ super().__init__(
34
+ hook_ctx.config,
35
+ hook_ctx.base_url,
36
+ hook_ctx.operation_id,
37
+ hook_ctx.oauth2_scopes,
38
+ hook_ctx.security_source,
39
+ )
40
+
41
+
42
+ class AfterSuccessContext(HookContext):
43
+ def __init__(self, hook_ctx: HookContext):
44
+ super().__init__(
45
+ hook_ctx.config,
46
+ hook_ctx.base_url,
47
+ hook_ctx.operation_id,
48
+ hook_ctx.oauth2_scopes,
49
+ hook_ctx.security_source,
50
+ )
51
+
52
+
53
+ class AfterErrorContext(HookContext):
54
+ def __init__(self, hook_ctx: HookContext):
55
+ super().__init__(
56
+ hook_ctx.config,
57
+ hook_ctx.base_url,
58
+ hook_ctx.operation_id,
59
+ hook_ctx.oauth2_scopes,
60
+ hook_ctx.security_source,
61
+ )
62
+
63
+
64
+ class SDKInitHook(ABC):
65
+ @abstractmethod
66
+ def sdk_init(self, config: SDKConfiguration) -> SDKConfiguration:
67
+ pass
68
+
69
+
70
+ class BeforeRequestHook(ABC):
71
+ @abstractmethod
72
+ def before_request(
73
+ self, hook_ctx: BeforeRequestContext, request: httpx.Request
74
+ ) -> Union[httpx.Request, Exception]:
75
+ pass
76
+
77
+
78
+ class AfterSuccessHook(ABC):
79
+ @abstractmethod
80
+ def after_success(
81
+ self, hook_ctx: AfterSuccessContext, response: httpx.Response
82
+ ) -> Union[httpx.Response, Exception]:
83
+ pass
84
+
85
+
86
+ class AfterErrorHook(ABC):
87
+ @abstractmethod
88
+ def after_error(
89
+ self,
90
+ hook_ctx: AfterErrorContext,
91
+ response: Optional[httpx.Response],
92
+ error: Optional[Exception],
93
+ ) -> Union[Tuple[Optional[httpx.Response], Optional[Exception]], Exception]:
94
+ pass
95
+
96
+
97
+ class Hooks(ABC):
98
+ @abstractmethod
99
+ def register_sdk_init_hook(self, hook: SDKInitHook):
100
+ pass
101
+
102
+ @abstractmethod
103
+ def register_before_request_hook(self, hook: BeforeRequestHook):
104
+ pass
105
+
106
+ @abstractmethod
107
+ def register_after_success_hook(self, hook: AfterSuccessHook):
108
+ pass
109
+
110
+ @abstractmethod
111
+ def register_after_error_hook(self, hook: AfterErrorHook):
112
+ pass
@@ -0,0 +1,15 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ import importlib.metadata
4
+
5
+ __title__: str = "intuned-client"
6
+ __version__: str = "0.4.1"
7
+ __openapi_doc_version__: str = "0.0.2"
8
+ __gen_version__: str = "2.739.1"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.4.1 2.739.1 0.0.2 intuned-client"
10
+
11
+ try:
12
+ if __package__ is not None:
13
+ __version__ = importlib.metadata.version(__package__)
14
+ except importlib.metadata.PackageNotFoundError:
15
+ pass