datadog_api_client 2.37.0 → 2.39.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 (175) hide show
  1. checksums.yaml +4 -4
  2. data/.generated-info +4 -0
  3. data/.generator/schemas/v1/openapi.yaml +513 -14
  4. data/.generator/schemas/v2/openapi.yaml +2101 -107
  5. data/.github/workflows/approved_status.yml +1 -0
  6. data/.github/workflows/test.yml +1 -1
  7. data/CHANGELOG.md +36 -0
  8. data/examples/v1/dashboards/CreateDashboard_1751391372.rb +41 -0
  9. data/examples/v1/dashboards/CreatePublicDashboard_1668947073.rb +28 -0
  10. data/examples/v1/dashboards/UpdatePublicDashboard_1708268778.rb +27 -0
  11. data/examples/v1/logs-pipelines/CreateLogsPipeline_1248402480.rb +25 -0
  12. data/examples/v1/logs-pipelines/CreateLogsPipeline_1267211320.rb +27 -0
  13. data/examples/v1/logs-pipelines/CreateLogsPipeline_1271012410.rb +25 -0
  14. data/examples/v1/logs-pipelines/CreateLogsPipeline_3314493032.rb +26 -0
  15. data/examples/v1/logs-pipelines/CreateLogsPipeline_3934594739.rb +26 -0
  16. data/examples/v1/synthetics/SearchTests.rb +5 -0
  17. data/examples/v1/synthetics/SearchTests_195957771.rb +13 -0
  18. data/examples/v2/action-connection/GetAppKeyRegistration.rb +5 -0
  19. data/examples/v2/action-connection/ListAppKeyRegistrations.rb +5 -0
  20. data/examples/v2/action-connection/RegisterAppKey.rb +5 -0
  21. data/examples/v2/action-connection/UnregisterAppKey.rb +5 -0
  22. data/examples/v2/aws-integration/GetAWSIntegrationIAMPermissions.rb +5 -0
  23. data/examples/v2/cloud-cost-management/CreateCostGCPUsageCostConfig.rb +19 -0
  24. data/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.rb +5 -0
  25. data/examples/v2/cloud-cost-management/ListCostGCPUsageCostConfigs.rb +5 -0
  26. data/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.rb +14 -0
  27. data/examples/v2/datasets/CreateDataset.rb +27 -0
  28. data/examples/v2/datasets/DeleteDataset.rb +5 -0
  29. data/examples/v2/datasets/GetAllDatasets.rb +5 -0
  30. data/examples/v2/datasets/GetDataset.rb +5 -0
  31. data/examples/v2/events/CreateEvent.rb +4 -2
  32. data/examples/v2/monitors/CreateMonitorNotificationRule.rb +0 -3
  33. data/examples/v2/monitors/CreateMonitorUserTemplate.rb +37 -0
  34. data/examples/v2/monitors/DeleteMonitorNotificationRule.rb +0 -3
  35. data/examples/v2/monitors/DeleteMonitorUserTemplate.rb +8 -0
  36. data/examples/v2/monitors/GetMonitorNotificationRule.rb +0 -3
  37. data/examples/v2/monitors/GetMonitorNotificationRules.rb +0 -3
  38. data/examples/v2/monitors/GetMonitorUserTemplate.rb +11 -0
  39. data/examples/v2/monitors/ListMonitorUserTemplates.rb +8 -0
  40. data/examples/v2/monitors/UpdateMonitorNotificationRule.rb +0 -3
  41. data/examples/v2/monitors/UpdateMonitorUserTemplate.rb +41 -0
  42. data/examples/v2/monitors/ValidateExistingMonitorUserTemplate.rb +41 -0
  43. data/examples/v2/monitors/ValidateMonitorUserTemplate.rb +37 -0
  44. data/examples/v2/on-call/UpdateOnCallSchedule.rb +1 -1
  45. data/examples/v2/security-monitoring/ListAssetsSBOMs.rb +12 -0
  46. data/lib/datadog_api_client/configuration.rb +60 -5
  47. data/lib/datadog_api_client/inflector.rb +70 -0
  48. data/lib/datadog_api_client/v1/api/hosts_api.rb +1 -0
  49. data/lib/datadog_api_client/v1/api/synthetics_api.rb +72 -0
  50. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -6
  51. data/lib/datadog_api_client/v1/models/dashboard_template_variable.rb +14 -3
  52. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb +1 -0
  53. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +9 -1
  54. data/lib/datadog_api_client/v1/models/logs_array_processor.rb +168 -0
  55. data/lib/datadog_api_client/v1/models/logs_array_processor_operation.rb +64 -0
  56. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append.rb +175 -0
  57. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_append_type.rb +26 -0
  58. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length.rb +165 -0
  59. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_length_type.rb +26 -0
  60. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select.rb +207 -0
  61. data/lib/datadog_api_client/v1/models/logs_array_processor_operation_select_type.rb +26 -0
  62. data/lib/datadog_api_client/v1/models/logs_array_processor_type.rb +26 -0
  63. data/lib/datadog_api_client/v1/models/logs_processor.rb +2 -1
  64. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb +1 -0
  65. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +14 -0
  66. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +142 -1
  67. data/lib/datadog_api_client/v1/models/selectable_template_variable_items.rb +12 -1
  68. data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +12 -1
  69. data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
  70. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
  71. data/lib/datadog_api_client/v1/models/synthetics_test_request_dns_server_port.rb +63 -0
  72. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  73. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +81 -1
  74. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +81 -1
  75. data/lib/datadog_api_client/v2/api/action_connection_api.rb +263 -4
  76. data/lib/datadog_api_client/v2/api/app_builder_api.rb +8 -8
  77. data/lib/datadog_api_client/v2/api/aws_integration_api.rb +60 -0
  78. data/lib/datadog_api_client/v2/api/cloud_cost_management_api.rb +264 -0
  79. data/lib/datadog_api_client/v2/api/datasets_api.rb +283 -0
  80. data/lib/datadog_api_client/v2/api/events_api.rb +10 -4
  81. data/lib/datadog_api_client/v2/api/monitors_api.rb +512 -30
  82. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
  83. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +111 -0
  84. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  85. data/lib/datadog_api_client/v2/api/workflow_automation_api.rb +8 -8
  86. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes.rb +145 -0
  87. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items.rb +152 -0
  88. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_links_items_category.rb +28 -0
  89. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_priority.rb +30 -0
  90. data/lib/datadog_api_client/v2/models/alert_event_custom_attributes_status.rb +28 -0
  91. data/lib/datadog_api_client/v2/models/app_key_registration_data.rb +133 -0
  92. data/lib/datadog_api_client/v2/models/app_key_registration_data_type.rb +26 -0
  93. data/lib/datadog_api_client/v2/models/asset_attributes.rb +13 -1
  94. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response.rb +123 -0
  95. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_attributes.rb +125 -0
  96. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data.rb +125 -0
  97. data/lib/datadog_api_client/v2/models/aws_integration_iam_permissions_response_data_type.rb +26 -0
  98. data/lib/datadog_api_client/v2/models/change_event_custom_attributes.rb +19 -33
  99. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author.rb +10 -31
  100. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource.rb +15 -32
  101. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_changed_resource_type.rb +1 -1
  102. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items.rb +15 -32
  103. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_impacted_resources_items_type.rb +1 -1
  104. data/lib/datadog_api_client/v2/models/dataset.rb +154 -0
  105. data/lib/datadog_api_client/v2/models/dataset_attributes.rb +197 -0
  106. data/lib/datadog_api_client/v2/models/dataset_create_request.rb +123 -0
  107. data/lib/datadog_api_client/v2/models/dataset_response_multi.rb +125 -0
  108. data/lib/datadog_api_client/v2/models/dataset_response_single.rb +123 -0
  109. data/lib/datadog_api_client/v2/models/event_category.rb +2 -1
  110. data/lib/datadog_api_client/v2/models/event_create_request.rb +32 -3
  111. data/lib/datadog_api_client/v2/models/event_create_request_payload.rb +20 -2
  112. data/lib/datadog_api_client/v2/models/event_create_response.rb +3 -3
  113. data/lib/datadog_api_client/v2/models/event_create_response_attributes.rb +2 -2
  114. data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes.rb +1 -1
  115. data/lib/datadog_api_client/v2/models/event_create_response_attributes_attributes_evt.rb +14 -4
  116. data/lib/datadog_api_client/v2/models/event_create_response_payload.rb +15 -5
  117. data/lib/datadog_api_client/v2/models/event_create_response_payload_links.rb +105 -0
  118. data/lib/datadog_api_client/v2/models/event_payload.rb +48 -36
  119. data/lib/datadog_api_client/v2/models/event_payload_attributes.rb +3 -2
  120. data/lib/datadog_api_client/v2/models/event_payload_integration_id.rb +26 -0
  121. data/lib/datadog_api_client/v2/models/filters_per_product.rb +150 -0
  122. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config.rb +154 -0
  123. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_attributes.rb +369 -0
  124. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_data.rb +144 -0
  125. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request.rb +123 -0
  126. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_attributes.rb +123 -0
  127. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_patch_request_type.rb +26 -0
  128. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_data.rb +144 -0
  129. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request.rb +123 -0
  130. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_attributes.rb +217 -0
  131. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_post_request_type.rb +26 -0
  132. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_response.rb +105 -0
  133. data/lib/datadog_api_client/v2/models/gcp_usage_cost_config_type.rb +26 -0
  134. data/lib/datadog_api_client/v2/models/gcp_usage_cost_configs_response.rb +107 -0
  135. data/lib/datadog_api_client/v2/models/get_app_key_registration_response.rb +105 -0
  136. data/lib/datadog_api_client/v2/models/incident_create_attributes.rb +11 -1
  137. data/lib/datadog_api_client/v2/models/incident_response_attributes.rb +11 -1
  138. data/lib/datadog_api_client/v2/models/job_definition_from_rule.rb +1 -26
  139. data/lib/datadog_api_client/v2/models/layer_attributes.rb +1 -1
  140. data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +1 -1
  141. data/lib/datadog_api_client/v2/models/list_app_key_registrations_response.rb +117 -0
  142. data/lib/datadog_api_client/v2/models/list_app_key_registrations_response_meta.rb +115 -0
  143. data/lib/datadog_api_client/v2/models/list_assets_sbo_ms_response.rb +145 -0
  144. data/lib/datadog_api_client/v2/models/monitor_user_template.rb +200 -0
  145. data/lib/datadog_api_client/v2/models/monitor_user_template_create_data.rb +144 -0
  146. data/lib/datadog_api_client/v2/models/monitor_user_template_create_request.rb +123 -0
  147. data/lib/datadog_api_client/v2/models/monitor_user_template_create_response.rb +105 -0
  148. data/lib/datadog_api_client/v2/models/monitor_user_template_list_response.rb +107 -0
  149. data/lib/datadog_api_client/v2/models/monitor_user_template_request_attributes.rb +172 -0
  150. data/lib/datadog_api_client/v2/models/monitor_user_template_resource_type.rb +26 -0
  151. data/lib/datadog_api_client/v2/models/monitor_user_template_response.rb +105 -0
  152. data/lib/datadog_api_client/v2/models/monitor_user_template_response_attributes.rb +188 -0
  153. data/lib/datadog_api_client/v2/models/monitor_user_template_response_data.rb +125 -0
  154. data/lib/datadog_api_client/v2/models/monitor_user_template_response_data_with_versions.rb +125 -0
  155. data/lib/datadog_api_client/v2/models/monitor_user_template_template_variables_items.rb +132 -0
  156. data/lib/datadog_api_client/v2/models/monitor_user_template_update_data.rb +165 -0
  157. data/lib/datadog_api_client/v2/models/monitor_user_template_update_request.rb +123 -0
  158. data/lib/datadog_api_client/v2/models/register_app_key_response.rb +105 -0
  159. data/lib/datadog_api_client/v2/models/sbom_attributes.rb +24 -1
  160. data/lib/datadog_api_client/v2/models/sbom_component.rb +46 -1
  161. data/lib/datadog_api_client/v2/models/sbom_component_dependency.rb +117 -0
  162. data/lib/datadog_api_client/v2/models/sbom_component_license.rb +123 -0
  163. data/lib/datadog_api_client/v2/models/sbom_component_license_license.rb +123 -0
  164. data/lib/datadog_api_client/v2/models/sbom_component_license_type.rb +33 -0
  165. data/lib/datadog_api_client/v2/models/sbom_component_property.rb +144 -0
  166. data/lib/datadog_api_client/v2/models/sbom_component_supplier.rb +123 -0
  167. data/lib/datadog_api_client/v2/models/sbom_metadata.rb +25 -3
  168. data/lib/datadog_api_client/v2/models/sbom_metadata_author.rb +105 -0
  169. data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +1 -1
  170. data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +1 -1
  171. data/lib/datadog_api_client/v2/models/simple_monitor_user_template.rb +188 -0
  172. data/lib/datadog_api_client/v2/models/vulnerability_attributes.rb +24 -1
  173. data/lib/datadog_api_client/version.rb +1 -1
  174. metadata +103 -2
  175. data/.apigentools-info +0 -16
@@ -0,0 +1,144 @@
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
+ # Monitor user template data.
21
+ class MonitorUserTemplateCreateData
22
+ include BaseGenericModel
23
+
24
+ # Attributes for a monitor user template.
25
+ attr_reader :attributes
26
+
27
+ # Monitor user template resource type.
28
+ attr_reader :type
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
+ :'attributes' => :'attributes',
37
+ :'type' => :'type'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'attributes' => :'MonitorUserTemplateRequestAttributes',
46
+ :'type' => :'MonitorUserTemplateResourceType'
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::V2::MonitorUserTemplateCreateData` 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?(:'attributes')
69
+ self.attributes = attributes[:'attributes']
70
+ end
71
+
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
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 @attributes.nil?
82
+ return false if @type.nil?
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param attributes [Object] Object to be assigned
88
+ # @!visibility private
89
+ def attributes=(attributes)
90
+ if attributes.nil?
91
+ fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
92
+ end
93
+ @attributes = attributes
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param type [Object] Object to be assigned
98
+ # @!visibility private
99
+ def type=(type)
100
+ if type.nil?
101
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
102
+ end
103
+ @type = type
104
+ end
105
+
106
+ # Returns the object in the form of hash, with additionalProperties support.
107
+ # @return [Hash] Returns the object in the form of hash
108
+ # @!visibility private
109
+ def to_hash
110
+ hash = {}
111
+ self.class.attribute_map.each_pair do |attr, param|
112
+ value = self.send(attr)
113
+ if value.nil?
114
+ is_nullable = self.class.openapi_nullable.include?(attr)
115
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
116
+ end
117
+
118
+ hash[param] = _to_hash(value)
119
+ end
120
+ self.additional_properties.each_pair do |attr, value|
121
+ hash[attr] = value
122
+ end
123
+ hash
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param o [Object] Object to be compared
128
+ # @!visibility private
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ attributes == o.attributes &&
133
+ type == o.type &&
134
+ additional_properties == o.additional_properties
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ # @!visibility private
140
+ def hash
141
+ [attributes, type, additional_properties].hash
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,123 @@
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
+ # Request for creating a monitor user template.
21
+ class MonitorUserTemplateCreateRequest
22
+ include BaseGenericModel
23
+
24
+ # Monitor user template data.
25
+ attr_reader :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' => :'MonitorUserTemplateCreateData'
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::MonitorUserTemplateCreateRequest` 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
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ # @!visibility private
71
+ def valid?
72
+ return false if @data.nil?
73
+ true
74
+ end
75
+
76
+ # Custom attribute writer method with validation
77
+ # @param data [Object] Object to be assigned
78
+ # @!visibility private
79
+ def data=(data)
80
+ if data.nil?
81
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
82
+ end
83
+ @data = data
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
+ data == o.data &&
113
+ additional_properties == o.additional_properties
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Integer] Hash code
118
+ # @!visibility private
119
+ def hash
120
+ [data, additional_properties].hash
121
+ end
122
+ end
123
+ 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 creating a monitor user template.
21
+ class MonitorUserTemplateCreateResponse
22
+ include BaseGenericModel
23
+
24
+ # Monitor user template list response data.
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' => :'MonitorUserTemplateResponseData'
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::MonitorUserTemplateCreateResponse` 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
@@ -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 retrieving all monitor user templates.
21
+ class MonitorUserTemplateListResponse
22
+ include BaseGenericModel
23
+
24
+ # An array of monitor user templates.
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<MonitorUserTemplateResponseData>'
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::MonitorUserTemplateListResponse` 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,172 @@
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
+ # Attributes for a monitor user template.
21
+ class MonitorUserTemplateRequestAttributes
22
+ include BaseGenericModel
23
+
24
+ # A brief description of the monitor user template.
25
+ attr_accessor :description
26
+
27
+ # A valid monitor definition in the same format as the [V1 Monitor API](https://docs.datadoghq.com/api/latest/monitors/#create-a-monitor).
28
+ attr_reader :monitor_definition
29
+
30
+ # The definition of `MonitorUserTemplateTags` object.
31
+ attr_reader :tags
32
+
33
+ # The definition of `MonitorUserTemplateTemplateVariables` object.
34
+ attr_accessor :template_variables
35
+
36
+ # The title of the monitor user template.
37
+ attr_reader :title
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ # @!visibility private
41
+ def self.attribute_map
42
+ {
43
+ :'description' => :'description',
44
+ :'monitor_definition' => :'monitor_definition',
45
+ :'tags' => :'tags',
46
+ :'template_variables' => :'template_variables',
47
+ :'title' => :'title'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ # @!visibility private
53
+ def self.openapi_types
54
+ {
55
+ :'description' => :'String',
56
+ :'monitor_definition' => :'Hash<String, Object>',
57
+ :'tags' => :'Array<String>',
58
+ :'template_variables' => :'Array<MonitorUserTemplateTemplateVariablesItems>',
59
+ :'title' => :'String'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ # @!visibility private
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'description',
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param attributes [Hash] Model attributes in the form of hash
73
+ # @!visibility private
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MonitorUserTemplateRequestAttributes` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MonitorUserTemplateRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'description')
88
+ self.description = attributes[:'description']
89
+ end
90
+
91
+ if attributes.key?(:'monitor_definition')
92
+ self.monitor_definition = attributes[:'monitor_definition']
93
+ end
94
+
95
+ if attributes.key?(:'tags')
96
+ if (value = attributes[:'tags']).is_a?(Array)
97
+ self.tags = value
98
+ end
99
+ end
100
+
101
+ if attributes.key?(:'template_variables')
102
+ if (value = attributes[:'template_variables']).is_a?(Array)
103
+ self.template_variables = value
104
+ end
105
+ end
106
+
107
+ if attributes.key?(:'title')
108
+ self.title = attributes[:'title']
109
+ end
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ # @!visibility private
115
+ def valid?
116
+ return false if @monitor_definition.nil?
117
+ return false if @tags.nil?
118
+ return false if @title.nil?
119
+ true
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param monitor_definition [Object] Object to be assigned
124
+ # @!visibility private
125
+ def monitor_definition=(monitor_definition)
126
+ if monitor_definition.nil?
127
+ fail ArgumentError, 'invalid value for "monitor_definition", monitor_definition cannot be nil.'
128
+ end
129
+ @monitor_definition = monitor_definition
130
+ end
131
+
132
+ # Custom attribute writer method with validation
133
+ # @param tags [Object] Object to be assigned
134
+ # @!visibility private
135
+ def tags=(tags)
136
+ if tags.nil?
137
+ fail ArgumentError, 'invalid value for "tags", tags cannot be nil.'
138
+ end
139
+ @tags = tags
140
+ end
141
+
142
+ # Custom attribute writer method with validation
143
+ # @param title [Object] Object to be assigned
144
+ # @!visibility private
145
+ def title=(title)
146
+ if title.nil?
147
+ fail ArgumentError, 'invalid value for "title", title cannot be nil.'
148
+ end
149
+ @title = title
150
+ end
151
+
152
+ # Checks equality by comparing each attribute.
153
+ # @param o [Object] Object to be compared
154
+ # @!visibility private
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ description == o.description &&
159
+ monitor_definition == o.monitor_definition &&
160
+ tags == o.tags &&
161
+ template_variables == o.template_variables &&
162
+ title == o.title
163
+ end
164
+
165
+ # Calculates hash code according to all attributes.
166
+ # @return [Integer] Hash code
167
+ # @!visibility private
168
+ def hash
169
+ [description, monitor_definition, tags, template_variables, title].hash
170
+ end
171
+ end
172
+ end
@@ -0,0 +1,26 @@
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
+ # Monitor user template resource type.
21
+ class MonitorUserTemplateResourceType
22
+ include BaseEnumModel
23
+
24
+ MONITOR_USER_TEMPLATE = "monitor-user-template".freeze
25
+ end
26
+ end