comet_backup_ruby_sdk 1.5.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/CHANGELOG.md +34 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +2 -2
- data/LICENSE +0 -0
- data/README.md +1 -1
- data/RELEASING.md +7 -4
- data/Rakefile +0 -0
- data/comet_backup_ruby_sdk-1.8.0.gem +0 -0
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/comet_server.rb +76 -2
- data/lib/comet/definitions.rb +35 -4
- data/lib/comet/models/b2destination_location.rb +8 -0
- data/lib/comet/models/b2virtual_storage_role_settings.rb +6 -0
- data/lib/comet/models/default_source_with_osrestriction.rb +83 -0
- data/lib/comet/models/device_config.rb +22 -0
- data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +99 -0
- data/lib/comet/models/live_user_connection.rb +11 -0
- data/lib/comet/models/my_sqlconnection.rb +39 -0
- data/lib/comet/models/restore_job_advanced_options.rb +10 -0
- data/lib/comet/models/server_meta_branding_properties.rb +135 -0
- data/lib/comet/models/source_include_pattern.rb +84 -0
- data/lib/comet/models/source_statistics.rb +8 -0
- data/lib/comet/models/user_policy.rb +15 -0
- data/lib/comet/models/webhook_option.rb +16 -0
- data/lib/comet_backup_ruby_sdk.rb +3 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcf25f477167c1899508aee3c92beaba73a3832634a7b377915c26c11f5c0dec
|
4
|
+
data.tar.gz: 3a5a94ec4b0cddfd10ed3f819921cd1df9cf192aa76936562eaecd0f61b603b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 435a8de3e5dc71585979cfc43549a1871fbf47d9b4a6b7575e559dd5b9cc1fd4fd3dd0a5aa2c036424b10e2f626cce5d3f18020ea3c884240c94190cbec08354
|
7
|
+
data.tar.gz: 3e876fa42cdfad439f0cf3db82f4536a915ec4e4033721c111d1e9435f15fe01167e79320532fff0a9cb5f9cd41f9195a71e00d26849b1eb3ac88a64f0b7918c
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,39 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2021-10-21 1.9.0
|
4
|
+
- Based on 21.9.7
|
5
|
+
- Add Support for `HideFiles` parameter in B2 Destination Locations
|
6
|
+
- Add support for `RegistrationTime` to `DeviceConfig`
|
7
|
+
- Upgrade MYSQL to support new TLS connection options
|
8
|
+
- Add support for new API: `AdminMetaReadAllLogsRequest` and `AdminDispatcherRequestWindiskSnapshot`
|
9
|
+
|
10
|
+
## 2021-09-14 1.8.0
|
11
|
+
- Based on Comet 21.9.2
|
12
|
+
- Support new `custom_headers` field on the `WebhookOption` class for specifying custom HTTP headers
|
13
|
+
to be sent in webhook POST requests from Comet Server
|
14
|
+
|
15
|
+
## 2021-09-08 v1.7.0
|
16
|
+
- Based on Comet 21.9.1
|
17
|
+
- Support new `device_timezone` field on the `DeviceConfig` class.
|
18
|
+
- Add `admin_dispatcher_ping_destination` api method
|
19
|
+
- Add support for new retention range type constants: `RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_DAY`
|
20
|
+
- Add support for new retention range type constants: `RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_WEEK`
|
21
|
+
- Add support for new retention range type constants: `RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_MONTH`
|
22
|
+
- Add support for Microsoft Office 365 Sharepoiint constant `STOREDOBJECTTYPE_MSSITELISTDRIVEENTITY`
|
23
|
+
- Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_PUBLIC`
|
24
|
+
- Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_CHINA`
|
25
|
+
- Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_GERMANY`
|
26
|
+
- Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_US_GOVT`
|
27
|
+
- Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_US_DOD`
|
28
|
+
|
29
|
+
## 2021-07-01 v1.6.0
|
30
|
+
- Based on Comet 21.6.6
|
31
|
+
- Support new `DefaultSourceWithOSRestriction` and `LastSuccessfulBackupJob` fields
|
32
|
+
- Support custom credentials when performing a cloud Office 365 restore job
|
33
|
+
- Support identifying Microsoft Teams folders inside a Sharepoint backup job
|
34
|
+
- Document the `SourceIncludePattern` structure used for `PINCLUDE`/`RINCLUDE` rules in a File-type `EngineProps` array
|
35
|
+
- Document existing `BrandingProps` endpoint
|
36
|
+
|
3
37
|
## 2021-05-25 v1.5.0
|
4
38
|
- Based on Comet 21.6.1
|
5
39
|
- Add new APIs to remotely browse MySQL, MongoDB, MSSQL database servers
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
data/RELEASING.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# Procedure for releasing gem package updates
|
2
2
|
|
3
|
+
0. As a cygwin user, with docker installed; `docker run -it -v "c://cygwin64/$PWD":/app -w /app ruby:2.7 bash` will get you with a suitable ruby environment for testing/building and releasing this package9.
|
3
4
|
1. All tests passing
|
4
5
|
2. Update changelog in `CHANGELOG.md`
|
5
|
-
3. Update version number in `gemspec`
|
6
|
-
4. `
|
6
|
+
3. Update version number in `comet_backup_ruby_sdk.gemspec`
|
7
|
+
4. `bundle install`
|
8
|
+
- Should update our internal version in Gemfile.lock
|
9
|
+
5. `gem build comet_backup_ruby_sdk.gemspec`
|
7
10
|
- Should be warning-free
|
8
|
-
|
11
|
+
6. Git tag
|
9
12
|
- Respect semver
|
10
|
-
|
13
|
+
7. `gem push comet_backup_ruby_sdk-1.x.x.gem`
|
data/Rakefile
CHANGED
File without changes
|
Binary file
|
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
12
12
|
|
13
13
|
Gem::Specification.new do |spec|
|
14
14
|
spec.name = 'comet_backup_ruby_sdk'
|
15
|
-
spec.version = '1.
|
15
|
+
spec.version = '1.9.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
data/lib/comet/comet_server.rb
CHANGED
@@ -808,6 +808,7 @@ module Comet
|
|
808
808
|
# This does not remove any storage buckets. Unused storage buckets will be cleaned up by the Constellation Role.
|
809
809
|
# Any stored data can not be decrypted without the user profile. Misuse can cause data loss!
|
810
810
|
# This also allows to uninstall software from active devices under the user account
|
811
|
+
# This also removes all job history for the user account.
|
811
812
|
#
|
812
813
|
# You must supply administrator authentication credentials to use this API.
|
813
814
|
# This API requires the Auth Role to be enabled.
|
@@ -1076,6 +1077,33 @@ module Comet
|
|
1076
1077
|
ret
|
1077
1078
|
end
|
1078
1079
|
|
1080
|
+
# AdminDispatcherPingDestination
|
1081
|
+
#
|
1082
|
+
# Test the connection to the storage bucket.
|
1083
|
+
#
|
1084
|
+
# You must supply administrator authentication credentials to use this API.
|
1085
|
+
# This API requires the Auth Role to be enabled.
|
1086
|
+
#
|
1087
|
+
# @param [String] target_id The live connection GUID
|
1088
|
+
# @param [Comet::DestinationLocation] extra_data The destination location settings
|
1089
|
+
# @return [Comet::CometAPIResponseMessage]
|
1090
|
+
def admin_dispatcher_ping_destination(target_id, extra_data)
|
1091
|
+
submit_params = {}
|
1092
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1093
|
+
|
1094
|
+
submit_params['TargetID'] = target_id
|
1095
|
+
raise TypeError, "'extra_data' expected Comet::DestinationLocation, got #{extra_data.class}" unless extra_data.is_a? Comet::DestinationLocation
|
1096
|
+
|
1097
|
+
submit_params['ExtraData'] = extra_data.to_json
|
1098
|
+
|
1099
|
+
body = perform_request('api/v1/admin/dispatcher/ping-destination', submit_params)
|
1100
|
+
json_body = JSON.parse body
|
1101
|
+
check_status json_body
|
1102
|
+
ret = Comet::CometAPIResponseMessage.new
|
1103
|
+
ret.from_hash(json_body)
|
1104
|
+
ret
|
1105
|
+
end
|
1106
|
+
|
1079
1107
|
# AdminDispatcherRefetchProfile
|
1080
1108
|
#
|
1081
1109
|
# Instruct a live connected device to refresh their profile.
|
@@ -1535,6 +1563,37 @@ module Comet
|
|
1535
1563
|
ret
|
1536
1564
|
end
|
1537
1565
|
|
1566
|
+
# AdminDispatcherRequestWindiskSnapshot
|
1567
|
+
#
|
1568
|
+
# Request a Disk Image snapshot with the windiskbrowse-style from a live connected device.
|
1569
|
+
#
|
1570
|
+
# You must supply administrator authentication credentials to use this API.
|
1571
|
+
# This API requires the Auth Role to be enabled.
|
1572
|
+
#
|
1573
|
+
# @param [String] target_id The live connection GUID
|
1574
|
+
# @param [String] destination The Storage Vault ID
|
1575
|
+
# @param [String] snapshot_id The Snapshot ID
|
1576
|
+
# @return [Comet::DispatcherWindiskSnapshotResponse]
|
1577
|
+
def admin_dispatcher_request_windisk_snapshot(target_id, destination, snapshot_id)
|
1578
|
+
submit_params = {}
|
1579
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1580
|
+
|
1581
|
+
submit_params['TargetID'] = target_id
|
1582
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1583
|
+
|
1584
|
+
submit_params['Destination'] = destination
|
1585
|
+
raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
|
1586
|
+
|
1587
|
+
submit_params['SnapshotID'] = snapshot_id
|
1588
|
+
|
1589
|
+
body = perform_request('api/v1/admin/dispatcher/request-windisk-snapshot', submit_params)
|
1590
|
+
json_body = JSON.parse body
|
1591
|
+
check_status json_body
|
1592
|
+
ret = Comet::DispatcherWindiskSnapshotResponse.new
|
1593
|
+
ret.from_hash(json_body)
|
1594
|
+
ret
|
1595
|
+
end
|
1596
|
+
|
1538
1597
|
# AdminDispatcherRunBackup
|
1539
1598
|
#
|
1540
1599
|
# Instruct a live connected device to run a scheduled backup.
|
@@ -2111,6 +2170,7 @@ module Comet
|
|
2111
2170
|
# Cancel a running job.
|
2112
2171
|
# A request is sent to the live-connected device, asking it to cancel the operation. This may fail if there is no live-connection.
|
2113
2172
|
# Only jobs from Comet 18.3.5 or newer can be cancelled. A job can only be cancelled if it has a non-empty CancellationID field in its properties.
|
2173
|
+
# If the device is running Comet 21.9.5 or later, this API will wait up to ten seconds for a confirmation from the client.
|
2114
2174
|
#
|
2115
2175
|
# You must supply administrator authentication credentials to use this API.
|
2116
2176
|
# This API requires the Auth Role to be enabled.
|
@@ -2290,6 +2350,20 @@ module Comet
|
|
2290
2350
|
ret
|
2291
2351
|
end
|
2292
2352
|
|
2353
|
+
# AdminMetaReadAllLogs
|
2354
|
+
#
|
2355
|
+
# Get a ZIP file of all of the server's log files.
|
2356
|
+
# On non-Windows platforms, log content uses LF line endings. On Windows, Comet changed from LF to CRLF line endings in 18.3.2.
|
2357
|
+
# This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
|
2358
|
+
#
|
2359
|
+
# You must supply administrator authentication credentials to use this API.
|
2360
|
+
# This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
|
2361
|
+
#
|
2362
|
+
# @return [String]
|
2363
|
+
def admin_meta_read_all_logs
|
2364
|
+
perform_request('api/v1/admin/meta/read-all-logs')
|
2365
|
+
end
|
2366
|
+
|
2293
2367
|
# AdminMetaReadLogs
|
2294
2368
|
#
|
2295
2369
|
# Get log file content.
|
@@ -3455,7 +3529,7 @@ module Comet
|
|
3455
3529
|
|
3456
3530
|
ret_error = Comet::CometAPIResponseMessage.new
|
3457
3531
|
ret_error.from_hash(obj)
|
3458
|
-
raise Comet::APIResponseError.new(ret_error)
|
3532
|
+
raise Comet::APIResponseError.new(ret_error), 'Comet API response status was not OK'
|
3459
3533
|
end
|
3460
3534
|
|
3461
3535
|
# Perform a synchronous HTTP request.
|
@@ -3492,7 +3566,7 @@ module Comet
|
|
3492
3566
|
|
3493
3567
|
form_params = []
|
3494
3568
|
params.each do |k, v|
|
3495
|
-
form_params.append [k, v, {:filename => k}]
|
3569
|
+
form_params.append [k, v, { :filename => k }]
|
3496
3570
|
end
|
3497
3571
|
req.set_form(form_params, 'multipart/form-data')
|
3498
3572
|
|
data/lib/comet/definitions.rb
CHANGED
@@ -224,8 +224,17 @@ module Comet
|
|
224
224
|
# RetentionRangeType: Uses Weeks, WeekOffset
|
225
225
|
RETENTIONRANGE_FIRST_JOB_FOR_LAST_X_WEEKS = 906
|
226
226
|
|
227
|
+
# RetentionRangeType: Uses Jobs
|
228
|
+
RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_DAY = 907
|
229
|
+
|
230
|
+
# RetentionRangeType: Uses Jobs
|
231
|
+
RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_WEEK = 908
|
232
|
+
|
233
|
+
# RetentionRangeType: Uses Jobs
|
234
|
+
RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_MONTH = 909
|
235
|
+
|
227
236
|
# RetentionRangeType:
|
228
|
-
RETENTIONRANGE__HIGHEST =
|
237
|
+
RETENTIONRANGE__HIGHEST = 909
|
229
238
|
|
230
239
|
RETENTIONRANGE_MAXINT = 1_125_899_906_842_624
|
231
240
|
|
@@ -353,12 +362,18 @@ module Comet
|
|
353
362
|
# StoredObjectType:
|
354
363
|
STOREDOBJECTTYPE_MSSITE = 'mssite'
|
355
364
|
|
365
|
+
# StoredObjectType:
|
366
|
+
STOREDOBJECTTYPE_MSSITE_TEAM = 'mssiteteam'
|
367
|
+
|
356
368
|
# StoredObjectType:
|
357
369
|
STOREDOBJECTTYPE_MSSITELISTENTITY = 'mssitelistentity'
|
358
370
|
|
359
371
|
# StoredObjectType:
|
360
372
|
STOREDOBJECTTYPE_MSSITEITEMENTITY = 'mssiteitementity'
|
361
373
|
|
374
|
+
# StoredObjectType:
|
375
|
+
STOREDOBJECTTYPE_MSSITELISTDRIVEENTITY = 'mssitelistdriveentity'
|
376
|
+
|
362
377
|
# ExtraFileExclusionOSRestriction:
|
363
378
|
OS_ANY = 0
|
364
379
|
|
@@ -397,13 +412,13 @@ module Comet
|
|
397
412
|
|
398
413
|
DEFAULT_TIMEZONE = 'UTC'
|
399
414
|
|
400
|
-
APPLICATION_VERSION = '21.
|
415
|
+
APPLICATION_VERSION = '21.9.7'
|
401
416
|
|
402
417
|
APPLICATION_VERSION_MAJOR = 21
|
403
418
|
|
404
|
-
APPLICATION_VERSION_MINOR =
|
419
|
+
APPLICATION_VERSION_MINOR = 9
|
405
420
|
|
406
|
-
APPLICATION_VERSION_REVISION =
|
421
|
+
APPLICATION_VERSION_REVISION = 7
|
407
422
|
|
408
423
|
RELEASE_CODENAME = 'Voyager'
|
409
424
|
|
@@ -576,6 +591,9 @@ module Comet
|
|
576
591
|
# MacOSCodesignLevel:
|
577
592
|
MACOSCODESIGN_LEVEL_SIGN_NOTARISE_STAPLE = 2
|
578
593
|
|
594
|
+
# StreamableEventType:
|
595
|
+
SEVT__MIN = 4000
|
596
|
+
|
579
597
|
# StreamableEventType: Event is emitted when the webhook is registered, or when the server starts up. The Data associated is ServerMetaVersionInfo
|
580
598
|
SEVT_META_HELLO = 4000
|
581
599
|
|
@@ -597,4 +615,17 @@ module Comet
|
|
597
615
|
# StreamableEventType: Data is the string bucket ref
|
598
616
|
SEVT_BUCKET_NEW = 4300
|
599
617
|
|
618
|
+
# StreamableEventType:
|
619
|
+
SEVT__MAX = 4999
|
620
|
+
|
621
|
+
OFFICE365_REGION_PUBLIC = 'GlobalPublicCloud'
|
622
|
+
|
623
|
+
OFFICE365_REGION_CHINA = 'ChinaCloud'
|
624
|
+
|
625
|
+
OFFICE365_REGION_GERMANY = 'GermanCloud'
|
626
|
+
|
627
|
+
OFFICE365_REGION_US_GOVT = 'USGovtGccCloud'
|
628
|
+
|
629
|
+
OFFICE365_REGION_US_DOD = 'USGovtGccDoDCloud'
|
630
|
+
|
600
631
|
end
|
@@ -29,6 +29,9 @@ module Comet
|
|
29
29
|
# @type [Number] max_connections
|
30
30
|
attr_accessor :max_connections
|
31
31
|
|
32
|
+
# @type [Boolean] hide_deleted_files
|
33
|
+
attr_accessor :hide_deleted_files
|
34
|
+
|
32
35
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
33
36
|
attr_accessor :unknown_json_fields
|
34
37
|
|
@@ -78,6 +81,8 @@ module Comet
|
|
78
81
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
79
82
|
|
80
83
|
@max_connections = v
|
84
|
+
when 'HideDeletedFiles'
|
85
|
+
@hide_deleted_files = v
|
81
86
|
else
|
82
87
|
@unknown_json_fields[k] = v
|
83
88
|
end
|
@@ -102,6 +107,9 @@ module Comet
|
|
102
107
|
unless @max_connections.nil?
|
103
108
|
ret['MaxConnections'] = @max_connections
|
104
109
|
end
|
110
|
+
unless @hide_deleted_files.nil?
|
111
|
+
ret['HideDeletedFiles'] = @hide_deleted_files
|
112
|
+
end
|
105
113
|
@unknown_json_fields.each do |k, v|
|
106
114
|
ret[k] = v
|
107
115
|
end
|
@@ -23,6 +23,9 @@ module Comet
|
|
23
23
|
# @type [String] app_key
|
24
24
|
attr_accessor :app_key
|
25
25
|
|
26
|
+
# @type [Boolean] hide_deleted_files
|
27
|
+
attr_accessor :hide_deleted_files
|
28
|
+
|
26
29
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
27
30
|
attr_accessor :unknown_json_fields
|
28
31
|
|
@@ -62,6 +65,8 @@ module Comet
|
|
62
65
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
63
66
|
|
64
67
|
@app_key = v
|
68
|
+
when 'HideDeletedFiles'
|
69
|
+
@hide_deleted_files = v
|
65
70
|
else
|
66
71
|
@unknown_json_fields[k] = v
|
67
72
|
end
|
@@ -74,6 +79,7 @@ module Comet
|
|
74
79
|
ret['MasterBucket'] = @master_bucket
|
75
80
|
ret['KeyID'] = @key_id
|
76
81
|
ret['AppKey'] = @app_key
|
82
|
+
ret['HideDeletedFiles'] = @hide_deleted_files
|
77
83
|
@unknown_json_fields.each do |k, v|
|
78
84
|
ret[k] = v
|
79
85
|
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# DefaultSourceWithOSRestriction is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class DefaultSourceWithOSRestriction
|
16
|
+
|
17
|
+
# @type [Comet::SourceConfig] source_config
|
18
|
+
attr_accessor :source_config
|
19
|
+
|
20
|
+
# @type [Number] restrict_os
|
21
|
+
attr_accessor :restrict_os
|
22
|
+
|
23
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
24
|
+
attr_accessor :unknown_json_fields
|
25
|
+
|
26
|
+
def initialize
|
27
|
+
clear
|
28
|
+
end
|
29
|
+
|
30
|
+
def clear
|
31
|
+
@source_config = Comet::SourceConfig.new
|
32
|
+
@restrict_os = 0
|
33
|
+
@unknown_json_fields = {}
|
34
|
+
end
|
35
|
+
|
36
|
+
# @param [String] json_string The complete object in JSON format
|
37
|
+
def from_json(json_string)
|
38
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
39
|
+
|
40
|
+
from_hash(JSON.parse(json_string))
|
41
|
+
end
|
42
|
+
|
43
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
44
|
+
def from_hash(obj)
|
45
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
46
|
+
|
47
|
+
obj.each do |k, v|
|
48
|
+
case k
|
49
|
+
when 'SourceConfig'
|
50
|
+
@source_config = Comet::SourceConfig.new
|
51
|
+
@source_config.from_hash(v)
|
52
|
+
when 'RestrictOS'
|
53
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
54
|
+
|
55
|
+
@restrict_os = v
|
56
|
+
else
|
57
|
+
@unknown_json_fields[k] = v
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# @return [Hash] The complete object as a Ruby hash
|
63
|
+
def to_hash
|
64
|
+
ret = {}
|
65
|
+
ret['SourceConfig'] = @source_config
|
66
|
+
ret['RestrictOS'] = @restrict_os
|
67
|
+
@unknown_json_fields.each do |k, v|
|
68
|
+
ret[k] = v
|
69
|
+
end
|
70
|
+
ret
|
71
|
+
end
|
72
|
+
|
73
|
+
# @return [Hash] The complete object as a Ruby hash
|
74
|
+
def to_h
|
75
|
+
to_hash
|
76
|
+
end
|
77
|
+
|
78
|
+
# @return [String] The complete object as a JSON string
|
79
|
+
def to_json(options = {})
|
80
|
+
to_hash.to_json(options)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -17,12 +17,18 @@ module Comet
|
|
17
17
|
# @type [String] friendly_name
|
18
18
|
attr_accessor :friendly_name
|
19
19
|
|
20
|
+
# @type [Number] registration_time
|
21
|
+
attr_accessor :registration_time
|
22
|
+
|
20
23
|
# @type [Comet::OSInfo] platform_version
|
21
24
|
attr_accessor :platform_version
|
22
25
|
|
23
26
|
# @type [Hash{String => Comet::SourceBasicInfo}] sources
|
24
27
|
attr_accessor :sources
|
25
28
|
|
29
|
+
# @type [String] device_timezone
|
30
|
+
attr_accessor :device_timezone
|
31
|
+
|
26
32
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
27
33
|
attr_accessor :unknown_json_fields
|
28
34
|
|
@@ -32,8 +38,10 @@ module Comet
|
|
32
38
|
|
33
39
|
def clear
|
34
40
|
@friendly_name = ''
|
41
|
+
@registration_time = 0
|
35
42
|
@platform_version = Comet::OSInfo.new
|
36
43
|
@sources = {}
|
44
|
+
@device_timezone = ''
|
37
45
|
@unknown_json_fields = {}
|
38
46
|
end
|
39
47
|
|
@@ -54,6 +62,10 @@ module Comet
|
|
54
62
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
55
63
|
|
56
64
|
@friendly_name = v
|
65
|
+
when 'RegistrationTime'
|
66
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
67
|
+
|
68
|
+
@registration_time = v
|
57
69
|
when 'PlatformVersion'
|
58
70
|
@platform_version = Comet::OSInfo.new
|
59
71
|
@platform_version.from_hash(v)
|
@@ -67,6 +79,10 @@ module Comet
|
|
67
79
|
@sources[k1].from_hash(v1)
|
68
80
|
end
|
69
81
|
end
|
82
|
+
when 'DeviceTimezone'
|
83
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
84
|
+
|
85
|
+
@device_timezone = v
|
70
86
|
else
|
71
87
|
@unknown_json_fields[k] = v
|
72
88
|
end
|
@@ -77,12 +93,18 @@ module Comet
|
|
77
93
|
def to_hash
|
78
94
|
ret = {}
|
79
95
|
ret['FriendlyName'] = @friendly_name
|
96
|
+
unless @registration_time.nil?
|
97
|
+
ret['RegistrationTime'] = @registration_time
|
98
|
+
end
|
80
99
|
unless @platform_version.nil?
|
81
100
|
ret['PlatformVersion'] = @platform_version
|
82
101
|
end
|
83
102
|
unless @sources.nil?
|
84
103
|
ret['Sources'] = @sources
|
85
104
|
end
|
105
|
+
unless @device_timezone.nil?
|
106
|
+
ret['DeviceTimezone'] = @device_timezone
|
107
|
+
end
|
86
108
|
@unknown_json_fields.each do |k, v|
|
87
109
|
ret[k] = v
|
88
110
|
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# DispatcherWindiskSnapshotResponse is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class DispatcherWindiskSnapshotResponse
|
16
|
+
|
17
|
+
# @type [Number] status
|
18
|
+
attr_accessor :status
|
19
|
+
|
20
|
+
# @type [String] message
|
21
|
+
attr_accessor :message
|
22
|
+
|
23
|
+
# @type [Array<Comet::DiskDrive>] windisk_snapshot
|
24
|
+
attr_accessor :windisk_snapshot
|
25
|
+
|
26
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
27
|
+
attr_accessor :unknown_json_fields
|
28
|
+
|
29
|
+
def initialize
|
30
|
+
clear
|
31
|
+
end
|
32
|
+
|
33
|
+
def clear
|
34
|
+
@status = 0
|
35
|
+
@message = ''
|
36
|
+
@windisk_snapshot = []
|
37
|
+
@unknown_json_fields = {}
|
38
|
+
end
|
39
|
+
|
40
|
+
# @param [String] json_string The complete object in JSON format
|
41
|
+
def from_json(json_string)
|
42
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
43
|
+
|
44
|
+
from_hash(JSON.parse(json_string))
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
48
|
+
def from_hash(obj)
|
49
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
50
|
+
|
51
|
+
obj.each do |k, v|
|
52
|
+
case k
|
53
|
+
when 'Status'
|
54
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
55
|
+
|
56
|
+
@status = v
|
57
|
+
when 'Message'
|
58
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
59
|
+
|
60
|
+
@message = v
|
61
|
+
when 'WindiskSnapshot'
|
62
|
+
if v.nil?
|
63
|
+
@windisk_snapshot = []
|
64
|
+
else
|
65
|
+
@windisk_snapshot = Array.new(v.length)
|
66
|
+
v.each_with_index do |v1, i1|
|
67
|
+
@windisk_snapshot[i1] = Comet::DiskDrive.new
|
68
|
+
@windisk_snapshot[i1].from_hash(v1)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
else
|
72
|
+
@unknown_json_fields[k] = v
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# @return [Hash] The complete object as a Ruby hash
|
78
|
+
def to_hash
|
79
|
+
ret = {}
|
80
|
+
ret['Status'] = @status
|
81
|
+
ret['Message'] = @message
|
82
|
+
ret['WindiskSnapshot'] = @windisk_snapshot
|
83
|
+
@unknown_json_fields.each do |k, v|
|
84
|
+
ret[k] = v
|
85
|
+
end
|
86
|
+
ret
|
87
|
+
end
|
88
|
+
|
89
|
+
# @return [Hash] The complete object as a Ruby hash
|
90
|
+
def to_h
|
91
|
+
to_hash
|
92
|
+
end
|
93
|
+
|
94
|
+
# @return [String] The complete object as a JSON string
|
95
|
+
def to_json(options = {})
|
96
|
+
to_hash.to_json(options)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -29,6 +29,9 @@ module Comet
|
|
29
29
|
# @type [Comet::OSInfo] reported_platform_version
|
30
30
|
attr_accessor :reported_platform_version
|
31
31
|
|
32
|
+
# @type [String] device_time_zone
|
33
|
+
attr_accessor :device_time_zone
|
34
|
+
|
32
35
|
# @type [String] ipaddress
|
33
36
|
attr_accessor :ipaddress
|
34
37
|
|
@@ -51,6 +54,7 @@ module Comet
|
|
51
54
|
@reported_version = ''
|
52
55
|
@reported_platform = ''
|
53
56
|
@reported_platform_version = Comet::OSInfo.new
|
57
|
+
@device_time_zone = ''
|
54
58
|
@ipaddress = ''
|
55
59
|
@connection_time = 0
|
56
60
|
@unknown_json_fields = {}
|
@@ -88,6 +92,10 @@ module Comet
|
|
88
92
|
when 'ReportedPlatformVersion'
|
89
93
|
@reported_platform_version = Comet::OSInfo.new
|
90
94
|
@reported_platform_version.from_hash(v)
|
95
|
+
when 'DeviceTimeZone'
|
96
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
97
|
+
|
98
|
+
@device_time_zone = v
|
91
99
|
when 'IPAddress'
|
92
100
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
93
101
|
|
@@ -114,6 +122,9 @@ module Comet
|
|
114
122
|
unless @reported_platform_version.nil?
|
115
123
|
ret['ReportedPlatformVersion'] = @reported_platform_version
|
116
124
|
end
|
125
|
+
unless @device_time_zone.nil?
|
126
|
+
ret['DeviceTimeZone'] = @device_time_zone
|
127
|
+
end
|
117
128
|
unless @ipaddress.nil?
|
118
129
|
ret['IPAddress'] = @ipaddress
|
119
130
|
end
|
@@ -26,6 +26,21 @@ module Comet
|
|
26
26
|
# @type [String] password
|
27
27
|
attr_accessor :password
|
28
28
|
|
29
|
+
# @type [Boolean] use_tls
|
30
|
+
attr_accessor :use_tls
|
31
|
+
|
32
|
+
# @type [Boolean] tlsskip_verify
|
33
|
+
attr_accessor :tlsskip_verify
|
34
|
+
|
35
|
+
# @type [String] tlscustom_server_capath
|
36
|
+
attr_accessor :tlscustom_server_capath
|
37
|
+
|
38
|
+
# @type [String] tlscustom_client_crt_path
|
39
|
+
attr_accessor :tlscustom_client_crt_path
|
40
|
+
|
41
|
+
# @type [String] tlscustom_client_key_path
|
42
|
+
attr_accessor :tlscustom_client_key_path
|
43
|
+
|
29
44
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
30
45
|
attr_accessor :unknown_json_fields
|
31
46
|
|
@@ -38,6 +53,9 @@ module Comet
|
|
38
53
|
@port = ''
|
39
54
|
@username = ''
|
40
55
|
@password = ''
|
56
|
+
@tlscustom_server_capath = ''
|
57
|
+
@tlscustom_client_crt_path = ''
|
58
|
+
@tlscustom_client_key_path = ''
|
41
59
|
@unknown_json_fields = {}
|
42
60
|
end
|
43
61
|
|
@@ -70,6 +88,22 @@ module Comet
|
|
70
88
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
89
|
|
72
90
|
@password = v
|
91
|
+
when 'UseTLS'
|
92
|
+
@use_tls = v
|
93
|
+
when 'TLSSkipVerify'
|
94
|
+
@tlsskip_verify = v
|
95
|
+
when 'TLSCustomServerCAPath'
|
96
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
97
|
+
|
98
|
+
@tlscustom_server_capath = v
|
99
|
+
when 'TLSCustomClientCrtPath'
|
100
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
101
|
+
|
102
|
+
@tlscustom_client_crt_path = v
|
103
|
+
when 'TLSCustomClientKeyPath'
|
104
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
105
|
+
|
106
|
+
@tlscustom_client_key_path = v
|
73
107
|
else
|
74
108
|
@unknown_json_fields[k] = v
|
75
109
|
end
|
@@ -83,6 +117,11 @@ module Comet
|
|
83
117
|
ret['Port'] = @port
|
84
118
|
ret['Username'] = @username
|
85
119
|
ret['Password'] = @password
|
120
|
+
ret['UseTLS'] = @use_tls
|
121
|
+
ret['TLSSkipVerify'] = @tlsskip_verify
|
122
|
+
ret['TLSCustomServerCAPath'] = @tlscustom_server_capath
|
123
|
+
ret['TLSCustomClientCrtPath'] = @tlscustom_client_crt_path
|
124
|
+
ret['TLSCustomClientKeyPath'] = @tlscustom_client_key_path
|
86
125
|
@unknown_json_fields.each do |k, v|
|
87
126
|
ret[k] = v
|
88
127
|
end
|
@@ -32,6 +32,9 @@ module Comet
|
|
32
32
|
# @type [Number] archive_format
|
33
33
|
attr_accessor :archive_format
|
34
34
|
|
35
|
+
# @type [Comet::Office365Credential] office_365credential
|
36
|
+
attr_accessor :office_365credential
|
37
|
+
|
35
38
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
36
39
|
attr_accessor :unknown_json_fields
|
37
40
|
|
@@ -44,6 +47,7 @@ module Comet
|
|
44
47
|
@dest_path = ''
|
45
48
|
@exact_dest_paths = []
|
46
49
|
@archive_format = 0
|
50
|
+
@office_365credential = Comet::Office365Credential.new
|
47
51
|
@unknown_json_fields = {}
|
48
52
|
end
|
49
53
|
|
@@ -87,6 +91,9 @@ module Comet
|
|
87
91
|
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
88
92
|
|
89
93
|
@archive_format = v
|
94
|
+
when 'Office365Credential'
|
95
|
+
@office_365credential = Comet::Office365Credential.new
|
96
|
+
@office_365credential.from_hash(v)
|
90
97
|
else
|
91
98
|
@unknown_json_fields[k] = v
|
92
99
|
end
|
@@ -102,6 +109,9 @@ module Comet
|
|
102
109
|
ret['DestPath'] = @dest_path
|
103
110
|
ret['ExactDestPaths'] = @exact_dest_paths
|
104
111
|
ret['ArchiveFormat'] = @archive_format
|
112
|
+
unless @office_365credential.nil?
|
113
|
+
ret['Office365Credential'] = @office_365credential
|
114
|
+
end
|
105
115
|
@unknown_json_fields.each do |k, v|
|
106
116
|
ret[k] = v
|
107
117
|
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# ServerMetaBrandingProperties is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class ServerMetaBrandingProperties
|
16
|
+
|
17
|
+
# @type [String] brand_name
|
18
|
+
attr_accessor :brand_name
|
19
|
+
|
20
|
+
# @type [String] product_name
|
21
|
+
attr_accessor :product_name
|
22
|
+
|
23
|
+
# @type [Boolean] has_image
|
24
|
+
attr_accessor :has_image
|
25
|
+
|
26
|
+
# @type [String] top_color
|
27
|
+
attr_accessor :top_color
|
28
|
+
|
29
|
+
# @type [Boolean] hide_news_area
|
30
|
+
attr_accessor :hide_news_area
|
31
|
+
|
32
|
+
# @type [Boolean] allow_unauthenticated_downloads
|
33
|
+
attr_accessor :allow_unauthenticated_downloads
|
34
|
+
|
35
|
+
# @type [Boolean] allow_authenticated_downloads
|
36
|
+
attr_accessor :allow_authenticated_downloads
|
37
|
+
|
38
|
+
# @type [Number] prune_logs_after_days
|
39
|
+
attr_accessor :prune_logs_after_days
|
40
|
+
|
41
|
+
# @type [Number] expired_in_seconds
|
42
|
+
attr_accessor :expired_in_seconds
|
43
|
+
|
44
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
45
|
+
attr_accessor :unknown_json_fields
|
46
|
+
|
47
|
+
def initialize
|
48
|
+
clear
|
49
|
+
end
|
50
|
+
|
51
|
+
def clear
|
52
|
+
@brand_name = ''
|
53
|
+
@product_name = ''
|
54
|
+
@top_color = ''
|
55
|
+
@prune_logs_after_days = 0
|
56
|
+
@expired_in_seconds = 0
|
57
|
+
@unknown_json_fields = {}
|
58
|
+
end
|
59
|
+
|
60
|
+
# @param [String] json_string The complete object in JSON format
|
61
|
+
def from_json(json_string)
|
62
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
63
|
+
|
64
|
+
from_hash(JSON.parse(json_string))
|
65
|
+
end
|
66
|
+
|
67
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
68
|
+
def from_hash(obj)
|
69
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
70
|
+
|
71
|
+
obj.each do |k, v|
|
72
|
+
case k
|
73
|
+
when 'BrandName'
|
74
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
75
|
+
|
76
|
+
@brand_name = v
|
77
|
+
when 'ProductName'
|
78
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
79
|
+
|
80
|
+
@product_name = v
|
81
|
+
when 'HasImage'
|
82
|
+
@has_image = v
|
83
|
+
when 'TopColor'
|
84
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
|
+
|
86
|
+
@top_color = v
|
87
|
+
when 'HideNewsArea'
|
88
|
+
@hide_news_area = v
|
89
|
+
when 'AllowUnauthenticatedDownloads'
|
90
|
+
@allow_unauthenticated_downloads = v
|
91
|
+
when 'AllowAuthenticatedDownloads'
|
92
|
+
@allow_authenticated_downloads = v
|
93
|
+
when 'PruneLogsAfterDays'
|
94
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
95
|
+
|
96
|
+
@prune_logs_after_days = v
|
97
|
+
when 'ExpiredInSeconds'
|
98
|
+
raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
|
99
|
+
|
100
|
+
@expired_in_seconds = v
|
101
|
+
else
|
102
|
+
@unknown_json_fields[k] = v
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# @return [Hash] The complete object as a Ruby hash
|
108
|
+
def to_hash
|
109
|
+
ret = {}
|
110
|
+
ret['BrandName'] = @brand_name
|
111
|
+
ret['ProductName'] = @product_name
|
112
|
+
ret['HasImage'] = @has_image
|
113
|
+
ret['TopColor'] = @top_color
|
114
|
+
ret['HideNewsArea'] = @hide_news_area
|
115
|
+
ret['AllowUnauthenticatedDownloads'] = @allow_unauthenticated_downloads
|
116
|
+
ret['AllowAuthenticatedDownloads'] = @allow_authenticated_downloads
|
117
|
+
ret['PruneLogsAfterDays'] = @prune_logs_after_days
|
118
|
+
ret['ExpiredInSeconds'] = @expired_in_seconds
|
119
|
+
@unknown_json_fields.each do |k, v|
|
120
|
+
ret[k] = v
|
121
|
+
end
|
122
|
+
ret
|
123
|
+
end
|
124
|
+
|
125
|
+
# @return [Hash] The complete object as a Ruby hash
|
126
|
+
def to_h
|
127
|
+
to_hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# @return [String] The complete object as a JSON string
|
131
|
+
def to_json(options = {})
|
132
|
+
to_hash.to_json(options)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
#!/usr/bin/env ruby --enable-frozen-string-literal
|
2
|
+
#
|
3
|
+
# Copyright (c) 2020-2021 Comet Licensing Ltd.
|
4
|
+
# Please see the LICENSE file for usage information.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: MIT
|
7
|
+
#
|
8
|
+
# frozen_string_literal: true
|
9
|
+
|
10
|
+
require 'json'
|
11
|
+
|
12
|
+
module Comet
|
13
|
+
|
14
|
+
# SourceIncludePattern is a typed class wrapper around the underlying Comet Server API data structure.
|
15
|
+
class SourceIncludePattern
|
16
|
+
|
17
|
+
# @type [String] top_directory
|
18
|
+
attr_accessor :top_directory
|
19
|
+
|
20
|
+
# @type [String] value
|
21
|
+
attr_accessor :value
|
22
|
+
|
23
|
+
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
24
|
+
attr_accessor :unknown_json_fields
|
25
|
+
|
26
|
+
def initialize
|
27
|
+
clear
|
28
|
+
end
|
29
|
+
|
30
|
+
def clear
|
31
|
+
@top_directory = ''
|
32
|
+
@value = ''
|
33
|
+
@unknown_json_fields = {}
|
34
|
+
end
|
35
|
+
|
36
|
+
# @param [String] json_string The complete object in JSON format
|
37
|
+
def from_json(json_string)
|
38
|
+
raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
|
39
|
+
|
40
|
+
from_hash(JSON.parse(json_string))
|
41
|
+
end
|
42
|
+
|
43
|
+
# @param [Hash] obj The complete object as a Ruby hash
|
44
|
+
def from_hash(obj)
|
45
|
+
raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
|
46
|
+
|
47
|
+
obj.each do |k, v|
|
48
|
+
case k
|
49
|
+
when 'TopDirectory'
|
50
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
51
|
+
|
52
|
+
@top_directory = v
|
53
|
+
when 'Value'
|
54
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
55
|
+
|
56
|
+
@value = v
|
57
|
+
else
|
58
|
+
@unknown_json_fields[k] = v
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# @return [Hash] The complete object as a Ruby hash
|
64
|
+
def to_hash
|
65
|
+
ret = {}
|
66
|
+
ret['TopDirectory'] = @top_directory
|
67
|
+
ret['Value'] = @value
|
68
|
+
@unknown_json_fields.each do |k, v|
|
69
|
+
ret[k] = v
|
70
|
+
end
|
71
|
+
ret
|
72
|
+
end
|
73
|
+
|
74
|
+
# @return [Hash] The complete object as a Ruby hash
|
75
|
+
def to_h
|
76
|
+
to_hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# @return [String] The complete object as a JSON string
|
80
|
+
def to_json(options = {})
|
81
|
+
to_hash.to_json(options)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -17,6 +17,9 @@ module Comet
|
|
17
17
|
# @type [Comet::BackupJobDetail] last_backup_job
|
18
18
|
attr_accessor :last_backup_job
|
19
19
|
|
20
|
+
# @type [Comet::BackupJobDetail] last_successful_backup_job
|
21
|
+
attr_accessor :last_successful_backup_job
|
22
|
+
|
20
23
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
21
24
|
attr_accessor :unknown_json_fields
|
22
25
|
|
@@ -26,6 +29,7 @@ module Comet
|
|
26
29
|
|
27
30
|
def clear
|
28
31
|
@last_backup_job = Comet::BackupJobDetail.new
|
32
|
+
@last_successful_backup_job = Comet::BackupJobDetail.new
|
29
33
|
@unknown_json_fields = {}
|
30
34
|
end
|
31
35
|
|
@@ -45,6 +49,9 @@ module Comet
|
|
45
49
|
when 'LastBackupJob'
|
46
50
|
@last_backup_job = Comet::BackupJobDetail.new
|
47
51
|
@last_backup_job.from_hash(v)
|
52
|
+
when 'LastSuccessfulBackupJob'
|
53
|
+
@last_successful_backup_job = Comet::BackupJobDetail.new
|
54
|
+
@last_successful_backup_job.from_hash(v)
|
48
55
|
else
|
49
56
|
@unknown_json_fields[k] = v
|
50
57
|
end
|
@@ -55,6 +62,7 @@ module Comet
|
|
55
62
|
def to_hash
|
56
63
|
ret = {}
|
57
64
|
ret['LastBackupJob'] = @last_backup_job
|
65
|
+
ret['LastSuccessfulBackupJob'] = @last_successful_backup_job
|
58
66
|
@unknown_json_fields.each do |k, v|
|
59
67
|
ret[k] = v
|
60
68
|
end
|
@@ -107,6 +107,9 @@ module Comet
|
|
107
107
|
# @type [Hash{String => Comet::BackupRuleConfig}] default_sources_backup_rules
|
108
108
|
attr_accessor :default_sources_backup_rules
|
109
109
|
|
110
|
+
# @type [Hash{String => Comet::DefaultSourceWithOSRestriction}] default_sources_with_osrestriction
|
111
|
+
attr_accessor :default_sources_with_osrestriction
|
112
|
+
|
110
113
|
# @type [Hash{String => Comet::BackupRuleConfig}] default_backup_rules
|
111
114
|
attr_accessor :default_backup_rules
|
112
115
|
|
@@ -129,6 +132,7 @@ module Comet
|
|
129
132
|
@default_storage_vault_retention = Comet::RetentionPolicy.new
|
130
133
|
@default_sources = {}
|
131
134
|
@default_sources_backup_rules = {}
|
135
|
+
@default_sources_with_osrestriction = {}
|
132
136
|
@default_backup_rules = {}
|
133
137
|
@unknown_json_fields = {}
|
134
138
|
end
|
@@ -244,6 +248,16 @@ module Comet
|
|
244
248
|
@default_sources_backup_rules[k1].from_hash(v1)
|
245
249
|
end
|
246
250
|
end
|
251
|
+
when 'DefaultSourcesWithOSRestriction'
|
252
|
+
@default_sources_with_osrestriction = {}
|
253
|
+
if v.nil?
|
254
|
+
@default_sources_with_osrestriction = {}
|
255
|
+
else
|
256
|
+
v.each do |k1, v1|
|
257
|
+
@default_sources_with_osrestriction[k1] = Comet::DefaultSourceWithOSRestriction.new
|
258
|
+
@default_sources_with_osrestriction[k1].from_hash(v1)
|
259
|
+
end
|
260
|
+
end
|
247
261
|
when 'DefaultBackupRules'
|
248
262
|
@default_backup_rules = {}
|
249
263
|
if v.nil?
|
@@ -304,6 +318,7 @@ module Comet
|
|
304
318
|
ret['PreventProtectedItemRetention'] = @prevent_protected_item_retention
|
305
319
|
ret['DefaultSources'] = @default_sources
|
306
320
|
ret['DefaultSourcesBackupRules'] = @default_sources_backup_rules
|
321
|
+
ret['DefaultSourcesWithOSRestriction'] = @default_sources_with_osrestriction
|
307
322
|
ret['DefaultBackupRules'] = @default_backup_rules
|
308
323
|
@unknown_json_fields.each do |k, v|
|
309
324
|
ret[k] = v
|
@@ -20,6 +20,9 @@ module Comet
|
|
20
20
|
# @type [Array<Number>] white_listed_event_types
|
21
21
|
attr_accessor :white_listed_event_types
|
22
22
|
|
23
|
+
# @type [Hash{String => String}] custom_headers
|
24
|
+
attr_accessor :custom_headers
|
25
|
+
|
23
26
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
24
27
|
attr_accessor :unknown_json_fields
|
25
28
|
|
@@ -30,6 +33,7 @@ module Comet
|
|
30
33
|
def clear
|
31
34
|
@url = ''
|
32
35
|
@white_listed_event_types = []
|
36
|
+
@custom_headers = {}
|
33
37
|
@unknown_json_fields = {}
|
34
38
|
end
|
35
39
|
|
@@ -61,6 +65,17 @@ module Comet
|
|
61
65
|
@white_listed_event_types[i1] = v1
|
62
66
|
end
|
63
67
|
end
|
68
|
+
when 'CustomHeaders'
|
69
|
+
@custom_headers = {}
|
70
|
+
if v.nil?
|
71
|
+
@custom_headers = {}
|
72
|
+
else
|
73
|
+
v.each do |k1, v1|
|
74
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
75
|
+
|
76
|
+
@custom_headers[k1] = v1
|
77
|
+
end
|
78
|
+
end
|
64
79
|
else
|
65
80
|
@unknown_json_fields[k] = v
|
66
81
|
end
|
@@ -72,6 +87,7 @@ module Comet
|
|
72
87
|
ret = {}
|
73
88
|
ret['URL'] = @url
|
74
89
|
ret['WhiteListedEventTypes'] = @white_listed_event_types
|
90
|
+
ret['CustomHeaders'] = @custom_headers
|
75
91
|
@unknown_json_fields.each do |k, v|
|
76
92
|
ret[k] = v
|
77
93
|
end
|
@@ -48,6 +48,7 @@ require_relative 'comet/models/content_measurement_component'
|
|
48
48
|
require_relative 'comet/models/create_group_policy_response'
|
49
49
|
require_relative 'comet/models/custom_remote_bucket_settings'
|
50
50
|
require_relative 'comet/models/default_email_report_policy'
|
51
|
+
require_relative 'comet/models/default_source_with_osrestriction'
|
51
52
|
require_relative 'comet/models/destination_config'
|
52
53
|
require_relative 'comet/models/destination_location'
|
53
54
|
require_relative 'comet/models/destination_statistics'
|
@@ -106,6 +107,7 @@ require_relative 'comet/models/search_clause'
|
|
106
107
|
require_relative 'comet/models/self_backup_statistics'
|
107
108
|
require_relative 'comet/models/server_config_options_branding_fragment'
|
108
109
|
require_relative 'comet/models/server_config_options_software_build_role_fragment'
|
110
|
+
require_relative 'comet/models/server_meta_branding_properties'
|
109
111
|
require_relative 'comet/models/server_meta_version_info'
|
110
112
|
require_relative 'comet/models/session_key_regenerated_response'
|
111
113
|
require_relative 'comet/models/sftpdestination_location'
|
@@ -114,6 +116,7 @@ require_relative 'comet/models/software_build_role_options'
|
|
114
116
|
require_relative 'comet/models/software_update_news_response'
|
115
117
|
require_relative 'comet/models/source_basic_info'
|
116
118
|
require_relative 'comet/models/source_config'
|
119
|
+
require_relative 'comet/models/source_include_pattern'
|
117
120
|
require_relative 'comet/models/source_statistics'
|
118
121
|
require_relative 'comet/models/spanned_destination_location'
|
119
122
|
require_relative 'comet/models/spanned_storage_extra_info'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comet_backup_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Comet Licensing Ltd.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- README.md
|
82
82
|
- RELEASING.md
|
83
83
|
- Rakefile
|
84
|
+
- comet_backup_ruby_sdk-1.8.0.gem
|
84
85
|
- comet_backup_ruby_sdk.gemspec
|
85
86
|
- lib/comet/api_response_error.rb
|
86
87
|
- lib/comet/comet_server.rb
|
@@ -123,6 +124,7 @@ files:
|
|
123
124
|
- lib/comet/models/create_group_policy_response.rb
|
124
125
|
- lib/comet/models/custom_remote_bucket_settings.rb
|
125
126
|
- lib/comet/models/default_email_report_policy.rb
|
127
|
+
- lib/comet/models/default_source_with_osrestriction.rb
|
126
128
|
- lib/comet/models/destination_config.rb
|
127
129
|
- lib/comet/models/destination_location.rb
|
128
130
|
- lib/comet/models/destination_statistics.rb
|
@@ -131,6 +133,7 @@ files:
|
|
131
133
|
- lib/comet/models/dispatcher_admin_sources_response.rb
|
132
134
|
- lib/comet/models/dispatcher_stored_objects_response.rb
|
133
135
|
- lib/comet/models/dispatcher_vault_snapshots_response.rb
|
136
|
+
- lib/comet/models/dispatcher_windisk_snapshot_response.rb
|
134
137
|
- lib/comet/models/edbfile_info.rb
|
135
138
|
- lib/comet/models/email_options.rb
|
136
139
|
- lib/comet/models/email_report_config.rb
|
@@ -181,6 +184,7 @@ files:
|
|
181
184
|
- lib/comet/models/self_backup_statistics.rb
|
182
185
|
- lib/comet/models/server_config_options_branding_fragment.rb
|
183
186
|
- lib/comet/models/server_config_options_software_build_role_fragment.rb
|
187
|
+
- lib/comet/models/server_meta_branding_properties.rb
|
184
188
|
- lib/comet/models/server_meta_version_info.rb
|
185
189
|
- lib/comet/models/session_key_regenerated_response.rb
|
186
190
|
- lib/comet/models/sftpdestination_location.rb
|
@@ -189,6 +193,7 @@ files:
|
|
189
193
|
- lib/comet/models/software_update_news_response.rb
|
190
194
|
- lib/comet/models/source_basic_info.rb
|
191
195
|
- lib/comet/models/source_config.rb
|
196
|
+
- lib/comet/models/source_include_pattern.rb
|
192
197
|
- lib/comet/models/source_statistics.rb
|
193
198
|
- lib/comet/models/spanned_destination_location.rb
|
194
199
|
- lib/comet/models/spanned_storage_extra_info.rb
|
@@ -245,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
250
|
- !ruby/object:Gem::Version
|
246
251
|
version: '0'
|
247
252
|
requirements: []
|
248
|
-
rubygems_version: 3.
|
253
|
+
rubygems_version: 3.1.6
|
249
254
|
signing_key:
|
250
255
|
specification_version: 4
|
251
256
|
summary: Comet Backup - Comet Server API SDK
|