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
@@ -0,0 +1,118 @@
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 response object for the pipeline events aggregate API endpoint.
21
+ class CIAppPipelinesAnalyticsAggregateResponse
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The query results.
29
+ attr_accessor :data
30
+
31
+ # Links attributes.
32
+ attr_accessor :links
33
+
34
+ # The metadata associated with a request.
35
+ attr_accessor :meta
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'data' => :'data',
42
+ :'links' => :'links',
43
+ :'meta' => :'meta'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'data' => :'CIAppPipelinesAggregationBucketsResponse',
52
+ :'links' => :'CIAppResponseLinks',
53
+ :'meta' => :'CIAppResponseMetadata'
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::V2::CIAppPipelinesAnalyticsAggregateResponse` 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::V2::CIAppPipelinesAnalyticsAggregateResponse`. 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?(:'data')
81
+ self.data = attributes[:'data']
82
+ end
83
+
84
+ if attributes.key?(:'links')
85
+ self.links = attributes[:'links']
86
+ end
87
+
88
+ if attributes.key?(:'meta')
89
+ self.meta = attributes[:'meta']
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
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param o [Object] Object to be compared
102
+ # @!visibility private
103
+ def ==(o)
104
+ return true if self.equal?(o)
105
+ self.class == o.class &&
106
+ data == o.data &&
107
+ links == o.links &&
108
+ meta == o.meta
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ # @!visibility private
114
+ def hash
115
+ [data, links, meta].hash
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,108 @@
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
+ # Bucket values.
21
+ class CIAppPipelinesBucketResponse
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The key-value pairs for each group-by.
29
+ attr_accessor :by
30
+
31
+ # A map of the metric name to value for regular compute, or a list of values for a timeseries.
32
+ attr_accessor :computes
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'by' => :'by',
39
+ :'computes' => :'computes'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'by' => :'Hash<String, String>',
48
+ :'computes' => :'Hash<String, CIAppAggregateBucketValue>'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ # @!visibility private
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param attributes [Hash] Model attributes in the form of hash
61
+ # @!visibility private
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesBucketResponse` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!self.class.attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesBucketResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'by')
76
+ self.by = attributes[:'by']
77
+ end
78
+
79
+ if attributes.key?(:'computes')
80
+ self.computes = attributes[:'computes']
81
+ end
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ # @!visibility private
87
+ def valid?
88
+ true
89
+ end
90
+
91
+ # Checks equality by comparing each attribute.
92
+ # @param o [Object] Object to be compared
93
+ # @!visibility private
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ by == o.by &&
98
+ computes == o.computes
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ # @!visibility private
104
+ def hash
105
+ [by, computes].hash
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,160 @@
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 group-by rule.
21
+ class CIAppPipelinesGroupBy
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The name of the facet to use (required).
29
+ attr_accessor :facet
30
+
31
+ # Used to perform a histogram computation (only for measure facets).
32
+ # At most, 100 buckets are allowed, the number of buckets is `(max - min)/interval`.
33
+ attr_accessor :histogram
34
+
35
+ # The maximum buckets to return for this group-by.
36
+ attr_accessor :limit
37
+
38
+ # The value to use for logs that don't have the facet used to group-by.
39
+ attr_accessor :missing
40
+
41
+ # A sort rule.
42
+ attr_accessor :sort
43
+
44
+ # A resulting object to put the given computes in over all the matching records.
45
+ attr_accessor :total
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ # @!visibility private
49
+ def self.attribute_map
50
+ {
51
+ :'facet' => :'facet',
52
+ :'histogram' => :'histogram',
53
+ :'limit' => :'limit',
54
+ :'missing' => :'missing',
55
+ :'sort' => :'sort',
56
+ :'total' => :'total'
57
+ }
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ # @!visibility private
62
+ def self.openapi_types
63
+ {
64
+ :'facet' => :'String',
65
+ :'histogram' => :'CIAppGroupByHistogram',
66
+ :'limit' => :'Integer',
67
+ :'missing' => :'CIAppGroupByMissing',
68
+ :'sort' => :'CIAppAggregateSort',
69
+ :'total' => :'CIAppGroupByTotal'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ # @!visibility private
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param attributes [Hash] Model attributes in the form of hash
82
+ # @!visibility private
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelinesGroupBy` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelinesGroupBy`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'facet')
97
+ self.facet = attributes[:'facet']
98
+ end
99
+
100
+ if attributes.key?(:'histogram')
101
+ self.histogram = attributes[:'histogram']
102
+ end
103
+
104
+ if attributes.key?(:'limit')
105
+ self.limit = attributes[:'limit']
106
+ end
107
+
108
+ if attributes.key?(:'missing')
109
+ self.missing = attributes[:'missing']
110
+ end
111
+
112
+ if attributes.key?(:'sort')
113
+ self.sort = attributes[:'sort']
114
+ end
115
+
116
+ if attributes.key?(:'total')
117
+ self.total = attributes[:'total']
118
+ end
119
+ end
120
+
121
+ # Check to see if the all the properties in the model are valid
122
+ # @return true if the model is valid
123
+ # @!visibility private
124
+ def valid?
125
+ return false if @facet.nil?
126
+ true
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param facet [Object] Object to be assigned
131
+ # @!visibility private
132
+ def facet=(facet)
133
+ if facet.nil?
134
+ fail ArgumentError, 'invalid value for "facet", facet cannot be nil.'
135
+ end
136
+ @facet = facet
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param o [Object] Object to be compared
141
+ # @!visibility private
142
+ def ==(o)
143
+ return true if self.equal?(o)
144
+ self.class == o.class &&
145
+ facet == o.facet &&
146
+ histogram == o.histogram &&
147
+ limit == o.limit &&
148
+ missing == o.missing &&
149
+ sort == o.sort &&
150
+ total == o.total
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ # @!visibility private
156
+ def hash
157
+ [facet, histogram, limit, missing, sort, total].hash
158
+ end
159
+ end
160
+ end
@@ -0,0 +1,118 @@
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 search and filter query settings.
21
+ class CIAppPipelinesQueryFilter
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # The minimum time for the requested events; supports date, math, and regular timestamps (in milliseconds).
29
+ attr_accessor :from
30
+
31
+ # The search query following the Log search syntax.
32
+ attr_accessor :query
33
+
34
+ # The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds).
35
+ attr_accessor :to
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'from' => :'from',
42
+ :'query' => :'query',
43
+ :'to' => :'to'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'from' => :'String',
52
+ :'query' => :'String',
53
+ :'to' => :'String'
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::V2::CIAppPipelinesQueryFilter` 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::V2::CIAppPipelinesQueryFilter`. 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?(:'from')
81
+ self.from = attributes[:'from']
82
+ end
83
+
84
+ if attributes.key?(:'query')
85
+ self.query = attributes[:'query']
86
+ end
87
+
88
+ if attributes.key?(:'to')
89
+ self.to = attributes[:'to']
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
+ true
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param o [Object] Object to be compared
102
+ # @!visibility private
103
+ def ==(o)
104
+ return true if self.equal?(o)
105
+ self.class == o.class &&
106
+ from == o.from &&
107
+ query == o.query &&
108
+ to == o.to
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ # @!visibility private
114
+ def hash
115
+ [from, query, to].hash
116
+ end
117
+ end
118
+ end
@@ -0,0 +1,109 @@
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
+ # Global query options that are used during the query.
21
+ # Only supply timezone or time offset, not both. Otherwise, the query fails.
22
+ class CIAppQueryOptions
23
+ include BaseGenericModel
24
+
25
+ # Whether the object has unparsed attributes
26
+ # @!visibility private
27
+ attr_accessor :_unparsed
28
+
29
+ # The time offset (in seconds) to apply to the query.
30
+ attr_accessor :time_offset
31
+
32
+ # The timezone can be specified both as an offset, for example: "UTC+03:00".
33
+ attr_accessor :timezone
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'time_offset' => :'time_offset',
40
+ :'timezone' => :'timezone'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ # @!visibility private
46
+ def self.openapi_types
47
+ {
48
+ :'time_offset' => :'Integer',
49
+ :'timezone' => :'String'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ # @!visibility private
55
+ def self.openapi_nullable
56
+ Set.new([
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::V2::CIAppQueryOptions` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppQueryOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'time_offset')
77
+ self.time_offset = attributes[:'time_offset']
78
+ end
79
+
80
+ if attributes.key?(:'timezone')
81
+ self.timezone = attributes[:'timezone']
82
+ end
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ # @!visibility private
88
+ def valid?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param o [Object] Object to be compared
94
+ # @!visibility private
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ time_offset == o.time_offset &&
99
+ timezone == o.timezone
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ # @!visibility private
105
+ def hash
106
+ [time_offset, timezone].hash
107
+ end
108
+ end
109
+ end