Class: MistApi::ConstAppCategoryDefinition
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ConstAppCategoryDefinition
- Defined in:
- lib/mist_api/models/const_app_category_definition.rb
Overview
ConstAppCategoryDefinition Model.
Instance Attribute Summary collapse
-
#display ⇒ String
Description of the app category.
-
#filters ⇒ ConstAppCategoryDefinitionFilters
Description of the app category.
-
#includes ⇒ Array[String]
List of other App Categories contained by this one.
-
#key ⇒ String
Key name of the app category.
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(display = nil, key = nil, filters = SKIP, includes = SKIP) ⇒ ConstAppCategoryDefinition
constructor
A new instance of ConstAppCategoryDefinition.
-
#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(display = nil, key = nil, filters = SKIP, includes = SKIP) ⇒ ConstAppCategoryDefinition
Returns a new instance of ConstAppCategoryDefinition.
51 52 53 54 55 56 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 51 def initialize(display = nil, key = nil, filters = SKIP, includes = SKIP) @display = display @filters = filters unless filters == SKIP @includes = includes unless includes == SKIP @key = key end |
Instance Attribute Details
#display ⇒ String
Description of the app category
14 15 16 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 14 def display @display end |
#filters ⇒ ConstAppCategoryDefinitionFilters
Description of the app category
18 19 20 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 18 def filters @filters end |
#includes ⇒ Array[String]
List of other App Categories contained by this one
22 23 24 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 22 def includes @includes end |
#key ⇒ String
Key name of the app category
26 27 28 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 26 def key @key end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. display = hash.key?('display') ? hash['display'] : nil key = hash.key?('key') ? hash['key'] : nil filters = ConstAppCategoryDefinitionFilters.from_hash(hash['filters']) if hash['filters'] includes = hash.key?('includes') ? hash['includes'] : SKIP # Create object from extracted values. ConstAppCategoryDefinition.new(display, key, filters, includes) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['display'] = 'display' @_hash['filters'] = 'filters' @_hash['includes'] = 'includes' @_hash['key'] = 'key' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 39 def self.optionals %w[ filters includes ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
83 84 85 86 87 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 83 def inspect class_name = self.class.name.split('::').last "<#{class_name} display: #{@display.inspect}, filters: #{@filters.inspect}, includes:"\ " #{@includes.inspect}, key: #{@key.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
76 77 78 79 80 |
# File 'lib/mist_api/models/const_app_category_definition.rb', line 76 def to_s class_name = self.class.name.split('::').last "<#{class_name} display: #{@display}, filters: #{@filters}, includes: #{@includes}, key:"\ " #{@key}>" end |