=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 # The device attributes class GetDeviceAttributes include BaseGenericModel # A description of the device. attr_accessor :description # The type of the device. attr_accessor :device_type # The integration of the device. attr_accessor :integration # The IP address of the device. attr_accessor :ip_address # The location of the device. attr_accessor :location # The model of the device. attr_accessor :model # The name of the device. attr_accessor :name # The operating system hostname of the device. attr_accessor :os_hostname # The operating system name of the device. attr_accessor :os_name # The operating system version of the device. attr_accessor :os_version # The ping status of the device. attr_accessor :ping_status # The product name of the device. attr_accessor :product_name # The serial number of the device. attr_accessor :serial_number # The status of the device. attr_accessor :status # The subnet of the device. attr_accessor :subnet # The device `sys_object_id`. attr_accessor :sys_object_id # A list of tags associated with the device. attr_accessor :tags # The vendor of the device. attr_accessor :vendor # The version of the device. attr_accessor :version # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { :'description' => :'description', :'device_type' => :'device_type', :'integration' => :'integration', :'ip_address' => :'ip_address', :'location' => :'location', :'model' => :'model', :'name' => :'name', :'os_hostname' => :'os_hostname', :'os_name' => :'os_name', :'os_version' => :'os_version', :'ping_status' => :'ping_status', :'product_name' => :'product_name', :'serial_number' => :'serial_number', :'status' => :'status', :'subnet' => :'subnet', :'sys_object_id' => :'sys_object_id', :'tags' => :'tags', :'vendor' => :'vendor', :'version' => :'version' } end # Attribute type mapping. # @!visibility private def self.openapi_types { :'description' => :'String', :'device_type' => :'String', :'integration' => :'String', :'ip_address' => :'String', :'location' => :'String', :'model' => :'String', :'name' => :'String', :'os_hostname' => :'String', :'os_name' => :'String', :'os_version' => :'String', :'ping_status' => :'String', :'product_name' => :'String', :'serial_number' => :'String', :'status' => :'String', :'subnet' => :'String', :'sys_object_id' => :'String', :'tags' => :'Array', :'vendor' => :'String', :'version' => :'String' } 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::GetDeviceAttributes` 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::GetDeviceAttributes`. 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?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'device_type') self.device_type = attributes[:'device_type'] end if attributes.key?(:'integration') self.integration = attributes[:'integration'] end if attributes.key?(:'ip_address') self.ip_address = attributes[:'ip_address'] end if attributes.key?(:'location') self.location = attributes[:'location'] end if attributes.key?(:'model') self.model = attributes[:'model'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'os_hostname') self.os_hostname = attributes[:'os_hostname'] end if attributes.key?(:'os_name') self.os_name = attributes[:'os_name'] end if attributes.key?(:'os_version') self.os_version = attributes[:'os_version'] end if attributes.key?(:'ping_status') self.ping_status = attributes[:'ping_status'] end if attributes.key?(:'product_name') self.product_name = attributes[:'product_name'] end if attributes.key?(:'serial_number') self.serial_number = attributes[:'serial_number'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'subnet') self.subnet = attributes[:'subnet'] end if attributes.key?(:'sys_object_id') self.sys_object_id = attributes[:'sys_object_id'] end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self.tags = value end end if attributes.key?(:'vendor') self.vendor = attributes[:'vendor'] end if attributes.key?(:'version') self.version = attributes[:'version'] end 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 && description == o.description && device_type == o.device_type && integration == o.integration && ip_address == o.ip_address && location == o.location && model == o.model && name == o.name && os_hostname == o.os_hostname && os_name == o.os_name && os_version == o.os_version && ping_status == o.ping_status && product_name == o.product_name && serial_number == o.serial_number && status == o.status && subnet == o.subnet && sys_object_id == o.sys_object_id && tags == o.tags && vendor == o.vendor && version == o.version end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash [description, device_type, integration, ip_address, location, model, name, os_hostname, os_name, os_version, ping_status, product_name, serial_number, status, subnet, sys_object_id, tags, vendor, version].hash end end end