datadog_api_client 2.26.1 → 2.27.1

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 (125) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/schemas/v1/openapi.yaml +2152 -10
  4. data/.generator/schemas/v2/openapi.yaml +1771 -41
  5. data/.generator/src/generator/formatter.py +1 -1
  6. data/.github/workflows/approved_status.yml +4 -0
  7. data/.github/workflows/changelog.yml +5 -0
  8. data/.github/workflows/codeql-analysis.yml +4 -0
  9. data/.github/workflows/docs.yml +3 -0
  10. data/.github/workflows/labeler.yml +5 -0
  11. data/.github/workflows/prepare_release.yml +4 -0
  12. data/.github/workflows/publish.yml +5 -0
  13. data/.github/workflows/release.yml +4 -0
  14. data/.github/workflows/stale.yml +6 -0
  15. data/.github/workflows/test.yml +3 -0
  16. data/.github/workflows/test_integration.yml +3 -0
  17. data/CHANGELOG.md +27 -0
  18. data/examples/v1/dashboards/CreateDashboard_1433408735.rb +44 -0
  19. data/examples/v1/dashboards/CreateDashboard_794302680.rb +152 -0
  20. data/examples/v1/synthetics/CreateSyntheticsAPITest_1072503741.rb +1 -1
  21. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +1 -1
  22. data/examples/v1/synthetics/CreateSyntheticsAPITest_1402674167.rb +1 -1
  23. data/examples/v1/synthetics/CreateSyntheticsAPITest_3829801148.rb +1 -1
  24. data/examples/v1/synthetics/CreateSyntheticsMobileTest.rb +27 -0
  25. data/examples/v1/synthetics/FetchUptimes.rb +13 -0
  26. data/examples/v1/synthetics/GetMobileTest.rb +8 -0
  27. data/examples/v1/synthetics/UpdateMobileTest.rb +30 -0
  28. data/examples/v2/logs/AggregateLogs_2955613758.rb +0 -1
  29. data/examples/v2/microsoft-teams-integration/CreateApiHandle.rb +17 -0
  30. data/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.rb +17 -0
  31. data/examples/v2/microsoft-teams-integration/DeleteApiHandle.rb +5 -0
  32. data/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.rb +8 -0
  33. data/examples/v2/microsoft-teams-integration/GetApiHandle.rb +5 -0
  34. data/examples/v2/microsoft-teams-integration/GetApiHandleByName.rb +5 -0
  35. data/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.rb +8 -0
  36. data/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.rb +8 -0
  37. data/examples/v2/microsoft-teams-integration/GetChannelByName.rb +5 -0
  38. data/examples/v2/microsoft-teams-integration/ListApiHandles.rb +5 -0
  39. data/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.rb +5 -0
  40. data/examples/v2/microsoft-teams-integration/UpdateApiHandle.rb +17 -0
  41. data/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.rb +18 -0
  42. data/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +9 -0
  43. data/lib/datadog_api_client/inflector.rb +51 -0
  44. data/lib/datadog_api_client/v1/api/synthetics_api.rb +272 -0
  45. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +3 -3
  46. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +1 -0
  47. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +2 -0
  48. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +11 -1
  49. data/lib/datadog_api_client/v1/models/synthetics_config_variable_type.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/synthetics_fetch_uptimes_payload.rb +167 -0
  51. data/lib/datadog_api_client/v1/models/synthetics_mobile_device_id.rb +251 -0
  52. data/lib/datadog_api_client/v1/models/synthetics_mobile_step.rb +203 -0
  53. data/lib/datadog_api_client/v1/models/synthetics_mobile_step_type.rb +42 -0
  54. data/lib/datadog_api_client/v1/models/synthetics_mobile_test.rb +263 -0
  55. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding.rb +105 -0
  56. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items.rb +117 -0
  57. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_binding_items_role.rb +27 -0
  58. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_ci_options.rb +123 -0
  59. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_config.rb +117 -0
  60. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments.rb +105 -0
  61. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_initial_application_arguments_property_names.rb +105 -0
  62. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options.rb +354 -0
  63. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options.rb +155 -0
  64. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_options_monitor_options_notification_preset_name.rb +29 -0
  65. data/lib/datadog_api_client/v1/models/synthetics_mobile_test_type.rb +26 -0
  66. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application.rb +154 -0
  67. data/lib/datadog_api_client/v1/models/synthetics_mobile_tests_mobile_application_reference_type.rb +27 -0
  68. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +1 -1
  69. data/lib/datadog_api_client/v1/models/synthetics_test_request_port.rb +63 -0
  70. data/lib/datadog_api_client/v1/models/synthetics_test_uptime.rb +135 -0
  71. data/lib/datadog_api_client/v1/models/synthetics_uptime.rb +161 -0
  72. data/lib/datadog_api_client/v1/models/table_widget_request.rb +16 -4
  73. data/lib/datadog_api_client/v1/models/table_widget_text_format_match.rb +144 -0
  74. data/lib/datadog_api_client/v1/models/table_widget_text_format_match_type.rb +31 -0
  75. data/lib/datadog_api_client/v1/models/table_widget_text_format_palette.rb +36 -0
  76. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace.rb +63 -0
  77. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all.rb +144 -0
  78. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_all_type.rb +26 -0
  79. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring.rb +165 -0
  80. data/lib/datadog_api_client/v1/models/table_widget_text_format_replace_substring_type.rb +26 -0
  81. data/lib/datadog_api_client/v1/models/table_widget_text_format_rule.rb +163 -0
  82. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +31 -1
  83. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +31 -1
  84. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +31 -1
  85. data/lib/datadog_api_client/v2/api/authn_mappings_api.rb +3 -3
  86. data/lib/datadog_api_client/v2/api/incidents_api.rb +1 -1
  87. data/lib/datadog_api_client/v2/api/metrics_api.rb +4 -4
  88. data/lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb +497 -0
  89. data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +3 -3
  90. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +1 -1
  91. data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +11 -1
  92. data/lib/datadog_api_client/v2/models/fastly_services_response.rb +1 -1
  93. data/lib/datadog_api_client/v2/models/incident_notification_handle.rb +1 -1
  94. data/lib/datadog_api_client/v2/models/metric_tag_configuration_attributes.rb +1 -1
  95. data/lib/datadog_api_client/v2/models/metric_tag_configuration_create_attributes.rb +1 -1
  96. data/lib/datadog_api_client/v2/models/metric_tag_configuration_metric_type_category.rb +27 -0
  97. data/lib/datadog_api_client/v2/models/metric_tag_configuration_update_attributes.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_attributes.rb +186 -0
  99. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response.rb +105 -0
  100. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_attributes.rb +249 -0
  101. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_response_data.rb +147 -0
  102. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_info_type.rb +26 -0
  103. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_attributes.rb +202 -0
  104. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_request_data.rb +144 -0
  105. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_response_data.rb +147 -0
  106. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handle_type.rb +26 -0
  107. data/lib/datadog_api_client/v2/models/microsoft_teams_api_handles_response.rb +125 -0
  108. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_attributes.rb +165 -0
  109. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_response_data.rb +147 -0
  110. data/lib/datadog_api_client/v2/models/microsoft_teams_channel_info_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_request.rb +123 -0
  112. data/lib/datadog_api_client/v2/models/microsoft_teams_create_api_handle_response.rb +123 -0
  113. data/lib/datadog_api_client/v2/models/microsoft_teams_get_channel_by_name_response.rb +105 -0
  114. data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request.rb +123 -0
  115. data/lib/datadog_api_client/v2/models/microsoft_teams_update_api_handle_request_data.rb +144 -0
  116. data/lib/datadog_api_client/v2/models/powerpack_template_variable.rb +35 -4
  117. data/lib/datadog_api_client/v2/models/security_monitoring_reference_table.rb +145 -0
  118. data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +13 -1
  119. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_create_payload.rb +13 -1
  120. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +13 -1
  121. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +13 -1
  122. data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_test_payload.rb +13 -1
  123. data/lib/datadog_api_client/v2/models/team_update_attributes.rb +1 -26
  124. data/lib/datadog_api_client/version.rb +1 -1
  125. metadata +72 -2
@@ -0,0 +1,186 @@
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
+ # Handle attributes.
21
+ class MicrosoftTeamsApiHandleAttributes
22
+ include BaseGenericModel
23
+
24
+ # Channel id.
25
+ attr_reader :channel_id
26
+
27
+ # Handle name.
28
+ attr_reader :name
29
+
30
+ # Team id.
31
+ attr_reader :team_id
32
+
33
+ # Tenant id.
34
+ attr_reader :tenant_id
35
+
36
+ attr_accessor :additional_properties
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ # @!visibility private
40
+ def self.attribute_map
41
+ {
42
+ :'channel_id' => :'channel_id',
43
+ :'name' => :'name',
44
+ :'team_id' => :'team_id',
45
+ :'tenant_id' => :'tenant_id'
46
+ }
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ # @!visibility private
51
+ def self.openapi_types
52
+ {
53
+ :'channel_id' => :'String',
54
+ :'name' => :'String',
55
+ :'team_id' => :'String',
56
+ :'tenant_id' => :'String'
57
+ }
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param attributes [Hash] Model attributes in the form of hash
62
+ # @!visibility private
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleAttributes` initialize method"
66
+ end
67
+
68
+ self.additional_properties = {}
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ self.additional_properties[k.to_sym] = v
73
+ else
74
+ h[k.to_sym] = v
75
+ end
76
+ }
77
+
78
+ if attributes.key?(:'channel_id')
79
+ self.channel_id = attributes[:'channel_id']
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ end
85
+
86
+ if attributes.key?(:'team_id')
87
+ self.team_id = attributes[:'team_id']
88
+ end
89
+
90
+ if attributes.key?(:'tenant_id')
91
+ self.tenant_id = attributes[:'tenant_id']
92
+ end
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ # @!visibility private
98
+ def valid?
99
+ return false if !@channel_id.nil? && @channel_id.to_s.length > 255
100
+ return false if !@name.nil? && @name.to_s.length > 255
101
+ return false if !@team_id.nil? && @team_id.to_s.length > 255
102
+ return false if !@tenant_id.nil? && @tenant_id.to_s.length > 255
103
+ true
104
+ end
105
+
106
+ # Custom attribute writer method with validation
107
+ # @param channel_id [Object] Object to be assigned
108
+ # @!visibility private
109
+ def channel_id=(channel_id)
110
+ if !channel_id.nil? && channel_id.to_s.length > 255
111
+ fail ArgumentError, 'invalid value for "channel_id", the character length must be smaller than or equal to 255.'
112
+ end
113
+ @channel_id = channel_id
114
+ end
115
+
116
+ # Custom attribute writer method with validation
117
+ # @param name [Object] Object to be assigned
118
+ # @!visibility private
119
+ def name=(name)
120
+ if !name.nil? && name.to_s.length > 255
121
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
122
+ end
123
+ @name = name
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param team_id [Object] Object to be assigned
128
+ # @!visibility private
129
+ def team_id=(team_id)
130
+ if !team_id.nil? && team_id.to_s.length > 255
131
+ fail ArgumentError, 'invalid value for "team_id", the character length must be smaller than or equal to 255.'
132
+ end
133
+ @team_id = team_id
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param tenant_id [Object] Object to be assigned
138
+ # @!visibility private
139
+ def tenant_id=(tenant_id)
140
+ if !tenant_id.nil? && tenant_id.to_s.length > 255
141
+ fail ArgumentError, 'invalid value for "tenant_id", the character length must be smaller than or equal to 255.'
142
+ end
143
+ @tenant_id = tenant_id
144
+ end
145
+
146
+ # Returns the object in the form of hash, with additionalProperties support.
147
+ # @return [Hash] Returns the object in the form of hash
148
+ # @!visibility private
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ self.additional_properties.each_pair do |attr, value|
161
+ hash[attr] = value
162
+ end
163
+ hash
164
+ end
165
+
166
+ # Checks equality by comparing each attribute.
167
+ # @param o [Object] Object to be compared
168
+ # @!visibility private
169
+ def ==(o)
170
+ return true if self.equal?(o)
171
+ self.class == o.class &&
172
+ channel_id == o.channel_id &&
173
+ name == o.name &&
174
+ team_id == o.team_id &&
175
+ tenant_id == o.tenant_id
176
+ additional_properties == o.additional_properties
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ # @!visibility private
182
+ def hash
183
+ [channel_id, name, team_id, tenant_id].hash
184
+ end
185
+ end
186
+ end
@@ -0,0 +1,105 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'date'
17
+ require 'time'
18
+
19
+ module DatadogAPIClient::V2
20
+ # Response of a handle.
21
+ class MicrosoftTeamsApiHandleInfoResponse
22
+ include BaseGenericModel
23
+
24
+ # Handle data from a response.
25
+ attr_accessor :data
26
+
27
+ attr_accessor :additional_properties
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ # @!visibility private
31
+ def self.attribute_map
32
+ {
33
+ :'data' => :'data'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ # @!visibility private
39
+ def self.openapi_types
40
+ {
41
+ :'data' => :'MicrosoftTeamsApiHandleInfoResponseData'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param attributes [Hash] Model attributes in the form of hash
47
+ # @!visibility private
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleInfoResponse` initialize method"
51
+ end
52
+
53
+ self.additional_properties = {}
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ self.additional_properties[k.to_sym] = v
58
+ else
59
+ h[k.to_sym] = v
60
+ end
61
+ }
62
+
63
+ if attributes.key?(:'data')
64
+ self.data = attributes[:'data']
65
+ end
66
+ end
67
+
68
+ # Returns the object in the form of hash, with additionalProperties support.
69
+ # @return [Hash] Returns the object in the form of hash
70
+ # @!visibility private
71
+ def to_hash
72
+ hash = {}
73
+ self.class.attribute_map.each_pair do |attr, param|
74
+ value = self.send(attr)
75
+ if value.nil?
76
+ is_nullable = self.class.openapi_nullable.include?(attr)
77
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
78
+ end
79
+
80
+ hash[param] = _to_hash(value)
81
+ end
82
+ self.additional_properties.each_pair do |attr, value|
83
+ hash[attr] = value
84
+ end
85
+ hash
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param o [Object] Object to be compared
90
+ # @!visibility private
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ data == o.data
95
+ additional_properties == o.additional_properties
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ # @!visibility private
101
+ def hash
102
+ [data].hash
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,249 @@
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
+ # Handle attributes.
21
+ class MicrosoftTeamsApiHandleInfoResponseAttributes
22
+ include BaseGenericModel
23
+
24
+ # Channel id.
25
+ attr_reader :channel_id
26
+
27
+ # Channel name.
28
+ attr_reader :channel_name
29
+
30
+ # Handle name.
31
+ attr_reader :name
32
+
33
+ # Team id.
34
+ attr_reader :team_id
35
+
36
+ # Team name.
37
+ attr_reader :team_name
38
+
39
+ # Tenant id.
40
+ attr_reader :tenant_id
41
+
42
+ # Tenant name.
43
+ attr_reader :tenant_name
44
+
45
+ attr_accessor :additional_properties
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ # @!visibility private
49
+ def self.attribute_map
50
+ {
51
+ :'channel_id' => :'channel_id',
52
+ :'channel_name' => :'channel_name',
53
+ :'name' => :'name',
54
+ :'team_id' => :'team_id',
55
+ :'team_name' => :'team_name',
56
+ :'tenant_id' => :'tenant_id',
57
+ :'tenant_name' => :'tenant_name'
58
+ }
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ # @!visibility private
63
+ def self.openapi_types
64
+ {
65
+ :'channel_id' => :'String',
66
+ :'channel_name' => :'String',
67
+ :'name' => :'String',
68
+ :'team_id' => :'String',
69
+ :'team_name' => :'String',
70
+ :'tenant_id' => :'String',
71
+ :'tenant_name' => :'String'
72
+ }
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param attributes [Hash] Model attributes in the form of hash
77
+ # @!visibility private
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MicrosoftTeamsApiHandleInfoResponseAttributes` initialize method"
81
+ end
82
+
83
+ self.additional_properties = {}
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ self.additional_properties[k.to_sym] = v
88
+ else
89
+ h[k.to_sym] = v
90
+ end
91
+ }
92
+
93
+ if attributes.key?(:'channel_id')
94
+ self.channel_id = attributes[:'channel_id']
95
+ end
96
+
97
+ if attributes.key?(:'channel_name')
98
+ self.channel_name = attributes[:'channel_name']
99
+ end
100
+
101
+ if attributes.key?(:'name')
102
+ self.name = attributes[:'name']
103
+ end
104
+
105
+ if attributes.key?(:'team_id')
106
+ self.team_id = attributes[:'team_id']
107
+ end
108
+
109
+ if attributes.key?(:'team_name')
110
+ self.team_name = attributes[:'team_name']
111
+ end
112
+
113
+ if attributes.key?(:'tenant_id')
114
+ self.tenant_id = attributes[:'tenant_id']
115
+ end
116
+
117
+ if attributes.key?(:'tenant_name')
118
+ self.tenant_name = attributes[:'tenant_name']
119
+ end
120
+ end
121
+
122
+ # Check to see if the all the properties in the model are valid
123
+ # @return true if the model is valid
124
+ # @!visibility private
125
+ def valid?
126
+ return false if !@channel_id.nil? && @channel_id.to_s.length > 255
127
+ return false if !@channel_name.nil? && @channel_name.to_s.length > 255
128
+ return false if !@name.nil? && @name.to_s.length > 255
129
+ return false if !@team_id.nil? && @team_id.to_s.length > 255
130
+ return false if !@team_name.nil? && @team_name.to_s.length > 255
131
+ return false if !@tenant_id.nil? && @tenant_id.to_s.length > 255
132
+ return false if !@tenant_name.nil? && @tenant_name.to_s.length > 255
133
+ true
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param channel_id [Object] Object to be assigned
138
+ # @!visibility private
139
+ def channel_id=(channel_id)
140
+ if !channel_id.nil? && channel_id.to_s.length > 255
141
+ fail ArgumentError, 'invalid value for "channel_id", the character length must be smaller than or equal to 255.'
142
+ end
143
+ @channel_id = channel_id
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param channel_name [Object] Object to be assigned
148
+ # @!visibility private
149
+ def channel_name=(channel_name)
150
+ if !channel_name.nil? && channel_name.to_s.length > 255
151
+ fail ArgumentError, 'invalid value for "channel_name", the character length must be smaller than or equal to 255.'
152
+ end
153
+ @channel_name = channel_name
154
+ end
155
+
156
+ # Custom attribute writer method with validation
157
+ # @param name [Object] Object to be assigned
158
+ # @!visibility private
159
+ def name=(name)
160
+ if !name.nil? && name.to_s.length > 255
161
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
162
+ end
163
+ @name = name
164
+ end
165
+
166
+ # Custom attribute writer method with validation
167
+ # @param team_id [Object] Object to be assigned
168
+ # @!visibility private
169
+ def team_id=(team_id)
170
+ if !team_id.nil? && team_id.to_s.length > 255
171
+ fail ArgumentError, 'invalid value for "team_id", the character length must be smaller than or equal to 255.'
172
+ end
173
+ @team_id = team_id
174
+ end
175
+
176
+ # Custom attribute writer method with validation
177
+ # @param team_name [Object] Object to be assigned
178
+ # @!visibility private
179
+ def team_name=(team_name)
180
+ if !team_name.nil? && team_name.to_s.length > 255
181
+ fail ArgumentError, 'invalid value for "team_name", the character length must be smaller than or equal to 255.'
182
+ end
183
+ @team_name = team_name
184
+ end
185
+
186
+ # Custom attribute writer method with validation
187
+ # @param tenant_id [Object] Object to be assigned
188
+ # @!visibility private
189
+ def tenant_id=(tenant_id)
190
+ if !tenant_id.nil? && tenant_id.to_s.length > 255
191
+ fail ArgumentError, 'invalid value for "tenant_id", the character length must be smaller than or equal to 255.'
192
+ end
193
+ @tenant_id = tenant_id
194
+ end
195
+
196
+ # Custom attribute writer method with validation
197
+ # @param tenant_name [Object] Object to be assigned
198
+ # @!visibility private
199
+ def tenant_name=(tenant_name)
200
+ if !tenant_name.nil? && tenant_name.to_s.length > 255
201
+ fail ArgumentError, 'invalid value for "tenant_name", the character length must be smaller than or equal to 255.'
202
+ end
203
+ @tenant_name = tenant_name
204
+ end
205
+
206
+ # Returns the object in the form of hash, with additionalProperties support.
207
+ # @return [Hash] Returns the object in the form of hash
208
+ # @!visibility private
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ self.additional_properties.each_pair do |attr, value|
221
+ hash[attr] = value
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Checks equality by comparing each attribute.
227
+ # @param o [Object] Object to be compared
228
+ # @!visibility private
229
+ def ==(o)
230
+ return true if self.equal?(o)
231
+ self.class == o.class &&
232
+ channel_id == o.channel_id &&
233
+ channel_name == o.channel_name &&
234
+ name == o.name &&
235
+ team_id == o.team_id &&
236
+ team_name == o.team_name &&
237
+ tenant_id == o.tenant_id &&
238
+ tenant_name == o.tenant_name
239
+ additional_properties == o.additional_properties
240
+ end
241
+
242
+ # Calculates hash code according to all attributes.
243
+ # @return [Integer] Hash code
244
+ # @!visibility private
245
+ def hash
246
+ [channel_id, channel_name, name, team_id, team_name, tenant_id, tenant_name].hash
247
+ end
248
+ end
249
+ end
@@ -0,0 +1,147 @@
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
+ # Handle data from a response.
21
+ class MicrosoftTeamsApiHandleInfoResponseData
22
+ include BaseGenericModel
23
+
24
+ # Handle attributes.
25
+ attr_accessor :attributes
26
+
27
+ # The ID of the handle.
28
+ attr_reader :id
29
+
30
+ # Handle resource type.
31
+ attr_accessor :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
+ :'attributes' => :'attributes',
40
+ :'id' => :'id',
41
+ :'type' => :'type'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ # @!visibility private
47
+ def self.openapi_types
48
+ {
49
+ :'attributes' => :'MicrosoftTeamsApiHandleInfoResponseAttributes',
50
+ :'id' => :'String',
51
+ :'type' => :'MicrosoftTeamsApiHandleInfoType'
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::MicrosoftTeamsApiHandleInfoResponseData` 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?(:'attributes')
74
+ self.attributes = attributes[:'attributes']
75
+ end
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
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 !@id.nil? && @id.to_s.length > 100
91
+ return false if !@id.nil? && @id.to_s.length < 1
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param id [Object] Object to be assigned
97
+ # @!visibility private
98
+ def id=(id)
99
+ if !id.nil? && id.to_s.length > 100
100
+ fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 100.'
101
+ end
102
+ if !id.nil? && id.to_s.length < 1
103
+ fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
104
+ end
105
+ @id = id
106
+ end
107
+
108
+ # Returns the object in the form of hash, with additionalProperties support.
109
+ # @return [Hash] Returns the object in the form of hash
110
+ # @!visibility private
111
+ def to_hash
112
+ hash = {}
113
+ self.class.attribute_map.each_pair do |attr, param|
114
+ value = self.send(attr)
115
+ if value.nil?
116
+ is_nullable = self.class.openapi_nullable.include?(attr)
117
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
118
+ end
119
+
120
+ hash[param] = _to_hash(value)
121
+ end
122
+ self.additional_properties.each_pair do |attr, value|
123
+ hash[attr] = value
124
+ end
125
+ hash
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param o [Object] Object to be compared
130
+ # @!visibility private
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ attributes == o.attributes &&
135
+ id == o.id &&
136
+ type == o.type
137
+ additional_properties == o.additional_properties
138
+ end
139
+
140
+ # Calculates hash code according to all attributes.
141
+ # @return [Integer] Hash code
142
+ # @!visibility private
143
+ def hash
144
+ [attributes, id, type].hash
145
+ end
146
+ end
147
+ end