=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 of a Custom Costs metadata. class CustomCostsFileMetadata include BaseGenericModel # Total cost in the cost file. attr_accessor :billed_cost # Currency used in the Custom Costs file. attr_accessor :billing_currency # Usage charge period of a Custom Costs file. attr_accessor :charge_period # Name of the Custom Costs file. attr_accessor :name # Providers contained in the Custom Costs file. attr_accessor :provider_names # Status of the Custom Costs file. attr_accessor :status # Timestamp, in millisecond, of the upload time of the Custom Costs file. attr_accessor :uploaded_at # Metadata of the user that has uploaded the Custom Costs file. attr_accessor :uploaded_by # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { :'billed_cost' => :'billed_cost', :'billing_currency' => :'billing_currency', :'charge_period' => :'charge_period', :'name' => :'name', :'provider_names' => :'provider_names', :'status' => :'status', :'uploaded_at' => :'uploaded_at', :'uploaded_by' => :'uploaded_by' } end # Attribute type mapping. # @!visibility private def self.openapi_types { :'billed_cost' => :'Float', :'billing_currency' => :'String', :'charge_period' => :'CustomCostsFileUsageChargePeriod', :'name' => :'String', :'provider_names' => :'Array', :'status' => :'String', :'uploaded_at' => :'Float', :'uploaded_by' => :'CustomCostsUser' } 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::CustomCostsFileMetadata` 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::CustomCostsFileMetadata`. 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?(:'billed_cost') self.billed_cost = attributes[:'billed_cost'] end if attributes.key?(:'billing_currency') self.billing_currency = attributes[:'billing_currency'] end if attributes.key?(:'charge_period') self.charge_period = attributes[:'charge_period'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'provider_names') if (value = attributes[:'provider_names']).is_a?(Array) self.provider_names = value end end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'uploaded_at') self.uploaded_at = attributes[:'uploaded_at'] end if attributes.key?(:'uploaded_by') self.uploaded_by = attributes[:'uploaded_by'] 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 && billed_cost == o.billed_cost && billing_currency == o.billing_currency && charge_period == o.charge_period && name == o.name && provider_names == o.provider_names && status == o.status && uploaded_at == o.uploaded_at && uploaded_by == o.uploaded_by end # Calculates hash code according to all attributes. # @return [Integer] Hash code # @!visibility private def hash [billed_cost, billing_currency, charge_period, name, provider_names, status, uploaded_at, uploaded_by].hash end end end