Class: ApiReference::UpdateMetricRequestParams

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/api_reference/models/update_metric_request_params.rb

Overview

UpdateMetricRequestParams Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(metadata: SKIP) ⇒ UpdateMetricRequestParams

Returns a new instance of UpdateMetricRequestParams.



39
40
41
# File 'lib/api_reference/models/update_metric_request_params.rb', line 39

def initialize(metadata: SKIP)
  @metadata =  unless  == SKIP
end

Instance Attribute Details

#metadataHash[String, String]

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Returns:

  • (Hash[String, String])


16
17
18
# File 'lib/api_reference/models/update_metric_request_params.rb', line 16

def 
  @metadata
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



44
45
46
47
48
49
50
51
52
# File 'lib/api_reference/models/update_metric_request_params.rb', line 44

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('metadata') ? hash['metadata'] : SKIP

  # Create object from extracted values.
  UpdateMetricRequestParams.new(metadata: )
end

.namesObject

A mapping from model property names to API property names.



19
20
21
22
23
# File 'lib/api_reference/models/update_metric_request_params.rb', line 19

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['metadata'] = 'metadata'
  @_hash
end

.nullablesObject

An array for nullable fields



33
34
35
36
37
# File 'lib/api_reference/models/update_metric_request_params.rb', line 33

def self.nullables
  %w[
    metadata
  ]
end

.optionalsObject

An array for optional fields



26
27
28
29
30
# File 'lib/api_reference/models/update_metric_request_params.rb', line 26

def self.optionals
  %w[
    metadata
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



61
62
63
64
# File 'lib/api_reference/models/update_metric_request_params.rb', line 61

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} metadata: #{@metadata.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



55
56
57
58
# File 'lib/api_reference/models/update_metric_request_params.rb', line 55

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} metadata: #{@metadata}>"
end