-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MSTeams integration metadata info (#2045)
Co-authored-by: ci.datadog-api-spec <[email protected]>
- Loading branch information
1 parent
727570a
commit b5ae097
Showing
6 changed files
with
357 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10640,6 +10640,7 @@ components: | |
oneOf: | ||
- $ref: '#/components/schemas/SlackIntegrationMetadata' | ||
- $ref: '#/components/schemas/JiraIntegrationMetadata' | ||
- $ref: '#/components/schemas/MSTeamsIntegrationMetadata' | ||
IncidentIntegrationMetadataPatchData: | ||
description: Incident integration metadata data for a patch request. | ||
properties: | ||
|
@@ -13634,6 +13635,43 @@ components: | |
from the other indexes | ||
type: string | ||
type: object | ||
MSTeamsIntegrationMetadata: | ||
description: Incident integration metadata for the Microsoft Teams integration. | ||
properties: | ||
teams: | ||
description: Array of Microsoft Teams in this integration metadata. | ||
example: [] | ||
items: | ||
$ref: '#/components/schemas/MSTeamsIntegrationMetadataTeamsItem' | ||
type: array | ||
required: | ||
- teams | ||
type: object | ||
MSTeamsIntegrationMetadataTeamsItem: | ||
description: Item in the Microsoft Teams integration metadata teams array. | ||
properties: | ||
ms_channel_id: | ||
description: Microsoft Teams channel ID. | ||
example: 19:[email protected] | ||
type: string | ||
ms_channel_name: | ||
description: Microsoft Teams channel name. | ||
example: incident-0001-example | ||
type: string | ||
ms_tenant_id: | ||
description: Microsoft Teams tenant ID. | ||
example: 00000000-abcd-0005-0000-000000000000 | ||
type: string | ||
redirect_url: | ||
description: URL redirecting to the Microsoft Teams channel. | ||
example: https://teams.microsoft.com/l/channel/19%3Aabc00abcdef00a0abcdef0abcdef0a%40thread.tacv2/conversations?groupId=12345678-abcd-dcba-abcd-1234567890ab&tenantId=00000000-abcd-0005-0000-000000000000 | ||
type: string | ||
required: | ||
- ms_tenant_id | ||
- ms_channel_id | ||
- ms_channel_name | ||
- redirect_url | ||
type: object | ||
Metric: | ||
description: Object for a single metric tag configuration. | ||
example: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 125 additions & 0 deletions
125
lib/datadog_api_client/v2/models/ms_teams_integration_metadata.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
=begin | ||
#Datadog API V2 Collection | ||
#Collection of all Datadog Public endpoints. | ||
The version of the OpenAPI document: 1.0 | ||
Contact: [email protected] | ||
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator | ||
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. | ||
This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
Copyright 2020-Present Datadog, Inc. | ||
=end | ||
|
||
require 'date' | ||
require 'time' | ||
|
||
module DatadogAPIClient::V2 | ||
# Incident integration metadata for the Microsoft Teams integration. | ||
class MSTeamsIntegrationMetadata | ||
include BaseGenericModel | ||
|
||
# Array of Microsoft Teams in this integration metadata. | ||
attr_reader :teams | ||
|
||
attr_accessor :additional_properties | ||
|
||
# Attribute mapping from ruby-style variable name to JSON key. | ||
# @!visibility private | ||
def self.attribute_map | ||
{ | ||
:'teams' => :'teams' | ||
} | ||
end | ||
|
||
# Attribute type mapping. | ||
# @!visibility private | ||
def self.openapi_types | ||
{ | ||
:'teams' => :'Array<MSTeamsIntegrationMetadataTeamsItem>' | ||
} | ||
end | ||
|
||
# Initializes the object | ||
# @param attributes [Hash] Model attributes in the form of hash | ||
# @!visibility private | ||
def initialize(attributes = {}) | ||
if (!attributes.is_a?(Hash)) | ||
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MSTeamsIntegrationMetadata` initialize method" | ||
end | ||
|
||
self.additional_properties = {} | ||
# check to see if the attribute exists and convert string to symbol for hash key | ||
attributes = attributes.each_with_object({}) { |(k, v), h| | ||
if (!self.class.attribute_map.key?(k.to_sym)) | ||
self.additional_properties[k.to_sym] = v | ||
else | ||
h[k.to_sym] = v | ||
end | ||
} | ||
|
||
if attributes.key?(:'teams') | ||
if (value = attributes[:'teams']).is_a?(Array) | ||
self.teams = value | ||
end | ||
end | ||
end | ||
|
||
# Check to see if the all the properties in the model are valid | ||
# @return true if the model is valid | ||
# @!visibility private | ||
def valid? | ||
return false if @teams.nil? | ||
true | ||
end | ||
|
||
# Custom attribute writer method with validation | ||
# @param teams [Object] Object to be assigned | ||
# @!visibility private | ||
def teams=(teams) | ||
if teams.nil? | ||
fail ArgumentError, 'invalid value for "teams", teams cannot be nil.' | ||
end | ||
@teams = teams | ||
end | ||
|
||
# Returns the object in the form of hash, with additionalProperties support. | ||
# @return [Hash] Returns the object in the form of hash | ||
# @!visibility private | ||
def to_hash | ||
hash = {} | ||
self.class.attribute_map.each_pair do |attr, param| | ||
value = self.send(attr) | ||
if value.nil? | ||
is_nullable = self.class.openapi_nullable.include?(attr) | ||
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) | ||
end | ||
|
||
hash[param] = _to_hash(value) | ||
end | ||
self.additional_properties.each_pair do |attr, value| | ||
hash[attr] = value | ||
end | ||
hash | ||
end | ||
|
||
# Checks equality by comparing each attribute. | ||
# @param o [Object] Object to be compared | ||
# @!visibility private | ||
def ==(o) | ||
return true if self.equal?(o) | ||
self.class == o.class && | ||
teams == o.teams | ||
additional_properties == o.additional_properties | ||
end | ||
|
||
# Calculates hash code according to all attributes. | ||
# @return [Integer] Hash code | ||
# @!visibility private | ||
def hash | ||
[teams].hash | ||
end | ||
end | ||
end |
Oops, something went wrong.