comet_backup_ruby_sdk 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,100 @@
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
+ # RegisterOfficeApplicationCheckResponse is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class RegisterOfficeApplicationCheckResponse
16
+
17
+ # @type [String] continuation
18
+ attr_accessor :continuation
19
+
20
+ # @type [Boolean] completed
21
+ attr_accessor :completed
22
+
23
+ # @type [String] error
24
+ attr_accessor :error
25
+
26
+ # @type [Comet::Office365Credential] result
27
+ attr_accessor :result
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
+ @continuation = ''
38
+ @error = ''
39
+ @result = Comet::Office365Credential.new
40
+ @unknown_json_fields = {}
41
+ end
42
+
43
+ # @param [String] json_string The complete object in JSON format
44
+ def from_json(json_string)
45
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
46
+
47
+ from_hash(JSON.parse(json_string))
48
+ end
49
+
50
+ # @param [Hash] obj The complete object as a Ruby hash
51
+ def from_hash(obj)
52
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
53
+
54
+ obj.each do |k, v|
55
+ case k
56
+ when 'Continuation'
57
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
58
+
59
+ @continuation = v
60
+ when 'Completed'
61
+ @completed = v
62
+ when 'Error'
63
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
64
+
65
+ @error = v
66
+ when 'Result'
67
+ @result = Comet::Office365Credential.new
68
+ @result.from_hash(v)
69
+ else
70
+ @unknown_json_fields[k] = v
71
+ end
72
+ end
73
+ end
74
+
75
+ # @return [Hash] The complete object as a Ruby hash
76
+ def to_hash
77
+ ret = {}
78
+ ret['Continuation'] = @continuation
79
+ ret['Completed'] = @completed
80
+ ret['Error'] = @error
81
+ unless @result.nil?
82
+ ret['Result'] = @result
83
+ end
84
+ @unknown_json_fields.each do |k, v|
85
+ ret[k] = v
86
+ end
87
+ ret
88
+ end
89
+
90
+ # @return [Hash] The complete object as a Ruby hash
91
+ def to_h
92
+ to_hash
93
+ end
94
+
95
+ # @return [String] The complete object as a JSON string
96
+ def to_json(options = {})
97
+ to_hash.to_json(options)
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,108 @@
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
+ # SelfBackupStatistics is a typed class wrapper around the underlying Comet Server API data structure.
15
+ class SelfBackupStatistics
16
+
17
+ # @type [Number] current_run_start
18
+ attr_accessor :current_run_start
19
+
20
+ # @type [Number] last_run_start
21
+ attr_accessor :last_run_start
22
+
23
+ # @type [Number] last_run_end
24
+ attr_accessor :last_run_end
25
+
26
+ # @type [Boolean] last_run_success
27
+ attr_accessor :last_run_success
28
+
29
+ # @type [Number] last_run_size
30
+ attr_accessor :last_run_size
31
+
32
+ # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
33
+ attr_accessor :unknown_json_fields
34
+
35
+ def initialize
36
+ clear
37
+ end
38
+
39
+ def clear
40
+ @current_run_start = 0
41
+ @last_run_start = 0
42
+ @last_run_end = 0
43
+ @last_run_size = 0
44
+ @unknown_json_fields = {}
45
+ end
46
+
47
+ # @param [String] json_string The complete object in JSON format
48
+ def from_json(json_string)
49
+ raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String
50
+
51
+ from_hash(JSON.parse(json_string))
52
+ end
53
+
54
+ # @param [Hash] obj The complete object as a Ruby hash
55
+ def from_hash(obj)
56
+ raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash
57
+
58
+ obj.each do |k, v|
59
+ case k
60
+ when 'CurrentRunStart'
61
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
62
+
63
+ @current_run_start = v
64
+ when 'LastRunStart'
65
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
66
+
67
+ @last_run_start = v
68
+ when 'LastRunEnd'
69
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
70
+
71
+ @last_run_end = v
72
+ when 'LastRunSuccess'
73
+ @last_run_success = v
74
+ when 'LastRunSize'
75
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
76
+
77
+ @last_run_size = v
78
+ else
79
+ @unknown_json_fields[k] = v
80
+ end
81
+ end
82
+ end
83
+
84
+ # @return [Hash] The complete object as a Ruby hash
85
+ def to_hash
86
+ ret = {}
87
+ ret['CurrentRunStart'] = @current_run_start
88
+ ret['LastRunStart'] = @last_run_start
89
+ ret['LastRunEnd'] = @last_run_end
90
+ ret['LastRunSuccess'] = @last_run_success
91
+ ret['LastRunSize'] = @last_run_size
92
+ @unknown_json_fields.each do |k, v|
93
+ ret[k] = v
94
+ end
95
+ ret
96
+ end
97
+
98
+ # @return [Hash] The complete object as a Ruby hash
99
+ def to_h
100
+ to_hash
101
+ end
102
+
103
+ # @return [String] The complete object as a JSON string
104
+ def to_json(options = {})
105
+ to_hash.to_json(options)
106
+ end
107
+ end
108
+ end
@@ -77,6 +77,9 @@ module Comet
77
77
  # @type [Boolean] scheduled_email_thread_last_wake_sent_emails
78
78
  attr_accessor :scheduled_email_thread_last_wake_sent_emails
79
79
 
80
+ # @type [Array<Comet::SelfBackupStatistics>] self_backup
81
+ attr_accessor :self_backup
82
+
80
83
  # @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
81
84
  attr_accessor :unknown_json_fields
82
85
 
@@ -100,6 +103,7 @@ module Comet
100
103
  @scheduled_email_thread_last_calculate_duration_nanos = 0
101
104
  @scheduled_email_thread_waiting_until = 0
102
105
  @scheduled_email_thread_last_wake_time = 0
106
+ @self_backup = []
103
107
  @unknown_json_fields = {}
104
108
  end
105
109
 
@@ -195,6 +199,16 @@ module Comet
195
199
  @scheduled_email_thread_last_wake_time = v
196
200
  when 'ScheduledEmailThreadLastWakeSentEmails'
197
201
  @scheduled_email_thread_last_wake_sent_emails = v
202
+ when 'SelfBackup'
203
+ if v.nil?
204
+ @self_backup = []
205
+ else
206
+ @self_backup = Array.new(v.length)
207
+ v.each_with_index do |v1, i1|
208
+ @self_backup[i1] = Comet::SelfBackupStatistics.new
209
+ @self_backup[i1].from_hash(v1)
210
+ end
211
+ end
198
212
  else
199
213
  @unknown_json_fields[k] = v
200
214
  end
@@ -227,6 +241,7 @@ module Comet
227
241
  ret['ScheduledEmailThreadWaitingUntil'] = @scheduled_email_thread_waiting_until
228
242
  ret['ScheduledEmailThreadLastWakeTime'] = @scheduled_email_thread_last_wake_time
229
243
  ret['ScheduledEmailThreadLastWakeSentEmails'] = @scheduled_email_thread_last_wake_sent_emails
244
+ ret['SelfBackup'] = @self_backup
230
245
  @unknown_json_fields.each do |k, v|
231
246
  ret[k] = v
232
247
  end
@@ -29,6 +29,30 @@ module Comet
29
29
  # @type [Number] size
30
30
  attr_accessor :size
31
31
 
32
+ # @type [String] display_name
33
+ attr_accessor :display_name
34
+
35
+ # @type [String] item_class
36
+ attr_accessor :item_class
37
+
38
+ # @type [String] from
39
+ attr_accessor :from
40
+
41
+ # @type [String] to
42
+ attr_accessor :to
43
+
44
+ # @type [Number] received_date_time
45
+ attr_accessor :received_date_time
46
+
47
+ # @type [Boolean] has_attachments
48
+ attr_accessor :has_attachments
49
+
50
+ # @type [Number] start_time
51
+ attr_accessor :start_time
52
+
53
+ # @type [Number] end_time
54
+ attr_accessor :end_time
55
+
32
56
  # @type [Boolean] recursive_count_known
33
57
  attr_accessor :recursive_count_known
34
58
 
@@ -54,6 +78,13 @@ module Comet
54
78
  @type = ''
55
79
  @subtree = ''
56
80
  @size = 0
81
+ @display_name = ''
82
+ @item_class = ''
83
+ @from = ''
84
+ @to = ''
85
+ @received_date_time = 0
86
+ @start_time = 0
87
+ @end_time = 0
57
88
  @recursive_files = 0
58
89
  @recursive_bytes = 0
59
90
  @recursive_folders = 0
@@ -93,6 +124,36 @@ module Comet
93
124
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
94
125
 
95
126
  @size = v
127
+ when 'dname'
128
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
129
+
130
+ @display_name = v
131
+ when 'itemClass'
132
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
133
+
134
+ @item_class = v
135
+ when 'from'
136
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
137
+
138
+ @from = v
139
+ when 'to'
140
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
141
+
142
+ @to = v
143
+ when 'rtime'
144
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
145
+
146
+ @received_date_time = v
147
+ when 'has_attachments'
148
+ @has_attachments = v
149
+ when 'stime'
150
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
151
+
152
+ @start_time = v
153
+ when 'etime'
154
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
155
+
156
+ @end_time = v
96
157
  when 'r'
97
158
  @recursive_count_known = v
98
159
  when 'f'
@@ -121,6 +182,30 @@ module Comet
121
182
  ret['type'] = @type
122
183
  ret['subtree'] = @subtree
123
184
  ret['size'] = @size
185
+ unless @display_name.nil?
186
+ ret['dname'] = @display_name
187
+ end
188
+ unless @item_class.nil?
189
+ ret['itemClass'] = @item_class
190
+ end
191
+ unless @from.nil?
192
+ ret['from'] = @from
193
+ end
194
+ unless @to.nil?
195
+ ret['to'] = @to
196
+ end
197
+ unless @received_date_time.nil?
198
+ ret['rtime'] = @received_date_time
199
+ end
200
+ unless @has_attachments.nil?
201
+ ret['has_attachments'] = @has_attachments
202
+ end
203
+ unless @start_time.nil?
204
+ ret['stime'] = @start_time
205
+ end
206
+ unless @end_time.nil?
207
+ ret['etime'] = @end_time
208
+ end
124
209
  unless @recursive_count_known.nil?
125
210
  ret['r'] = @recursive_count_known
126
211
  end
@@ -33,6 +33,8 @@ require_relative 'comet/models/branding_properties'
33
33
  require_relative 'comet/models/browse_disk_drives_response'
34
34
  require_relative 'comet/models/browse_edbresponse'
35
35
  require_relative 'comet/models/browse_hvresponse'
36
+ require_relative 'comet/models/browse_office_365objects_response'
37
+ require_relative 'comet/models/browse_sqlserver_response'
36
38
  require_relative 'comet/models/browse_vssresponse'
37
39
  require_relative 'comet/models/bucket_properties'
38
40
  require_relative 'comet/models/bucket_usage_info'
@@ -74,8 +76,14 @@ require_relative 'comet/models/live_user_connection'
74
76
  require_relative 'comet/models/local_destination_location'
75
77
  require_relative 'comet/models/mac_oscode_sign_properties'
76
78
  require_relative 'comet/models/mongo_dbconnection'
79
+ require_relative 'comet/models/mssqlconnection'
80
+ require_relative 'comet/models/my_sqlconnection'
77
81
  require_relative 'comet/models/new_bucket_detail'
78
82
  require_relative 'comet/models/news_entry'
83
+ require_relative 'comet/models/office_365connection'
84
+ require_relative 'comet/models/office_365credential'
85
+ require_relative 'comet/models/office_365custom_setting'
86
+ require_relative 'comet/models/office_365object_info'
79
87
  require_relative 'comet/models/organization'
80
88
  require_relative 'comet/models/organization_response'
81
89
  require_relative 'comet/models/osinfo'
@@ -83,6 +91,8 @@ require_relative 'comet/models/partition'
83
91
  require_relative 'comet/models/private_branding_properties'
84
92
  require_relative 'comet/models/protected_item_engine_type_policy'
85
93
  require_relative 'comet/models/public_branding_properties'
94
+ require_relative 'comet/models/register_office_application_begin_response'
95
+ require_relative 'comet/models/register_office_application_check_response'
86
96
  require_relative 'comet/models/remote_server_address'
87
97
  require_relative 'comet/models/remote_storage_option'
88
98
  require_relative 'comet/models/replicator_state_apiresponse'
@@ -93,6 +103,7 @@ require_relative 'comet/models/retention_range'
93
103
  require_relative 'comet/models/s3destination_location'
94
104
  require_relative 'comet/models/schedule_config'
95
105
  require_relative 'comet/models/search_clause'
106
+ require_relative 'comet/models/self_backup_statistics'
96
107
  require_relative 'comet/models/server_config_options_branding_fragment'
97
108
  require_relative 'comet/models/server_config_options_software_build_role_fragment'
98
109
  require_relative 'comet/models/server_meta_version_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.0
4
+ version: 1.5.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-03-03 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,8 @@ files:
108
108
  - lib/comet/models/browse_disk_drives_response.rb
109
109
  - lib/comet/models/browse_edbresponse.rb
110
110
  - lib/comet/models/browse_hvresponse.rb
111
+ - lib/comet/models/browse_office_365objects_response.rb
112
+ - lib/comet/models/browse_sqlserver_response.rb
111
113
  - lib/comet/models/browse_vssresponse.rb
112
114
  - lib/comet/models/bucket_properties.rb
113
115
  - lib/comet/models/bucket_usage_info.rb
@@ -149,8 +151,14 @@ files:
149
151
  - lib/comet/models/local_destination_location.rb
150
152
  - lib/comet/models/mac_oscode_sign_properties.rb
151
153
  - lib/comet/models/mongo_dbconnection.rb
154
+ - lib/comet/models/mssqlconnection.rb
155
+ - lib/comet/models/my_sqlconnection.rb
152
156
  - lib/comet/models/new_bucket_detail.rb
153
157
  - lib/comet/models/news_entry.rb
158
+ - lib/comet/models/office_365connection.rb
159
+ - lib/comet/models/office_365credential.rb
160
+ - lib/comet/models/office_365custom_setting.rb
161
+ - lib/comet/models/office_365object_info.rb
154
162
  - lib/comet/models/organization.rb
155
163
  - lib/comet/models/organization_response.rb
156
164
  - lib/comet/models/osinfo.rb
@@ -158,6 +166,8 @@ files:
158
166
  - lib/comet/models/private_branding_properties.rb
159
167
  - lib/comet/models/protected_item_engine_type_policy.rb
160
168
  - lib/comet/models/public_branding_properties.rb
169
+ - lib/comet/models/register_office_application_begin_response.rb
170
+ - lib/comet/models/register_office_application_check_response.rb
161
171
  - lib/comet/models/remote_server_address.rb
162
172
  - lib/comet/models/remote_storage_option.rb
163
173
  - lib/comet/models/replicator_state_apiresponse.rb
@@ -168,6 +178,7 @@ files:
168
178
  - lib/comet/models/s3destination_location.rb
169
179
  - lib/comet/models/schedule_config.rb
170
180
  - lib/comet/models/search_clause.rb
181
+ - lib/comet/models/self_backup_statistics.rb
171
182
  - lib/comet/models/server_config_options_branding_fragment.rb
172
183
  - lib/comet/models/server_config_options_software_build_role_fragment.rb
173
184
  - lib/comet/models/server_meta_version_info.rb