From cefafb32b1677efd975ef4495012d831e9ab1035 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 12 Feb 2021 15:11:04 +0000 Subject: [PATCH] Regenerate client from commit 3ee9214 of spec repo --- .apigentools-info | 8 +- data/v1/openapi.yaml | 94 +++++ docs/v1/GeomapWidgetDefinition.md | 34 ++ docs/v1/GeomapWidgetDefinitionStyle.md | 20 ++ docs/v1/GeomapWidgetDefinitionType.md | 15 + docs/v1/GeomapWidgetDefinitionView.md | 18 + docs/v1/GeomapWidgetRequest.md | 22 ++ docs/v1/README.md | 5 + docs/v1/WidgetDefinition.md | 2 + lib/datadog_api_client/v1.rb | 5 + .../v1/models/geomap_widget_definition.rb | 324 ++++++++++++++++++ .../models/geomap_widget_definition_style.rb | 243 +++++++++++++ .../models/geomap_widget_definition_type.rb | 39 +++ .../models/geomap_widget_definition_view.rb | 228 ++++++++++++ .../v1/models/geomap_widget_request.rb | 241 +++++++++++++ .../v1/models/widget_definition.rb | 1 + .../models/geomap_widget_definition_spec.rb | 85 +++++ .../geomap_widget_definition_style_spec.rb | 43 +++ .../geomap_widget_definition_type_spec.rb | 31 ++ .../geomap_widget_definition_view_spec.rb | 37 ++ spec/v1/models/geomap_widget_request_spec.rb | 49 +++ 21 files changed, 1540 insertions(+), 4 deletions(-) create mode 100644 docs/v1/GeomapWidgetDefinition.md create mode 100644 docs/v1/GeomapWidgetDefinitionStyle.md create mode 100644 docs/v1/GeomapWidgetDefinitionType.md create mode 100644 docs/v1/GeomapWidgetDefinitionView.md create mode 100644 docs/v1/GeomapWidgetRequest.md create mode 100644 lib/datadog_api_client/v1/models/geomap_widget_definition.rb create mode 100644 lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb create mode 100644 lib/datadog_api_client/v1/models/geomap_widget_definition_type.rb create mode 100644 lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb create mode 100644 lib/datadog_api_client/v1/models/geomap_widget_request.rb create mode 100644 spec/v1/models/geomap_widget_definition_spec.rb create mode 100644 spec/v1/models/geomap_widget_definition_style_spec.rb create mode 100644 spec/v1/models/geomap_widget_definition_type_spec.rb create mode 100644 spec/v1/models/geomap_widget_definition_view_spec.rb create mode 100644 spec/v1/models/geomap_widget_request_spec.rb diff --git a/.apigentools-info b/.apigentools-info index a9331fd0e526..93caaba3e3f0 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-02-12 09:26:55.873425", - "spec_repo_commit": "8d710e1" + "regenerated": "2021-02-12 15:10:48.012038", + "spec_repo_commit": "3ee9214" }, "v2": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-02-12 09:27:08.683726", - "spec_repo_commit": "8d710e1" + "regenerated": "2021-02-12 15:11:01.972868", + "spec_repo_commit": "3ee9214" } } } \ No newline at end of file diff --git a/data/v1/openapi.yaml b/data/v1/openapi.yaml index 016d53f3f945..71a9407c85ba 100644 --- a/data/v1/openapi.yaml +++ b/data/v1/openapi.yaml @@ -1747,6 +1747,99 @@ components: items: $ref: '#/components/schemas/GCPAccount' type: array + GeomapWidgetDefinition: + description: This visualization displays a series of values by country on a + world map. + properties: + custom_links: + description: A list of custom links. + items: + $ref: '#/components/schemas/WidgetCustomLink' + type: array + requests: + description: 'Array of one request object to display in the widget. The + request must contain a `group-by` tag whose value is a country ISO code. + + + See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) + + for information about building the `REQUEST_SCHEMA`.' + example: + - rum_query: {} + items: + $ref: '#/components/schemas/GeomapWidgetRequest' + maxItems: 1 + minItems: 1 + type: array + style: + description: The style to apply to the widget. + example: + palette: hostmap_blues + palette_flip: false + properties: + palette: + description: The color palette to apply to the widget. + example: hostmap_blues + type: string + palette_flip: + description: Whether to flip the palette tones. + example: false + type: boolean + required: + - palette + - palette_flip + type: object + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: The title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: The size of the title. + type: string + type: + $ref: '#/components/schemas/GeomapWidgetDefinitionType' + view: + description: The view of the world that the map should render. + example: + focus: WORLD + properties: + focus: + description: The 2-letter ISO code of a country to focus the map on. + Or `WORLD`. + example: WORLD + type: string + required: + - focus + type: object + required: + - type + - requests + - style + - view + type: object + GeomapWidgetDefinitionType: + default: geomap + description: Type of the geomap widget. + enum: + - geomap + example: geomap + type: string + x-enum-varnames: + - GEOMAP + GeomapWidgetRequest: + description: An updated geomap widget. + properties: + log_query: + $ref: '#/components/schemas/LogQueryDefinition' + q: + description: The widget metrics query. + type: string + rum_query: + $ref: '#/components/schemas/LogQueryDefinition' + type: object GraphSnapshot: description: Object representing a graph snapshot. properties: @@ -9878,6 +9971,7 @@ components: - $ref: '#/components/schemas/EventStreamWidgetDefinition' - $ref: '#/components/schemas/EventTimelineWidgetDefinition' - $ref: '#/components/schemas/FreeTextWidgetDefinition' + - $ref: '#/components/schemas/GeomapWidgetDefinition' - $ref: '#/components/schemas/GroupWidgetDefinition' - $ref: '#/components/schemas/HeatMapWidgetDefinition' - $ref: '#/components/schemas/HostMapWidgetDefinition' diff --git a/docs/v1/GeomapWidgetDefinition.md b/docs/v1/GeomapWidgetDefinition.md new file mode 100644 index 000000000000..c5a05bc386c9 --- /dev/null +++ b/docs/v1/GeomapWidgetDefinition.md @@ -0,0 +1,34 @@ +# DatadogAPIClient::V1::GeomapWidgetDefinition + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **custom_links** | [**Array<WidgetCustomLink>**](WidgetCustomLink.md) | A list of custom links. | [optional] | +| **requests** | [**Array<GeomapWidgetRequest>**](GeomapWidgetRequest.md) | Array of one request object to display in the widget. The request must contain a `group-by` tag whose value is a country ISO code. See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) for information about building the `REQUEST_SCHEMA`. | | +| **style** | [**GeomapWidgetDefinitionStyle**](GeomapWidgetDefinitionStyle.md) | | | +| **time** | [**WidgetTime**](WidgetTime.md) | | [optional] | +| **title** | **String** | The title of your widget. | [optional] | +| **title_align** | [**WidgetTextAlign**](WidgetTextAlign.md) | | [optional] | +| **title_size** | **String** | The size of the title. | [optional] | +| **type** | [**GeomapWidgetDefinitionType**](GeomapWidgetDefinitionType.md) | | [default to 'geomap'] | +| **view** | [**GeomapWidgetDefinitionView**](GeomapWidgetDefinitionView.md) | | | + +## Example + +```ruby +require 'datadog_api_client/v1' + +instance = DatadogAPIClient::V1::GeomapWidgetDefinition.new( + custom_links: null, + requests: [{"rum_query":"<METRIC_1>{<SCOPE_1>}"}], + style: null, + time: null, + title: null, + title_align: null, + title_size: null, + type: null, + view: null +) +``` + diff --git a/docs/v1/GeomapWidgetDefinitionStyle.md b/docs/v1/GeomapWidgetDefinitionStyle.md new file mode 100644 index 000000000000..3351481daa5a --- /dev/null +++ b/docs/v1/GeomapWidgetDefinitionStyle.md @@ -0,0 +1,20 @@ +# DatadogAPIClient::V1::GeomapWidgetDefinitionStyle + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **palette** | **String** | The color palette to apply to the widget. | | +| **palette_flip** | **Boolean** | Whether to flip the palette tones. | | + +## Example + +```ruby +require 'datadog_api_client/v1' + +instance = DatadogAPIClient::V1::GeomapWidgetDefinitionStyle.new( + palette: hostmap_blues, + palette_flip: false +) +``` + diff --git a/docs/v1/GeomapWidgetDefinitionType.md b/docs/v1/GeomapWidgetDefinitionType.md new file mode 100644 index 000000000000..89f761cc8207 --- /dev/null +++ b/docs/v1/GeomapWidgetDefinitionType.md @@ -0,0 +1,15 @@ +# DatadogAPIClient::V1::GeomapWidgetDefinitionType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | + +## Example + +```ruby +require 'datadog_api_client/v1' + +instance = DatadogAPIClient::V1::GeomapWidgetDefinitionType.new() +``` + diff --git a/docs/v1/GeomapWidgetDefinitionView.md b/docs/v1/GeomapWidgetDefinitionView.md new file mode 100644 index 000000000000..69ea42a64827 --- /dev/null +++ b/docs/v1/GeomapWidgetDefinitionView.md @@ -0,0 +1,18 @@ +# DatadogAPIClient::V1::GeomapWidgetDefinitionView + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **focus** | **String** | The 2-letter ISO code of a country to focus the map on. Or `WORLD`. | | + +## Example + +```ruby +require 'datadog_api_client/v1' + +instance = DatadogAPIClient::V1::GeomapWidgetDefinitionView.new( + focus: WORLD +) +``` + diff --git a/docs/v1/GeomapWidgetRequest.md b/docs/v1/GeomapWidgetRequest.md new file mode 100644 index 000000000000..90f7354d63ee --- /dev/null +++ b/docs/v1/GeomapWidgetRequest.md @@ -0,0 +1,22 @@ +# DatadogAPIClient::V1::GeomapWidgetRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **log_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] | +| **q** | **String** | The widget metrics query. | [optional] | +| **rum_query** | [**LogQueryDefinition**](LogQueryDefinition.md) | | [optional] | + +## Example + +```ruby +require 'datadog_api_client/v1' + +instance = DatadogAPIClient::V1::GeomapWidgetRequest.new( + log_query: null, + q: null, + rum_query: null +) +``` + diff --git a/docs/v1/README.md b/docs/v1/README.md index 89b63702ffd2..8b0b71dbe87f 100644 --- a/docs/v1/README.md +++ b/docs/v1/README.md @@ -338,6 +338,11 @@ Class | Method | HTTP request | Description - [DatadogAPIClient::V1::FreeTextWidgetDefinition](FreeTextWidgetDefinition.md) - [DatadogAPIClient::V1::FreeTextWidgetDefinitionType](FreeTextWidgetDefinitionType.md) - [DatadogAPIClient::V1::GCPAccount](GCPAccount.md) + - [DatadogAPIClient::V1::GeomapWidgetDefinition](GeomapWidgetDefinition.md) + - [DatadogAPIClient::V1::GeomapWidgetDefinitionStyle](GeomapWidgetDefinitionStyle.md) + - [DatadogAPIClient::V1::GeomapWidgetDefinitionType](GeomapWidgetDefinitionType.md) + - [DatadogAPIClient::V1::GeomapWidgetDefinitionView](GeomapWidgetDefinitionView.md) + - [DatadogAPIClient::V1::GeomapWidgetRequest](GeomapWidgetRequest.md) - [DatadogAPIClient::V1::GraphSnapshot](GraphSnapshot.md) - [DatadogAPIClient::V1::GroupWidgetDefinition](GroupWidgetDefinition.md) - [DatadogAPIClient::V1::GroupWidgetDefinitionType](GroupWidgetDefinitionType.md) diff --git a/docs/v1/WidgetDefinition.md b/docs/v1/WidgetDefinition.md index c79d875a8234..0203a443683c 100644 --- a/docs/v1/WidgetDefinition.md +++ b/docs/v1/WidgetDefinition.md @@ -22,6 +22,7 @@ DatadogAPIClient::V1::WidgetDefinition.openapi_one_of # :'EventStreamWidgetDefinition', # :'EventTimelineWidgetDefinition', # :'FreeTextWidgetDefinition', +# :'GeomapWidgetDefinition', # :'GroupWidgetDefinition', # :'HeatMapWidgetDefinition', # :'HostMapWidgetDefinition', @@ -73,6 +74,7 @@ DatadogAPIClient::V1::WidgetDefinition.build(data_that_doesnt_match) - `EventStreamWidgetDefinition` - `EventTimelineWidgetDefinition` - `FreeTextWidgetDefinition` +- `GeomapWidgetDefinition` - `GroupWidgetDefinition` - `HeatMapWidgetDefinition` - `HostMapWidgetDefinition` diff --git a/lib/datadog_api_client/v1.rb b/lib/datadog_api_client/v1.rb index d48a8b030005..89f9bd0532bb 100644 --- a/lib/datadog_api_client/v1.rb +++ b/lib/datadog_api_client/v1.rb @@ -101,6 +101,11 @@ require 'datadog_api_client/v1/models/free_text_widget_definition' require 'datadog_api_client/v1/models/free_text_widget_definition_type' require 'datadog_api_client/v1/models/gcp_account' +require 'datadog_api_client/v1/models/geomap_widget_definition' +require 'datadog_api_client/v1/models/geomap_widget_definition_style' +require 'datadog_api_client/v1/models/geomap_widget_definition_type' +require 'datadog_api_client/v1/models/geomap_widget_definition_view' +require 'datadog_api_client/v1/models/geomap_widget_request' require 'datadog_api_client/v1/models/graph_snapshot' require 'datadog_api_client/v1/models/group_widget_definition' require 'datadog_api_client/v1/models/group_widget_definition_type' diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition.rb new file mode 100644 index 000000000000..7d6f0fa9b404 --- /dev/null +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition.rb @@ -0,0 +1,324 @@ +=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 + # This visualization displays a series of values by country on a world map. + class GeomapWidgetDefinition + # A list of custom links. + attr_accessor :custom_links + + # Array of one request object to display in the widget. The request must contain a `group-by` tag whose value is a country ISO code. See the [Request JSON schema documentation](https://docs.datadoghq.com/dashboards/graphing_json/request_json) for information about building the `REQUEST_SCHEMA`. + attr_accessor :requests + + attr_accessor :style + + attr_accessor :time + + # The title of your widget. + attr_accessor :title + + attr_accessor :title_align + + # The size of the title. + attr_accessor :title_size + + attr_accessor :type + + attr_accessor :view + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'custom_links' => :'custom_links', + :'requests' => :'requests', + :'style' => :'style', + :'time' => :'time', + :'title' => :'title', + :'title_align' => :'title_align', + :'title_size' => :'title_size', + :'type' => :'type', + :'view' => :'view' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'custom_links' => :'Array', + :'requests' => :'Array', + :'style' => :'GeomapWidgetDefinitionStyle', + :'time' => :'WidgetTime', + :'title' => :'String', + :'title_align' => :'WidgetTextAlign', + :'title_size' => :'String', + :'type' => :'GeomapWidgetDefinitionType', + :'view' => :'GeomapWidgetDefinitionView' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetDefinition` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'custom_links') + if (value = attributes[:'custom_links']).is_a?(Array) + self.custom_links = value + end + end + + if attributes.key?(:'requests') + if (value = attributes[:'requests']).is_a?(Array) + self.requests = value + end + end + + if attributes.key?(:'style') + self.style = attributes[:'style'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'title_align') + self.title_align = attributes[:'title_align'] + end + + if attributes.key?(:'title_size') + self.title_size = attributes[:'title_size'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = 'geomap' + end + + if attributes.key?(:'view') + self.view = attributes[:'view'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @requests.nil? + invalid_properties.push('invalid value for "requests", requests cannot be nil.') + end + + if @style.nil? + invalid_properties.push('invalid value for "style", style cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @view.nil? + invalid_properties.push('invalid value for "view", view cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @requests.nil? + return false if @style.nil? + return false if @type.nil? + return false if @view.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + custom_links == o.custom_links && + requests == o.requests && + style == o.style && + time == o.time && + title == o.title && + title_align == o.title_align && + title_size == o.title_size && + type == o.type && + view == o.view + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [custom_links, requests, style, time, title, title_align, title_size, type, view].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V1.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb new file mode 100644 index 000000000000..bbb0dd527fc3 --- /dev/null +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition_style.rb @@ -0,0 +1,243 @@ +=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 + # The style to apply to the widget. + class GeomapWidgetDefinitionStyle + # The color palette to apply to the widget. + attr_accessor :palette + + # Whether to flip the palette tones. + attr_accessor :palette_flip + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'palette' => :'palette', + :'palette_flip' => :'palette_flip' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'palette' => :'String', + :'palette_flip' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetDefinitionStyle` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetDefinitionStyle`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'palette') + self.palette = attributes[:'palette'] + end + + if attributes.key?(:'palette_flip') + self.palette_flip = attributes[:'palette_flip'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @palette.nil? + invalid_properties.push('invalid value for "palette", palette cannot be nil.') + end + + if @palette_flip.nil? + invalid_properties.push('invalid value for "palette_flip", palette_flip cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @palette.nil? + return false if @palette_flip.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + palette == o.palette && + palette_flip == o.palette_flip + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [palette, palette_flip].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V1.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition_type.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition_type.rb new file mode 100644 index 000000000000..40e504c82685 --- /dev/null +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition_type.rb @@ -0,0 +1,39 @@ +=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 GeomapWidgetDefinitionType + GEOMAP = "geomap".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 = GeomapWidgetDefinitionType.constants.select { |c| GeomapWidgetDefinitionType::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #GeomapWidgetDefinitionType" if constantValues.empty? + value + end + end +end diff --git a/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb b/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb new file mode 100644 index 000000000000..235d68e3b4eb --- /dev/null +++ b/lib/datadog_api_client/v1/models/geomap_widget_definition_view.rb @@ -0,0 +1,228 @@ +=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 + # The view of the world that the map should render. + class GeomapWidgetDefinitionView + # The 2-letter ISO code of a country to focus the map on. Or `WORLD`. + attr_accessor :focus + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'focus' => :'focus' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'focus' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetDefinitionView` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetDefinitionView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'focus') + self.focus = attributes[:'focus'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @focus.nil? + invalid_properties.push('invalid value for "focus", focus cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @focus.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + focus == o.focus + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [focus].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V1.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v1/models/geomap_widget_request.rb b/lib/datadog_api_client/v1/models/geomap_widget_request.rb new file mode 100644 index 000000000000..f36c593808af --- /dev/null +++ b/lib/datadog_api_client/v1/models/geomap_widget_request.rb @@ -0,0 +1,241 @@ +=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 + # An updated geomap widget. + class GeomapWidgetRequest + attr_accessor :log_query + + # The widget metrics query. + attr_accessor :q + + attr_accessor :rum_query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'log_query' => :'log_query', + :'q' => :'q', + :'rum_query' => :'rum_query' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'log_query' => :'LogQueryDefinition', + :'q' => :'String', + :'rum_query' => :'LogQueryDefinition' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::GeomapWidgetRequest` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::GeomapWidgetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'log_query') + self.log_query = attributes[:'log_query'] + end + + if attributes.key?(:'q') + self.q = attributes[:'q'] + end + + if attributes.key?(:'rum_query') + self.rum_query = attributes[:'rum_query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + log_query == o.log_query && + q == o.q && + rum_query == o.rum_query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [log_query, q, rum_query].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V1.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v1/models/widget_definition.rb b/lib/datadog_api_client/v1/models/widget_definition.rb index fbf72f5c56d5..dfaccb6ee7ca 100644 --- a/lib/datadog_api_client/v1/models/widget_definition.rb +++ b/lib/datadog_api_client/v1/models/widget_definition.rb @@ -31,6 +31,7 @@ def openapi_one_of :'EventStreamWidgetDefinition', :'EventTimelineWidgetDefinition', :'FreeTextWidgetDefinition', + :'GeomapWidgetDefinition', :'GroupWidgetDefinition', :'HeatMapWidgetDefinition', :'HostMapWidgetDefinition', diff --git a/spec/v1/models/geomap_widget_definition_spec.rb b/spec/v1/models/geomap_widget_definition_spec.rb new file mode 100644 index 000000000000..b2c24f408b37 --- /dev/null +++ b/spec/v1/models/geomap_widget_definition_spec.rb @@ -0,0 +1,85 @@ +=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::GeomapWidgetDefinition +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V1::GeomapWidgetDefinition do + let(:instance) { DatadogAPIClient::V1::GeomapWidgetDefinition.new } + + describe 'test an instance of GeomapWidgetDefinition' do + it 'should create an instance of GeomapWidgetDefinition' do + expect(instance).to be_instance_of(DatadogAPIClient::V1::GeomapWidgetDefinition) + end + end + describe 'test attribute "custom_links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "requests"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "style"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "title_align"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "title_size"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "view"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v1/models/geomap_widget_definition_style_spec.rb b/spec/v1/models/geomap_widget_definition_style_spec.rb new file mode 100644 index 000000000000..a2db39160aa1 --- /dev/null +++ b/spec/v1/models/geomap_widget_definition_style_spec.rb @@ -0,0 +1,43 @@ +=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::GeomapWidgetDefinitionStyle +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V1::GeomapWidgetDefinitionStyle do + let(:instance) { DatadogAPIClient::V1::GeomapWidgetDefinitionStyle.new } + + describe 'test an instance of GeomapWidgetDefinitionStyle' do + it 'should create an instance of GeomapWidgetDefinitionStyle' do + expect(instance).to be_instance_of(DatadogAPIClient::V1::GeomapWidgetDefinitionStyle) + end + end + describe 'test attribute "palette"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "palette_flip"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v1/models/geomap_widget_definition_type_spec.rb b/spec/v1/models/geomap_widget_definition_type_spec.rb new file mode 100644 index 000000000000..89085a128acc --- /dev/null +++ b/spec/v1/models/geomap_widget_definition_type_spec.rb @@ -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::GeomapWidgetDefinitionType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V1::GeomapWidgetDefinitionType do + let(:instance) { DatadogAPIClient::V1::GeomapWidgetDefinitionType.new } + + describe 'test an instance of GeomapWidgetDefinitionType' do + it 'should create an instance of GeomapWidgetDefinitionType' do + expect(instance).to be_instance_of(DatadogAPIClient::V1::GeomapWidgetDefinitionType) + end + end +end diff --git a/spec/v1/models/geomap_widget_definition_view_spec.rb b/spec/v1/models/geomap_widget_definition_view_spec.rb new file mode 100644 index 000000000000..a318d6533ba8 --- /dev/null +++ b/spec/v1/models/geomap_widget_definition_view_spec.rb @@ -0,0 +1,37 @@ +=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::GeomapWidgetDefinitionView +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V1::GeomapWidgetDefinitionView do + let(:instance) { DatadogAPIClient::V1::GeomapWidgetDefinitionView.new } + + describe 'test an instance of GeomapWidgetDefinitionView' do + it 'should create an instance of GeomapWidgetDefinitionView' do + expect(instance).to be_instance_of(DatadogAPIClient::V1::GeomapWidgetDefinitionView) + end + end + describe 'test attribute "focus"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v1/models/geomap_widget_request_spec.rb b/spec/v1/models/geomap_widget_request_spec.rb new file mode 100644 index 000000000000..849c3545fbe2 --- /dev/null +++ b/spec/v1/models/geomap_widget_request_spec.rb @@ -0,0 +1,49 @@ +=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::GeomapWidgetRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V1::GeomapWidgetRequest do + let(:instance) { DatadogAPIClient::V1::GeomapWidgetRequest.new } + + describe 'test an instance of GeomapWidgetRequest' do + it 'should create an instance of GeomapWidgetRequest' do + expect(instance).to be_instance_of(DatadogAPIClient::V1::GeomapWidgetRequest) + end + end + describe 'test attribute "log_query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "q"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "rum_query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end