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
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.4.1.dev6",
"regenerated": "2021-03-12 10:37:31.735704",
"spec_repo_commit": "95807f2"
"regenerated": "2021-03-16 19:17:09.841531",
"spec_repo_commit": "cc977e5"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-03-12 10:37:44.418418",
"spec_repo_commit": "95807f2"
"regenerated": "2021-03-16 19:17:24.865935",
"spec_repo_commit": "cc977e5"
}
}
}
33 changes: 33 additions & 0 deletions data/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8259,6 +8259,10 @@ components:
items:
$ref: '#/components/schemas/WidgetEvent'
type: array
legend_columns:
$ref: '#/components/schemas/TimeseriesWidgetLegendColumns'
legend_layout:
$ref: '#/components/schemas/TimeseriesWidgetLegendLayout'
legend_size:
$ref: '#/components/schemas/WidgetLegendSize'
markers:
Expand Down Expand Up @@ -8319,6 +8323,35 @@ components:
required:
- expression
type: object
TimeseriesWidgetLegendColumns:
description: Columns displayed in the legend.
items:
description: Legend column.
enum:
- value
- avg
- sum
- min
- max
type: string
x-enum-varnames:
- VALUE
- AVG
- SUM
- MIN
- MAX
type: array
TimeseriesWidgetLegendLayout:
description: Layout of the legend.
enum:
- auto
- horizontal
- vertical
type: string
x-enum-varnames:
- AUTO
- HORIZONTAL
- VERTICAL
TimeseriesWidgetRequest:
description: Updated timeseries widget.
properties:
Expand Down
1 change: 1 addition & 0 deletions docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ Class | Method | HTTP request | Description
- [DatadogAPIClient::V1::TimeseriesWidgetDefinition](TimeseriesWidgetDefinition.md)
- [DatadogAPIClient::V1::TimeseriesWidgetDefinitionType](TimeseriesWidgetDefinitionType.md)
- [DatadogAPIClient::V1::TimeseriesWidgetExpressionAlias](TimeseriesWidgetExpressionAlias.md)
- [DatadogAPIClient::V1::TimeseriesWidgetLegendLayout](TimeseriesWidgetLegendLayout.md)
- [DatadogAPIClient::V1::TimeseriesWidgetRequest](TimeseriesWidgetRequest.md)
- [DatadogAPIClient::V1::ToplistWidgetDefinition](ToplistWidgetDefinition.md)
- [DatadogAPIClient::V1::ToplistWidgetDefinitionType](ToplistWidgetDefinitionType.md)
Expand Down
4 changes: 4 additions & 0 deletions docs/v1/TimeseriesWidgetDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
| ---- | ---- | ----------- | ----- |
| **custom_links** | [**Array<WidgetCustomLink>**](WidgetCustomLink.md) | List of custom links. | [optional] |
| **events** | [**Array<WidgetEvent>**](WidgetEvent.md) | List of widget events. | [optional] |
| **legend_columns** | **Array<String>** | Columns displayed in the legend. | [optional] |
| **legend_layout** | [**TimeseriesWidgetLegendLayout**](TimeseriesWidgetLegendLayout.md) | | [optional] |
| **legend_size** | **String** | Available legend sizes for a widget. Should be one of \"0\", \"2\", \"4\", \"8\", \"16\", or \"auto\". | [optional] |
| **markers** | [**Array<WidgetMarker>**](WidgetMarker.md) | List of markers. | [optional] |
| **requests** | [**Array<TimeseriesWidgetRequest>**](TimeseriesWidgetRequest.md) | List of timeseries widget requests. | |
Expand All @@ -26,6 +28,8 @@ require 'datadog_api_client/v1'
instance = DatadogAPIClient::V1::TimeseriesWidgetDefinition.new(
custom_links: null,
events: null,
legend_columns: null,
legend_layout: null,
legend_size: null,
markers: null,
requests: [{"q/apm_query/log_query":"<METRIC_1>{<SCOPE_1>}"}],
Expand Down
15 changes: 15 additions & 0 deletions docs/v1/TimeseriesWidgetLegendLayout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# DatadogAPIClient::V1::TimeseriesWidgetLegendLayout

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::TimeseriesWidgetLegendLayout.new()
```

1 change: 1 addition & 0 deletions lib/datadog_api_client/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@
require 'datadog_api_client/v1/models/timeseries_widget_definition'
require 'datadog_api_client/v1/models/timeseries_widget_definition_type'
require 'datadog_api_client/v1/models/timeseries_widget_expression_alias'
require 'datadog_api_client/v1/models/timeseries_widget_legend_layout'
require 'datadog_api_client/v1/models/timeseries_widget_request'
require 'datadog_api_client/v1/models/toplist_widget_definition'
require 'datadog_api_client/v1/models/toplist_widget_definition_type'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ class TimeseriesWidgetDefinition
# List of widget events.
attr_accessor :events

# Columns displayed in the legend.
attr_accessor :legend_columns

attr_accessor :legend_layout

# Available legend sizes for a widget. Should be one of \"0\", \"2\", \"4\", \"8\", \"16\", or \"auto\".
attr_accessor :legend_size

Expand Down Expand Up @@ -53,11 +58,35 @@ class TimeseriesWidgetDefinition

attr_accessor :yaxis

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values

def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end

def valid?(value)
!value || allowable_values.include?(value)
end
end

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'custom_links' => :'custom_links',
:'events' => :'events',
:'legend_columns' => :'legend_columns',
:'legend_layout' => :'legend_layout',
:'legend_size' => :'legend_size',
:'markers' => :'markers',
:'requests' => :'requests',
Expand All @@ -82,6 +111,8 @@ def self.openapi_types
{
:'custom_links' => :'Array<WidgetCustomLink>',
:'events' => :'Array<WidgetEvent>',
:'legend_columns' => :'Array<String>',
:'legend_layout' => :'TimeseriesWidgetLegendLayout',
:'legend_size' => :'String',
:'markers' => :'Array<WidgetMarker>',
:'requests' => :'Array<TimeseriesWidgetRequest>',
Expand Down Expand Up @@ -129,6 +160,16 @@ def initialize(attributes = {})
end
end

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

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

if attributes.key?(:'legend_size')
self.legend_size = attributes[:'legend_size']
end
Expand Down Expand Up @@ -229,6 +270,8 @@ def ==(o)
self.class == o.class &&
custom_links == o.custom_links &&
events == o.events &&
legend_columns == o.legend_columns &&
legend_layout == o.legend_layout &&
legend_size == o.legend_size &&
markers == o.markers &&
requests == o.requests &&
Expand All @@ -251,7 +294,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[custom_links, events, legend_size, markers, requests, right_yaxis, show_legend, time, title, title_align, title_size, type, yaxis].hash
[custom_links, events, legend_columns, legend_layout, legend_size, markers, requests, right_yaxis, show_legend, time, title, title_align, title_size, type, yaxis].hash
end

# Builds the object from hash
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
=begin
#Datadog API V1 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://openapi-generator.tech

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::V1
class TimeseriesWidgetLegendLayout
AUTO = "auto".freeze
HORIZONTAL = "horizontal".freeze
VERTICAL = "vertical".freeze

# Builds the enum from string
# @param [String] The enum value in the form of the string
# @return [String] The enum value
def self.build_from_hash(value)
new.build_from_hash(value)
end

# Builds the enum from string
# @param [String] The enum value in the form of the string
# @return [String] The enum value
def build_from_hash(value)
constantValues = TimeseriesWidgetLegendLayout.constants.select { |c| TimeseriesWidgetLegendLayout::const_get(c) == value }
raise "Invalid ENUM value #{value} for class #TimeseriesWidgetLegendLayout" if constantValues.empty?
value
end
end
end
31 changes: 31 additions & 0 deletions spec/v1/models/timeseries_widget_legend_layout_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
=begin
#Datadog API V1 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://openapi-generator.tech

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 'spec_helper'
require 'json'
require 'date'

# Unit tests for DatadogAPIClient::V1::TimeseriesWidgetLegendLayout
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
describe DatadogAPIClient::V1::TimeseriesWidgetLegendLayout do
let(:instance) { DatadogAPIClient::V1::TimeseriesWidgetLegendLayout.new }

describe 'test an instance of TimeseriesWidgetLegendLayout' do
it 'should create an instance of TimeseriesWidgetLegendLayout' do
expect(instance).to be_instance_of(DatadogAPIClient::V1::TimeseriesWidgetLegendLayout)
end
end
end