comet_backup_ruby_sdk 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/RELEASING.md +5 -3
- data/comet_backup_ruby_sdk.gemspec +1 -1
- data/lib/comet/api_response_error.rb +0 -0
- data/lib/comet/comet_server.rb +0 -0
- data/lib/comet/definitions.rb +5 -2
- data/lib/comet/models/add_bucket_response_message.rb +0 -0
- data/lib/comet/models/admin_account_properties_response.rb +0 -0
- data/lib/comet/models/admin_email_options.rb +0 -0
- data/lib/comet/models/admin_resource_response.rb +0 -0
- data/lib/comet/models/admin_security_options.rb +0 -0
- data/lib/comet/models/admin_u2fregistration.rb +0 -0
- data/lib/comet/models/admin_user_permissions.rb +0 -0
- data/lib/comet/models/available_download.rb +0 -0
- data/lib/comet/models/azure_destination_location.rb +0 -0
- data/lib/comet/models/b2destination_location.rb +0 -0
- data/lib/comet/models/b2storage_extra_info.rb +0 -0
- data/lib/comet/models/b2transaction_totals.rb +0 -0
- data/lib/comet/models/b2virtual_storage_role_settings.rb +0 -0
- data/lib/comet/models/backup_job_advanced_options.rb +0 -0
- data/lib/comet/models/backup_job_detail.rb +0 -0
- data/lib/comet/models/backup_job_progress.rb +0 -0
- data/lib/comet/models/backup_rule_config.rb +0 -0
- data/lib/comet/models/backup_rule_event_triggers.rb +0 -0
- data/lib/comet/models/branding_options.rb +0 -0
- data/lib/comet/models/branding_properties.rb +0 -0
- data/lib/comet/models/browse_disk_drives_response.rb +0 -0
- data/lib/comet/models/browse_edbresponse.rb +0 -0
- data/lib/comet/models/browse_hvresponse.rb +0 -0
- data/lib/comet/models/browse_office_365objects_response.rb +0 -0
- data/lib/comet/models/browse_sqlserver_response.rb +0 -0
- data/lib/comet/models/browse_vssresponse.rb +0 -0
- data/lib/comet/models/bucket_properties.rb +0 -0
- data/lib/comet/models/bucket_usage_info.rb +0 -0
- data/lib/comet/models/comet_apiresponse_message.rb +0 -0
- data/lib/comet/models/comet_destination_location.rb +0 -0
- data/lib/comet/models/constellation_check_report.rb +0 -0
- data/lib/comet/models/constellation_stats.rb +0 -0
- data/lib/comet/models/constellation_status_apiresponse.rb +0 -0
- data/lib/comet/models/content_measurement.rb +0 -0
- data/lib/comet/models/content_measurement_component.rb +0 -0
- data/lib/comet/models/create_group_policy_response.rb +0 -0
- data/lib/comet/models/custom_remote_bucket_settings.rb +0 -0
- data/lib/comet/models/default_email_report_policy.rb +0 -0
- data/lib/comet/models/default_source_with_osrestriction.rb +83 -0
- data/lib/comet/models/destination_config.rb +0 -0
- data/lib/comet/models/destination_location.rb +0 -0
- data/lib/comet/models/destination_statistics.rb +0 -0
- data/lib/comet/models/device_config.rb +0 -0
- data/lib/comet/models/disk_drive.rb +0 -0
- data/lib/comet/models/dispatcher_admin_sources_response.rb +0 -0
- data/lib/comet/models/dispatcher_stored_objects_response.rb +0 -0
- data/lib/comet/models/dispatcher_vault_snapshots_response.rb +0 -0
- data/lib/comet/models/edbfile_info.rb +0 -0
- data/lib/comet/models/email_options.rb +0 -0
- data/lib/comet/models/email_report_config.rb +0 -0
- data/lib/comet/models/email_report_generated_preview.rb +0 -0
- data/lib/comet/models/external_ldapauthentication_source_settings.rb +0 -0
- data/lib/comet/models/extra_file_exclusion.rb +0 -0
- data/lib/comet/models/ftpdestination_location.rb +0 -0
- data/lib/comet/models/get_group_policy_response.rb +0 -0
- data/lib/comet/models/get_profile_and_hash_response_message.rb +0 -0
- data/lib/comet/models/get_profile_hash_response_message.rb +0 -0
- data/lib/comet/models/group_policy.rb +0 -0
- data/lib/comet/models/hyper_vmachine_info.rb +0 -0
- data/lib/comet/models/install_creds.rb +0 -0
- data/lib/comet/models/install_token.rb +0 -0
- data/lib/comet/models/install_token_response.rb +0 -0
- data/lib/comet/models/job_entry.rb +0 -0
- data/lib/comet/models/live_user_connection.rb +0 -0
- data/lib/comet/models/local_destination_location.rb +0 -0
- data/lib/comet/models/mac_oscode_sign_properties.rb +0 -0
- data/lib/comet/models/mongo_dbconnection.rb +0 -0
- data/lib/comet/models/mssqlconnection.rb +0 -0
- data/lib/comet/models/my_sqlconnection.rb +0 -0
- data/lib/comet/models/new_bucket_detail.rb +0 -0
- data/lib/comet/models/news_entry.rb +0 -0
- data/lib/comet/models/office_365connection.rb +0 -0
- data/lib/comet/models/office_365credential.rb +0 -0
- data/lib/comet/models/office_365custom_setting.rb +0 -0
- data/lib/comet/models/office_365object_info.rb +0 -0
- data/lib/comet/models/organization.rb +0 -0
- data/lib/comet/models/organization_response.rb +0 -0
- data/lib/comet/models/osinfo.rb +0 -0
- data/lib/comet/models/partition.rb +0 -0
- data/lib/comet/models/private_branding_properties.rb +0 -0
- data/lib/comet/models/protected_item_engine_type_policy.rb +0 -0
- data/lib/comet/models/public_branding_properties.rb +0 -0
- data/lib/comet/models/register_office_application_begin_response.rb +0 -0
- data/lib/comet/models/register_office_application_check_response.rb +0 -0
- data/lib/comet/models/remote_server_address.rb +0 -0
- data/lib/comet/models/remote_storage_option.rb +0 -0
- data/lib/comet/models/replicator_state_apiresponse.rb +0 -0
- data/lib/comet/models/request_storage_vault_response_message.rb +0 -0
- data/lib/comet/models/restore_job_advanced_options.rb +10 -0
- data/lib/comet/models/retention_policy.rb +0 -0
- data/lib/comet/models/retention_range.rb +0 -0
- data/lib/comet/models/s3destination_location.rb +0 -0
- data/lib/comet/models/schedule_config.rb +0 -0
- data/lib/comet/models/search_clause.rb +0 -0
- data/lib/comet/models/self_backup_statistics.rb +0 -0
- data/lib/comet/models/server_config_options_branding_fragment.rb +0 -0
- data/lib/comet/models/server_config_options_software_build_role_fragment.rb +0 -0
- data/lib/comet/models/server_meta_branding_properties.rb +135 -0
- data/lib/comet/models/server_meta_version_info.rb +0 -0
- data/lib/comet/models/session_key_regenerated_response.rb +0 -0
- data/lib/comet/models/sftpdestination_location.rb +0 -0
- data/lib/comet/models/size_measurement.rb +0 -0
- data/lib/comet/models/software_build_role_options.rb +0 -0
- data/lib/comet/models/software_update_news_response.rb +0 -0
- data/lib/comet/models/source_basic_info.rb +0 -0
- data/lib/comet/models/source_config.rb +0 -0
- data/lib/comet/models/source_include_pattern.rb +84 -0
- data/lib/comet/models/source_statistics.rb +8 -0
- data/lib/comet/models/spanned_destination_location.rb +0 -0
- data/lib/comet/models/spanned_storage_extra_info.rb +0 -0
- data/lib/comet/models/sshconnection.rb +0 -0
- data/lib/comet/models/stat_result.rb +0 -0
- data/lib/comet/models/storage_free_space_info.rb +0 -0
- data/lib/comet/models/storage_vault_provider_policy.rb +0 -0
- data/lib/comet/models/stored_object.rb +0 -0
- data/lib/comet/models/streamable_event.rb +0 -0
- data/lib/comet/models/swift_destination_location.rb +0 -0
- data/lib/comet/models/test_response.rb +0 -0
- data/lib/comet/models/totp_regenerated_response.rb +0 -0
- data/lib/comet/models/u2fregister_request.rb +0 -0
- data/lib/comet/models/u2fregistered_key.rb +0 -0
- data/lib/comet/models/u2fregistration_challenge_response.rb +0 -0
- data/lib/comet/models/u2fsign_request.rb +0 -0
- data/lib/comet/models/u2fsign_response.rb +0 -0
- data/lib/comet/models/uninstall_config.rb +0 -0
- data/lib/comet/models/update_campaign_device_status.rb +0 -0
- data/lib/comet/models/update_campaign_options.rb +0 -0
- data/lib/comet/models/update_campaign_properties.rb +0 -0
- data/lib/comet/models/update_campaign_status.rb +0 -0
- data/lib/comet/models/update_campaign_status_device_entry.rb +0 -0
- data/lib/comet/models/user_custom_email_settings.rb +0 -0
- data/lib/comet/models/user_on_server.rb +0 -0
- data/lib/comet/models/user_policy.rb +15 -0
- data/lib/comet/models/user_profile_config.rb +0 -0
- data/lib/comet/models/user_profile_fragment.rb +0 -0
- data/lib/comet/models/vault_snapshot.rb +0 -0
- data/lib/comet/models/vsscomponent.rb +0 -0
- data/lib/comet/models/vsswriter_info.rb +0 -0
- data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +0 -0
- data/lib/comet/models/web_interface_branding_properties.rb +0 -0
- data/lib/comet/models/webhook_option.rb +0 -0
- data/lib/comet/models/win_smbauth.rb +0 -0
- data/lib/comet/models/windows_code_sign_properties.rb +0 -0
- data/lib/comet_backup_ruby_sdk.rb +3 -0
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7343bc96e2ac87ca1b4ff694fbe25e01c6cca99b8dfe6da063050ab3c462530
|
4
|
+
data.tar.gz: ce7ea45a2480321db18a7bc3758d742464810d8feb1c6e2a652df13365404c92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 420c4b3892475409d56b1cc64a6a90e9d06ad8dcc4ad7ec3550ad0b861a5ad14807b0f21f4c4bfa542ff010b6beb833a91e627195c8ba215badc7528f7861072
|
7
|
+
data.tar.gz: 19ff57505c136f8d4150987cdd05c7d2133f7541c30256b579b46d83ae373847ea6a1af86c5b2cf2f0f61d672eeb3cff806bd0795d1d27762375df13b371a5f4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2021-07-01 v1.6.0
|
4
|
+
- Based on Comet 21.6.6
|
5
|
+
- Support new `DefaultSourceWithOSRestriction` and `LastSuccessfulBackupJob` fields
|
6
|
+
- Support custom credentials when performing a cloud Office 365 restore job
|
7
|
+
- Support identifying Microsoft Teams folders inside a Sharepoint backup job
|
8
|
+
- Document the `SourceIncludePattern` structure used for `PINCLUDE`/`RINCLUDE` rules in a File-type `EngineProps` array
|
9
|
+
- Document existing `BrandingProps` endpoint
|
10
|
+
|
3
11
|
## 2021-05-25 v1.5.0
|
4
12
|
- Based on Comet 21.6.1
|
5
13
|
- Add new APIs to remotely browse MySQL, MongoDB, MSSQL database servers
|
data/Gemfile.lock
CHANGED
data/RELEASING.md
CHANGED
@@ -2,9 +2,11 @@
|
|
2
2
|
|
3
3
|
1. All tests passing
|
4
4
|
2. Update changelog in `CHANGELOG.md`
|
5
|
-
3. Update version number in `gemspec`
|
6
|
-
4. `
|
5
|
+
3. Update version number in `comet_backup_ruby_sdk.gemspec`
|
6
|
+
4. `bundle install`
|
7
|
+
- Should update our internal version in Gemfile.lock
|
8
|
+
4. `gem build comet_backup_ruby_sdk.gemspec`
|
7
9
|
- Should be warning-free
|
8
10
|
5. Git tag
|
9
11
|
- Respect semver
|
10
|
-
6. `gem push comet_backup_ruby_sdk-
|
12
|
+
6. `gem push comet_backup_ruby_sdk-1.x.x.gem`
|
@@ -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.6.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
File without changes
|
data/lib/comet/comet_server.rb
CHANGED
File without changes
|
data/lib/comet/definitions.rb
CHANGED
@@ -353,6 +353,9 @@ module Comet
|
|
353
353
|
# StoredObjectType:
|
354
354
|
STOREDOBJECTTYPE_MSSITE = 'mssite'
|
355
355
|
|
356
|
+
# StoredObjectType:
|
357
|
+
STOREDOBJECTTYPE_MSSITE_TEAM = 'mssiteteam'
|
358
|
+
|
356
359
|
# StoredObjectType:
|
357
360
|
STOREDOBJECTTYPE_MSSITELISTENTITY = 'mssitelistentity'
|
358
361
|
|
@@ -397,13 +400,13 @@ module Comet
|
|
397
400
|
|
398
401
|
DEFAULT_TIMEZONE = 'UTC'
|
399
402
|
|
400
|
-
APPLICATION_VERSION = '21.6.
|
403
|
+
APPLICATION_VERSION = '21.6.6'
|
401
404
|
|
402
405
|
APPLICATION_VERSION_MAJOR = 21
|
403
406
|
|
404
407
|
APPLICATION_VERSION_MINOR = 6
|
405
408
|
|
406
|
-
APPLICATION_VERSION_REVISION =
|
409
|
+
APPLICATION_VERSION_REVISION = 6
|
407
410
|
|
408
411
|
RELEASE_CODENAME = 'Voyager'
|
409
412
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/comet/models/osinfo.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -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.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Comet Licensing Ltd.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- lib/comet/models/create_group_policy_response.rb
|
124
124
|
- lib/comet/models/custom_remote_bucket_settings.rb
|
125
125
|
- lib/comet/models/default_email_report_policy.rb
|
126
|
+
- lib/comet/models/default_source_with_osrestriction.rb
|
126
127
|
- lib/comet/models/destination_config.rb
|
127
128
|
- lib/comet/models/destination_location.rb
|
128
129
|
- lib/comet/models/destination_statistics.rb
|
@@ -181,6 +182,7 @@ files:
|
|
181
182
|
- lib/comet/models/self_backup_statistics.rb
|
182
183
|
- lib/comet/models/server_config_options_branding_fragment.rb
|
183
184
|
- lib/comet/models/server_config_options_software_build_role_fragment.rb
|
185
|
+
- lib/comet/models/server_meta_branding_properties.rb
|
184
186
|
- lib/comet/models/server_meta_version_info.rb
|
185
187
|
- lib/comet/models/session_key_regenerated_response.rb
|
186
188
|
- lib/comet/models/sftpdestination_location.rb
|
@@ -189,6 +191,7 @@ files:
|
|
189
191
|
- lib/comet/models/software_update_news_response.rb
|
190
192
|
- lib/comet/models/source_basic_info.rb
|
191
193
|
- lib/comet/models/source_config.rb
|
194
|
+
- lib/comet/models/source_include_pattern.rb
|
192
195
|
- lib/comet/models/source_statistics.rb
|
193
196
|
- lib/comet/models/spanned_destination_location.rb
|
194
197
|
- lib/comet/models/spanned_storage_extra_info.rb
|
@@ -230,7 +233,7 @@ homepage: https://github.com/CometBackup/comet-ruby-sdk
|
|
230
233
|
licenses:
|
231
234
|
- MIT
|
232
235
|
metadata: {}
|
233
|
-
post_install_message:
|
236
|
+
post_install_message:
|
234
237
|
rdoc_options: []
|
235
238
|
require_paths:
|
236
239
|
- lib
|
@@ -246,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
249
|
version: '0'
|
247
250
|
requirements: []
|
248
251
|
rubygems_version: 3.0.3
|
249
|
-
signing_key:
|
252
|
+
signing_key:
|
250
253
|
specification_version: 4
|
251
254
|
summary: Comet Backup - Comet Server API SDK
|
252
255
|
test_files: []
|