Class: Comet::BrandingOptions
- Inherits:
-
Object
- Object
- Comet::BrandingOptions
- Defined in:
- lib/comet/models/branding_options.rb
Overview
BrandingOptions is a typed class wrapper around the underlying Comet Server API data structure.
Instance Attribute Summary collapse
-
#account_register_url ⇒ Object
Returns the value of attribute account_register_url.
-
#brand_name ⇒ Object
Returns the value of attribute brand_name.
-
#build_mode ⇒ Object
Returns the value of attribute build_mode.
-
#company_name ⇒ Object
Returns the value of attribute company_name.
-
#default_login_server_url ⇒ Object
Returns the value of attribute default_login_server_url.
-
#favicon ⇒ Object
Returns the value of attribute favicon.
-
#help_is_popup ⇒ Object
Returns the value of attribute help_is_popup.
-
#help_url ⇒ Object
Returns the value of attribute help_url.
-
#hide_background_logo ⇒ Object
Returns the value of attribute hide_background_logo.
-
#hide_news_area ⇒ Object
Returns the value of attribute hide_news_area.
-
#logo_image ⇒ Object
Returns the value of attribute logo_image.
-
#mac_oscode_sign ⇒ Object
Returns the value of attribute mac_oscode_sign.
-
#package_identifier ⇒ Object
Returns the value of attribute package_identifier.
-
#path_app_icon_image ⇒ Object
Returns the value of attribute path_app_icon_image.
-
#path_eula_rtf ⇒ Object
Returns the value of attribute path_eula_rtf.
-
#path_header_image ⇒ Object
Returns the value of attribute path_header_image.
-
#path_icns_file ⇒ Object
Returns the value of attribute path_icns_file.
-
#path_ico_file ⇒ Object
Returns the value of attribute path_ico_file.
-
#path_menu_bar_icns_file ⇒ Object
Returns the value of attribute path_menu_bar_icns_file.
-
#path_tile_png ⇒ Object
Returns the value of attribute path_tile_png.
-
#product_name ⇒ Object
Returns the value of attribute product_name.
-
#tile_background_color ⇒ Object
Returns the value of attribute tile_background_color.
-
#top_color ⇒ Object
Returns the value of attribute top_color.
-
#unknown_json_fields ⇒ Object
Returns the value of attribute unknown_json_fields.
-
#windows_code_sign_pkcs11certfile ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11certfile.
-
#windows_code_sign_pkcs11engine ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11engine.
-
#windows_code_sign_pkcs11key_id ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11key_id.
-
#windows_code_sign_pkcs11module ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11module.
-
#windows_code_sign_pkcs11password ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11password.
-
#windows_code_sign_pkcs11password_format ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11password_format.
-
#windows_code_sign_pkcs12file_path ⇒ Object
Returns the value of attribute windows_code_sign_pkcs12file_path.
-
#windows_code_sign_pkcs12password ⇒ Object
Returns the value of attribute windows_code_sign_pkcs12password.
-
#windows_code_sign_pkcs12password_format ⇒ Object
Returns the value of attribute windows_code_sign_pkcs12password_format.
Instance Method Summary collapse
- #clear ⇒ Object
- #from_hash(obj) ⇒ Object
- #from_json(json_string) ⇒ Object
-
#initialize ⇒ BrandingOptions
constructor
A new instance of BrandingOptions.
-
#to_h ⇒ Hash
The complete object as a Ruby hash.
-
#to_hash ⇒ Hash
The complete object as a Ruby hash.
-
#to_json(options = {}) ⇒ String
The complete object as a JSON string.
Constructor Details
#initialize ⇒ BrandingOptions
114 115 116 |
# File 'lib/comet/models/branding_options.rb', line 114 def initialize clear end |
Instance Attribute Details
#account_register_url ⇒ Object
Returns the value of attribute account_register_url.
49 50 51 |
# File 'lib/comet/models/branding_options.rb', line 49 def account_register_url @account_register_url end |
#brand_name ⇒ Object
Returns the value of attribute brand_name.
16 17 18 |
# File 'lib/comet/models/branding_options.rb', line 16 def brand_name @brand_name end |
#build_mode ⇒ Object
Returns the value of attribute build_mode.
55 56 57 |
# File 'lib/comet/models/branding_options.rb', line 55 def build_mode @build_mode end |
#company_name ⇒ Object
Returns the value of attribute company_name.
34 35 36 |
# File 'lib/comet/models/branding_options.rb', line 34 def company_name @company_name end |
#default_login_server_url ⇒ Object
Returns the value of attribute default_login_server_url.
43 44 45 |
# File 'lib/comet/models/branding_options.rb', line 43 def default_login_server_url @default_login_server_url end |
#favicon ⇒ Object
Returns the value of attribute favicon.
25 26 27 |
# File 'lib/comet/models/branding_options.rb', line 25 def favicon @favicon end |
#help_is_popup ⇒ Object
Returns the value of attribute help_is_popup.
40 41 42 |
# File 'lib/comet/models/branding_options.rb', line 40 def help_is_popup @help_is_popup end |
#help_url ⇒ Object
Returns the value of attribute help_url.
37 38 39 |
# File 'lib/comet/models/branding_options.rb', line 37 def help_url @help_url end |
#hide_background_logo ⇒ Object
Returns the value of attribute hide_background_logo.
52 53 54 |
# File 'lib/comet/models/branding_options.rb', line 52 def hide_background_logo @hide_background_logo end |
#hide_news_area ⇒ Object
Returns the value of attribute hide_news_area.
28 29 30 |
# File 'lib/comet/models/branding_options.rb', line 28 def hide_news_area @hide_news_area end |
#logo_image ⇒ Object
Returns the value of attribute logo_image.
19 20 21 |
# File 'lib/comet/models/branding_options.rb', line 19 def logo_image @logo_image end |
#mac_oscode_sign ⇒ Object
Returns the value of attribute mac_oscode_sign.
109 110 111 |
# File 'lib/comet/models/branding_options.rb', line 109 def mac_oscode_sign @mac_oscode_sign end |
#package_identifier ⇒ Object
Returns the value of attribute package_identifier.
79 80 81 |
# File 'lib/comet/models/branding_options.rb', line 79 def package_identifier @package_identifier end |
#path_app_icon_image ⇒ Object
Returns the value of attribute path_app_icon_image.
76 77 78 |
# File 'lib/comet/models/branding_options.rb', line 76 def path_app_icon_image @path_app_icon_image end |
#path_eula_rtf ⇒ Object
Returns the value of attribute path_eula_rtf.
67 68 69 |
# File 'lib/comet/models/branding_options.rb', line 67 def path_eula_rtf @path_eula_rtf end |
#path_header_image ⇒ Object
Returns the value of attribute path_header_image.
73 74 75 |
# File 'lib/comet/models/branding_options.rb', line 73 def path_header_image @path_header_image end |
#path_icns_file ⇒ Object
Returns the value of attribute path_icns_file.
61 62 63 |
# File 'lib/comet/models/branding_options.rb', line 61 def path_icns_file @path_icns_file end |
#path_ico_file ⇒ Object
Returns the value of attribute path_ico_file.
58 59 60 |
# File 'lib/comet/models/branding_options.rb', line 58 def path_ico_file @path_ico_file end |
#path_menu_bar_icns_file ⇒ Object
Returns the value of attribute path_menu_bar_icns_file.
64 65 66 |
# File 'lib/comet/models/branding_options.rb', line 64 def end |
#path_tile_png ⇒ Object
Returns the value of attribute path_tile_png.
70 71 72 |
# File 'lib/comet/models/branding_options.rb', line 70 def path_tile_png @path_tile_png end |
#product_name ⇒ Object
Returns the value of attribute product_name.
31 32 33 |
# File 'lib/comet/models/branding_options.rb', line 31 def product_name @product_name end |
#tile_background_color ⇒ Object
Returns the value of attribute tile_background_color.
46 47 48 |
# File 'lib/comet/models/branding_options.rb', line 46 def tile_background_color @tile_background_color end |
#top_color ⇒ Object
Returns the value of attribute top_color.
22 23 24 |
# File 'lib/comet/models/branding_options.rb', line 22 def top_color @top_color end |
#unknown_json_fields ⇒ Object
Returns the value of attribute unknown_json_fields.
112 113 114 |
# File 'lib/comet/models/branding_options.rb', line 112 def unknown_json_fields @unknown_json_fields end |
#windows_code_sign_pkcs11certfile ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11certfile.
97 98 99 |
# File 'lib/comet/models/branding_options.rb', line 97 def windows_code_sign_pkcs11certfile @windows_code_sign_pkcs11certfile end |
#windows_code_sign_pkcs11engine ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11engine.
91 92 93 |
# File 'lib/comet/models/branding_options.rb', line 91 def windows_code_sign_pkcs11engine @windows_code_sign_pkcs11engine end |
#windows_code_sign_pkcs11key_id ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11key_id.
100 101 102 |
# File 'lib/comet/models/branding_options.rb', line 100 def windows_code_sign_pkcs11key_id @windows_code_sign_pkcs11key_id end |
#windows_code_sign_pkcs11module ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11module.
94 95 96 |
# File 'lib/comet/models/branding_options.rb', line 94 def windows_code_sign_pkcs11module @windows_code_sign_pkcs11module end |
#windows_code_sign_pkcs11password ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11password.
106 107 108 |
# File 'lib/comet/models/branding_options.rb', line 106 def windows_code_sign_pkcs11password @windows_code_sign_pkcs11password end |
#windows_code_sign_pkcs11password_format ⇒ Object
Returns the value of attribute windows_code_sign_pkcs11password_format.
103 104 105 |
# File 'lib/comet/models/branding_options.rb', line 103 def windows_code_sign_pkcs11password_format @windows_code_sign_pkcs11password_format end |
#windows_code_sign_pkcs12file_path ⇒ Object
Returns the value of attribute windows_code_sign_pkcs12file_path.
82 83 84 |
# File 'lib/comet/models/branding_options.rb', line 82 def windows_code_sign_pkcs12file_path @windows_code_sign_pkcs12file_path end |
#windows_code_sign_pkcs12password ⇒ Object
Returns the value of attribute windows_code_sign_pkcs12password.
88 89 90 |
# File 'lib/comet/models/branding_options.rb', line 88 def windows_code_sign_pkcs12password @windows_code_sign_pkcs12password end |
#windows_code_sign_pkcs12password_format ⇒ Object
Returns the value of attribute windows_code_sign_pkcs12password_format.
85 86 87 |
# File 'lib/comet/models/branding_options.rb', line 85 def windows_code_sign_pkcs12password_format @windows_code_sign_pkcs12password_format end |
Instance Method Details
#clear ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/comet/models/branding_options.rb', line 118 def clear @brand_name = '' @logo_image = '' @top_color = '' @favicon = '' @product_name = '' @company_name = '' @help_url = '' @default_login_server_url = '' @tile_background_color = '' @account_register_url = '' @build_mode = 0 @path_ico_file = '' @path_icns_file = '' = '' @path_eula_rtf = '' @path_tile_png = '' @path_header_image = '' @path_app_icon_image = '' @package_identifier = '' @windows_code_sign_pkcs12file_path = '' @windows_code_sign_pkcs12password_format = 0 @windows_code_sign_pkcs12password = '' @windows_code_sign_pkcs11engine = '' @windows_code_sign_pkcs11module = '' @windows_code_sign_pkcs11certfile = '' @windows_code_sign_pkcs11key_id = '' @windows_code_sign_pkcs11password_format = 0 @windows_code_sign_pkcs11password = '' @mac_oscode_sign = Comet::MacOSCodeSignProperties.new @unknown_json_fields = {} end |
#from_hash(obj) ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/comet/models/branding_options.rb', line 159 def from_hash(obj) raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash obj.each do |k, v| case k when 'BrandName' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @brand_name = v when 'LogoImage' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @logo_image = v when 'TopColor' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @top_color = v when 'Favicon' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @favicon = v when 'HideNewsArea' @hide_news_area = v when 'ProductName' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @product_name = v when 'CompanyName' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @company_name = v when 'HelpURL' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @help_url = v when 'HelpIsPopup' @help_is_popup = v when 'DefaultLoginServerURL' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @default_login_server_url = v when 'TileBackgroundColor' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @tile_background_color = v when 'AccountRegisterURL' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @account_register_url = v when 'HideBackgroundLogo' @hide_background_logo = v when 'BuildMode' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @build_mode = v when 'PathIcoFile' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @path_ico_file = v when 'PathIcnsFile' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @path_icns_file = v when 'PathMenuBarIcnsFile' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String = v when 'PathEulaRtf' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @path_eula_rtf = v when 'PathTilePng' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @path_tile_png = v when 'PathHeaderImage' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @path_header_image = v when 'PathAppIconImage' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @path_app_icon_image = v when 'PackageIdentifier' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @package_identifier = v when 'WindowsCodeSignPKCS12FilePath' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @windows_code_sign_pkcs12file_path = v when 'WindowsCodeSignPKCS12PasswordFormat' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @windows_code_sign_pkcs12password_format = v when 'WindowsCodeSignPKCS12Password' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @windows_code_sign_pkcs12password = v when 'WindowsCodeSignPKCS11Engine' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @windows_code_sign_pkcs11engine = v when 'WindowsCodeSignPKCS11Module' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @windows_code_sign_pkcs11module = v when 'WindowsCodeSignPKCS11Certfile' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @windows_code_sign_pkcs11certfile = v when 'WindowsCodeSignPKCS11KeyID' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @windows_code_sign_pkcs11key_id = v when 'WindowsCodeSignPKCS11PasswordFormat' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @windows_code_sign_pkcs11password_format = v when 'WindowsCodeSignPKCS11Password' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @windows_code_sign_pkcs11password = v when 'MacOSCodeSign' @mac_oscode_sign = Comet::MacOSCodeSignProperties.new @mac_oscode_sign.from_hash(v) else @unknown_json_fields[k] = v end end end |
#from_json(json_string) ⇒ Object
152 153 154 155 156 |
# File 'lib/comet/models/branding_options.rb', line 152 def from_json(json_string) raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String from_hash(JSON.parse(json_string)) end |
#to_h ⇒ Hash
333 334 335 |
# File 'lib/comet/models/branding_options.rb', line 333 def to_h to_hash end |
#to_hash ⇒ Hash
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'lib/comet/models/branding_options.rb', line 292 def to_hash ret = {} ret['BrandName'] = @brand_name ret['LogoImage'] = @logo_image ret['TopColor'] = @top_color ret['Favicon'] = @favicon ret['HideNewsArea'] = @hide_news_area ret['ProductName'] = @product_name ret['CompanyName'] = @company_name ret['HelpURL'] = @help_url ret['HelpIsPopup'] = @help_is_popup ret['DefaultLoginServerURL'] = @default_login_server_url ret['TileBackgroundColor'] = @tile_background_color ret['AccountRegisterURL'] = @account_register_url ret['HideBackgroundLogo'] = @hide_background_logo ret['BuildMode'] = @build_mode ret['PathIcoFile'] = @path_ico_file ret['PathIcnsFile'] = @path_icns_file ret['PathMenuBarIcnsFile'] = ret['PathEulaRtf'] = @path_eula_rtf ret['PathTilePng'] = @path_tile_png ret['PathHeaderImage'] = @path_header_image ret['PathAppIconImage'] = @path_app_icon_image ret['PackageIdentifier'] = @package_identifier ret['WindowsCodeSignPKCS12FilePath'] = @windows_code_sign_pkcs12file_path ret['WindowsCodeSignPKCS12PasswordFormat'] = @windows_code_sign_pkcs12password_format ret['WindowsCodeSignPKCS12Password'] = @windows_code_sign_pkcs12password ret['WindowsCodeSignPKCS11Engine'] = @windows_code_sign_pkcs11engine ret['WindowsCodeSignPKCS11Module'] = @windows_code_sign_pkcs11module ret['WindowsCodeSignPKCS11Certfile'] = @windows_code_sign_pkcs11certfile ret['WindowsCodeSignPKCS11KeyID'] = @windows_code_sign_pkcs11key_id ret['WindowsCodeSignPKCS11PasswordFormat'] = @windows_code_sign_pkcs11password_format ret['WindowsCodeSignPKCS11Password'] = @windows_code_sign_pkcs11password ret['MacOSCodeSign'] = @mac_oscode_sign @unknown_json_fields.each do |k, v| ret[k] = v end ret end |
#to_json(options = {}) ⇒ String
338 339 340 |
# File 'lib/comet/models/branding_options.rb', line 338 def to_json( = {}) to_hash.to_json() end |