Class: MistApi::ConstApplicationDefinition

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/const_application_definition.rb

Overview

ConstApplicationDefinition 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(app_id = SKIP, app_image_url = SKIP, app_probe = SKIP, category = SKIP, group = SKIP, key = SKIP, name = SKIP, signature_based = SKIP, ssr_app_id = SKIP) ⇒ ConstApplicationDefinition

Returns a new instance of ConstApplicationDefinition.



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/mist_api/models/const_application_definition.rb', line 83

def initialize(app_id = SKIP, app_image_url = SKIP, app_probe = SKIP,
               category = SKIP, group = SKIP, key = SKIP, name = SKIP,
               signature_based = SKIP, ssr_app_id = SKIP)
  @app_id = app_id unless app_id == SKIP
  @app_image_url = app_image_url unless app_image_url == SKIP
  @app_probe = app_probe unless app_probe == SKIP
  @category = category unless category == SKIP
  @group = group unless group == SKIP
  @key = key unless key == SKIP
  @name = name unless name == SKIP
  @signature_based = signature_based unless signature_based == SKIP
  @ssr_app_id = ssr_app_id unless ssr_app_id == SKIP
end

Instance Attribute Details

#app_idTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


14
15
16
# File 'lib/mist_api/models/const_application_definition.rb', line 14

def app_id
  @app_id
end

#app_image_urlString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/mist_api/models/const_application_definition.rb', line 18

def app_image_url
  @app_image_url
end

#app_probeTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


22
23
24
# File 'lib/mist_api/models/const_application_definition.rb', line 22

def app_probe
  @app_probe
end

#categoryString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/mist_api/models/const_application_definition.rb', line 26

def category
  @category
end

#groupString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/mist_api/models/const_application_definition.rb', line 30

def group
  @group
end

#keyString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/const_application_definition.rb', line 34

def key
  @key
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/mist_api/models/const_application_definition.rb', line 38

def name
  @name
end

#signature_basedTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


42
43
44
# File 'lib/mist_api/models/const_application_definition.rb', line 42

def signature_based
  @signature_based
end

#ssr_app_idTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


46
47
48
# File 'lib/mist_api/models/const_application_definition.rb', line 46

def ssr_app_id
  @ssr_app_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/mist_api/models/const_application_definition.rb', line 98

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  app_id = hash.key?('app_id') ? hash['app_id'] : SKIP
  app_image_url = hash.key?('app_image_url') ? hash['app_image_url'] : SKIP
  app_probe = hash.key?('app_probe') ? hash['app_probe'] : SKIP
  category = hash.key?('category') ? hash['category'] : SKIP
  group = hash.key?('group') ? hash['group'] : SKIP
  key = hash.key?('key') ? hash['key'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  signature_based =
    hash.key?('signature_based') ? hash['signature_based'] : SKIP
  ssr_app_id = hash.key?('ssr_app_id') ? hash['ssr_app_id'] : SKIP

  # Create object from extracted values.
  ConstApplicationDefinition.new(app_id,
                                 app_image_url,
                                 app_probe,
                                 category,
                                 group,
                                 key,
                                 name,
                                 signature_based,
                                 ssr_app_id)
end

.namesObject

A mapping from model property names to API property names.



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/mist_api/models/const_application_definition.rb', line 49

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['app_id'] = 'app_id'
  @_hash['app_image_url'] = 'app_image_url'
  @_hash['app_probe'] = 'app_probe'
  @_hash['category'] = 'category'
  @_hash['group'] = 'group'
  @_hash['key'] = 'key'
  @_hash['name'] = 'name'
  @_hash['signature_based'] = 'signature_based'
  @_hash['ssr_app_id'] = 'ssr_app_id'
  @_hash
end

.nullablesObject

An array for nullable fields



79
80
81
# File 'lib/mist_api/models/const_application_definition.rb', line 79

def self.nullables
  []
end

.optionalsObject

An array for optional fields



64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/mist_api/models/const_application_definition.rb', line 64

def self.optionals
  %w[
    app_id
    app_image_url
    app_probe
    category
    group
    key
    name
    signature_based
    ssr_app_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



134
135
136
137
138
139
140
# File 'lib/mist_api/models/const_application_definition.rb', line 134

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} app_id: #{@app_id.inspect}, app_image_url: #{@app_image_url.inspect},"\
  " app_probe: #{@app_probe.inspect}, category: #{@category.inspect}, group:"\
  " #{@group.inspect}, key: #{@key.inspect}, name: #{@name.inspect}, signature_based:"\
  " #{@signature_based.inspect}, ssr_app_id: #{@ssr_app_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



126
127
128
129
130
131
# File 'lib/mist_api/models/const_application_definition.rb', line 126

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} app_id: #{@app_id}, app_image_url: #{@app_image_url}, app_probe:"\
  " #{@app_probe}, category: #{@category}, group: #{@group}, key: #{@key}, name: #{@name},"\
  " signature_based: #{@signature_based}, ssr_app_id: #{@ssr_app_id}>"
end