Class: ApiReference::UpdateMetricRequestParams
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ApiReference::UpdateMetricRequestParams
- Defined in:
- lib/api_reference/models/update_metric_request_params.rb
Overview
UpdateMetricRequestParams Model.
Instance Attribute Summary collapse
-
#metadata ⇒ Hash[String, String]
User-specified key/value pairs for the resource.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(metadata: SKIP) ⇒ UpdateMetricRequestParams
constructor
A new instance of UpdateMetricRequestParams.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
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
#metadata ⇒ Hash[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.
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 |
.names ⇒ Object
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 |
.nullables ⇒ Object
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 |
.optionals ⇒ Object
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
#inspect ⇒ Object
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_s ⇒ Object
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 |