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
50 changes: 47 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126140,6 +126140,41 @@ components:
- type
- attributes
type: object
SecurityMonitoringBatchMigrationPublishError:
description: The reason why the resource could not be published.
properties:
code:
description: The error code returned on rule creation.
example: InvalidArgument
type: string
details:
description: The rule validation errors returned on rule creation.
items:
$ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishErrorDetail"
type: array
message:
description: The error message.
example: Invalid rule configuration
type: string
required:
- message
type: object
SecurityMonitoringBatchMigrationPublishErrorDetail:
description: A rule validation error.
properties:
code:
description: The error code.
example: AlreadyExists
type: string
message:
description: The error message.
example: Rule name must be unique
type: string
target:
description: The rule field the error applies to.
example: name
type: string
type: object
SecurityMonitoringBatchMigrationPublishRequest:
description: Request to publish the resources of a batch migration.
properties:
Expand Down Expand Up @@ -126183,9 +126218,7 @@ components:
description: Attributes of the publication outcome of a batch migration resource.
properties:
error:
description: The reason why the resource could not be published.
example: failed to create rule
type: string
$ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishError"
ruleId:
description: The ID of the created Cloud SIEM detection rule.
example: abc-def-ghi
Expand Down Expand Up @@ -249749,6 +249782,17 @@ paths:
status: published
id: c968cf83-56c2-4d54-a993-6c86dfb83527
type: batchMigrationPublishedResource
- attributes:
error:
code: InvalidArgument
details:
- code: AlreadyExists
message: Rule name must be unique
target: name
message: Invalid rule configuration
status: failed
id: 0b9d3f3e-2a4c-4e8b-9f1a-6d2c7e5b8a41
type: batchMigrationPublishedResource
schema:
$ref: "#/components/schemas/SecurityMonitoringBatchMigrationPublishResponse"
description: OK
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8564,6 +8564,8 @@ def overrides
"v2.security_monitoring_batch_migration_published_resource_data" => "SecurityMonitoringBatchMigrationPublishedResourceData",
"v2.security_monitoring_batch_migration_published_resource_status" => "SecurityMonitoringBatchMigrationPublishedResourceStatus",
"v2.security_monitoring_batch_migration_published_resource_type" => "SecurityMonitoringBatchMigrationPublishedResourceType",
"v2.security_monitoring_batch_migration_publish_error" => "SecurityMonitoringBatchMigrationPublishError",
"v2.security_monitoring_batch_migration_publish_error_detail" => "SecurityMonitoringBatchMigrationPublishErrorDetail",
"v2.security_monitoring_batch_migration_publish_request" => "SecurityMonitoringBatchMigrationPublishRequest",
"v2.security_monitoring_batch_migration_publish_response" => "SecurityMonitoringBatchMigrationPublishResponse",
"v2.security_monitoring_batch_migration_publish_type" => "SecurityMonitoringBatchMigrationPublishType",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
=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
# The reason why the resource could not be published.
class SecurityMonitoringBatchMigrationPublishError
include BaseGenericModel

# The error code returned on rule creation.
attr_accessor :code

# The rule validation errors returned on rule creation.
attr_accessor :details

# The error message.
attr_reader :message

attr_accessor :additional_properties

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

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'code' => :'String',
:'details' => :'Array<SecurityMonitoringBatchMigrationPublishErrorDetail>',
:'message' => :'String'
}
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::SecurityMonitoringBatchMigrationPublishError` 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?(:'code')
self.code = attributes[:'code']
end

if attributes.key?(:'details')
if (value = attributes[:'details']).is_a?(Array)
self.details = value
end
end

if attributes.key?(:'message')
self.message = attributes[:'message']
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 @message.nil?
true
end

# Custom attribute writer method with validation
# @param message [Object] Object to be assigned
# @!visibility private
def message=(message)
if message.nil?
fail ArgumentError, 'invalid value for "message", message cannot be nil.'
end
@message = message
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 &&
code == o.code &&
details == o.details &&
message == o.message &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[code, details, message, additional_properties].hash
end
end
end
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: 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
# A rule validation error.
class SecurityMonitoringBatchMigrationPublishErrorDetail
include BaseGenericModel

# The error code.
attr_accessor :code

# The error message.
attr_accessor :message

# The rule field the error applies to.
attr_accessor :target

attr_accessor :additional_properties

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

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'code' => :'String',
:'message' => :'String',
:'target' => :'String'
}
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::SecurityMonitoringBatchMigrationPublishErrorDetail` 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?(:'code')
self.code = attributes[:'code']
end

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

if attributes.key?(:'target')
self.target = attributes[:'target']
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 &&
code == o.code &&
message == o.message &&
target == o.target &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[code, message, target, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def self.attribute_map
# @!visibility private
def self.openapi_types
{
:'error' => :'String',
:'error' => :'SecurityMonitoringBatchMigrationPublishError',
:'rule_id' => :'String',
:'status' => :'SecurityMonitoringBatchMigrationPublishedResourceStatus'
}
Expand Down
Loading