Skip to content
Merged
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
25 changes: 14 additions & 11 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7199,13 +7199,14 @@ components:
- fixes
type: object
Annotation:
description: "A list of annotations used in the workflow. These are like sticky notes for your workflow!"
description: A text annotation displayed on the workflow canvas.
properties:
display:
$ref: "#/components/schemas/AnnotationDisplay"
id:
description: The `Annotation` `id`.
description: The unique identifier of this annotation within the workflow.
example: ""
minLength: 1
type: string
markdownTextAnnotation:
$ref: "#/components/schemas/AnnotationMarkdownTextAnnotation"
Expand Down Expand Up @@ -7362,28 +7363,28 @@ components:
- attributes
type: object
AnnotationDisplay:
description: The definition of `AnnotationDisplay` object.
description: The annotation's position and size on the workflow canvas.
properties:
bounds:
$ref: "#/components/schemas/AnnotationDisplayBounds"
type: object
AnnotationDisplayBounds:
description: The definition of `AnnotationDisplayBounds` object.
description: Canvas coordinates and dimensions for an annotation on the workflow canvas.
properties:
height:
description: The `bounds` `height`.
description: The annotation's height on the canvas.
format: double
type: number
width:
description: The `bounds` `width`.
description: The annotation's width on the canvas.
format: double
type: number
x:
description: The `bounds` `x`.
description: The annotation's horizontal canvas coordinate.
format: double
type: number
y:
description: The `bounds` `y`.
description: The annotation's vertical canvas coordinate.
format: double
type: number
type: object
Expand Down Expand Up @@ -7467,10 +7468,11 @@ components:
- POINT_IN_TIME
- TIME_REGION
AnnotationMarkdownTextAnnotation:
description: The definition of `AnnotationMarkdownTextAnnotation` object.
description: Markdown content displayed in an annotation.
properties:
text:
description: The `markdownTextAnnotation` `text`.
description: The annotation's Markdown content.
maxLength: 3000
type: string
type: object
AnnotationRequestData:
Expand Down Expand Up @@ -107323,9 +107325,10 @@ components:
description: A complete Workflow Automation definition, including its triggers, steps, and connections.
properties:
annotations:
description: "A list of annotations used in the workflow. These are like sticky notes for your workflow!"
description: Up to 100 text annotations displayed on the workflow canvas.
items:
$ref: "#/components/schemas/Annotation"
maxItems: 100
type: array
connectionEnvs:
description: A list of connections or connection groups used in the workflow.
Expand Down
12 changes: 8 additions & 4 deletions lib/datadog_api_client/v2/models/annotation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
require 'time'

module DatadogAPIClient::V2
# A list of annotations used in the workflow. These are like sticky notes for your workflow!
# A text annotation displayed on the workflow canvas.
class Annotation
include BaseGenericModel

# The definition of `AnnotationDisplay` object.
# The annotation's position and size on the workflow canvas.
attr_reader :display

# The `Annotation` `id`.
# The unique identifier of this annotation within the workflow.
attr_reader :id

# The definition of `AnnotationMarkdownTextAnnotation` object.
# Markdown content displayed in an annotation.
attr_reader :markdown_text_annotation

attr_accessor :additional_properties
Expand Down Expand Up @@ -89,6 +89,7 @@ def initialize(attributes = {})
def valid?
return false if @display.nil?
return false if @id.nil?
return false if @id.to_s.length < 1
return false if @markdown_text_annotation.nil?
true
end
Expand All @@ -110,6 +111,9 @@ def id=(id)
if id.nil?
fail ArgumentError, 'invalid value for "id", id cannot be nil.'
end
if id.to_s.length < 1
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
end
@id = id
end

Expand Down
4 changes: 2 additions & 2 deletions lib/datadog_api_client/v2/models/annotation_display.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
require 'time'

module DatadogAPIClient::V2
# The definition of `AnnotationDisplay` object.
# The annotation's position and size on the workflow canvas.
class AnnotationDisplay
include BaseGenericModel

# The definition of `AnnotationDisplayBounds` object.
# Canvas coordinates and dimensions for an annotation on the workflow canvas.
attr_accessor :bounds

attr_accessor :additional_properties
Expand Down
10 changes: 5 additions & 5 deletions lib/datadog_api_client/v2/models/annotation_display_bounds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
require 'time'

module DatadogAPIClient::V2
# The definition of `AnnotationDisplayBounds` object.
# Canvas coordinates and dimensions for an annotation on the workflow canvas.
class AnnotationDisplayBounds
include BaseGenericModel

# The `bounds` `height`.
# The annotation's height on the canvas.
attr_accessor :height

# The `bounds` `width`.
# The annotation's width on the canvas.
attr_accessor :width

# The `bounds` `x`.
# The annotation's horizontal canvas coordinate.
attr_accessor :x

# The `bounds` `y`.
# The annotation's vertical canvas coordinate.
attr_accessor :y

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
require 'time'

module DatadogAPIClient::V2
# The definition of `AnnotationMarkdownTextAnnotation` object.
# Markdown content displayed in an annotation.
class AnnotationMarkdownTextAnnotation
include BaseGenericModel

# The `markdownTextAnnotation` `text`.
attr_accessor :text
# The annotation's Markdown content.
attr_reader :text

attr_accessor :additional_properties

Expand Down Expand Up @@ -65,6 +65,24 @@ def initialize(attributes = {})
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 !@text.nil? && @text.to_s.length > 3000
true
end

# Custom attribute writer method with validation
# @param text [Object] Object to be assigned
# @!visibility private
def text=(text)
if !text.nil? && text.to_s.length > 3000
fail ArgumentError, 'invalid value for "text", the character length must be smaller than or equal to 3000.'
end
@text = text
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
Expand Down
22 changes: 20 additions & 2 deletions lib/datadog_api_client/v2/models/spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ module DatadogAPIClient::V2
class Spec
include BaseGenericModel

# A list of annotations used in the workflow. These are like sticky notes for your workflow!
attr_accessor :annotations
# Up to 100 text annotations displayed on the workflow canvas.
attr_reader :annotations

# A list of connections or connection groups used in the workflow.
attr_accessor :connection_envs
Expand Down Expand Up @@ -127,6 +127,24 @@ def initialize(attributes = {})
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 !@annotations.nil? && @annotations.length > 100
true
end

# Custom attribute writer method with validation
# @param annotations [Object] Object to be assigned
# @!visibility private
def annotations=(annotations)
if !annotations.nil? && annotations.length > 100
fail ArgumentError, 'invalid value for "annotations", number of items must be less than or equal to 100.'
end
@annotations = annotations
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
Expand Down
Loading