=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 # Deprecated - Service definition V1 for providing additional service metadata and integrations. # # @deprecated This model is deprecated. class ServiceDefinitionV1 include BaseGenericModel # Whether the object has unparsed attributes # @!visibility private attr_accessor :_unparsed # Contact information about the service. attr_accessor :contact # Extensions to V1 schema. attr_accessor :extensions # A list of external links related to the services. attr_accessor :external_resources # Basic information about a service. attr_accessor :info # Third party integrations that Datadog supports. attr_accessor :integrations # Org related information about the service. attr_accessor :org # Schema version being used. attr_accessor :schema_version # A set of custom tags. attr_accessor :tags # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { :'contact' => :'contact', :'extensions' => :'extensions', :'external_resources' => :'external-resources', :'info' => :'info', :'integrations' => :'integrations', :'org' => :'org', :'schema_version' => :'schema-version', :'tags' => :'tags' } end # Attribute type mapping. # @!visibility private def self.openapi_types { :'contact' => :'ServiceDefinitionV1Contact', :'extensions' => :'Hash', :'external_resources' => :'Array', :'info' => :'ServiceDefinitionV1Info', :'integrations' => :'ServiceDefinitionV1Integrations', :'org' => :'ServiceDefinitionV1Org', :'schema_version' => :'ServiceDefinitionV1Version', :'tags' => :'Array' } end # List of attributes with nullable: true # @!visibility private def self.openapi_nullable Set.new([ ]) end # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private def initialize(attributes = {}) warn "[DEPRECATION] `ServiceDefinitionV1` is deprecated." if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceDefinitionV1` 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::V2::ServiceDefinitionV1`. 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?(:'contact') self.contact = attributes[:'contact'] end if attributes.key?(:'extensions') self.extensions = attributes[:'extensions'] end if attributes.key?(:'external_resources') if (value = attributes[:'external_resources']).is_a?(Array) self.external_resources = value end end if attributes.key?(:'info') self.info = attributes[:'info'] end if attributes.key?(:'integrations') self.integrations = attributes[:'integrations'] end if attributes.key?(:'org') self.org = attributes[:'org'] end if attributes.key?(:'schema_version') self.schema_version = attributes[:'schema_version'] end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self.tags = 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 @info.nil? return false if @schema_version.nil? true end # Custom attribute writer method with validation # @param info [Object] Object to be assigned # @!visibility private def info=(info) if info.nil? fail ArgumentError, 'invalid value for "info", info cannot be nil.' end @info = info end # Custom attribute writer method with validation # @param schema_version [Object] Object to be assigned # @!visibility private def schema_version=(schema_version) if schema_version.nil? fail ArgumentError, 'invalid value for "schema_version", schema_version cannot be nil.' end @schema_version = schema_version 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 && contact == o.contact && extensions == o.extensions && external_resources == o.external_resources && info == o.info && integrations == o.integrations && org == o.org && schema_version == o.schema_version && tags == o.tags end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash [contact, extensions, external_resources, info, integrations, org, schema_version, tags].hash end end end