Class: MistApi::PskPortalTemplateSetting
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::PskPortalTemplateSetting
- Defined in:
- lib/mist_api/models/psk_portal_template_setting.rb
Overview
PskPortalTemplateSetting Model.
Instance Attribute Summary collapse
-
#alignment ⇒ PortalTemplateAlignmentEnum
defines alignment on portal.
-
#color ⇒ String
defines alignment on portal.
-
#logo ⇒ String
Custom logo with “data:image/png;base64,” format.
-
#powered_by ⇒ TrueClass | FalseClass
Whether to hide “Powered by Juniper Mist” and email footers.
-
#tos ⇒ TrueClass | FalseClass
Whether to show Terms of Service.
-
#tos_accept_label ⇒ String
Terms of Service accept button label.
-
#tos_error ⇒ String
Terror message for not accepting tos.
-
#tos_link ⇒ String
Terror message for not accepting tos.
-
#tos_text ⇒ String
terms and service text displayed in footer if tos is enabled.
-
#tos_url ⇒ String
customized url for defining terms of service.
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(alignment = PortalTemplateAlignmentEnum::CENTER, color = '#1074bc', logo = SKIP, powered_by = false, tos = SKIP, tos_accept_label = 'I accept the Terms of Service', tos_error = 'Please review and accept the Terms of Service', tos_link = 'Terms of Service', tos_text = '<< provide your Terms of Service here >>', tos_url = SKIP) ⇒ PskPortalTemplateSetting
constructor
A new instance of PskPortalTemplateSetting.
-
#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(alignment = PortalTemplateAlignmentEnum::CENTER, color = '#1074bc', logo = SKIP, powered_by = false, tos = SKIP, tos_accept_label = 'I accept the Terms of Service', tos_error = 'Please review and accept the Terms of Service', tos_link = 'Terms of Service', tos_text = '<< provide your Terms of Service here >>', tos_url = SKIP) ⇒ PskPortalTemplateSetting
Returns a new instance of PskPortalTemplateSetting.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 92 def initialize(alignment = PortalTemplateAlignmentEnum::CENTER, color = '#1074bc', logo = SKIP, powered_by = false, tos = SKIP, tos_accept_label = 'I accept the Terms of Service', tos_error = 'Please review and accept the Terms of Service', tos_link = 'Terms of Service', tos_text = '<< provide your Terms of Service here >>', tos_url = SKIP) @alignment = alignment unless alignment == SKIP @color = color unless color == SKIP @logo = logo unless logo == SKIP @powered_by = powered_by unless powered_by == SKIP @tos = tos unless tos == SKIP @tos_accept_label = tos_accept_label unless tos_accept_label == SKIP @tos_error = tos_error unless tos_error == SKIP @tos_link = tos_link unless tos_link == SKIP @tos_text = tos_text unless tos_text == SKIP @tos_url = tos_url unless tos_url == SKIP end |
Instance Attribute Details
#alignment ⇒ PortalTemplateAlignmentEnum
defines alignment on portal. enum: ‘center`, `left`, `right`
14 15 16 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 14 def alignment @alignment end |
#color ⇒ String
defines alignment on portal. enum: ‘center`, `left`, `right`
18 19 20 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 18 def color @color end |
#logo ⇒ String
Custom logo with “data:image/png;base64,” format. default null, uses Juniper Mist Logo
23 24 25 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 23 def logo @logo end |
#powered_by ⇒ TrueClass | FalseClass
Whether to hide “Powered by Juniper Mist” and email footers
27 28 29 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 27 def powered_by @powered_by end |
#tos ⇒ TrueClass | FalseClass
Whether to show Terms of Service
31 32 33 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 31 def tos @tos end |
#tos_accept_label ⇒ String
Terms of Service accept button label
35 36 37 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 35 def tos_accept_label @tos_accept_label end |
#tos_error ⇒ String
Terror message for not accepting tos
39 40 41 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 39 def tos_error @tos_error end |
#tos_link ⇒ String
Terror message for not accepting tos
43 44 45 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 43 def tos_link @tos_link end |
#tos_text ⇒ String
terms and service text displayed in footer if tos is enabled
47 48 49 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 47 def tos_text @tos_text end |
#tos_url ⇒ String
customized url for defining terms of service
51 52 53 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 51 def tos_url @tos_url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 113 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. alignment = hash['alignment'] ||= PortalTemplateAlignmentEnum::CENTER color = hash['color'] ||= '#1074bc' logo = hash.key?('logo') ? hash['logo'] : SKIP powered_by = hash['poweredBy'] ||= false tos = hash.key?('tos') ? hash['tos'] : SKIP tos_accept_label = hash['tosAcceptLabel'] ||= 'I accept the Terms of Service' tos_error = hash['tosError'] ||= 'Please review and accept the Terms of Service' tos_link = hash['tosLink'] ||= 'Terms of Service' tos_text = hash['tosText'] ||= '<< provide your Terms of Service here >>' tos_url = hash.key?('tosUrl') ? hash['tosUrl'] : SKIP # Create object from extracted values. PskPortalTemplateSetting.new(alignment, color, logo, powered_by, tos, tos_accept_label, tos_error, tos_link, tos_text, tos_url) end |
.names ⇒ Object
A mapping from model property names to API property names.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 54 def self.names @_hash = {} if @_hash.nil? @_hash['alignment'] = 'alignment' @_hash['color'] = 'color' @_hash['logo'] = 'logo' @_hash['powered_by'] = 'poweredBy' @_hash['tos'] = 'tos' @_hash['tos_accept_label'] = 'tosAcceptLabel' @_hash['tos_error'] = 'tosError' @_hash['tos_link'] = 'tosLink' @_hash['tos_text'] = 'tosText' @_hash['tos_url'] = 'tosUrl' @_hash end |
.nullables ⇒ Object
An array for nullable fields
86 87 88 89 90 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 86 def self.nullables %w[ logo ] end |
.optionals ⇒ Object
An array for optional fields
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 70 def self.optionals %w[ alignment color logo powered_by tos tos_accept_label tos_error tos_link tos_text tos_url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
152 153 154 155 156 157 158 159 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 152 def inspect class_name = self.class.name.split('::').last "<#{class_name} alignment: #{@alignment.inspect}, color: #{@color.inspect}, logo:"\ " #{@logo.inspect}, powered_by: #{@powered_by.inspect}, tos: #{@tos.inspect},"\ " tos_accept_label: #{@tos_accept_label.inspect}, tos_error: #{@tos_error.inspect},"\ " tos_link: #{@tos_link.inspect}, tos_text: #{@tos_text.inspect}, tos_url:"\ " #{@tos_url.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
144 145 146 147 148 149 |
# File 'lib/mist_api/models/psk_portal_template_setting.rb', line 144 def to_s class_name = self.class.name.split('::').last "<#{class_name} alignment: #{@alignment}, color: #{@color}, logo: #{@logo}, powered_by:"\ " #{@powered_by}, tos: #{@tos}, tos_accept_label: #{@tos_accept_label}, tos_error:"\ " #{@tos_error}, tos_link: #{@tos_link}, tos_text: #{@tos_text}, tos_url: #{@tos_url}>" end |