datadog_api_client 2.47.0 → 2.48.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 (165) hide show
  1. checksums.yaml +4 -4
  2. data/.generator/schemas/v1/openapi.yaml +96 -5
  3. data/.generator/schemas/v2/openapi.yaml +2453 -707
  4. data/CHANGELOG.md +20 -0
  5. data/examples/v2/incidents/CreateIncidentAttachment.rb +22 -0
  6. data/examples/v2/incidents/DeleteIncidentAttachment.rb +8 -0
  7. data/examples/v2/incidents/ListIncidentAttachments.rb +1 -1
  8. data/examples/v2/incidents/UpdateIncidentAttachment.rb +20 -0
  9. data/examples/v2/on-call/CreateUserNotificationRule.rb +29 -0
  10. data/examples/v2/on-call/DeleteUserNotificationRule.rb +11 -0
  11. data/examples/v2/on-call/GetUserNotificationRule.rb +14 -0
  12. data/examples/v2/on-call/ListUserNotificationRules.rb +11 -0
  13. data/examples/v2/on-call/UpdateUserNotificationRule.rb +36 -0
  14. data/examples/v2/product-analytics/SubmitProductAnalyticsEvent.rb +24 -0
  15. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_2323193894.rb +48 -0
  16. data/examples/v2/synthetics/PatchGlobalVariable.rb +19 -0
  17. data/examples/v2/teams/CreateTeamNotificationRule.rb +23 -0
  18. data/examples/v2/teams/DeleteTeamConnections.rb +0 -3
  19. data/examples/v2/teams/DeleteTeamNotificationRule.rb +11 -0
  20. data/examples/v2/teams/GetTeamNotificationRule.rb +11 -0
  21. data/examples/v2/teams/GetTeamNotificationRules.rb +8 -0
  22. data/examples/v2/teams/GetTeamSync.rb +0 -3
  23. data/examples/v2/teams/ListTeamConnections.rb +0 -3
  24. data/examples/v2/teams/ListTeamConnections_2418873869.rb +0 -3
  25. data/examples/v2/teams/SyncTeams.rb +0 -3
  26. data/examples/v2/teams/SyncTeams_3215592344.rb +0 -3
  27. data/examples/v2/teams/UpdateTeamNotificationRule.rb +27 -0
  28. data/lib/datadog_api_client/configuration.rb +55 -6
  29. data/lib/datadog_api_client/inflector.rb +92 -20
  30. data/lib/datadog_api_client/v1/api/synthetics_api.rb +3 -3
  31. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -4
  32. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
  33. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
  34. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
  35. data/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb +1 -1
  36. data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +1 -1
  37. data/lib/datadog_api_client/v1/models/synthetics_test_details_without_steps.rb +221 -0
  38. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +8 -8
  39. data/lib/datadog_api_client/v2/api/incidents_api.rb +188 -36
  40. data/lib/datadog_api_client/v2/api/on_call_api.rb +360 -0
  41. data/lib/datadog_api_client/v2/api/product_analytics_api.rb +121 -0
  42. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +4 -0
  43. data/lib/datadog_api_client/v2/api/synthetics_api.rb +79 -0
  44. data/lib/datadog_api_client/v2/api/teams_api.rb +339 -30
  45. data/lib/datadog_api_client/v2/models/attachment.rb +117 -0
  46. data/lib/datadog_api_client/v2/models/{incident_attachments_response.rb → attachment_array.rb} +7 -7
  47. data/lib/datadog_api_client/v2/models/{incident_attachment_data.rb → attachment_data.rb} +8 -8
  48. data/lib/datadog_api_client/v2/models/attachment_data_attributes.rb +125 -0
  49. data/lib/datadog_api_client/v2/models/attachment_data_attributes_attachment.rb +115 -0
  50. data/lib/datadog_api_client/v2/models/{incident_attachment_attachment_type.rb → attachment_data_attributes_attachment_type.rb} +3 -3
  51. data/lib/datadog_api_client/v2/models/{incident_attachment_relationships.rb → attachment_data_relationships.rb} +5 -5
  52. data/lib/datadog_api_client/v2/models/{incident_attachment_update_request.rb → attachment_data_relationships_last_modified_by_user.rb} +6 -11
  53. data/lib/datadog_api_client/v2/models/attachment_data_relationships_last_modified_by_user_data.rb +144 -0
  54. data/lib/datadog_api_client/v2/models/{incident_attachments_response_included_item.rb → attachment_included.rb} +3 -3
  55. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +11 -1
  56. data/lib/datadog_api_client/v2/models/{dora_fetch_response.rb → create_attachment_request.rb} +5 -5
  57. data/lib/datadog_api_client/v2/models/{incident_attachment_update_data.rb → create_attachment_request_data.rb} +6 -6
  58. data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes.rb +115 -0
  59. data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes_attachment.rb +115 -0
  60. data/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request.rb +123 -0
  61. data/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb +143 -0
  62. data/lib/datadog_api_client/v2/models/custom_attribute_type.rb +1 -0
  63. data/lib/datadog_api_client/v2/models/dora_deployment_fetch_response.rb +105 -0
  64. data/lib/datadog_api_client/v2/models/dora_deployment_object.rb +125 -0
  65. data/lib/datadog_api_client/v2/models/dora_deployment_object_attributes.rb +225 -0
  66. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
  67. data/lib/datadog_api_client/v2/models/dora_deployments_list_response.rb +107 -0
  68. data/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb +105 -0
  69. data/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +1 -1
  70. data/lib/datadog_api_client/v2/models/{dora_list_response.rb → dora_failures_list_response.rb} +5 -5
  71. data/lib/datadog_api_client/v2/models/{dora_event.rb → dora_incident_object.rb} +8 -8
  72. data/lib/datadog_api_client/v2/models/dora_incident_object_attributes.rb +225 -0
  73. data/lib/datadog_api_client/v2/models/global_variable_data.rb +125 -0
  74. data/lib/datadog_api_client/v2/models/global_variable_json_patch_request.rb +123 -0
  75. data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data.rb +115 -0
  76. data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data_attributes.rb +107 -0
  77. data/lib/datadog_api_client/v2/models/global_variable_json_patch_type.rb +26 -0
  78. data/lib/datadog_api_client/v2/models/global_variable_response.rb +105 -0
  79. data/lib/datadog_api_client/v2/models/{incident_attachment_link_attachment_type.rb → global_variable_type.rb} +3 -3
  80. data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
  81. data/lib/datadog_api_client/v2/models/{incident_attachments_postmortem_attributes_attachment_object.rb → json_patch_operation.rb} +40 -30
  82. data/lib/datadog_api_client/v2/models/json_patch_operation_op.rb +31 -0
  83. data/lib/datadog_api_client/v2/models/list_on_call_notification_rules_response.rb +119 -0
  84. data/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb +11 -1
  85. data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +11 -1
  86. data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb +11 -1
  87. data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb +11 -1
  88. data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb +11 -1
  89. data/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb +11 -1
  90. data/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb +11 -1
  91. data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +11 -1
  92. data/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb +11 -1
  93. data/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb +11 -1
  94. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb +11 -1
  95. data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +11 -1
  96. data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +11 -1
  97. data/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb +11 -1
  98. data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +11 -1
  99. data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +11 -1
  100. data/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +11 -1
  101. data/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb +11 -1
  102. data/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb +11 -1
  103. data/lib/datadog_api_client/v2/models/{incident_attachment_update_response.rb → on_call_notification_rule.rb} +8 -11
  104. data/lib/datadog_api_client/v2/models/on_call_notification_rule_attributes.rb +125 -0
  105. data/lib/datadog_api_client/v2/models/on_call_notification_rule_category.rb +27 -0
  106. data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship.rb +123 -0
  107. data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb +115 -0
  108. data/lib/datadog_api_client/v2/models/{incident_attachment_update_attributes.rb → on_call_notification_rule_channel_settings.rb} +3 -4
  109. data/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb +153 -0
  110. data/lib/datadog_api_client/v2/models/on_call_notification_rule_relationships.rb +105 -0
  111. data/lib/datadog_api_client/v2/models/on_call_notification_rule_request_attributes.rb +125 -0
  112. data/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb +26 -0
  113. data/lib/datadog_api_client/v2/models/{incident_attachment_attributes.rb → on_call_notification_rules_included.rb} +3 -4
  114. data/lib/datadog_api_client/v2/models/on_call_phone_notification_rule_method.rb +27 -0
  115. data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes_attachment_object.rb → on_call_phone_notification_rule_settings.rb} +30 -30
  116. data/lib/datadog_api_client/v2/models/patch_attachment_request.rb +105 -0
  117. data/lib/datadog_api_client/v2/models/patch_attachment_request_data.rb +143 -0
  118. data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes.rb +105 -0
  119. data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes_attachment.rb +115 -0
  120. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_error.rb +125 -0
  121. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_errors.rb +107 -0
  122. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item.rb +195 -0
  123. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_account.rb +123 -0
  124. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_application.rb +124 -0
  125. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_event.rb +123 -0
  126. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_session.rb +123 -0
  127. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_type.rb +26 -0
  128. data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_usr.rb +123 -0
  129. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options.rb +155 -0
  130. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_bucket_duration.rb +32 -0
  131. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_detection_tolerance.rb +31 -0
  132. data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_learning_duration.rb +32 -0
  133. data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
  134. data/lib/datadog_api_client/v2/models/synthetics_global_variable.rb +248 -0
  135. data/lib/datadog_api_client/v2/models/synthetics_global_variable_attributes.rb +107 -0
  136. data/lib/datadog_api_client/v2/models/synthetics_global_variable_options.rb +105 -0
  137. data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attributes.rb → synthetics_global_variable_parse_test_options.rb} +44 -35
  138. data/lib/datadog_api_client/v2/models/synthetics_global_variable_parse_test_options_type.rb +29 -0
  139. data/lib/datadog_api_client/v2/models/synthetics_global_variable_parser_type.rb +29 -0
  140. data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes.rb → synthetics_global_variable_totp_parameters.rb} +38 -40
  141. data/lib/datadog_api_client/v2/models/synthetics_global_variable_value.rb +126 -0
  142. data/lib/datadog_api_client/v2/models/synthetics_variable_parser.rb +133 -0
  143. data/lib/datadog_api_client/v2/models/team_notification_rule.rb +154 -0
  144. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes.rb +135 -0
  145. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_email.rb +105 -0
  146. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_ms_teams.rb +105 -0
  147. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_pagerduty.rb +105 -0
  148. data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_slack.rb +115 -0
  149. data/lib/datadog_api_client/v2/models/team_notification_rule_request.rb +123 -0
  150. data/lib/datadog_api_client/v2/models/team_notification_rule_response.rb +105 -0
  151. data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attachment_type.rb → team_notification_rule_type.rb} +3 -3
  152. data/lib/datadog_api_client/v2/models/team_notification_rules_response.rb +117 -0
  153. data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta.rb +105 -0
  154. data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta_page.rb +184 -0
  155. data/lib/datadog_api_client/v2/models/threat_hunting_job_options.rb +11 -1
  156. data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request.rb +123 -0
  157. data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_attributes.rb +125 -0
  158. data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb +153 -0
  159. data/lib/datadog_api_client/v2/models/user140420082644000.rb +143 -0
  160. data/lib/datadog_api_client/v2/models/{incident_attachment_related_object.rb → user_type.rb} +2 -2
  161. data/lib/datadog_api_client/version.rb +1 -1
  162. metadata +109 -24
  163. data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +0 -11
  164. data/examples/v2/incidents/UpdateIncidentAttachments.rb +0 -38
  165. data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +0 -26
@@ -0,0 +1,125 @@
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 DORA deployment event.
21
+ class DORADeploymentObject
22
+ include BaseGenericModel
23
+
24
+ # The attributes of the deployment event.
25
+ attr_accessor :attributes
26
+
27
+ # The ID of the deployment event.
28
+ attr_accessor :id
29
+
30
+ # JSON:API type for DORA deployment events.
31
+ attr_accessor :type
32
+
33
+ attr_accessor :additional_properties
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'attributes' => :'attributes',
40
+ :'id' => :'id',
41
+ :'type' => :'type'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'attributes' => :'DORADeploymentObjectAttributes',
50
+ :'id' => :'String',
51
+ :'type' => :'DORADeploymentType'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param attributes [Hash] Model attributes in the form of hash
57
+ # @!visibility private
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentObject` initialize method"
61
+ end
62
+
63
+ self.additional_properties = {}
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ self.additional_properties[k.to_sym] = v
68
+ else
69
+ h[k.to_sym] = v
70
+ end
71
+ }
72
+
73
+ if attributes.key?(:'attributes')
74
+ self.attributes = attributes[:'attributes']
75
+ end
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ end
80
+
81
+ if attributes.key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+ end
85
+
86
+ # Returns the object in the form of hash, with additionalProperties support.
87
+ # @return [Hash] Returns the object in the form of hash
88
+ # @!visibility private
89
+ def to_hash
90
+ hash = {}
91
+ self.class.attribute_map.each_pair do |attr, param|
92
+ value = self.send(attr)
93
+ if value.nil?
94
+ is_nullable = self.class.openapi_nullable.include?(attr)
95
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
96
+ end
97
+
98
+ hash[param] = _to_hash(value)
99
+ end
100
+ self.additional_properties.each_pair do |attr, value|
101
+ hash[attr] = value
102
+ end
103
+ hash
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param o [Object] Object to be compared
108
+ # @!visibility private
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ attributes == o.attributes &&
113
+ id == o.id &&
114
+ type == o.type &&
115
+ additional_properties == o.additional_properties
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ # @!visibility private
121
+ def hash
122
+ [attributes, id, type, additional_properties].hash
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,225 @@
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 deployment event.
21
+ class DORADeploymentObjectAttributes
22
+ include BaseGenericModel
23
+
24
+ # A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
25
+ attr_accessor :custom_tags
26
+
27
+ # Environment name to where the service was deployed.
28
+ attr_accessor :env
29
+
30
+ # Unix timestamp when the deployment finished.
31
+ attr_reader :finished_at
32
+
33
+ # Git info for DORA Metrics events.
34
+ attr_accessor :git
35
+
36
+ # Service name.
37
+ attr_reader :service
38
+
39
+ # Unix timestamp when the deployment started.
40
+ attr_reader :started_at
41
+
42
+ # Name of the team owning the deployed service.
43
+ attr_accessor :team
44
+
45
+ # Version to correlate with APM Deployment Tracking.
46
+ attr_accessor :version
47
+
48
+ attr_accessor :additional_properties
49
+
50
+ # Attribute mapping from ruby-style variable name to JSON key.
51
+ # @!visibility private
52
+ def self.attribute_map
53
+ {
54
+ :'custom_tags' => :'custom_tags',
55
+ :'env' => :'env',
56
+ :'finished_at' => :'finished_at',
57
+ :'git' => :'git',
58
+ :'service' => :'service',
59
+ :'started_at' => :'started_at',
60
+ :'team' => :'team',
61
+ :'version' => :'version'
62
+ }
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ # @!visibility private
67
+ def self.openapi_types
68
+ {
69
+ :'custom_tags' => :'Array<String>',
70
+ :'env' => :'String',
71
+ :'finished_at' => :'Integer',
72
+ :'git' => :'DORAGitInfo',
73
+ :'service' => :'String',
74
+ :'started_at' => :'Integer',
75
+ :'team' => :'String',
76
+ :'version' => :'String'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ # @!visibility private
82
+ def self.openapi_nullable
83
+ Set.new([
84
+ :'custom_tags',
85
+ ])
86
+ end
87
+
88
+ # Initializes the object
89
+ # @param attributes [Hash] Model attributes in the form of hash
90
+ # @!visibility private
91
+ def initialize(attributes = {})
92
+ if (!attributes.is_a?(Hash))
93
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentObjectAttributes` initialize method"
94
+ end
95
+
96
+ self.additional_properties = {}
97
+ # check to see if the attribute exists and convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!self.class.attribute_map.key?(k.to_sym))
100
+ self.additional_properties[k.to_sym] = v
101
+ else
102
+ h[k.to_sym] = v
103
+ end
104
+ }
105
+
106
+ if attributes.key?(:'custom_tags')
107
+ if (value = attributes[:'custom_tags']).is_a?(Array)
108
+ self.custom_tags = value
109
+ end
110
+ end
111
+
112
+ if attributes.key?(:'env')
113
+ self.env = attributes[:'env']
114
+ end
115
+
116
+ if attributes.key?(:'finished_at')
117
+ self.finished_at = attributes[:'finished_at']
118
+ end
119
+
120
+ if attributes.key?(:'git')
121
+ self.git = attributes[:'git']
122
+ end
123
+
124
+ if attributes.key?(:'service')
125
+ self.service = attributes[:'service']
126
+ end
127
+
128
+ if attributes.key?(:'started_at')
129
+ self.started_at = attributes[:'started_at']
130
+ end
131
+
132
+ if attributes.key?(:'team')
133
+ self.team = attributes[:'team']
134
+ end
135
+
136
+ if attributes.key?(:'version')
137
+ self.version = attributes[:'version']
138
+ end
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ # @!visibility private
144
+ def valid?
145
+ return false if @finished_at.nil?
146
+ return false if @service.nil?
147
+ return false if @started_at.nil?
148
+ true
149
+ end
150
+
151
+ # Custom attribute writer method with validation
152
+ # @param finished_at [Object] Object to be assigned
153
+ # @!visibility private
154
+ def finished_at=(finished_at)
155
+ if finished_at.nil?
156
+ fail ArgumentError, 'invalid value for "finished_at", finished_at cannot be nil.'
157
+ end
158
+ @finished_at = finished_at
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param service [Object] Object to be assigned
163
+ # @!visibility private
164
+ def service=(service)
165
+ if service.nil?
166
+ fail ArgumentError, 'invalid value for "service", service cannot be nil.'
167
+ end
168
+ @service = service
169
+ end
170
+
171
+ # Custom attribute writer method with validation
172
+ # @param started_at [Object] Object to be assigned
173
+ # @!visibility private
174
+ def started_at=(started_at)
175
+ if started_at.nil?
176
+ fail ArgumentError, 'invalid value for "started_at", started_at cannot be nil.'
177
+ end
178
+ @started_at = started_at
179
+ end
180
+
181
+ # Returns the object in the form of hash, with additionalProperties support.
182
+ # @return [Hash] Returns the object in the form of hash
183
+ # @!visibility private
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ self.additional_properties.each_pair do |attr, value|
196
+ hash[attr] = value
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Checks equality by comparing each attribute.
202
+ # @param o [Object] Object to be compared
203
+ # @!visibility private
204
+ def ==(o)
205
+ return true if self.equal?(o)
206
+ self.class == o.class &&
207
+ custom_tags == o.custom_tags &&
208
+ env == o.env &&
209
+ finished_at == o.finished_at &&
210
+ git == o.git &&
211
+ service == o.service &&
212
+ started_at == o.started_at &&
213
+ team == o.team &&
214
+ version == o.version &&
215
+ additional_properties == o.additional_properties
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ # @!visibility private
221
+ def hash
222
+ [custom_tags, env, finished_at, git, service, started_at, team, version, additional_properties].hash
223
+ end
224
+ end
225
+ end
@@ -33,7 +33,7 @@ module DatadogAPIClient::V2
33
33
  # Git info for DORA Metrics events.
34
34
  attr_accessor :git
35
35
 
36
- # Deployment ID.
36
+ # Deployment ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :).
37
37
  attr_accessor :id
38
38
 
39
39
  # Service name.
@@ -0,0 +1,107 @@
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
+ # Response for the list deployments endpoint.
21
+ class DORADeploymentsListResponse
22
+ include BaseGenericModel
23
+
24
+ # The list of DORA deployment events.
25
+ attr_accessor :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'Array<DORADeploymentObject>'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORADeploymentsListResponse` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ if (value = attributes[:'data']).is_a?(Array)
65
+ self.data = value
66
+ end
67
+ end
68
+ end
69
+
70
+ # Returns the object in the form of hash, with additionalProperties support.
71
+ # @return [Hash] Returns the object in the form of hash
72
+ # @!visibility private
73
+ def to_hash
74
+ hash = {}
75
+ self.class.attribute_map.each_pair do |attr, param|
76
+ value = self.send(attr)
77
+ if value.nil?
78
+ is_nullable = self.class.openapi_nullable.include?(attr)
79
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
80
+ end
81
+
82
+ hash[param] = _to_hash(value)
83
+ end
84
+ self.additional_properties.each_pair do |attr, value|
85
+ hash[attr] = value
86
+ end
87
+ hash
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param o [Object] Object to be compared
92
+ # @!visibility private
93
+ def ==(o)
94
+ return true if self.equal?(o)
95
+ self.class == o.class &&
96
+ data == o.data &&
97
+ additional_properties == o.additional_properties
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ # @!visibility private
103
+ def hash
104
+ [data, additional_properties].hash
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,105 @@
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
+ # Response for fetching a single failure event.
21
+ class DORAFailureFetchResponse
22
+ include BaseGenericModel
23
+
24
+ # A DORA incident event.
25
+ attr_accessor :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'DORAIncidentObject'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAFailureFetchResponse` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ data == o.data &&
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [data, additional_properties].hash
103
+ end
104
+ end
105
+ end
@@ -33,7 +33,7 @@ module DatadogAPIClient::V2
33
33
  # Git info for DORA Metrics events.
34
34
  attr_accessor :git
35
35
 
36
- # Failure ID. Must have at least 16 characters. Required to update a previously sent failure.
36
+ # Failure ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :).
37
37
  attr_accessor :id
38
38
 
39
39
  # Failure name.
@@ -17,11 +17,11 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Response for the DORA list endpoints.
21
- class DORAListResponse
20
+ # Response for the list failures endpoint.
21
+ class DORAFailuresListResponse
22
22
  include BaseGenericModel
23
23
 
24
- # The list of DORA events.
24
+ # The list of DORA incident events.
25
25
  attr_accessor :data
26
26
 
27
27
  attr_accessor :additional_properties
@@ -38,7 +38,7 @@ module DatadogAPIClient::V2
38
38
  # @!visibility private
39
39
  def self.openapi_types
40
40
  {
41
- :'data' => :'Array<DORAEvent>'
41
+ :'data' => :'Array<DORAIncidentObject>'
42
42
  }
43
43
  end
44
44
 
@@ -47,7 +47,7 @@ module DatadogAPIClient::V2
47
47
  # @!visibility private
48
48
  def initialize(attributes = {})
49
49
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAListResponse` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAFailuresListResponse` initialize method"
51
51
  end
52
52
 
53
53
  self.additional_properties = {}
@@ -17,17 +17,17 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # A DORA event.
21
- class DORAEvent
20
+ # A DORA incident event.
21
+ class DORAIncidentObject
22
22
  include BaseGenericModel
23
23
 
24
- # The attributes of the event.
24
+ # The attributes of the incident event.
25
25
  attr_accessor :attributes
26
26
 
27
- # The ID of the event.
27
+ # The ID of the incident event.
28
28
  attr_accessor :id
29
29
 
30
- # The type of the event.
30
+ # JSON:API type for DORA failure events.
31
31
  attr_accessor :type
32
32
 
33
33
  attr_accessor :additional_properties
@@ -46,9 +46,9 @@ module DatadogAPIClient::V2
46
46
  # @!visibility private
47
47
  def self.openapi_types
48
48
  {
49
- :'attributes' => :'Object',
49
+ :'attributes' => :'DORAIncidentObjectAttributes',
50
50
  :'id' => :'String',
51
- :'type' => :'String'
51
+ :'type' => :'DORAFailureType'
52
52
  }
53
53
  end
54
54
 
@@ -57,7 +57,7 @@ module DatadogAPIClient::V2
57
57
  # @!visibility private
58
58
  def initialize(attributes = {})
59
59
  if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAEvent` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DORAIncidentObject` initialize method"
61
61
  end
62
62
 
63
63
  self.additional_properties = {}