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
12 changes: 11 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57046,13 +57046,14 @@ components:
- attributes
type: object
GovernanceControlDetectionAssignmentSource:
description: How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`.
description: How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`. `null` when not set.
enum:
- auto_resolved
- manual
- reassigned
- cleared
example: "manual"
nullable: true
type: string
x-enum-varnames:
- AUTO_RESOLVED
Expand All @@ -57065,10 +57066,12 @@ components:
assigned_team:
description: The identifier of the team the detection is assigned to, if any.
example: "platform-security"
nullable: true
type: string
assigned_to:
description: The identifier of the user the detection is assigned to, if any.
example: "11111111-2222-3333-4444-555555555555"
nullable: true
type: string
assignment_source:
$ref: "#/components/schemas/GovernanceControlDetectionAssignmentSource"
Expand All @@ -57091,15 +57094,18 @@ components:
display_name:
description: The human-readable name of the detected resource.
example: "CI Deploy Key"
nullable: true
type: string
exception_at:
description: The date and time when the detection was marked as an exception, if applicable.
example: "2024-03-05T09:00:00Z"
format: date-time
nullable: true
type: string
exception_by:
description: The identifier of the user who marked the detection as an exception, if applicable.
example: "11111111-2222-3333-4444-555555555555"
nullable: true
type: string
metadata:
description: Free-form metadata associated with the detection.
Expand All @@ -57109,16 +57115,19 @@ components:
description: The date and time after which the detection is scheduled to be mitigated, if applicable.
example: "2024-03-15T00:00:00Z"
format: date-time
nullable: true
type: string
mitigated_at:
description: The date and time when the detection was mitigated, if applicable.
example: "2024-03-10T15:30:00Z"
format: date-time
nullable: true
type: string
priority:
description: The priority of the detection, if set.
example: 1
format: int64
nullable: true
type: integer
resource_id:
description: The identifier of the resource the detection applies to.
Expand All @@ -57127,6 +57136,7 @@ components:
resource_type:
description: The type of resource the detection applies to, for example `api_key` or `dashboard`.
example: "api_key"
nullable: true
type: string
state:
$ref: "#/components/schemas/GovernanceControlDetectionState"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require 'time'

module DatadogAPIClient::V2
# How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`.
# How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`. `null` when not set.
class GovernanceControlDetectionAssignmentSource
include BaseEnumModel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class GovernanceControlDetectionAttributes
# The identifier of the user the detection is assigned to, if any.
attr_accessor :assigned_to

# How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`.
attr_reader :assignment_source
# How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`. `null` when not set.
attr_accessor :assignment_source

# DEPRECATED: mirrors `detection_type` for backward compatibility; use `detection_type`
# instead.
Expand All @@ -41,7 +41,7 @@ class GovernanceControlDetectionAttributes
attr_reader :detection_type

# The human-readable name of the detected resource.
attr_reader :display_name
attr_accessor :display_name

# The date and time when the detection was marked as an exception, if applicable.
attr_accessor :exception_at
Expand All @@ -59,13 +59,13 @@ class GovernanceControlDetectionAttributes
attr_accessor :mitigated_at

# The priority of the detection, if set.
attr_reader :priority
attr_accessor :priority

# The identifier of the resource the detection applies to.
attr_reader :resource_id

# The type of resource the detection applies to, for example `api_key` or `dashboard`.
attr_reader :resource_type
attr_accessor :resource_type

# The current state of the detection. Possible values are `active`, `exception`, `mitigated`, `inactive`, `obsolete`, `resolved_externally`, and `mitigation_in_progress`.
attr_reader :state
Expand Down Expand Up @@ -118,6 +118,23 @@ def self.openapi_types
}
end

# List of attributes with nullable: true
# @!visibility private
def self.openapi_nullable
Set.new([
:'assigned_team',
:'assigned_to',
:'assignment_source',
:'display_name',
:'exception_at',
:'exception_by',
:'mitigate_after',
:'mitigated_at',
:'priority',
:'resource_type',
])
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
Expand Down Expand Up @@ -205,28 +222,14 @@ def initialize(attributes = {})
# @return true if the model is valid
# @!visibility private
def valid?
return false if @assignment_source.nil?
return false if @control_id.nil?
return false if @created_at.nil?
return false if @detection_type.nil?
return false if @display_name.nil?
return false if @priority.nil?
return false if @resource_id.nil?
return false if @resource_type.nil?
return false if @state.nil?
true
end

# Custom attribute writer method with validation
# @param assignment_source [Object] Object to be assigned
# @!visibility private
def assignment_source=(assignment_source)
if assignment_source.nil?
fail ArgumentError, 'invalid value for "assignment_source", assignment_source cannot be nil.'
end
@assignment_source = assignment_source
end

# Custom attribute writer method with validation
# @param control_id [Object] Object to be assigned
# @!visibility private
Expand Down Expand Up @@ -257,26 +260,6 @@ def detection_type=(detection_type)
@detection_type = detection_type
end

# Custom attribute writer method with validation
# @param display_name [Object] Object to be assigned
# @!visibility private
def display_name=(display_name)
if display_name.nil?
fail ArgumentError, 'invalid value for "display_name", display_name cannot be nil.'
end
@display_name = display_name
end

# Custom attribute writer method with validation
# @param priority [Object] Object to be assigned
# @!visibility private
def priority=(priority)
if priority.nil?
fail ArgumentError, 'invalid value for "priority", priority cannot be nil.'
end
@priority = priority
end

# Custom attribute writer method with validation
# @param resource_id [Object] Object to be assigned
# @!visibility private
Expand All @@ -287,16 +270,6 @@ def resource_id=(resource_id)
@resource_id = resource_id
end

# Custom attribute writer method with validation
# @param resource_type [Object] Object to be assigned
# @!visibility private
def resource_type=(resource_type)
if resource_type.nil?
fail ArgumentError, 'invalid value for "resource_type", resource_type cannot be nil.'
end
@resource_type = resource_type
end

# Custom attribute writer method with validation
# @param state [Object] Object to be assigned
# @!visibility private
Expand Down
Loading