datadog_api_client 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +229 -6
  4. data/.generator/schemas/v2/openapi.yaml +1295 -335
  5. data/.github/workflows/docs.yml +2 -0
  6. data/.github/workflows/test.yml +2 -0
  7. data/CHANGELOG.md +19 -0
  8. data/examples/v1/logs-indexes/UpdateLogsIndex.rb +3 -0
  9. data/examples/v1/monitors/CreateMonitor_2012680290.rb +23 -0
  10. data/examples/v1/service-level-objectives/GetSLOHistory.rb +0 -3
  11. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +9 -0
  12. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  13. data/examples/v2/ci-visibility-pipelines/AggregateCIAppPipelineEvents.rb +33 -0
  14. data/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents.rb +11 -0
  15. data/examples/v2/ci-visibility-pipelines/ListCIAppPipelineEvents_1270618359.rb +10 -0
  16. data/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents.rb +23 -0
  17. data/examples/v2/ci-visibility-pipelines/SearchCIAppPipelineEvents_3246135003.rb +22 -0
  18. data/examples/v2/ci-visibility-tests/AggregateCIAppTestEvents.rb +36 -0
  19. data/examples/v2/ci-visibility-tests/ListCIAppTestEvents.rb +11 -0
  20. data/examples/v2/ci-visibility-tests/ListCIAppTestEvents_3852605281.rb +10 -0
  21. data/examples/v2/ci-visibility-tests/SearchCIAppTestEvents.rb +23 -0
  22. data/examples/v2/ci-visibility-tests/SearchCIAppTestEvents_1675695429.rb +20 -0
  23. data/examples/v2/security-monitoring/GetSecurityMonitoringRule.rb +4 -1
  24. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +23 -33
  25. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
  26. data/examples/v2/service-definition/DeleteServiceDefinition.rb +1 -1
  27. data/examples/v2/service-definition/GetServiceDefinition.rb +1 -1
  28. data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +1 -1
  29. data/lib/datadog_api_client/configuration.rb +0 -1
  30. data/lib/datadog_api_client/inflector.rb +49 -0
  31. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +0 -6
  32. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
  33. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  34. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +4 -0
  35. data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
  36. data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +98 -0
  37. data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options_evaluation_window.rb +148 -0
  38. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  39. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +21 -1
  40. data/lib/datadog_api_client/v1/models/synthetics_assertion.rb +2 -1
  41. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_operator.rb +26 -0
  42. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target.rb +150 -0
  43. data/lib/datadog_api_client/v1/models/synthetics_assertion_x_path_target_target.rb +118 -0
  44. data/lib/datadog_api_client/v1/models/synthetics_step.rb +11 -1
  45. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +2 -2
  46. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  47. data/lib/datadog_api_client/v1/models/synthetics_test_request_body_type.rb +31 -0
  48. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
  49. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
  50. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +21 -1
  51. data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
  52. data/lib/datadog_api_client/v1/models/usage_sds_hour.rb +31 -1
  53. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
  54. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
  55. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
  56. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +283 -0
  57. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +283 -0
  58. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +1 -1
  59. data/lib/datadog_api_client/v2/api/logs_api.rb +6 -0
  60. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -2
  61. data/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value.rb +64 -0
  62. data/lib/datadog_api_client/v2/models/ci_app_aggregate_bucket_value_timeseries_point.rb +108 -0
  63. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +128 -0
  64. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort_type.rb +27 -0
  65. data/lib/datadog_api_client/v2/models/ci_app_aggregation_function.rb +37 -0
  66. data/lib/datadog_api_client/v2/models/ci_app_compute.rb +140 -0
  67. data/lib/datadog_api_client/v2/models/ci_app_compute_type.rb +27 -0
  68. data/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb +132 -0
  69. data/lib/datadog_api_client/v2/models/ci_app_group_by_histogram.rb +154 -0
  70. data/lib/datadog_api_client/v2/models/ci_app_group_by_missing.rb +63 -0
  71. data/lib/datadog_api_client/v2/models/ci_app_group_by_total.rb +64 -0
  72. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb +118 -0
  73. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event_type_name.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/ci_app_pipeline_events_request.rb +129 -0
  75. data/lib/datadog_api_client/v2/models/ci_app_pipeline_events_response.rb +120 -0
  76. data/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregate_request.rb +143 -0
  77. data/lib/datadog_api_client/v2/models/ci_app_pipelines_aggregation_buckets_response.rb +100 -0
  78. data/lib/datadog_api_client/v2/models/ci_app_pipelines_analytics_aggregate_response.rb +118 -0
  79. data/lib/datadog_api_client/v2/models/ci_app_pipelines_bucket_response.rb +108 -0
  80. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +160 -0
  81. data/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb +118 -0
  82. data/lib/datadog_api_client/v2/models/ci_app_query_options.rb +109 -0
  83. data/lib/datadog_api_client/v2/models/ci_app_query_page_options.rb +119 -0
  84. data/lib/datadog_api_client/v2/models/ci_app_response_links.rb +99 -0
  85. data/lib/datadog_api_client/v2/models/ci_app_response_metadata.rb +141 -0
  86. data/lib/datadog_api_client/v2/models/ci_app_response_page.rb +98 -0
  87. data/lib/datadog_api_client/v2/models/ci_app_response_status.rb +27 -0
  88. data/lib/datadog_api_client/v2/models/ci_app_sort.rb +27 -0
  89. data/lib/datadog_api_client/v2/models/ci_app_sort_order.rb +27 -0
  90. data/lib/datadog_api_client/v2/models/ci_app_test_event.rb +118 -0
  91. data/lib/datadog_api_client/v2/models/ci_app_test_event_type_name.rb +26 -0
  92. data/lib/datadog_api_client/v2/models/ci_app_test_events_request.rb +129 -0
  93. data/lib/datadog_api_client/v2/models/ci_app_test_events_response.rb +120 -0
  94. data/lib/datadog_api_client/v2/models/ci_app_tests_aggregate_request.rb +143 -0
  95. data/lib/datadog_api_client/v2/models/ci_app_tests_aggregation_buckets_response.rb +100 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb +118 -0
  97. data/lib/datadog_api_client/v2/models/ci_app_tests_bucket_response.rb +108 -0
  98. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +160 -0
  99. data/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb +118 -0
  100. data/lib/datadog_api_client/v2/models/ci_app_warning.rb +118 -0
  101. data/lib/datadog_api_client/v2/models/logs_query_filter.rb +11 -1
  102. data/lib/datadog_api_client/v2/models/logs_storage_tier.rb +27 -0
  103. data/lib/datadog_api_client/v2/models/rum_query_filter.rb +2 -2
  104. data/lib/datadog_api_client/v2/models/service_definition_v2_opsgenie.rb +14 -14
  105. data/lib/datadog_api_client/version.rb +1 -1
  106. metadata +62 -3
  107. data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +0 -9
@@ -24,6 +24,7 @@ module DatadogAPIClient::V1
24
24
  API_USAGE = "api_usage".freeze
25
25
  APM_FARGATE_USAGE = "apm_fargate_usage".freeze
26
26
  APM_HOST_USAGE = "apm_host_usage".freeze
27
+ APPSEC_FARGATE_USAGE = "appsec_fargate_usage".freeze
27
28
  APPSEC_USAGE = "appsec_usage".freeze
28
29
  BROWSER_USAGE = "browser_usage".freeze
29
30
  CONTAINER_USAGE = "container_usage".freeze
@@ -24,5 +24,9 @@ module DatadogAPIClient::V1
24
24
  RUM = "rum".freeze
25
25
  CI_PIPELINES = "ci_pipelines".freeze
26
26
  CI_TESTS = "ci_tests".freeze
27
+ AUDIT = "audit".freeze
28
+ EVENTS = "events".freeze
29
+ LOGS = "logs".freeze
30
+ SPANS = "spans".freeze
27
31
  end
28
32
  end
@@ -127,6 +127,9 @@ module DatadogAPIClient::V1
127
127
  # otherwise some evaluations are skipped. Default is false.
128
128
  attr_accessor :require_full_window
129
129
 
130
+ # Configuration options for scheduling.
131
+ attr_accessor :scheduling_options
132
+
130
133
  # Information about the downtime applied to the monitor.
131
134
  attr_accessor :silenced
132
135
 
@@ -171,6 +174,7 @@ module DatadogAPIClient::V1
171
174
  :'renotify_occurrences' => :'renotify_occurrences',
172
175
  :'renotify_statuses' => :'renotify_statuses',
173
176
  :'require_full_window' => :'require_full_window',
177
+ :'scheduling_options' => :'scheduling_options',
174
178
  :'silenced' => :'silenced',
175
179
  :'synthetics_check_id' => :'synthetics_check_id',
176
180
  :'threshold_windows' => :'threshold_windows',
@@ -206,6 +210,7 @@ module DatadogAPIClient::V1
206
210
  :'renotify_occurrences' => :'Integer',
207
211
  :'renotify_statuses' => :'Array<MonitorRenotifyStatusType>',
208
212
  :'require_full_window' => :'Boolean',
213
+ :'scheduling_options' => :'MonitorOptionsSchedulingOptions',
209
214
  :'silenced' => :'Hash<String, Integer>',
210
215
  :'synthetics_check_id' => :'String',
211
216
  :'threshold_windows' => :'MonitorThresholdWindowOptions',
@@ -343,6 +348,10 @@ module DatadogAPIClient::V1
343
348
  self.require_full_window = attributes[:'require_full_window']
344
349
  end
345
350
 
351
+ if attributes.key?(:'scheduling_options')
352
+ self.scheduling_options = attributes[:'scheduling_options']
353
+ end
354
+
346
355
  if attributes.key?(:'silenced')
347
356
  self.silenced = attributes[:'silenced']
348
357
  end
@@ -420,6 +429,7 @@ module DatadogAPIClient::V1
420
429
  renotify_occurrences == o.renotify_occurrences &&
421
430
  renotify_statuses == o.renotify_statuses &&
422
431
  require_full_window == o.require_full_window &&
432
+ scheduling_options == o.scheduling_options &&
423
433
  silenced == o.silenced &&
424
434
  synthetics_check_id == o.synthetics_check_id &&
425
435
  threshold_windows == o.threshold_windows &&
@@ -432,7 +442,7 @@ module DatadogAPIClient::V1
432
442
  # @return [Integer] Hash code
433
443
  # @!visibility private
434
444
  def hash
435
- [aggregation, device_ids, enable_logs_sample, escalation_message, evaluation_delay, group_retention_duration, groupby_simple_monitor, include_tags, locked, min_failure_duration, min_location_failed, new_group_delay, new_host_delay, no_data_timeframe, notify_audit, notify_by, notify_no_data, on_missing_data, renotify_interval, renotify_occurrences, renotify_statuses, require_full_window, silenced, synthetics_check_id, threshold_windows, thresholds, timeout_h, variables].hash
445
+ [aggregation, device_ids, enable_logs_sample, escalation_message, evaluation_delay, group_retention_duration, groupby_simple_monitor, include_tags, locked, min_failure_duration, min_location_failed, new_group_delay, new_host_delay, no_data_timeframe, notify_audit, notify_by, notify_no_data, on_missing_data, renotify_interval, renotify_occurrences, renotify_statuses, require_full_window, scheduling_options, silenced, synthetics_check_id, threshold_windows, thresholds, timeout_h, variables].hash
436
446
  end
437
447
  end
438
448
  end
@@ -0,0 +1,98 @@
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 options for scheduling.
21
+ class MonitorOptionsSchedulingOptions
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Configuration options for the evaluation window. If `hour_starts` is set, no other fields may be set. Otherwise, `day_starts` and `month_starts` must be set together.
29
+ attr_accessor :evaluation_window
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ # @!visibility private
33
+ def self.attribute_map
34
+ {
35
+ :'evaluation_window' => :'evaluation_window'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'evaluation_window' => :'MonitorOptionsSchedulingOptionsEvaluationWindow'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ # @!visibility private
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param attributes [Hash] Model attributes in the form of hash
56
+ # @!visibility private
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::MonitorOptionsSchedulingOptions` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptionsSchedulingOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'evaluation_window')
71
+ self.evaluation_window = attributes[:'evaluation_window']
72
+ end
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ # @!visibility private
78
+ def valid?
79
+ true
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param o [Object] Object to be compared
84
+ # @!visibility private
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ evaluation_window == o.evaluation_window
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ # @!visibility private
94
+ def hash
95
+ [evaluation_window].hash
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,148 @@
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 options for the evaluation window. If `hour_starts` is set, no other fields may be set. Otherwise, `day_starts` and `month_starts` must be set together.
21
+ class MonitorOptionsSchedulingOptionsEvaluationWindow
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The time of the day at which a one day cumulative evaluation window starts. Must be defined in UTC time in `HH:mm` format.
29
+ attr_accessor :day_starts
30
+
31
+ # The minute of the hour at which a one hour cumulative evaluation window starts.
32
+ attr_accessor :hour_starts
33
+
34
+ # The day of the month at which a one month cumulative evaluation window starts.
35
+ attr_accessor :month_starts
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'day_starts' => :'day_starts',
42
+ :'hour_starts' => :'hour_starts',
43
+ :'month_starts' => :'month_starts'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'day_starts' => :'String',
52
+ :'hour_starts' => :'Integer',
53
+ :'month_starts' => :'Integer'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ # @!visibility private
59
+ def self.openapi_nullable
60
+ Set.new([
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::MonitorOptionsSchedulingOptionsEvaluationWindow` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::MonitorOptionsSchedulingOptionsEvaluationWindow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'day_starts')
81
+ self.day_starts = attributes[:'day_starts']
82
+ end
83
+
84
+ if attributes.key?(:'hour_starts')
85
+ self.hour_starts = attributes[:'hour_starts']
86
+ end
87
+
88
+ if attributes.key?(:'month_starts')
89
+ self.month_starts = attributes[:'month_starts']
90
+ end
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ # @!visibility private
96
+ def valid?
97
+ return false if !@hour_starts.nil? && @hour_starts > 59
98
+ return false if !@hour_starts.nil? && @hour_starts < 0
99
+ return false if !@month_starts.nil? && @month_starts > 1
100
+ return false if !@month_starts.nil? && @month_starts < 1
101
+ true
102
+ end
103
+
104
+ # Custom attribute writer method with validation
105
+ # @param hour_starts [Object] Object to be assigned
106
+ # @!visibility private
107
+ def hour_starts=(hour_starts)
108
+ if !hour_starts.nil? && hour_starts > 59
109
+ fail ArgumentError, 'invalid value for "hour_starts", must be smaller than or equal to 59.'
110
+ end
111
+ if !hour_starts.nil? && hour_starts < 0
112
+ fail ArgumentError, 'invalid value for "hour_starts", must be greater than or equal to 0.'
113
+ end
114
+ @hour_starts = hour_starts
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param month_starts [Object] Object to be assigned
119
+ # @!visibility private
120
+ def month_starts=(month_starts)
121
+ if !month_starts.nil? && month_starts > 1
122
+ fail ArgumentError, 'invalid value for "month_starts", must be smaller than or equal to 1.'
123
+ end
124
+ if !month_starts.nil? && month_starts < 1
125
+ fail ArgumentError, 'invalid value for "month_starts", must be greater than or equal to 1.'
126
+ end
127
+ @month_starts = month_starts
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param o [Object] Object to be compared
132
+ # @!visibility private
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ day_starts == o.day_starts &&
137
+ hour_starts == o.hour_starts &&
138
+ month_starts == o.month_starts
139
+ end
140
+
141
+ # Calculates hash code according to all attributes.
142
+ # @return [Integer] Hash code
143
+ # @!visibility private
144
+ def hash
145
+ [day_starts, hour_starts, month_starts].hash
146
+ end
147
+ end
148
+ end
@@ -25,6 +25,8 @@ module DatadogAPIClient::V1
25
25
  API_PERCENTAGE = "api_percentage".freeze
26
26
  APM_FARGATE_USAGE = "apm_fargate_usage".freeze
27
27
  APM_FARGATE_PERCENTAGE = "apm_fargate_percentage".freeze
28
+ APPSEC_FARGATE_USAGE = "appsec_fargate_usage".freeze
29
+ APPSEC_FARGATE_PERCENTAGE = "appsec_fargate_percentage".freeze
28
30
  APM_HOST_USAGE = "apm_host_usage".freeze
29
31
  APM_HOST_PERCENTAGE = "apm_host_percentage".freeze
30
32
  APPSEC_USAGE = "appsec_usage".freeze
@@ -43,6 +43,12 @@ module DatadogAPIClient::V1
43
43
  # The APM host usage by tag(s).
44
44
  attr_accessor :apm_host_usage
45
45
 
46
+ # The percentage of Application Security Monitoring ECS Fargate task usage by tag(s).
47
+ attr_accessor :appsec_fargate_percentage
48
+
49
+ # The Application Security Monitoring ECS Fargate task usage by tag(s).
50
+ attr_accessor :appsec_fargate_usage
51
+
46
52
  # The percentage of Application Security Monitoring host usage by tag(s).
47
53
  attr_accessor :appsec_percentage
48
54
 
@@ -155,6 +161,8 @@ module DatadogAPIClient::V1
155
161
  :'apm_fargate_usage' => :'apm_fargate_usage',
156
162
  :'apm_host_percentage' => :'apm_host_percentage',
157
163
  :'apm_host_usage' => :'apm_host_usage',
164
+ :'appsec_fargate_percentage' => :'appsec_fargate_percentage',
165
+ :'appsec_fargate_usage' => :'appsec_fargate_usage',
158
166
  :'appsec_percentage' => :'appsec_percentage',
159
167
  :'appsec_usage' => :'appsec_usage',
160
168
  :'browser_percentage' => :'browser_percentage',
@@ -202,6 +210,8 @@ module DatadogAPIClient::V1
202
210
  :'apm_fargate_usage' => :'Float',
203
211
  :'apm_host_percentage' => :'Float',
204
212
  :'apm_host_usage' => :'Float',
213
+ :'appsec_fargate_percentage' => :'Float',
214
+ :'appsec_fargate_usage' => :'Float',
205
215
  :'appsec_percentage' => :'Float',
206
216
  :'appsec_usage' => :'Float',
207
217
  :'browser_percentage' => :'Float',
@@ -286,6 +296,14 @@ module DatadogAPIClient::V1
286
296
  self.apm_host_usage = attributes[:'apm_host_usage']
287
297
  end
288
298
 
299
+ if attributes.key?(:'appsec_fargate_percentage')
300
+ self.appsec_fargate_percentage = attributes[:'appsec_fargate_percentage']
301
+ end
302
+
303
+ if attributes.key?(:'appsec_fargate_usage')
304
+ self.appsec_fargate_usage = attributes[:'appsec_fargate_usage']
305
+ end
306
+
289
307
  if attributes.key?(:'appsec_percentage')
290
308
  self.appsec_percentage = attributes[:'appsec_percentage']
291
309
  end
@@ -442,6 +460,8 @@ module DatadogAPIClient::V1
442
460
  apm_fargate_usage == o.apm_fargate_usage &&
443
461
  apm_host_percentage == o.apm_host_percentage &&
444
462
  apm_host_usage == o.apm_host_usage &&
463
+ appsec_fargate_percentage == o.appsec_fargate_percentage &&
464
+ appsec_fargate_usage == o.appsec_fargate_usage &&
445
465
  appsec_percentage == o.appsec_percentage &&
446
466
  appsec_usage == o.appsec_usage &&
447
467
  browser_percentage == o.browser_percentage &&
@@ -482,7 +502,7 @@ module DatadogAPIClient::V1
482
502
  # @return [Integer] Hash code
483
503
  # @!visibility private
484
504
  def hash
485
- [api_percentage, api_usage, apm_fargate_percentage, apm_fargate_usage, apm_host_percentage, apm_host_usage, appsec_percentage, appsec_usage, browser_percentage, browser_usage, container_percentage, container_usage, custom_timeseries_percentage, custom_timeseries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_logs_percentage, estimated_ingested_logs_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, indexed_logs_percentage, indexed_logs_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash
505
+ [api_percentage, api_usage, apm_fargate_percentage, apm_fargate_usage, apm_host_percentage, apm_host_usage, appsec_fargate_percentage, appsec_fargate_usage, appsec_percentage, appsec_usage, browser_percentage, browser_usage, container_percentage, container_usage, custom_timeseries_percentage, custom_timeseries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_logs_percentage, estimated_ingested_logs_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, indexed_logs_percentage, indexed_logs_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash
486
506
  end
487
507
  end
488
508
  end
@@ -28,7 +28,8 @@ module DatadogAPIClient::V1
28
28
  def openapi_one_of
29
29
  [
30
30
  :'SyntheticsAssertionTarget',
31
- :'SyntheticsAssertionJSONPathTarget'
31
+ :'SyntheticsAssertionJSONPathTarget',
32
+ :'SyntheticsAssertionXPathTarget'
32
33
  ]
33
34
  end
34
35
  # Builds the object
@@ -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
+ # Assertion operator to apply.
21
+ class SyntheticsAssertionXPathOperator
22
+ include BaseEnumModel
23
+
24
+ VALIDATES_X_PATH = "validatesXPath".freeze
25
+ end
26
+ end
@@ -0,0 +1,150 @@
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
+ # An assertion for the `validatesXPath` operator.
21
+ class SyntheticsAssertionXPathTarget
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Assertion operator to apply.
29
+ attr_accessor :operator
30
+
31
+ # The associated assertion property.
32
+ attr_accessor :property
33
+
34
+ # Composed target for `validatesXPath` operator.
35
+ attr_accessor :target
36
+
37
+ # Type of the assertion.
38
+ attr_accessor :type
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'operator' => :'operator',
45
+ :'property' => :'property',
46
+ :'target' => :'target',
47
+ :'type' => :'type'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ # @!visibility private
53
+ def self.openapi_types
54
+ {
55
+ :'operator' => :'SyntheticsAssertionXPathOperator',
56
+ :'property' => :'String',
57
+ :'target' => :'SyntheticsAssertionXPathTargetTarget',
58
+ :'type' => :'SyntheticsAssertionType'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ # @!visibility private
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param attributes [Hash] Model attributes in the form of hash
71
+ # @!visibility private
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsAssertionXPathTarget` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsAssertionXPathTarget`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'operator')
86
+ self.operator = attributes[:'operator']
87
+ end
88
+
89
+ if attributes.key?(:'property')
90
+ self.property = attributes[:'property']
91
+ end
92
+
93
+ if attributes.key?(:'target')
94
+ self.target = attributes[:'target']
95
+ end
96
+
97
+ if attributes.key?(:'type')
98
+ self.type = attributes[:'type']
99
+ end
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ # @!visibility private
105
+ def valid?
106
+ return false if @operator.nil?
107
+ return false if @type.nil?
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param operator [Object] Object to be assigned
113
+ # @!visibility private
114
+ def operator=(operator)
115
+ if operator.nil?
116
+ fail ArgumentError, 'invalid value for "operator", operator cannot be nil.'
117
+ end
118
+ @operator = operator
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param type [Object] Object to be assigned
123
+ # @!visibility private
124
+ def type=(type)
125
+ if type.nil?
126
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
127
+ end
128
+ @type = type
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param o [Object] Object to be compared
133
+ # @!visibility private
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ operator == o.operator &&
138
+ property == o.property &&
139
+ target == o.target &&
140
+ type == o.type
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ # @!visibility private
146
+ def hash
147
+ [operator, property, target, type].hash
148
+ end
149
+ end
150
+ end