datadog_api_client 2.37.0 → 2.39.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 (175) hide show
  1. checksums.yaml +4 -4
  2. data/.generated-info +4 -0
  3. data/.generator/schemas/v1/openapi.yaml +513 -14
  4. data/.generator/schemas/v2/openapi.yaml +2101 -107
  5. data/.github/workflows/approved_status.yml +1 -0
  6. data/.github/workflows/test.yml +1 -1
  7. data/CHANGELOG.md +36 -0
  8. data/examples/v1/dashboards/CreateDashboard_1751391372.rb +41 -0
  9. data/examples/v1/dashboards/CreatePublicDashboard_1668947073.rb +28 -0
  10. data/examples/v1/dashboards/UpdatePublicDashboard_1708268778.rb +27 -0
  11. data/examples/v1/logs-pipelines/CreateLogsPipeline_1248402480.rb +25 -0
  12. data/examples/v1/logs-pipelines/CreateLogsPipeline_1267211320.rb +27 -0
  13. data/examples/v1/logs-pipelines/CreateLogsPipeline_1271012410.rb +25 -0
  14. data/examples/v1/logs-pipelines/CreateLogsPipeline_3314493032.rb +26 -0
  15. data/examples/v1/logs-pipelines/CreateLogsPipeline_3934594739.rb +26 -0
  16. data/examples/v1/synthetics/SearchTests.rb +5 -0
  17. data/examples/v1/synthetics/SearchTests_195957771.rb +13 -0
  18. data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
  19. data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
  20. data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
  21. data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
  22. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissions.rb +5 -0
  23. data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +19 -0
  24. data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +5 -0
  25. data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +5 -0
  26. data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +14 -0
  27. data/examples/v2/datasets/CreateDataset.rb +27 -0
  28. data/examples/v2/datasets/DeleteDataset.rb +5 -0
  29. data/examples/v2/datasets/GetAllDatasets.rb +5 -0
  30. data/examples/v2/datasets/GetDataset.rb +5 -0
  31. data/examples/v2/events/CreateEvent.rb +4 -2
  32. data/examples/v2/monitors/CreateMonitorNotificationRule.rb +0 -3
  33. data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
  34. data/examples/v2/monitors/DeleteMonitorNotificationRule.rb +0 -3
  35. data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
  36. data/examples/v2/monitors/GetMonitorNotificationRule.rb +0 -3
  37. data/examples/v2/monitors/GetMonitorNotificationRules.rb +0 -3
  38. data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
  39. data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
  40. data/examples/v2/monitors/UpdateMonitorNotificationRule.rb +0 -3
  41. data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
  42. data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
  43. data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
  44. data/examples/v2/on-call/UpdateOnCallSchedule.rb +1 -1
  45. data/examples/v2/security-monitoring/ListAssetsSBOMs.rb +12 -0
  46. data/lib/datadog_api_client/configuration.rb +60 -5
  47. data/lib/datadog_api_client/inflector.rb +70 -0
  48. data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -0
  49. data/lib/datadog_api_client/v1/api/synthetics_api.rb +72 -0
  50. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
  51. data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -3
  52. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +1 -0
  53. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +9 -1
  54. data/lib/datadog_api_client/v1/models/logs_array_processor.rb +168 -0
  55. data/lib/datadog_api_client/v1/models/logs_array_processor_operation.rb +64 -0
  56. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append.rb +175 -0
  57. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append_type.rb +26 -0
  58. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length.rb +165 -0
  59. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length_type.rb +26 -0
  60. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select.rb +207 -0
  61. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select_type.rb +26 -0
  62. data/lib/datadog_api_client/v1/models/logs_array_processor_type.rb +26 -0
  63. data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
  64. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +1 -0
  65. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +14 -0
  66. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +142 -1
  67. data/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +12 -1
  68. data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
  69. data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
  70. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
  71. data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
  72. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  73. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +81 -1
  74. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +81 -1
  75. data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
  76. data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
  77. data/lib/datadog_api_client/v2/api/aws_integration_api.rb +60 -0
  78. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +264 -0
  79. data/lib/datadog_api_client/v2/api/datasets_api.rb +283 -0
  80. data/lib/datadog_api_client/v2/api/events_api.rb +10 -4
  81. data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -30
  82. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
  83. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +111 -0
  84. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  85. data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
  86. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
  87. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
  88. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
  89. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
  90. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
  91. data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
  92. data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
  93. data/lib/datadog_api_client/v2/models/asset_attributes.rb +13 -1
  94. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response.rb +123 -0
  95. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_attributes.rb +125 -0
  96. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data.rb +125 -0
  97. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data_type.rb +26 -0
  98. data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
  99. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
  100. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
  101. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
  102. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
  103. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
  104. data/lib/datadog_api_client/v2/models/dataset.rb +154 -0
  105. data/lib/datadog_api_client/v2/models/dataset_attributes.rb +197 -0
  106. data/lib/datadog_api_client/v2/models/dataset_create_request.rb +123 -0
  107. data/lib/datadog_api_client/v2/models/dataset_response_multi.rb +125 -0
  108. data/lib/datadog_api_client/v2/models/dataset_response_single.rb +123 -0
  109. data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
  110. data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
  111. data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
  112. data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
  113. data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
  114. data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
  115. data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
  116. data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
  117. data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
  118. data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
  119. data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
  120. data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
  121. data/lib/datadog_api_client/v2/models/filters_per_product.rb +150 -0
  122. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +154 -0
  123. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +369 -0
  124. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +144 -0
  125. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +123 -0
  126. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +123 -0
  127. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +26 -0
  128. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +144 -0
  129. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +123 -0
  130. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +217 -0
  131. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +26 -0
  132. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +105 -0
  133. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +26 -0
  134. data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +107 -0
  135. data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
  136. data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
  137. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
  138. data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
  139. data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
  140. data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +1 -1
  141. data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
  142. data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
  143. data/lib/datadog_api_client/v2/models/list_assets_sbo_ms_response.rb +145 -0
  144. data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
  145. data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
  146. data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
  147. data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
  148. data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
  149. data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
  150. data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
  151. data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
  152. data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
  153. data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
  154. data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
  155. data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
  156. data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
  157. data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
  158. data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
  159. data/lib/datadog_api_client/v2/models/sbom_attributes.rb +24 -1
  160. data/lib/datadog_api_client/v2/models/sbom_component.rb +46 -1
  161. data/lib/datadog_api_client/v2/models/sbom_component_dependency.rb +117 -0
  162. data/lib/datadog_api_client/v2/models/sbom_component_license.rb +123 -0
  163. data/lib/datadog_api_client/v2/models/sbom_component_license_license.rb +123 -0
  164. data/lib/datadog_api_client/v2/models/sbom_component_license_type.rb +33 -0
  165. data/lib/datadog_api_client/v2/models/sbom_component_property.rb +144 -0
  166. data/lib/datadog_api_client/v2/models/sbom_component_supplier.rb +123 -0
  167. data/lib/datadog_api_client/v2/models/sbom_metadata.rb +25 -3
  168. data/lib/datadog_api_client/v2/models/sbom_metadata_author.rb +105 -0
  169. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +1 -1
  170. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +1 -1
  171. data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
  172. data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +24 -1
  173. data/lib/datadog_api_client/version.rb +1 -1
  174. metadata +103 -2
  175. data/.apigentools-info +0 -16
@@ -50,6 +50,7 @@ module DatadogAPIClient::V1
50
50
  attr_accessor :updated_at
51
51
 
52
52
  # Supported products for hourly usage attribution requests.
53
+ # The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
53
54
  attr_accessor :usage_type
54
55
 
55
56
  attr_accessor :additional_properties
@@ -18,6 +18,7 @@ require 'time'
18
18
 
19
19
  module DatadogAPIClient::V1
20
20
  # Supported products for hourly usage attribution requests.
21
+ # The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
21
22
  class HourlyUsageAttributionUsageType
22
23
  include BaseEnumModel
23
24
 
@@ -62,6 +63,7 @@ module DatadogAPIClient::V1
62
63
  INGESTED_SPANS_BYTES_USAGE = "ingested_spans_bytes_usage".freeze
63
64
  INVOCATIONS_USAGE = "invocations_usage".freeze
64
65
  LAMBDA_TRACED_INVOCATIONS_USAGE = "lambda_traced_invocations_usage".freeze
66
+ LLM_OBSERVABILITY_USAGE = "llm_observability_usage".freeze
65
67
  LOGS_INDEXED_15DAY_USAGE = "logs_indexed_15day_usage".freeze
66
68
  LOGS_INDEXED_180DAY_USAGE = "logs_indexed_180day_usage".freeze
67
69
  LOGS_INDEXED_1DAY_USAGE = "logs_indexed_1day_usage".freeze
@@ -75,15 +77,21 @@ module DatadogAPIClient::V1
75
77
  LOGS_INDEXED_CUSTOM_RETENTION_USAGE = "logs_indexed_custom_retention_usage".freeze
76
78
  MOBILE_APP_TESTING_USAGE = "mobile_app_testing_usage".freeze
77
79
  NDM_NETFLOW_USAGE = "ndm_netflow_usage".freeze
78
- NPM_HOST_USAGE = "npm_host_usage".freeze
80
+ NETWORK_DEVICE_WIRELESS_USAGE = "npm_host_usage".freeze
81
+ NPM_HOST_USAGE = "network_device_wireless_usage".freeze
79
82
  OBS_PIPELINE_BYTES_USAGE = "obs_pipeline_bytes_usage".freeze
80
83
  OBS_PIPELINE_VCPU_USAGE = "obs_pipelines_vcpu_usage".freeze
81
84
  ONLINE_ARCHIVE_USAGE = "online_archive_usage".freeze
85
+ PRODUCT_ANALYTICS_SESSION_USAGE = "product_analytics_session_usage".freeze
82
86
  PROFILED_CONTAINER_USAGE = "profiled_container_usage".freeze
83
87
  PROFILED_FARGATE_USAGE = "profiled_fargate_usage".freeze
84
88
  PROFILED_HOST_USAGE = "profiled_host_usage".freeze
89
+ PUBLISHED_APP_USAGE = "published_app".freeze
85
90
  RUM_BROWSER_MOBILE_SESSIONS_USAGE = "rum_browser_mobile_sessions_usage".freeze
91
+ RUM_INGESTED_USAGE = "rum_ingested_usage".freeze
92
+ RUM_INVESTIGATE_USAGE = "rum_investigate_usage".freeze
86
93
  RUM_REPLAY_SESSIONS_USAGE = "rum_replay_sessions_usage".freeze
94
+ RUM_SESSION_REPLAY_ADD_ON_USAGE = "rum_session_replay_add_on_usage".freeze
87
95
  SCA_FARGATE_USAGE = "sca_fargate_usage".freeze
88
96
  SDS_SCANNED_BYTES_USAGE = "sds_scanned_bytes_usage".freeze
89
97
  SERVERLESS_APPS_USAGE = "serverless_apps_usage".freeze
@@ -0,0 +1,168 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # A processor for extracting, aggregating, or transforming values from JSON arrays within your logs.
21
+ # Supported operations are:
22
+ # - Select value from matching element
23
+ # - Compute array length
24
+ # - Append a value to an array
25
+ class LogsArrayProcessor
26
+ include BaseGenericModel
27
+
28
+ # Whether or not the processor is enabled.
29
+ attr_accessor :is_enabled
30
+
31
+ # Name of the processor.
32
+ attr_accessor :name
33
+
34
+ # Configuration of the array processor operation to perform.
35
+ attr_reader :operation
36
+
37
+ # Type of logs array processor.
38
+ attr_reader :type
39
+
40
+ attr_accessor :additional_properties
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ # @!visibility private
44
+ def self.attribute_map
45
+ {
46
+ :'is_enabled' => :'is_enabled',
47
+ :'name' => :'name',
48
+ :'operation' => :'operation',
49
+ :'type' => :'type'
50
+ }
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ # @!visibility private
55
+ def self.openapi_types
56
+ {
57
+ :'is_enabled' => :'Boolean',
58
+ :'name' => :'String',
59
+ :'operation' => :'LogsArrayProcessorOperation',
60
+ :'type' => :'LogsArrayProcessorType'
61
+ }
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param attributes [Hash] Model attributes in the form of hash
66
+ # @!visibility private
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsArrayProcessor` initialize method"
70
+ end
71
+
72
+ self.additional_properties = {}
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ self.additional_properties[k.to_sym] = v
77
+ else
78
+ h[k.to_sym] = v
79
+ end
80
+ }
81
+
82
+ if attributes.key?(:'is_enabled')
83
+ self.is_enabled = attributes[:'is_enabled']
84
+ end
85
+
86
+ if attributes.key?(:'name')
87
+ self.name = attributes[:'name']
88
+ end
89
+
90
+ if attributes.key?(:'operation')
91
+ self.operation = attributes[:'operation']
92
+ end
93
+
94
+ if attributes.key?(:'type')
95
+ self.type = attributes[:'type']
96
+ end
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ # @!visibility private
102
+ def valid?
103
+ return false if @operation.nil?
104
+ return false if @type.nil?
105
+ true
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param operation [Object] Object to be assigned
110
+ # @!visibility private
111
+ def operation=(operation)
112
+ if operation.nil?
113
+ fail ArgumentError, 'invalid value for "operation", operation cannot be nil.'
114
+ end
115
+ @operation = operation
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param type [Object] Object to be assigned
120
+ # @!visibility private
121
+ def type=(type)
122
+ if type.nil?
123
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
124
+ end
125
+ @type = type
126
+ end
127
+
128
+ # Returns the object in the form of hash, with additionalProperties support.
129
+ # @return [Hash] Returns the object in the form of hash
130
+ # @!visibility private
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ self.additional_properties.each_pair do |attr, value|
143
+ hash[attr] = value
144
+ end
145
+ hash
146
+ end
147
+
148
+ # Checks equality by comparing each attribute.
149
+ # @param o [Object] Object to be compared
150
+ # @!visibility private
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ is_enabled == o.is_enabled &&
155
+ name == o.name &&
156
+ operation == o.operation &&
157
+ type == o.type &&
158
+ additional_properties == o.additional_properties
159
+ end
160
+
161
+ # Calculates hash code according to all attributes.
162
+ # @return [Integer] Hash code
163
+ # @!visibility private
164
+ def hash
165
+ [is_enabled, name, operation, type, additional_properties].hash
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,64 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # Configuration of the array processor operation to perform.
21
+ module LogsArrayProcessorOperation
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
+ :'LogsArrayProcessorOperationAppend',
30
+ :'LogsArrayProcessorOperationLength',
31
+ :'LogsArrayProcessorOperationSelect'
32
+ ]
33
+ end
34
+ # Builds the object
35
+ # @param data [Mixed] Data to be matched against the list of oneOf items
36
+ # @return [Object] Returns the model or the data itself
37
+ def build(data)
38
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
39
+ # Note:
40
+ # - We do not attempt to check whether exactly one item matches.
41
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
42
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
43
+ # - TODO: scalar values are de facto behaving as if they were nullable.
44
+ # - TODO: logging when debugging is set.
45
+ openapi_one_of.each do |klass|
46
+ begin
47
+ next if klass == :AnyType # "nullable: true"
48
+ typed_data = find_and_cast_into_type(klass, data)
49
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
50
+ return typed_data if typed_data
51
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
52
+ end
53
+ end
54
+
55
+ if openapi_one_of.include?(:AnyType)
56
+ data
57
+ else
58
+ self._unparsed = true
59
+ DatadogAPIClient::UnparsedObject.new(data)
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,175 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # Operation that appends a value to a target array attribute.
21
+ class LogsArrayProcessorOperationAppend
22
+ include BaseGenericModel
23
+
24
+ # Remove or preserve the remapped source element.
25
+ attr_accessor :preserve_source
26
+
27
+ # Attribute path containing the value to append.
28
+ attr_reader :source
29
+
30
+ # Attribute path of the array to append to.
31
+ attr_reader :target
32
+
33
+ # Operation type.
34
+ attr_reader :type
35
+
36
+ attr_accessor :additional_properties
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ # @!visibility private
40
+ def self.attribute_map
41
+ {
42
+ :'preserve_source' => :'preserve_source',
43
+ :'source' => :'source',
44
+ :'target' => :'target',
45
+ :'type' => :'type'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'preserve_source' => :'Boolean',
54
+ :'source' => :'String',
55
+ :'target' => :'String',
56
+ :'type' => :'LogsArrayProcessorOperationAppendType'
57
+ }
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param attributes [Hash] Model attributes in the form of hash
62
+ # @!visibility private
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsArrayProcessorOperationAppend` initialize method"
66
+ end
67
+
68
+ self.additional_properties = {}
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ self.additional_properties[k.to_sym] = v
73
+ else
74
+ h[k.to_sym] = v
75
+ end
76
+ }
77
+
78
+ if attributes.key?(:'preserve_source')
79
+ self.preserve_source = attributes[:'preserve_source']
80
+ end
81
+
82
+ if attributes.key?(:'source')
83
+ self.source = attributes[:'source']
84
+ end
85
+
86
+ if attributes.key?(:'target')
87
+ self.target = attributes[:'target']
88
+ end
89
+
90
+ if attributes.key?(:'type')
91
+ self.type = attributes[:'type']
92
+ end
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ # @!visibility private
98
+ def valid?
99
+ return false if @source.nil?
100
+ return false if @target.nil?
101
+ return false if @type.nil?
102
+ true
103
+ end
104
+
105
+ # Custom attribute writer method with validation
106
+ # @param source [Object] Object to be assigned
107
+ # @!visibility private
108
+ def source=(source)
109
+ if source.nil?
110
+ fail ArgumentError, 'invalid value for "source", source cannot be nil.'
111
+ end
112
+ @source = source
113
+ end
114
+
115
+ # Custom attribute writer method with validation
116
+ # @param target [Object] Object to be assigned
117
+ # @!visibility private
118
+ def target=(target)
119
+ if target.nil?
120
+ fail ArgumentError, 'invalid value for "target", target cannot be nil.'
121
+ end
122
+ @target = target
123
+ end
124
+
125
+ # Custom attribute writer method with validation
126
+ # @param type [Object] Object to be assigned
127
+ # @!visibility private
128
+ def type=(type)
129
+ if type.nil?
130
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
131
+ end
132
+ @type = type
133
+ end
134
+
135
+ # Returns the object in the form of hash, with additionalProperties support.
136
+ # @return [Hash] Returns the object in the form of hash
137
+ # @!visibility private
138
+ def to_hash
139
+ hash = {}
140
+ self.class.attribute_map.each_pair do |attr, param|
141
+ value = self.send(attr)
142
+ if value.nil?
143
+ is_nullable = self.class.openapi_nullable.include?(attr)
144
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
145
+ end
146
+
147
+ hash[param] = _to_hash(value)
148
+ end
149
+ self.additional_properties.each_pair do |attr, value|
150
+ hash[attr] = value
151
+ end
152
+ hash
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param o [Object] Object to be compared
157
+ # @!visibility private
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ preserve_source == o.preserve_source &&
162
+ source == o.source &&
163
+ target == o.target &&
164
+ type == o.type &&
165
+ additional_properties == o.additional_properties
166
+ end
167
+
168
+ # Calculates hash code according to all attributes.
169
+ # @return [Integer] Hash code
170
+ # @!visibility private
171
+ def hash
172
+ [preserve_source, source, target, type, additional_properties].hash
173
+ end
174
+ end
175
+ end
@@ -0,0 +1,26 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # Operation type.
21
+ class LogsArrayProcessorOperationAppendType
22
+ include BaseEnumModel
23
+
24
+ APPEND = "append".freeze
25
+ end
26
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # Operation that computes the length of a `source` array and stores the result in the `target` attribute.
21
+ class LogsArrayProcessorOperationLength
22
+ include BaseGenericModel
23
+
24
+ # Attribute path of the array to measure.
25
+ attr_reader :source
26
+
27
+ # Attribute that receives the computed length.
28
+ attr_reader :target
29
+
30
+ # Operation type.
31
+ attr_reader :type
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
+ :'source' => :'source',
40
+ :'target' => :'target',
41
+ :'type' => :'type'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'source' => :'String',
50
+ :'target' => :'String',
51
+ :'type' => :'LogsArrayProcessorOperationLengthType'
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::V1::LogsArrayProcessorOperationLength` 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?(:'source')
74
+ self.source = attributes[:'source']
75
+ end
76
+
77
+ if attributes.key?(:'target')
78
+ self.target = attributes[:'target']
79
+ end
80
+
81
+ if attributes.key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ # @!visibility private
89
+ def valid?
90
+ return false if @source.nil?
91
+ return false if @target.nil?
92
+ return false if @type.nil?
93
+ true
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param source [Object] Object to be assigned
98
+ # @!visibility private
99
+ def source=(source)
100
+ if source.nil?
101
+ fail ArgumentError, 'invalid value for "source", source cannot be nil.'
102
+ end
103
+ @source = source
104
+ end
105
+
106
+ # Custom attribute writer method with validation
107
+ # @param target [Object] Object to be assigned
108
+ # @!visibility private
109
+ def target=(target)
110
+ if target.nil?
111
+ fail ArgumentError, 'invalid value for "target", target cannot be nil.'
112
+ end
113
+ @target = target
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param type [Object] Object to be assigned
118
+ # @!visibility private
119
+ def type=(type)
120
+ if type.nil?
121
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
122
+ end
123
+ @type = type
124
+ end
125
+
126
+ # Returns the object in the form of hash, with additionalProperties support.
127
+ # @return [Hash] Returns the object in the form of hash
128
+ # @!visibility private
129
+ def to_hash
130
+ hash = {}
131
+ self.class.attribute_map.each_pair do |attr, param|
132
+ value = self.send(attr)
133
+ if value.nil?
134
+ is_nullable = self.class.openapi_nullable.include?(attr)
135
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
136
+ end
137
+
138
+ hash[param] = _to_hash(value)
139
+ end
140
+ self.additional_properties.each_pair do |attr, value|
141
+ hash[attr] = value
142
+ end
143
+ hash
144
+ end
145
+
146
+ # Checks equality by comparing each attribute.
147
+ # @param o [Object] Object to be compared
148
+ # @!visibility private
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ source == o.source &&
153
+ target == o.target &&
154
+ type == o.type &&
155
+ additional_properties == o.additional_properties
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ # @!visibility private
161
+ def hash
162
+ [source, target, type, additional_properties].hash
163
+ end
164
+ end
165
+ end
@@ -0,0 +1,26 @@
1
+ =begin
2
+ #Datadog API V1 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::V1
20
+ # Operation type.
21
+ class LogsArrayProcessorOperationLengthType
22
+ include BaseEnumModel
23
+
24
+ LENGTH = "length".freeze
25
+ end
26
+ end