datadog_api_client 2.13.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +181 -16
  4. data/.generator/schemas/v2/openapi.yaml +391 -151
  5. data/.generator/src/generator/formatter.py +34 -29
  6. data/.generator/src/generator/templates/api_client.j2 +81 -53
  7. data/.generator/src/generator/templates/configuration.j2 +21 -0
  8. data/.pre-commit-config.yaml +2 -2
  9. data/CHANGELOG.md +31 -0
  10. data/README.md +23 -0
  11. data/examples/v1/azure-integration/CreateAzureIntegration.rb +3 -0
  12. data/examples/v1/azure-integration/DeleteAzureIntegration.rb +3 -0
  13. data/examples/v1/azure-integration/UpdateAzureHostFilters.rb +3 -0
  14. data/examples/v1/azure-integration/UpdateAzureIntegration.rb +3 -0
  15. data/examples/v1/dashboards/CreateDashboard_252716965.rb +6 -0
  16. data/examples/v1/dashboards/DeletePublicDashboardInvitation.rb +3 -3
  17. data/examples/v1/synthetics/CreateSyntheticsAPITest_1487281163.rb +1 -0
  18. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent.rb +3 -0
  19. data/examples/v2/ci-visibility-pipelines/CreateCIAppPipelineEvent_129899466.rb +3 -0
  20. data/examples/v2/logs/AggregateLogs_2955613758.rb +1 -1
  21. data/examples/v2/teams/CreateTeam.rb +2 -2
  22. data/examples/v2/teams/CreateTeam_252121814.rb +24 -0
  23. data/examples/v2/teams/GetUserMemberships.rb +8 -0
  24. data/examples/v2/teams/UpdateTeam.rb +9 -0
  25. data/lib/datadog_api_client/api_client.rb +81 -53
  26. data/lib/datadog_api_client/configuration.rb +22 -0
  27. data/lib/datadog_api_client/inflector.rb +10 -1
  28. data/lib/datadog_api_client/v1/api/service_level_objective_corrections_api.rb +2 -2
  29. data/lib/datadog_api_client/v1/api/service_level_objectives_api.rb +10 -10
  30. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  31. data/lib/datadog_api_client/v1/models/azure_account.rb +32 -1
  32. data/lib/datadog_api_client/v1/models/distribution_widget_definition.rb +13 -1
  33. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
  34. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
  35. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
  36. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  37. data/lib/datadog_api_client/v1/models/usage_ci_visibility_hour.rb +12 -1
  38. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +24 -4
  39. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +24 -4
  40. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +24 -4
  41. data/lib/datadog_api_client/v1/models/widget_comparator.rb +1 -0
  42. data/lib/datadog_api_client/v2/api/ci_visibility_pipelines_api.rb +10 -6
  43. data/lib/datadog_api_client/v2/api/ip_allowlist_api.rb +2 -2
  44. data/lib/datadog_api_client/v2/api/metrics_api.rb +1 -1
  45. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +3 -3
  46. data/lib/datadog_api_client/v2/api/spans_metrics_api.rb +2 -2
  47. data/lib/datadog_api_client/v2/api/teams_api.rb +65 -0
  48. data/lib/datadog_api_client/v2/models/application_key_create_attributes.rb +1 -1
  49. data/lib/datadog_api_client/v2/models/application_key_update_attributes.rb +1 -1
  50. data/lib/datadog_api_client/v2/models/audit_logs_event_attributes.rb +11 -1
  51. data/lib/datadog_api_client/v2/models/ci_app_event_attributes.rb +9 -21
  52. data/lib/datadog_api_client/v2/models/ci_app_pipeline_event.rb +1 -1
  53. data/lib/datadog_api_client/v2/models/{team_data.rb → ci_app_pipeline_event_attributes.rb} +24 -62
  54. data/lib/datadog_api_client/v2/models/ci_app_pipeline_level.rb +30 -0
  55. data/lib/datadog_api_client/v2/models/ci_app_pipelines_query_filter.rb +1 -1
  56. data/lib/datadog_api_client/v2/models/ci_app_test_level.rb +29 -0
  57. data/lib/datadog_api_client/v2/models/ci_app_tests_analytics_aggregate_response.rb +1 -1
  58. data/lib/datadog_api_client/v2/models/ci_app_tests_query_filter.rb +1 -1
  59. data/lib/datadog_api_client/v2/models/cloud_configuration_rule_compliance_signal_options.rb +25 -1
  60. data/lib/datadog_api_client/v2/models/dashboard_list_item.rb +25 -1
  61. data/lib/datadog_api_client/v2/models/downtime_schedule_one_time_response.rb +19 -1
  62. data/lib/datadog_api_client/v2/models/formula_limit.rb +1 -0
  63. data/lib/datadog_api_client/v2/models/full_application_key_attributes.rb +1 -1
  64. data/lib/datadog_api_client/v2/models/logs_aggregate_request.rb +1 -1
  65. data/lib/datadog_api_client/v2/models/logs_aggregate_request_page.rb +1 -1
  66. data/lib/datadog_api_client/v2/models/logs_group_by.rb +3 -2
  67. data/lib/datadog_api_client/v2/models/logs_group_by_histogram.rb +1 -1
  68. data/lib/datadog_api_client/v2/models/logs_list_request.rb +1 -1
  69. data/lib/datadog_api_client/v2/models/logs_query_options.rb +1 -1
  70. data/lib/datadog_api_client/v2/models/logs_response_metadata_page.rb +1 -1
  71. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap.rb +14 -4
  72. data/lib/datadog_api_client/v2/models/on_demand_concurrency_cap_type.rb +26 -0
  73. data/lib/datadog_api_client/v2/models/partial_application_key_attributes.rb +1 -1
  74. data/lib/datadog_api_client/v2/models/query_formula.rb +1 -0
  75. data/lib/datadog_api_client/v2/models/relationship_to_team_links.rb +14 -4
  76. data/lib/datadog_api_client/v2/models/relationship_to_user_team_permission.rb +14 -4
  77. data/lib/datadog_api_client/v2/models/security_monitoring_signal_metadata_type.rb +26 -0
  78. data/lib/datadog_api_client/v2/models/security_monitoring_signal_response.rb +80 -0
  79. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response_query.rb +26 -2
  80. data/lib/datadog_api_client/v2/models/security_monitoring_signal_state_update_data.rb +24 -4
  81. data/lib/datadog_api_client/v2/models/security_monitoring_signal_triage_update_data.rb +24 -4
  82. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +1 -19
  83. data/lib/datadog_api_client/v2/models/security_monitoring_triage_user.rb +11 -1
  84. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_get_config_response_data.rb +11 -1
  85. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_meta.rb +11 -1
  86. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +11 -1
  87. data/lib/datadog_api_client/v2/models/team_attributes.rb +50 -4
  88. data/lib/datadog_api_client/v2/models/team_create_attributes.rb +57 -4
  89. data/lib/datadog_api_client/v2/models/team_relationships_links.rb +80 -0
  90. data/lib/datadog_api_client/v2/models/team_response.rb +1 -1
  91. data/lib/datadog_api_client/v2/models/team_update_attributes.rb +57 -4
  92. data/lib/datadog_api_client/v2/models/teams_response.rb +24 -4
  93. data/lib/datadog_api_client/v2/models/teams_response_links.rb +129 -0
  94. data/lib/datadog_api_client/v2/models/teams_response_meta.rb +80 -0
  95. data/lib/datadog_api_client/v2/models/teams_response_meta_pagination.rb +150 -0
  96. data/lib/datadog_api_client/v2/models/usage_attributes_object.rb +11 -1
  97. data/lib/datadog_api_client/v2/models/user_teams_response.rb +24 -4
  98. data/lib/datadog_api_client/version.rb +1 -1
  99. data/spec/configuration_spec.rb +17 -0
  100. data/spec/retry_spec.rb +44 -0
  101. metadata +16 -3
@@ -33,7 +33,7 @@ module DatadogAPIClient::V2
33
33
 
34
34
  # Aggregate pipelines events.
35
35
  #
36
- # The API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries.
36
+ # Use this API endpoint to aggregate CI Visibility pipeline events into buckets of computed metrics and timeseries.
37
37
  #
38
38
  # @param body [CIAppPipelinesAggregateRequest]
39
39
  # @param opts [Hash] the optional parameters
@@ -100,16 +100,20 @@ module DatadogAPIClient::V2
100
100
 
101
101
  # Send pipeline event.
102
102
  #
103
- # Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see the [guide](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/).
103
+ # Send your pipeline event to your Datadog platform over HTTP. For details about how pipeline executions are modeled and what execution types we support, see [Pipeline Data Model And Execution Types](https://docs.datadoghq.com/continuous_integration/guides/pipeline_data_model/).
104
104
  #
105
105
  # Pipeline events can be submitted with a timestamp that is up to 18 hours in the past.
106
106
  #
107
- # This API endpoint is in private beta.
108
- #
109
107
  # @param body [CIAppCreatePipelineEventRequest]
110
108
  # @param opts [Hash] the optional parameters
111
109
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
112
110
  def create_ci_app_pipeline_event_with_http_info(body, opts = {})
111
+ unstable_enabled = @api_client.config.unstable_operations["v2.create_ci_app_pipeline_event".to_sym]
112
+ if unstable_enabled
113
+ @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_ci_app_pipeline_event")
114
+ else
115
+ raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_ci_app_pipeline_event"))
116
+ end
113
117
 
114
118
  if @api_client.config.debugging
115
119
  @api_client.config.logger.debug 'Calling API: CIVisibilityPipelinesAPI.create_ci_app_pipeline_event ...'
@@ -171,7 +175,7 @@ module DatadogAPIClient::V2
171
175
 
172
176
  # Get a list of pipelines events.
173
177
  #
174
- # List endpoint returns CI Visibility pipeline events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/).
178
+ # List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
175
179
  # [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
176
180
  #
177
181
  # Use this endpoint to see your latest pipeline events.
@@ -274,7 +278,7 @@ module DatadogAPIClient::V2
274
278
 
275
279
  # Search pipelines events.
276
280
  #
277
- # List endpoint returns CI Visibility pipeline events that match a [log search query](https://docs.datadoghq.com/logs/explorer/search_syntax/).
281
+ # List endpoint returns CI Visibility pipeline events that match a [search query](https://docs.datadoghq.com/continuous_integration/explorer/search_syntax/).
278
282
  # [Results are paginated similarly to logs](https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination).
279
283
  #
280
284
  # Use this endpoint to build complex events filtering and search.
@@ -63,7 +63,7 @@ module DatadogAPIClient::V2
63
63
  return_type = opts[:debug_return_type] || 'IPAllowlistResponse'
64
64
 
65
65
  # auth_names
66
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
66
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
67
67
 
68
68
  new_options = opts.merge(
69
69
  :operation => :get_ip_allowlist,
@@ -130,7 +130,7 @@ module DatadogAPIClient::V2
130
130
  return_type = opts[:debug_return_type] || 'IPAllowlistResponse'
131
131
 
132
132
  # auth_names
133
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
133
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
134
134
 
135
135
  new_options = opts.merge(
136
136
  :operation => :update_ip_allowlist,
@@ -541,7 +541,7 @@ module DatadogAPIClient::V2
541
541
  # @option opts [Boolean] :filter_include_percentiles Filter distributions with additional percentile aggregations enabled or disabled.
542
542
  # @option opts [Boolean] :filter_queried Filter custom metrics that have or have not been queried in the specified window[seconds]. If no window is provided or the window is less than 2 hours, a default of 2 hours will be applied.
543
543
  # @option opts [String] :filter_tags Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Can only be combined with the filter[queried] filter.
544
- # @option opts [Integer] :window_seconds The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Defaults value is 3600 (1 hour), maximum value is 1,209,600 (2 weeks).
544
+ # @option opts [Integer] :window_seconds The number of seconds of look back (from now) to apply to a filter[tag] or filter[queried] query. Default value is 3600 (1 hour), maximum value is 2,592,000 (30 days).
545
545
  # @return [Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>] MetricsAndMetricTagConfigurationsResponse data, response status code and response headers
546
546
  def list_tag_configurations_with_http_info(opts = {})
547
547
 
@@ -729,7 +729,7 @@ module DatadogAPIClient::V2
729
729
  #
730
730
  # @param signal_id [String] The ID of the signal.
731
731
  # @param opts [Hash] the optional parameters
732
- # @return [Array<(SecurityMonitoringSignal, Integer, Hash)>] SecurityMonitoringSignal data, response status code and response headers
732
+ # @return [Array<(SecurityMonitoringSignalResponse, Integer, Hash)>] SecurityMonitoringSignalResponse data, response status code and response headers
733
733
  def get_security_monitoring_signal_with_http_info(signal_id, opts = {})
734
734
 
735
735
  if @api_client.config.debugging
@@ -757,7 +757,7 @@ module DatadogAPIClient::V2
757
757
  post_body = opts[:debug_body]
758
758
 
759
759
  # return_type
760
- return_type = opts[:debug_return_type] || 'SecurityMonitoringSignal'
760
+ return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalResponse'
761
761
 
762
762
  # auth_names
763
763
  auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
@@ -1309,7 +1309,7 @@ module DatadogAPIClient::V2
1309
1309
  return_type = opts[:debug_return_type] || 'MuteFindingResponse'
1310
1310
 
1311
1311
  # auth_names
1312
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1312
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
1313
1313
 
1314
1314
  new_options = opts.merge(
1315
1315
  :operation => :update_finding,
@@ -201,7 +201,7 @@ module DatadogAPIClient::V2
201
201
  return_type = opts[:debug_return_type] || 'SpansMetricResponse'
202
202
 
203
203
  # auth_names
204
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
204
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
205
205
 
206
206
  new_options = opts.merge(
207
207
  :operation => :get_spans_metric,
@@ -261,7 +261,7 @@ module DatadogAPIClient::V2
261
261
  return_type = opts[:debug_return_type] || 'SpansMetricsResponse'
262
262
 
263
263
  # auth_names
264
- auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
264
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
265
265
 
266
266
  new_options = opts.merge(
267
267
  :operation => :list_spans_metrics,
@@ -782,6 +782,71 @@ module DatadogAPIClient::V2
782
782
  return data, status_code, headers
783
783
  end
784
784
 
785
+ # Get user memberships.
786
+ #
787
+ # @see #get_user_memberships_with_http_info
788
+ def get_user_memberships(user_uuid, opts = {})
789
+ data, _status_code, _headers = get_user_memberships_with_http_info(user_uuid, opts)
790
+ data
791
+ end
792
+
793
+ # Get user memberships.
794
+ #
795
+ # Get a list of memberships for a user
796
+ #
797
+ # @param user_uuid [String] None
798
+ # @param opts [Hash] the optional parameters
799
+ # @return [Array<(UserTeamsResponse, Integer, Hash)>] UserTeamsResponse data, response status code and response headers
800
+ def get_user_memberships_with_http_info(user_uuid, opts = {})
801
+
802
+ if @api_client.config.debugging
803
+ @api_client.config.logger.debug 'Calling API: TeamsAPI.get_user_memberships ...'
804
+ end
805
+ # verify the required parameter 'user_uuid' is set
806
+ if @api_client.config.client_side_validation && user_uuid.nil?
807
+ fail ArgumentError, "Missing the required parameter 'user_uuid' when calling TeamsAPI.get_user_memberships"
808
+ end
809
+ # resource path
810
+ local_var_path = '/api/v2/users/{user_uuid}/memberships'.sub('{user_uuid}', CGI.escape(user_uuid.to_s).gsub('%2F', '/'))
811
+
812
+ # query parameters
813
+ query_params = opts[:query_params] || {}
814
+
815
+ # header parameters
816
+ header_params = opts[:header_params] || {}
817
+ # HTTP header 'Accept' (if needed)
818
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
819
+
820
+ # form parameters
821
+ form_params = opts[:form_params] || {}
822
+
823
+ # http body (model)
824
+ post_body = opts[:debug_body]
825
+
826
+ # return_type
827
+ return_type = opts[:debug_return_type] || 'UserTeamsResponse'
828
+
829
+ # auth_names
830
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
831
+
832
+ new_options = opts.merge(
833
+ :operation => :get_user_memberships,
834
+ :header_params => header_params,
835
+ :query_params => query_params,
836
+ :form_params => form_params,
837
+ :body => post_body,
838
+ :auth_names => auth_names,
839
+ :return_type => return_type,
840
+ :api_version => "V2"
841
+ )
842
+
843
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
844
+ if @api_client.config.debugging
845
+ @api_client.config.logger.debug "API called: TeamsAPI#get_user_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
846
+ end
847
+ return data, status_code, headers
848
+ end
849
+
785
850
  # Get all teams.
786
851
  #
787
852
  # @see #list_teams_with_http_info
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Name of the application key.
25
25
  attr_reader :name
26
26
 
27
- # Array of scopes to grant the application key. This feature is in private beta, please contact Datadog support to enable scopes for your application keys.
27
+ # Array of scopes to grant the application key.
28
28
  attr_accessor :scopes
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # Name of the application key.
25
25
  attr_accessor :name
26
26
 
27
- # Array of scopes to grant the application key. This feature is in private beta, please contact Datadog support to enable scopes for your application keys.
27
+ # Array of scopes to grant the application key.
28
28
  attr_accessor :scopes
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -24,6 +24,9 @@ module DatadogAPIClient::V2
24
24
  # JSON object of attributes from Audit Logs events.
25
25
  attr_accessor :attributes
26
26
 
27
+ # Message of the event.
28
+ attr_accessor :message
29
+
27
30
  # Name of the application or service generating Audit Logs events.
28
31
  # This name is used to correlate Audit Logs to APM, so make sure you specify the same
29
32
  # value when you use both products.
@@ -40,6 +43,7 @@ module DatadogAPIClient::V2
40
43
  def self.attribute_map
41
44
  {
42
45
  :'attributes' => :'attributes',
46
+ :'message' => :'message',
43
47
  :'service' => :'service',
44
48
  :'tags' => :'tags',
45
49
  :'timestamp' => :'timestamp'
@@ -51,6 +55,7 @@ module DatadogAPIClient::V2
51
55
  def self.openapi_types
52
56
  {
53
57
  :'attributes' => :'Hash<String, Object>',
58
+ :'message' => :'String',
54
59
  :'service' => :'String',
55
60
  :'tags' => :'Array<String>',
56
61
  :'timestamp' => :'Time'
@@ -77,6 +82,10 @@ module DatadogAPIClient::V2
77
82
  self.attributes = attributes[:'attributes']
78
83
  end
79
84
 
85
+ if attributes.key?(:'message')
86
+ self.message = attributes[:'message']
87
+ end
88
+
80
89
  if attributes.key?(:'service')
81
90
  self.service = attributes[:'service']
82
91
  end
@@ -99,6 +108,7 @@ module DatadogAPIClient::V2
99
108
  return true if self.equal?(o)
100
109
  self.class == o.class &&
101
110
  attributes == o.attributes &&
111
+ message == o.message &&
102
112
  service == o.service &&
103
113
  tags == o.tags &&
104
114
  timestamp == o.timestamp
@@ -108,7 +118,7 @@ module DatadogAPIClient::V2
108
118
  # @return [Integer] Hash code
109
119
  # @!visibility private
110
120
  def hash
111
- [attributes, service, tags, timestamp].hash
121
+ [attributes, message, service, tags, timestamp].hash
112
122
  end
113
123
  end
114
124
  end
@@ -21,28 +21,22 @@ module DatadogAPIClient::V2
21
21
  class CIAppEventAttributes
22
22
  include BaseGenericModel
23
23
 
24
- # JSON object of attributes from CI Visibility events.
24
+ # JSON object of attributes from CI Visibility test events.
25
25
  attr_accessor :attributes
26
26
 
27
- # The name of the application or service generating CI Visibility events.
28
- # It is used to switch from CI Visibility to APM, so make sure you define the same
29
- # value when you use both products.
30
- attr_accessor :service
31
-
32
27
  # Array of tags associated with your event.
33
28
  attr_accessor :tags
34
29
 
35
- # Timestamp of your event.
36
- attr_accessor :timestamp
30
+ # Test run level.
31
+ attr_accessor :test_level
37
32
 
38
33
  # Attribute mapping from ruby-style variable name to JSON key.
39
34
  # @!visibility private
40
35
  def self.attribute_map
41
36
  {
42
37
  :'attributes' => :'attributes',
43
- :'service' => :'service',
44
38
  :'tags' => :'tags',
45
- :'timestamp' => :'timestamp'
39
+ :'test_level' => :'test_level'
46
40
  }
47
41
  end
48
42
 
@@ -51,9 +45,8 @@ module DatadogAPIClient::V2
51
45
  def self.openapi_types
52
46
  {
53
47
  :'attributes' => :'Hash<String, Object>',
54
- :'service' => :'String',
55
48
  :'tags' => :'Array<String>',
56
- :'timestamp' => :'Time'
49
+ :'test_level' => :'CIAppTestLevel'
57
50
  }
58
51
  end
59
52
 
@@ -77,18 +70,14 @@ module DatadogAPIClient::V2
77
70
  self.attributes = attributes[:'attributes']
78
71
  end
79
72
 
80
- if attributes.key?(:'service')
81
- self.service = attributes[:'service']
82
- end
83
-
84
73
  if attributes.key?(:'tags')
85
74
  if (value = attributes[:'tags']).is_a?(Array)
86
75
  self.tags = value
87
76
  end
88
77
  end
89
78
 
90
- if attributes.key?(:'timestamp')
91
- self.timestamp = attributes[:'timestamp']
79
+ if attributes.key?(:'test_level')
80
+ self.test_level = attributes[:'test_level']
92
81
  end
93
82
  end
94
83
 
@@ -99,16 +88,15 @@ module DatadogAPIClient::V2
99
88
  return true if self.equal?(o)
100
89
  self.class == o.class &&
101
90
  attributes == o.attributes &&
102
- service == o.service &&
103
91
  tags == o.tags &&
104
- timestamp == o.timestamp
92
+ test_level == o.test_level
105
93
  end
106
94
 
107
95
  # Calculates hash code according to all attributes.
108
96
  # @return [Integer] Hash code
109
97
  # @!visibility private
110
98
  def hash
111
- [attributes, service, tags, timestamp].hash
99
+ [attributes, tags, test_level].hash
112
100
  end
113
101
  end
114
102
  end
@@ -44,7 +44,7 @@ module DatadogAPIClient::V2
44
44
  # @!visibility private
45
45
  def self.openapi_types
46
46
  {
47
- :'attributes' => :'CIAppEventAttributes',
47
+ :'attributes' => :'CIAppPipelineEventAttributes',
48
48
  :'id' => :'String',
49
49
  :'type' => :'CIAppPipelineEventTypeName'
50
50
  }
@@ -17,26 +17,26 @@ require 'date'
17
17
  require 'time'
18
18
 
19
19
  module DatadogAPIClient::V2
20
- # A team
21
- class TeamData
20
+ # JSON object containing all event attributes and their associated values.
21
+ class CIAppPipelineEventAttributes
22
22
  include BaseGenericModel
23
23
 
24
- # Team attributes
25
- attr_reader :attributes
24
+ # JSON object of attributes from CI Visibility pipeline events.
25
+ attr_accessor :attributes
26
26
 
27
- # The team's identifier
28
- attr_reader :id
27
+ # Pipeline execution level.
28
+ attr_accessor :ci_level
29
29
 
30
- # Team type
31
- attr_reader :type
30
+ # Array of tags associated with your event.
31
+ attr_accessor :tags
32
32
 
33
33
  # Attribute mapping from ruby-style variable name to JSON key.
34
34
  # @!visibility private
35
35
  def self.attribute_map
36
36
  {
37
37
  :'attributes' => :'attributes',
38
- :'id' => :'id',
39
- :'type' => :'type'
38
+ :'ci_level' => :'ci_level',
39
+ :'tags' => :'tags'
40
40
  }
41
41
  end
42
42
 
@@ -44,9 +44,9 @@ module DatadogAPIClient::V2
44
44
  # @!visibility private
45
45
  def self.openapi_types
46
46
  {
47
- :'attributes' => :'TeamAttributes',
48
- :'id' => :'String',
49
- :'type' => :'TeamType'
47
+ :'attributes' => :'Hash<String, Object>',
48
+ :'ci_level' => :'CIAppPipelineLevel',
49
+ :'tags' => :'Array<String>'
50
50
  }
51
51
  end
52
52
 
@@ -55,13 +55,13 @@ module DatadogAPIClient::V2
55
55
  # @!visibility private
56
56
  def initialize(attributes = {})
57
57
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamData` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CIAppPipelineEventAttributes` initialize method"
59
59
  end
60
60
 
61
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
62
  attributes = attributes.each_with_object({}) { |(k, v), h|
63
63
  if (!self.class.attribute_map.key?(k.to_sym))
64
- fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TeamData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::CIAppPipelineEventAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
65
  end
66
66
  h[k.to_sym] = v
67
67
  }
@@ -70,53 +70,15 @@ module DatadogAPIClient::V2
70
70
  self.attributes = attributes[:'attributes']
71
71
  end
72
72
 
73
- if attributes.key?(:'id')
74
- self.id = attributes[:'id']
73
+ if attributes.key?(:'ci_level')
74
+ self.ci_level = attributes[:'ci_level']
75
75
  end
76
76
 
77
- if attributes.key?(:'type')
78
- self.type = attributes[:'type']
79
- end
80
- end
81
-
82
- # Check to see if the all the properties in the model are valid
83
- # @return true if the model is valid
84
- # @!visibility private
85
- def valid?
86
- return false if @attributes.nil?
87
- return false if @id.nil?
88
- return false if @type.nil?
89
- true
90
- end
91
-
92
- # Custom attribute writer method with validation
93
- # @param attributes [Object] Object to be assigned
94
- # @!visibility private
95
- def attributes=(attributes)
96
- if attributes.nil?
97
- fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.'
98
- end
99
- @attributes = attributes
100
- end
101
-
102
- # Custom attribute writer method with validation
103
- # @param id [Object] Object to be assigned
104
- # @!visibility private
105
- def id=(id)
106
- if id.nil?
107
- fail ArgumentError, 'invalid value for "id", id cannot be nil.'
108
- end
109
- @id = id
110
- end
111
-
112
- # Custom attribute writer method with validation
113
- # @param type [Object] Object to be assigned
114
- # @!visibility private
115
- def type=(type)
116
- if type.nil?
117
- fail ArgumentError, 'invalid value for "type", type cannot be nil.'
77
+ if attributes.key?(:'tags')
78
+ if (value = attributes[:'tags']).is_a?(Array)
79
+ self.tags = value
80
+ end
118
81
  end
119
- @type = type
120
82
  end
121
83
 
122
84
  # Checks equality by comparing each attribute.
@@ -126,15 +88,15 @@ module DatadogAPIClient::V2
126
88
  return true if self.equal?(o)
127
89
  self.class == o.class &&
128
90
  attributes == o.attributes &&
129
- id == o.id &&
130
- type == o.type
91
+ ci_level == o.ci_level &&
92
+ tags == o.tags
131
93
  end
132
94
 
133
95
  # Calculates hash code according to all attributes.
134
96
  # @return [Integer] Hash code
135
97
  # @!visibility private
136
98
  def hash
137
- [attributes, id, type].hash
99
+ [attributes, ci_level, tags].hash
138
100
  end
139
101
  end
140
102
  end
@@ -0,0 +1,30 @@
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
+ # Pipeline execution level.
21
+ class CIAppPipelineLevel
22
+ include BaseEnumModel
23
+
24
+ PIPELINE = "pipeline".freeze
25
+ STAGE = "stage".freeze
26
+ JOB = "job".freeze
27
+ STEP = "step".freeze
28
+ CUSTOM = "custom".freeze
29
+ end
30
+ end
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # The minimum time for the requested events; supports date, math, and regular timestamps (in milliseconds).
25
25
  attr_accessor :from
26
26
 
27
- # The search query following the Log search syntax.
27
+ # The search query following the CI Visibility Explorer search syntax.
28
28
  attr_accessor :query
29
29
 
30
30
  # The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds).
@@ -0,0 +1,29 @@
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
+ # Test run level.
21
+ class CIAppTestLevel
22
+ include BaseEnumModel
23
+
24
+ SESSION = "session".freeze
25
+ MODULE = "module".freeze
26
+ SUITE = "suite".freeze
27
+ TEST = "test".freeze
28
+ end
29
+ end
@@ -46,7 +46,7 @@ module DatadogAPIClient::V2
46
46
  {
47
47
  :'data' => :'CIAppTestsAggregationBucketsResponse',
48
48
  :'links' => :'CIAppResponseLinks',
49
- :'meta' => :'CIAppResponseMetadata'
49
+ :'meta' => :'CIAppResponseMetadataWithPagination'
50
50
  }
51
51
  end
52
52
 
@@ -24,7 +24,7 @@ module DatadogAPIClient::V2
24
24
  # The minimum time for the requested events; supports date, math, and regular timestamps (in milliseconds).
25
25
  attr_accessor :from
26
26
 
27
- # The search query following the Log search syntax.
27
+ # The search query following the CI Visibility Explorer search syntax.
28
28
  attr_accessor :query
29
29
 
30
30
  # The maximum time for the requested events, supports date, math, and regular timestamps (in milliseconds).