datadog_api_client 2.34.0 → 2.36.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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +59 -6
  4. data/.generator/schemas/v2/openapi.yaml +1093 -69
  5. data/.generator/src/generator/formatter.py +2 -2
  6. data/.generator/src/generator/openapi.py +1 -1
  7. data/.github/workflows/release.yml +1 -1
  8. data/CHANGELOG.md +36 -0
  9. data/Gemfile +1 -0
  10. data/examples/v1/monitors/CreateMonitor_1539578087.rb +1 -0
  11. data/examples/v1/monitors/CreateMonitor_440013737.rb +1 -0
  12. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +142 -0
  13. data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +35 -0
  14. data/examples/v2/dora-metrics/CreateDORADeployment.rb +0 -3
  15. data/examples/v2/dora-metrics/CreateDORAFailure.rb +30 -0
  16. data/examples/v2/dora-metrics/CreateDORAIncident.rb +11 -9
  17. data/examples/v2/dora-metrics/CreateDORAIncident_1768887482.rb +25 -0
  18. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1735989579.rb +30 -0
  19. data/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle_1716851881.rb +1 -1
  20. data/examples/v2/on-call/GetTeamOnCallUsers.rb +11 -0
  21. data/examples/v2/security-monitoring/ListFindings_2932019633.rb +11 -0
  22. data/examples/v2/software-catalog/DeleteCatalogKind.rb +5 -0
  23. data/examples/v2/software-catalog/ListCatalogKind.rb +5 -0
  24. data/examples/v2/software-catalog/ListCatalogKind_3806205775.rb +5 -0
  25. data/examples/v2/software-catalog/UpsertCatalogKind.rb +9 -0
  26. data/examples/v2/teams/AddMemberTeam.rb +15 -0
  27. data/examples/v2/teams/ListMemberTeams.rb +8 -0
  28. data/examples/v2/teams/ListMemberTeams_1662850354.rb +8 -0
  29. data/examples/v2/teams/RemoveMemberTeam.rb +8 -0
  30. data/lib/datadog_api_client/configuration.rb +3 -2
  31. data/lib/datadog_api_client/inflector.rb +42 -6
  32. data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -1
  33. data/lib/datadog_api_client/v1/models/monitor.rb +17 -1
  34. data/lib/datadog_api_client/v1/models/monitor_draft_status.rb +32 -0
  35. data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
  36. data/lib/datadog_api_client/v1/models/monitor_update_request.rb +17 -1
  37. data/lib/datadog_api_client/v1/models/synthetics_api_test_step_subtype.rb +6 -0
  38. data/lib/datadog_api_client/v1/models/synthetics_basic_auth_web.rb +2 -31
  39. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +32 -2
  40. data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +79 -15
  41. data/lib/datadog_api_client/v2/api/on_call_api.rb +67 -0
  42. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +5 -3
  43. data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +13 -0
  44. data/lib/datadog_api_client/v2/api/software_catalog_api.rb +221 -0
  45. data/lib/datadog_api_client/v2/api/teams_api.rb +254 -0
  46. data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +1 -1
  47. data/lib/datadog_api_client/v2/models/{dora_incident_response.rb → add_member_team_request.rb} +5 -5
  48. data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author_type.rb +2 -0
  49. data/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb +21 -1
  50. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +33 -3
  51. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_metadata.rb +125 -0
  52. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +165 -0
  53. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +37 -1
  54. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +57 -1
  55. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +57 -1
  56. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +2 -1
  57. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_microsoft_sentinel.rb +228 -0
  58. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_microsoft_sentinel_type.rb +26 -0
  59. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +2 -1
  60. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_microsoft_sentinel.rb +228 -0
  61. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_microsoft_sentinel_type.rb +26 -0
  62. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +21 -1
  63. data/lib/datadog_api_client/v2/models/{dora_incident_request.rb → dora_failure_request.rb} +4 -4
  64. data/lib/datadog_api_client/v2/models/{dora_incident_request_attributes.rb → dora_failure_request_attributes.rb} +31 -11
  65. data/lib/datadog_api_client/v2/models/{dora_incident_request_data.rb → dora_failure_request_data.rb} +4 -4
  66. data/lib/datadog_api_client/v2/models/dora_failure_response.rb +123 -0
  67. data/lib/datadog_api_client/v2/models/{dora_incident_response_data.rb → dora_failure_response_data.rb} +6 -6
  68. data/lib/datadog_api_client/v2/models/{dora_incident_type.rb → dora_failure_type.rb} +3 -3
  69. data/lib/datadog_api_client/v2/models/escalation.rb +143 -0
  70. data/lib/datadog_api_client/v2/models/escalation_relationships.rb +105 -0
  71. data/lib/datadog_api_client/v2/models/escalation_relationships_responders.rb +107 -0
  72. data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items.rb +144 -0
  73. data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items_type.rb +26 -0
  74. data/lib/datadog_api_client/v2/models/escalation_type.rb +26 -0
  75. data/lib/datadog_api_client/v2/models/finding_attributes.rb +31 -1
  76. data/lib/datadog_api_client/v2/models/kind_attributes.rb +143 -0
  77. data/lib/datadog_api_client/v2/models/kind_data.rb +153 -0
  78. data/lib/datadog_api_client/v2/models/kind_metadata.rb +115 -0
  79. data/lib/datadog_api_client/v2/models/kind_obj.rb +143 -0
  80. data/lib/datadog_api_client/v2/models/kind_response_meta.rb +105 -0
  81. data/lib/datadog_api_client/v2/models/list_kind_catalog_response.rb +117 -0
  82. data/lib/datadog_api_client/v2/models/member_team.rb +144 -0
  83. data/lib/datadog_api_client/v2/models/member_team_type.rb +26 -0
  84. data/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb +11 -1
  85. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -0
  86. data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +1 -0
  87. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +21 -1
  88. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb +21 -1
  89. data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +21 -1
  90. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +21 -1
  91. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
  92. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +21 -1
  93. data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +11 -1
  94. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_attributes.rb +15 -3
  95. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_samplings.rb +137 -0
  96. data/lib/datadog_api_client/v2/models/team_on_call_responders.rb +117 -0
  97. data/lib/datadog_api_client/v2/models/team_on_call_responders_data.rb +143 -0
  98. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships.rb +115 -0
  99. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations.rb +107 -0
  100. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items.rb +144 -0
  101. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items_type.rb +26 -0
  102. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders.rb +107 -0
  103. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items.rb +144 -0
  104. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items_type.rb +26 -0
  105. data/lib/datadog_api_client/v2/models/team_on_call_responders_data_type.rb +26 -0
  106. data/lib/datadog_api_client/v2/models/team_on_call_responders_included.rb +63 -0
  107. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_request.rb +63 -0
  108. data/lib/datadog_api_client/v2/models/upsert_catalog_kind_response.rb +117 -0
  109. data/lib/datadog_api_client/version.rb +1 -1
  110. data/repository.datadog.yaml +8 -0
  111. metadata +57 -7
@@ -33,6 +33,12 @@ module DatadogAPIClient::V2
33
33
  # User ID of the user who created the rule.
34
34
  attr_accessor :creation_author_id
35
35
 
36
+ # Custom/Overridden message for generated signals (used in case of Default rule update).
37
+ attr_accessor :custom_message
38
+
39
+ # Custom/Overridden name of the rule (used in case of Default rule update).
40
+ attr_accessor :custom_name
41
+
36
42
  # Default Tags for default rules (included in tags)
37
43
  attr_accessor :default_tags
38
44
 
@@ -103,6 +109,8 @@ module DatadogAPIClient::V2
103
109
  :'compliance_signal_options' => :'complianceSignalOptions',
104
110
  :'created_at' => :'createdAt',
105
111
  :'creation_author_id' => :'creationAuthorId',
112
+ :'custom_message' => :'customMessage',
113
+ :'custom_name' => :'customName',
106
114
  :'default_tags' => :'defaultTags',
107
115
  :'deprecation_date' => :'deprecationDate',
108
116
  :'filters' => :'filters',
@@ -134,6 +142,8 @@ module DatadogAPIClient::V2
134
142
  :'compliance_signal_options' => :'CloudConfigurationRuleComplianceSignalOptions',
135
143
  :'created_at' => :'Integer',
136
144
  :'creation_author_id' => :'Integer',
145
+ :'custom_message' => :'String',
146
+ :'custom_name' => :'String',
137
147
  :'default_tags' => :'Array<String>',
138
148
  :'deprecation_date' => :'Integer',
139
149
  :'filters' => :'Array<SecurityMonitoringFilter>',
@@ -193,6 +203,14 @@ module DatadogAPIClient::V2
193
203
  self.creation_author_id = attributes[:'creation_author_id']
194
204
  end
195
205
 
206
+ if attributes.key?(:'custom_message')
207
+ self.custom_message = attributes[:'custom_message']
208
+ end
209
+
210
+ if attributes.key?(:'custom_name')
211
+ self.custom_name = attributes[:'custom_name']
212
+ end
213
+
196
214
  if attributes.key?(:'default_tags')
197
215
  if (value = attributes[:'default_tags']).is_a?(Array)
198
216
  self.default_tags = value
@@ -318,6 +336,8 @@ module DatadogAPIClient::V2
318
336
  compliance_signal_options == o.compliance_signal_options &&
319
337
  created_at == o.created_at &&
320
338
  creation_author_id == o.creation_author_id &&
339
+ custom_message == o.custom_message &&
340
+ custom_name == o.custom_name &&
321
341
  default_tags == o.default_tags &&
322
342
  deprecation_date == o.deprecation_date &&
323
343
  filters == o.filters &&
@@ -345,7 +365,7 @@ module DatadogAPIClient::V2
345
365
  # @return [Integer] Hash code
346
366
  # @!visibility private
347
367
  def hash
348
- [cases, compliance_signal_options, created_at, creation_author_id, default_tags, deprecation_date, filters, group_signals_by, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, reference_tables, tags, third_party_cases, type, update_author_id, updated_at, version, additional_properties].hash
368
+ [cases, compliance_signal_options, created_at, creation_author_id, custom_message, custom_name, default_tags, deprecation_date, filters, group_signals_by, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, reference_tables, tags, third_party_cases, type, update_author_id, updated_at, version, additional_properties].hash
349
369
  end
350
370
  end
351
371
  end
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
21
21
  class SecurityMonitoringThirdPartyRuleCase
22
22
  include BaseGenericModel
23
23
 
24
+ # Severity of the Security Signal.
25
+ attr_accessor :custom_status
26
+
24
27
  # Name of the case.
25
28
  attr_accessor :name
26
29
 
@@ -39,6 +42,7 @@ module DatadogAPIClient::V2
39
42
  # @!visibility private
40
43
  def self.attribute_map
41
44
  {
45
+ :'custom_status' => :'customStatus',
42
46
  :'name' => :'name',
43
47
  :'notifications' => :'notifications',
44
48
  :'query' => :'query',
@@ -50,6 +54,7 @@ module DatadogAPIClient::V2
50
54
  # @!visibility private
51
55
  def self.openapi_types
52
56
  {
57
+ :'custom_status' => :'SecurityMonitoringRuleSeverity',
53
58
  :'name' => :'String',
54
59
  :'notifications' => :'Array<String>',
55
60
  :'query' => :'String',
@@ -75,6 +80,10 @@ module DatadogAPIClient::V2
75
80
  end
76
81
  }
77
82
 
83
+ if attributes.key?(:'custom_status')
84
+ self.custom_status = attributes[:'custom_status']
85
+ end
86
+
78
87
  if attributes.key?(:'name')
79
88
  self.name = attributes[:'name']
80
89
  end
@@ -120,6 +129,7 @@ module DatadogAPIClient::V2
120
129
  def ==(o)
121
130
  return true if self.equal?(o)
122
131
  self.class == o.class &&
132
+ custom_status == o.custom_status &&
123
133
  name == o.name &&
124
134
  notifications == o.notifications &&
125
135
  query == o.query &&
@@ -131,7 +141,7 @@ module DatadogAPIClient::V2
131
141
  # @return [Integer] Hash code
132
142
  # @!visibility private
133
143
  def hash
134
- [name, notifications, query, status, additional_properties].hash
144
+ [custom_status, name, notifications, query, status, additional_properties].hash
135
145
  end
136
146
  end
137
147
  end
@@ -36,6 +36,9 @@ module DatadogAPIClient::V2
36
36
  # List of products the scanning group applies.
37
37
  attr_accessor :product_list
38
38
 
39
+ # List of sampling rates per product type.
40
+ attr_accessor :samplings
41
+
39
42
  attr_accessor :additional_properties
40
43
 
41
44
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -46,7 +49,8 @@ module DatadogAPIClient::V2
46
49
  :'filter' => :'filter',
47
50
  :'is_enabled' => :'is_enabled',
48
51
  :'name' => :'name',
49
- :'product_list' => :'product_list'
52
+ :'product_list' => :'product_list',
53
+ :'samplings' => :'samplings'
50
54
  }
51
55
  end
52
56
 
@@ -58,7 +62,8 @@ module DatadogAPIClient::V2
58
62
  :'filter' => :'SensitiveDataScannerFilter',
59
63
  :'is_enabled' => :'Boolean',
60
64
  :'name' => :'String',
61
- :'product_list' => :'Array<SensitiveDataScannerProduct>'
65
+ :'product_list' => :'Array<SensitiveDataScannerProduct>',
66
+ :'samplings' => :'Array<SensitiveDataScannerSamplings>'
62
67
  }
63
68
  end
64
69
 
@@ -101,6 +106,12 @@ module DatadogAPIClient::V2
101
106
  self.product_list = value
102
107
  end
103
108
  end
109
+
110
+ if attributes.key?(:'samplings')
111
+ if (value = attributes[:'samplings']).is_a?(Array)
112
+ self.samplings = value
113
+ end
114
+ end
104
115
  end
105
116
 
106
117
  # Returns the object in the form of hash, with additionalProperties support.
@@ -134,6 +145,7 @@ module DatadogAPIClient::V2
134
145
  is_enabled == o.is_enabled &&
135
146
  name == o.name &&
136
147
  product_list == o.product_list &&
148
+ samplings == o.samplings &&
137
149
  additional_properties == o.additional_properties
138
150
  end
139
151
 
@@ -141,7 +153,7 @@ module DatadogAPIClient::V2
141
153
  # @return [Integer] Hash code
142
154
  # @!visibility private
143
155
  def hash
144
- [description, filter, is_enabled, name, product_list, additional_properties].hash
156
+ [description, filter, is_enabled, name, product_list, samplings, additional_properties].hash
145
157
  end
146
158
  end
147
159
  end
@@ -0,0 +1,137 @@
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
+ # Sampling configurations for the Scanning Group.
21
+ class SensitiveDataScannerSamplings
22
+ include BaseGenericModel
23
+
24
+ # Datadog product onto which Sensitive Data Scanner can be activated.
25
+ attr_accessor :product
26
+
27
+ # Rate at which data in product type will be scanned, as a percentage.
28
+ attr_reader :rate
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'product' => :'product',
37
+ :'rate' => :'rate'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'product' => :'SensitiveDataScannerProduct',
46
+ :'rate' => :'Float'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SensitiveDataScannerSamplings` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'product')
69
+ self.product = attributes[:'product']
70
+ end
71
+
72
+ if attributes.key?(:'rate')
73
+ self.rate = attributes[:'rate']
74
+ end
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ # @!visibility private
80
+ def valid?
81
+ return false if !@rate.nil? && @rate > 100.0
82
+ return false if !@rate.nil? && @rate < 0.0
83
+ true
84
+ end
85
+
86
+ # Custom attribute writer method with validation
87
+ # @param rate [Object] Object to be assigned
88
+ # @!visibility private
89
+ def rate=(rate)
90
+ if !rate.nil? && rate > 100.0
91
+ fail ArgumentError, 'invalid value for "rate", must be smaller than or equal to 100.0.'
92
+ end
93
+ if !rate.nil? && rate < 0.0
94
+ fail ArgumentError, 'invalid value for "rate", must be greater than or equal to 0.0.'
95
+ end
96
+ @rate = rate
97
+ end
98
+
99
+ # Returns the object in the form of hash, with additionalProperties support.
100
+ # @return [Hash] Returns the object in the form of hash
101
+ # @!visibility private
102
+ def to_hash
103
+ hash = {}
104
+ self.class.attribute_map.each_pair do |attr, param|
105
+ value = self.send(attr)
106
+ if value.nil?
107
+ is_nullable = self.class.openapi_nullable.include?(attr)
108
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
109
+ end
110
+
111
+ hash[param] = _to_hash(value)
112
+ end
113
+ self.additional_properties.each_pair do |attr, value|
114
+ hash[attr] = value
115
+ end
116
+ hash
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param o [Object] Object to be compared
121
+ # @!visibility private
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ product == o.product &&
126
+ rate == o.rate &&
127
+ additional_properties == o.additional_properties
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ # @!visibility private
133
+ def hash
134
+ [product, rate, additional_properties].hash
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,117 @@
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
+ # Root object representing a team's on-call responder configuration.
21
+ class TeamOnCallResponders
22
+ include BaseGenericModel
23
+
24
+ # Defines the main on-call responder object for a team, including relationships and metadata.
25
+ attr_accessor :data
26
+
27
+ # The `TeamOnCallResponders` `included`.
28
+ attr_accessor :included
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'data' => :'data',
37
+ :'included' => :'included'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'data' => :'TeamOnCallRespondersData',
46
+ :'included' => :'Array<TeamOnCallRespondersIncluded>'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamOnCallResponders` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'data')
69
+ self.data = attributes[:'data']
70
+ end
71
+
72
+ if attributes.key?(:'included')
73
+ if (value = attributes[:'included']).is_a?(Array)
74
+ self.included = value
75
+ end
76
+ end
77
+ end
78
+
79
+ # Returns the object in the form of hash, with additionalProperties support.
80
+ # @return [Hash] Returns the object in the form of hash
81
+ # @!visibility private
82
+ def to_hash
83
+ hash = {}
84
+ self.class.attribute_map.each_pair do |attr, param|
85
+ value = self.send(attr)
86
+ if value.nil?
87
+ is_nullable = self.class.openapi_nullable.include?(attr)
88
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
89
+ end
90
+
91
+ hash[param] = _to_hash(value)
92
+ end
93
+ self.additional_properties.each_pair do |attr, value|
94
+ hash[attr] = value
95
+ end
96
+ hash
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param o [Object] Object to be compared
101
+ # @!visibility private
102
+ def ==(o)
103
+ return true if self.equal?(o)
104
+ self.class == o.class &&
105
+ data == o.data &&
106
+ included == o.included &&
107
+ additional_properties == o.additional_properties
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Integer] Hash code
112
+ # @!visibility private
113
+ def hash
114
+ [data, included, additional_properties].hash
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,143 @@
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
+ # Defines the main on-call responder object for a team, including relationships and metadata.
21
+ class TeamOnCallRespondersData
22
+ include BaseGenericModel
23
+
24
+ # Unique identifier of the on-call responder configuration.
25
+ attr_accessor :id
26
+
27
+ # Relationship objects linked to a team's on-call responder configuration, including escalations and responders.
28
+ attr_accessor :relationships
29
+
30
+ # Represents the resource type for a group of users assigned to handle on-call duties within a team.
31
+ attr_reader :type
32
+
33
+ attr_accessor :additional_properties
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ # @!visibility private
37
+ def self.attribute_map
38
+ {
39
+ :'id' => :'id',
40
+ :'relationships' => :'relationships',
41
+ :'type' => :'type'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'id' => :'String',
50
+ :'relationships' => :'TeamOnCallRespondersDataRelationships',
51
+ :'type' => :'TeamOnCallRespondersDataType'
52
+ }
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param attributes [Hash] Model attributes in the form of hash
57
+ # @!visibility private
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamOnCallRespondersData` initialize method"
61
+ end
62
+
63
+ self.additional_properties = {}
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ self.additional_properties[k.to_sym] = v
68
+ else
69
+ h[k.to_sym] = v
70
+ end
71
+ }
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ end
76
+
77
+ if attributes.key?(:'relationships')
78
+ self.relationships = attributes[:'relationships']
79
+ end
80
+
81
+ if attributes.key?(:'type')
82
+ self.type = attributes[:'type']
83
+ end
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ # @!visibility private
89
+ def valid?
90
+ return false if @type.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param type [Object] Object to be assigned
96
+ # @!visibility private
97
+ def type=(type)
98
+ if type.nil?
99
+ fail ArgumentError, 'invalid value for "type", type cannot be nil.'
100
+ end
101
+ @type = type
102
+ end
103
+
104
+ # Returns the object in the form of hash, with additionalProperties support.
105
+ # @return [Hash] Returns the object in the form of hash
106
+ # @!visibility private
107
+ def to_hash
108
+ hash = {}
109
+ self.class.attribute_map.each_pair do |attr, param|
110
+ value = self.send(attr)
111
+ if value.nil?
112
+ is_nullable = self.class.openapi_nullable.include?(attr)
113
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
114
+ end
115
+
116
+ hash[param] = _to_hash(value)
117
+ end
118
+ self.additional_properties.each_pair do |attr, value|
119
+ hash[attr] = value
120
+ end
121
+ hash
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param o [Object] Object to be compared
126
+ # @!visibility private
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ id == o.id &&
131
+ relationships == o.relationships &&
132
+ type == o.type &&
133
+ additional_properties == o.additional_properties
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ # @!visibility private
139
+ def hash
140
+ [id, relationships, type, additional_properties].hash
141
+ end
142
+ end
143
+ end
@@ -0,0 +1,115 @@
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
+ # Relationship objects linked to a team's on-call responder configuration, including escalations and responders.
21
+ class TeamOnCallRespondersDataRelationships
22
+ include BaseGenericModel
23
+
24
+ # Defines the escalation policy steps linked to the team's on-call configuration.
25
+ attr_accessor :escalations
26
+
27
+ # Defines the list of users assigned as on-call responders for the team.
28
+ attr_accessor :responders
29
+
30
+ attr_accessor :additional_properties
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ # @!visibility private
34
+ def self.attribute_map
35
+ {
36
+ :'escalations' => :'escalations',
37
+ :'responders' => :'responders'
38
+ }
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ # @!visibility private
43
+ def self.openapi_types
44
+ {
45
+ :'escalations' => :'TeamOnCallRespondersDataRelationshipsEscalations',
46
+ :'responders' => :'TeamOnCallRespondersDataRelationshipsResponders'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param attributes [Hash] Model attributes in the form of hash
52
+ # @!visibility private
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TeamOnCallRespondersDataRelationships` initialize method"
56
+ end
57
+
58
+ self.additional_properties = {}
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ self.additional_properties[k.to_sym] = v
63
+ else
64
+ h[k.to_sym] = v
65
+ end
66
+ }
67
+
68
+ if attributes.key?(:'escalations')
69
+ self.escalations = attributes[:'escalations']
70
+ end
71
+
72
+ if attributes.key?(:'responders')
73
+ self.responders = attributes[:'responders']
74
+ end
75
+ end
76
+
77
+ # Returns the object in the form of hash, with additionalProperties support.
78
+ # @return [Hash] Returns the object in the form of hash
79
+ # @!visibility private
80
+ def to_hash
81
+ hash = {}
82
+ self.class.attribute_map.each_pair do |attr, param|
83
+ value = self.send(attr)
84
+ if value.nil?
85
+ is_nullable = self.class.openapi_nullable.include?(attr)
86
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
87
+ end
88
+
89
+ hash[param] = _to_hash(value)
90
+ end
91
+ self.additional_properties.each_pair do |attr, value|
92
+ hash[attr] = value
93
+ end
94
+ hash
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param o [Object] Object to be compared
99
+ # @!visibility private
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ escalations == o.escalations &&
104
+ responders == o.responders &&
105
+ additional_properties == o.additional_properties
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Integer] Hash code
110
+ # @!visibility private
111
+ def hash
112
+ [escalations, responders, additional_properties].hash
113
+ end
114
+ end
115
+ end