=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 # RUM application list attributes. class RUMApplicationListAttributes include BaseGenericModel # Whether the object has unparsed attributes # @!visibility private attr_accessor :_unparsed # ID of the RUM application. attr_reader :application_id # Timestamp in ms of the creation date. attr_reader :created_at # Handle of the creator user. attr_reader :created_by_handle # Hash of the RUM application. Optional. attr_accessor :hash # Indicates if the RUM application is active. attr_accessor :is_active # Name of the RUM application. attr_reader :name # Org ID of the RUM application. attr_reader :org_id # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`. attr_reader :type # Timestamp in ms of the last update date. attr_reader :updated_at # Handle of the updater user. attr_reader :updated_by_handle # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { :'application_id' => :'application_id', :'created_at' => :'created_at', :'created_by_handle' => :'created_by_handle', :'hash' => :'hash', :'is_active' => :'is_active', :'name' => :'name', :'org_id' => :'org_id', :'type' => :'type', :'updated_at' => :'updated_at', :'updated_by_handle' => :'updated_by_handle' } end # Attribute type mapping. # @!visibility private def self.openapi_types { :'application_id' => :'String', :'created_at' => :'Integer', :'created_by_handle' => :'String', :'hash' => :'String', :'is_active' => :'Boolean', :'name' => :'String', :'org_id' => :'Integer', :'type' => :'String', :'updated_at' => :'Integer', :'updated_by_handle' => :'String' } 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 = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RUMApplicationListAttributes` 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::RUMApplicationListAttributes`. 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?(:'application_id') self.application_id = attributes[:'application_id'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'created_by_handle') self.created_by_handle = attributes[:'created_by_handle'] end if attributes.key?(:'hash') self.hash = attributes[:'hash'] end if attributes.key?(:'is_active') self.is_active = attributes[:'is_active'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'org_id') self.org_id = attributes[:'org_id'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'updated_by_handle') self.updated_by_handle = attributes[:'updated_by_handle'] 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 @application_id.nil? return false if @created_at.nil? return false if @created_by_handle.nil? return false if @name.nil? return false if @org_id.nil? return false if @org_id > 2147483647 return false if @type.nil? return false if @updated_at.nil? return false if @updated_by_handle.nil? true end # Custom attribute writer method with validation # @param application_id [Object] Object to be assigned # @!visibility private def application_id=(application_id) if application_id.nil? fail ArgumentError, 'invalid value for "application_id", application_id cannot be nil.' end @application_id = application_id end # Custom attribute writer method with validation # @param created_at [Object] Object to be assigned # @!visibility private def created_at=(created_at) if created_at.nil? fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' end @created_at = created_at end # Custom attribute writer method with validation # @param created_by_handle [Object] Object to be assigned # @!visibility private def created_by_handle=(created_by_handle) if created_by_handle.nil? fail ArgumentError, 'invalid value for "created_by_handle", created_by_handle cannot be nil.' end @created_by_handle = created_by_handle end # Custom attribute writer method with validation # @param name [Object] Object to be assigned # @!visibility private def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end @name = name end # Custom attribute writer method with validation # @param org_id [Object] Object to be assigned # @!visibility private def org_id=(org_id) if org_id.nil? fail ArgumentError, 'invalid value for "org_id", org_id cannot be nil.' end if org_id > 2147483647 fail ArgumentError, 'invalid value for "org_id", must be smaller than or equal to 2147483647.' end @org_id = org_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 # Custom attribute writer method with validation # @param updated_at [Object] Object to be assigned # @!visibility private def updated_at=(updated_at) if updated_at.nil? fail ArgumentError, 'invalid value for "updated_at", updated_at cannot be nil.' end @updated_at = updated_at end # Custom attribute writer method with validation # @param updated_by_handle [Object] Object to be assigned # @!visibility private def updated_by_handle=(updated_by_handle) if updated_by_handle.nil? fail ArgumentError, 'invalid value for "updated_by_handle", updated_by_handle cannot be nil.' end @updated_by_handle = updated_by_handle 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 && application_id == o.application_id && created_at == o.created_at && created_by_handle == o.created_by_handle && hash == o.hash && is_active == o.is_active && name == o.name && org_id == o.org_id && type == o.type && updated_at == o.updated_at && updated_by_handle == o.updated_by_handle end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash [application_id, created_at, created_by_handle, hash, is_active, name, org_id, type, updated_at, updated_by_handle].hash end end end