Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120230,6 +120230,8 @@ components:
description: "The channel ID."
example: CHANNEL
type: string
customizable_content:
$ref: "#/components/schemas/SendSlackMessageActionCustomizableContent"
type:
$ref: "#/components/schemas/SendSlackMessageActionType"
workspace:
Expand All @@ -120241,6 +120243,26 @@ components:
- channel
- workspace
type: object
SendSlackMessageActionCustomizableContent:
description: "Options that customize the content of the Slack message sent for a Page."
properties:
include_description:
description: "Whether to include the Page description in the Slack message."
example: true
type: boolean
include_source:
description: "Whether to include the source that triggered the Page in the Slack message."
example: true
type: boolean
mirror_replies:
description: "Whether to mirror replies posted in the Slack message thread to the Page timeline."
example: false
type: boolean
thread_timeline:
description: "Whether to post Page timeline updates as replies in the Slack message thread."
example: false
type: boolean
type: object
SendSlackMessageActionType:
default: send_slack_message
description: "Indicates that the action is a send Slack message action."
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8227,6 +8227,7 @@ def overrides
"v2.selectors" => "Selectors",
"v2.self_service_trigger_wrapper" => "SelfServiceTriggerWrapper",
"v2.send_slack_message_action" => "SendSlackMessageAction",
"v2.send_slack_message_action_customizable_content" => "SendSlackMessageActionCustomizableContent",
"v2.send_slack_message_action_type" => "SendSlackMessageActionType",
"v2.send_teams_message_action" => "SendTeamsMessageAction",
"v2.send_teams_message_action_type" => "SendTeamsMessageActionType",
Expand Down
12 changes: 11 additions & 1 deletion lib/datadog_api_client/v2/models/send_slack_message_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class SendSlackMessageAction
# The channel ID.
attr_reader :channel

# Options that customize the content of the Slack message sent for a Page.
attr_accessor :customizable_content

# Indicates that the action is a send Slack message action.
attr_reader :type

Expand All @@ -37,6 +40,7 @@ class SendSlackMessageAction
def self.attribute_map
{
:'channel' => :'channel',
:'customizable_content' => :'customizable_content',
:'type' => :'type',
:'workspace' => :'workspace'
}
Expand All @@ -47,6 +51,7 @@ def self.attribute_map
def self.openapi_types
{
:'channel' => :'String',
:'customizable_content' => :'SendSlackMessageActionCustomizableContent',
:'type' => :'SendSlackMessageActionType',
:'workspace' => :'String'
}
Expand Down Expand Up @@ -74,6 +79,10 @@ def initialize(attributes = {})
self.channel = attributes[:'channel']
end

if attributes.key?(:'customizable_content')
self.customizable_content = attributes[:'customizable_content']
end

if attributes.key?(:'type')
self.type = attributes[:'type']
end
Expand Down Expand Up @@ -150,6 +159,7 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
channel == o.channel &&
customizable_content == o.customizable_content &&
type == o.type &&
workspace == o.workspace &&
additional_properties == o.additional_properties
Expand All @@ -159,7 +169,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[channel, type, workspace, additional_properties].hash
[channel, customizable_content, type, workspace, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
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
# Options that customize the content of the Slack message sent for a Page.
class SendSlackMessageActionCustomizableContent
include BaseGenericModel

# Whether to include the Page description in the Slack message.
attr_accessor :include_description

# Whether to include the source that triggered the Page in the Slack message.
attr_accessor :include_source

# Whether to mirror replies posted in the Slack message thread to the Page timeline.
attr_accessor :mirror_replies

# Whether to post Page timeline updates as replies in the Slack message thread.
attr_accessor :thread_timeline

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'include_description' => :'include_description',
:'include_source' => :'include_source',
:'mirror_replies' => :'mirror_replies',
:'thread_timeline' => :'thread_timeline'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'include_description' => :'Boolean',
:'include_source' => :'Boolean',
:'mirror_replies' => :'Boolean',
:'thread_timeline' => :'Boolean'
}
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::SendSlackMessageActionCustomizableContent` 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?(:'include_description')
self.include_description = attributes[:'include_description']
end

if attributes.key?(:'include_source')
self.include_source = attributes[:'include_source']
end

if attributes.key?(:'mirror_replies')
self.mirror_replies = attributes[:'mirror_replies']
end

if attributes.key?(:'thread_timeline')
self.thread_timeline = attributes[:'thread_timeline']
end
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 &&
include_description == o.include_description &&
include_source == o.include_source &&
mirror_replies == o.mirror_replies &&
thread_timeline == o.thread_timeline &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[include_description, include_source, mirror_replies, thread_timeline, additional_properties].hash
end
end
end
Loading