datadog_api_client 2.26.1 → 2.27.1

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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +2152 -10
  4. data/.generator/schemas/v2/openapi.yaml +1771 -41
  5. data/.generator/src/generator/formatter.py +1 -1
  6. data/.github/workflows/approved_status.yml +4 -0
  7. data/.github/workflows/changelog.yml +5 -0
  8. data/.github/workflows/codeql-analysis.yml +4 -0
  9. data/.github/workflows/docs.yml +3 -0
  10. data/.github/workflows/labeler.yml +5 -0
  11. data/.github/workflows/prepare_release.yml +4 -0
  12. data/.github/workflows/publish.yml +5 -0
  13. data/.github/workflows/release.yml +4 -0
  14. data/.github/workflows/stale.yml +6 -0
  15. data/.github/workflows/test.yml +3 -0
  16. data/.github/workflows/test_integration.yml +3 -0
  17. data/CHANGELOG.md +27 -0
  18. data/examples/v1/dashboards/CreateDashboard_1433408735.rb +44 -0
  19. data/examples/v1/dashboards/CreateDashboard_794302680.rb +152 -0
  20. data/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.rb +1 -1
  21. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +1 -1
  22. data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +1 -1
  23. data/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.rb +1 -1
  24. data/examples/v1/synthetics/CreateSyntheticsMobileTest.rb +27 -0
  25. data/examples/v1/synthetics/FetchUptimes.rb +13 -0
  26. data/examples/v1/synthetics/GetMobileTest.rb +8 -0
  27. data/examples/v1/synthetics/UpdateMobileTest.rb +30 -0
  28. data/examples/v2/logs/AggregateLogs_2955613758.rb +0 -1
  29. data/examples/v2/microsoft-teams-integration/CreateApiHandle.rb +17 -0
  30. data/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.rb +17 -0
  31. data/examples/v2/microsoft-teams-integration/DeleteApiHandle.rb +5 -0
  32. data/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb +8 -0
  33. data/examples/v2/microsoft-teams-integration/GetApiHandle.rb +5 -0
  34. data/examples/v2/microsoft-teams-integration/GetApiHandleByName.rb +5 -0
  35. data/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb +8 -0
  36. data/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb +8 -0
  37. data/examples/v2/microsoft-teams-integration/GetChannelByName.rb +5 -0
  38. data/examples/v2/microsoft-teams-integration/ListApiHandles.rb +5 -0
  39. data/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.rb +5 -0
  40. data/examples/v2/microsoft-teams-integration/UpdateApiHandle.rb +17 -0
  41. data/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb +18 -0
  42. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +9 -0
  43. data/lib/datadog_api_client/inflector.rb +51 -0
  44. data/lib/datadog_api_client/v1/api/synthetics_api.rb +272 -0
  45. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  46. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  47. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  48. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +11 -1
  49. data/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/synthetics_fetch_uptimes_payload.rb +167 -0
  51. data/lib/datadog_api_client/v1/models/synthetics_mobile_device_id.rb +251 -0
  52. data/lib/datadog_api_client/v1/models/synthetics_mobile_step.rb +203 -0
  53. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_type.rb +42 -0
  54. data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +263 -0
  55. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding.rb +105 -0
  56. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items.rb +117 -0
  57. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items_role.rb +27 -0
  58. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_ci_options.rb +123 -0
  59. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_config.rb +117 -0
  60. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments.rb +105 -0
  61. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments_property_names.rb +105 -0
  62. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options.rb +354 -0
  63. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options.rb +155 -0
  64. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options_notification_preset_name.rb +29 -0
  65. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_type.rb +26 -0
  66. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application.rb +154 -0
  67. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application_reference_type.rb +27 -0
  68. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
  69. data/lib/datadog_api_client/v1/models/synthetics_test_request_port.rb +63 -0
  70. data/lib/datadog_api_client/v1/models/synthetics_test_uptime.rb +135 -0
  71. data/lib/datadog_api_client/v1/models/synthetics_uptime.rb +161 -0
  72. data/lib/datadog_api_client/v1/models/table_widget_request.rb +16 -4
  73. data/lib/datadog_api_client/v1/models/table_widget_text_format_match.rb +144 -0
  74. data/lib/datadog_api_client/v1/models/table_widget_text_format_match_type.rb +31 -0
  75. data/lib/datadog_api_client/v1/models/table_widget_text_format_palette.rb +36 -0
  76. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace.rb +63 -0
  77. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all.rb +144 -0
  78. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all_type.rb +26 -0
  79. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring.rb +165 -0
  80. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring_type.rb +26 -0
  81. data/lib/datadog_api_client/v1/models/table_widget_text_format_rule.rb +163 -0
  82. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +31 -1
  83. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
  84. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
  85. data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +3 -3
  86. data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
  87. data/lib/datadog_api_client/v2/api/metrics_api.rb +4 -4
  88. data/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +497 -0
  89. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +3 -3
  90. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  91. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  92. data/lib/datadog_api_client/v2/models/fastly_services_response.rb +1 -1
  93. data/lib/datadog_api_client/v2/models/incident_notification_handle.rb +1 -1
  94. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -1
  95. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -1
  96. data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_type_category.rb +27 -0
  97. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_attributes.rb +186 -0
  99. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb +105 -0
  100. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_attributes.rb +249 -0
  101. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_data.rb +147 -0
  102. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_type.rb +26 -0
  103. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_attributes.rb +202 -0
  104. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_data.rb +144 -0
  105. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_response_data.rb +147 -0
  106. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_type.rb +26 -0
  107. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handles_response.rb +125 -0
  108. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_attributes.rb +165 -0
  109. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_data.rb +147 -0
  110. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_request.rb +123 -0
  112. data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_response.rb +123 -0
  113. data/lib/datadog_api_client/v2/models/microsoft_teams_get_channel_by_name_response.rb +105 -0
  114. data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request.rb +123 -0
  115. data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request_data.rb +144 -0
  116. data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +35 -4
  117. data/lib/datadog_api_client/v2/models/security_monitoring_reference_table.rb +145 -0
  118. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
  119. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
  120. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +13 -1
  121. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
  122. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +13 -1
  123. data/lib/datadog_api_client/v2/models/team_update_attributes.rb +1 -26
  124. data/lib/datadog_api_client/version.rb +1 -1
  125. metadata +72 -2
@@ -0,0 +1,155 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # Object containing the options for a mobile Synthetic test as a monitor
21
+ # (for example, renotification).
22
+ class SyntheticsMobileTestOptionsMonitorOptions
23
+ include BaseGenericModel
24
+
25
+ # Message to include in the escalation notification.
26
+ attr_accessor :escalation_message
27
+
28
+ # The definition of `SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName` object.
29
+ attr_accessor :notification_preset_name
30
+
31
+ # Time interval before renotifying if the test is still failing
32
+ # (in minutes).
33
+ attr_reader :renotify_interval
34
+
35
+ # The `SyntheticsMobileTestOptionsMonitorOptions` `renotify_occurrences`.
36
+ attr_accessor :renotify_occurrences
37
+
38
+ attr_accessor :additional_properties
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ # @!visibility private
42
+ def self.attribute_map
43
+ {
44
+ :'escalation_message' => :'escalation_message',
45
+ :'notification_preset_name' => :'notification_preset_name',
46
+ :'renotify_interval' => :'renotify_interval',
47
+ :'renotify_occurrences' => :'renotify_occurrences'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ # @!visibility private
53
+ def self.openapi_types
54
+ {
55
+ :'escalation_message' => :'String',
56
+ :'notification_preset_name' => :'SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName',
57
+ :'renotify_interval' => :'Integer',
58
+ :'renotify_occurrences' => :'Integer'
59
+ }
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param attributes [Hash] Model attributes in the form of hash
64
+ # @!visibility private
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsMobileTestOptionsMonitorOptions` initialize method"
68
+ end
69
+
70
+ self.additional_properties = {}
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ self.additional_properties[k.to_sym] = v
75
+ else
76
+ h[k.to_sym] = v
77
+ end
78
+ }
79
+
80
+ if attributes.key?(:'escalation_message')
81
+ self.escalation_message = attributes[:'escalation_message']
82
+ end
83
+
84
+ if attributes.key?(:'notification_preset_name')
85
+ self.notification_preset_name = attributes[:'notification_preset_name']
86
+ end
87
+
88
+ if attributes.key?(:'renotify_interval')
89
+ self.renotify_interval = attributes[:'renotify_interval']
90
+ end
91
+
92
+ if attributes.key?(:'renotify_occurrences')
93
+ self.renotify_occurrences = attributes[:'renotify_occurrences']
94
+ end
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ # @!visibility private
100
+ def valid?
101
+ return false if !@renotify_interval.nil? && @renotify_interval < 0
102
+ true
103
+ end
104
+
105
+ # Custom attribute writer method with validation
106
+ # @param renotify_interval [Object] Object to be assigned
107
+ # @!visibility private
108
+ def renotify_interval=(renotify_interval)
109
+ if !renotify_interval.nil? && renotify_interval < 0
110
+ fail ArgumentError, 'invalid value for "renotify_interval", must be greater than or equal to 0.'
111
+ end
112
+ @renotify_interval = renotify_interval
113
+ end
114
+
115
+ # Returns the object in the form of hash, with additionalProperties support.
116
+ # @return [Hash] Returns the object in the form of hash
117
+ # @!visibility private
118
+ def to_hash
119
+ hash = {}
120
+ self.class.attribute_map.each_pair do |attr, param|
121
+ value = self.send(attr)
122
+ if value.nil?
123
+ is_nullable = self.class.openapi_nullable.include?(attr)
124
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
125
+ end
126
+
127
+ hash[param] = _to_hash(value)
128
+ end
129
+ self.additional_properties.each_pair do |attr, value|
130
+ hash[attr] = value
131
+ end
132
+ hash
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param o [Object] Object to be compared
137
+ # @!visibility private
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ escalation_message == o.escalation_message &&
142
+ notification_preset_name == o.notification_preset_name &&
143
+ renotify_interval == o.renotify_interval &&
144
+ renotify_occurrences == o.renotify_occurrences
145
+ additional_properties == o.additional_properties
146
+ end
147
+
148
+ # Calculates hash code according to all attributes.
149
+ # @return [Integer] Hash code
150
+ # @!visibility private
151
+ def hash
152
+ [escalation_message, notification_preset_name, renotify_interval, renotify_occurrences].hash
153
+ end
154
+ end
155
+ end
@@ -0,0 +1,29 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # The definition of `SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName` object.
21
+ class SyntheticsMobileTestOptionsMonitorOptionsNotificationPresetName
22
+ include BaseEnumModel
23
+
24
+ SHOW_ALL = "show_all".freeze
25
+ HIDE_ALL = "hide_all".freeze
26
+ HIDE_QUERY = "hide_query".freeze
27
+ HIDE_HANDLES = "hide_handles".freeze
28
+ end
29
+ end
@@ -0,0 +1,26 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # Type of the Synthetic test, `mobile`.
21
+ class SyntheticsMobileTestType
22
+ include BaseEnumModel
23
+
24
+ MOBILE = "mobile".freeze
25
+ end
26
+ end
@@ -0,0 +1,154 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # Mobile application for mobile synthetics test.
21
+ class SyntheticsMobileTestsMobileApplication
22
+ include BaseGenericModel
23
+
24
+ # Application ID of the mobile application.
25
+ attr_reader :application_id
26
+
27
+ # Reference ID of the mobile application.
28
+ attr_reader :reference_id
29
+
30
+ # Reference type for the mobile application for a mobile synthetics test.
31
+ attr_accessor :reference_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
+ :'application_id' => :'applicationId',
40
+ :'reference_id' => :'referenceId',
41
+ :'reference_type' => :'referenceType'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'application_id' => :'String',
50
+ :'reference_id' => :'String',
51
+ :'reference_type' => :'SyntheticsMobileTestsMobileApplicationReferenceType'
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::V1::SyntheticsMobileTestsMobileApplication` 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?(:'application_id')
74
+ self.application_id = attributes[:'application_id']
75
+ end
76
+
77
+ if attributes.key?(:'reference_id')
78
+ self.reference_id = attributes[:'reference_id']
79
+ end
80
+
81
+ if attributes.key?(:'reference_type')
82
+ self.reference_type = attributes[:'reference_type']
83
+ end
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ # @!visibility private
89
+ def valid?
90
+ return false if !@application_id.nil? && @application_id.to_s.length > 1500
91
+ return false if !@reference_id.nil? && @reference_id.to_s.length > 1500
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param application_id [Object] Object to be assigned
97
+ # @!visibility private
98
+ def application_id=(application_id)
99
+ if !application_id.nil? && application_id.to_s.length > 1500
100
+ fail ArgumentError, 'invalid value for "application_id", the character length must be smaller than or equal to 1500.'
101
+ end
102
+ @application_id = application_id
103
+ end
104
+
105
+ # Custom attribute writer method with validation
106
+ # @param reference_id [Object] Object to be assigned
107
+ # @!visibility private
108
+ def reference_id=(reference_id)
109
+ if !reference_id.nil? && reference_id.to_s.length > 1500
110
+ fail ArgumentError, 'invalid value for "reference_id", the character length must be smaller than or equal to 1500.'
111
+ end
112
+ @reference_id = reference_id
113
+ end
114
+
115
+ # Returns the object in the form of hash, with additionalProperties support.
116
+ # @return [Hash] Returns the object in the form of hash
117
+ # @!visibility private
118
+ def to_hash
119
+ hash = {}
120
+ self.class.attribute_map.each_pair do |attr, param|
121
+ value = self.send(attr)
122
+ if value.nil?
123
+ is_nullable = self.class.openapi_nullable.include?(attr)
124
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
125
+ end
126
+
127
+ hash[param] = _to_hash(value)
128
+ end
129
+ self.additional_properties.each_pair do |attr, value|
130
+ hash[attr] = value
131
+ end
132
+ hash
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param o [Object] Object to be compared
137
+ # @!visibility private
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ application_id == o.application_id &&
142
+ reference_id == o.reference_id &&
143
+ reference_type == o.reference_type
144
+ additional_properties == o.additional_properties
145
+ end
146
+
147
+ # Calculates hash code according to all attributes.
148
+ # @return [Integer] Hash code
149
+ # @!visibility private
150
+ def hash
151
+ [application_id, reference_id, reference_type].hash
152
+ end
153
+ end
154
+ end
@@ -0,0 +1,27 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # Reference type for the mobile application for a mobile synthetics test.
21
+ class SyntheticsMobileTestsMobileApplicationReferenceType
22
+ include BaseEnumModel
23
+
24
+ LATEST = "latest".freeze
25
+ VERSION = "version".freeze
26
+ end
27
+ end
@@ -178,7 +178,7 @@ module DatadogAPIClient::V1
178
178
  :'no_saving_response_body' => :'Boolean',
179
179
  :'number_of_packets' => :'Integer',
180
180
  :'persist_cookies' => :'Boolean',
181
- :'port' => :'String',
181
+ :'port' => :'SyntheticsTestRequestPort',
182
182
  :'proxy' => :'SyntheticsTestRequestProxy',
183
183
  :'query' => :'Object',
184
184
  :'servername' => :'String',
@@ -0,0 +1,63 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # Port to use when performing the test.
21
+ module SyntheticsTestRequestPort
22
+ class << self
23
+ include BaseOneOfModel
24
+ include BaseOneOfModelNoDiscriminator
25
+
26
+ # List of class defined in oneOf (OpenAPI v3)
27
+ def openapi_one_of
28
+ [
29
+ :'Integer',
30
+ :'String'
31
+ ]
32
+ end
33
+ # Builds the object
34
+ # @param data [Mixed] Data to be matched against the list of oneOf items
35
+ # @return [Object] Returns the model or the data itself
36
+ def build(data)
37
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
38
+ # Note:
39
+ # - We do not attempt to check whether exactly one item matches.
40
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
41
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
42
+ # - TODO: scalar values are de facto behaving as if they were nullable.
43
+ # - TODO: logging when debugging is set.
44
+ openapi_one_of.each do |klass|
45
+ begin
46
+ next if klass == :AnyType # "nullable: true"
47
+ typed_data = find_and_cast_into_type(klass, data)
48
+ next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed
49
+ return typed_data if typed_data
50
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
51
+ end
52
+ end
53
+
54
+ if openapi_one_of.include?(:AnyType)
55
+ data
56
+ else
57
+ self._unparsed = true
58
+ DatadogAPIClient::UnparsedObject.new(data)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,135 @@
1
+ =begin
2
+ #Datadog API V1 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V1
20
+ # Object containing the uptime for a Synthetic test ID.
21
+ class SyntheticsTestUptime
22
+ include BaseGenericModel
23
+
24
+ # Timestamp in seconds for the start of uptime.
25
+ attr_accessor :from_ts
26
+
27
+ # Object containing the uptime information.
28
+ attr_accessor :overall
29
+
30
+ # A Synthetic test ID.
31
+ attr_accessor :public_id
32
+
33
+ # Timestamp in seconds for the end of uptime.
34
+ attr_accessor :to_ts
35
+
36
+ attr_accessor :additional_properties
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ # @!visibility private
40
+ def self.attribute_map
41
+ {
42
+ :'from_ts' => :'from_ts',
43
+ :'overall' => :'overall',
44
+ :'public_id' => :'public_id',
45
+ :'to_ts' => :'to_ts'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'from_ts' => :'Integer',
54
+ :'overall' => :'SyntheticsUptime',
55
+ :'public_id' => :'String',
56
+ :'to_ts' => :'Integer'
57
+ }
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param attributes [Hash] Model attributes in the form of hash
62
+ # @!visibility private
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestUptime` initialize method"
66
+ end
67
+
68
+ self.additional_properties = {}
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ self.additional_properties[k.to_sym] = v
73
+ else
74
+ h[k.to_sym] = v
75
+ end
76
+ }
77
+
78
+ if attributes.key?(:'from_ts')
79
+ self.from_ts = attributes[:'from_ts']
80
+ end
81
+
82
+ if attributes.key?(:'overall')
83
+ self.overall = attributes[:'overall']
84
+ end
85
+
86
+ if attributes.key?(:'public_id')
87
+ self.public_id = attributes[:'public_id']
88
+ end
89
+
90
+ if attributes.key?(:'to_ts')
91
+ self.to_ts = attributes[:'to_ts']
92
+ end
93
+ end
94
+
95
+ # Returns the object in the form of hash, with additionalProperties support.
96
+ # @return [Hash] Returns the object in the form of hash
97
+ # @!visibility private
98
+ def to_hash
99
+ hash = {}
100
+ self.class.attribute_map.each_pair do |attr, param|
101
+ value = self.send(attr)
102
+ if value.nil?
103
+ is_nullable = self.class.openapi_nullable.include?(attr)
104
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
105
+ end
106
+
107
+ hash[param] = _to_hash(value)
108
+ end
109
+ self.additional_properties.each_pair do |attr, value|
110
+ hash[attr] = value
111
+ end
112
+ hash
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param o [Object] Object to be compared
117
+ # @!visibility private
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ from_ts == o.from_ts &&
122
+ overall == o.overall &&
123
+ public_id == o.public_id &&
124
+ to_ts == o.to_ts
125
+ additional_properties == o.additional_properties
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ # @!visibility private
131
+ def hash
132
+ [from_ts, overall, public_id, to_ts].hash
133
+ end
134
+ end
135
+ end