comet_backup_ruby_sdk 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb469739454eaf437ffee559876cecf0d66df9369b6cc9b30ed332c3177146e7
4
- data.tar.gz: d0ad562130ff6906065b2f2cbf078049619c4720af042f04ccdb28d2d5ba8a8d
3
+ metadata.gz: 3faaa84e0d62d76bb3669935d01f4409c80a28a479c39cc5b60e8fe87b33494f
4
+ data.tar.gz: 0a67b796036d8880111aa4f10aa832f3994d268257d90d58603bc881b338c8b0
5
5
  SHA512:
6
- metadata.gz: 50d4d0d017789a30d8005bba2746726ae8d1886c50124f7450ecfe0da23802fcdf649b2c379ad384a05896d1ab3d7f9e212d23495591083084e04b287314bd45
7
- data.tar.gz: 6990c29cd57bee70c858f56f11404a785c18bb66b6f0ab809f307566e1fe300a8c865faf2ddd26a648d1a18c3cff4471a585348ad43d06a603b1d59cf2ffa6f9
6
+ metadata.gz: 2ac65df6ad2859aec9c90dffe1704bf8f8ac940e2f519fd3155169c9b6955f8b1c801ffea812428ab149604303f16b6b5a03bf5a0cd1fb8b7854e32d12143146
7
+ data.tar.gz: 108be0c78b2cf0be1d9ea54646993d34124aa7e7c21ffad2054d4eb35555a0d3f505f3a42aefda4596c5358d9cbc609c31c77d7a49fa7d6da4aae94d9d986830
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2020-08-28 v0.4.0
4
+ - Feature: Add definitions B2 and Wasabi `VirtualStorageRole` classes
5
+ - Feature: Add definitions for remote LDAP authentication data sources
6
+ - Fix an issue with floating point constant initializers
7
+
3
8
  ## 2020-08-24 v0.3.1
4
9
  - Fix an issue with version number in gem packaging
5
10
  - Fix an issue with `.clear` initializers for numeric types
@@ -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 = '0.3.1'
15
+ spec.version = '0.4.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -517,6 +517,12 @@ module Comet
517
517
  # RemoteServerType:
518
518
  REMOTESERVER_WASABI = 'wasabi'
519
519
 
520
+ LDAPSECURITYMETHOD_PLAIN = 'plain'
521
+
522
+ LDAPSECURITYMETHOD_LDAPS = 'ldaps'
523
+
524
+ LDAPSECURITYMETHOD_STARTTLS = 'starttls'
525
+
520
526
  # MacOSCodesignLevel:
521
527
  MACOSCODESIGN_LEVEL_SIGN = 0
522
528
 
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env ruby --enable-frozen-string-literal
2
+ #
3
+ # Copyright (c) 2020-2020 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
+ # B2VirtualStorageRoleSettings is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class B2VirtualStorageRoleSettings
16
+
17
+ # @type [String] master_bucket
18
+ attr_accessor :master_bucket
19
+
20
+ # @type [String] key_id
21
+ attr_accessor :key_id
22
+
23
+ # @type [String] app_key
24
+ attr_accessor :app_key
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
+ @master_bucket = ''
35
+ @key_id = ''
36
+ @app_key = ''
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 'MasterBucket'
54
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
55
+
56
+ @master_bucket = v
57
+ when 'KeyID'
58
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
59
+
60
+ @key_id = v
61
+ when 'AppKey'
62
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
63
+
64
+ @app_key = v
65
+ else
66
+ @unknown_json_fields[k] = v
67
+ end
68
+ end
69
+ end
70
+
71
+ # @return [Hash] The complete object as a Ruby hash
72
+ def to_hash
73
+ ret = {}
74
+ ret['MasterBucket'] = @master_bucket
75
+ ret['KeyID'] = @key_id
76
+ ret['AppKey'] = @app_key
77
+ @unknown_json_fields.each do |k, v|
78
+ ret[k] = v
79
+ end
80
+ ret
81
+ end
82
+
83
+ # @return [Hash] The complete object as a Ruby hash
84
+ def to_h
85
+ to_hash
86
+ end
87
+
88
+ # @return [String] The complete object as a JSON string
89
+ def to_json(options = {})
90
+ to_hash.to_json(options)
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,102 @@
1
+ #!/usr/bin/env ruby --enable-frozen-string-literal
2
+ #
3
+ # Copyright (c) 2020-2020 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
+ # ExternalLDAPAuthenticationSourceSettings is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class ExternalLDAPAuthenticationSourceSettings
16
+
17
+ # @type [String] hostname
18
+ attr_accessor :hostname
19
+
20
+ # @type [Number] port
21
+ attr_accessor :port
22
+
23
+ # @type [String] security_method
24
+ attr_accessor :security_method
25
+
26
+ # @type [String] bind_user
27
+ attr_accessor :bind_user
28
+
29
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
30
+ attr_accessor :unknown_json_fields
31
+
32
+ def initialize
33
+ clear
34
+ end
35
+
36
+ def clear
37
+ @hostname = ''
38
+ @port = 0
39
+ @security_method = ''
40
+ @bind_user = ''
41
+ @unknown_json_fields = {}
42
+ end
43
+
44
+ # @param [String] json_string The complete object in JSON format
45
+ def from_json(json_string)
46
+ raise TypeError "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
47
+
48
+ from_hash(JSON.parse(json_string))
49
+ end
50
+
51
+ # @param [Hash] obj The complete object as a Ruby hash
52
+ def from_hash(obj)
53
+ raise TypeError "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
54
+
55
+ obj.each do |k, v|
56
+ case k
57
+ when 'Hostname'
58
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
59
+
60
+ @hostname = v
61
+ when 'Port'
62
+ raise TypeError "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
63
+
64
+ @port = v
65
+ when 'SecurityMethod'
66
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
67
+
68
+ @security_method = v
69
+ when 'BindUser'
70
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
71
+
72
+ @bind_user = v
73
+ else
74
+ @unknown_json_fields[k] = v
75
+ end
76
+ end
77
+ end
78
+
79
+ # @return [Hash] The complete object as a Ruby hash
80
+ def to_hash
81
+ ret = {}
82
+ ret['Hostname'] = @hostname
83
+ ret['Port'] = @port
84
+ ret['SecurityMethod'] = @security_method
85
+ ret['BindUser'] = @bind_user
86
+ @unknown_json_fields.each do |k, v|
87
+ ret[k] = v
88
+ end
89
+ ret
90
+ end
91
+
92
+ # @return [Hash] The complete object as a Ruby hash
93
+ def to_h
94
+ to_hash
95
+ end
96
+
97
+ # @return [String] The complete object as a JSON string
98
+ def to_json(options = {})
99
+ to_hash.to_json(options)
100
+ end
101
+ end
102
+ end
@@ -37,7 +37,7 @@ module Comet
37
37
  end
38
38
 
39
39
  def clear
40
- @used_percent = 0
40
+ @used_percent = 0.0
41
41
  @available_bytes = 0
42
42
  @spanned = Comet::SpannedStorageExtraInfo.new
43
43
  @b2 = Comet::B2StorageExtraInfo.new
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env ruby --enable-frozen-string-literal
2
+ #
3
+ # Copyright (c) 2020-2020 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
+ # WasabiVirtualStorageRoleSettings is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class WasabiVirtualStorageRoleSettings
16
+
17
+ # @type [String] master_bucket
18
+ attr_accessor :master_bucket
19
+
20
+ # @type [String] access_key
21
+ attr_accessor :access_key
22
+
23
+ # @type [String] secret_key
24
+ attr_accessor :secret_key
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
+ @master_bucket = ''
35
+ @access_key = ''
36
+ @secret_key = ''
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 'MasterBucket'
54
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
55
+
56
+ @master_bucket = v
57
+ when 'AccessKey'
58
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
59
+
60
+ @access_key = v
61
+ when 'SecretKey'
62
+ raise TypeError "'v' expected String, got #{v.class}" unless v.is_a? String
63
+
64
+ @secret_key = v
65
+ else
66
+ @unknown_json_fields[k] = v
67
+ end
68
+ end
69
+ end
70
+
71
+ # @return [Hash] The complete object as a Ruby hash
72
+ def to_hash
73
+ ret = {}
74
+ ret['MasterBucket'] = @master_bucket
75
+ ret['AccessKey'] = @access_key
76
+ ret['SecretKey'] = @secret_key
77
+ @unknown_json_fields.each do |k, v|
78
+ ret[k] = v
79
+ end
80
+ ret
81
+ end
82
+
83
+ # @return [Hash] The complete object as a Ruby hash
84
+ def to_h
85
+ to_hash
86
+ end
87
+
88
+ # @return [String] The complete object as a JSON string
89
+ def to_json(options = {})
90
+ to_hash.to_json(options)
91
+ end
92
+ end
93
+ end
@@ -21,6 +21,7 @@ require_relative 'comet/models/azure_destination_location'
21
21
  require_relative 'comet/models/b2destination_location'
22
22
  require_relative 'comet/models/b2storage_extra_info'
23
23
  require_relative 'comet/models/b2transaction_totals'
24
+ require_relative 'comet/models/b2virtual_storage_role_settings'
24
25
  require_relative 'comet/models/backup_job_advanced_options'
25
26
  require_relative 'comet/models/backup_job_detail'
26
27
  require_relative 'comet/models/backup_job_progress'
@@ -55,6 +56,7 @@ require_relative 'comet/models/edbfile_info'
55
56
  require_relative 'comet/models/email_options'
56
57
  require_relative 'comet/models/email_report_config'
57
58
  require_relative 'comet/models/email_report_generated_preview'
59
+ require_relative 'comet/models/external_ldapauthentication_source_settings'
58
60
  require_relative 'comet/models/extra_file_exclusion'
59
61
  require_relative 'comet/models/ftpdestination_location'
60
62
  require_relative 'comet/models/get_group_policy_response'
@@ -125,6 +127,7 @@ require_relative 'comet/models/user_profile_fragment'
125
127
  require_relative 'comet/models/vault_snapshot'
126
128
  require_relative 'comet/models/vsscomponent'
127
129
  require_relative 'comet/models/vsswriter_info'
130
+ require_relative 'comet/models/wasabi_virtual_storage_role_settings'
128
131
  require_relative 'comet/models/web_interface_branding_properties'
129
132
  require_relative 'comet/models/webhook_option'
130
133
  require_relative 'comet/models/win_smbauth'
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: 0.3.1
4
+ version: 0.4.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: 2020-08-23 00:00:00.000000000 Z
11
+ date: 2020-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -96,6 +96,7 @@ files:
96
96
  - lib/comet/models/b2destination_location.rb
97
97
  - lib/comet/models/b2storage_extra_info.rb
98
98
  - lib/comet/models/b2transaction_totals.rb
99
+ - lib/comet/models/b2virtual_storage_role_settings.rb
99
100
  - lib/comet/models/backup_job_advanced_options.rb
100
101
  - lib/comet/models/backup_job_detail.rb
101
102
  - lib/comet/models/backup_job_progress.rb
@@ -130,6 +131,7 @@ files:
130
131
  - lib/comet/models/email_options.rb
131
132
  - lib/comet/models/email_report_config.rb
132
133
  - lib/comet/models/email_report_generated_preview.rb
134
+ - lib/comet/models/external_ldapauthentication_source_settings.rb
133
135
  - lib/comet/models/extra_file_exclusion.rb
134
136
  - lib/comet/models/ftpdestination_location.rb
135
137
  - lib/comet/models/get_group_policy_response.rb
@@ -200,6 +202,7 @@ files:
200
202
  - lib/comet/models/vault_snapshot.rb
201
203
  - lib/comet/models/vsscomponent.rb
202
204
  - lib/comet/models/vsswriter_info.rb
205
+ - lib/comet/models/wasabi_virtual_storage_role_settings.rb
203
206
  - lib/comet/models/web_interface_branding_properties.rb
204
207
  - lib/comet/models/webhook_option.rb
205
208
  - lib/comet/models/win_smbauth.rb