From 800c4283e6f76d3f7bc695a4aab7004fd55eaf5f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 31 Oct 2025 19:06:45 +0000 Subject: [PATCH] Regenerate client from commit a7c729e of spec repo --- .generator/schemas/v2/openapi.yaml | 223 ++++++++++++++++++ .../PreviewCatalogEntities.rb | 5 + features/v2/software_catalog.feature | 6 + features/v2/undo.json | 6 + lib/datadog_api_client/inflector.rb | 20 ++ .../v2/api/software_catalog_api.rb | 57 +++++ .../v2/models/entity_response_array.rb | 125 ++++++++++ .../models/entity_response_data_attributes.rb | 187 +++++++++++++++ .../entity_response_data_relationships.rb | 145 ++++++++++++ ...y_response_data_relationships_incidents.rb | 107 +++++++++ ...data_relationships_incidents_data_items.rb | 144 +++++++++++ ...relationships_incidents_data_items_type.rb | 26 ++ ...ity_response_data_relationships_oncalls.rb | 107 +++++++++ ...e_data_relationships_oncalls_data_items.rb | 144 +++++++++++ ...a_relationships_oncalls_data_items_type.rb | 26 ++ ..._response_data_relationships_raw_schema.rb | 123 ++++++++++ ...onse_data_relationships_raw_schema_data.rb | 144 +++++++++++ ...data_relationships_raw_schema_data_type.rb | 26 ++ ...nse_data_relationships_related_entities.rb | 107 +++++++++ ...lationships_related_entities_data_items.rb | 144 +++++++++++ ...nships_related_entities_data_items_type.rb | 26 ++ ...tity_response_data_relationships_schema.rb | 123 ++++++++++ ...response_data_relationships_schema_data.rb | 144 +++++++++++ ...nse_data_relationships_schema_data_type.rb | 26 ++ .../v2/models/entity_response_data_type.rb | 26 ++ .../v2/models/preview_entity_response_data.rb | 153 ++++++++++++ 26 files changed, 2370 insertions(+) create mode 100644 examples/v2/software-catalog/PreviewCatalogEntities.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_array.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items_type.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items_type.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items_type.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_schema.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/entity_response_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/preview_entity_response_data.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4afc5c00f085..206b8ba19047 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17294,11 +17294,201 @@ components: schema: $ref: '#/components/schemas/EntityToSchema' type: object + EntityResponseArray: + properties: + data: + items: + $ref: '#/components/schemas/PreviewEntityResponseData' + type: array + required: + - data + type: object EntityResponseData: description: List of entity data. items: $ref: '#/components/schemas/EntityData' type: array + EntityResponseDataAttributes: + properties: + apiVersion: + type: string + description: + type: string + displayName: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + owner: + type: string + properties: + additionalProperties: {} + type: object + tags: + items: + type: string + type: array + type: object + EntityResponseDataRelationships: + properties: + incidents: + $ref: '#/components/schemas/EntityResponseDataRelationshipsIncidents' + oncalls: + $ref: '#/components/schemas/EntityResponseDataRelationshipsOncalls' + rawSchema: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchema' + relatedEntities: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntities' + schema: + $ref: '#/components/schemas/EntityResponseDataRelationshipsSchema' + type: object + EntityResponseDataRelationshipsIncidents: + properties: + data: + items: + $ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItems' + type: array + type: object + EntityResponseDataRelationshipsIncidentsDataItems: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItemsType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsIncidentsDataItemsType: + default: incident + description: Incident resource type. + enum: + - incident + example: incident + type: string + x-enum-varnames: + - INCIDENT + EntityResponseDataRelationshipsOncalls: + properties: + data: + items: + $ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItems' + type: array + type: object + EntityResponseDataRelationshipsOncallsDataItems: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItemsType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsOncallsDataItemsType: + default: oncall + description: Oncall resource type. + enum: + - oncall + example: oncall + type: string + x-enum-varnames: + - ONCALL + EntityResponseDataRelationshipsRawSchema: + properties: + data: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaData' + required: + - data + type: object + EntityResponseDataRelationshipsRawSchemaData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaDataType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsRawSchemaDataType: + default: rawSchema + description: Raw schema resource type. + enum: + - rawSchema + example: rawSchema + type: string + x-enum-varnames: + - RAWSCHEMA + EntityResponseDataRelationshipsRelatedEntities: + properties: + data: + items: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItems' + type: array + type: object + EntityResponseDataRelationshipsRelatedEntitiesDataItems: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItemsType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType: + default: relatedEntity + description: Related entity resource type. + enum: + - relatedEntity + example: relatedEntity + type: string + x-enum-varnames: + - RELATEDENTITY + EntityResponseDataRelationshipsSchema: + properties: + data: + $ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaData' + required: + - data + type: object + EntityResponseDataRelationshipsSchemaData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaDataType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsSchemaDataType: + default: schema + description: Schema resource type. + enum: + - schema + example: schema + type: string + x-enum-varnames: + - SCHEMA + EntityResponseDataType: + default: entity + description: Entity resource type. + enum: + - entity + example: entity + type: string + x-enum-varnames: + - ENTITY EntityResponseIncludedIncident: description: Included incident. properties: @@ -37681,6 +37871,19 @@ components: description: Offset type. type: string type: object + PreviewEntityResponseData: + properties: + attributes: + $ref: '#/components/schemas/EntityResponseDataAttributes' + id: + type: string + relationships: + $ref: '#/components/schemas/EntityResponseDataRelationships' + type: + $ref: '#/components/schemas/EntityResponseDataType' + required: + - type + type: object ProcessSummariesMeta: description: Response metadata object. properties: @@ -58421,6 +58624,26 @@ paths: tags: - Software Catalog x-codegen-request-body-name: body + /api/v2/catalog/entity/preview: + post: + operationId: PreviewCatalogEntities + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/EntityResponseArray' + description: Accepted + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_read + summary: Preview catalog entities + tags: + - Software Catalog /api/v2/catalog/entity/{entity_id}: delete: description: Delete a single entity in Software Catalog. diff --git a/examples/v2/software-catalog/PreviewCatalogEntities.rb b/examples/v2/software-catalog/PreviewCatalogEntities.rb new file mode 100644 index 000000000000..5212a80a3869 --- /dev/null +++ b/examples/v2/software-catalog/PreviewCatalogEntities.rb @@ -0,0 +1,5 @@ +# Preview catalog entities returns "Accepted" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SoftwareCatalogAPI.new +p api_instance.preview_catalog_entities() diff --git a/features/v2/software_catalog.feature b/features/v2/software_catalog.feature index 070e066a944a..34e9f95314da 100644 --- a/features/v2/software_catalog.feature +++ b/features/v2/software_catalog.feature @@ -144,3 +144,9 @@ Feature: Software Catalog And request contains "page[limit]" parameter with value 20 When the request with pagination is sent Then the response status is 200 OK + + @generated @skip @team:DataDog/service-catalog + Scenario: Preview catalog entities returns "Accepted" response + Given new "PreviewCatalogEntities" request + When the request is sent + Then the response status is 202 Accepted diff --git a/features/v2/undo.json b/features/v2/undo.json index f4a7f9e7f8de..1865379ddbe0 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -751,6 +751,12 @@ "type": "unsafe" } }, + "PreviewCatalogEntities": { + "tag": "Software Catalog", + "undo": { + "type": "safe" + } + }, "DeleteCatalogEntity": { "tag": "Software Catalog", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 45fd03dd5edf..820104ace4b4 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1954,6 +1954,25 @@ def overrides "v2.entity_data" => "EntityData", "v2.entity_meta" => "EntityMeta", "v2.entity_relationships" => "EntityRelationships", + "v2.entity_response_array" => "EntityResponseArray", + "v2.entity_response_data_attributes" => "EntityResponseDataAttributes", + "v2.entity_response_data_relationships" => "EntityResponseDataRelationships", + "v2.entity_response_data_relationships_incidents" => "EntityResponseDataRelationshipsIncidents", + "v2.entity_response_data_relationships_incidents_data_items" => "EntityResponseDataRelationshipsIncidentsDataItems", + "v2.entity_response_data_relationships_incidents_data_items_type" => "EntityResponseDataRelationshipsIncidentsDataItemsType", + "v2.entity_response_data_relationships_oncalls" => "EntityResponseDataRelationshipsOncalls", + "v2.entity_response_data_relationships_oncalls_data_items" => "EntityResponseDataRelationshipsOncallsDataItems", + "v2.entity_response_data_relationships_oncalls_data_items_type" => "EntityResponseDataRelationshipsOncallsDataItemsType", + "v2.entity_response_data_relationships_raw_schema" => "EntityResponseDataRelationshipsRawSchema", + "v2.entity_response_data_relationships_raw_schema_data" => "EntityResponseDataRelationshipsRawSchemaData", + "v2.entity_response_data_relationships_raw_schema_data_type" => "EntityResponseDataRelationshipsRawSchemaDataType", + "v2.entity_response_data_relationships_related_entities" => "EntityResponseDataRelationshipsRelatedEntities", + "v2.entity_response_data_relationships_related_entities_data_items" => "EntityResponseDataRelationshipsRelatedEntitiesDataItems", + "v2.entity_response_data_relationships_related_entities_data_items_type" => "EntityResponseDataRelationshipsRelatedEntitiesDataItemsType", + "v2.entity_response_data_relationships_schema" => "EntityResponseDataRelationshipsSchema", + "v2.entity_response_data_relationships_schema_data" => "EntityResponseDataRelationshipsSchemaData", + "v2.entity_response_data_relationships_schema_data_type" => "EntityResponseDataRelationshipsSchemaDataType", + "v2.entity_response_data_type" => "EntityResponseDataType", "v2.entity_response_included_incident" => "EntityResponseIncludedIncident", "v2.entity_response_included_incident_type" => "EntityResponseIncludedIncidentType", "v2.entity_response_included_oncall" => "EntityResponseIncludedOncall", @@ -3291,6 +3310,7 @@ def overrides "v2.powerpacks_response_meta" => "PowerpacksResponseMeta", "v2.powerpacks_response_meta_pagination" => "PowerpacksResponseMetaPagination", "v2.powerpack_template_variable" => "PowerpackTemplateVariable", + "v2.preview_entity_response_data" => "PreviewEntityResponseData", "v2.process_summaries_meta" => "ProcessSummariesMeta", "v2.process_summaries_meta_page" => "ProcessSummariesMetaPage", "v2.process_summaries_response" => "ProcessSummariesResponse", diff --git a/lib/datadog_api_client/v2/api/software_catalog_api.rb b/lib/datadog_api_client/v2/api/software_catalog_api.rb index fce9d8a54399..4aa853a69cbc 100644 --- a/lib/datadog_api_client/v2/api/software_catalog_api.rb +++ b/lib/datadog_api_client/v2/api/software_catalog_api.rb @@ -452,6 +452,63 @@ def list_catalog_relation_with_pagination(opts = {}) end end + # Preview catalog entities. + # + # @see #preview_catalog_entities_with_http_info + def preview_catalog_entities(opts = {}) + data, _status_code, _headers = preview_catalog_entities_with_http_info(opts) + data + end + + # Preview catalog entities. + # @param opts [Hash] the optional parameters + # @return [Array<(EntityResponseArray, Integer, Hash)>] EntityResponseArray data, response status code and response headers + def preview_catalog_entities_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.preview_catalog_entities ...' + end + # resource path + local_var_path = '/api/v2/catalog/entity/preview' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'EntityResponseArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :preview_catalog_entities, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SoftwareCatalogAPI#preview_catalog_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create or update entities. # # @see #upsert_catalog_entity_with_http_info diff --git a/lib/datadog_api_client/v2/models/entity_response_array.rb b/lib/datadog_api_client/v2/models/entity_response_array.rb new file mode 100644 index 000000000000..8f31873cefb6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_array.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseArray + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseArray` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_attributes.rb b/lib/datadog_api_client/v2/models/entity_response_data_attributes.rb new file mode 100644 index 000000000000..d98eacd69786 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_attributes.rb @@ -0,0 +1,187 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataAttributes + include BaseGenericModel + + # + attr_accessor :api_version + + # + attr_accessor :description + + # + attr_accessor :display_name + + # + attr_accessor :kind + + # + attr_accessor :name + + # + attr_accessor :namespace + + # + attr_accessor :owner + + # + attr_accessor :properties + + # + attr_accessor :tags + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_version' => :'apiVersion', + :'description' => :'description', + :'display_name' => :'displayName', + :'kind' => :'kind', + :'name' => :'name', + :'namespace' => :'namespace', + :'owner' => :'owner', + :'properties' => :'properties', + :'tags' => :'tags' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_version' => :'String', + :'description' => :'String', + :'display_name' => :'String', + :'kind' => :'String', + :'name' => :'String', + :'namespace' => :'String', + :'owner' => :'String', + :'properties' => :'Hash', + :'tags' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataAttributes` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_version') + self.api_version = attributes[:'api_version'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'owner') + self.owner = attributes[:'owner'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_version == o.api_version && + description == o.description && + display_name == o.display_name && + kind == o.kind && + name == o.name && + namespace == o.namespace && + owner == o.owner && + properties == o.properties && + tags == o.tags && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_version, description, display_name, kind, name, namespace, owner, properties, tags, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships.rb new file mode 100644 index 000000000000..79d39e04247e --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationships + include BaseGenericModel + + # + attr_accessor :incidents + + # + attr_accessor :oncalls + + # + attr_accessor :raw_schema + + # + attr_accessor :related_entities + + # + attr_accessor :schema + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'incidents' => :'incidents', + :'oncalls' => :'oncalls', + :'raw_schema' => :'rawSchema', + :'related_entities' => :'relatedEntities', + :'schema' => :'schema' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'incidents' => :'EntityResponseDataRelationshipsIncidents', + :'oncalls' => :'EntityResponseDataRelationshipsOncalls', + :'raw_schema' => :'EntityResponseDataRelationshipsRawSchema', + :'related_entities' => :'EntityResponseDataRelationshipsRelatedEntities', + :'schema' => :'EntityResponseDataRelationshipsSchema' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationships` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'incidents') + self.incidents = attributes[:'incidents'] + end + + if attributes.key?(:'oncalls') + self.oncalls = attributes[:'oncalls'] + end + + if attributes.key?(:'raw_schema') + self.raw_schema = attributes[:'raw_schema'] + end + + if attributes.key?(:'related_entities') + self.related_entities = attributes[:'related_entities'] + end + + if attributes.key?(:'schema') + self.schema = attributes[:'schema'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + incidents == o.incidents && + oncalls == o.oncalls && + raw_schema == o.raw_schema && + related_entities == o.related_entities && + schema == o.schema && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [incidents, oncalls, raw_schema, related_entities, schema, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents.rb new file mode 100644 index 000000000000..84cb9d4fd9e0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsIncidents + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsIncidents` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items.rb new file mode 100644 index 000000000000..18226ffb854a --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsIncidentsDataItems + include BaseGenericModel + + # + attr_reader :id + + # Incident resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'EntityResponseDataRelationshipsIncidentsDataItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsIncidentsDataItems` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items_type.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items_type.rb new file mode 100644 index 000000000000..0eb8c229389d --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_incidents_data_items_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # Incident resource type. + class EntityResponseDataRelationshipsIncidentsDataItemsType + include BaseEnumModel + + INCIDENT = "incident".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls.rb new file mode 100644 index 000000000000..027a919af13e --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsOncalls + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsOncalls` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items.rb new file mode 100644 index 000000000000..9f72d09723a5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsOncallsDataItems + include BaseGenericModel + + # + attr_reader :id + + # Oncall resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'EntityResponseDataRelationshipsOncallsDataItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsOncallsDataItems` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items_type.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items_type.rb new file mode 100644 index 000000000000..414298135888 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_oncalls_data_items_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # Oncall resource type. + class EntityResponseDataRelationshipsOncallsDataItemsType + include BaseEnumModel + + ONCALL = "oncall".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema.rb new file mode 100644 index 000000000000..fad0f0b1edc3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsRawSchema + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'EntityResponseDataRelationshipsRawSchemaData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsRawSchema` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data.rb new file mode 100644 index 000000000000..27f51fa22858 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsRawSchemaData + include BaseGenericModel + + # + attr_reader :id + + # Raw schema resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'EntityResponseDataRelationshipsRawSchemaDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsRawSchemaData` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data_type.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data_type.rb new file mode 100644 index 000000000000..f17569d38e11 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_raw_schema_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # Raw schema resource type. + class EntityResponseDataRelationshipsRawSchemaDataType + include BaseEnumModel + + RAWSCHEMA = "rawSchema".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities.rb new file mode 100644 index 000000000000..89b92ac93482 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsRelatedEntities + include BaseGenericModel + + # + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsRelatedEntities` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items.rb new file mode 100644 index 000000000000..9b2a8a68f9fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsRelatedEntitiesDataItems + include BaseGenericModel + + # + attr_reader :id + + # Related entity resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'EntityResponseDataRelationshipsRelatedEntitiesDataItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsRelatedEntitiesDataItems` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items_type.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items_type.rb new file mode 100644 index 000000000000..0337791bac8b --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_related_entities_data_items_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # Related entity resource type. + class EntityResponseDataRelationshipsRelatedEntitiesDataItemsType + include BaseEnumModel + + RELATEDENTITY = "relatedEntity".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema.rb new file mode 100644 index 000000000000..1fa2edf48a82 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsSchema + include BaseGenericModel + + # + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'EntityResponseDataRelationshipsSchemaData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsSchema` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + 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 @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data.rb new file mode 100644 index 000000000000..21db56fedb31 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class EntityResponseDataRelationshipsSchemaData + include BaseGenericModel + + # + attr_reader :id + + # Schema resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'EntityResponseDataRelationshipsSchemaDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EntityResponseDataRelationshipsSchemaData` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data_type.rb b/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data_type.rb new file mode 100644 index 000000000000..6efe53cc1c22 --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_relationships_schema_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # Schema resource type. + class EntityResponseDataRelationshipsSchemaDataType + include BaseEnumModel + + SCHEMA = "schema".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/entity_response_data_type.rb b/lib/datadog_api_client/v2/models/entity_response_data_type.rb new file mode 100644 index 000000000000..057ec3407bed --- /dev/null +++ b/lib/datadog_api_client/v2/models/entity_response_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # Entity resource type. + class EntityResponseDataType + include BaseEnumModel + + ENTITY = "entity".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/preview_entity_response_data.rb b/lib/datadog_api_client/v2/models/preview_entity_response_data.rb new file mode 100644 index 000000000000..936d96ff9ab5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/preview_entity_response_data.rb @@ -0,0 +1,153 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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::V2 + # + class PreviewEntityResponseData + include BaseGenericModel + + # + attr_accessor :attributes + + # + attr_accessor :id + + # + attr_accessor :relationships + + # Entity resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'EntityResponseDataAttributes', + :'id' => :'String', + :'relationships' => :'EntityResponseDataRelationships', + :'type' => :'EntityResponseDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::PreviewEntityResponseData` initialize method" + end + + self.additional_properties = {} + # 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)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + 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 + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end