Class: MistApi::Sdktemplate

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

Overview

SDK Template

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(name = nil, bg_image = SKIP, btn_flr_bgcolor = SKIP, created_time = SKIP, default = SKIP, for_site = SKIP, header_txt = SKIP, id = SKIP, modified_time = SKIP, org_id = SKIP, search_txtcolor = SKIP, site_id = SKIP, welcome_msg = SKIP, additional_properties = nil) ⇒ Sdktemplate

Returns a new instance of Sdktemplate.



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/mist_api/models/sdktemplate.rb', line 106

def initialize(name = nil, bg_image = SKIP, btn_flr_bgcolor = SKIP,
               created_time = SKIP, default = SKIP, for_site = SKIP,
               header_txt = SKIP, id = SKIP, modified_time = SKIP,
               org_id = SKIP, search_txtcolor = SKIP, site_id = SKIP,
               welcome_msg = SKIP, additional_properties = nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @bg_image = bg_image unless bg_image == SKIP
  @btn_flr_bgcolor = btn_flr_bgcolor unless btn_flr_bgcolor == SKIP
  @created_time = created_time unless created_time == SKIP
  @default = default unless default == SKIP
  @for_site = for_site unless for_site == SKIP
  @header_txt = header_txt unless header_txt == SKIP
  @id = id unless id == SKIP
  @modified_time = modified_time unless modified_time == SKIP
  @name = name
  @org_id = org_id unless org_id == SKIP
  @search_txtcolor = search_txtcolor unless search_txtcolor == SKIP
  @site_id = site_id unless site_id == SKIP
  @welcome_msg = welcome_msg unless welcome_msg == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#bg_imageString

TODO: Write general description for this method

Returns:

  • (String)


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

def bg_image
  @bg_image
end

#btn_flr_bgcolorString

TODO: Write general description for this method

Returns:

  • (String)


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

def btn_flr_bgcolor
  @btn_flr_bgcolor
end

#created_timeFloat

When the object has been created, in epoch

Returns:

  • (Float)


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

def created_time
  @created_time
end

#defaultTrueClass | FalseClass

Whether this is the default template when there are multiple templates

Returns:

  • (TrueClass | FalseClass)


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

def default
  @default
end

#for_siteTrueClass | FalseClass

Whether this is the default template when there are multiple templates

Returns:

  • (TrueClass | FalseClass)


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

def for_site
  @for_site
end

#header_txtString

Whether this is the default template when there are multiple templates

Returns:

  • (String)


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

def header_txt
  @header_txt
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


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

def id
  @id
end

#modified_timeFloat

When the object has been modified for the last time, in epoch

Returns:

  • (Float)


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

def modified_time
  @modified_time
end

#nameString

Name for identification purpose

Returns:

  • (String)


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

def name
  @name
end

#org_idUUID | String

Name for identification purpose

Returns:

  • (UUID | String)


50
51
52
# File 'lib/mist_api/models/sdktemplate.rb', line 50

def org_id
  @org_id
end

#search_txtcolorString

Name for identification purpose

Returns:

  • (String)


54
55
56
# File 'lib/mist_api/models/sdktemplate.rb', line 54

def search_txtcolor
  @search_txtcolor
end

#site_idUUID | String

Name for identification purpose

Returns:

  • (UUID | String)


58
59
60
# File 'lib/mist_api/models/sdktemplate.rb', line 58

def site_id
  @site_id
end

#welcome_msgString

Name for identification purpose

Returns:

  • (String)


62
63
64
# File 'lib/mist_api/models/sdktemplate.rb', line 62

def welcome_msg
  @welcome_msg
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/mist_api/models/sdktemplate.rb', line 131

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  name = hash.key?('name') ? hash['name'] : nil
  bg_image = hash.key?('bg_image') ? hash['bg_image'] : SKIP
  btn_flr_bgcolor =
    hash.key?('btn_flr_bgcolor') ? hash['btn_flr_bgcolor'] : SKIP
  created_time = hash.key?('created_time') ? hash['created_time'] : SKIP
  default = hash.key?('default') ? hash['default'] : SKIP
  for_site = hash.key?('for_site') ? hash['for_site'] : SKIP
  header_txt = hash.key?('header_txt') ? hash['header_txt'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  search_txtcolor =
    hash.key?('search_txtcolor') ? hash['search_txtcolor'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  welcome_msg = hash.key?('welcome_msg') ? hash['welcome_msg'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  Sdktemplate.new(name,
                  bg_image,
                  btn_flr_bgcolor,
                  created_time,
                  default,
                  for_site,
                  header_txt,
                  id,
                  modified_time,
                  org_id,
                  search_txtcolor,
                  site_id,
                  welcome_msg,
                  additional_properties)
end

.namesObject

A mapping from model property names to API property names.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/mist_api/models/sdktemplate.rb', line 65

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['bg_image'] = 'bg_image'
  @_hash['btn_flr_bgcolor'] = 'btn_flr_bgcolor'
  @_hash['created_time'] = 'created_time'
  @_hash['default'] = 'default'
  @_hash['for_site'] = 'for_site'
  @_hash['header_txt'] = 'header_txt'
  @_hash['id'] = 'id'
  @_hash['modified_time'] = 'modified_time'
  @_hash['name'] = 'name'
  @_hash['org_id'] = 'org_id'
  @_hash['search_txtcolor'] = 'search_txtcolor'
  @_hash['site_id'] = 'site_id'
  @_hash['welcome_msg'] = 'welcome_msg'
  @_hash
end

.nullablesObject

An array for nullable fields



102
103
104
# File 'lib/mist_api/models/sdktemplate.rb', line 102

def self.nullables
  []
end

.optionalsObject

An array for optional fields



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/mist_api/models/sdktemplate.rb', line 84

def self.optionals
  %w[
    bg_image
    btn_flr_bgcolor
    created_time
    default
    for_site
    header_txt
    id
    modified_time
    org_id
    search_txtcolor
    site_id
    welcome_msg
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



186
187
188
189
190
191
192
193
194
195
# File 'lib/mist_api/models/sdktemplate.rb', line 186

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} bg_image: #{@bg_image.inspect}, btn_flr_bgcolor:"\
  " #{@btn_flr_bgcolor.inspect}, created_time: #{@created_time.inspect}, default:"\
  " #{@default.inspect}, for_site: #{@for_site.inspect}, header_txt: #{@header_txt.inspect},"\
  " id: #{@id.inspect}, modified_time: #{@modified_time.inspect}, name: #{@name.inspect},"\
  " org_id: #{@org_id.inspect}, search_txtcolor: #{@search_txtcolor.inspect}, site_id:"\
  " #{@site_id.inspect}, welcome_msg: #{@welcome_msg.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



176
177
178
179
180
181
182
183
# File 'lib/mist_api/models/sdktemplate.rb', line 176

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} bg_image: #{@bg_image}, btn_flr_bgcolor: #{@btn_flr_bgcolor}, created_time:"\
  " #{@created_time}, default: #{@default}, for_site: #{@for_site}, header_txt:"\
  " #{@header_txt}, id: #{@id}, modified_time: #{@modified_time}, name: #{@name}, org_id:"\
  " #{@org_id}, search_txtcolor: #{@search_txtcolor}, site_id: #{@site_id}, welcome_msg:"\
  " #{@welcome_msg}, additional_properties: #{@additional_properties}>"
end