datadog_api_client 2.15.0 → 2.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.generator/schemas/v1/openapi.yaml +643 -123
  4. data/.generator/schemas/v2/openapi.yaml +1815 -195
  5. data/.generator/src/generator/templates/api_client.j2 +19 -1
  6. data/.generator/src/generator/templates/model_base.j2 +1 -0
  7. data/CHANGELOG.md +30 -0
  8. data/examples/v1/dashboards/CreateDashboard_1754992756.rb +44 -0
  9. data/examples/v1/dashboards/CreateDashboard_2278756614.rb +91 -0
  10. data/examples/v1/monitors/CreateMonitor_1539578087.rb +36 -0
  11. data/examples/v1/synthetics/CreateSyntheticsBrowserTest.rb +1 -1
  12. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +1 -1
  13. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +1 -1
  14. data/examples/v1/usage-metering/GetUsageCIApp.rb +4 -1
  15. data/examples/v1/usage-metering/GetUsageCWS.rb +4 -1
  16. data/examples/v1/usage-metering/GetUsageCloudSecurityPostureManagement.rb +1 -1
  17. data/examples/v2/apm-retention-filters/CreateApmRetentionFilter.rb +20 -0
  18. data/examples/v2/apm-retention-filters/DeleteApmRetentionFilter.rb +8 -0
  19. data/examples/v2/apm-retention-filters/GetApmRetentionFilter.rb +8 -0
  20. data/examples/v2/apm-retention-filters/ListApmRetentionFilters.rb +5 -0
  21. data/examples/v2/apm-retention-filters/ReorderApmRetentionFilters.rb +18 -0
  22. data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter.rb +24 -0
  23. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +0 -3
  24. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +0 -8
  25. data/examples/v2/container-images/ListContainerImages.rb +8 -0
  26. data/examples/v2/container-images/ListContainerImages_3088586393.rb +11 -0
  27. data/examples/v2/container-images/ListContainerImages_3974828736.rb +11 -0
  28. data/examples/v2/gcp-integration/CreateGCPSTSAccount_109518525.rb +19 -0
  29. data/examples/v2/powerpack/CreatePowerpack.rb +47 -0
  30. data/examples/v2/powerpack/DeletePowerpack.rb +8 -0
  31. data/examples/v2/powerpack/GetPowerpack.rb +8 -0
  32. data/examples/v2/powerpack/ListPowerpacks.rb +8 -0
  33. data/examples/v2/powerpack/ListPowerpacks_1173755071.rb +8 -0
  34. data/examples/v2/powerpack/UpdatePowerpack.rb +50 -0
  35. data/examples/v2/rum/CreateRUMApplication.rb +1 -1
  36. data/examples/v2/service-accounts/CreateServiceAccountApplicationKey.rb +5 -7
  37. data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey.rb +7 -1
  38. data/examples/v2/service-accounts/GetServiceAccountApplicationKey.rb +7 -1
  39. data/examples/v2/service-accounts/ListServiceAccountApplicationKeys.rb +4 -1
  40. data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey.rb +11 -9
  41. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +23 -12
  42. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions_2621709423.rb +53 -0
  43. data/lib/datadog_api_client/api_client.rb +19 -1
  44. data/lib/datadog_api_client/configuration.rb +1 -1
  45. data/lib/datadog_api_client/inflector.rb +80 -0
  46. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -20
  47. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
  48. data/lib/datadog_api_client/v1/api/webhooks_integration_api.rb +1 -1
  49. data/lib/datadog_api_client/v1/model_base.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -4
  51. data/lib/datadog_api_client/v1/models/ip_prefixes_global.rb +94 -0
  52. data/lib/datadog_api_client/v1/models/ip_ranges.rb +11 -1
  53. data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule.rb +82 -0
  54. data/lib/datadog_api_client/v1/models/monitor_options_custom_schedule_recurrence.rb +100 -0
  55. data/lib/datadog_api_client/v1/models/monitor_options_scheduling_options.rb +11 -1
  56. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
  57. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +45 -5
  58. data/lib/datadog_api_client/v1/models/powerpack_template_variable_contents.rb +131 -0
  59. data/lib/datadog_api_client/v1/models/powerpack_template_variables.rb +94 -0
  60. data/lib/datadog_api_client/v1/models/powerpack_widget_definition.rb +169 -0
  61. data/lib/datadog_api_client/v1/models/powerpack_widget_definition_type.rb +26 -0
  62. data/lib/datadog_api_client/v1/models/split_config.rb +181 -0
  63. data/lib/datadog_api_client/v1/models/split_config_sort_compute.rb +119 -0
  64. data/lib/datadog_api_client/v1/models/split_dimension.rb +98 -0
  65. data/lib/datadog_api_client/v1/models/split_graph_source_widget_definition.rb +70 -0
  66. data/lib/datadog_api_client/v1/models/split_graph_viz_size.rb +29 -0
  67. data/lib/datadog_api_client/v1/models/split_graph_widget_definition.rb +191 -0
  68. data/lib/datadog_api_client/v1/models/split_graph_widget_definition_type.rb +26 -0
  69. data/lib/datadog_api_client/v1/models/split_sort.rb +108 -0
  70. data/lib/datadog_api_client/v1/models/split_vector_entry_item.rb +125 -0
  71. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +4 -4
  72. data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +8 -8
  73. data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_response.rb +2 -2
  74. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +148 -8
  75. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +148 -8
  76. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +148 -8
  77. data/lib/datadog_api_client/v1/models/widget_definition.rb +8 -6
  78. data/lib/datadog_api_client/v2/api/apm_retention_filters_api.rb +423 -0
  79. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +4 -10
  80. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +3 -3
  81. data/lib/datadog_api_client/v2/api/container_images_api.rb +129 -0
  82. data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
  83. data/lib/datadog_api_client/v2/api/powerpack_api.rb +383 -0
  84. data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -2
  85. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  86. data/lib/datadog_api_client/v2/model_base.rb +1 -0
  87. data/lib/datadog_api_client/v2/models/apm_retention_filter_type.rb +26 -0
  88. data/lib/datadog_api_client/v2/models/container_image.rb +100 -0
  89. data/lib/datadog_api_client/v2/models/container_image_attributes.rb +261 -0
  90. data/lib/datadog_api_client/v2/models/container_image_flavor.rb +120 -0
  91. data/lib/datadog_api_client/v2/models/container_image_group.rb +110 -0
  92. data/lib/datadog_api_client/v2/models/container_image_group_attributes.rb +100 -0
  93. data/lib/datadog_api_client/v2/models/container_image_group_images_relationships_link.rb +92 -0
  94. data/lib/datadog_api_client/v2/models/container_image_group_relationships.rb +80 -0
  95. data/lib/datadog_api_client/v2/models/container_image_group_relationships_links.rb +80 -0
  96. data/lib/datadog_api_client/v2/models/container_image_group_type.rb +26 -0
  97. data/lib/datadog_api_client/v2/models/container_image_item.rb +63 -0
  98. data/lib/datadog_api_client/v2/models/container_image_meta.rb +80 -0
  99. data/lib/datadog_api_client/v2/models/container_image_meta_page.rb +160 -0
  100. data/lib/datadog_api_client/v2/models/container_image_meta_page_type.rb +26 -0
  101. data/lib/datadog_api_client/v2/models/container_image_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/container_image_vulnerabilities.rb +140 -0
  103. data/lib/datadog_api_client/v2/models/container_images_response.rb +102 -0
  104. data/lib/datadog_api_client/v2/models/container_images_response_links.rb +130 -0
  105. data/lib/datadog_api_client/v2/models/data_scalar_column.rb +2 -2
  106. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +13 -1
  107. data/lib/datadog_api_client/v2/models/group_scalar_column.rb +2 -2
  108. data/lib/datadog_api_client/v2/models/list_powerpacks_response.rb +114 -0
  109. data/lib/datadog_api_client/v2/models/powerpack.rb +80 -0
  110. data/lib/datadog_api_client/v2/models/powerpack_attributes.rb +164 -0
  111. data/lib/datadog_api_client/v2/models/powerpack_data.rb +110 -0
  112. data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +108 -0
  113. data/lib/datadog_api_client/v2/models/powerpack_group_widget_definition.rb +162 -0
  114. data/lib/datadog_api_client/v2/models/powerpack_group_widget_layout.rb +177 -0
  115. data/lib/datadog_api_client/v2/models/powerpack_inner_widget_layout.rb +177 -0
  116. data/lib/datadog_api_client/v2/models/powerpack_inner_widgets.rb +108 -0
  117. data/lib/datadog_api_client/v2/models/powerpack_relationships.rb +80 -0
  118. data/lib/datadog_api_client/v2/models/powerpack_response.rb +92 -0
  119. data/lib/datadog_api_client/v2/models/powerpack_response_links.rb +129 -0
  120. data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +110 -0
  121. data/lib/datadog_api_client/v2/models/powerpacks_response_meta.rb +80 -0
  122. data/lib/datadog_api_client/v2/models/powerpacks_response_meta_pagination.rb +150 -0
  123. data/lib/datadog_api_client/v2/models/reorder_retention_filters_request.rb +100 -0
  124. data/lib/datadog_api_client/v2/models/restriction_policy_binding.rb +1 -1
  125. data/lib/datadog_api_client/v2/models/retention_filter.rb +140 -0
  126. data/lib/datadog_api_client/v2/models/retention_filter_all.rb +140 -0
  127. data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +181 -0
  128. data/lib/datadog_api_client/v2/models/retention_filter_all_type.rb +28 -0
  129. data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +181 -0
  130. data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +183 -0
  131. data/lib/datadog_api_client/v2/models/retention_filter_create_data.rb +119 -0
  132. data/lib/datadog_api_client/v2/models/retention_filter_create_request.rb +98 -0
  133. data/lib/datadog_api_client/v2/models/retention_filter_response.rb +80 -0
  134. data/lib/datadog_api_client/v2/models/retention_filter_type.rb +26 -0
  135. data/lib/datadog_api_client/v2/models/retention_filter_update_data.rb +140 -0
  136. data/lib/datadog_api_client/v2/models/retention_filter_update_request.rb +98 -0
  137. data/lib/datadog_api_client/v2/models/retention_filter_without_attributes.rb +119 -0
  138. data/lib/datadog_api_client/v2/models/retention_filters_response.rb +100 -0
  139. data/lib/datadog_api_client/v2/models/scalar_column_type_group.rb +26 -0
  140. data/lib/datadog_api_client/v2/models/scalar_column_type_number.rb +26 -0
  141. data/lib/datadog_api_client/v2/models/scalar_meta.rb +8 -0
  142. data/lib/datadog_api_client/v2/models/service_definition_schema.rb +2 -1
  143. data/lib/datadog_api_client/v2/models/service_definition_schema_versions.rb +1 -0
  144. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +247 -0
  145. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_contact.rb +129 -0
  146. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_integrations.rb +90 -0
  147. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_link.rb +150 -0
  148. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie.rb +108 -0
  149. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_opsgenie_region.rb +27 -0
  150. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_pagerduty.rb +80 -0
  151. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_type.rb +32 -0
  152. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2_version.rb +26 -0
  153. data/lib/datadog_api_client/v2/models/service_definitions_create_request.rb +1 -0
  154. data/lib/datadog_api_client/v2/models/spans_filter.rb +80 -0
  155. data/lib/datadog_api_client/v2/models/spans_filter_create.rb +98 -0
  156. data/lib/datadog_api_client/version.rb +1 -1
  157. data/run-tests.sh +6 -5
  158. metadata +102 -9
  159. data/examples/v1/usage-metering/GetUsageCIApp_1064440884.rb +0 -8
  160. data/examples/v1/usage-metering/GetUsageCWS_736958514.rb +0 -8
  161. data/examples/v2/service-accounts/CreateServiceAccountApplicationKey_1761876297.rb +0 -17
  162. data/examples/v2/service-accounts/DeleteServiceAccountApplicationKey_992091161.rb +0 -11
  163. data/examples/v2/service-accounts/GetServiceAccountApplicationKey_819075131.rb +0 -11
  164. data/examples/v2/service-accounts/ListServiceAccountApplicationKeys_1268914341.rb +0 -8
  165. data/examples/v2/service-accounts/UpdateServiceAccountApplicationKey_768415790.rb +0 -22
@@ -0,0 +1,181 @@
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 attributes of the retention filter.
21
+ class RetentionFilterAllAttributes
22
+ include BaseGenericModel
23
+
24
+ # The creation timestamp of the retention filter.
25
+ attr_accessor :created_at
26
+
27
+ # The creator of the retention filter.
28
+ attr_accessor :created_by
29
+
30
+ # Shows whether the filter can be edited.
31
+ attr_accessor :editable
32
+
33
+ # The status of the retention filter (Enabled/Disabled).
34
+ attr_accessor :enabled
35
+
36
+ # The execution order of the retention filter.
37
+ attr_accessor :execution_order
38
+
39
+ # The spans filter used to index spans.
40
+ attr_accessor :filter
41
+
42
+ # The type of retention filter.
43
+ attr_accessor :filter_type
44
+
45
+ # The modification timestamp of the retention filter.
46
+ attr_accessor :modified_at
47
+
48
+ # The modifier of the retention filter.
49
+ attr_accessor :modified_by
50
+
51
+ # The name of the retention filter.
52
+ attr_accessor :name
53
+
54
+ # Sample rate to apply to spans going through this retention filter,
55
+ # a value of 1.0 keeps all spans matching the query.
56
+ attr_accessor :rate
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ # @!visibility private
60
+ def self.attribute_map
61
+ {
62
+ :'created_at' => :'created_at',
63
+ :'created_by' => :'created_by',
64
+ :'editable' => :'editable',
65
+ :'enabled' => :'enabled',
66
+ :'execution_order' => :'execution_order',
67
+ :'filter' => :'filter',
68
+ :'filter_type' => :'filter_type',
69
+ :'modified_at' => :'modified_at',
70
+ :'modified_by' => :'modified_by',
71
+ :'name' => :'name',
72
+ :'rate' => :'rate'
73
+ }
74
+ end
75
+
76
+ # Attribute type mapping.
77
+ # @!visibility private
78
+ def self.openapi_types
79
+ {
80
+ :'created_at' => :'Integer',
81
+ :'created_by' => :'String',
82
+ :'editable' => :'Boolean',
83
+ :'enabled' => :'Boolean',
84
+ :'execution_order' => :'Integer',
85
+ :'filter' => :'SpansFilter',
86
+ :'filter_type' => :'RetentionFilterAllType',
87
+ :'modified_at' => :'Integer',
88
+ :'modified_by' => :'String',
89
+ :'name' => :'String',
90
+ :'rate' => :'Float'
91
+ }
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param attributes [Hash] Model attributes in the form of hash
96
+ # @!visibility private
97
+ def initialize(attributes = {})
98
+ if (!attributes.is_a?(Hash))
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterAllAttributes` initialize method"
100
+ end
101
+
102
+ # check to see if the attribute exists and convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!self.class.attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterAllAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'created_at')
111
+ self.created_at = attributes[:'created_at']
112
+ end
113
+
114
+ if attributes.key?(:'created_by')
115
+ self.created_by = attributes[:'created_by']
116
+ end
117
+
118
+ if attributes.key?(:'editable')
119
+ self.editable = attributes[:'editable']
120
+ end
121
+
122
+ if attributes.key?(:'enabled')
123
+ self.enabled = attributes[:'enabled']
124
+ end
125
+
126
+ if attributes.key?(:'execution_order')
127
+ self.execution_order = attributes[:'execution_order']
128
+ end
129
+
130
+ if attributes.key?(:'filter')
131
+ self.filter = attributes[:'filter']
132
+ end
133
+
134
+ if attributes.key?(:'filter_type')
135
+ self.filter_type = attributes[:'filter_type']
136
+ end
137
+
138
+ if attributes.key?(:'modified_at')
139
+ self.modified_at = attributes[:'modified_at']
140
+ end
141
+
142
+ if attributes.key?(:'modified_by')
143
+ self.modified_by = attributes[:'modified_by']
144
+ end
145
+
146
+ if attributes.key?(:'name')
147
+ self.name = attributes[:'name']
148
+ end
149
+
150
+ if attributes.key?(:'rate')
151
+ self.rate = attributes[:'rate']
152
+ end
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
+ created_at == o.created_at &&
162
+ created_by == o.created_by &&
163
+ editable == o.editable &&
164
+ enabled == o.enabled &&
165
+ execution_order == o.execution_order &&
166
+ filter == o.filter &&
167
+ filter_type == o.filter_type &&
168
+ modified_at == o.modified_at &&
169
+ modified_by == o.modified_by &&
170
+ name == o.name &&
171
+ rate == o.rate
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ # @!visibility private
177
+ def hash
178
+ [created_at, created_by, editable, enabled, execution_order, filter, filter_type, modified_at, modified_by, name, rate].hash
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,28 @@
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 type of retention filter.
21
+ class RetentionFilterAllType
22
+ include BaseEnumModel
23
+
24
+ SPANS_SAMPLING_PROCESSOR = "spans-sampling-processor".freeze
25
+ SPANS_ERRORS_SAMPLING_PROCESSOR = "spans-errors-sampling-processor".freeze
26
+ SPANS_APPSEC_SAMPLING_PROCESSOR = "spans-appsec-sampling-processor".freeze
27
+ end
28
+ end
@@ -0,0 +1,181 @@
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 attributes of the retention filter.
21
+ class RetentionFilterAttributes
22
+ include BaseGenericModel
23
+
24
+ # The creation timestamp of the retention filter.
25
+ attr_accessor :created_at
26
+
27
+ # The creator of the retention filter.
28
+ attr_accessor :created_by
29
+
30
+ # Shows whether the filter can be edited.
31
+ attr_accessor :editable
32
+
33
+ # The status of the retention filter (Enabled/Disabled).
34
+ attr_accessor :enabled
35
+
36
+ # The execution order of the retention filter.
37
+ attr_accessor :execution_order
38
+
39
+ # The spans filter used to index spans.
40
+ attr_accessor :filter
41
+
42
+ # The type of retention filter. The value should always be spans-sampling-processor.
43
+ attr_accessor :filter_type
44
+
45
+ # The modification timestamp of the retention filter.
46
+ attr_accessor :modified_at
47
+
48
+ # The modifier of the retention filter.
49
+ attr_accessor :modified_by
50
+
51
+ # The name of the retention filter.
52
+ attr_accessor :name
53
+
54
+ # Sample rate to apply to spans going through this retention filter,
55
+ # a value of 1.0 keeps all spans matching the query.
56
+ attr_accessor :rate
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ # @!visibility private
60
+ def self.attribute_map
61
+ {
62
+ :'created_at' => :'created_at',
63
+ :'created_by' => :'created_by',
64
+ :'editable' => :'editable',
65
+ :'enabled' => :'enabled',
66
+ :'execution_order' => :'execution_order',
67
+ :'filter' => :'filter',
68
+ :'filter_type' => :'filter_type',
69
+ :'modified_at' => :'modified_at',
70
+ :'modified_by' => :'modified_by',
71
+ :'name' => :'name',
72
+ :'rate' => :'rate'
73
+ }
74
+ end
75
+
76
+ # Attribute type mapping.
77
+ # @!visibility private
78
+ def self.openapi_types
79
+ {
80
+ :'created_at' => :'Integer',
81
+ :'created_by' => :'String',
82
+ :'editable' => :'Boolean',
83
+ :'enabled' => :'Boolean',
84
+ :'execution_order' => :'Integer',
85
+ :'filter' => :'SpansFilter',
86
+ :'filter_type' => :'RetentionFilterType',
87
+ :'modified_at' => :'Integer',
88
+ :'modified_by' => :'String',
89
+ :'name' => :'String',
90
+ :'rate' => :'Float'
91
+ }
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param attributes [Hash] Model attributes in the form of hash
96
+ # @!visibility private
97
+ def initialize(attributes = {})
98
+ if (!attributes.is_a?(Hash))
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterAttributes` initialize method"
100
+ end
101
+
102
+ # check to see if the attribute exists and convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!self.class.attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'created_at')
111
+ self.created_at = attributes[:'created_at']
112
+ end
113
+
114
+ if attributes.key?(:'created_by')
115
+ self.created_by = attributes[:'created_by']
116
+ end
117
+
118
+ if attributes.key?(:'editable')
119
+ self.editable = attributes[:'editable']
120
+ end
121
+
122
+ if attributes.key?(:'enabled')
123
+ self.enabled = attributes[:'enabled']
124
+ end
125
+
126
+ if attributes.key?(:'execution_order')
127
+ self.execution_order = attributes[:'execution_order']
128
+ end
129
+
130
+ if attributes.key?(:'filter')
131
+ self.filter = attributes[:'filter']
132
+ end
133
+
134
+ if attributes.key?(:'filter_type')
135
+ self.filter_type = attributes[:'filter_type']
136
+ end
137
+
138
+ if attributes.key?(:'modified_at')
139
+ self.modified_at = attributes[:'modified_at']
140
+ end
141
+
142
+ if attributes.key?(:'modified_by')
143
+ self.modified_by = attributes[:'modified_by']
144
+ end
145
+
146
+ if attributes.key?(:'name')
147
+ self.name = attributes[:'name']
148
+ end
149
+
150
+ if attributes.key?(:'rate')
151
+ self.rate = attributes[:'rate']
152
+ end
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
+ created_at == o.created_at &&
162
+ created_by == o.created_by &&
163
+ editable == o.editable &&
164
+ enabled == o.enabled &&
165
+ execution_order == o.execution_order &&
166
+ filter == o.filter &&
167
+ filter_type == o.filter_type &&
168
+ modified_at == o.modified_at &&
169
+ modified_by == o.modified_by &&
170
+ name == o.name &&
171
+ rate == o.rate
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ # @!visibility private
177
+ def hash
178
+ [created_at, created_by, editable, enabled, execution_order, filter, filter_type, modified_at, modified_by, name, rate].hash
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,183 @@
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 object describing the configuration of the retention filter to create/update.
21
+ class RetentionFilterCreateAttributes
22
+ include BaseGenericModel
23
+
24
+ # Enable/Disable the retention filter.
25
+ attr_reader :enabled
26
+
27
+ # The spans filter. Spans matching this filter will be indexed and stored.
28
+ attr_reader :filter
29
+
30
+ # The type of retention filter. The value should always be spans-sampling-processor.
31
+ attr_reader :filter_type
32
+
33
+ # The name of the retention filter.
34
+ attr_reader :name
35
+
36
+ # Sample rate to apply to spans going through this retention filter,
37
+ # a value of 1.0 keeps all spans matching the query.
38
+ attr_reader :rate
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'enabled' => :'enabled',
45
+ :'filter' => :'filter',
46
+ :'filter_type' => :'filter_type',
47
+ :'name' => :'name',
48
+ :'rate' => :'rate'
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ # @!visibility private
54
+ def self.openapi_types
55
+ {
56
+ :'enabled' => :'Boolean',
57
+ :'filter' => :'SpansFilterCreate',
58
+ :'filter_type' => :'RetentionFilterType',
59
+ :'name' => :'String',
60
+ :'rate' => :'Float'
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::RetentionFilterCreateAttributes` 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::RetentionFilterCreateAttributes`. 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?(:'enabled')
81
+ self.enabled = attributes[:'enabled']
82
+ end
83
+
84
+ if attributes.key?(:'filter')
85
+ self.filter = attributes[:'filter']
86
+ end
87
+
88
+ if attributes.key?(:'filter_type')
89
+ self.filter_type = attributes[:'filter_type']
90
+ end
91
+
92
+ if attributes.key?(:'name')
93
+ self.name = attributes[:'name']
94
+ end
95
+
96
+ if attributes.key?(:'rate')
97
+ self.rate = attributes[:'rate']
98
+ end
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ # @!visibility private
104
+ def valid?
105
+ return false if @enabled.nil?
106
+ return false if @filter.nil?
107
+ return false if @filter_type.nil?
108
+ return false if @name.nil?
109
+ return false if @rate.nil?
110
+ true
111
+ end
112
+
113
+ # Custom attribute writer method with validation
114
+ # @param enabled [Object] Object to be assigned
115
+ # @!visibility private
116
+ def enabled=(enabled)
117
+ if enabled.nil?
118
+ fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.'
119
+ end
120
+ @enabled = enabled
121
+ end
122
+
123
+ # Custom attribute writer method with validation
124
+ # @param filter [Object] Object to be assigned
125
+ # @!visibility private
126
+ def filter=(filter)
127
+ if filter.nil?
128
+ fail ArgumentError, 'invalid value for "filter", filter cannot be nil.'
129
+ end
130
+ @filter = filter
131
+ end
132
+
133
+ # Custom attribute writer method with validation
134
+ # @param filter_type [Object] Object to be assigned
135
+ # @!visibility private
136
+ def filter_type=(filter_type)
137
+ if filter_type.nil?
138
+ fail ArgumentError, 'invalid value for "filter_type", filter_type cannot be nil.'
139
+ end
140
+ @filter_type = filter_type
141
+ end
142
+
143
+ # Custom attribute writer method with validation
144
+ # @param name [Object] Object to be assigned
145
+ # @!visibility private
146
+ def name=(name)
147
+ if name.nil?
148
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
149
+ end
150
+ @name = name
151
+ end
152
+
153
+ # Custom attribute writer method with validation
154
+ # @param rate [Object] Object to be assigned
155
+ # @!visibility private
156
+ def rate=(rate)
157
+ if rate.nil?
158
+ fail ArgumentError, 'invalid value for "rate", rate cannot be nil.'
159
+ end
160
+ @rate = rate
161
+ end
162
+
163
+ # Checks equality by comparing each attribute.
164
+ # @param o [Object] Object to be compared
165
+ # @!visibility private
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ enabled == o.enabled &&
170
+ filter == o.filter &&
171
+ filter_type == o.filter_type &&
172
+ name == o.name &&
173
+ rate == o.rate
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Integer] Hash code
178
+ # @!visibility private
179
+ def hash
180
+ [enabled, filter, filter_type, name, rate].hash
181
+ end
182
+ end
183
+ end
@@ -0,0 +1,119 @@
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 body of the retention filter to be created.
21
+ class RetentionFilterCreateData
22
+ include BaseGenericModel
23
+
24
+ # The object describing the configuration of the retention filter to create/update.
25
+ attr_reader :attributes
26
+
27
+ # The type of the resource.
28
+ attr_reader :type
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'attributes' => :'attributes',
35
+ :'type' => :'type'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'attributes' => :'RetentionFilterCreateAttributes',
44
+ :'type' => :'ApmRetentionFilterType'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RetentionFilterCreateData` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RetentionFilterCreateData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'attributes')
65
+ self.attributes = attributes[:'attributes']
66
+ end
67
+
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
70
+ end
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ # @!visibility private
76
+ def valid?
77
+ return false if @attributes.nil?
78
+ return false if @type.nil?
79
+ true
80
+ end
81
+
82
+ # Custom attribute writer method with validation
83
+ # @param attributes [Object] Object to be assigned
84
+ # @!visibility private
85
+ def attributes=(attributes)
86
+ if attributes.nil?
87
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
88
+ end
89
+ @attributes = attributes
90
+ end
91
+
92
+ # Custom attribute writer method with validation
93
+ # @param type [Object] Object to be assigned
94
+ # @!visibility private
95
+ def type=(type)
96
+ if type.nil?
97
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
98
+ end
99
+ @type = type
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param o [Object] Object to be compared
104
+ # @!visibility private
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ attributes == o.attributes &&
109
+ type == o.type
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ # @!visibility private
115
+ def hash
116
+ [attributes, type].hash
117
+ end
118
+ end
119
+ end