Skip to content

Commit b5ae097

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add MSTeams integration metadata info (#2045)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 727570a commit b5ae097

File tree

6 files changed

+357
-5
lines changed

6 files changed

+357
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-10-04 10:38:27.221073",
8-
"spec_repo_commit": "7a63d530"
7+
"regenerated": "2024-10-04 15:31:54.748352",
8+
"spec_repo_commit": "f28ad048"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-04 10:38:27.235409",
13-
"spec_repo_commit": "7a63d530"
12+
"regenerated": "2024-10-04 15:31:54.762784",
13+
"spec_repo_commit": "f28ad048"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10640,6 +10640,7 @@ components:
1064010640
oneOf:
1064110641
- $ref: '#/components/schemas/SlackIntegrationMetadata'
1064210642
- $ref: '#/components/schemas/JiraIntegrationMetadata'
10643+
- $ref: '#/components/schemas/MSTeamsIntegrationMetadata'
1064310644
IncidentIntegrationMetadataPatchData:
1064410645
description: Incident integration metadata data for a patch request.
1064510646
properties:
@@ -13634,6 +13635,43 @@ components:
1363413635
from the other indexes
1363513636
type: string
1363613637
type: object
13638+
MSTeamsIntegrationMetadata:
13639+
description: Incident integration metadata for the Microsoft Teams integration.
13640+
properties:
13641+
teams:
13642+
description: Array of Microsoft Teams in this integration metadata.
13643+
example: []
13644+
items:
13645+
$ref: '#/components/schemas/MSTeamsIntegrationMetadataTeamsItem'
13646+
type: array
13647+
required:
13648+
- teams
13649+
type: object
13650+
MSTeamsIntegrationMetadataTeamsItem:
13651+
description: Item in the Microsoft Teams integration metadata teams array.
13652+
properties:
13653+
ms_channel_id:
13654+
description: Microsoft Teams channel ID.
13655+
example: 19:abc00abcdef00a0abcdef0abcdef0a@thread.tacv2
13656+
type: string
13657+
ms_channel_name:
13658+
description: Microsoft Teams channel name.
13659+
example: incident-0001-example
13660+
type: string
13661+
ms_tenant_id:
13662+
description: Microsoft Teams tenant ID.
13663+
example: 00000000-abcd-0005-0000-000000000000
13664+
type: string
13665+
redirect_url:
13666+
description: URL redirecting to the Microsoft Teams channel.
13667+
example: https://teams.microsoft.com/l/channel/19%3Aabc00abcdef00a0abcdef0abcdef0a%40thread.tacv2/conversations?groupId=12345678-abcd-dcba-abcd-1234567890ab&tenantId=00000000-abcd-0005-0000-000000000000
13668+
type: string
13669+
required:
13670+
- ms_tenant_id
13671+
- ms_channel_id
13672+
- ms_channel_name
13673+
- redirect_url
13674+
type: object
1363713675
Metric:
1363813676
description: Object for a single metric tag configuration.
1363913677
example:

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,8 @@ def overrides
18411841
"v2.monthly_cost_attribution_meta" => "MonthlyCostAttributionMeta",
18421842
"v2.monthly_cost_attribution_pagination" => "MonthlyCostAttributionPagination",
18431843
"v2.monthly_cost_attribution_response" => "MonthlyCostAttributionResponse",
1844+
"v2.ms_teams_integration_metadata" => "MSTeamsIntegrationMetadata",
1845+
"v2.ms_teams_integration_metadata_teams_item" => "MSTeamsIntegrationMetadataTeamsItem",
18441846
"v2.nullable_relationship_to_user" => "NullableRelationshipToUser",
18451847
"v2.nullable_relationship_to_user_data" => "NullableRelationshipToUserData",
18461848
"v2.nullable_user_relationship" => "NullableUserRelationship",

lib/datadog_api_client/v2/models/incident_integration_metadata_metadata.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ class << self
2727
def openapi_one_of
2828
[
2929
:'SlackIntegrationMetadata',
30-
:'JiraIntegrationMetadata'
30+
:'JiraIntegrationMetadata',
31+
:'MSTeamsIntegrationMetadata'
3132
]
3233
end
3334
# Builds the object
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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+
# Incident integration metadata for the Microsoft Teams integration.
21+
class MSTeamsIntegrationMetadata
22+
include BaseGenericModel
23+
24+
# Array of Microsoft Teams in this integration metadata.
25+
attr_reader :teams
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+
:'teams' => :'teams'
34+
}
35+
end
36+
37+
# Attribute type mapping.
38+
# @!visibility private
39+
def self.openapi_types
40+
{
41+
:'teams' => :'Array<MSTeamsIntegrationMetadataTeamsItem>'
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::MSTeamsIntegrationMetadata` 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?(:'teams')
64+
if (value = attributes[:'teams']).is_a?(Array)
65+
self.teams = value
66+
end
67+
end
68+
end
69+
70+
# Check to see if the all the properties in the model are valid
71+
# @return true if the model is valid
72+
# @!visibility private
73+
def valid?
74+
return false if @teams.nil?
75+
true
76+
end
77+
78+
# Custom attribute writer method with validation
79+
# @param teams [Object] Object to be assigned
80+
# @!visibility private
81+
def teams=(teams)
82+
if teams.nil?
83+
fail ArgumentError, 'invalid value for "teams", teams cannot be nil.'
84+
end
85+
@teams = teams
86+
end
87+
88+
# Returns the object in the form of hash, with additionalProperties support.
89+
# @return [Hash] Returns the object in the form of hash
90+
# @!visibility private
91+
def to_hash
92+
hash = {}
93+
self.class.attribute_map.each_pair do |attr, param|
94+
value = self.send(attr)
95+
if value.nil?
96+
is_nullable = self.class.openapi_nullable.include?(attr)
97+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
98+
end
99+
100+
hash[param] = _to_hash(value)
101+
end
102+
self.additional_properties.each_pair do |attr, value|
103+
hash[attr] = value
104+
end
105+
hash
106+
end
107+
108+
# Checks equality by comparing each attribute.
109+
# @param o [Object] Object to be compared
110+
# @!visibility private
111+
def ==(o)
112+
return true if self.equal?(o)
113+
self.class == o.class &&
114+
teams == o.teams
115+
additional_properties == o.additional_properties
116+
end
117+
118+
# Calculates hash code according to all attributes.
119+
# @return [Integer] Hash code
120+
# @!visibility private
121+
def hash
122+
[teams].hash
123+
end
124+
end
125+
end

0 commit comments

Comments
 (0)