datadog_api_client 2.16.0 → 2.17.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 (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,457 @@
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 'cgi'
17
+
18
+ module DatadogAPIClient::V2
19
+ class ServiceScorecardsAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Create outcomes batch.
27
+ #
28
+ # @see #create_scorecard_outcomes_batch_with_http_info
29
+ def create_scorecard_outcomes_batch(body, opts = {})
30
+ data, _status_code, _headers = create_scorecard_outcomes_batch_with_http_info(body, opts)
31
+ data
32
+ end
33
+
34
+ # Create outcomes batch.
35
+ #
36
+ # Sets multiple service-rule outcomes in a single batched request.
37
+ #
38
+ # @param body [OutcomesBatchRequest] Set of scorecard outcomes.
39
+ # @param opts [Hash] the optional parameters
40
+ # @return [Array<(OutcomesBatchResponse, Integer, Hash)>] OutcomesBatchResponse data, response status code and response headers
41
+ def create_scorecard_outcomes_batch_with_http_info(body, opts = {})
42
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_scorecard_outcomes_batch".to_sym]
43
+ if unstable_enabled
44
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_scorecard_outcomes_batch")
45
+ else
46
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_scorecard_outcomes_batch"))
47
+ end
48
+
49
+ if @api_client.config.debugging
50
+ @api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.create_scorecard_outcomes_batch ...'
51
+ end
52
+ # verify the required parameter 'body' is set
53
+ if @api_client.config.client_side_validation && body.nil?
54
+ fail ArgumentError, "Missing the required parameter 'body' when calling ServiceScorecardsAPI.create_scorecard_outcomes_batch"
55
+ end
56
+ # resource path
57
+ local_var_path = '/api/v2/scorecard/outcomes/batch'
58
+
59
+ # query parameters
60
+ query_params = opts[:query_params] || {}
61
+
62
+ # header parameters
63
+ header_params = opts[:header_params] || {}
64
+ # HTTP header 'Accept' (if needed)
65
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
66
+ # HTTP header 'Content-Type'
67
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
68
+
69
+ # form parameters
70
+ form_params = opts[:form_params] || {}
71
+
72
+ # http body (model)
73
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
74
+
75
+ # return_type
76
+ return_type = opts[:debug_return_type] || 'OutcomesBatchResponse'
77
+
78
+ # auth_names
79
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
80
+
81
+ new_options = opts.merge(
82
+ :operation => :create_scorecard_outcomes_batch,
83
+ :header_params => header_params,
84
+ :query_params => query_params,
85
+ :form_params => form_params,
86
+ :body => post_body,
87
+ :auth_names => auth_names,
88
+ :return_type => return_type,
89
+ :api_version => "V2"
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: ServiceScorecardsAPI#create_scorecard_outcomes_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
99
+ # Create a new rule.
100
+ #
101
+ # @see #create_scorecard_rule_with_http_info
102
+ def create_scorecard_rule(body, opts = {})
103
+ data, _status_code, _headers = create_scorecard_rule_with_http_info(body, opts)
104
+ data
105
+ end
106
+
107
+ # Create a new rule.
108
+ #
109
+ # Creates a new rule.
110
+ #
111
+ # @param body [CreateRuleRequest] Rule attributes.
112
+ # @param opts [Hash] the optional parameters
113
+ # @return [Array<(CreateRuleResponse, Integer, Hash)>] CreateRuleResponse data, response status code and response headers
114
+ def create_scorecard_rule_with_http_info(body, opts = {})
115
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_scorecard_rule".to_sym]
116
+ if unstable_enabled
117
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_scorecard_rule")
118
+ else
119
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_scorecard_rule"))
120
+ end
121
+
122
+ if @api_client.config.debugging
123
+ @api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.create_scorecard_rule ...'
124
+ end
125
+ # verify the required parameter 'body' is set
126
+ if @api_client.config.client_side_validation && body.nil?
127
+ fail ArgumentError, "Missing the required parameter 'body' when calling ServiceScorecardsAPI.create_scorecard_rule"
128
+ end
129
+ # resource path
130
+ local_var_path = '/api/v2/scorecard/rules'
131
+
132
+ # query parameters
133
+ query_params = opts[:query_params] || {}
134
+
135
+ # header parameters
136
+ header_params = opts[:header_params] || {}
137
+ # HTTP header 'Accept' (if needed)
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
139
+ # HTTP header 'Content-Type'
140
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
141
+
142
+ # form parameters
143
+ form_params = opts[:form_params] || {}
144
+
145
+ # http body (model)
146
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
147
+
148
+ # return_type
149
+ return_type = opts[:debug_return_type] || 'CreateRuleResponse'
150
+
151
+ # auth_names
152
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
153
+
154
+ new_options = opts.merge(
155
+ :operation => :create_scorecard_rule,
156
+ :header_params => header_params,
157
+ :query_params => query_params,
158
+ :form_params => form_params,
159
+ :body => post_body,
160
+ :auth_names => auth_names,
161
+ :return_type => return_type,
162
+ :api_version => "V2"
163
+ )
164
+
165
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
166
+ if @api_client.config.debugging
167
+ @api_client.config.logger.debug "API called: ServiceScorecardsAPI#create_scorecard_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
168
+ end
169
+ return data, status_code, headers
170
+ end
171
+
172
+ # Delete a rule.
173
+ #
174
+ # @see #delete_scorecard_rule_with_http_info
175
+ def delete_scorecard_rule(rule_id, opts = {})
176
+ delete_scorecard_rule_with_http_info(rule_id, opts)
177
+ nil
178
+ end
179
+
180
+ # Delete a rule.
181
+ #
182
+ # Deletes a single rule.
183
+ #
184
+ # @param rule_id [String] The ID of the rule/scorecard.
185
+ # @param opts [Hash] the optional parameters
186
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
187
+ def delete_scorecard_rule_with_http_info(rule_id, opts = {})
188
+ unstable_enabled = @api_client.config.unstable_operations["v2.delete_scorecard_rule".to_sym]
189
+ if unstable_enabled
190
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_scorecard_rule")
191
+ else
192
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_scorecard_rule"))
193
+ end
194
+
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.delete_scorecard_rule ...'
197
+ end
198
+ # verify the required parameter 'rule_id' is set
199
+ if @api_client.config.client_side_validation && rule_id.nil?
200
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling ServiceScorecardsAPI.delete_scorecard_rule"
201
+ end
202
+ # resource path
203
+ local_var_path = '/api/v2/scorecard/rules/{rule_id}'.sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/'))
204
+
205
+ # query parameters
206
+ query_params = opts[:query_params] || {}
207
+
208
+ # header parameters
209
+ header_params = opts[:header_params] || {}
210
+ # HTTP header 'Accept' (if needed)
211
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
212
+
213
+ # form parameters
214
+ form_params = opts[:form_params] || {}
215
+
216
+ # http body (model)
217
+ post_body = opts[:debug_body]
218
+
219
+ # return_type
220
+ return_type = opts[:debug_return_type]
221
+
222
+ # auth_names
223
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
224
+
225
+ new_options = opts.merge(
226
+ :operation => :delete_scorecard_rule,
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names,
232
+ :return_type => return_type,
233
+ :api_version => "V2"
234
+ )
235
+
236
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: ServiceScorecardsAPI#delete_scorecard_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
242
+
243
+ # List all rule outcomes.
244
+ #
245
+ # @see #list_scorecard_outcomes_with_http_info
246
+ def list_scorecard_outcomes(opts = {})
247
+ data, _status_code, _headers = list_scorecard_outcomes_with_http_info(opts)
248
+ data
249
+ end
250
+
251
+ # List all rule outcomes.
252
+ #
253
+ # Fetches all rule outcomes.
254
+ #
255
+ # @param opts [Hash] the optional parameters
256
+ # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
257
+ # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
258
+ # @option opts [String] :include Include related rule details in the response.
259
+ # @option opts [String] :fields_outcome Return only specified values in the outcome attributes.
260
+ # @option opts [String] :fields_rule Return only specified values in the included rule details.
261
+ # @option opts [String] :filter_outcome_service_name Filter the outcomes on a specific service name.
262
+ # @option opts [String] :filter_outcome_state Filter the outcomes by a specific state.
263
+ # @option opts [Boolean] :filter_rule_enabled Filter outcomes on whether a rule is enabled/disabled.
264
+ # @option opts [String] :filter_rule_id Filter outcomes based on rule ID.
265
+ # @option opts [String] :filter_rule_name Filter outcomes based on rule name.
266
+ # @return [Array<(OutcomesResponse, Integer, Hash)>] OutcomesResponse data, response status code and response headers
267
+ def list_scorecard_outcomes_with_http_info(opts = {})
268
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_scorecard_outcomes".to_sym]
269
+ if unstable_enabled
270
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_scorecard_outcomes")
271
+ else
272
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_scorecard_outcomes"))
273
+ end
274
+
275
+ if @api_client.config.debugging
276
+ @api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.list_scorecard_outcomes ...'
277
+ end
278
+ # resource path
279
+ local_var_path = '/api/v2/scorecard/outcomes'
280
+
281
+ # query parameters
282
+ query_params = opts[:query_params] || {}
283
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
284
+ query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
285
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
286
+ query_params[:'fields[outcome]'] = opts[:'fields_outcome'] if !opts[:'fields_outcome'].nil?
287
+ query_params[:'fields[rule]'] = opts[:'fields_rule'] if !opts[:'fields_rule'].nil?
288
+ query_params[:'filter[outcome][service_name]'] = opts[:'filter_outcome_service_name'] if !opts[:'filter_outcome_service_name'].nil?
289
+ query_params[:'filter[outcome][state]'] = opts[:'filter_outcome_state'] if !opts[:'filter_outcome_state'].nil?
290
+ query_params[:'filter[rule][enabled]'] = opts[:'filter_rule_enabled'] if !opts[:'filter_rule_enabled'].nil?
291
+ query_params[:'filter[rule][id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil?
292
+ query_params[:'filter[rule][name]'] = opts[:'filter_rule_name'] if !opts[:'filter_rule_name'].nil?
293
+
294
+ # header parameters
295
+ header_params = opts[:header_params] || {}
296
+ # HTTP header 'Accept' (if needed)
297
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
298
+
299
+ # form parameters
300
+ form_params = opts[:form_params] || {}
301
+
302
+ # http body (model)
303
+ post_body = opts[:debug_body]
304
+
305
+ # return_type
306
+ return_type = opts[:debug_return_type] || 'OutcomesResponse'
307
+
308
+ # auth_names
309
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
310
+
311
+ new_options = opts.merge(
312
+ :operation => :list_scorecard_outcomes,
313
+ :header_params => header_params,
314
+ :query_params => query_params,
315
+ :form_params => form_params,
316
+ :body => post_body,
317
+ :auth_names => auth_names,
318
+ :return_type => return_type,
319
+ :api_version => "V2"
320
+ )
321
+
322
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug "API called: ServiceScorecardsAPI#list_scorecard_outcomes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
325
+ end
326
+ return data, status_code, headers
327
+ end
328
+
329
+ # List all rule outcomes.
330
+ #
331
+ # Provide a paginated version of {#list_scorecard_outcomes}, returning all items.
332
+ #
333
+ # To use it you need to use a block: list_scorecard_outcomes_with_pagination { |item| p item }
334
+ #
335
+ # @yield [OutcomesResponseDataItem] Paginated items
336
+ def list_scorecard_outcomes_with_pagination(opts = {})
337
+ api_version = "V2"
338
+ page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
339
+ @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
340
+ while true do
341
+ response = list_scorecard_outcomes(opts)
342
+ @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
343
+ if @api_client.get_attribute_from_path(response, "data").length < page_size
344
+ break
345
+ end
346
+ @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
347
+ end
348
+ end
349
+
350
+ # List all rules.
351
+ #
352
+ # @see #list_scorecard_rules_with_http_info
353
+ def list_scorecard_rules(opts = {})
354
+ data, _status_code, _headers = list_scorecard_rules_with_http_info(opts)
355
+ data
356
+ end
357
+
358
+ # List all rules.
359
+ #
360
+ # Fetch all rules.
361
+ #
362
+ # @param opts [Hash] the optional parameters
363
+ # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
364
+ # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
365
+ # @option opts [String] :include Include related scorecard details in the response.
366
+ # @option opts [String] :filter_rule_id Filter the rules on a rule ID.
367
+ # @option opts [Boolean] :filter_rule_enabled Filter for enabled rules only.
368
+ # @option opts [Boolean] :filter_rule_custom Filter for custom rules only.
369
+ # @option opts [String] :filter_rule_name Filter rules on the rule name.
370
+ # @option opts [String] :filter_rule_description Filter rules on the rule description.
371
+ # @option opts [String] :fields_rule Return only specific fields in the response for rule attributes.
372
+ # @option opts [String] :fields_scorecard Return only specific fields in the included response for scorecard attributes.
373
+ # @return [Array<(ListRulesResponse, Integer, Hash)>] ListRulesResponse data, response status code and response headers
374
+ def list_scorecard_rules_with_http_info(opts = {})
375
+ unstable_enabled = @api_client.config.unstable_operations["v2.list_scorecard_rules".to_sym]
376
+ if unstable_enabled
377
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_scorecard_rules")
378
+ else
379
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_scorecard_rules"))
380
+ end
381
+
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: ServiceScorecardsAPI.list_scorecard_rules ...'
384
+ end
385
+ # resource path
386
+ local_var_path = '/api/v2/scorecard/rules'
387
+
388
+ # query parameters
389
+ query_params = opts[:query_params] || {}
390
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
391
+ query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
392
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
393
+ query_params[:'filter[rule][id]'] = opts[:'filter_rule_id'] if !opts[:'filter_rule_id'].nil?
394
+ query_params[:'filter[rule][enabled]'] = opts[:'filter_rule_enabled'] if !opts[:'filter_rule_enabled'].nil?
395
+ query_params[:'filter[rule][custom]'] = opts[:'filter_rule_custom'] if !opts[:'filter_rule_custom'].nil?
396
+ query_params[:'filter[rule][name]'] = opts[:'filter_rule_name'] if !opts[:'filter_rule_name'].nil?
397
+ query_params[:'filter[rule][description]'] = opts[:'filter_rule_description'] if !opts[:'filter_rule_description'].nil?
398
+ query_params[:'fields[rule]'] = opts[:'fields_rule'] if !opts[:'fields_rule'].nil?
399
+ query_params[:'fields[scorecard]'] = opts[:'fields_scorecard'] if !opts[:'fields_scorecard'].nil?
400
+
401
+ # header parameters
402
+ header_params = opts[:header_params] || {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+
406
+ # form parameters
407
+ form_params = opts[:form_params] || {}
408
+
409
+ # http body (model)
410
+ post_body = opts[:debug_body]
411
+
412
+ # return_type
413
+ return_type = opts[:debug_return_type] || 'ListRulesResponse'
414
+
415
+ # auth_names
416
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
417
+
418
+ new_options = opts.merge(
419
+ :operation => :list_scorecard_rules,
420
+ :header_params => header_params,
421
+ :query_params => query_params,
422
+ :form_params => form_params,
423
+ :body => post_body,
424
+ :auth_names => auth_names,
425
+ :return_type => return_type,
426
+ :api_version => "V2"
427
+ )
428
+
429
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
430
+ if @api_client.config.debugging
431
+ @api_client.config.logger.debug "API called: ServiceScorecardsAPI#list_scorecard_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
432
+ end
433
+ return data, status_code, headers
434
+ end
435
+
436
+ # List all rules.
437
+ #
438
+ # Provide a paginated version of {#list_scorecard_rules}, returning all items.
439
+ #
440
+ # To use it you need to use a block: list_scorecard_rules_with_pagination { |item| p item }
441
+ #
442
+ # @yield [ListRulesResponseDataItem] Paginated items
443
+ def list_scorecard_rules_with_pagination(opts = {})
444
+ api_version = "V2"
445
+ page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
446
+ @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
447
+ while true do
448
+ response = list_scorecard_rules(opts)
449
+ @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
450
+ if @api_client.get_attribute_from_path(response, "data").length < page_size
451
+ break
452
+ end
453
+ @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
454
+ end
455
+ end
456
+ end
457
+ end
@@ -867,6 +867,7 @@ module DatadogAPIClient::V2
867
867
  # @option opts [Array<ListTeamsInclude>] :include Included related resources optionally requested. Allowed enum values: `team_links, user_team_permissions`
868
868
  # @option opts [String] :filter_keyword Search query. Can be team name, team handle, or email of team member
869
869
  # @option opts [Boolean] :filter_me When true, only returns teams the current user belongs to
870
+ # @option opts [Array<TeamsField>] :fields_team List of fields that need to be fetched.
870
871
  # @return [Array<(TeamsResponse, Integer, Hash)>] TeamsResponse data, response status code and response headers
871
872
  def list_teams_with_http_info(opts = {})
872
873
 
@@ -888,6 +889,7 @@ module DatadogAPIClient::V2
888
889
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil?
889
890
  query_params[:'filter[keyword]'] = opts[:'filter_keyword'] if !opts[:'filter_keyword'].nil?
890
891
  query_params[:'filter[me]'] = opts[:'filter_me'] if !opts[:'filter_me'].nil?
892
+ query_params[:'fields[team]'] = @api_client.build_collection_param(opts[:'fields_team'], :csv) if !opts[:'fields_team'].nil?
891
893
 
892
894
  # header parameters
893
895
  header_params = opts[:header_params] || {}
@@ -118,6 +118,8 @@ module DatadogAPIClient::V2
118
118
  when :Array
119
119
  # generic array, return directly
120
120
  value
121
+ when :UUID
122
+ value.to_s
121
123
  when /\AArray<(?<inner_type>.+)>\z/
122
124
  inner_type = Regexp.last_match[:inner_type]
123
125
  value.map { |v| _deserialize(inner_type, v) }
@@ -247,6 +249,8 @@ module DatadogAPIClient::V2
247
249
  return data if data.instance_of?(String)
248
250
  when 'Object' # "type: object"
249
251
  return data if data.instance_of?(Hash)
252
+ when 'UUID'
253
+ return UUIDTools::UUID.parse(data)
250
254
  when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
251
255
  if data.instance_of?(Array)
252
256
  sub_type = Regexp.last_match[:sub_type]
@@ -17,11 +17,11 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # The new mute finding request.
21
- class MuteFindingRequest
20
+ # The new bulk mute finding request.
21
+ class BulkMuteFindingsRequest
22
22
  include BaseGenericModel
23
23
 
24
- # Data object containing the new mute properties of the finding.
24
+ # Data object containing the new bulk mute properties of the finding.
25
25
  attr_reader :data
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,7 +36,7 @@ module DatadogAPIClient::V2
36
36
  # @!visibility private
37
37
  def self.openapi_types
38
38
  {
39
- :'data' => :'MuteFindingRequestData'
39
+ :'data' => :'BulkMuteFindingsRequestData'
40
40
  }
41
41
  end
42
42
 
@@ -45,13 +45,13 @@ module DatadogAPIClient::V2
45
45
  # @!visibility private
46
46
  def initialize(attributes = {})
47
47
  if (!attributes.is_a?(Hash))
48
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MuteFindingRequest` initialize method"
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequest` initialize method"
49
49
  end
50
50
 
51
51
  # check to see if the attribute exists and convert string to symbol for hash key
52
52
  attributes = attributes.each_with_object({}) { |(k, v), h|
53
53
  if (!self.class.attribute_map.key?(k.to_sym))
54
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MuteFindingRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
55
  end
56
56
  h[k.to_sym] = v
57
57
  }
@@ -18,10 +18,10 @@ require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
20
  # The mute properties to be updated.
21
- class MuteFindingRequestAttributes
21
+ class BulkMuteFindingsRequestAttributes
22
22
  include BaseGenericModel
23
23
 
24
- # Object containing the new mute properties of the finding.
24
+ # Object containing the new mute properties of the findings.
25
25
  attr_reader :mute
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,7 +36,7 @@ module DatadogAPIClient::V2
36
36
  # @!visibility private
37
37
  def self.openapi_types
38
38
  {
39
- :'mute' => :'MuteFindingRequestProperties'
39
+ :'mute' => :'BulkMuteFindingsRequestProperties'
40
40
  }
41
41
  end
42
42
 
@@ -45,13 +45,13 @@ module DatadogAPIClient::V2
45
45
  # @!visibility private
46
46
  def initialize(attributes = {})
47
47
  if (!attributes.is_a?(Hash))
48
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MuteFindingRequestAttributes` initialize method"
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequestAttributes` initialize method"
49
49
  end
50
50
 
51
51
  # check to see if the attribute exists and convert string to symbol for hash key
52
52
  attributes = attributes.each_with_object({}) { |(k, v), h|
53
53
  if (!self.class.attribute_map.key?(k.to_sym))
54
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MuteFindingRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequestAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
55
  end
56
56
  h[k.to_sym] = v
57
57
  }
@@ -17,16 +17,19 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # Data object containing the new mute properties of the finding.
21
- class MuteFindingRequestData
20
+ # Data object containing the new bulk mute properties of the finding.
21
+ class BulkMuteFindingsRequestData
22
22
  include BaseGenericModel
23
23
 
24
24
  # The mute properties to be updated.
25
25
  attr_reader :attributes
26
26
 
27
- # The unique ID for this finding.
27
+ # UUID to identify the request
28
28
  attr_reader :id
29
29
 
30
+ # Meta object containing the findings to be updated.
31
+ attr_reader :meta
32
+
30
33
  # The JSON:API type for findings.
31
34
  attr_reader :type
32
35
 
@@ -36,6 +39,7 @@ module DatadogAPIClient::V2
36
39
  {
37
40
  :'attributes' => :'attributes',
38
41
  :'id' => :'id',
42
+ :'meta' => :'meta',
39
43
  :'type' => :'type'
40
44
  }
41
45
  end
@@ -44,8 +48,9 @@ module DatadogAPIClient::V2
44
48
  # @!visibility private
45
49
  def self.openapi_types
46
50
  {
47
- :'attributes' => :'MuteFindingRequestAttributes',
51
+ :'attributes' => :'BulkMuteFindingsRequestAttributes',
48
52
  :'id' => :'String',
53
+ :'meta' => :'BulkMuteFindingsRequestMeta',
49
54
  :'type' => :'FindingType'
50
55
  }
51
56
  end
@@ -55,13 +60,13 @@ module DatadogAPIClient::V2
55
60
  # @!visibility private
56
61
  def initialize(attributes = {})
57
62
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MuteFindingRequestData` initialize method"
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BulkMuteFindingsRequestData` initialize method"
59
64
  end
60
65
 
61
66
  # check to see if the attribute exists and convert string to symbol for hash key
62
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
63
68
  if (!self.class.attribute_map.key?(k.to_sym))
64
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::MuteFindingRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::BulkMuteFindingsRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
70
  end
66
71
  h[k.to_sym] = v
67
72
  }
@@ -74,6 +79,10 @@ module DatadogAPIClient::V2
74
79
  self.id = attributes[:'id']
75
80
  end
76
81
 
82
+ if attributes.key?(:'meta')
83
+ self.meta = attributes[:'meta']
84
+ end
85
+
77
86
  if attributes.key?(:'type')
78
87
  self.type = attributes[:'type']
79
88
  end
@@ -85,6 +94,7 @@ module DatadogAPIClient::V2
85
94
  def valid?
86
95
  return false if @attributes.nil?
87
96
  return false if @id.nil?
97
+ return false if @meta.nil?
88
98
  return false if @type.nil?
89
99
  true
90
100
  end
@@ -109,6 +119,16 @@ module DatadogAPIClient::V2
109
119
  @id = id
110
120
  end
111
121
 
122
+ # Custom attribute writer method with validation
123
+ # @param meta [Object] Object to be assigned
124
+ # @!visibility private
125
+ def meta=(meta)
126
+ if meta.nil?
127
+ fail ArgumentError, 'invalid value for "meta", meta cannot be nil.'
128
+ end
129
+ @meta = meta
130
+ end
131
+
112
132
  # Custom attribute writer method with validation
113
133
  # @param type [Object] Object to be assigned
114
134
  # @!visibility private
@@ -127,6 +147,7 @@ module DatadogAPIClient::V2
127
147
  self.class == o.class &&
128
148
  attributes == o.attributes &&
129
149
  id == o.id &&
150
+ meta == o.meta &&
130
151
  type == o.type
131
152
  end
132
153
 
@@ -134,7 +155,7 @@ module DatadogAPIClient::V2
134
155
  # @return [Integer] Hash code
135
156
  # @!visibility private
136
157
  def hash
137
- [attributes, id, type].hash
158
+ [attributes, id, meta, type].hash
138
159
  end
139
160
  end
140
161
  end