datadog_api_client 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +233 -14
  4. data/.generator/schemas/v2/openapi.yaml +1403 -151
  5. data/CHANGELOG.md +27 -0
  6. data/examples/v1/dashboards/CreateDashboard_1039800684.rb +37 -0
  7. data/examples/v1/dashboards/CreateDashboard_2432046716.rb +33 -0
  8. data/examples/v1/dashboards/CreateDashboard_2610827685.rb +38 -0
  9. data/examples/v1/dashboards/CreateDashboard_2843286292.rb +43 -0
  10. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +1 -0
  11. data/examples/v1/gcp-integration/DeleteGCPIntegration.rb +1 -0
  12. data/examples/v1/gcp-integration/UpdateGCPIntegration.rb +1 -0
  13. data/examples/v1/monitors/ValidateExistingMonitor.rb +1 -0
  14. data/examples/v1/monitors/ValidateMonitor.rb +1 -0
  15. data/examples/v1/service-level-objectives/CreateSLO.rb +2 -2
  16. data/examples/v1/synthetics/CreateSyntheticsAPITest.rb +16 -0
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
  18. data/examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.rb +74 -0
  19. data/examples/v1/synthetics/UpdateBrowserTest.rb +16 -0
  20. data/examples/v2/cloudflare-integration/CreateCloudflareAccount.rb +16 -0
  21. data/examples/v2/cloudflare-integration/DeleteCloudflareAccount.rb +5 -0
  22. data/examples/v2/cloudflare-integration/GetCloudflareAccount.rb +8 -0
  23. data/examples/v2/cloudflare-integration/ListCloudflareAccounts.rb +5 -0
  24. data/examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb +18 -0
  25. data/examples/v2/fastly-integration/CreateFastlyAccount.rb +16 -0
  26. data/examples/v2/fastly-integration/CreateFastlyService.rb +18 -0
  27. data/examples/v2/fastly-integration/DeleteFastlyAccount.rb +5 -0
  28. data/examples/v2/fastly-integration/DeleteFastlyService.rb +5 -0
  29. data/examples/v2/fastly-integration/GetFastlyAccount.rb +8 -0
  30. data/examples/v2/fastly-integration/GetFastlyService.rb +5 -0
  31. data/examples/v2/fastly-integration/ListFastlyAccounts.rb +5 -0
  32. data/examples/v2/fastly-integration/ListFastlyServices.rb +5 -0
  33. data/examples/v2/fastly-integration/UpdateFastlyAccount.rb +17 -0
  34. data/examples/v2/fastly-integration/UpdateFastlyService.rb +18 -0
  35. data/examples/v2/metrics/QueryScalarData.rb +5 -6
  36. data/examples/v2/metrics/QueryScalarData_3112571352.rb +35 -0
  37. data/examples/v2/metrics/QueryTimeseriesData.rb +5 -6
  38. data/examples/v2/metrics/QueryTimeseriesData_301142940.rb +35 -0
  39. data/examples/v2/monitors/CreateMonitorConfigPolicy.rb +22 -0
  40. data/examples/v2/monitors/DeleteMonitorConfigPolicy.rb +8 -0
  41. data/examples/v2/monitors/GetMonitorConfigPolicy.rb +8 -0
  42. data/examples/v2/monitors/ListMonitorConfigPolicies.rb +5 -0
  43. data/examples/v2/monitors/UpdateMonitorConfigPolicy.rb +26 -0
  44. data/examples/v2/sensitive-data-scanner/CreateScanningRule.rb +6 -0
  45. data/examples/v2/{users → service-accounts}/CreateServiceAccount.rb +1 -1
  46. data/lib/datadog_api_client/inflector.rb +61 -0
  47. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  48. data/lib/datadog_api_client/v1/models/gcp_account.rb +11 -1
  49. data/lib/datadog_api_client/v1/models/host_meta.rb +1 -1
  50. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -1
  51. data/lib/datadog_api_client/v1/models/list_stream_compute_aggregation.rb +40 -0
  52. data/lib/datadog_api_client/v1/models/list_stream_compute_items.rb +112 -0
  53. data/lib/datadog_api_client/v1/models/list_stream_group_by_items.rb +102 -0
  54. data/lib/datadog_api_client/v1/models/list_stream_query.rb +61 -1
  55. data/lib/datadog_api_client/v1/models/list_stream_source.rb +2 -0
  56. data/lib/datadog_api_client/v1/models/metrics_query_metadata.rb +3 -2
  57. data/lib/datadog_api_client/v1/models/monitor_options.rb +11 -1
  58. data/lib/datadog_api_client/v1/models/monitor_options_notification_presets.rb +29 -0
  59. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -2
  60. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +13 -13
  61. data/lib/datadog_api_client/v1/models/run_workflow_widget_definition.rb +187 -0
  62. data/lib/datadog_api_client/v1/models/run_workflow_widget_definition_type.rb +26 -0
  63. data/lib/datadog_api_client/v1/models/run_workflow_widget_input.rb +123 -0
  64. data/lib/datadog_api_client/v1/models/synthetics_config_variable.rb +1 -1
  65. data/lib/datadog_api_client/v1/models/synthetics_test_options.rb +21 -1
  66. data/lib/datadog_api_client/v1/models/synthetics_test_options_http_version.rb +28 -0
  67. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling.rb +103 -0
  68. data/lib/datadog_api_client/v1/models/synthetics_test_options_scheduling_timeframe.rb +126 -0
  69. data/lib/datadog_api_client/v1/models/widget_definition.rb +1 -0
  70. data/lib/datadog_api_client/v2/api/cloudflare_integration_api.rb +355 -0
  71. data/lib/datadog_api_client/v2/api/fastly_integration_api.rb +709 -0
  72. data/lib/datadog_api_client/v2/api/metrics_api.rb +7 -6
  73. data/lib/datadog_api_client/v2/api/monitors_api.rb +355 -0
  74. data/lib/datadog_api_client/v2/api/service_accounts_api.rb +67 -0
  75. data/lib/datadog_api_client/v2/api/users_api.rb +0 -67
  76. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request.rb +102 -0
  77. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_attributes.rb +133 -0
  78. data/lib/datadog_api_client/v2/models/cloudflare_account_create_request_data.rb +123 -0
  79. data/lib/datadog_api_client/v2/models/cloudflare_account_response.rb +91 -0
  80. data/lib/datadog_api_client/v2/models/cloudflare_account_response_attributes.rb +112 -0
  81. data/lib/datadog_api_client/v2/models/cloudflare_account_response_data.rb +144 -0
  82. data/lib/datadog_api_client/v2/models/cloudflare_account_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request.rb +102 -0
  84. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_attributes.rb +112 -0
  85. data/lib/datadog_api_client/v2/models/cloudflare_account_update_request_data.rb +101 -0
  86. data/lib/datadog_api_client/v2/models/cloudflare_accounts_response.rb +93 -0
  87. data/lib/datadog_api_client/v2/models/cost_by_org_attributes.rb +11 -1
  88. data/lib/datadog_api_client/v2/models/data_scalar_column.rb +123 -0
  89. data/lib/datadog_api_client/v2/models/fastly_accoun_response_attributes.rb +114 -0
  90. data/lib/datadog_api_client/v2/models/fastly_account_create_request.rb +102 -0
  91. data/lib/datadog_api_client/v2/models/fastly_account_create_request_attributes.rb +135 -0
  92. data/lib/datadog_api_client/v2/models/fastly_account_create_request_data.rb +123 -0
  93. data/lib/datadog_api_client/v2/models/fastly_account_response.rb +91 -0
  94. data/lib/datadog_api_client/v2/models/fastly_account_response_data.rb +144 -0
  95. data/lib/datadog_api_client/v2/models/fastly_account_type.rb +26 -0
  96. data/lib/datadog_api_client/v2/models/fastly_account_update_request.rb +102 -0
  97. data/lib/datadog_api_client/v2/models/fastly_account_update_request_attributes.rb +91 -0
  98. data/lib/datadog_api_client/v2/models/fastly_account_update_request_data.rb +101 -0
  99. data/lib/datadog_api_client/v2/models/fastly_accounts_response.rb +93 -0
  100. data/lib/datadog_api_client/v2/models/fastly_service.rb +114 -0
  101. data/lib/datadog_api_client/v2/models/fastly_service_attributes.rb +93 -0
  102. data/lib/datadog_api_client/v2/models/fastly_service_data.rb +133 -0
  103. data/lib/datadog_api_client/v2/models/fastly_service_request.rb +102 -0
  104. data/lib/datadog_api_client/v2/models/fastly_service_response.rb +91 -0
  105. data/lib/datadog_api_client/v2/models/fastly_service_type.rb +26 -0
  106. data/lib/datadog_api_client/v2/models/fastly_services_response.rb +93 -0
  107. data/lib/datadog_api_client/v2/models/group_scalar_column.rb +113 -0
  108. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_create_request.rb +123 -0
  109. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_edit_request.rb +123 -0
  110. data/lib/datadog_api_client/v2/models/monitor_config_policy_attribute_response.rb +101 -0
  111. data/lib/datadog_api_client/v2/models/monitor_config_policy_create_data.rb +123 -0
  112. data/lib/datadog_api_client/v2/models/monitor_config_policy_create_request.rb +102 -0
  113. data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_data.rb +144 -0
  114. data/lib/datadog_api_client/v2/models/monitor_config_policy_edit_request.rb +102 -0
  115. data/lib/datadog_api_client/v2/models/monitor_config_policy_list_response.rb +93 -0
  116. data/lib/datadog_api_client/v2/models/monitor_config_policy_policy.rb +62 -0
  117. data/lib/datadog_api_client/v2/models/monitor_config_policy_policy_create_request.rb +62 -0
  118. data/lib/datadog_api_client/v2/models/monitor_config_policy_resource_type.rb +26 -0
  119. data/lib/datadog_api_client/v2/models/monitor_config_policy_response.rb +91 -0
  120. data/lib/datadog_api_client/v2/models/monitor_config_policy_response_data.rb +111 -0
  121. data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy.rb +124 -0
  122. data/lib/datadog_api_client/v2/models/monitor_config_policy_tag_policy_create_request.rb +150 -0
  123. data/lib/datadog_api_client/v2/models/monitor_config_policy_type.rb +26 -0
  124. data/lib/datadog_api_client/v2/models/scalar_column.rb +35 -77
  125. data/lib/datadog_api_client/v2/models/scalar_formula_response_atrributes.rb +4 -16
  126. data/lib/datadog_api_client/v2/models/scalar_meta.rb +96 -0
  127. data/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +1 -0
  128. data/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +1 -0
  129. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +11 -1
  130. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +11 -1
  131. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_rule_attributes.rb +22 -9
  132. data/lib/datadog_api_client/v2/models/timeseries_response_series.rb +4 -1
  133. data/lib/datadog_api_client/version.rb +1 -1
  134. metadata +91 -3
@@ -0,0 +1,123 @@
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 to map a dashboard template variable to a workflow input.
21
+ class RunWorkflowWidgetInput
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Name of the workflow input.
29
+ attr_reader :name
30
+
31
+ # Dashboard template variable. Can be suffixed with '.value' or '.key'.
32
+ attr_reader :value
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'name' => :'name',
39
+ :'value' => :'value'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'name' => :'String',
48
+ :'value' => :'String'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param attributes [Hash] Model attributes in the form of hash
54
+ # @!visibility private
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::RunWorkflowWidgetInput` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::RunWorkflowWidgetInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'name')
69
+ self.name = attributes[:'name']
70
+ end
71
+
72
+ if attributes.key?(:'value')
73
+ self.value = attributes[:'value']
74
+ end
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ # @!visibility private
80
+ def valid?
81
+ return false if @name.nil?
82
+ return false if @value.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param name [Object] Object to be assigned
88
+ # @!visibility private
89
+ def name=(name)
90
+ if name.nil?
91
+ fail ArgumentError, 'invalid value for "name", name cannot be nil.'
92
+ end
93
+ @name = name
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param value [Object] Object to be assigned
98
+ # @!visibility private
99
+ def value=(value)
100
+ if value.nil?
101
+ fail ArgumentError, 'invalid value for "value", value cannot be nil.'
102
+ end
103
+ @value = value
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
+ name == o.name &&
113
+ value == o.value
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [name, value].hash
121
+ end
122
+ end
123
+ end
@@ -37,7 +37,7 @@ module DatadogAPIClient::V1
37
37
  # Pattern of the variable.
38
38
  attr_accessor :pattern
39
39
 
40
- # Whether the value of this variable will be obfuscated in test results.
40
+ # Whether the value of this variable will be obfuscated in test results. Only for config variables of type `text`.
41
41
  attr_accessor :secure
42
42
 
43
43
  # Type of the configuration variable.
@@ -50,6 +50,9 @@ module DatadogAPIClient::V1
50
50
  # For API HTTP test, whether or not the test should follow redirects.
51
51
  attr_accessor :follow_redirects
52
52
 
53
+ # HTTP version to use for a Synthetic test.
54
+ attr_accessor :http_version
55
+
53
56
  # Ignore server certificate error for browser tests.
54
57
  attr_accessor :ignore_server_certificate_error
55
58
 
@@ -95,6 +98,9 @@ module DatadogAPIClient::V1
95
98
  # RUM data is collected using the specified application.
96
99
  attr_accessor :rum_settings
97
100
 
101
+ # Object containing timeframes and timezone used for advanced scheduling.
102
+ attr_accessor :scheduling
103
+
98
104
  # The frequency at which to run the Synthetic test (in seconds).
99
105
  attr_reader :tick_every
100
106
 
@@ -110,6 +116,7 @@ module DatadogAPIClient::V1
110
116
  :'disable_cors' => :'disableCors',
111
117
  :'disable_csp' => :'disableCsp',
112
118
  :'follow_redirects' => :'follow_redirects',
119
+ :'http_version' => :'httpVersion',
113
120
  :'ignore_server_certificate_error' => :'ignoreServerCertificateError',
114
121
  :'initial_navigation_timeout' => :'initialNavigationTimeout',
115
122
  :'min_failure_duration' => :'min_failure_duration',
@@ -121,6 +128,7 @@ module DatadogAPIClient::V1
121
128
  :'restricted_roles' => :'restricted_roles',
122
129
  :'_retry' => :'retry',
123
130
  :'rum_settings' => :'rumSettings',
131
+ :'scheduling' => :'scheduling',
124
132
  :'tick_every' => :'tick_every'
125
133
  }
126
134
  end
@@ -137,6 +145,7 @@ module DatadogAPIClient::V1
137
145
  :'disable_cors' => :'Boolean',
138
146
  :'disable_csp' => :'Boolean',
139
147
  :'follow_redirects' => :'Boolean',
148
+ :'http_version' => :'SyntheticsTestOptionsHTTPVersion',
140
149
  :'ignore_server_certificate_error' => :'Boolean',
141
150
  :'initial_navigation_timeout' => :'Integer',
142
151
  :'min_failure_duration' => :'Integer',
@@ -148,6 +157,7 @@ module DatadogAPIClient::V1
148
157
  :'restricted_roles' => :'Array<String>',
149
158
  :'_retry' => :'SyntheticsTestOptionsRetry',
150
159
  :'rum_settings' => :'SyntheticsBrowserTestRumSettings',
160
+ :'scheduling' => :'SyntheticsTestOptionsScheduling',
151
161
  :'tick_every' => :'Integer'
152
162
  }
153
163
  end
@@ -202,6 +212,10 @@ module DatadogAPIClient::V1
202
212
  self.follow_redirects = attributes[:'follow_redirects']
203
213
  end
204
214
 
215
+ if attributes.key?(:'http_version')
216
+ self.http_version = attributes[:'http_version']
217
+ end
218
+
205
219
  if attributes.key?(:'ignore_server_certificate_error')
206
220
  self.ignore_server_certificate_error = attributes[:'ignore_server_certificate_error']
207
221
  end
@@ -248,6 +262,10 @@ module DatadogAPIClient::V1
248
262
  self.rum_settings = attributes[:'rum_settings']
249
263
  end
250
264
 
265
+ if attributes.key?(:'scheduling')
266
+ self.scheduling = attributes[:'scheduling']
267
+ end
268
+
251
269
  if attributes.key?(:'tick_every')
252
270
  self.tick_every = attributes[:'tick_every']
253
271
  end
@@ -304,6 +322,7 @@ module DatadogAPIClient::V1
304
322
  disable_cors == o.disable_cors &&
305
323
  disable_csp == o.disable_csp &&
306
324
  follow_redirects == o.follow_redirects &&
325
+ http_version == o.http_version &&
307
326
  ignore_server_certificate_error == o.ignore_server_certificate_error &&
308
327
  initial_navigation_timeout == o.initial_navigation_timeout &&
309
328
  min_failure_duration == o.min_failure_duration &&
@@ -315,6 +334,7 @@ module DatadogAPIClient::V1
315
334
  restricted_roles == o.restricted_roles &&
316
335
  _retry == o._retry &&
317
336
  rum_settings == o.rum_settings &&
337
+ scheduling == o.scheduling &&
318
338
  tick_every == o.tick_every
319
339
  end
320
340
 
@@ -322,7 +342,7 @@ module DatadogAPIClient::V1
322
342
  # @return [Integer] Hash code
323
343
  # @!visibility private
324
344
  def hash
325
- [accept_self_signed, allow_insecure, check_certificate_revocation, ci, device_ids, disable_cors, disable_csp, follow_redirects, ignore_server_certificate_error, initial_navigation_timeout, min_failure_duration, min_location_failed, monitor_name, monitor_options, monitor_priority, no_screenshot, restricted_roles, _retry, rum_settings, tick_every].hash
345
+ [accept_self_signed, allow_insecure, check_certificate_revocation, ci, device_ids, disable_cors, disable_csp, follow_redirects, http_version, ignore_server_certificate_error, initial_navigation_timeout, min_failure_duration, min_location_failed, monitor_name, monitor_options, monitor_priority, no_screenshot, restricted_roles, _retry, rum_settings, scheduling, tick_every].hash
326
346
  end
327
347
  end
328
348
  end
@@ -0,0 +1,28 @@
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
+ # HTTP version to use for a Synthetic test.
21
+ class SyntheticsTestOptionsHTTPVersion
22
+ include BaseEnumModel
23
+
24
+ HTTP1 = "http1".freeze
25
+ HTTP2 = "http2".freeze
26
+ ANY = "any".freeze
27
+ end
28
+ end
@@ -0,0 +1,103 @@
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 timeframes and timezone used for advanced scheduling.
21
+ class SyntheticsTestOptionsScheduling
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Array containing objects describing the scheduling pattern to apply to each day.
29
+ attr_accessor :timeframes
30
+
31
+ # Timezone in which the timeframe is based.
32
+ attr_accessor :timezone
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ # @!visibility private
36
+ def self.attribute_map
37
+ {
38
+ :'timeframes' => :'timeframes',
39
+ :'timezone' => :'timezone'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ # @!visibility private
45
+ def self.openapi_types
46
+ {
47
+ :'timeframes' => :'Array<SyntheticsTestOptionsSchedulingTimeframe>',
48
+ :'timezone' => :'String'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param attributes [Hash] Model attributes in the form of hash
54
+ # @!visibility private
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestOptionsScheduling` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestOptionsScheduling`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'timeframes')
69
+ if (value = attributes[:'timeframes']).is_a?(Array)
70
+ self.timeframes = value
71
+ end
72
+ end
73
+
74
+ if attributes.key?(:'timezone')
75
+ self.timezone = attributes[:'timezone']
76
+ end
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ # @!visibility private
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param o [Object] Object to be compared
88
+ # @!visibility private
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ timeframes == o.timeframes &&
93
+ timezone == o.timezone
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Integer] Hash code
98
+ # @!visibility private
99
+ def hash
100
+ [timeframes, timezone].hash
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,126 @@
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 a timeframe.
21
+ class SyntheticsTestOptionsSchedulingTimeframe
22
+ include BaseGenericModel
23
+
24
+ # Whether the object has unparsed attributes
25
+ # @!visibility private
26
+ attr_accessor :_unparsed
27
+
28
+ # Number representing the day of the week.
29
+ attr_reader :day
30
+
31
+ # The hour of the day on which scheduling starts.
32
+ attr_accessor :from
33
+
34
+ # The hour of the day on which scheduling ends.
35
+ attr_accessor :to
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ # @!visibility private
39
+ def self.attribute_map
40
+ {
41
+ :'day' => :'day',
42
+ :'from' => :'from',
43
+ :'to' => :'to'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'day' => :'Integer',
52
+ :'from' => :'String',
53
+ :'to' => :'String'
54
+ }
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param attributes [Hash] Model attributes in the form of hash
59
+ # @!visibility private
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsTestOptionsSchedulingTimeframe`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'day')
74
+ self.day = attributes[:'day']
75
+ end
76
+
77
+ if attributes.key?(:'from')
78
+ self.from = attributes[:'from']
79
+ end
80
+
81
+ if attributes.key?(:'to')
82
+ self.to = attributes[:'to']
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 !@day.nil? && @day > 7
91
+ return false if !@day.nil? && @day < 1
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param day [Object] Object to be assigned
97
+ # @!visibility private
98
+ def day=(day)
99
+ if !day.nil? && day > 7
100
+ fail ArgumentError, 'invalid value for "day", must be smaller than or equal to 7.'
101
+ end
102
+ if !day.nil? && day < 1
103
+ fail ArgumentError, 'invalid value for "day", must be greater than or equal to 1.'
104
+ end
105
+ @day = day
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param o [Object] Object to be compared
110
+ # @!visibility private
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ day == o.day &&
115
+ from == o.from &&
116
+ to == o.to
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ # @!visibility private
122
+ def hash
123
+ [day, from, to].hash
124
+ end
125
+ end
126
+ end
@@ -44,6 +44,7 @@ module DatadogAPIClient::V1
44
44
  :'MonitorSummaryWidgetDefinition',
45
45
  :'NoteWidgetDefinition',
46
46
  :'QueryValueWidgetDefinition',
47
+ :'RunWorkflowWidgetDefinition',
47
48
  :'ScatterPlotWidgetDefinition',
48
49
  :'SLOWidgetDefinition',
49
50
  :'SLOListWidgetDefinition',