datadog_api_client 2.31.1 → 2.32.0

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 (206) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +80 -4
  4. data/.generator/schemas/v2/openapi.yaml +2404 -55
  5. data/.generator/src/generator/cli.py +1 -1
  6. data/.generator/src/generator/formatter.py +3 -0
  7. data/.generator/src/generator/templates/api.j2 +1 -1
  8. data/.generator/src/generator/templates/inflector.j2 +1 -1
  9. data/CHANGELOG.md +27 -0
  10. data/examples/v1/slack-integration/CreateSlackIntegrationChannel.rb +1 -0
  11. data/examples/v1/slack-integration/UpdateSlackIntegrationChannel.rb +1 -0
  12. data/examples/v2/action-connection/CreateActionConnection.rb +1 -1
  13. data/examples/v2/action-connection/DeleteActionConnection.rb +4 -1
  14. data/examples/v2/apm-retention-filters/CreateApmRetentionFilter_3853850379.rb +21 -0
  15. data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter_3916044058.rb +25 -0
  16. data/examples/v2/cloud-network-monitoring/GetAggregatedConnections.rb +8 -0
  17. data/examples/v2/cloud-network-monitoring/GetAggregatedConnections_3059356111.rb +8 -0
  18. data/examples/v2/observability-pipelines/CreatePipeline.rb +44 -0
  19. data/examples/v2/observability-pipelines/DeletePipeline.rb +11 -0
  20. data/examples/v2/observability-pipelines/GetPipeline.rb +11 -0
  21. data/examples/v2/observability-pipelines/UpdatePipeline.rb +48 -0
  22. data/examples/v2/on-call/CreateOnCallSchedule.rb +61 -0
  23. data/examples/v2/on-call/DeleteOnCallSchedule.rb +8 -0
  24. data/examples/v2/on-call/GetOnCallSchedule.rb +8 -0
  25. data/examples/v2/on-call/UpdateOnCallSchedule.rb +68 -0
  26. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.rb +6 -0
  27. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
  28. data/examples/v2/software-catalog/UpsertCatalogEntity.rb +1 -0
  29. data/lib/datadog_api_client/configuration.rb +5 -0
  30. data/lib/datadog_api_client/inflector.rb +122 -1
  31. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
  32. data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_type.rb +1 -0
  33. data/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb +11 -1
  34. data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
  35. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
  36. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
  37. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
  38. data/lib/datadog_api_client/v2/api/cloud_network_monitoring_api.rb +108 -0
  39. data/lib/datadog_api_client/v2/api/downtimes_api.rb +2 -0
  40. data/lib/datadog_api_client/v2/api/observability_pipelines_api.rb +319 -0
  41. data/lib/datadog_api_client/v2/api/on_call_api.rb +301 -0
  42. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
  43. data/lib/datadog_api_client/v2/models/api_trigger.rb +1 -1
  44. data/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +1 -1
  45. data/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +1 -1
  46. data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_tags_category.rb +1 -1
  47. data/lib/datadog_api_client/v2/models/case_trigger.rb +1 -1
  48. data/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +1 -1
  49. data/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb +1 -1
  50. data/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +1 -1
  51. data/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb +135 -0
  52. data/lib/datadog_api_client/v2/models/entity_response_included_incident.rb +1 -1
  53. data/lib/datadog_api_client/v2/models/{service_definition_v2_dot2_type.rb → entity_response_included_incident_type.rb} +3 -9
  54. data/lib/datadog_api_client/v2/models/entity_response_included_oncall.rb +1 -1
  55. data/lib/datadog_api_client/v2/models/entity_response_included_oncall_type.rb +26 -0
  56. data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema.rb +1 -1
  57. data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema_type.rb +26 -0
  58. data/lib/datadog_api_client/v2/models/entity_response_included_related_entity.rb +1 -1
  59. data/lib/datadog_api_client/v2/models/entity_response_included_related_entity_type.rb +26 -0
  60. data/lib/datadog_api_client/v2/models/entity_response_included_schema.rb +1 -1
  61. data/lib/datadog_api_client/v2/models/entity_response_included_schema_type.rb +26 -0
  62. data/lib/datadog_api_client/v2/models/entity_v3_datastore_spec.rb +13 -1
  63. data/lib/datadog_api_client/v2/models/entity_v3_queue_spec.rb +13 -1
  64. data/lib/datadog_api_client/v2/models/entity_v3_service_spec.rb +13 -1
  65. data/lib/datadog_api_client/v2/models/github_webhook_trigger.rb +1 -1
  66. data/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb +1 -1
  67. data/lib/datadog_api_client/v2/models/historical_job_query.rb +11 -1
  68. data/lib/datadog_api_client/v2/models/incident_trigger.rb +1 -1
  69. data/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +1 -1
  70. data/lib/datadog_api_client/v2/models/interface_attributes.rb +13 -1
  71. data/lib/datadog_api_client/v2/models/layer.rb +135 -0
  72. data/lib/datadog_api_client/v2/models/layer_attributes.rb +157 -0
  73. data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +144 -0
  74. data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items.rb +136 -0
  75. data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_end_day.rb +32 -0
  76. data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_start_day.rb +32 -0
  77. data/lib/datadog_api_client/v2/models/layer_relationships.rb +105 -0
  78. data/lib/datadog_api_client/v2/models/layer_relationships_members.rb +107 -0
  79. data/lib/datadog_api_client/v2/models/layer_relationships_members_data_items.rb +116 -0
  80. data/lib/datadog_api_client/v2/models/layer_relationships_members_data_items_type.rb +26 -0
  81. data/lib/datadog_api_client/v2/models/layer_type.rb +26 -0
  82. data/lib/datadog_api_client/v2/models/logs_aggregate_request.rb +1 -1
  83. data/lib/datadog_api_client/v2/models/logs_list_request.rb +1 -1
  84. data/lib/datadog_api_client/v2/models/logs_query_options.rb +4 -1
  85. data/lib/datadog_api_client/v2/models/monitor_trigger.rb +1 -1
  86. data/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +1 -1
  87. data/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb +135 -0
  88. data/lib/datadog_api_client/v2/models/observability_pipeline.rb +123 -0
  89. data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +211 -0
  90. data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor_type.rb +26 -0
  91. data/lib/datadog_api_client/v2/models/observability_pipeline_config.rb +171 -0
  92. data/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +62 -0
  93. data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb +67 -0
  94. data/lib/datadog_api_client/v2/models/observability_pipeline_config_source_item.rb +63 -0
  95. data/lib/datadog_api_client/v2/models/observability_pipeline_create_request.rb +123 -0
  96. data/lib/datadog_api_client/v2/models/observability_pipeline_create_request_data.rb +144 -0
  97. data/lib/datadog_api_client/v2/models/observability_pipeline_data.rb +165 -0
  98. data/lib/datadog_api_client/v2/models/observability_pipeline_data_attributes.rb +144 -0
  99. data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_agent_source.rb +154 -0
  100. data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_agent_source_type.rb +26 -0
  101. data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_logs_destination.rb +167 -0
  102. data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_logs_destination_type.rb +26 -0
  103. data/lib/datadog_api_client/v2/models/observability_pipeline_field_value.rb +144 -0
  104. data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +188 -0
  105. data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor_type.rb +26 -0
  106. data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source.rb +220 -0
  107. data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_librdkafka_option.rb +144 -0
  108. data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_sasl.rb +105 -0
  109. data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_type.rb +26 -0
  110. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +209 -0
  111. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor_type.rb +26 -0
  112. data/lib/datadog_api_client/v2/models/observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb +28 -0
  113. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +285 -0
  114. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_limit.rb +144 -0
  115. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_limit_enforce_type.rb +27 -0
  116. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_override.rb +146 -0
  117. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_type.rb +26 -0
  118. data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +211 -0
  119. data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor_type.rb +26 -0
  120. data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +211 -0
  121. data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor_field.rb +165 -0
  122. data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor_type.rb +26 -0
  123. data/lib/datadog_api_client/v2/models/observability_pipeline_tls.rb +143 -0
  124. data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +16 -5
  125. data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +16 -5
  126. data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +16 -5
  127. data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +16 -5
  128. data/lib/datadog_api_client/v2/models/schedule.rb +117 -0
  129. data/lib/datadog_api_client/v2/models/schedule_create_request.rb +123 -0
  130. data/lib/datadog_api_client/v2/models/schedule_create_request_data.rb +154 -0
  131. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes.rb +179 -0
  132. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +231 -0
  133. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_interval.rb +144 -0
  134. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_members_items.rb +105 -0
  135. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_members_items_user.rb +105 -0
  136. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items.rb +136 -0
  137. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_end_day.rb +32 -0
  138. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_start_day.rb +32 -0
  139. data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships.rb +105 -0
  140. data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams.rb +107 -0
  141. data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams_data_items.rb +116 -0
  142. data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams_data_items_type.rb +26 -0
  143. data/lib/datadog_api_client/v2/models/schedule_create_request_data_type.rb +26 -0
  144. data/lib/datadog_api_client/v2/models/schedule_data.rb +135 -0
  145. data/lib/datadog_api_client/v2/models/schedule_data_attributes.rb +127 -0
  146. data/lib/datadog_api_client/v2/models/schedule_data_included_item.rb +65 -0
  147. data/lib/datadog_api_client/v2/models/schedule_data_relationships.rb +115 -0
  148. data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers.rb +107 -0
  149. data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers_data_items.rb +115 -0
  150. data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers_data_items_type.rb +26 -0
  151. data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams.rb +107 -0
  152. data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams_data_items.rb +115 -0
  153. data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams_data_items_type.rb +26 -0
  154. data/lib/datadog_api_client/v2/models/schedule_data_type.rb +26 -0
  155. data/lib/datadog_api_client/v2/models/schedule_member.rb +125 -0
  156. data/lib/datadog_api_client/v2/models/schedule_member_relationships.rb +105 -0
  157. data/lib/datadog_api_client/v2/models/schedule_member_relationships_user.rb +105 -0
  158. data/lib/datadog_api_client/v2/models/schedule_member_relationships_user_data.rb +115 -0
  159. data/lib/datadog_api_client/v2/models/schedule_member_relationships_user_data_type.rb +26 -0
  160. data/lib/datadog_api_client/v2/models/schedule_member_type.rb +26 -0
  161. data/lib/datadog_api_client/v2/models/schedule_trigger.rb +1 -1
  162. data/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +1 -1
  163. data/lib/datadog_api_client/v2/models/schedule_update_request.rb +123 -0
  164. data/lib/datadog_api_client/v2/models/schedule_update_request_data.rb +175 -0
  165. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes.rb +179 -0
  166. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +180 -0
  167. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_interval.rb +144 -0
  168. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_members_items.rb +106 -0
  169. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_members_items_user.rb +105 -0
  170. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items.rb +136 -0
  171. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_end_day.rb +32 -0
  172. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_start_day.rb +32 -0
  173. data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships.rb +105 -0
  174. data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams.rb +107 -0
  175. data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams_data_items.rb +115 -0
  176. data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams_data_items_type.rb +26 -0
  177. data/lib/datadog_api_client/v2/models/schedule_update_request_data_type.rb +26 -0
  178. data/lib/datadog_api_client/v2/models/schedule_user.rb +125 -0
  179. data/lib/datadog_api_client/v2/models/schedule_user_attributes.rb +115 -0
  180. data/lib/datadog_api_client/v2/models/schedule_user_type.rb +26 -0
  181. data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_options.rb +13 -3
  182. data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_type.rb +1 -0
  183. data/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb +31 -0
  184. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
  185. data/lib/datadog_api_client/v2/models/security_trigger.rb +1 -1
  186. data/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +1 -1
  187. data/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb +135 -0
  188. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +1 -1
  189. data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_array.rb +107 -0
  190. data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data.rb +125 -0
  191. data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data_attributes.rb +215 -0
  192. data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data_type.rb +26 -0
  193. data/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +1 -1
  194. data/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb +135 -0
  195. data/lib/datadog_api_client/v2/models/team_reference.rb +135 -0
  196. data/lib/datadog_api_client/v2/models/team_reference_attributes.rb +135 -0
  197. data/lib/datadog_api_client/v2/models/team_reference_relationships.rb +105 -0
  198. data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users.rb +107 -0
  199. data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users_data_items.rb +115 -0
  200. data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users_data_items_type.rb +26 -0
  201. data/lib/datadog_api_client/v2/models/team_reference_type.rb +26 -0
  202. data/lib/datadog_api_client/v2/models/trigger.rb +4 -0
  203. data/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +1 -1
  204. data/lib/datadog_api_client/version.rb +1 -1
  205. metadata +136 -4
  206. data/examples/v2/action-connection/DeleteActionConnection_2142905164.rb +0 -8
@@ -0,0 +1,123 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Top-level schema representing a pipeline.
21
+ class ObservabilityPipeline
22
+ include BaseGenericModel
23
+
24
+ # Contains the pipeline’s ID, type, and configuration attributes.
25
+ attr_reader :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'ObservabilityPipelineData'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipeline` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ # @!visibility private
71
+ def valid?
72
+ return false if @data.nil?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param data [Object] Object to be assigned
78
+ # @!visibility private
79
+ def data=(data)
80
+ if data.nil?
81
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
82
+ end
83
+ @data = data
84
+ end
85
+
86
+ # Returns the object in the form of hash, with additionalProperties support.
87
+ # @return [Hash] Returns the object in the form of hash
88
+ # @!visibility private
89
+ def to_hash
90
+ hash = {}
91
+ self.class.attribute_map.each_pair do |attr, param|
92
+ value = self.send(attr)
93
+ if value.nil?
94
+ is_nullable = self.class.openapi_nullable.include?(attr)
95
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96
+ end
97
+
98
+ hash[param] = _to_hash(value)
99
+ end
100
+ self.additional_properties.each_pair do |attr, value|
101
+ hash[attr] = value
102
+ end
103
+ hash
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param o [Object] Object to be compared
108
+ # @!visibility private
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ data == o.data &&
113
+ additional_properties == o.additional_properties
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [data, additional_properties].hash
121
+ end
122
+ end
123
+ end
@@ -0,0 +1,211 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The `add_fields` processor adds static key-value fields to logs.
21
+ class ObservabilityPipelineAddFieldsProcessor
22
+ include BaseGenericModel
23
+
24
+ # A list of static fields (key-value pairs) that is added to each log event processed by this component.
25
+ attr_reader :fields
26
+
27
+ # The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components).
28
+ attr_reader :id
29
+
30
+ # A Datadog search query used to determine which logs this processor targets.
31
+ attr_reader :include
32
+
33
+ # A list of component IDs whose output is used as the `input` for this component.
34
+ attr_reader :inputs
35
+
36
+ # The processor type. The value should always be `add_fields`.
37
+ attr_reader :type
38
+
39
+ attr_accessor :additional_properties
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ # @!visibility private
43
+ def self.attribute_map
44
+ {
45
+ :'fields' => :'fields',
46
+ :'id' => :'id',
47
+ :'include' => :'include',
48
+ :'inputs' => :'inputs',
49
+ :'type' => :'type'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ # @!visibility private
55
+ def self.openapi_types
56
+ {
57
+ :'fields' => :'Array<ObservabilityPipelineFieldValue>',
58
+ :'id' => :'String',
59
+ :'include' => :'String',
60
+ :'inputs' => :'Array<String>',
61
+ :'type' => :'ObservabilityPipelineAddFieldsProcessorType'
62
+ }
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param attributes [Hash] Model attributes in the form of hash
67
+ # @!visibility private
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineAddFieldsProcessor` initialize method"
71
+ end
72
+
73
+ self.additional_properties = {}
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ self.additional_properties[k.to_sym] = v
78
+ else
79
+ h[k.to_sym] = v
80
+ end
81
+ }
82
+
83
+ if attributes.key?(:'fields')
84
+ if (value = attributes[:'fields']).is_a?(Array)
85
+ self.fields = value
86
+ end
87
+ end
88
+
89
+ if attributes.key?(:'id')
90
+ self.id = attributes[:'id']
91
+ end
92
+
93
+ if attributes.key?(:'include')
94
+ self.include = attributes[:'include']
95
+ end
96
+
97
+ if attributes.key?(:'inputs')
98
+ if (value = attributes[:'inputs']).is_a?(Array)
99
+ self.inputs = value
100
+ end
101
+ end
102
+
103
+ if attributes.key?(:'type')
104
+ self.type = attributes[:'type']
105
+ end
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ # @!visibility private
111
+ def valid?
112
+ return false if @fields.nil?
113
+ return false if @id.nil?
114
+ return false if @include.nil?
115
+ return false if @inputs.nil?
116
+ return false if @type.nil?
117
+ true
118
+ end
119
+
120
+ # Custom attribute writer method with validation
121
+ # @param fields [Object] Object to be assigned
122
+ # @!visibility private
123
+ def fields=(fields)
124
+ if fields.nil?
125
+ fail ArgumentError, 'invalid value for "fields", fields cannot be nil.'
126
+ end
127
+ @fields = fields
128
+ end
129
+
130
+ # Custom attribute writer method with validation
131
+ # @param id [Object] Object to be assigned
132
+ # @!visibility private
133
+ def id=(id)
134
+ if id.nil?
135
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
136
+ end
137
+ @id = id
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param include [Object] Object to be assigned
142
+ # @!visibility private
143
+ def include=(include)
144
+ if include.nil?
145
+ fail ArgumentError, 'invalid value for "include", include cannot be nil.'
146
+ end
147
+ @include = include
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param inputs [Object] Object to be assigned
152
+ # @!visibility private
153
+ def inputs=(inputs)
154
+ if inputs.nil?
155
+ fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.'
156
+ end
157
+ @inputs = inputs
158
+ end
159
+
160
+ # Custom attribute writer method with validation
161
+ # @param type [Object] Object to be assigned
162
+ # @!visibility private
163
+ def type=(type)
164
+ if type.nil?
165
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
166
+ end
167
+ @type = type
168
+ end
169
+
170
+ # Returns the object in the form of hash, with additionalProperties support.
171
+ # @return [Hash] Returns the object in the form of hash
172
+ # @!visibility private
173
+ def to_hash
174
+ hash = {}
175
+ self.class.attribute_map.each_pair do |attr, param|
176
+ value = self.send(attr)
177
+ if value.nil?
178
+ is_nullable = self.class.openapi_nullable.include?(attr)
179
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
180
+ end
181
+
182
+ hash[param] = _to_hash(value)
183
+ end
184
+ self.additional_properties.each_pair do |attr, value|
185
+ hash[attr] = value
186
+ end
187
+ hash
188
+ end
189
+
190
+ # Checks equality by comparing each attribute.
191
+ # @param o [Object] Object to be compared
192
+ # @!visibility private
193
+ def ==(o)
194
+ return true if self.equal?(o)
195
+ self.class == o.class &&
196
+ fields == o.fields &&
197
+ id == o.id &&
198
+ include == o.include &&
199
+ inputs == o.inputs &&
200
+ type == o.type &&
201
+ additional_properties == o.additional_properties
202
+ end
203
+
204
+ # Calculates hash code according to all attributes.
205
+ # @return [Integer] Hash code
206
+ # @!visibility private
207
+ def hash
208
+ [fields, id, include, inputs, type, additional_properties].hash
209
+ end
210
+ end
211
+ end
@@ -0,0 +1,26 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The processor type. The value should always be `add_fields`.
21
+ class ObservabilityPipelineAddFieldsProcessorType
22
+ include BaseEnumModel
23
+
24
+ ADD_FIELDS = "add_fields".freeze
25
+ end
26
+ end
@@ -0,0 +1,171 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Specifies the pipeline's configuration, including its sources, processors, and destinations.
21
+ class ObservabilityPipelineConfig
22
+ include BaseGenericModel
23
+
24
+ # A list of destination components where processed logs are sent.
25
+ attr_reader :destinations
26
+
27
+ # A list of processors that transform or enrich log data.
28
+ attr_reader :processors
29
+
30
+ # A list of configured data sources for the pipeline.
31
+ attr_reader :sources
32
+
33
+ attr_accessor :additional_properties
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'destinations' => :'destinations',
40
+ :'processors' => :'processors',
41
+ :'sources' => :'sources'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'destinations' => :'Array<ObservabilityPipelineConfigDestinationItem>',
50
+ :'processors' => :'Array<ObservabilityPipelineConfigProcessorItem>',
51
+ :'sources' => :'Array<ObservabilityPipelineConfigSourceItem>'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param attributes [Hash] Model attributes in the form of hash
57
+ # @!visibility private
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineConfig` initialize method"
61
+ end
62
+
63
+ self.additional_properties = {}
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ self.additional_properties[k.to_sym] = v
68
+ else
69
+ h[k.to_sym] = v
70
+ end
71
+ }
72
+
73
+ if attributes.key?(:'destinations')
74
+ if (value = attributes[:'destinations']).is_a?(Array)
75
+ self.destinations = value
76
+ end
77
+ end
78
+
79
+ if attributes.key?(:'processors')
80
+ if (value = attributes[:'processors']).is_a?(Array)
81
+ self.processors = value
82
+ end
83
+ end
84
+
85
+ if attributes.key?(:'sources')
86
+ if (value = attributes[:'sources']).is_a?(Array)
87
+ self.sources = value
88
+ end
89
+ end
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ # @!visibility private
95
+ def valid?
96
+ return false if @destinations.nil?
97
+ return false if @processors.nil?
98
+ return false if @sources.nil?
99
+ true
100
+ end
101
+
102
+ # Custom attribute writer method with validation
103
+ # @param destinations [Object] Object to be assigned
104
+ # @!visibility private
105
+ def destinations=(destinations)
106
+ if destinations.nil?
107
+ fail ArgumentError, 'invalid value for "destinations", destinations cannot be nil.'
108
+ end
109
+ @destinations = destinations
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param processors [Object] Object to be assigned
114
+ # @!visibility private
115
+ def processors=(processors)
116
+ if processors.nil?
117
+ fail ArgumentError, 'invalid value for "processors", processors cannot be nil.'
118
+ end
119
+ @processors = processors
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param sources [Object] Object to be assigned
124
+ # @!visibility private
125
+ def sources=(sources)
126
+ if sources.nil?
127
+ fail ArgumentError, 'invalid value for "sources", sources cannot be nil.'
128
+ end
129
+ @sources = sources
130
+ end
131
+
132
+ # Returns the object in the form of hash, with additionalProperties support.
133
+ # @return [Hash] Returns the object in the form of hash
134
+ # @!visibility private
135
+ def to_hash
136
+ hash = {}
137
+ self.class.attribute_map.each_pair do |attr, param|
138
+ value = self.send(attr)
139
+ if value.nil?
140
+ is_nullable = self.class.openapi_nullable.include?(attr)
141
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
142
+ end
143
+
144
+ hash[param] = _to_hash(value)
145
+ end
146
+ self.additional_properties.each_pair do |attr, value|
147
+ hash[attr] = value
148
+ end
149
+ hash
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param o [Object] Object to be compared
154
+ # @!visibility private
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ destinations == o.destinations &&
159
+ processors == o.processors &&
160
+ sources == o.sources &&
161
+ additional_properties == o.additional_properties
162
+ end
163
+
164
+ # Calculates hash code according to all attributes.
165
+ # @return [Integer] Hash code
166
+ # @!visibility private
167
+ def hash
168
+ [destinations, processors, sources, additional_properties].hash
169
+ end
170
+ end
171
+ end
@@ -0,0 +1,62 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # A destination for the pipeline.
21
+ module ObservabilityPipelineConfigDestinationItem
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'ObservabilityPipelineDatadogLogsDestination'
30
+ ]
31
+ end
32
+ # Builds the object
33
+ # @param data [Mixed] Data to be matched against the list of oneOf items
34
+ # @return [Object] Returns the model or the data itself
35
+ def build(data)
36
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
37
+ # Note:
38
+ # - We do not attempt to check whether exactly one item matches.
39
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
40
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
41
+ # - TODO: scalar values are de facto behaving as if they were nullable.
42
+ # - TODO: logging when debugging is set.
43
+ openapi_one_of.each do |klass|
44
+ begin
45
+ next if klass == :AnyType # "nullable: true"
46
+ typed_data = find_and_cast_into_type(klass, data)
47
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
48
+ return typed_data if typed_data
49
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
50
+ end
51
+ end
52
+
53
+ if openapi_one_of.include?(:AnyType)
54
+ data
55
+ else
56
+ self._unparsed = true
57
+ DatadogAPIClient::UnparsedObject.new(data)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,67 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # A processor for the pipeline.
21
+ module ObservabilityPipelineConfigProcessorItem
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'ObservabilityPipelineFilterProcessor',
30
+ :'ObservabilityPipelineParseJSONProcessor',
31
+ :'ObservabilityPipelineQuotaProcessor',
32
+ :'ObservabilityPipelineAddFieldsProcessor',
33
+ :'ObservabilityPipelineRemoveFieldsProcessor',
34
+ :'ObservabilityPipelineRenameFieldsProcessor'
35
+ ]
36
+ end
37
+ # Builds the object
38
+ # @param data [Mixed] Data to be matched against the list of oneOf items
39
+ # @return [Object] Returns the model or the data itself
40
+ def build(data)
41
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
42
+ # Note:
43
+ # - We do not attempt to check whether exactly one item matches.
44
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
45
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
46
+ # - TODO: scalar values are de facto behaving as if they were nullable.
47
+ # - TODO: logging when debugging is set.
48
+ openapi_one_of.each do |klass|
49
+ begin
50
+ next if klass == :AnyType # "nullable: true"
51
+ typed_data = find_and_cast_into_type(klass, data)
52
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
53
+ return typed_data if typed_data
54
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
55
+ end
56
+ end
57
+
58
+ if openapi_one_of.include?(:AnyType)
59
+ data
60
+ else
61
+ self._unparsed = true
62
+ DatadogAPIClient::UnparsedObject.new(data)
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end