Class: MistApi::SiteTemplateAutoUpgrade
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::SiteTemplateAutoUpgrade
- Defined in:
- lib/mist_api/models/site_template_auto_upgrade.rb
Overview
SiteTemplateAutoUpgrade Model.
Instance Attribute Summary collapse
-
#day_of_week ⇒ DayOfWeekEnum
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`.
-
#enabled ⇒ TrueClass | FalseClass
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`.
-
#time_of_day ⇒ String
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`.
-
#version ⇒ String
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`.
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(day_of_week = SKIP, enabled = SKIP, time_of_day = SKIP, version = SKIP) ⇒ SiteTemplateAutoUpgrade
constructor
A new instance of SiteTemplateAutoUpgrade.
-
#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(day_of_week = SKIP, enabled = SKIP, time_of_day = SKIP, version = SKIP) ⇒ SiteTemplateAutoUpgrade
Returns a new instance of SiteTemplateAutoUpgrade.
53 54 55 56 57 58 59 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 53 def initialize(day_of_week = SKIP, enabled = SKIP, time_of_day = SKIP, version = SKIP) @day_of_week = day_of_week unless day_of_week == SKIP @enabled = enabled unless enabled == SKIP @time_of_day = time_of_day unless time_of_day == SKIP @version = version unless version == SKIP end |
Instance Attribute Details
#day_of_week ⇒ DayOfWeekEnum
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`
14 15 16 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 14 def day_of_week @day_of_week end |
#enabled ⇒ TrueClass | FalseClass
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`
18 19 20 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 18 def enabled @enabled end |
#time_of_day ⇒ String
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`
22 23 24 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 22 def time_of_day @time_of_day end |
#version ⇒ String
enum: ‘any`, `fri`, `mon`, `sat`, `sun`, `thu`, `tue`, `wed`
26 27 28 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 26 def version @version end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. day_of_week = hash.key?('day_of_week') ? hash['day_of_week'] : SKIP enabled = hash.key?('enabled') ? hash['enabled'] : SKIP time_of_day = hash.key?('time_of_day') ? hash['time_of_day'] : SKIP version = hash.key?('version') ? hash['version'] : SKIP # Create object from extracted values. SiteTemplateAutoUpgrade.new(day_of_week, enabled, time_of_day, version) 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/site_template_auto_upgrade.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['day_of_week'] = 'day_of_week' @_hash['enabled'] = 'enabled' @_hash['time_of_day'] = 'time_of_day' @_hash['version'] = 'version' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 39 def self.optionals %w[ day_of_week enabled time_of_day version ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
86 87 88 89 90 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 86 def inspect class_name = self.class.name.split('::').last "<#{class_name} day_of_week: #{@day_of_week.inspect}, enabled: #{@enabled.inspect},"\ " time_of_day: #{@time_of_day.inspect}, version: #{@version.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
79 80 81 82 83 |
# File 'lib/mist_api/models/site_template_auto_upgrade.rb', line 79 def to_s class_name = self.class.name.split('::').last "<#{class_name} day_of_week: #{@day_of_week}, enabled: #{@enabled}, time_of_day:"\ " #{@time_of_day}, version: #{@version}>" end |