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,117 @@
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
+ # Configuration object for a Synthetic mobile test.
21
+ class SyntheticsMobileTestConfig
22
+ include BaseGenericModel
23
+
24
+ # Initial application arguments for a mobile test.
25
+ attr_accessor :initial_application_arguments
26
+
27
+ # Array of variables used for the test steps.
28
+ attr_accessor :variables
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'initial_application_arguments' => :'initialApplicationArguments',
37
+ :'variables' => :'variables'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'initial_application_arguments' => :'SyntheticsMobileTestInitialApplicationArguments',
46
+ :'variables' => :'Array<SyntheticsConfigVariable>'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsMobileTestConfig` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'initial_application_arguments')
69
+ self.initial_application_arguments = attributes[:'initial_application_arguments']
70
+ end
71
+
72
+ if attributes.key?(:'variables')
73
+ if (value = attributes[:'variables']).is_a?(Array)
74
+ self.variables = value
75
+ end
76
+ end
77
+ end
78
+
79
+ # Returns the object in the form of hash, with additionalProperties support.
80
+ # @return [Hash] Returns the object in the form of hash
81
+ # @!visibility private
82
+ def to_hash
83
+ hash = {}
84
+ self.class.attribute_map.each_pair do |attr, param|
85
+ value = self.send(attr)
86
+ if value.nil?
87
+ is_nullable = self.class.openapi_nullable.include?(attr)
88
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
89
+ end
90
+
91
+ hash[param] = _to_hash(value)
92
+ end
93
+ self.additional_properties.each_pair do |attr, value|
94
+ hash[attr] = value
95
+ end
96
+ hash
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param o [Object] Object to be compared
101
+ # @!visibility private
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ initial_application_arguments == o.initial_application_arguments &&
106
+ variables == o.variables
107
+ additional_properties == o.additional_properties
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ # @!visibility private
113
+ def hash
114
+ [initial_application_arguments, variables].hash
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,105 @@
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
+ # Initial application arguments for a mobile test.
21
+ class SyntheticsMobileTestInitialApplicationArguments
22
+ include BaseGenericModel
23
+
24
+ # Name of the property.
25
+ attr_accessor :property_names
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
+ :'property_names' => :'propertyNames'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'property_names' => :'SyntheticsMobileTestInitialApplicationArgumentsPropertyNames'
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::V1::SyntheticsMobileTestInitialApplicationArguments` 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?(:'property_names')
64
+ self.property_names = attributes[:'property_names']
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
+ property_names == o.property_names
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
+ [property_names].hash
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,105 @@
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
+ # Name of the property.
21
+ class SyntheticsMobileTestInitialApplicationArgumentsPropertyNames
22
+ include BaseGenericModel
23
+
24
+ # The `propertyNames` `pattern`.
25
+ attr_accessor :pattern
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
+ :'pattern' => :'pattern'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'pattern' => :'String'
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::V1::SyntheticsMobileTestInitialApplicationArgumentsPropertyNames` 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?(:'pattern')
64
+ self.pattern = attributes[:'pattern']
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
+ pattern == o.pattern
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
+ [pattern].hash
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,354 @@
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 describing the extra options for a Synthetic test.
21
+ class SyntheticsMobileTestOptions
22
+ include BaseGenericModel
23
+
24
+ # The `SyntheticsMobileTestOptions` `allowApplicationCrash`.
25
+ attr_accessor :allow_application_crash
26
+
27
+ # Array of bindings used for the mobile test.
28
+ attr_accessor :bindings
29
+
30
+ # CI/CD options for a Synthetic test.
31
+ attr_accessor :ci
32
+
33
+ # The `SyntheticsMobileTestOptions` `defaultStepTimeout`.
34
+ attr_reader :default_step_timeout
35
+
36
+ # For mobile test, array with the different device IDs used to run the test.
37
+ attr_accessor :device_ids
38
+
39
+ # The `SyntheticsMobileTestOptions` `disableAutoAcceptAlert`.
40
+ attr_accessor :disable_auto_accept_alert
41
+
42
+ # Minimum amount of time in failure required to trigger an alert.
43
+ attr_reader :min_failure_duration
44
+
45
+ # Mobile application for mobile synthetics test.
46
+ attr_accessor :mobile_application
47
+
48
+ # The monitor name is used for the alert title as well as for all monitor dashboard widgets and SLOs.
49
+ attr_accessor :monitor_name
50
+
51
+ # Object containing the options for a mobile Synthetic test as a monitor
52
+ # (for example, renotification).
53
+ attr_accessor :monitor_options
54
+
55
+ # Integer from 1 (high) to 5 (low) indicating alert severity.
56
+ attr_reader :monitor_priority
57
+
58
+ # The `SyntheticsMobileTestOptions` `noScreenshot`.
59
+ attr_accessor :no_screenshot
60
+
61
+ # A list of role identifiers that can be pulled from the Roles API, for restricting read and write access.
62
+ attr_accessor :restricted_roles
63
+
64
+ # Object describing the retry strategy to apply to a Synthetic test.
65
+ attr_accessor :_retry
66
+
67
+ # Object containing timeframes and timezone used for advanced scheduling.
68
+ attr_accessor :scheduling
69
+
70
+ # The frequency at which to run the Synthetic test (in seconds).
71
+ attr_reader :tick_every
72
+
73
+ # The `SyntheticsMobileTestOptions` `verbosity`.
74
+ attr_reader :verbosity
75
+
76
+ attr_accessor :additional_properties
77
+
78
+ # Attribute mapping from ruby-style variable name to JSON key.
79
+ # @!visibility private
80
+ def self.attribute_map
81
+ {
82
+ :'allow_application_crash' => :'allowApplicationCrash',
83
+ :'bindings' => :'bindings',
84
+ :'ci' => :'ci',
85
+ :'default_step_timeout' => :'defaultStepTimeout',
86
+ :'device_ids' => :'device_ids',
87
+ :'disable_auto_accept_alert' => :'disableAutoAcceptAlert',
88
+ :'min_failure_duration' => :'min_failure_duration',
89
+ :'mobile_application' => :'mobileApplication',
90
+ :'monitor_name' => :'monitor_name',
91
+ :'monitor_options' => :'monitor_options',
92
+ :'monitor_priority' => :'monitor_priority',
93
+ :'no_screenshot' => :'noScreenshot',
94
+ :'restricted_roles' => :'restricted_roles',
95
+ :'_retry' => :'retry',
96
+ :'scheduling' => :'scheduling',
97
+ :'tick_every' => :'tick_every',
98
+ :'verbosity' => :'verbosity'
99
+ }
100
+ end
101
+
102
+ # Attribute type mapping.
103
+ # @!visibility private
104
+ def self.openapi_types
105
+ {
106
+ :'allow_application_crash' => :'Boolean',
107
+ :'bindings' => :'Array<SyntheticsMobileTestBinding>',
108
+ :'ci' => :'SyntheticsMobileTestCiOptions',
109
+ :'default_step_timeout' => :'Integer',
110
+ :'device_ids' => :'Array<SyntheticsMobileDeviceID>',
111
+ :'disable_auto_accept_alert' => :'Boolean',
112
+ :'min_failure_duration' => :'Integer',
113
+ :'mobile_application' => :'SyntheticsMobileTestsMobileApplication',
114
+ :'monitor_name' => :'String',
115
+ :'monitor_options' => :'SyntheticsMobileTestOptionsMonitorOptions',
116
+ :'monitor_priority' => :'Integer',
117
+ :'no_screenshot' => :'Boolean',
118
+ :'restricted_roles' => :'Array<String>',
119
+ :'_retry' => :'SyntheticsTestOptionsRetry',
120
+ :'scheduling' => :'SyntheticsTestOptionsScheduling',
121
+ :'tick_every' => :'Integer',
122
+ :'verbosity' => :'Integer'
123
+ }
124
+ end
125
+
126
+ # Initializes the object
127
+ # @param attributes [Hash] Model attributes in the form of hash
128
+ # @!visibility private
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsMobileTestOptions` initialize method"
132
+ end
133
+
134
+ self.additional_properties = {}
135
+ # check to see if the attribute exists and convert string to symbol for hash key
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!self.class.attribute_map.key?(k.to_sym))
138
+ self.additional_properties[k.to_sym] = v
139
+ else
140
+ h[k.to_sym] = v
141
+ end
142
+ }
143
+
144
+ if attributes.key?(:'allow_application_crash')
145
+ self.allow_application_crash = attributes[:'allow_application_crash']
146
+ end
147
+
148
+ if attributes.key?(:'bindings')
149
+ if (value = attributes[:'bindings']).is_a?(Array)
150
+ self.bindings = value
151
+ end
152
+ end
153
+
154
+ if attributes.key?(:'ci')
155
+ self.ci = attributes[:'ci']
156
+ end
157
+
158
+ if attributes.key?(:'default_step_timeout')
159
+ self.default_step_timeout = attributes[:'default_step_timeout']
160
+ end
161
+
162
+ if attributes.key?(:'device_ids')
163
+ if (value = attributes[:'device_ids']).is_a?(Array)
164
+ self.device_ids = value
165
+ end
166
+ end
167
+
168
+ if attributes.key?(:'disable_auto_accept_alert')
169
+ self.disable_auto_accept_alert = attributes[:'disable_auto_accept_alert']
170
+ end
171
+
172
+ if attributes.key?(:'min_failure_duration')
173
+ self.min_failure_duration = attributes[:'min_failure_duration']
174
+ end
175
+
176
+ if attributes.key?(:'mobile_application')
177
+ self.mobile_application = attributes[:'mobile_application']
178
+ end
179
+
180
+ if attributes.key?(:'monitor_name')
181
+ self.monitor_name = attributes[:'monitor_name']
182
+ end
183
+
184
+ if attributes.key?(:'monitor_options')
185
+ self.monitor_options = attributes[:'monitor_options']
186
+ end
187
+
188
+ if attributes.key?(:'monitor_priority')
189
+ self.monitor_priority = attributes[:'monitor_priority']
190
+ end
191
+
192
+ if attributes.key?(:'no_screenshot')
193
+ self.no_screenshot = attributes[:'no_screenshot']
194
+ end
195
+
196
+ if attributes.key?(:'restricted_roles')
197
+ if (value = attributes[:'restricted_roles']).is_a?(Array)
198
+ self.restricted_roles = value
199
+ end
200
+ end
201
+
202
+ if attributes.key?(:'_retry')
203
+ self._retry = attributes[:'_retry']
204
+ end
205
+
206
+ if attributes.key?(:'scheduling')
207
+ self.scheduling = attributes[:'scheduling']
208
+ end
209
+
210
+ if attributes.key?(:'tick_every')
211
+ self.tick_every = attributes[:'tick_every']
212
+ end
213
+
214
+ if attributes.key?(:'verbosity')
215
+ self.verbosity = attributes[:'verbosity']
216
+ end
217
+ end
218
+
219
+ # Check to see if the all the properties in the model are valid
220
+ # @return true if the model is valid
221
+ # @!visibility private
222
+ def valid?
223
+ return false if !@default_step_timeout.nil? && @default_step_timeout > 300
224
+ return false if !@default_step_timeout.nil? && @default_step_timeout < 1
225
+ return false if !@min_failure_duration.nil? && @min_failure_duration > 7200
226
+ return false if !@min_failure_duration.nil? && @min_failure_duration < 0
227
+ return false if !@monitor_priority.nil? && @monitor_priority > 5
228
+ return false if !@monitor_priority.nil? && @monitor_priority < 1
229
+ return false if !@tick_every.nil? && @tick_every > 604800
230
+ return false if !@tick_every.nil? && @tick_every < 300
231
+ return false if !@verbosity.nil? && @verbosity > 5
232
+ return false if !@verbosity.nil? && @verbosity < 0
233
+ true
234
+ end
235
+
236
+ # Custom attribute writer method with validation
237
+ # @param default_step_timeout [Object] Object to be assigned
238
+ # @!visibility private
239
+ def default_step_timeout=(default_step_timeout)
240
+ if !default_step_timeout.nil? && default_step_timeout > 300
241
+ fail ArgumentError, 'invalid value for "default_step_timeout", must be smaller than or equal to 300.'
242
+ end
243
+ if !default_step_timeout.nil? && default_step_timeout < 1
244
+ fail ArgumentError, 'invalid value for "default_step_timeout", must be greater than or equal to 1.'
245
+ end
246
+ @default_step_timeout = default_step_timeout
247
+ end
248
+
249
+ # Custom attribute writer method with validation
250
+ # @param min_failure_duration [Object] Object to be assigned
251
+ # @!visibility private
252
+ def min_failure_duration=(min_failure_duration)
253
+ if !min_failure_duration.nil? && min_failure_duration > 7200
254
+ fail ArgumentError, 'invalid value for "min_failure_duration", must be smaller than or equal to 7200.'
255
+ end
256
+ if !min_failure_duration.nil? && min_failure_duration < 0
257
+ fail ArgumentError, 'invalid value for "min_failure_duration", must be greater than or equal to 0.'
258
+ end
259
+ @min_failure_duration = min_failure_duration
260
+ end
261
+
262
+ # Custom attribute writer method with validation
263
+ # @param monitor_priority [Object] Object to be assigned
264
+ # @!visibility private
265
+ def monitor_priority=(monitor_priority)
266
+ if !monitor_priority.nil? && monitor_priority > 5
267
+ fail ArgumentError, 'invalid value for "monitor_priority", must be smaller than or equal to 5.'
268
+ end
269
+ if !monitor_priority.nil? && monitor_priority < 1
270
+ fail ArgumentError, 'invalid value for "monitor_priority", must be greater than or equal to 1.'
271
+ end
272
+ @monitor_priority = monitor_priority
273
+ end
274
+
275
+ # Custom attribute writer method with validation
276
+ # @param tick_every [Object] Object to be assigned
277
+ # @!visibility private
278
+ def tick_every=(tick_every)
279
+ if !tick_every.nil? && tick_every > 604800
280
+ fail ArgumentError, 'invalid value for "tick_every", must be smaller than or equal to 604800.'
281
+ end
282
+ if !tick_every.nil? && tick_every < 300
283
+ fail ArgumentError, 'invalid value for "tick_every", must be greater than or equal to 300.'
284
+ end
285
+ @tick_every = tick_every
286
+ end
287
+
288
+ # Custom attribute writer method with validation
289
+ # @param verbosity [Object] Object to be assigned
290
+ # @!visibility private
291
+ def verbosity=(verbosity)
292
+ if !verbosity.nil? && verbosity > 5
293
+ fail ArgumentError, 'invalid value for "verbosity", must be smaller than or equal to 5.'
294
+ end
295
+ if !verbosity.nil? && verbosity < 0
296
+ fail ArgumentError, 'invalid value for "verbosity", must be greater than or equal to 0.'
297
+ end
298
+ @verbosity = verbosity
299
+ end
300
+
301
+ # Returns the object in the form of hash, with additionalProperties support.
302
+ # @return [Hash] Returns the object in the form of hash
303
+ # @!visibility private
304
+ def to_hash
305
+ hash = {}
306
+ self.class.attribute_map.each_pair do |attr, param|
307
+ value = self.send(attr)
308
+ if value.nil?
309
+ is_nullable = self.class.openapi_nullable.include?(attr)
310
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
311
+ end
312
+
313
+ hash[param] = _to_hash(value)
314
+ end
315
+ self.additional_properties.each_pair do |attr, value|
316
+ hash[attr] = value
317
+ end
318
+ hash
319
+ end
320
+
321
+ # Checks equality by comparing each attribute.
322
+ # @param o [Object] Object to be compared
323
+ # @!visibility private
324
+ def ==(o)
325
+ return true if self.equal?(o)
326
+ self.class == o.class &&
327
+ allow_application_crash == o.allow_application_crash &&
328
+ bindings == o.bindings &&
329
+ ci == o.ci &&
330
+ default_step_timeout == o.default_step_timeout &&
331
+ device_ids == o.device_ids &&
332
+ disable_auto_accept_alert == o.disable_auto_accept_alert &&
333
+ min_failure_duration == o.min_failure_duration &&
334
+ mobile_application == o.mobile_application &&
335
+ monitor_name == o.monitor_name &&
336
+ monitor_options == o.monitor_options &&
337
+ monitor_priority == o.monitor_priority &&
338
+ no_screenshot == o.no_screenshot &&
339
+ restricted_roles == o.restricted_roles &&
340
+ _retry == o._retry &&
341
+ scheduling == o.scheduling &&
342
+ tick_every == o.tick_every &&
343
+ verbosity == o.verbosity
344
+ additional_properties == o.additional_properties
345
+ end
346
+
347
+ # Calculates hash code according to all attributes.
348
+ # @return [Integer] Hash code
349
+ # @!visibility private
350
+ def hash
351
+ [allow_application_crash, bindings, ci, default_step_timeout, device_ids, disable_auto_accept_alert, min_failure_duration, mobile_application, monitor_name, monitor_options, monitor_priority, no_screenshot, restricted_roles, _retry, scheduling, tick_every, verbosity].hash
352
+ end
353
+ end
354
+ end