capo-codeguruprofiler 0.1.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 (180) hide show
  1. capo_codeguruprofiler/__init__.py +74 -0
  2. capo_codeguruprofiler/_async.py +25 -0
  3. capo_codeguruprofiler/_auth/_identity.py +16 -0
  4. capo_codeguruprofiler/_auth/_providers.py +886 -0
  5. capo_codeguruprofiler/_auth/_signers.py +88 -0
  6. capo_codeguruprofiler/_auth/_sigv4.py +434 -0
  7. capo_codeguruprofiler/_auth/_zapros_handler.py +80 -0
  8. capo_codeguruprofiler/_iter.py +113 -0
  9. capo_codeguruprofiler/_operations/code_guru_profiler/add_notification_channels.py +185 -0
  10. capo_codeguruprofiler/_operations/code_guru_profiler/batch_get_frame_metric_data.py +202 -0
  11. capo_codeguruprofiler/_operations/code_guru_profiler/configure_agent.py +177 -0
  12. capo_codeguruprofiler/_operations/code_guru_profiler/create_profiling_group.py +180 -0
  13. capo_codeguruprofiler/_operations/code_guru_profiler/delete_profiling_group.py +165 -0
  14. capo_codeguruprofiler/_operations/code_guru_profiler/describe_profiling_group.py +169 -0
  15. capo_codeguruprofiler/_operations/code_guru_profiler/get_findings_report_account_summary.py +164 -0
  16. capo_codeguruprofiler/_operations/code_guru_profiler/get_notification_configuration.py +168 -0
  17. capo_codeguruprofiler/_operations/code_guru_profiler/get_policy.py +161 -0
  18. capo_codeguruprofiler/_operations/code_guru_profiler/get_profile.py +196 -0
  19. capo_codeguruprofiler/_operations/code_guru_profiler/get_recommendations.py +196 -0
  20. capo_codeguruprofiler/_operations/code_guru_profiler/list_findings_reports.py +197 -0
  21. capo_codeguruprofiler/_operations/code_guru_profiler/list_profile_times.py +196 -0
  22. capo_codeguruprofiler/_operations/code_guru_profiler/list_profiling_groups.py +160 -0
  23. capo_codeguruprofiler/_operations/code_guru_profiler/list_tags_for_resource.py +158 -0
  24. capo_codeguruprofiler/_operations/code_guru_profiler/post_agent_profile.py +168 -0
  25. capo_codeguruprofiler/_operations/code_guru_profiler/put_permission.py +182 -0
  26. capo_codeguruprofiler/_operations/code_guru_profiler/remove_notification_channel.py +169 -0
  27. capo_codeguruprofiler/_operations/code_guru_profiler/remove_permission.py +175 -0
  28. capo_codeguruprofiler/_operations/code_guru_profiler/submit_feedback.py +170 -0
  29. capo_codeguruprofiler/_operations/code_guru_profiler/tag_resource.py +158 -0
  30. capo_codeguruprofiler/_operations/code_guru_profiler/untag_resource.py +156 -0
  31. capo_codeguruprofiler/_operations/code_guru_profiler/update_profiling_group.py +181 -0
  32. capo_codeguruprofiler/_pagination.py +21 -0
  33. capo_codeguruprofiler/_protocol/__init__.py +1 -0
  34. capo_codeguruprofiler/_protocol/errors.py +93 -0
  35. capo_codeguruprofiler/_protocol/eventstream.py +238 -0
  36. capo_codeguruprofiler/_protocol/serialize.py +47 -0
  37. capo_codeguruprofiler/_protocol/xml.py +33 -0
  38. capo_codeguruprofiler/_resources/code_guru_profiler/profiling_group.py +2257 -0
  39. capo_codeguruprofiler/_rule_engine/__init__.py +0 -0
  40. capo_codeguruprofiler/_rule_engine/_aws_partition.py +160 -0
  41. capo_codeguruprofiler/_rule_engine/_endpoint_rule_set.py +138 -0
  42. capo_codeguruprofiler/_rule_engine/_endpoint_runtime.py +389 -0
  43. capo_codeguruprofiler/_services/_aws_config.py +160 -0
  44. capo_codeguruprofiler/_services/_pipeline.py +198 -0
  45. capo_codeguruprofiler/_services/async_code_guru_profiler.py +377 -0
  46. capo_codeguruprofiler/_services/code_guru_profiler.py +373 -0
  47. capo_codeguruprofiler/errors/__init__.py +35 -0
  48. capo_codeguruprofiler/errors/_base.py +94 -0
  49. capo_codeguruprofiler/errors/conflict_exception.py +45 -0
  50. capo_codeguruprofiler/errors/internal_server_exception.py +47 -0
  51. capo_codeguruprofiler/errors/resource_not_found_exception.py +47 -0
  52. capo_codeguruprofiler/errors/service_quota_exceeded_exception.py +49 -0
  53. capo_codeguruprofiler/errors/throttling_exception.py +45 -0
  54. capo_codeguruprofiler/errors/validation_exception.py +45 -0
  55. capo_codeguruprofiler/py.typed +0 -0
  56. capo_codeguruprofiler/types/_prelude/blob.py +12 -0
  57. capo_codeguruprofiler/types/_prelude/timestamp.py +17 -0
  58. capo_codeguruprofiler/types/action_group.py +5 -0
  59. capo_codeguruprofiler/types/add_notification_channels_request.py +44 -0
  60. capo_codeguruprofiler/types/add_notification_channels_response.py +42 -0
  61. capo_codeguruprofiler/types/agent_configuration.py +58 -0
  62. capo_codeguruprofiler/types/agent_orchestration_config.py +28 -0
  63. capo_codeguruprofiler/types/agent_parameter_field.py +5 -0
  64. capo_codeguruprofiler/types/agent_parameters.py +27 -0
  65. capo_codeguruprofiler/types/agent_profile.py +15 -0
  66. capo_codeguruprofiler/types/aggregated_profile.py +15 -0
  67. capo_codeguruprofiler/types/aggregated_profile_time.py +45 -0
  68. capo_codeguruprofiler/types/aggregation_period.py +5 -0
  69. capo_codeguruprofiler/types/anomalies.py +29 -0
  70. capo_codeguruprofiler/types/anomaly.py +62 -0
  71. capo_codeguruprofiler/types/anomaly_instance.py +77 -0
  72. capo_codeguruprofiler/types/anomaly_instance_id.py +5 -0
  73. capo_codeguruprofiler/types/anomaly_instances.py +31 -0
  74. capo_codeguruprofiler/types/batch_get_frame_metric_data_request.py +56 -0
  75. capo_codeguruprofiler/types/batch_get_frame_metric_data_response.py +130 -0
  76. capo_codeguruprofiler/types/channel.py +58 -0
  77. capo_codeguruprofiler/types/channel_id.py +5 -0
  78. capo_codeguruprofiler/types/channel_uri.py +6 -0
  79. capo_codeguruprofiler/types/channels.py +29 -0
  80. capo_codeguruprofiler/types/client_token.py +5 -0
  81. capo_codeguruprofiler/types/compute_platform.py +5 -0
  82. capo_codeguruprofiler/types/configure_agent_request.py +50 -0
  83. capo_codeguruprofiler/types/configure_agent_response.py +43 -0
  84. capo_codeguruprofiler/types/create_profiling_group_request.py +81 -0
  85. capo_codeguruprofiler/types/create_profiling_group_response.py +45 -0
  86. capo_codeguruprofiler/types/delete_profiling_group_request.py +26 -0
  87. capo_codeguruprofiler/types/delete_profiling_group_response.py +18 -0
  88. capo_codeguruprofiler/types/describe_profiling_group_request.py +26 -0
  89. capo_codeguruprofiler/types/describe_profiling_group_response.py +45 -0
  90. capo_codeguruprofiler/types/event_publisher.py +5 -0
  91. capo_codeguruprofiler/types/event_publishers.py +19 -0
  92. capo_codeguruprofiler/types/feedback_type.py +5 -0
  93. capo_codeguruprofiler/types/findings_report_id.py +5 -0
  94. capo_codeguruprofiler/types/findings_report_summaries.py +35 -0
  95. capo_codeguruprofiler/types/findings_report_summary.py +73 -0
  96. capo_codeguruprofiler/types/fleet_instance_id.py +5 -0
  97. capo_codeguruprofiler/types/frame_metric.py +56 -0
  98. capo_codeguruprofiler/types/frame_metric_data.py +33 -0
  99. capo_codeguruprofiler/types/frame_metric_datum.py +56 -0
  100. capo_codeguruprofiler/types/frame_metric_value.py +5 -0
  101. capo_codeguruprofiler/types/frame_metric_values.py +30 -0
  102. capo_codeguruprofiler/types/frame_metrics.py +29 -0
  103. capo_codeguruprofiler/types/get_findings_report_account_summary_request.py +31 -0
  104. capo_codeguruprofiler/types/get_findings_report_account_summary_response.py +56 -0
  105. capo_codeguruprofiler/types/get_notification_configuration_request.py +26 -0
  106. capo_codeguruprofiler/types/get_notification_configuration_response.py +45 -0
  107. capo_codeguruprofiler/types/get_policy_request.py +26 -0
  108. capo_codeguruprofiler/types/get_policy_response.py +38 -0
  109. capo_codeguruprofiler/types/get_profile_request.py +39 -0
  110. capo_codeguruprofiler/types/get_profile_response.py +45 -0
  111. capo_codeguruprofiler/types/get_recommendations_request.py +34 -0
  112. capo_codeguruprofiler/types/get_recommendations_response.py +110 -0
  113. capo_codeguruprofiler/types/list_findings_reports_request.py +41 -0
  114. capo_codeguruprofiler/types/list_findings_reports_response.py +56 -0
  115. capo_codeguruprofiler/types/list_of_timestamps.py +33 -0
  116. capo_codeguruprofiler/types/list_profile_times_request.py +45 -0
  117. capo_codeguruprofiler/types/list_profile_times_response.py +50 -0
  118. capo_codeguruprofiler/types/list_profiling_groups_request.py +31 -0
  119. capo_codeguruprofiler/types/list_profiling_groups_response.py +77 -0
  120. capo_codeguruprofiler/types/list_tags_for_resource_request.py +24 -0
  121. capo_codeguruprofiler/types/list_tags_for_resource_response.py +34 -0
  122. capo_codeguruprofiler/types/locale.py +6 -0
  123. capo_codeguruprofiler/types/match.py +43 -0
  124. capo_codeguruprofiler/types/matches.py +29 -0
  125. capo_codeguruprofiler/types/max_depth.py +5 -0
  126. capo_codeguruprofiler/types/max_results.py +5 -0
  127. capo_codeguruprofiler/types/metadata.py +27 -0
  128. capo_codeguruprofiler/types/metadata_field.py +5 -0
  129. capo_codeguruprofiler/types/metric.py +54 -0
  130. capo_codeguruprofiler/types/metric_type.py +5 -0
  131. capo_codeguruprofiler/types/notification_configuration.py +36 -0
  132. capo_codeguruprofiler/types/order_by.py +5 -0
  133. capo_codeguruprofiler/types/pagination_token.py +5 -0
  134. capo_codeguruprofiler/types/pattern.py +95 -0
  135. capo_codeguruprofiler/types/percentage.py +5 -0
  136. capo_codeguruprofiler/types/period.py +5 -0
  137. capo_codeguruprofiler/types/post_agent_profile_request.py +51 -0
  138. capo_codeguruprofiler/types/post_agent_profile_response.py +18 -0
  139. capo_codeguruprofiler/types/principal.py +5 -0
  140. capo_codeguruprofiler/types/principals.py +17 -0
  141. capo_codeguruprofiler/types/profile_time.py +36 -0
  142. capo_codeguruprofiler/types/profile_times.py +29 -0
  143. capo_codeguruprofiler/types/profiling_group_arn.py +5 -0
  144. capo_codeguruprofiler/types/profiling_group_description.py +132 -0
  145. capo_codeguruprofiler/types/profiling_group_descriptions.py +37 -0
  146. capo_codeguruprofiler/types/profiling_group_name.py +5 -0
  147. capo_codeguruprofiler/types/profiling_group_names.py +19 -0
  148. capo_codeguruprofiler/types/profiling_status.py +83 -0
  149. capo_codeguruprofiler/types/put_permission_request.py +54 -0
  150. capo_codeguruprofiler/types/put_permission_response.py +38 -0
  151. capo_codeguruprofiler/types/recommendation.py +108 -0
  152. capo_codeguruprofiler/types/recommendations.py +31 -0
  153. capo_codeguruprofiler/types/remove_notification_channel_request.py +29 -0
  154. capo_codeguruprofiler/types/remove_notification_channel_response.py +42 -0
  155. capo_codeguruprofiler/types/remove_permission_request.py +32 -0
  156. capo_codeguruprofiler/types/remove_permission_response.py +38 -0
  157. capo_codeguruprofiler/types/revision_id.py +5 -0
  158. capo_codeguruprofiler/types/strings.py +14 -0
  159. capo_codeguruprofiler/types/submit_feedback_request.py +47 -0
  160. capo_codeguruprofiler/types/submit_feedback_response.py +18 -0
  161. capo_codeguruprofiler/types/tag_keys.py +14 -0
  162. capo_codeguruprofiler/types/tag_resource_request.py +40 -0
  163. capo_codeguruprofiler/types/tag_resource_response.py +18 -0
  164. capo_codeguruprofiler/types/tags_map.py +22 -0
  165. capo_codeguruprofiler/types/target_frame.py +14 -0
  166. capo_codeguruprofiler/types/target_frames.py +29 -0
  167. capo_codeguruprofiler/types/thread_states.py +14 -0
  168. capo_codeguruprofiler/types/timestamp.py +20 -0
  169. capo_codeguruprofiler/types/timestamp_structure.py +37 -0
  170. capo_codeguruprofiler/types/unprocessed_end_time_map.py +33 -0
  171. capo_codeguruprofiler/types/untag_resource_request.py +27 -0
  172. capo_codeguruprofiler/types/untag_resource_response.py +18 -0
  173. capo_codeguruprofiler/types/update_profiling_group_request.py +50 -0
  174. capo_codeguruprofiler/types/update_profiling_group_response.py +45 -0
  175. capo_codeguruprofiler/types/user_feedback.py +31 -0
  176. capo_codeguruprofiler-0.1.0.dist-info/METADATA +101 -0
  177. capo_codeguruprofiler-0.1.0.dist-info/RECORD +180 -0
  178. capo_codeguruprofiler-0.1.0.dist-info/WHEEL +5 -0
  179. capo_codeguruprofiler-0.1.0.dist-info/licenses/LICENSE +21 -0
  180. capo_codeguruprofiler-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,45 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#DescribeProfilingGroupResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.profiling_group_description
11
+
12
+
13
+ class DescribeProfilingGroupResponse(TypedDict, closed=True):
14
+ profiling_group: "capo_codeguruprofiler.types.profiling_group_description.ProfilingGroupDescription"
15
+ r"""<p> The returned <a href=\"https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ProfilingGroupDescription.html\"> <code>ProfilingGroupDescription</code> </a> object that contains information about the requested profiling group. </p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: DescribeProfilingGroupResponse) -> dict:
20
+ out: dict = {}
21
+ import capo_codeguruprofiler.types.profiling_group_description
22
+
23
+ out["profilingGroup"] = (
24
+ capo_codeguruprofiler.types.profiling_group_description.serialize_json(
25
+ value["profiling_group"]
26
+ )
27
+ )
28
+ return out
29
+
30
+
31
+ def deserialize_json(data: dict) -> DescribeProfilingGroupResponse:
32
+ out: DescribeProfilingGroupResponse = {} # type: ignore[typeddict-item]
33
+ if data.get("profilingGroup") is not None:
34
+ import capo_codeguruprofiler.types.profiling_group_description
35
+
36
+ out["profiling_group"] = (
37
+ capo_codeguruprofiler.types.profiling_group_description.deserialize_json(
38
+ data["profilingGroup"]
39
+ )
40
+ )
41
+ else:
42
+ raise DeserializationError(
43
+ "DescribeProfilingGroupResponse.profiling_group required"
44
+ )
45
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#EventPublisher``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ EventPublisher: TypeAlias = str
@@ -0,0 +1,19 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#EventPublishers``."""
2
+
3
+ from typing import TYPE_CHECKING, TypeAlias
4
+
5
+ if TYPE_CHECKING:
6
+ import capo_codeguruprofiler.types.event_publisher
7
+
8
+ EventPublishers: TypeAlias = list[
9
+ "capo_codeguruprofiler.types.event_publisher.EventPublisher"
10
+ ]
11
+
12
+
13
+ # --- restJson1 ser/de ---
14
+ def serialize_json(value: EventPublishers) -> list:
15
+ return list(value)
16
+
17
+
18
+ def deserialize_json(data: list) -> EventPublishers:
19
+ return [item for item in data if item is not None]
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FeedbackType``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ FeedbackType: TypeAlias = str
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FindingsReportId``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ FindingsReportId: TypeAlias = str
@@ -0,0 +1,35 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FindingsReportSummaries``."""
2
+
3
+ from typing import TYPE_CHECKING, TypeAlias
4
+
5
+ if TYPE_CHECKING:
6
+ import capo_codeguruprofiler.types.findings_report_summary
7
+
8
+ FindingsReportSummaries: TypeAlias = list[
9
+ "capo_codeguruprofiler.types.findings_report_summary.FindingsReportSummary"
10
+ ]
11
+
12
+
13
+ # --- restJson1 ser/de ---
14
+ def serialize_json(value: FindingsReportSummaries) -> list:
15
+ import capo_codeguruprofiler.types.findings_report_summary
16
+
17
+ out: list = []
18
+ for item in value:
19
+ out.append(
20
+ capo_codeguruprofiler.types.findings_report_summary.serialize_json(item)
21
+ )
22
+ return out
23
+
24
+
25
+ def deserialize_json(data: list) -> FindingsReportSummaries:
26
+ import capo_codeguruprofiler.types.findings_report_summary
27
+
28
+ out: FindingsReportSummaries = []
29
+ for item in data:
30
+ if item is None:
31
+ continue
32
+ out.append(
33
+ capo_codeguruprofiler.types.findings_report_summary.deserialize_json(item)
34
+ )
35
+ return out
@@ -0,0 +1,73 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FindingsReportSummary``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.findings_report_id
9
+ import capo_codeguruprofiler.types.timestamp
10
+
11
+
12
+ class FindingsReportSummary(TypedDict, closed=True):
13
+ id: NotRequired["capo_codeguruprofiler.types.findings_report_id.FindingsReportId"]
14
+ """<p>The universally unique identifier (UUID) of the recommendation report.</p>"""
15
+ profiling_group_name: NotRequired["str"]
16
+ """<p>The name of the profiling group that is associated with the analysis data.</p>"""
17
+ profile_start_time: NotRequired["capo_codeguruprofiler.types.timestamp.Timestamp"]
18
+ """<p>The start time of the profile the analysis data is about. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.</p>"""
19
+ profile_end_time: NotRequired["capo_codeguruprofiler.types.timestamp.Timestamp"]
20
+ """<p> The end time of the period during which the metric is flagged as anomalous. This is specified using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC. </p>"""
21
+ total_number_of_findings: NotRequired["int"]
22
+ """<p>The total number of different recommendations that were found by the analysis.</p>"""
23
+
24
+
25
+ # --- restJson1 ser/de ---
26
+ def serialize_json(value: FindingsReportSummary) -> dict:
27
+ out: dict = {}
28
+ if "id" in value:
29
+ out["id"] = value["id"]
30
+ if "profiling_group_name" in value:
31
+ out["profilingGroupName"] = value["profiling_group_name"]
32
+ if "profile_start_time" in value:
33
+ import capo_codeguruprofiler.types.timestamp
34
+
35
+ out["profileStartTime"] = capo_codeguruprofiler.types.timestamp.serialize_json(
36
+ value["profile_start_time"]
37
+ )
38
+ if "profile_end_time" in value:
39
+ import capo_codeguruprofiler.types.timestamp
40
+
41
+ out["profileEndTime"] = capo_codeguruprofiler.types.timestamp.serialize_json(
42
+ value["profile_end_time"]
43
+ )
44
+ if "total_number_of_findings" in value:
45
+ out["totalNumberOfFindings"] = value["total_number_of_findings"]
46
+ return out
47
+
48
+
49
+ def deserialize_json(data: dict) -> FindingsReportSummary:
50
+ out: FindingsReportSummary = {} # type: ignore[typeddict-item]
51
+ if data.get("id") is not None:
52
+ out["id"] = data["id"]
53
+ if data.get("profilingGroupName") is not None:
54
+ out["profiling_group_name"] = data["profilingGroupName"]
55
+ if data.get("profileStartTime") is not None:
56
+ import capo_codeguruprofiler.types.timestamp
57
+
58
+ out["profile_start_time"] = (
59
+ capo_codeguruprofiler.types.timestamp.deserialize_json(
60
+ data["profileStartTime"]
61
+ )
62
+ )
63
+ if data.get("profileEndTime") is not None:
64
+ import capo_codeguruprofiler.types.timestamp
65
+
66
+ out["profile_end_time"] = (
67
+ capo_codeguruprofiler.types.timestamp.deserialize_json(
68
+ data["profileEndTime"]
69
+ )
70
+ )
71
+ if data.get("totalNumberOfFindings") is not None:
72
+ out["total_number_of_findings"] = data["totalNumberOfFindings"]
73
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FleetInstanceId``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ FleetInstanceId: TypeAlias = str
@@ -0,0 +1,56 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FrameMetric``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.metric_type
11
+ import capo_codeguruprofiler.types.thread_states
12
+
13
+
14
+ class FrameMetric(TypedDict, closed=True):
15
+ frame_name: "str"
16
+ """<p> Name of the method common across the multiple occurrences of a frame in an application profile.</p>"""
17
+ type: "capo_codeguruprofiler.types.metric_type.MetricType"
18
+ """<p> A type of aggregation that specifies how a metric for a frame is analyzed. The supported value <code>AggregatedRelativeTotalTime</code> is an aggregation of the metric value for one frame that is calculated across the occurrences of all frames in a profile. </p>"""
19
+ thread_states: "capo_codeguruprofiler.types.thread_states.ThreadStates"
20
+ """<p>List of application runtime thread states used to get the counts for a frame a derive a metric value.</p>"""
21
+
22
+
23
+ # --- restJson1 ser/de ---
24
+ def serialize_json(value: FrameMetric) -> dict:
25
+ out: dict = {}
26
+ out["frameName"] = value["frame_name"]
27
+ out["type"] = value["type"]
28
+ import capo_codeguruprofiler.types.thread_states
29
+
30
+ out["threadStates"] = capo_codeguruprofiler.types.thread_states.serialize_json(
31
+ value["thread_states"]
32
+ )
33
+ return out
34
+
35
+
36
+ def deserialize_json(data: dict) -> FrameMetric:
37
+ out: FrameMetric = {} # type: ignore[typeddict-item]
38
+ if data.get("frameName") is not None:
39
+ out["frame_name"] = data["frameName"]
40
+ else:
41
+ raise DeserializationError("FrameMetric.frame_name required")
42
+ if data.get("type") is not None:
43
+ out["type"] = data["type"]
44
+ else:
45
+ raise DeserializationError("FrameMetric.type required")
46
+ if data.get("threadStates") is not None:
47
+ import capo_codeguruprofiler.types.thread_states
48
+
49
+ out["thread_states"] = (
50
+ capo_codeguruprofiler.types.thread_states.deserialize_json(
51
+ data["threadStates"]
52
+ )
53
+ )
54
+ else:
55
+ raise DeserializationError("FrameMetric.thread_states required")
56
+ return out
@@ -0,0 +1,33 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FrameMetricData``."""
2
+
3
+ from typing import TYPE_CHECKING, TypeAlias
4
+
5
+ if TYPE_CHECKING:
6
+ import capo_codeguruprofiler.types.frame_metric_datum
7
+
8
+ FrameMetricData: TypeAlias = list[
9
+ "capo_codeguruprofiler.types.frame_metric_datum.FrameMetricDatum"
10
+ ]
11
+
12
+
13
+ # --- restJson1 ser/de ---
14
+ def serialize_json(value: FrameMetricData) -> list:
15
+ import capo_codeguruprofiler.types.frame_metric_datum
16
+
17
+ out: list = []
18
+ for item in value:
19
+ out.append(capo_codeguruprofiler.types.frame_metric_datum.serialize_json(item))
20
+ return out
21
+
22
+
23
+ def deserialize_json(data: list) -> FrameMetricData:
24
+ import capo_codeguruprofiler.types.frame_metric_datum
25
+
26
+ out: FrameMetricData = []
27
+ for item in data:
28
+ if item is None:
29
+ continue
30
+ out.append(
31
+ capo_codeguruprofiler.types.frame_metric_datum.deserialize_json(item)
32
+ )
33
+ return out
@@ -0,0 +1,56 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FrameMetricDatum``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.frame_metric
11
+ import capo_codeguruprofiler.types.frame_metric_values
12
+
13
+
14
+ class FrameMetricDatum(TypedDict, closed=True):
15
+ frame_metric: "capo_codeguruprofiler.types.frame_metric.FrameMetric"
16
+ values: "capo_codeguruprofiler.types.frame_metric_values.FrameMetricValues"
17
+ """<p> A list of values that are associated with a frame metric. </p>"""
18
+
19
+
20
+ # --- restJson1 ser/de ---
21
+ def serialize_json(value: FrameMetricDatum) -> dict:
22
+ out: dict = {}
23
+ import capo_codeguruprofiler.types.frame_metric
24
+
25
+ out["frameMetric"] = capo_codeguruprofiler.types.frame_metric.serialize_json(
26
+ value["frame_metric"]
27
+ )
28
+ import capo_codeguruprofiler.types.frame_metric_values
29
+
30
+ out["values"] = capo_codeguruprofiler.types.frame_metric_values.serialize_json(
31
+ value["values"]
32
+ )
33
+ return out
34
+
35
+
36
+ def deserialize_json(data: dict) -> FrameMetricDatum:
37
+ out: FrameMetricDatum = {} # type: ignore[typeddict-item]
38
+ if data.get("frameMetric") is not None:
39
+ import capo_codeguruprofiler.types.frame_metric
40
+
41
+ out["frame_metric"] = capo_codeguruprofiler.types.frame_metric.deserialize_json(
42
+ data["frameMetric"]
43
+ )
44
+ else:
45
+ raise DeserializationError("FrameMetricDatum.frame_metric required")
46
+ if data.get("values") is not None:
47
+ import capo_codeguruprofiler.types.frame_metric_values
48
+
49
+ out["values"] = (
50
+ capo_codeguruprofiler.types.frame_metric_values.deserialize_json(
51
+ data["values"]
52
+ )
53
+ )
54
+ else:
55
+ raise DeserializationError("FrameMetricDatum.values required")
56
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FrameMetricValue``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ FrameMetricValue: TypeAlias = float
@@ -0,0 +1,30 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FrameMetricValues``."""
2
+
3
+ from typing import TYPE_CHECKING, TypeAlias
4
+
5
+ if TYPE_CHECKING:
6
+ import capo_codeguruprofiler.types.frame_metric_value
7
+
8
+ FrameMetricValues: TypeAlias = list[
9
+ "capo_codeguruprofiler.types.frame_metric_value.FrameMetricValue"
10
+ ]
11
+
12
+
13
+ # --- restJson1 ser/de ---
14
+ def serialize_json(value: FrameMetricValues) -> list:
15
+ return [
16
+ (
17
+ "NaN"
18
+ if item != item
19
+ else "Infinity"
20
+ if item == float("inf")
21
+ else "-Infinity"
22
+ if item == float("-inf")
23
+ else item
24
+ )
25
+ for item in value
26
+ ]
27
+
28
+
29
+ def deserialize_json(data: list) -> FrameMetricValues:
30
+ return [float(item) for item in data if item is not None]
@@ -0,0 +1,29 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#FrameMetrics``."""
2
+
3
+ from typing import TYPE_CHECKING, TypeAlias
4
+
5
+ if TYPE_CHECKING:
6
+ import capo_codeguruprofiler.types.frame_metric
7
+
8
+ FrameMetrics: TypeAlias = list["capo_codeguruprofiler.types.frame_metric.FrameMetric"]
9
+
10
+
11
+ # --- restJson1 ser/de ---
12
+ def serialize_json(value: FrameMetrics) -> list:
13
+ import capo_codeguruprofiler.types.frame_metric
14
+
15
+ out: list = []
16
+ for item in value:
17
+ out.append(capo_codeguruprofiler.types.frame_metric.serialize_json(item))
18
+ return out
19
+
20
+
21
+ def deserialize_json(data: list) -> FrameMetrics:
22
+ import capo_codeguruprofiler.types.frame_metric
23
+
24
+ out: FrameMetrics = []
25
+ for item in data:
26
+ if item is None:
27
+ continue
28
+ out.append(capo_codeguruprofiler.types.frame_metric.deserialize_json(item))
29
+ return out
@@ -0,0 +1,31 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#GetFindingsReportAccountSummaryRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.max_results
9
+ import capo_codeguruprofiler.types.pagination_token
10
+
11
+
12
+ class GetFindingsReportAccountSummaryRequest(TypedDict, closed=True):
13
+ next_token: NotRequired[
14
+ "capo_codeguruprofiler.types.pagination_token.PaginationToken"
15
+ ]
16
+ """<p>The <code>nextToken</code> value returned from a previous paginated <code>GetFindingsReportAccountSummary</code> request where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. </p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>"""
17
+ max_results: NotRequired["capo_codeguruprofiler.types.max_results.MaxResults"]
18
+ """<p>The maximum number of results returned by <code> GetFindingsReportAccountSummary</code> in paginated output. When this parameter is used, <code>GetFindingsReportAccountSummary</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>GetFindingsReportAccountSummary</code> request with the returned <code>nextToken</code> value.</p>"""
19
+ daily_reports_only: NotRequired["bool"]
20
+ """<p>A <code>Boolean</code> value indicating whether to only return reports from daily profiles. If set to <code>True</code>, only analysis data from daily profiles is returned. If set to <code>False</code>, analysis data is returned from smaller time windows (for example, one hour).</p>"""
21
+
22
+
23
+ # --- restJson1 ser/de ---
24
+ def serialize_json(value: GetFindingsReportAccountSummaryRequest) -> dict:
25
+ out: dict = {}
26
+ return out
27
+
28
+
29
+ def deserialize_json(data: dict) -> GetFindingsReportAccountSummaryRequest:
30
+ out: GetFindingsReportAccountSummaryRequest = {} # type: ignore[typeddict-item]
31
+ return out
@@ -0,0 +1,56 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#GetFindingsReportAccountSummaryResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.findings_report_summaries
11
+ import capo_codeguruprofiler.types.pagination_token
12
+
13
+
14
+ class GetFindingsReportAccountSummaryResponse(TypedDict, closed=True):
15
+ report_summaries: (
16
+ "capo_codeguruprofiler.types.findings_report_summaries.FindingsReportSummaries"
17
+ )
18
+ r"""<p>The return list of <a href=\"https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_FindingsReportSummary.html\"> <code>FindingsReportSummary</code> </a> objects taht contain summaries of analysis results for all profiling groups in your AWS account.</p>"""
19
+ next_token: NotRequired[
20
+ "capo_codeguruprofiler.types.pagination_token.PaginationToken"
21
+ ]
22
+ """<p>The <code>nextToken</code> value to include in a future <code>GetFindingsReportAccountSummary</code> request. When the results of a <code>GetFindingsReportAccountSummary</code> request exceed <code>maxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>"""
23
+
24
+
25
+ # --- restJson1 ser/de ---
26
+ def serialize_json(value: GetFindingsReportAccountSummaryResponse) -> dict:
27
+ out: dict = {}
28
+ import capo_codeguruprofiler.types.findings_report_summaries
29
+
30
+ out["reportSummaries"] = (
31
+ capo_codeguruprofiler.types.findings_report_summaries.serialize_json(
32
+ value["report_summaries"]
33
+ )
34
+ )
35
+ if "next_token" in value:
36
+ out["nextToken"] = value["next_token"]
37
+ return out
38
+
39
+
40
+ def deserialize_json(data: dict) -> GetFindingsReportAccountSummaryResponse:
41
+ out: GetFindingsReportAccountSummaryResponse = {} # type: ignore[typeddict-item]
42
+ if data.get("reportSummaries") is not None:
43
+ import capo_codeguruprofiler.types.findings_report_summaries
44
+
45
+ out["report_summaries"] = (
46
+ capo_codeguruprofiler.types.findings_report_summaries.deserialize_json(
47
+ data["reportSummaries"]
48
+ )
49
+ )
50
+ else:
51
+ raise DeserializationError(
52
+ "GetFindingsReportAccountSummaryResponse.report_summaries required"
53
+ )
54
+ if data.get("nextToken") is not None:
55
+ out["next_token"] = data["nextToken"]
56
+ return out
@@ -0,0 +1,26 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#GetNotificationConfigurationRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.profiling_group_name
9
+
10
+
11
+ class GetNotificationConfigurationRequest(TypedDict, closed=True):
12
+ profiling_group_name: (
13
+ "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
14
+ )
15
+ """<p>The name of the profiling group we want to get the notification configuration for.</p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: GetNotificationConfigurationRequest) -> dict:
20
+ out: dict = {}
21
+ return out
22
+
23
+
24
+ def deserialize_json(data: dict) -> GetNotificationConfigurationRequest:
25
+ out: GetNotificationConfigurationRequest = {} # type: ignore[typeddict-item]
26
+ return out
@@ -0,0 +1,45 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#GetNotificationConfigurationResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.notification_configuration
11
+
12
+
13
+ class GetNotificationConfigurationResponse(TypedDict, closed=True):
14
+ notification_configuration: "capo_codeguruprofiler.types.notification_configuration.NotificationConfiguration"
15
+ """<p>The current notification configuration for this profiling group.</p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: GetNotificationConfigurationResponse) -> dict:
20
+ out: dict = {}
21
+ import capo_codeguruprofiler.types.notification_configuration
22
+
23
+ out["notificationConfiguration"] = (
24
+ capo_codeguruprofiler.types.notification_configuration.serialize_json(
25
+ value["notification_configuration"]
26
+ )
27
+ )
28
+ return out
29
+
30
+
31
+ def deserialize_json(data: dict) -> GetNotificationConfigurationResponse:
32
+ out: GetNotificationConfigurationResponse = {} # type: ignore[typeddict-item]
33
+ if data.get("notificationConfiguration") is not None:
34
+ import capo_codeguruprofiler.types.notification_configuration
35
+
36
+ out["notification_configuration"] = (
37
+ capo_codeguruprofiler.types.notification_configuration.deserialize_json(
38
+ data["notificationConfiguration"]
39
+ )
40
+ )
41
+ else:
42
+ raise DeserializationError(
43
+ "GetNotificationConfigurationResponse.notification_configuration required"
44
+ )
45
+ return out
@@ -0,0 +1,26 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#GetPolicyRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ if TYPE_CHECKING:
8
+ import capo_codeguruprofiler.types.profiling_group_name
9
+
10
+
11
+ class GetPolicyRequest(TypedDict, closed=True):
12
+ profiling_group_name: (
13
+ "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName"
14
+ )
15
+ """<p>The name of the profiling group.</p>"""
16
+
17
+
18
+ # --- restJson1 ser/de ---
19
+ def serialize_json(value: GetPolicyRequest) -> dict:
20
+ out: dict = {}
21
+ return out
22
+
23
+
24
+ def deserialize_json(data: dict) -> GetPolicyRequest:
25
+ out: GetPolicyRequest = {} # type: ignore[typeddict-item]
26
+ return out
@@ -0,0 +1,38 @@
1
+ """Generated from Smithy shape ``com.amazonaws.codeguruprofiler#GetPolicyResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_codeguruprofiler.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_codeguruprofiler.types.revision_id
11
+
12
+
13
+ class GetPolicyResponse(TypedDict, closed=True):
14
+ policy: "str"
15
+ """<p>The JSON-formatted resource-based policy attached to the <code>ProfilingGroup</code>.</p>"""
16
+ revision_id: "capo_codeguruprofiler.types.revision_id.RevisionId"
17
+ """<p>A unique identifier for the current revision of the returned policy.</p>"""
18
+
19
+
20
+ # --- restJson1 ser/de ---
21
+ def serialize_json(value: GetPolicyResponse) -> dict:
22
+ out: dict = {}
23
+ out["policy"] = value["policy"]
24
+ out["revisionId"] = value["revision_id"]
25
+ return out
26
+
27
+
28
+ def deserialize_json(data: dict) -> GetPolicyResponse:
29
+ out: GetPolicyResponse = {} # type: ignore[typeddict-item]
30
+ if data.get("policy") is not None:
31
+ out["policy"] = data["policy"]
32
+ else:
33
+ raise DeserializationError("GetPolicyResponse.policy required")
34
+ if data.get("revisionId") is not None:
35
+ out["revision_id"] = data["revisionId"]
36
+ else:
37
+ raise DeserializationError("GetPolicyResponse.revision_id required")
38
+ return out