Class: Comet::BrandingProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/comet/models/branding_properties.rb

Overview

BrandingProperties is a typed class wrapper around the underlying Comet Server API data structure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBrandingProperties

Returns a new instance of BrandingProperties.



135
136
137
# File 'lib/comet/models/branding_properties.rb', line 135

def initialize
  clear
end

Instance Attribute Details

#account_register_urlObject

Returns the value of attribute account_register_url.



34
35
36
# File 'lib/comet/models/branding_properties.rb', line 34

def 
  @account_register_url
end

#admin_hide_branded_cloud_storageObject

Returns the value of attribute admin_hide_branded_cloud_storage.



46
47
48
# File 'lib/comet/models/branding_properties.rb', line 46

def admin_hide_branded_cloud_storage
  @admin_hide_branded_cloud_storage
end

#admin_hide_pre_built_client_optionObject

Returns the value of attribute admin_hide_pre_built_client_option.



43
44
45
# File 'lib/comet/models/branding_properties.rb', line 43

def admin_hide_pre_built_client_option
  @admin_hide_pre_built_client_option
end

#build_modeObject

One of the CLIENTBRANDINGBUILD_ constants



50
51
52
# File 'lib/comet/models/branding_properties.rb', line 50

def build_mode
  @build_mode
end

#cloud_storage_nameObject

Returns the value of attribute cloud_storage_name.



40
41
42
# File 'lib/comet/models/branding_properties.rb', line 40

def cloud_storage_name
  @cloud_storage_name
end

#company_nameObject

Returns the value of attribute company_name.



19
20
21
# File 'lib/comet/models/branding_properties.rb', line 19

def company_name
  @company_name
end

#default_login_server_urlObject

Returns the value of attribute default_login_server_url.



28
29
30
# File 'lib/comet/models/branding_properties.rb', line 28

def 
  @default_login_server_url
end

#help_is_popupObject

Returns the value of attribute help_is_popup.



25
26
27
# File 'lib/comet/models/branding_properties.rb', line 25

def help_is_popup
  @help_is_popup
end

#help_urlObject

Returns the value of attribute help_url.



22
23
24
# File 'lib/comet/models/branding_properties.rb', line 22

def help_url
  @help_url
end

#hide_background_logoObject

Returns the value of attribute hide_background_logo.



37
38
39
# File 'lib/comet/models/branding_properties.rb', line 37

def 
  @hide_background_logo
end

#mac_oscode_signObject

Returns the value of attribute mac_oscode_sign.



130
131
132
# File 'lib/comet/models/branding_properties.rb', line 130

def mac_oscode_sign
  @mac_oscode_sign
end

#package_identifierObject

Returns the value of attribute package_identifier.



74
75
76
# File 'lib/comet/models/branding_properties.rb', line 74

def package_identifier
  @package_identifier
end

#path_app_icon_imageObject

Returns the value of attribute path_app_icon_image.



71
72
73
# File 'lib/comet/models/branding_properties.rb', line 71

def path_app_icon_image
  @path_app_icon_image
end

#path_eula_rtfObject

Returns the value of attribute path_eula_rtf.



62
63
64
# File 'lib/comet/models/branding_properties.rb', line 62

def path_eula_rtf
  @path_eula_rtf
end

#path_header_imageObject

Returns the value of attribute path_header_image.



68
69
70
# File 'lib/comet/models/branding_properties.rb', line 68

def path_header_image
  @path_header_image
end

#path_icns_fileObject

Returns the value of attribute path_icns_file.



56
57
58
# File 'lib/comet/models/branding_properties.rb', line 56

def path_icns_file
  @path_icns_file
end

#path_ico_fileObject

Returns the value of attribute path_ico_file.



53
54
55
# File 'lib/comet/models/branding_properties.rb', line 53

def path_ico_file
  @path_ico_file
end

#path_menu_bar_icns_fileObject

Returns the value of attribute path_menu_bar_icns_file.



59
60
61
# File 'lib/comet/models/branding_properties.rb', line 59

def path_menu_bar_icns_file
  @path_menu_bar_icns_file
end

#path_tile_pngObject

Returns the value of attribute path_tile_png.



65
66
67
# File 'lib/comet/models/branding_properties.rb', line 65

def path_tile_png
  @path_tile_png
end

#product_nameObject

Returns the value of attribute product_name.



16
17
18
# File 'lib/comet/models/branding_properties.rb', line 16

def product_name
  @product_name
end

#tile_background_colorObject

Returns the value of attribute tile_background_color.



31
32
33
# File 'lib/comet/models/branding_properties.rb', line 31

def tile_background_color
  @tile_background_color
end

#unknown_json_fieldsObject

Returns the value of attribute unknown_json_fields.



133
134
135
# File 'lib/comet/models/branding_properties.rb', line 133

def unknown_json_fields
  @unknown_json_fields
end

#windows_code_sign_azure_app_idObject

Returns the value of attribute windows_code_sign_azure_app_id.



117
118
119
# File 'lib/comet/models/branding_properties.rb', line 117

def windows_code_sign_azure_app_id
  @windows_code_sign_azure_app_id
end

#windows_code_sign_azure_app_secretObject

Returns the value of attribute windows_code_sign_azure_app_secret.



124
125
126
# File 'lib/comet/models/branding_properties.rb', line 124

def windows_code_sign_azure_app_secret
  @windows_code_sign_azure_app_secret
end

#windows_code_sign_azure_app_secret_formatObject

One of the ENCRYPTIONMETHOD_ constants



121
122
123
# File 'lib/comet/models/branding_properties.rb', line 121

def windows_code_sign_azure_app_secret_format
  @windows_code_sign_azure_app_secret_format
end

#windows_code_sign_azure_cert_nameObject

Returns the value of attribute windows_code_sign_azure_cert_name.



114
115
116
# File 'lib/comet/models/branding_properties.rb', line 114

def windows_code_sign_azure_cert_name
  @windows_code_sign_azure_cert_name
end

#windows_code_sign_azure_tenant_idObject

Returns the value of attribute windows_code_sign_azure_tenant_id.



127
128
129
# File 'lib/comet/models/branding_properties.rb', line 127

def windows_code_sign_azure_tenant_id
  @windows_code_sign_azure_tenant_id
end

#windows_code_sign_azure_vault_nameObject

Returns the value of attribute windows_code_sign_azure_vault_name.



111
112
113
# File 'lib/comet/models/branding_properties.rb', line 111

def windows_code_sign_azure_vault_name
  @windows_code_sign_azure_vault_name
end

#windows_code_sign_methodObject

One of the WINDOWSCODESIGN_METHOD_ constants



78
79
80
# File 'lib/comet/models/branding_properties.rb', line 78

def windows_code_sign_method
  @windows_code_sign_method
end

#windows_code_sign_pkcs11certfileObject

This field was deprecated between 23.3.0 and 23.6.x, but is now used again.



98
99
100
# File 'lib/comet/models/branding_properties.rb', line 98

def windows_code_sign_pkcs11certfile
  @windows_code_sign_pkcs11certfile
end

#windows_code_sign_pkcs11engineObject

Returns the value of attribute windows_code_sign_pkcs11engine.



91
92
93
# File 'lib/comet/models/branding_properties.rb', line 91

def windows_code_sign_pkcs11engine
  @windows_code_sign_pkcs11engine
end

#windows_code_sign_pkcs11key_idObject

Returns the value of attribute windows_code_sign_pkcs11key_id.



101
102
103
# File 'lib/comet/models/branding_properties.rb', line 101

def windows_code_sign_pkcs11key_id
  @windows_code_sign_pkcs11key_id
end

#windows_code_sign_pkcs11moduleObject

Returns the value of attribute windows_code_sign_pkcs11module.



94
95
96
# File 'lib/comet/models/branding_properties.rb', line 94

def windows_code_sign_pkcs11module
  @windows_code_sign_pkcs11module
end

#windows_code_sign_pkcs11passwordObject

Returns the value of attribute windows_code_sign_pkcs11password.



108
109
110
# File 'lib/comet/models/branding_properties.rb', line 108

def windows_code_sign_pkcs11password
  @windows_code_sign_pkcs11password
end

#windows_code_sign_pkcs11password_formatObject

One of the ENCRYPTIONMETHOD_ constants



105
106
107
# File 'lib/comet/models/branding_properties.rb', line 105

def windows_code_sign_pkcs11password_format
  @windows_code_sign_pkcs11password_format
end

#windows_code_sign_pkcs12file_pathObject

Returns the value of attribute windows_code_sign_pkcs12file_path.



81
82
83
# File 'lib/comet/models/branding_properties.rb', line 81

def windows_code_sign_pkcs12file_path
  @windows_code_sign_pkcs12file_path
end

#windows_code_sign_pkcs12passwordObject

Returns the value of attribute windows_code_sign_pkcs12password.



88
89
90
# File 'lib/comet/models/branding_properties.rb', line 88

def windows_code_sign_pkcs12password
  @windows_code_sign_pkcs12password
end

#windows_code_sign_pkcs12password_formatObject

One of the ENCRYPTIONMETHOD_ constants



85
86
87
# File 'lib/comet/models/branding_properties.rb', line 85

def windows_code_sign_pkcs12password_format
  @windows_code_sign_pkcs12password_format
end

Instance Method Details

#clearObject



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
174
# File 'lib/comet/models/branding_properties.rb', line 139

def clear
  @product_name = ''
  @company_name = ''
  @help_url = ''
  @default_login_server_url = ''
  @tile_background_color = ''
  @account_register_url = ''
  @cloud_storage_name = ''
  @build_mode = 0
  @path_ico_file = ''
  @path_icns_file = ''
  @path_menu_bar_icns_file = ''
  @path_eula_rtf = ''
  @path_tile_png = ''
  @path_header_image = ''
  @path_app_icon_image = ''
  @package_identifier = ''
  @windows_code_sign_method = 0
  @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 = ''
  @windows_code_sign_azure_vault_name = ''
  @windows_code_sign_azure_cert_name = ''
  @windows_code_sign_azure_app_id = ''
  @windows_code_sign_azure_app_secret_format = 0
  @windows_code_sign_azure_app_secret = ''
  @windows_code_sign_azure_tenant_id = ''
  @mac_oscode_sign = Comet::MacOSCodeSignProperties.new
  @unknown_json_fields = {}
end

#from_hash(obj) ⇒ Object

Parameters:

  • obj (Hash)

    The complete object as a Ruby hash

Raises:

  • (TypeError)


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
290
291
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
331
332
# File 'lib/comet/models/branding_properties.rb', line 184

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 '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 'CloudStorageName'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      @cloud_storage_name = v
    when 'AdminHidePreBuiltClientOption'
      @admin_hide_pre_built_client_option = v
    when 'AdminHideBrandedCloudStorage'
      @admin_hide_branded_cloud_storage = 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

      @path_menu_bar_icns_file = 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 'WindowsCodeSignMethod'
      raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric

      @windows_code_sign_method = 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 'WindowsCodeSignAzureVaultName'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      @windows_code_sign_azure_vault_name = v
    when 'WindowsCodeSignAzureCertName'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      @windows_code_sign_azure_cert_name = v
    when 'WindowsCodeSignAzureAppID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      @windows_code_sign_azure_app_id = v
    when 'WindowsCodeSignAzureAppSecretFormat'
      raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric

      @windows_code_sign_azure_app_secret_format = v
    when 'WindowsCodeSignAzureAppSecret'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      @windows_code_sign_azure_app_secret = v
    when 'WindowsCodeSignAzureTenantID'
      raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String

      @windows_code_sign_azure_tenant_id = 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

Parameters:

  • json_string (String)

    The complete object in JSON format

Raises:

  • (TypeError)


177
178
179
180
181
# File 'lib/comet/models/branding_properties.rb', line 177

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_hHash

Returns The complete object as a Ruby hash.

Returns:

  • (Hash)

    The complete object as a Ruby hash



381
382
383
# File 'lib/comet/models/branding_properties.rb', line 381

def to_h
  to_hash
end

#to_hashHash

Returns The complete object as a Ruby hash.

Returns:

  • (Hash)

    The complete object as a Ruby hash



335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
# File 'lib/comet/models/branding_properties.rb', line 335

def to_hash
  ret = {}
  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['CloudStorageName'] = @cloud_storage_name
  ret['AdminHidePreBuiltClientOption'] = @admin_hide_pre_built_client_option
  ret['AdminHideBrandedCloudStorage'] = @admin_hide_branded_cloud_storage
  ret['BuildMode'] = @build_mode
  ret['PathIcoFile'] = @path_ico_file
  ret['PathIcnsFile'] = @path_icns_file
  ret['PathMenuBarIcnsFile'] = @path_menu_bar_icns_file
  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['WindowsCodeSignMethod'] = @windows_code_sign_method
  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['WindowsCodeSignAzureVaultName'] = @windows_code_sign_azure_vault_name
  ret['WindowsCodeSignAzureCertName'] = @windows_code_sign_azure_cert_name
  ret['WindowsCodeSignAzureAppID'] = @windows_code_sign_azure_app_id
  ret['WindowsCodeSignAzureAppSecretFormat'] = @windows_code_sign_azure_app_secret_format
  ret['WindowsCodeSignAzureAppSecret'] = @windows_code_sign_azure_app_secret
  ret['WindowsCodeSignAzureTenantID'] = @windows_code_sign_azure_tenant_id
  ret['MacOSCodeSign'] = @mac_oscode_sign
  @unknown_json_fields.each do |k, v|
    ret[k] = v
  end
  ret
end

#to_json(options = {}) ⇒ String

Returns The complete object as a JSON string.

Returns:

  • (String)

    The complete object as a JSON string



386
387
388
# File 'lib/comet/models/branding_properties.rb', line 386

def to_json(options = {})
  to_hash.to_json(options)
end