Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add url attribute to metrics assets v2 api #1965

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-08-21 15:16:50.670612",
"spec_repo_commit": "4470dfc1"
"regenerated": "2024-08-21 16:52:37.001384",
"spec_repo_commit": "ffed3856"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-08-21 15:16:50.697349",
"spec_repo_commit": "4470dfc1"
"regenerated": "2024-08-21 16:52:37.026367",
"spec_repo_commit": "ffed3856"
}
}
}
11 changes: 9 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12649,11 +12649,14 @@ components:
readOnly: true
type: object
MetricAssetAttributes:
description: Assets where only included attribute is its title
description: Assets related to the object, including title and url.
properties:
title:
description: Title of the asset.
type: string
url:
description: URL path of the asset.
type: string
type: object
MetricAssetDashboardRelationship:
description: An object of type `dashboard` that can be referenced in the `included`
Expand Down Expand Up @@ -13033,7 +13036,8 @@ components:
- type
type: object
MetricDashboardAttributes:
description: Attributes related to the dashboard, including title and popularity.
description: Attributes related to the dashboard, including title, popularity,
and url.
properties:
popularity:
description: Value from 0 to 5 that ranks popularity of the dashboard.
Expand All @@ -13044,6 +13048,9 @@ components:
title:
description: Title of the asset.
type: string
url:
description: URL path of the asset.
type: string
type: object
MetricDashboardID:
description: The related dashboard's ID.
Expand Down
20 changes: 15 additions & 5 deletions lib/datadog_api_client/v2/models/metric_asset_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,33 @@
require 'time'

module DatadogAPIClient::V2
# Assets where only included attribute is its title
# Assets related to the object, including title and url.
class MetricAssetAttributes
include BaseGenericModel

# Title of the asset.
attr_accessor :title

# URL path of the asset.
attr_accessor :url

attr_accessor :additional_properties

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

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'title' => :'String'
:'title' => :'String',
:'url' => :'String'
}
end

Expand All @@ -63,6 +68,10 @@ def initialize(attributes = {})
if attributes.key?(:'title')
self.title = attributes[:'title']
end

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

# Returns the object in the form of hash, with additionalProperties support.
Expand Down Expand Up @@ -91,15 +100,16 @@ def to_hash
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
title == o.title
title == o.title &&
url == o.url
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[title].hash
[title, url].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module DatadogAPIClient::V2
class MetricDashboardAsset
include BaseGenericModel

# Attributes related to the dashboard, including title and popularity.
# Attributes related to the dashboard, including title, popularity, and url.
attr_accessor :attributes

# The related dashboard's ID.
Expand Down
20 changes: 15 additions & 5 deletions lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require 'time'

module DatadogAPIClient::V2
# Attributes related to the dashboard, including title and popularity.
# Attributes related to the dashboard, including title, popularity, and url.
class MetricDashboardAttributes
include BaseGenericModel

Expand All @@ -27,14 +27,18 @@ class MetricDashboardAttributes
# Title of the asset.
attr_accessor :title

# URL path of the asset.
attr_accessor :url

attr_accessor :additional_properties

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

Expand All @@ -43,7 +47,8 @@ def self.attribute_map
def self.openapi_types
{
:'popularity' => :'Float',
:'title' => :'String'
:'title' => :'String',
:'url' => :'String'
}
end

Expand Down Expand Up @@ -72,6 +77,10 @@ def initialize(attributes = {})
if attributes.key?(:'title')
self.title = attributes[:'title']
end

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

# Check to see if the all the properties in the model are valid
Expand Down Expand Up @@ -123,15 +132,16 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
popularity == o.popularity &&
title == o.title
title == o.title &&
url == o.url
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[popularity, title].hash
[popularity, title, url].hash
end
end
end
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v2/models/metric_monitor_asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module DatadogAPIClient::V2
class MetricMonitorAsset
include BaseGenericModel

# Assets where only included attribute is its title
# Assets related to the object, including title and url.
attr_accessor :attributes

# The related monitor's ID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module DatadogAPIClient::V2
class MetricNotebookAsset
include BaseGenericModel

# Assets where only included attribute is its title
# Assets related to the object, including title and url.
attr_accessor :attributes

# The related notebook's ID.
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v2/models/metric_slo_asset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module DatadogAPIClient::V2
class MetricSLOAsset
include BaseGenericModel

# Assets where only included attribute is its title
# Assets related to the object, including title and url.
attr_accessor :attributes

# The SLO ID.
Expand Down
Loading