datadog_api_client 2.16.0 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +654 -11
  4. data/.generator/schemas/v2/openapi.yaml +1268 -206
  5. data/.generator/src/generator/formatter.py +4 -0
  6. data/.generator/src/generator/openapi.py +2 -0
  7. data/.generator/src/generator/templates/api_client.j2 +3 -0
  8. data/.generator/src/generator/templates/inflector.j2 +1 -1
  9. data/.generator/src/generator/templates/model_base.j2 +4 -0
  10. data/CHANGELOG.md +29 -0
  11. data/Gemfile +1 -0
  12. data/LICENSE-3rdparty.csv +1 -0
  13. data/datadog_api_client.gemspec +2 -0
  14. data/examples/v1/aws-integration/CreateAWSAccount.rb +1 -1
  15. data/examples/v1/aws-integration/CreateAWSEventBridgeSource.rb +12 -0
  16. data/examples/v1/aws-integration/CreateAWSTagFilter.rb +1 -1
  17. data/examples/v1/aws-integration/CreateNewAWSExternalID.rb +1 -1
  18. data/examples/v1/aws-integration/DeleteAWSAccount.rb +1 -1
  19. data/examples/v1/aws-integration/DeleteAWSEventBridgeSource.rb +11 -0
  20. data/examples/v1/aws-integration/ListAWSEventBridgeSources.rb +5 -0
  21. data/examples/v1/azure-integration/CreateAzureIntegration.rb +1 -0
  22. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +1 -0
  23. data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +1 -0
  24. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +1 -0
  25. data/examples/v1/dashboards/CreateDashboard_1213075383.rb +7 -0
  26. data/examples/v1/monitors/CreateMonitor_1539578087.rb +0 -1
  27. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +3 -0
  28. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +3 -0
  29. data/examples/v2/confluent-cloud/DeleteConfluentAccount.rb +4 -1
  30. data/examples/v2/confluent-cloud/DeleteConfluentResource.rb +5 -0
  31. data/examples/v2/containers/ListContainers.rb +8 -0
  32. data/examples/v2/containers/ListContainers_2175733917.rb +11 -0
  33. data/examples/v2/containers/ListContainers_931009654.rb +11 -0
  34. data/examples/v2/downtimes/ListMonitorDowntimes.rb +1 -1
  35. data/examples/v2/key-management/CreateCurrentUserApplicationKey.rb +2 -7
  36. data/examples/v2/key-management/DeleteApplicationKey.rb +4 -1
  37. data/examples/v2/key-management/DeleteCurrentUserApplicationKey.rb +4 -1
  38. data/examples/v2/powerpack/CreatePowerpack.rb +1 -0
  39. data/examples/v2/powerpack/UpdatePowerpack.rb +1 -0
  40. data/examples/v2/security-monitoring/MuteFindings.rb +29 -0
  41. data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
  42. data/examples/v2/service-scorecards/CreateScorecardOutcomesBatch.rb +27 -0
  43. data/examples/v2/service-scorecards/CreateScorecardRule.rb +19 -0
  44. data/examples/v2/service-scorecards/DeleteScorecardRule.rb +11 -0
  45. data/examples/v2/service-scorecards/ListScorecardOutcomes.rb +8 -0
  46. data/examples/v2/service-scorecards/ListScorecardOutcomes_2663454275.rb +13 -0
  47. data/examples/v2/service-scorecards/ListScorecardRules.rb +8 -0
  48. data/examples/v2/service-scorecards/ListScorecardRules_4057666343.rb +13 -0
  49. data/examples/v2/synthetics/SetOnDemandConcurrencyCap.rb +3 -1
  50. data/examples/v2/teams/ListTeams_3429963470.rb +12 -0
  51. data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring.rb +4 -1
  52. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations.rb +4 -1
  53. data/examples/v2/usage-metering/GetUsageObservabilityPipelines.rb +4 -1
  54. data/examples/v2/users/GetUser.rb +5 -2
  55. data/lib/datadog_api_client/api_client.rb +3 -0
  56. data/lib/datadog_api_client/configuration.rb +8 -1
  57. data/lib/datadog_api_client/inflector.rb +76 -9
  58. data/lib/datadog_api_client/v1/api/aws_integration_api.rb +194 -0
  59. data/lib/datadog_api_client/v1/api/monitors_api.rb +5 -1
  60. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  61. data/lib/datadog_api_client/v1/model_base.rb +4 -0
  62. data/lib/datadog_api_client/v1/models/aws_account.rb +2 -1
  63. data/lib/datadog_api_client/v1/models/aws_event_bridge_account_configuration.rb +105 -0
  64. data/lib/datadog_api_client/v1/models/aws_event_bridge_create_request.rb +112 -0
  65. data/lib/datadog_api_client/v1/models/aws_event_bridge_create_response.rb +110 -0
  66. data/lib/datadog_api_client/v1/models/aws_event_bridge_create_status.rb +26 -0
  67. data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_request.rb +100 -0
  68. data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_response.rb +80 -0
  69. data/lib/datadog_api_client/v1/models/aws_event_bridge_delete_status.rb +26 -0
  70. data/lib/datadog_api_client/v1/models/aws_event_bridge_list_response.rb +92 -0
  71. data/lib/datadog_api_client/v1/models/aws_event_bridge_source.rb +90 -0
  72. data/lib/datadog_api_client/v1/models/azure_account.rb +12 -1
  73. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +21 -0
  74. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  75. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +42 -0
  76. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +421 -1
  77. data/lib/datadog_api_client/v1/models/toplist_widget_definition.rb +11 -1
  78. data/lib/datadog_api_client/v1/models/toplist_widget_display.rb +63 -0
  79. data/lib/datadog_api_client/v1/models/toplist_widget_flat.rb +98 -0
  80. data/lib/datadog_api_client/v1/models/toplist_widget_flat_type.rb +26 -0
  81. data/lib/datadog_api_client/v1/models/toplist_widget_legend.rb +28 -0
  82. data/lib/datadog_api_client/v1/models/toplist_widget_scaling.rb +27 -0
  83. data/lib/datadog_api_client/v1/models/toplist_widget_stacked.rb +119 -0
  84. data/lib/datadog_api_client/v1/models/toplist_widget_stacked_type.rb +26 -0
  85. data/lib/datadog_api_client/v1/models/toplist_widget_style.rb +90 -0
  86. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +11 -1
  87. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +11 -1
  88. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +11 -1
  89. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +6 -0
  90. data/lib/datadog_api_client/v2/api/containers_api.rb +129 -0
  91. data/lib/datadog_api_client/v2/api/key_management_api.rb +8 -0
  92. data/lib/datadog_api_client/v2/api/metrics_api.rb +6 -3
  93. data/lib/datadog_api_client/v2/api/roles_api.rb +2 -0
  94. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +66 -72
  95. data/lib/datadog_api_client/v2/api/service_scorecards_api.rb +457 -0
  96. data/lib/datadog_api_client/v2/api/teams_api.rb +2 -0
  97. data/lib/datadog_api_client/v2/model_base.rb +4 -0
  98. data/lib/datadog_api_client/v2/models/{mute_finding_request.rb → bulk_mute_findings_request.rb} +6 -6
  99. data/lib/datadog_api_client/v2/models/{mute_finding_request_attributes.rb → bulk_mute_findings_request_attributes.rb} +5 -5
  100. data/lib/datadog_api_client/v2/models/{mute_finding_request_data.rb → bulk_mute_findings_request_data.rb} +28 -7
  101. data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta.rb +82 -0
  102. data/lib/datadog_api_client/v2/models/bulk_mute_findings_request_meta_findings.rb +80 -0
  103. data/lib/datadog_api_client/v2/models/{mute_finding_request_properties.rb → bulk_mute_findings_request_properties.rb} +6 -6
  104. data/lib/datadog_api_client/v2/models/{mute_finding_response.rb → bulk_mute_findings_response.rb} +5 -5
  105. data/lib/datadog_api_client/v2/models/bulk_mute_findings_response_data.rb +90 -0
  106. data/lib/datadog_api_client/v2/models/{mute_finding_response_data.rb → container.rb} +9 -9
  107. data/lib/datadog_api_client/v2/models/container_attributes.rb +183 -0
  108. data/lib/datadog_api_client/v2/models/container_group.rb +110 -0
  109. data/lib/datadog_api_client/v2/models/container_group_attributes.rb +90 -0
  110. data/lib/datadog_api_client/v2/models/container_group_relationships.rb +80 -0
  111. data/lib/datadog_api_client/v2/models/container_group_relationships_link.rb +92 -0
  112. data/lib/datadog_api_client/v2/models/container_group_relationships_links.rb +80 -0
  113. data/lib/datadog_api_client/v2/models/container_group_type.rb +26 -0
  114. data/lib/datadog_api_client/v2/models/container_item.rb +63 -0
  115. data/lib/datadog_api_client/v2/models/container_meta.rb +80 -0
  116. data/lib/datadog_api_client/v2/models/container_meta_page.rb +160 -0
  117. data/lib/datadog_api_client/v2/models/container_meta_page_type.rb +26 -0
  118. data/lib/datadog_api_client/v2/models/container_type.rb +26 -0
  119. data/lib/datadog_api_client/v2/models/containers_response.rb +102 -0
  120. data/lib/datadog_api_client/v2/models/containers_response_links.rb +130 -0
  121. data/lib/datadog_api_client/v2/models/create_rule_request.rb +80 -0
  122. data/lib/datadog_api_client/v2/models/create_rule_request_data.rb +90 -0
  123. data/lib/datadog_api_client/v2/models/create_rule_response.rb +80 -0
  124. data/lib/datadog_api_client/v2/models/create_rule_response_data.rb +110 -0
  125. data/lib/datadog_api_client/v2/models/list_rules_response.rb +92 -0
  126. data/lib/datadog_api_client/v2/models/list_rules_response_data_item.rb +110 -0
  127. data/lib/datadog_api_client/v2/models/list_rules_response_links.rb +80 -0
  128. data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_create_attributes.rb +13 -1
  129. data/lib/datadog_api_client/v2/models/metric_bulk_tag_config_status_attributes.rb +12 -1
  130. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +13 -1
  131. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +13 -1
  132. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +13 -1
  133. data/lib/datadog_api_client/v2/models/outcome_type.rb +26 -0
  134. data/lib/datadog_api_client/v2/models/outcomes_batch_attributes.rb +82 -0
  135. data/lib/datadog_api_client/v2/models/outcomes_batch_request.rb +80 -0
  136. data/lib/datadog_api_client/v2/models/outcomes_batch_request_data.rb +90 -0
  137. data/lib/datadog_api_client/v2/models/outcomes_batch_request_item.rb +150 -0
  138. data/lib/datadog_api_client/v2/models/outcomes_batch_response.rb +121 -0
  139. data/lib/datadog_api_client/v2/models/outcomes_batch_response_attributes.rb +120 -0
  140. data/lib/datadog_api_client/v2/models/outcomes_batch_response_meta.rb +90 -0
  141. data/lib/datadog_api_client/v2/models/outcomes_batch_type.rb +26 -0
  142. data/lib/datadog_api_client/v2/models/outcomes_response.rb +104 -0
  143. data/lib/datadog_api_client/v2/models/outcomes_response_data_item.rb +110 -0
  144. data/lib/datadog_api_client/v2/models/outcomes_response_included_item.rb +100 -0
  145. data/lib/datadog_api_client/v2/models/outcomes_response_included_rule_attributes.rb +90 -0
  146. data/lib/datadog_api_client/v2/models/outcomes_response_links.rb +80 -0
  147. data/lib/datadog_api_client/v2/models/powerpack_group_widget.rb +14 -4
  148. data/lib/datadog_api_client/v2/models/relationship_to_outcome.rb +80 -0
  149. data/lib/datadog_api_client/v2/models/relationship_to_outcome_data.rb +90 -0
  150. data/lib/datadog_api_client/v2/models/relationship_to_rule.rb +80 -0
  151. data/lib/datadog_api_client/v2/models/relationship_to_rule_data.rb +80 -0
  152. data/lib/datadog_api_client/v2/models/relationship_to_rule_data_object.rb +90 -0
  153. data/lib/datadog_api_client/v2/models/rule_attributes.rb +160 -0
  154. data/lib/datadog_api_client/v2/models/rule_outcome_relationships.rb +80 -0
  155. data/lib/datadog_api_client/v2/models/rule_type.rb +26 -0
  156. data/lib/datadog_api_client/v2/models/scorecard_type.rb +26 -0
  157. data/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb +7 -7
  158. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
  159. data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +8 -8
  160. data/lib/datadog_api_client/v2/models/state.rb +28 -0
  161. data/lib/datadog_api_client/v2/models/teams_field.rb +40 -0
  162. data/lib/datadog_api_client/v2/models/user_team_permission_attributes.rb +1 -1
  163. data/lib/datadog_api_client/v2/models/widget_live_span.rb +40 -0
  164. data/lib/datadog_api_client/version.rb +1 -1
  165. metadata +113 -25
  166. data/examples/v2/confluent-cloud/DeleteConfluentAccount_2919241291.rb +0 -8
  167. data/examples/v2/downtimes/ListMonitorDowntimes_128979780.rb +0 -5
  168. data/examples/v2/key-management/CreateCurrentUserApplicationKey_1999509896.rb +0 -14
  169. data/examples/v2/key-management/DeleteApplicationKey_771691550.rb +0 -8
  170. data/examples/v2/key-management/DeleteCurrentUserApplicationKey_1266687064.rb +0 -8
  171. data/examples/v2/key-management/GetCurrentUserApplicationKey_1060640890.rb +0 -8
  172. data/examples/v2/key-management/ListApplicationKeys_2237010090.rb +0 -5
  173. data/examples/v2/key-management/ListCurrentUserApplicationKeys_1503860964.rb +0 -5
  174. data/examples/v2/security-monitoring/UpdateFinding.rb +0 -23
  175. data/examples/v2/synthetics/GetOnDemandConcurrencyCap_2633566918.rb +0 -5
  176. data/examples/v2/synthetics/SetOnDemandConcurrencyCap_2850884405.rb +0 -9
  177. data/examples/v2/usage-metering/GetUsageApplicationSecurityMonitoring_3959166796.rb +0 -8
  178. data/examples/v2/usage-metering/GetUsageLambdaTracedInvocations_1436752065.rb +0 -8
  179. data/examples/v2/usage-metering/GetUsageObservabilityPipelines_970725512.rb +0 -8
  180. data/examples/v2/users/GetUser_3047557953.rb +0 -8
  181. data/lib/datadog_api_client/v2/models/mute_finding_response_attributes.rb +0 -191
  182. data/lib/datadog_api_client/v2/models/mute_finding_response_properties.rb +0 -114
@@ -0,0 +1,80 @@
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
+ # Scorecard outcomes batch request.
21
+ class OutcomesBatchRequest
22
+ include BaseGenericModel
23
+
24
+ # Scorecard outcomes batch request data.
25
+ attr_accessor :data
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ # @!visibility private
29
+ def self.attribute_map
30
+ {
31
+ :'data' => :'data'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ # @!visibility private
37
+ def self.openapi_types
38
+ {
39
+ :'data' => :'OutcomesBatchRequestData'
40
+ }
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param attributes [Hash] Model attributes in the form of hash
45
+ # @!visibility private
46
+ def initialize(attributes = {})
47
+ if (!attributes.is_a?(Hash))
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchRequest` initialize method"
49
+ end
50
+
51
+ # check to see if the attribute exists and convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h|
53
+ if (!self.class.attribute_map.key?(k.to_sym))
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ end
56
+ h[k.to_sym] = v
57
+ }
58
+
59
+ if attributes.key?(:'data')
60
+ self.data = attributes[:'data']
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param o [Object] Object to be compared
66
+ # @!visibility private
67
+ def ==(o)
68
+ return true if self.equal?(o)
69
+ self.class == o.class &&
70
+ data == o.data
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Integer] Hash code
75
+ # @!visibility private
76
+ def hash
77
+ [data].hash
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,90 @@
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
+ # Scorecard outcomes batch request data.
21
+ class OutcomesBatchRequestData
22
+ include BaseGenericModel
23
+
24
+ # The JSON:API attributes for a batched set of scorecard outcomes.
25
+ attr_accessor :attributes
26
+
27
+ # The JSON:API type for scorecard outcomes.
28
+ attr_accessor :type
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'attributes' => :'attributes',
35
+ :'type' => :'type'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'attributes' => :'OutcomesBatchAttributes',
44
+ :'type' => :'OutcomesBatchType'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchRequestData` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'attributes')
65
+ self.attributes = attributes[:'attributes']
66
+ end
67
+
68
+ if attributes.key?(:'type')
69
+ self.type = attributes[:'type']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ attributes == o.attributes &&
80
+ type == o.type
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [attributes, type].hash
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,150 @@
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
+ # Scorecard outcome for a specific rule, for a given service within a batched update.
21
+ class OutcomesBatchRequestItem
22
+ include BaseGenericModel
23
+
24
+ # Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks.
25
+ attr_accessor :remarks
26
+
27
+ # The unique ID for a scorecard rule.
28
+ attr_reader :rule_id
29
+
30
+ # The unique name for a service in the catalog.
31
+ attr_reader :service_name
32
+
33
+ # The state of the rule evaluation.
34
+ attr_reader :state
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ # @!visibility private
38
+ def self.attribute_map
39
+ {
40
+ :'remarks' => :'remarks',
41
+ :'rule_id' => :'rule_id',
42
+ :'service_name' => :'service_name',
43
+ :'state' => :'state'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ # @!visibility private
49
+ def self.openapi_types
50
+ {
51
+ :'remarks' => :'String',
52
+ :'rule_id' => :'String',
53
+ :'service_name' => :'String',
54
+ :'state' => :'State'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param attributes [Hash] Model attributes in the form of hash
60
+ # @!visibility private
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchRequestItem` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchRequestItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'remarks')
75
+ self.remarks = attributes[:'remarks']
76
+ end
77
+
78
+ if attributes.key?(:'rule_id')
79
+ self.rule_id = attributes[:'rule_id']
80
+ end
81
+
82
+ if attributes.key?(:'service_name')
83
+ self.service_name = attributes[:'service_name']
84
+ end
85
+
86
+ if attributes.key?(:'state')
87
+ self.state = attributes[:'state']
88
+ end
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ # @!visibility private
94
+ def valid?
95
+ return false if @rule_id.nil?
96
+ return false if @service_name.nil?
97
+ return false if @state.nil?
98
+ true
99
+ end
100
+
101
+ # Custom attribute writer method with validation
102
+ # @param rule_id [Object] Object to be assigned
103
+ # @!visibility private
104
+ def rule_id=(rule_id)
105
+ if rule_id.nil?
106
+ fail ArgumentError, 'invalid value for "rule_id", rule_id cannot be nil.'
107
+ end
108
+ @rule_id = rule_id
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param service_name [Object] Object to be assigned
113
+ # @!visibility private
114
+ def service_name=(service_name)
115
+ if service_name.nil?
116
+ fail ArgumentError, 'invalid value for "service_name", service_name cannot be nil.'
117
+ end
118
+ @service_name = service_name
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param state [Object] Object to be assigned
123
+ # @!visibility private
124
+ def state=(state)
125
+ if state.nil?
126
+ fail ArgumentError, 'invalid value for "state", state cannot be nil.'
127
+ end
128
+ @state = state
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param o [Object] Object to be compared
133
+ # @!visibility private
134
+ def ==(o)
135
+ return true if self.equal?(o)
136
+ self.class == o.class &&
137
+ remarks == o.remarks &&
138
+ rule_id == o.rule_id &&
139
+ service_name == o.service_name &&
140
+ state == o.state
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ # @!visibility private
146
+ def hash
147
+ [remarks, rule_id, service_name, state].hash
148
+ end
149
+ end
150
+ end
@@ -0,0 +1,121 @@
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
+ # Scorecard outcomes batch response.
21
+ class OutcomesBatchResponse
22
+ include BaseGenericModel
23
+
24
+ # List of rule outcomes which were affected during the bulk operation.
25
+ attr_reader :data
26
+
27
+ # Metadata pertaining to the bulk operation.
28
+ attr_reader :meta
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'data' => :'data',
35
+ :'meta' => :'meta'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'data' => :'Array<OutcomesResponseDataItem>',
44
+ :'meta' => :'OutcomesBatchResponseMeta'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchResponse` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'data')
65
+ if (value = attributes[:'data']).is_a?(Array)
66
+ self.data = value
67
+ end
68
+ end
69
+
70
+ if attributes.key?(:'meta')
71
+ self.meta = attributes[:'meta']
72
+ end
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ # @!visibility private
78
+ def valid?
79
+ return false if @data.nil?
80
+ return false if @meta.nil?
81
+ true
82
+ end
83
+
84
+ # Custom attribute writer method with validation
85
+ # @param data [Object] Object to be assigned
86
+ # @!visibility private
87
+ def data=(data)
88
+ if data.nil?
89
+ fail ArgumentError, 'invalid value for "data", data cannot be nil.'
90
+ end
91
+ @data = data
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param meta [Object] Object to be assigned
96
+ # @!visibility private
97
+ def meta=(meta)
98
+ if meta.nil?
99
+ fail ArgumentError, 'invalid value for "meta", meta cannot be nil.'
100
+ end
101
+ @meta = meta
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param o [Object] Object to be compared
106
+ # @!visibility private
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ data == o.data &&
111
+ meta == o.meta
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ # @!visibility private
117
+ def hash
118
+ [data, meta].hash
119
+ end
120
+ end
121
+ end
@@ -0,0 +1,120 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # The JSON:API attributes for an outcome.
21
+ class OutcomesBatchResponseAttributes
22
+ include BaseGenericModel
23
+
24
+ # Creation time of the rule outcome.
25
+ attr_accessor :created_at
26
+
27
+ # Time of last rule outcome modification.
28
+ attr_accessor :modified_at
29
+
30
+ # Any remarks regarding the scorecard rule's evaluation, and supports HTML hyperlinks.
31
+ attr_accessor :remarks
32
+
33
+ # The unique name for a service in the catalog.
34
+ attr_accessor :service_name
35
+
36
+ # The state of the rule evaluation.
37
+ attr_accessor :state
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ # @!visibility private
41
+ def self.attribute_map
42
+ {
43
+ :'created_at' => :'created_at',
44
+ :'modified_at' => :'modified_at',
45
+ :'remarks' => :'remarks',
46
+ :'service_name' => :'service_name',
47
+ :'state' => :'state'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ # @!visibility private
53
+ def self.openapi_types
54
+ {
55
+ :'created_at' => :'Time',
56
+ :'modified_at' => :'Time',
57
+ :'remarks' => :'String',
58
+ :'service_name' => :'String',
59
+ :'state' => :'State'
60
+ }
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param attributes [Hash] Model attributes in the form of hash
65
+ # @!visibility private
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchResponseAttributes` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!self.class.attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchResponseAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'created_at')
80
+ self.created_at = attributes[:'created_at']
81
+ end
82
+
83
+ if attributes.key?(:'modified_at')
84
+ self.modified_at = attributes[:'modified_at']
85
+ end
86
+
87
+ if attributes.key?(:'remarks')
88
+ self.remarks = attributes[:'remarks']
89
+ end
90
+
91
+ if attributes.key?(:'service_name')
92
+ self.service_name = attributes[:'service_name']
93
+ end
94
+
95
+ if attributes.key?(:'state')
96
+ self.state = attributes[:'state']
97
+ end
98
+ end
99
+
100
+ # Checks equality by comparing each attribute.
101
+ # @param o [Object] Object to be compared
102
+ # @!visibility private
103
+ def ==(o)
104
+ return true if self.equal?(o)
105
+ self.class == o.class &&
106
+ created_at == o.created_at &&
107
+ modified_at == o.modified_at &&
108
+ remarks == o.remarks &&
109
+ service_name == o.service_name &&
110
+ state == o.state
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ # @!visibility private
116
+ def hash
117
+ [created_at, modified_at, remarks, service_name, state].hash
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,90 @@
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
+ # Metadata pertaining to the bulk operation.
21
+ class OutcomesBatchResponseMeta
22
+ include BaseGenericModel
23
+
24
+ # Total number of scorecard results received during the bulk operation.
25
+ attr_accessor :total_received
26
+
27
+ # Total number of scorecard results modified during the bulk operation.
28
+ attr_accessor :total_updated
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ # @!visibility private
32
+ def self.attribute_map
33
+ {
34
+ :'total_received' => :'total_received',
35
+ :'total_updated' => :'total_updated'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ # @!visibility private
41
+ def self.openapi_types
42
+ {
43
+ :'total_received' => :'Integer',
44
+ :'total_updated' => :'Integer'
45
+ }
46
+ end
47
+
48
+ # Initializes the object
49
+ # @param attributes [Hash] Model attributes in the form of hash
50
+ # @!visibility private
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OutcomesBatchResponseMeta` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::OutcomesBatchResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'total_received')
65
+ self.total_received = attributes[:'total_received']
66
+ end
67
+
68
+ if attributes.key?(:'total_updated')
69
+ self.total_updated = attributes[:'total_updated']
70
+ end
71
+ end
72
+
73
+ # Checks equality by comparing each attribute.
74
+ # @param o [Object] Object to be compared
75
+ # @!visibility private
76
+ def ==(o)
77
+ return true if self.equal?(o)
78
+ self.class == o.class &&
79
+ total_received == o.total_received &&
80
+ total_updated == o.total_updated
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Integer] Hash code
85
+ # @!visibility private
86
+ def hash
87
+ [total_received, total_updated].hash
88
+ end
89
+ end
90
+ 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
+ # The JSON:API type for scorecard outcomes.
21
+ class OutcomesBatchType
22
+ include BaseEnumModel
23
+
24
+ BATCHED_OUTCOME = "batched-outcome".freeze
25
+ end
26
+ end