datadog_api_client 2.0.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +6 -6
  3. data/.generator/poetry.lock +21 -14
  4. data/.generator/pyproject.toml +1 -1
  5. data/.generator/schemas/v1/openapi.yaml +840 -908
  6. data/.generator/schemas/v2/openapi.yaml +1304 -913
  7. data/.generator/src/generator/formatter.py +1 -1
  8. data/.generator/src/generator/templates/api_client.j2 +5 -1
  9. data/.generator/src/generator/templates/configuration.j2 +17 -0
  10. data/.github/workflows/test.yml +4 -1
  11. data/.github/workflows/test_integration.yml +5 -0
  12. data/.pre-commit-config.yaml +1 -1
  13. data/CHANGELOG.md +49 -0
  14. data/README.md +11 -0
  15. data/examples/v1/dashboards/CreateDashboard_1094917386.rb +37 -0
  16. data/examples/v1/dashboards/CreateDashboard_1307120899.rb +61 -0
  17. data/examples/v1/dashboards/CreateDashboard_1423904722.rb +38 -0
  18. data/examples/v1/dashboards/CreateDashboard_2652180930.rb +43 -0
  19. data/examples/v1/dashboards/CreateDashboard_2850365602.rb +55 -0
  20. data/examples/v1/dashboards/CreateDashboard_3117424216.rb +33 -0
  21. data/examples/v1/dashboards/CreateDashboard_3669695268.rb +50 -0
  22. data/examples/v1/dashboards/CreateDashboard_858397694.rb +41 -0
  23. data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
  24. data/examples/v1/monitors/ValidateMonitor.rb +1 -0
  25. data/examples/v1/monitors/ValidateMonitor_4247196452.rb +38 -0
  26. data/examples/v1/synthetics/CreateGlobalVariable.rb +1 -0
  27. data/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +23 -0
  28. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +10 -0
  29. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.rb +6 -0
  30. data/examples/v1/synthetics/EditGlobalVariable.rb +1 -0
  31. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  32. data/examples/v1/usage-metering/GetDailyCustomReports.rb +0 -3
  33. data/examples/v1/usage-metering/GetMonthlyCustomReports.rb +0 -3
  34. data/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +0 -3
  35. data/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +0 -3
  36. data/examples/v1/usage-metering/GetUsageAttribution.rb +0 -3
  37. data/examples/v2/incidents/ListIncidentAttachments.rb +8 -0
  38. data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +11 -0
  39. data/examples/v2/incidents/UpdateIncidentAttachments.rb +38 -0
  40. data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +26 -0
  41. data/examples/v2/metrics/ListActiveMetricConfigurations.rb +5 -0
  42. data/examples/v2/metrics/ListTagConfigurations.rb +1 -1
  43. data/examples/v2/metrics/ListTagConfigurations_265033704.rb +8 -0
  44. data/examples/v2/metrics/{ListTagConfigurations_103226315.rb → ListTagConfigurations_2739018321.rb} +1 -1
  45. data/examples/v2/metrics/SubmitMetrics_1762007427.rb +23 -0
  46. data/examples/v2/roles/UpdateRole.rb +13 -0
  47. data/examples/v2/rum/CreateRUMApplication.rb +15 -0
  48. data/examples/v2/rum/DeleteRUMApplication.rb +8 -0
  49. data/examples/v2/rum/GetRUMApplication.rb +8 -0
  50. data/examples/v2/rum/GetRUMApplications.rb +5 -0
  51. data/examples/v2/rum/UpdateRUMApplication.rb +16 -0
  52. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +3 -2
  53. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_461183901.rb +2 -2
  54. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +2 -2
  55. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_914562040.rb +50 -0
  56. data/examples/v2/security-monitoring/GetSecurityMonitoringSignal.rb +5 -0
  57. data/examples/v2/security-monitoring/UpdateSecurityMonitoringRule.rb +2 -1
  58. data/examples/v2/usage-metering/GetEstimatedCostByOrg.rb +1 -4
  59. data/examples/v2/usage-metering/GetEstimatedCostByOrg_2734954020.rb +2 -4
  60. data/examples/v2/usage-metering/GetEstimatedCostByOrg_3186693804.rb +2 -4
  61. data/examples/v2/usage-metering/GetHistoricalCostByOrg.rb +8 -0
  62. data/examples/v2/usage-metering/GetHourlyUsage.rb +5 -0
  63. data/generate.sh +30 -0
  64. data/lib/datadog_api_client/api_client.rb +5 -1
  65. data/lib/datadog_api_client/configuration.rb +20 -6
  66. data/lib/datadog_api_client/inflector.rb +67 -1
  67. data/lib/datadog_api_client/v1/api/metrics_api.rb +1 -1
  68. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +3 -1
  69. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +42 -62
  70. data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -2
  71. data/lib/datadog_api_client/v1/models/dashboard_template_variable_preset_value.rb +28 -5
  72. data/lib/datadog_api_client/v1/models/formula_and_function_event_query_definition.rb +14 -4
  73. data/lib/datadog_api_client/v1/models/formula_and_function_events_data_source.rb +1 -0
  74. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +2 -0
  75. data/lib/datadog_api_client/v1/models/list_stream_query.rb +14 -4
  76. data/lib/datadog_api_client/v1/models/list_stream_source.rb +1 -0
  77. data/lib/datadog_api_client/v1/models/metric_content_encoding.rb +1 -0
  78. data/lib/datadog_api_client/v1/models/monitor_options.rb +28 -1
  79. data/lib/datadog_api_client/v1/models/monitor_summary_widget_definition.rb +13 -1
  80. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +4 -0
  81. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +41 -1
  82. data/lib/datadog_api_client/v1/models/on_missing_data_option.rb +33 -0
  83. data/lib/datadog_api_client/v1/models/search_service_level_objective.rb +111 -0
  84. data/lib/datadog_api_client/v1/models/search_service_level_objective_attributes.rb +286 -0
  85. data/lib/datadog_api_client/v1/models/search_service_level_objective_data.rb +134 -0
  86. data/lib/datadog_api_client/v1/models/search_slo_query.rb +137 -0
  87. data/lib/datadog_api_client/v1/models/search_slo_response_data_attributes.rb +8 -8
  88. data/lib/datadog_api_client/v1/models/search_slo_response_links.rb +2 -0
  89. data/lib/datadog_api_client/v1/models/search_slo_threshold.rb +184 -0
  90. data/lib/datadog_api_client/v1/models/search_slo_timeframe.rb +28 -0
  91. data/lib/datadog_api_client/v1/models/slo_creator.rb +131 -0
  92. data/lib/datadog_api_client/v1/models/slo_list_widget_definition.rb +185 -0
  93. data/lib/datadog_api_client/v1/models/slo_list_widget_definition_type.rb +26 -0
  94. data/lib/datadog_api_client/v1/models/slo_list_widget_query.rb +149 -0
  95. data/lib/datadog_api_client/v1/models/slo_list_widget_request.rb +143 -0
  96. data/lib/datadog_api_client/v1/models/slo_list_widget_request_type.rb +26 -0
  97. data/lib/datadog_api_client/v1/models/slo_overall_statuses.rb +174 -0
  98. data/lib/datadog_api_client/v1/models/slo_raw_error_budget_remaining.rb +121 -0
  99. data/lib/datadog_api_client/v1/models/synthetics_assertion_operator.rb +1 -0
  100. data/lib/datadog_api_client/v1/models/synthetics_basic_auth.rb +2 -1
  101. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest.rb +155 -0
  102. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_digest_type.rb +26 -0
  103. data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options.rb +11 -12
  104. data/lib/datadog_api_client/v1/models/synthetics_global_variable_parse_test_options_type.rb +1 -0
  105. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +31 -1
  106. data/lib/datadog_api_client/v1/models/synthetics_test_process_status.rb +0 -1
  107. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +15 -1
  108. data/lib/datadog_api_client/v1/models/topology_map_widget_definition.rb +193 -0
  109. data/lib/datadog_api_client/v1/models/topology_map_widget_definition_type.rb +26 -0
  110. data/lib/datadog_api_client/v1/models/topology_query.rb +144 -0
  111. data/lib/datadog_api_client/v1/models/topology_query_data_source.rb +27 -0
  112. data/lib/datadog_api_client/v1/models/topology_request.rb +121 -0
  113. data/lib/datadog_api_client/v1/models/topology_request_type.rb +26 -0
  114. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +4 -0
  115. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +4 -0
  116. data/lib/datadog_api_client/v1/models/usage_attribution_values.rb +41 -1
  117. data/lib/datadog_api_client/v1/models/usage_billable_summary_hour.rb +11 -1
  118. data/lib/datadog_api_client/v1/models/usage_cloud_security_posture_management_hour.rb +12 -1
  119. data/lib/datadog_api_client/v1/models/usage_fargate_hour.rb +11 -1
  120. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +21 -1
  121. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
  122. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +21 -1
  123. data/lib/datadog_api_client/v1/models/widget_definition.rb +3 -1
  124. data/lib/datadog_api_client/v1/models/widget_monitor_summary_sort.rb +2 -0
  125. data/lib/datadog_api_client/v2/api/events_api.rb +1 -1
  126. data/lib/datadog_api_client/v2/api/incident_services_api.rb +2 -2
  127. data/lib/datadog_api_client/v2/api/incident_teams_api.rb +2 -2
  128. data/lib/datadog_api_client/v2/api/incidents_api.rb +155 -0
  129. data/lib/datadog_api_client/v2/api/logs_api.rb +1 -1
  130. data/lib/datadog_api_client/v2/api/metrics_api.rb +77 -9
  131. data/lib/datadog_api_client/v2/api/rum_api.rb +329 -0
  132. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +68 -3
  133. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +83 -17
  134. data/lib/datadog_api_client/v2/models/content_encoding.rb +1 -0
  135. data/lib/datadog_api_client/v2/models/incident_attachment_attachment_type.rb +27 -0
  136. data/lib/datadog_api_client/v2/models/incident_attachment_attributes.rb +63 -0
  137. data/lib/datadog_api_client/v2/models/incident_attachment_data.rb +187 -0
  138. data/lib/datadog_api_client/v2/models/incident_attachment_link_attachment_type.rb +26 -0
  139. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes.rb +145 -0
  140. data/lib/datadog_api_client/v2/models/incident_attachment_link_attributes_attachment_object.rb +143 -0
  141. data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attachment_type.rb +26 -0
  142. data/lib/datadog_api_client/v2/models/incident_attachment_postmortem_attributes.rb +145 -0
  143. data/lib/datadog_api_client/v2/models/incident_attachment_related_object.rb +26 -0
  144. data/lib/datadog_api_client/v2/models/incident_attachment_relationships.rb +111 -0
  145. data/lib/datadog_api_client/v2/models/incident_attachment_type.rb +26 -0
  146. data/lib/datadog_api_client/v2/models/incident_attachment_update_attributes.rb +63 -0
  147. data/lib/datadog_api_client/v2/models/incident_attachment_update_data.rb +144 -0
  148. data/lib/datadog_api_client/v2/models/incident_attachment_update_request.rb +127 -0
  149. data/lib/datadog_api_client/v2/models/incident_attachment_update_response.rb +137 -0
  150. data/lib/datadog_api_client/v2/models/incident_attachments_postmortem_attributes_attachment_object.rb +143 -0
  151. data/lib/datadog_api_client/v2/models/incident_attachments_response.rb +136 -0
  152. data/lib/datadog_api_client/v2/models/incident_attachments_response_included_item.rb +62 -0
  153. data/lib/datadog_api_client/v2/models/incident_related_object.rb +1 -0
  154. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +1 -11
  155. data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +2 -1
  156. data/lib/datadog_api_client/v2/models/incident_response_relationships.rb +14 -14
  157. data/lib/datadog_api_client/v2/models/metric_active_configuration_type.rb +26 -0
  158. data/lib/datadog_api_client/v2/models/metric_content_encoding.rb +2 -0
  159. data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations.rb +133 -0
  160. data/lib/datadog_api_client/v2/models/metric_suggested_tags_and_aggregations_response.rb +111 -0
  161. data/lib/datadog_api_client/v2/models/metric_suggested_tags_attributes.rb +125 -0
  162. data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment.rb +124 -0
  163. data/lib/datadog_api_client/v2/models/relationship_to_incident_attachment_data.rb +145 -0
  164. data/lib/datadog_api_client/v2/models/role_update_data.rb +11 -1
  165. data/lib/datadog_api_client/v2/models/rum_application.rb +166 -0
  166. data/lib/datadog_api_client/v2/models/rum_application_attributes.rb +279 -0
  167. data/lib/datadog_api_client/v2/models/rum_application_create.rb +145 -0
  168. data/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +132 -0
  169. data/lib/datadog_api_client/v2/models/rum_application_create_request.rb +122 -0
  170. data/lib/datadog_api_client/v2/models/rum_application_create_type.rb +26 -0
  171. data/lib/datadog_api_client/v2/models/rum_application_response.rb +111 -0
  172. data/lib/datadog_api_client/v2/models/rum_application_type.rb +26 -0
  173. data/lib/datadog_api_client/v2/models/rum_application_update.rb +155 -0
  174. data/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +121 -0
  175. data/lib/datadog_api_client/v2/models/rum_application_update_request.rb +122 -0
  176. data/lib/datadog_api_client/v2/models/rum_application_update_type.rb +26 -0
  177. data/lib/datadog_api_client/v2/models/rum_applications_response.rb +113 -0
  178. data/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +36 -248
  179. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +36 -151
  180. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
  181. data/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +37 -253
  182. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_create_payload.rb +275 -0
  183. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_query.rb +187 -0
  184. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +279 -0
  185. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_type.rb +26 -0
  186. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +275 -0
  187. data/lib/datadog_api_client/v2/models/{security_monitoring_rule_query_create.rb → security_monitoring_standard_rule_query.rb} +3 -3
  188. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +279 -0
  189. data/lib/datadog_api_client/version.rb +1 -1
  190. metadata +97 -6
  191. data/Makefile +0 -7
  192. data/examples/v2/metrics/ListTagConfigurations_1799362914.rb +0 -8
@@ -0,0 +1,166 @@
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
+ # RUM application.
21
+ class RUMApplication
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # RUM application attributes.
29
+ attr_accessor :attributes
30
+
31
+ # RUM application ID.
32
+ attr_accessor :id
33
+
34
+ # RUM application response type.
35
+ attr_accessor :type
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'attributes' => :'attributes',
42
+ :'id' => :'id',
43
+ :'type' => :'type'
44
+ }
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ # @!visibility private
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ # @!visibility private
55
+ def self.openapi_types
56
+ {
57
+ :'attributes' => :'RUMApplicationAttributes',
58
+ :'id' => :'String',
59
+ :'type' => :'RUMApplicationType'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ # @!visibility private
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param attributes [Hash] Model attributes in the form of hash
72
+ # @!visibility private
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplication` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'attributes')
87
+ self.attributes = attributes[:'attributes']
88
+ end
89
+
90
+ if attributes.key?(:'id')
91
+ self.id = attributes[:'id']
92
+ end
93
+
94
+ if attributes.key?(:'type')
95
+ self.type = attributes[:'type']
96
+ else
97
+ self.type = 'rum_application'
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 @attributes.nil?
106
+ return false if @id.nil?
107
+ return false if @type.nil?
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param attributes [Object] Object to be assigned
113
+ # @!visibility private
114
+ def attributes=(attributes)
115
+ if attributes.nil?
116
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
117
+ end
118
+ @attributes = attributes
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param id [Object] Object to be assigned
123
+ # @!visibility private
124
+ def id=(id)
125
+ if id.nil?
126
+ fail ArgumentError, 'invalid value for "id", id cannot be nil.'
127
+ end
128
+ @id = id
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param type [Object] Object to be assigned
133
+ # @!visibility private
134
+ def type=(type)
135
+ if type.nil?
136
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
137
+ end
138
+ @type = type
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param o [Object] Object to be compared
143
+ # @!visibility private
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ attributes == o.attributes &&
148
+ id == o.id &&
149
+ type == o.type
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param o [Object] Object to be compared
154
+ # @!visibility private
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ # @!visibility private
162
+ def hash
163
+ [attributes, id, type].hash
164
+ end
165
+ end
166
+ end
@@ -0,0 +1,279 @@
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
+ # RUM application attributes.
21
+ class RUMApplicationAttributes
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # ID of the RUM application.
29
+ attr_accessor :application_id
30
+
31
+ # Timestamp in ms of the creation date.
32
+ attr_accessor :created_at
33
+
34
+ # Handle of the creator user.
35
+ attr_accessor :created_by_handle
36
+
37
+ # Client token of the RUM application.
38
+ attr_accessor :hash
39
+
40
+ # Name of the RUM application.
41
+ attr_accessor :name
42
+
43
+ # Org ID of the RUM application.
44
+ attr_accessor :org_id
45
+
46
+ # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`.
47
+ attr_accessor :type
48
+
49
+ # Timestamp in ms of the last update date.
50
+ attr_accessor :updated_at
51
+
52
+ # Handle of the updater user.
53
+ attr_accessor :updated_by_handle
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ # @!visibility private
57
+ def self.attribute_map
58
+ {
59
+ :'application_id' => :'application_id',
60
+ :'created_at' => :'created_at',
61
+ :'created_by_handle' => :'created_by_handle',
62
+ :'hash' => :'hash',
63
+ :'name' => :'name',
64
+ :'org_id' => :'org_id',
65
+ :'type' => :'type',
66
+ :'updated_at' => :'updated_at',
67
+ :'updated_by_handle' => :'updated_by_handle'
68
+ }
69
+ end
70
+
71
+ # Returns all the JSON keys this model knows about
72
+ # @!visibility private
73
+ def self.acceptable_attributes
74
+ attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ # @!visibility private
79
+ def self.openapi_types
80
+ {
81
+ :'application_id' => :'String',
82
+ :'created_at' => :'Integer',
83
+ :'created_by_handle' => :'String',
84
+ :'hash' => :'String',
85
+ :'name' => :'String',
86
+ :'org_id' => :'Integer',
87
+ :'type' => :'String',
88
+ :'updated_at' => :'Integer',
89
+ :'updated_by_handle' => :'String'
90
+ }
91
+ end
92
+
93
+ # List of attributes with nullable: true
94
+ # @!visibility private
95
+ def self.openapi_nullable
96
+ Set.new([
97
+ ])
98
+ end
99
+
100
+ # Initializes the object
101
+ # @param attributes [Hash] Model attributes in the form of hash
102
+ # @!visibility private
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationAttributes` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'application_id')
117
+ self.application_id = attributes[:'application_id']
118
+ end
119
+
120
+ if attributes.key?(:'created_at')
121
+ self.created_at = attributes[:'created_at']
122
+ end
123
+
124
+ if attributes.key?(:'created_by_handle')
125
+ self.created_by_handle = attributes[:'created_by_handle']
126
+ end
127
+
128
+ if attributes.key?(:'hash')
129
+ self.hash = attributes[:'hash']
130
+ end
131
+
132
+ if attributes.key?(:'name')
133
+ self.name = attributes[:'name']
134
+ end
135
+
136
+ if attributes.key?(:'org_id')
137
+ self.org_id = attributes[:'org_id']
138
+ end
139
+
140
+ if attributes.key?(:'type')
141
+ self.type = attributes[:'type']
142
+ end
143
+
144
+ if attributes.key?(:'updated_at')
145
+ self.updated_at = attributes[:'updated_at']
146
+ end
147
+
148
+ if attributes.key?(:'updated_by_handle')
149
+ self.updated_by_handle = attributes[:'updated_by_handle']
150
+ end
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ # @!visibility private
156
+ def valid?
157
+ return false if @application_id.nil?
158
+ return false if @created_at.nil?
159
+ return false if @created_by_handle.nil?
160
+ return false if @name.nil?
161
+ return false if @org_id.nil?
162
+ return false if @type.nil?
163
+ return false if @updated_at.nil?
164
+ return false if @updated_by_handle.nil?
165
+ true
166
+ end
167
+
168
+ # Custom attribute writer method with validation
169
+ # @param application_id [Object] Object to be assigned
170
+ # @!visibility private
171
+ def application_id=(application_id)
172
+ if application_id.nil?
173
+ fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.'
174
+ end
175
+ @application_id = application_id
176
+ end
177
+
178
+ # Custom attribute writer method with validation
179
+ # @param created_at [Object] Object to be assigned
180
+ # @!visibility private
181
+ def created_at=(created_at)
182
+ if created_at.nil?
183
+ fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.'
184
+ end
185
+ @created_at = created_at
186
+ end
187
+
188
+ # Custom attribute writer method with validation
189
+ # @param created_by_handle [Object] Object to be assigned
190
+ # @!visibility private
191
+ def created_by_handle=(created_by_handle)
192
+ if created_by_handle.nil?
193
+ fail ArgumentError, 'invalid value for "created_by_handle", created_by_handle cannot be nil.'
194
+ end
195
+ @created_by_handle = created_by_handle
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param name [Object] Object to be assigned
200
+ # @!visibility private
201
+ def name=(name)
202
+ if name.nil?
203
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
204
+ end
205
+ @name = name
206
+ end
207
+
208
+ # Custom attribute writer method with validation
209
+ # @param org_id [Object] Object to be assigned
210
+ # @!visibility private
211
+ def org_id=(org_id)
212
+ if org_id.nil?
213
+ fail ArgumentError, 'invalid value for "org_id", org_id cannot be nil.'
214
+ end
215
+ @org_id = org_id
216
+ end
217
+
218
+ # Custom attribute writer method with validation
219
+ # @param type [Object] Object to be assigned
220
+ # @!visibility private
221
+ def type=(type)
222
+ if type.nil?
223
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
224
+ end
225
+ @type = type
226
+ end
227
+
228
+ # Custom attribute writer method with validation
229
+ # @param updated_at [Object] Object to be assigned
230
+ # @!visibility private
231
+ def updated_at=(updated_at)
232
+ if updated_at.nil?
233
+ fail ArgumentError, 'invalid value for "updated_at", updated_at cannot be nil.'
234
+ end
235
+ @updated_at = updated_at
236
+ end
237
+
238
+ # Custom attribute writer method with validation
239
+ # @param updated_by_handle [Object] Object to be assigned
240
+ # @!visibility private
241
+ def updated_by_handle=(updated_by_handle)
242
+ if updated_by_handle.nil?
243
+ fail ArgumentError, 'invalid value for "updated_by_handle", updated_by_handle cannot be nil.'
244
+ end
245
+ @updated_by_handle = updated_by_handle
246
+ end
247
+
248
+ # Checks equality by comparing each attribute.
249
+ # @param o [Object] Object to be compared
250
+ # @!visibility private
251
+ def ==(o)
252
+ return true if self.equal?(o)
253
+ self.class == o.class &&
254
+ application_id == o.application_id &&
255
+ created_at == o.created_at &&
256
+ created_by_handle == o.created_by_handle &&
257
+ hash == o.hash &&
258
+ name == o.name &&
259
+ org_id == o.org_id &&
260
+ type == o.type &&
261
+ updated_at == o.updated_at &&
262
+ updated_by_handle == o.updated_by_handle
263
+ end
264
+
265
+ # @see the `==` method
266
+ # @param o [Object] Object to be compared
267
+ # @!visibility private
268
+ def eql?(o)
269
+ self == o
270
+ end
271
+
272
+ # Calculates hash code according to all attributes.
273
+ # @return [Integer] Hash code
274
+ # @!visibility private
275
+ def hash
276
+ [application_id, created_at, created_by_handle, hash, name, org_id, type, updated_at, updated_by_handle].hash
277
+ end
278
+ end
279
+ end
@@ -0,0 +1,145 @@
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
+ # RUM application creation.
21
+ class RUMApplicationCreate
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # RUM application creation attributes.
29
+ attr_accessor :attributes
30
+
31
+ # RUM application creation type.
32
+ attr_accessor :type
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'attributes' => :'attributes',
39
+ :'type' => :'type'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ # @!visibility private
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'attributes' => :'RUMApplicationCreateAttributes',
54
+ :'type' => :'RUMApplicationCreateType'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ # @!visibility private
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param attributes [Hash] Model attributes in the form of hash
67
+ # @!visibility private
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationCreate` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::RUMApplicationCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'attributes')
82
+ self.attributes = attributes[:'attributes']
83
+ end
84
+
85
+ if attributes.key?(:'type')
86
+ self.type = attributes[:'type']
87
+ else
88
+ self.type = 'rum_application_create'
89
+ end
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ # @!visibility private
95
+ def valid?
96
+ return false if @attributes.nil?
97
+ return false if @type.nil?
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param attributes [Object] Object to be assigned
103
+ # @!visibility private
104
+ def attributes=(attributes)
105
+ if attributes.nil?
106
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
107
+ end
108
+ @attributes = attributes
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param type [Object] Object to be assigned
113
+ # @!visibility private
114
+ def type=(type)
115
+ if type.nil?
116
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
117
+ end
118
+ @type = type
119
+ end
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param o [Object] Object to be compared
123
+ # @!visibility private
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ attributes == o.attributes &&
128
+ type == o.type
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param o [Object] Object to be compared
133
+ # @!visibility private
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ # @!visibility private
141
+ def hash
142
+ [attributes, type].hash
143
+ end
144
+ end
145
+ end