chunkify-analytics-sdk 0.9.0__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 (179) hide show
  1. chunkify_analytics/__init__.py +102 -0
  2. chunkify_analytics/_base_client.py +2153 -0
  3. chunkify_analytics/_client.py +1262 -0
  4. chunkify_analytics/_compat.py +226 -0
  5. chunkify_analytics/_constants.py +14 -0
  6. chunkify_analytics/_exceptions.py +108 -0
  7. chunkify_analytics/_files.py +173 -0
  8. chunkify_analytics/_models.py +964 -0
  9. chunkify_analytics/_qs.py +149 -0
  10. chunkify_analytics/_resource.py +43 -0
  11. chunkify_analytics/_response.py +835 -0
  12. chunkify_analytics/_streaming.py +338 -0
  13. chunkify_analytics/_types.py +274 -0
  14. chunkify_analytics/_utils/__init__.py +64 -0
  15. chunkify_analytics/_utils/_compat.py +45 -0
  16. chunkify_analytics/_utils/_datetime_parse.py +136 -0
  17. chunkify_analytics/_utils/_json.py +35 -0
  18. chunkify_analytics/_utils/_logs.py +25 -0
  19. chunkify_analytics/_utils/_path.py +127 -0
  20. chunkify_analytics/_utils/_proxy.py +65 -0
  21. chunkify_analytics/_utils/_reflection.py +42 -0
  22. chunkify_analytics/_utils/_resources_proxy.py +24 -0
  23. chunkify_analytics/_utils/_streams.py +12 -0
  24. chunkify_analytics/_utils/_sync.py +58 -0
  25. chunkify_analytics/_utils/_transform.py +457 -0
  26. chunkify_analytics/_utils/_typing.py +156 -0
  27. chunkify_analytics/_utils/_utils.py +433 -0
  28. chunkify_analytics/_version.py +4 -0
  29. chunkify_analytics/lib/.keep +4 -0
  30. chunkify_analytics/pagination.py +221 -0
  31. chunkify_analytics/py.typed +0 -0
  32. chunkify_analytics/resources/__init__.py +243 -0
  33. chunkify_analytics/resources/admin/__init__.py +33 -0
  34. chunkify_analytics/resources/admin/admin.py +253 -0
  35. chunkify_analytics/resources/admin/keys.py +283 -0
  36. chunkify_analytics/resources/dimensions.py +436 -0
  37. chunkify_analytics/resources/engagement.py +479 -0
  38. chunkify_analytics/resources/errors.py +400 -0
  39. chunkify_analytics/resources/events.py +562 -0
  40. chunkify_analytics/resources/exports.py +584 -0
  41. chunkify_analytics/resources/health.py +159 -0
  42. chunkify_analytics/resources/playback_rates.py +391 -0
  43. chunkify_analytics/resources/project/__init__.py +33 -0
  44. chunkify_analytics/resources/project/keys.py +379 -0
  45. chunkify_analytics/resources/project/project.py +322 -0
  46. chunkify_analytics/resources/quality.py +471 -0
  47. chunkify_analytics/resources/renditions.py +391 -0
  48. chunkify_analytics/resources/retention.py +377 -0
  49. chunkify_analytics/resources/subtitles.py +389 -0
  50. chunkify_analytics/resources/summary.py +469 -0
  51. chunkify_analytics/resources/timeseries.py +399 -0
  52. chunkify_analytics/resources/videos.py +424 -0
  53. chunkify_analytics/resources/views.py +579 -0
  54. chunkify_analytics/types/__init__.py +145 -0
  55. chunkify_analytics/types/admin/__init__.py +3 -0
  56. chunkify_analytics/types/admin_create_project_params.py +25 -0
  57. chunkify_analytics/types/analytics_event.py +32 -0
  58. chunkify_analytics/types/analytics_event_param.py +30 -0
  59. chunkify_analytics/types/created_project.py +37 -0
  60. chunkify_analytics/types/created_project_key.py +34 -0
  61. chunkify_analytics/types/deleted_project.py +18 -0
  62. chunkify_analytics/types/dimension_list_values_params.py +124 -0
  63. chunkify_analytics/types/dimension_values.py +42 -0
  64. chunkify_analytics/types/engagement.py +60 -0
  65. chunkify_analytics/types/engagement_breakdown_page.py +44 -0
  66. chunkify_analytics/types/engagement_response.py +11 -0
  67. chunkify_analytics/types/engagement_retrieve_params.py +158 -0
  68. chunkify_analytics/types/engagement_timeseries.py +28 -0
  69. chunkify_analytics/types/engagement_timeseries_bucket.py +63 -0
  70. chunkify_analytics/types/error_group.py +17 -0
  71. chunkify_analytics/types/error_list_params.py +124 -0
  72. chunkify_analytics/types/error_page.py +14 -0
  73. chunkify_analytics/types/event_ingest_params.py +19 -0
  74. chunkify_analytics/types/event_ingest_response.py +11 -0
  75. chunkify_analytics/types/event_list_params.py +146 -0
  76. chunkify_analytics/types/event_page.py +18 -0
  77. chunkify_analytics/types/export.py +18 -0
  78. chunkify_analytics/types/export_columns.py +12 -0
  79. chunkify_analytics/types/export_create_params.py +40 -0
  80. chunkify_analytics/types/export_download_response.py +7 -0
  81. chunkify_analytics/types/export_list_columns_params.py +69 -0
  82. chunkify_analytics/types/export_query_param.py +141 -0
  83. chunkify_analytics/types/health.py +11 -0
  84. chunkify_analytics/types/metrics.py +13 -0
  85. chunkify_analytics/types/metrics_breakdown_page.py +40 -0
  86. chunkify_analytics/types/metrics_response.py +11 -0
  87. chunkify_analytics/types/native_created.py +13 -0
  88. chunkify_analytics/types/native_duplicate.py +13 -0
  89. chunkify_analytics/types/playback_error.py +180 -0
  90. chunkify_analytics/types/playback_error_param.py +182 -0
  91. chunkify_analytics/types/playback_rate_changed.py +150 -0
  92. chunkify_analytics/types/playback_rate_changed_param.py +152 -0
  93. chunkify_analytics/types/playback_rate_metric.py +21 -0
  94. chunkify_analytics/types/playback_rate_report.py +31 -0
  95. chunkify_analytics/types/playback_rate_retrieve_params.py +117 -0
  96. chunkify_analytics/types/playback_state_changed.py +150 -0
  97. chunkify_analytics/types/playback_state_changed_param.py +156 -0
  98. chunkify_analytics/types/project/__init__.py +6 -0
  99. chunkify_analytics/types/project/key_create_params.py +21 -0
  100. chunkify_analytics/types/project/project.py +35 -0
  101. chunkify_analytics/types/project_key.py +21 -0
  102. chunkify_analytics/types/project_keys.py +14 -0
  103. chunkify_analytics/types/project_update_params.py +25 -0
  104. chunkify_analytics/types/quality.py +117 -0
  105. chunkify_analytics/types/quality_breakdown_page.py +44 -0
  106. chunkify_analytics/types/quality_response.py +11 -0
  107. chunkify_analytics/types/quality_retrieve_params.py +158 -0
  108. chunkify_analytics/types/quality_timeseries.py +28 -0
  109. chunkify_analytics/types/quality_timeseries_bucket.py +120 -0
  110. chunkify_analytics/types/rendition_changed.py +156 -0
  111. chunkify_analytics/types/rendition_changed_param.py +158 -0
  112. chunkify_analytics/types/rendition_metric.py +40 -0
  113. chunkify_analytics/types/rendition_report.py +43 -0
  114. chunkify_analytics/types/rendition_retrieve_params.py +117 -0
  115. chunkify_analytics/types/retention_bucket.py +22 -0
  116. chunkify_analytics/types/retention_report.py +33 -0
  117. chunkify_analytics/types/retention_retrieve_params.py +110 -0
  118. chunkify_analytics/types/rotated_project_key.py +29 -0
  119. chunkify_analytics/types/seek_completed.py +166 -0
  120. chunkify_analytics/types/seek_completed_param.py +168 -0
  121. chunkify_analytics/types/shared/__init__.py +24 -0
  122. chunkify_analytics/types/shared/browser_context.py +62 -0
  123. chunkify_analytics/types/shared/custom_dimensions.py +8 -0
  124. chunkify_analytics/types/shared/event_context.py +161 -0
  125. chunkify_analytics/types/shared/event_envelope.py +152 -0
  126. chunkify_analytics/types/shared/metric_count_ratio.py +18 -0
  127. chunkify_analytics/types/shared/otlp_any_value.py +56 -0
  128. chunkify_analytics/types/shared/otlp_attribute.py +24 -0
  129. chunkify_analytics/types/shared/otlp_attribute_value.py +136 -0
  130. chunkify_analytics/types/shared/otlp_context_attribute.py +22 -0
  131. chunkify_analytics/types/shared/otlp_log_record.py +48 -0
  132. chunkify_analytics/types/shared/otlp_resource.py +20 -0
  133. chunkify_analytics/types/shared/otlp_scope.py +24 -0
  134. chunkify_analytics/types/shared/playback_rate_playing_time.py +12 -0
  135. chunkify_analytics/types/shared/playback_score.py +28 -0
  136. chunkify_analytics/types/shared/played_range.py +13 -0
  137. chunkify_analytics/types/shared/progress_reached.py +39 -0
  138. chunkify_analytics/types/shared/rendition_playing_time.py +21 -0
  139. chunkify_analytics/types/shared/startup_outcomes.py +39 -0
  140. chunkify_analytics/types/shared/stored_otlp_context.py +50 -0
  141. chunkify_analytics/types/shared/subtitle_playing_time.py +14 -0
  142. chunkify_analytics/types/shared/view_metrics.py +100 -0
  143. chunkify_analytics/types/shared/watch_time_distribution.py +41 -0
  144. chunkify_analytics/types/shared_params/__init__.py +8 -0
  145. chunkify_analytics/types/shared_params/browser_context.py +62 -0
  146. chunkify_analytics/types/shared_params/custom_dimensions.py +10 -0
  147. chunkify_analytics/types/shared_params/playback_rate_playing_time.py +14 -0
  148. chunkify_analytics/types/shared_params/played_range.py +15 -0
  149. chunkify_analytics/types/shared_params/rendition_playing_time.py +22 -0
  150. chunkify_analytics/types/shared_params/subtitle_playing_time.py +15 -0
  151. chunkify_analytics/types/stored_event.py +44 -0
  152. chunkify_analytics/types/subtitle_changed.py +150 -0
  153. chunkify_analytics/types/subtitle_changed_param.py +152 -0
  154. chunkify_analytics/types/subtitle_metric.py +26 -0
  155. chunkify_analytics/types/subtitle_report.py +31 -0
  156. chunkify_analytics/types/subtitle_retrieve_params.py +117 -0
  157. chunkify_analytics/types/summary_retrieve_params.py +158 -0
  158. chunkify_analytics/types/time_bucket.py +22 -0
  159. chunkify_analytics/types/timeseries.py +28 -0
  160. chunkify_analytics/types/timeseries_response.py +12 -0
  161. chunkify_analytics/types/timesery_retrieve_params.py +115 -0
  162. chunkify_analytics/types/video_list_params.py +140 -0
  163. chunkify_analytics/types/video_metrics.py +23 -0
  164. chunkify_analytics/types/video_page.py +14 -0
  165. chunkify_analytics/types/view.py +43 -0
  166. chunkify_analytics/types/view_detail.py +21 -0
  167. chunkify_analytics/types/view_ended.py +180 -0
  168. chunkify_analytics/types/view_ended_param.py +182 -0
  169. chunkify_analytics/types/view_list_params.py +152 -0
  170. chunkify_analytics/types/view_page.py +14 -0
  171. chunkify_analytics/types/view_retrieve_params.py +23 -0
  172. chunkify_analytics/types/view_snapshot.py +180 -0
  173. chunkify_analytics/types/view_snapshot_param.py +182 -0
  174. chunkify_analytics/types/view_started.py +192 -0
  175. chunkify_analytics/types/view_started_param.py +194 -0
  176. chunkify_analytics_sdk-0.9.0.dist-info/METADATA +487 -0
  177. chunkify_analytics_sdk-0.9.0.dist-info/RECORD +179 -0
  178. chunkify_analytics_sdk-0.9.0.dist-info/WHEEL +4 -0
  179. chunkify_analytics_sdk-0.9.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,161 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+
8
+ __all__ = ["EventContext"]
9
+
10
+
11
+ class EventContext(BaseModel):
12
+ """Browser context and locally derived continent/country/city.
13
+
14
+ Request IP addresses are never added to events or stored context.
15
+ """
16
+
17
+ schema_version: Literal[1]
18
+
19
+ browser_name: Union[str, float, bool, None] = None
20
+ """Copied from browser_context.browser_name when primitive.
21
+
22
+ See BrowserContext for the SDK type; the collector currently accepts any
23
+ primitive here.
24
+ """
25
+
26
+ browser_version: Union[str, float, bool, None] = None
27
+ """Copied from browser_context.browser_version when primitive.
28
+
29
+ See BrowserContext for the SDK type; the collector currently accepts any
30
+ primitive here.
31
+ """
32
+
33
+ city: Optional[str] = None
34
+ """Approximate city name in English from the local City MMDB lookup.
35
+
36
+ Null when unknown. Location displays using the bundled DB-IP data must link to
37
+ https://db-ip.com.
38
+ """
39
+
40
+ continent: Optional[Literal["AF", "AN", "AS", "EU", "NA", "OC", "SA"]] = None
41
+ """
42
+ Continent code from the local City MMDB lookup: Africa, Antarctica, Asia,
43
+ Europe, North America, Oceania or South America. Null when unknown.
44
+ """
45
+
46
+ country: Optional[str] = None
47
+ """Country ISO 3166-1 alpha-2 code from the local City MMDB lookup.
48
+
49
+ Null when unknown. The request IP is discarded.
50
+ """
51
+
52
+ device_family: Union[str, float, bool, None] = None
53
+ """Copied from browser_context.device_family when primitive.
54
+
55
+ See BrowserContext for the SDK type; the collector currently accepts any
56
+ primitive here.
57
+ """
58
+
59
+ device_type: Union[str, float, bool, None] = None
60
+ """Copied from browser_context.device_type when primitive.
61
+
62
+ See BrowserContext for the SDK type; the collector currently accepts any
63
+ primitive here.
64
+ """
65
+
66
+ language: Union[str, float, bool, None] = None
67
+ """Copied from browser_context.language when primitive.
68
+
69
+ See BrowserContext for the SDK type; the collector currently accepts any
70
+ primitive here.
71
+ """
72
+
73
+ language_prefix: Union[str, float, bool, None] = None
74
+ """Copied from browser_context.language_prefix when primitive.
75
+
76
+ See BrowserContext for the SDK type; the collector currently accepts any
77
+ primitive here.
78
+ """
79
+
80
+ os_name: Union[str, float, bool, None] = None
81
+ """Copied from browser_context.os_name when primitive.
82
+
83
+ See BrowserContext for the SDK type; the collector currently accepts any
84
+ primitive here.
85
+ """
86
+
87
+ os_version: Union[str, float, bool, None] = None
88
+ """Copied from browser_context.os_version when primitive.
89
+
90
+ See BrowserContext for the SDK type; the collector currently accepts any
91
+ primitive here.
92
+ """
93
+
94
+ page_origin: Optional[str] = None
95
+ """Current document HTTP(S) origin, without credentials.
96
+
97
+ Null when unavailable or longer than 2048 characters.
98
+ """
99
+
100
+ page_path: Optional[str] = None
101
+ """Current document pathname, without query parameters or fragment.
102
+
103
+ Null when unavailable or longer than 2048 characters. Paths may contain
104
+ application-defined identifiers.
105
+ """
106
+
107
+ pixel_ratio: Union[str, float, bool, None] = None
108
+ """Copied from browser_context.pixel_ratio when primitive.
109
+
110
+ See BrowserContext for the SDK type; the collector currently accepts any
111
+ primitive here.
112
+ """
113
+
114
+ screen_height_px: Union[str, float, bool, None] = None
115
+ """Copied from browser_context.screen_height_px when primitive.
116
+
117
+ See BrowserContext for the SDK type; the collector currently accepts any
118
+ primitive here.
119
+ """
120
+
121
+ screen_width_px: Union[str, float, bool, None] = None
122
+ """Copied from browser_context.screen_width_px when primitive.
123
+
124
+ See BrowserContext for the SDK type; the collector currently accepts any
125
+ primitive here.
126
+ """
127
+
128
+ timezone: Union[str, float, bool, None] = None
129
+ """Copied from browser_context.timezone when primitive.
130
+
131
+ See BrowserContext for the SDK type; the collector currently accepts any
132
+ primitive here.
133
+ """
134
+
135
+ timezone_offset_minutes: Union[str, float, bool, None] = None
136
+ """Copied from browser_context.timezone_offset_minutes when primitive.
137
+
138
+ See BrowserContext for the SDK type; the collector currently accepts any
139
+ primitive here.
140
+ """
141
+
142
+ user_agent: Union[str, float, bool, None] = None
143
+ """Copied from browser_context.user_agent when primitive.
144
+
145
+ See BrowserContext for the SDK type; the collector currently accepts any
146
+ primitive here.
147
+ """
148
+
149
+ viewport_height_px: Union[str, float, bool, None] = None
150
+ """Copied from browser_context.viewport_height_px when primitive.
151
+
152
+ See BrowserContext for the SDK type; the collector currently accepts any
153
+ primitive here.
154
+ """
155
+
156
+ viewport_width_px: Union[str, float, bool, None] = None
157
+ """Copied from browser_context.viewport_width_px when primitive.
158
+
159
+ See BrowserContext for the SDK type; the collector currently accepts any
160
+ primitive here.
161
+ """
@@ -0,0 +1,152 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from ..._models import BaseModel
8
+ from .browser_context import BrowserContext
9
+ from .rendition_playing_time import RenditionPlayingTime
10
+
11
+ __all__ = ["EventEnvelope"]
12
+
13
+
14
+ class EventEnvelope(BaseModel):
15
+ connector_name: str
16
+
17
+ connector_version: Optional[str] = None
18
+
19
+ delivery_hostname: Optional[str] = None
20
+
21
+ environment: Optional[str] = None
22
+
23
+ error_category: Optional[Literal["aborted", "network", "decode", "unsupported", "unknown"]] = None
24
+
25
+ error_code: Union[str, float, None] = None
26
+
27
+ error_fatal: Optional[bool] = None
28
+
29
+ error_playhead_seconds: Optional[float] = None
30
+
31
+ event_id: str
32
+
33
+ event_name: Literal[
34
+ "chunkify.video.view_started",
35
+ "chunkify.video.view_snapshot",
36
+ "chunkify.video.playback_error",
37
+ "chunkify.video.view_ended",
38
+ "chunkify.video.playback_state_changed",
39
+ "chunkify.video.rendition_changed",
40
+ "chunkify.video.seek_completed",
41
+ "chunkify.video.subtitle_changed",
42
+ "chunkify.video.playback_rate_changed",
43
+ ]
44
+
45
+ occurred_at: datetime
46
+
47
+ player_name: Optional[str] = None
48
+
49
+ player_version: Optional[str] = None
50
+
51
+ reason: Optional[Literal["ended", "destroyed", "source_changed", "page_exit"]] = None
52
+
53
+ schema_version: Literal[1]
54
+
55
+ sdk_name: str
56
+ """Name of the SDK or integration that produced the event.
57
+
58
+ Informational metadata, preserved as received. Must contain at least one
59
+ non-whitespace character.
60
+ """
61
+
62
+ sdk_version: str
63
+
64
+ sequence: int
65
+
66
+ startup_outcome: Optional[Literal["started", "failed_before_start", "ended_before_start"]] = None
67
+
68
+ video_id: str
69
+
70
+ view_id: str
71
+
72
+ viewer_id: Optional[str] = None
73
+ """
74
+ Anonymous browser identifier generated by the Chunkify player SDK and stored in
75
+ the page's localStorage.
76
+ """
77
+
78
+ browser_context: Optional[BrowserContext] = None
79
+ """Browser and device information.
80
+
81
+ The Chunkify player sends every field, with null for unavailable measurements.
82
+ Other integrations may omit any field except schema_version. Extra properties
83
+ are preserved.
84
+ """
85
+
86
+ delivery_request_count: Optional[float] = None
87
+
88
+ delivery_throughput_bps: Optional[float] = None
89
+
90
+ delivery_transferred_bytes: Optional[float] = None
91
+
92
+ dropped_video_frames: Optional[float] = None
93
+
94
+ first_video_frame_time_ms: Optional[float] = None
95
+
96
+ furthest_progress_ratio: Optional[float] = None
97
+
98
+ maximum_playhead_seconds: Optional[float] = None
99
+
100
+ media_duration_seconds: Optional[float] = None
101
+
102
+ media_height_px: Optional[float] = None
103
+
104
+ media_width_px: Optional[float] = None
105
+
106
+ player_height_px: Optional[float] = None
107
+
108
+ player_width_px: Optional[float] = None
109
+
110
+ playing_time_ms: Optional[float] = None
111
+
112
+ rebuffer_count: Optional[float] = None
113
+
114
+ rebuffer_duration_ms: Optional[float] = None
115
+
116
+ rebuffer_ratio: Optional[float] = None
117
+
118
+ rendition_playing_time: Optional[List[RenditionPlayingTime]] = None
119
+
120
+ rendition_switch_count: Optional[float] = None
121
+
122
+ seek_count: Optional[float] = None
123
+
124
+ seek_duration_ms: Optional[float] = None
125
+
126
+ selected_rendition_bitrate_bps: Optional[float] = None
127
+
128
+ selected_rendition_codec: Optional[str] = None
129
+
130
+ selected_rendition_height: Optional[float] = None
131
+
132
+ selected_rendition_width: Optional[float] = None
133
+
134
+ startup_time_ms: Optional[float] = None
135
+
136
+ total_video_frames: Optional[float] = None
137
+
138
+ user_id: Optional[str] = None
139
+ """
140
+ Optional integrator-supplied user ID, used to link views to the integrator's own
141
+ users.
142
+ """
143
+
144
+ video_title: Optional[str] = None
145
+ """Optional human-readable video title for reports."""
146
+
147
+ visibility_state: Optional[Literal["visible", "hidden"]] = None
148
+ """Tab visibility when the event was recorded.
149
+
150
+ Hidden does not imply paused playback or identify the cause of a pause. Missing
151
+ on older events; null when unavailable.
152
+ """
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["MetricCountRatio"]
8
+
9
+
10
+ class MetricCountRatio(BaseModel):
11
+ """View count and fraction of its documented denominator.
12
+
13
+ The ratio is null when that denominator is zero.
14
+ """
15
+
16
+ ratio: Optional[float] = None
17
+
18
+ views: int
@@ -0,0 +1,56 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Dict, List, Union, Optional
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = ["OtlpAnyValue", "ArrayValue", "KvlistValue"]
12
+
13
+
14
+ class ArrayValue(BaseModel):
15
+ values: Optional[List[Optional["OtlpAnyValue"]]] = None
16
+
17
+
18
+ class KvlistValue(BaseModel):
19
+ values: Optional[List["OtlpContextAttribute"]] = None
20
+
21
+
22
+ class OtlpAnyValue(BaseModel):
23
+ """Standard OTLP AnyValue in a preserved resource, scope or body.
24
+
25
+ This collector does not decode these fields into the event.
26
+ """
27
+
28
+ array_value: Optional[ArrayValue] = FieldInfo(alias="arrayValue", default=None)
29
+
30
+ bool_value: Optional[bool] = FieldInfo(alias="boolValue", default=None)
31
+
32
+ bytes_value: Optional[str] = FieldInfo(alias="bytesValue", default=None)
33
+
34
+ double_value: Optional[float] = FieldInfo(alias="doubleValue", default=None)
35
+
36
+ int_value: Union[str, int, None] = FieldInfo(alias="intValue", default=None)
37
+ """Signed int64. Strings avoid JavaScript precision loss."""
38
+
39
+ kvlist_value: Optional[KvlistValue] = FieldInfo(alias="kvlistValue", default=None)
40
+
41
+ string_value: Optional[str] = FieldInfo(alias="stringValue", default=None)
42
+
43
+ if TYPE_CHECKING:
44
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
45
+ # value to this field, so for compatibility we avoid doing it at runtime.
46
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
47
+
48
+ # Stub to indicate that arbitrary properties are accepted.
49
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
50
+ # `getattr(obj, '$type')`
51
+ def __getattr__(self, attr: str) -> object: ...
52
+ else:
53
+ __pydantic_extra__: Dict[str, object]
54
+
55
+
56
+ from .otlp_context_attribute import OtlpContextAttribute
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ from ..._models import BaseModel
8
+ from .otlp_attribute_value import OtlpAttributeValue
9
+
10
+ __all__ = ["OtlpAttribute"]
11
+
12
+
13
+ class OtlpAttribute(BaseModel):
14
+ """
15
+ An absent or null key decodes to the empty string; duplicate decoded keys reject the request. An absent value decodes to null.
16
+ """
17
+
18
+ key: Optional[str] = None
19
+
20
+ value: Optional[OtlpAttributeValue] = None
21
+ """A typed log attribute.
22
+
23
+ At most one value field can be set. Binary values are unsupported.
24
+ """
@@ -0,0 +1,136 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union
4
+ from typing_extensions import TypeAlias
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from ..._models import BaseModel
9
+
10
+ __all__ = [
11
+ "OtlpAttributeValue",
12
+ "UnionMember0",
13
+ "UnionMember1",
14
+ "UnionMember2",
15
+ "UnionMember3",
16
+ "UnionMember4",
17
+ "UnionMember5",
18
+ "UnionMember6",
19
+ ]
20
+
21
+
22
+ class UnionMember0(BaseModel):
23
+ array_value: None = FieldInfo(alias="arrayValue", default=None)
24
+
25
+ bool_value: None = FieldInfo(alias="boolValue", default=None)
26
+
27
+ bytes_value: None = FieldInfo(alias="bytesValue", default=None)
28
+
29
+ double_value: None = FieldInfo(alias="doubleValue", default=None)
30
+
31
+ int_value: None = FieldInfo(alias="intValue", default=None)
32
+
33
+ kvlist_value: None = FieldInfo(alias="kvlistValue", default=None)
34
+
35
+ string_value: None = FieldInfo(alias="stringValue", default=None)
36
+
37
+
38
+ class UnionMember1(BaseModel):
39
+ string_value: object = FieldInfo(alias="stringValue")
40
+
41
+ array_value: None = FieldInfo(alias="arrayValue", default=None)
42
+
43
+ bool_value: None = FieldInfo(alias="boolValue", default=None)
44
+
45
+ bytes_value: None = FieldInfo(alias="bytesValue", default=None)
46
+
47
+ double_value: None = FieldInfo(alias="doubleValue", default=None)
48
+
49
+ int_value: None = FieldInfo(alias="intValue", default=None)
50
+
51
+ kvlist_value: None = FieldInfo(alias="kvlistValue", default=None)
52
+
53
+
54
+ class UnionMember2(BaseModel):
55
+ bool_value: object = FieldInfo(alias="boolValue")
56
+
57
+ array_value: None = FieldInfo(alias="arrayValue", default=None)
58
+
59
+ bytes_value: None = FieldInfo(alias="bytesValue", default=None)
60
+
61
+ double_value: None = FieldInfo(alias="doubleValue", default=None)
62
+
63
+ int_value: None = FieldInfo(alias="intValue", default=None)
64
+
65
+ kvlist_value: None = FieldInfo(alias="kvlistValue", default=None)
66
+
67
+ string_value: None = FieldInfo(alias="stringValue", default=None)
68
+
69
+
70
+ class UnionMember3(BaseModel):
71
+ int_value: object = FieldInfo(alias="intValue")
72
+
73
+ array_value: None = FieldInfo(alias="arrayValue", default=None)
74
+
75
+ bool_value: None = FieldInfo(alias="boolValue", default=None)
76
+
77
+ bytes_value: None = FieldInfo(alias="bytesValue", default=None)
78
+
79
+ double_value: None = FieldInfo(alias="doubleValue", default=None)
80
+
81
+ kvlist_value: None = FieldInfo(alias="kvlistValue", default=None)
82
+
83
+ string_value: None = FieldInfo(alias="stringValue", default=None)
84
+
85
+
86
+ class UnionMember4(BaseModel):
87
+ double_value: object = FieldInfo(alias="doubleValue")
88
+
89
+ array_value: None = FieldInfo(alias="arrayValue", default=None)
90
+
91
+ bool_value: None = FieldInfo(alias="boolValue", default=None)
92
+
93
+ bytes_value: None = FieldInfo(alias="bytesValue", default=None)
94
+
95
+ int_value: None = FieldInfo(alias="intValue", default=None)
96
+
97
+ kvlist_value: None = FieldInfo(alias="kvlistValue", default=None)
98
+
99
+ string_value: None = FieldInfo(alias="stringValue", default=None)
100
+
101
+
102
+ class UnionMember5(BaseModel):
103
+ array_value: object = FieldInfo(alias="arrayValue")
104
+
105
+ bool_value: None = FieldInfo(alias="boolValue", default=None)
106
+
107
+ bytes_value: None = FieldInfo(alias="bytesValue", default=None)
108
+
109
+ double_value: None = FieldInfo(alias="doubleValue", default=None)
110
+
111
+ int_value: None = FieldInfo(alias="intValue", default=None)
112
+
113
+ kvlist_value: None = FieldInfo(alias="kvlistValue", default=None)
114
+
115
+ string_value: None = FieldInfo(alias="stringValue", default=None)
116
+
117
+
118
+ class UnionMember6(BaseModel):
119
+ kvlist_value: object = FieldInfo(alias="kvlistValue")
120
+
121
+ array_value: None = FieldInfo(alias="arrayValue", default=None)
122
+
123
+ bool_value: None = FieldInfo(alias="boolValue", default=None)
124
+
125
+ bytes_value: None = FieldInfo(alias="bytesValue", default=None)
126
+
127
+ double_value: None = FieldInfo(alias="doubleValue", default=None)
128
+
129
+ int_value: None = FieldInfo(alias="intValue", default=None)
130
+
131
+ string_value: None = FieldInfo(alias="stringValue", default=None)
132
+
133
+
134
+ OtlpAttributeValue: TypeAlias = Union[
135
+ UnionMember0, UnionMember1, UnionMember2, UnionMember3, UnionMember4, UnionMember5, UnionMember6, None
136
+ ]
@@ -0,0 +1,22 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = ["OtlpContextAttribute"]
10
+
11
+
12
+ class OtlpContextAttribute(BaseModel):
13
+ key: Optional[str] = None
14
+
15
+ value: Optional["OtlpAnyValue"] = None
16
+ """Standard OTLP AnyValue in a preserved resource, scope or body.
17
+
18
+ This collector does not decode these fields into the event.
19
+ """
20
+
21
+
22
+ from .otlp_any_value import OtlpAnyValue
@@ -0,0 +1,48 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = ["OtlpLogRecord"]
12
+
13
+
14
+ class OtlpLogRecord(BaseModel):
15
+ """A playback event in log attributes.
16
+
17
+ Duplicate attributes and invalid event fields reject the request.
18
+ """
19
+
20
+ attributes: List["OtlpAttribute"]
21
+
22
+ body: Optional["OtlpAnyValue"] = None
23
+ """Standard OTLP AnyValue in a preserved resource, scope or body.
24
+
25
+ This collector does not decode these fields into the event.
26
+ """
27
+
28
+ dropped_attributes_count: Optional[int] = FieldInfo(alias="droppedAttributesCount", default=None)
29
+
30
+ event_name: Optional[str] = FieldInfo(alias="eventName", default=None)
31
+
32
+ flags: Optional[int] = None
33
+
34
+ observed_time_unix_nano: Optional[str] = FieldInfo(alias="observedTimeUnixNano", default=None)
35
+
36
+ severity_number: Optional[int] = FieldInfo(alias="severityNumber", default=None)
37
+
38
+ severity_text: Optional[str] = FieldInfo(alias="severityText", default=None)
39
+
40
+ span_id: Optional[str] = FieldInfo(alias="spanId", default=None)
41
+
42
+ time_unix_nano: Optional[str] = FieldInfo(alias="timeUnixNano", default=None)
43
+
44
+ trace_id: Optional[str] = FieldInfo(alias="traceId", default=None)
45
+
46
+
47
+ from .otlp_any_value import OtlpAnyValue
48
+ from .otlp_attribute import OtlpAttribute
@@ -0,0 +1,20 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = ["OtlpResource"]
12
+
13
+
14
+ class OtlpResource(BaseModel):
15
+ attributes: Optional[List["OtlpContextAttribute"]] = None
16
+
17
+ dropped_attributes_count: Optional[int] = FieldInfo(alias="droppedAttributesCount", default=None)
18
+
19
+
20
+ from .otlp_context_attribute import OtlpContextAttribute
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+
7
+ from pydantic import Field as FieldInfo
8
+
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = ["OtlpScope"]
12
+
13
+
14
+ class OtlpScope(BaseModel):
15
+ attributes: Optional[List["OtlpContextAttribute"]] = None
16
+
17
+ dropped_attributes_count: Optional[int] = FieldInfo(alias="droppedAttributesCount", default=None)
18
+
19
+ name: Optional[str] = None
20
+
21
+ version: Optional[str] = None
22
+
23
+
24
+ from .otlp_context_attribute import OtlpContextAttribute
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from ..._models import BaseModel
4
+
5
+ __all__ = ["PlaybackRatePlayingTime"]
6
+
7
+
8
+ class PlaybackRatePlayingTime(BaseModel):
9
+ playing_time_ms: float
10
+
11
+ rate: float
12
+ """Playback rate, rounded to two decimals."""