saklient 0.0.2.2 → 0.0.2.3

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/saklient/cloud/api.rb +75 -0
  3. data/lib/saklient/cloud/client.rb +1 -1
  4. data/lib/saklient/cloud/facility.rb +45 -0
  5. data/lib/saklient/cloud/models/model.rb +7 -12
  6. data/lib/saklient/cloud/models/model_appliance.rb +17 -2
  7. data/lib/saklient/cloud/models/model_archive.rb +10 -0
  8. data/lib/saklient/cloud/models/model_bridge.rb +148 -0
  9. data/lib/saklient/cloud/models/model_disk.rb +10 -0
  10. data/lib/saklient/cloud/models/model_disk_plan.rb +10 -0
  11. data/lib/saklient/cloud/models/model_icon.rb +10 -0
  12. data/lib/saklient/cloud/models/model_iface.rb +10 -0
  13. data/lib/saklient/cloud/models/model_ipv6_net.rb +10 -0
  14. data/lib/saklient/cloud/models/model_iso_image.rb +10 -0
  15. data/lib/saklient/cloud/models/model_license.rb +148 -0
  16. data/lib/saklient/cloud/models/model_license_info.rb +139 -0
  17. data/lib/saklient/cloud/models/model_region.rb +139 -0
  18. data/lib/saklient/cloud/models/model_router.rb +10 -0
  19. data/lib/saklient/cloud/models/model_router_plan.rb +10 -0
  20. data/lib/saklient/cloud/models/model_script.rb +10 -0
  21. data/lib/saklient/cloud/models/model_server.rb +10 -0
  22. data/lib/saklient/cloud/models/model_server_plan.rb +10 -0
  23. data/lib/saklient/cloud/models/model_swytch.rb +10 -0
  24. data/lib/saklient/cloud/product.rb +25 -0
  25. data/lib/saklient/cloud/resources/appliance.rb +5 -17
  26. data/lib/saklient/cloud/resources/archive.rb +2 -2
  27. data/lib/saklient/cloud/resources/bridge.rb +305 -0
  28. data/lib/saklient/cloud/resources/disk.rb +2 -2
  29. data/lib/saklient/cloud/resources/disk_config.rb +1 -1
  30. data/lib/saklient/cloud/resources/iso_image.rb +2 -2
  31. data/lib/saklient/cloud/resources/lb_server.rb +2 -2
  32. data/lib/saklient/cloud/resources/lb_virtual_ip.rb +1 -1
  33. data/lib/saklient/cloud/resources/license.rb +252 -0
  34. data/lib/saklient/cloud/resources/license_info.rb +180 -0
  35. data/lib/saklient/cloud/resources/load_balancer.rb +1 -1
  36. data/lib/saklient/cloud/resources/region.rb +233 -0
  37. data/lib/saklient/cloud/resources/resource.rb +1 -10
  38. data/lib/saklient/cloud/resources/script.rb +2 -2
  39. data/lib/saklient/cloud/resources/server.rb +2 -2
  40. data/lib/saklient/cloud/resources/swytch.rb +137 -14
  41. data/lib/saklient/version.rb +1 -1
  42. data/spec/archive_spec.rb +1 -0
  43. data/spec/bridge_spec.rb +78 -0
  44. data/spec/exception_spec.rb +1 -1
  45. data/spec/iso_image_spec.rb +1 -1
  46. data/spec/license_spec.rb +73 -0
  47. data/spec/loadbalancer_spec.rb +8 -5
  48. data/spec/server_spec.rb +3 -1
  49. metadata +16 -4
@@ -0,0 +1,180 @@
1
+ # -*- encoding: UTF-8 -*-
2
+
3
+ require_relative '../../errors/saklient_exception'
4
+ require_relative '../client'
5
+ require_relative 'resource'
6
+ require_relative 'license_info'
7
+
8
+ module Saklient
9
+ module Cloud
10
+ module Resources
11
+
12
+ # ライセンス種別情報.
13
+ class LicenseInfo < Saklient::Cloud::Resources::Resource
14
+
15
+ protected
16
+
17
+ # ID
18
+ #
19
+ # @return [String]
20
+ attr_accessor :m_id
21
+
22
+ # 名前
23
+ #
24
+ # @return [String]
25
+ attr_accessor :m_name
26
+
27
+ # @private
28
+ # @return [String]
29
+ def _api_path
30
+ return '/product/license'
31
+ end
32
+
33
+ # @private
34
+ # @return [String]
35
+ def _root_key
36
+ return 'LicenseInfo'
37
+ end
38
+
39
+ # @private
40
+ # @return [String]
41
+ def _root_key_m
42
+ return 'LicenseInfo'
43
+ end
44
+
45
+ public
46
+
47
+ # @private
48
+ # @return [String]
49
+ def _class_name
50
+ return 'License'
51
+ end
52
+
53
+ # @private
54
+ # @return [String]
55
+ def _id
56
+ return get_id
57
+ end
58
+
59
+ # @private
60
+ # @param [Saklient::Cloud::Client] client
61
+ # @param [any] obj
62
+ # @param [bool] wrapped
63
+ def initialize(client, obj, wrapped = false)
64
+ super(client)
65
+ Saklient::Util::validate_type(client, 'Saklient::Cloud::Client')
66
+ Saklient::Util::validate_type(wrapped, 'bool')
67
+ api_deserialize(obj, wrapped)
68
+ end
69
+
70
+ protected
71
+
72
+ # @return [bool]
73
+ attr_accessor :n_id
74
+
75
+ # (This method is generated in Translator_default#buildImpl)
76
+ #
77
+ # @private
78
+ # @return [String]
79
+ def get_id
80
+ return @m_id
81
+ end
82
+
83
+ public
84
+
85
+ # ID
86
+ #
87
+ # @return [String]
88
+ attr_reader :id
89
+
90
+ def id
91
+ get_id
92
+ end
93
+
94
+ protected
95
+
96
+ # @return [bool]
97
+ attr_accessor :n_name
98
+
99
+ # (This method is generated in Translator_default#buildImpl)
100
+ #
101
+ # @private
102
+ # @return [String]
103
+ def get_name
104
+ return @m_name
105
+ end
106
+
107
+ # (This method is generated in Translator_default#buildImpl)
108
+ #
109
+ # @private
110
+ # @param [String] v
111
+ # @return [String]
112
+ def set_name(v)
113
+ Saklient::Util::validate_type(v, 'String')
114
+ @m_name = v
115
+ @n_name = true
116
+ return @m_name
117
+ end
118
+
119
+ public
120
+
121
+ # 名前
122
+ #
123
+ # @return [String]
124
+ attr_accessor :name
125
+
126
+ def name
127
+ get_name
128
+ end
129
+
130
+ def name=(v)
131
+ set_name(v)
132
+ end
133
+
134
+ protected
135
+
136
+ # (This method is generated in Translator_default#buildImpl)
137
+ #
138
+ # @param [any] r
139
+ def api_deserialize_impl(r)
140
+ @is_new = (r).nil?
141
+ r = {} if @is_new
142
+ @is_incomplete = false
143
+ if Saklient::Util::exists_path(r, 'ID')
144
+ @m_id = (Saklient::Util::get_by_path(r, 'ID')).nil? ? nil : Saklient::Util::get_by_path(r, 'ID').to_s
145
+ else
146
+ @m_id = nil
147
+ @is_incomplete = true
148
+ end
149
+ @n_id = false
150
+ if Saklient::Util::exists_path(r, 'Name')
151
+ @m_name = (Saklient::Util::get_by_path(r, 'Name')).nil? ? nil : Saklient::Util::get_by_path(r, 'Name').to_s
152
+ else
153
+ @m_name = nil
154
+ @is_incomplete = true
155
+ end
156
+ @n_name = false
157
+ end
158
+
159
+ # @private
160
+ # @param [bool] withClean
161
+ # @return [any]
162
+ def api_serialize_impl(withClean = false)
163
+ Saklient::Util::validate_type(withClean, 'bool')
164
+ missing = []
165
+ ret = {}
166
+ Saklient::Util::set_by_path(ret, 'ID', @m_id) if withClean || @n_id
167
+ if withClean || @n_name
168
+ Saklient::Util::set_by_path(ret, 'Name', @m_name)
169
+ else
170
+ missing << 'name' if @is_new
171
+ end
172
+ raise Saklient::Errors::SaklientException.new('required_field', 'Required fields must be set before the LicenseInfo creation: ' + missing.join(', ')) if missing.length > 0
173
+ return ret
174
+ end
175
+
176
+ end
177
+
178
+ end
179
+ end
180
+ end
@@ -29,7 +29,7 @@ module Saklient
29
29
  return @_virtual_ips
30
30
  end
31
31
 
32
- # 仮想IPアドレス
32
+ # 仮想IPアドレス {LbVirtualIp} の配列
33
33
  #
34
34
  # @return [Array<LbVirtualIp>]
35
35
  attr_reader :virtual_ips
@@ -0,0 +1,233 @@
1
+ # -*- encoding: UTF-8 -*-
2
+
3
+ require_relative '../../errors/saklient_exception'
4
+ require_relative '../client'
5
+ require_relative 'resource'
6
+ require_relative '../enums/escope'
7
+
8
+ module Saklient
9
+ module Cloud
10
+ module Resources
11
+
12
+ # リージョン情報.
13
+ class Region < Saklient::Cloud::Resources::Resource
14
+
15
+ protected
16
+
17
+ # ID
18
+ #
19
+ # @return [String]
20
+ attr_accessor :m_id
21
+
22
+ # 名前
23
+ #
24
+ # @return [String]
25
+ attr_accessor :m_name
26
+
27
+ # 説明
28
+ #
29
+ # @return [String]
30
+ attr_accessor :m_description
31
+
32
+ # @private
33
+ # @return [String]
34
+ def _api_path
35
+ return '/region'
36
+ end
37
+
38
+ # @private
39
+ # @return [String]
40
+ def _root_key
41
+ return 'Region'
42
+ end
43
+
44
+ # @private
45
+ # @return [String]
46
+ def _root_key_m
47
+ return 'Regions'
48
+ end
49
+
50
+ public
51
+
52
+ # @private
53
+ # @return [String]
54
+ def _class_name
55
+ return 'Region'
56
+ end
57
+
58
+ # @private
59
+ # @return [String]
60
+ def _id
61
+ return get_id
62
+ end
63
+
64
+ # @private
65
+ # @param [Saklient::Cloud::Client] client
66
+ # @param [any] obj
67
+ # @param [bool] wrapped
68
+ def initialize(client, obj, wrapped = false)
69
+ super(client)
70
+ Saklient::Util::validate_type(client, 'Saklient::Cloud::Client')
71
+ Saklient::Util::validate_type(wrapped, 'bool')
72
+ api_deserialize(obj, wrapped)
73
+ end
74
+
75
+ protected
76
+
77
+ # @return [bool]
78
+ attr_accessor :n_id
79
+
80
+ # (This method is generated in Translator_default#buildImpl)
81
+ #
82
+ # @private
83
+ # @return [String]
84
+ def get_id
85
+ return @m_id
86
+ end
87
+
88
+ public
89
+
90
+ # ID
91
+ #
92
+ # @return [String]
93
+ attr_reader :id
94
+
95
+ def id
96
+ get_id
97
+ end
98
+
99
+ protected
100
+
101
+ # @return [bool]
102
+ attr_accessor :n_name
103
+
104
+ # (This method is generated in Translator_default#buildImpl)
105
+ #
106
+ # @private
107
+ # @return [String]
108
+ def get_name
109
+ return @m_name
110
+ end
111
+
112
+ # (This method is generated in Translator_default#buildImpl)
113
+ #
114
+ # @private
115
+ # @param [String] v
116
+ # @return [String]
117
+ def set_name(v)
118
+ Saklient::Util::validate_type(v, 'String')
119
+ @m_name = v
120
+ @n_name = true
121
+ return @m_name
122
+ end
123
+
124
+ public
125
+
126
+ # 名前
127
+ #
128
+ # @return [String]
129
+ attr_accessor :name
130
+
131
+ def name
132
+ get_name
133
+ end
134
+
135
+ def name=(v)
136
+ set_name(v)
137
+ end
138
+
139
+ protected
140
+
141
+ # @return [bool]
142
+ attr_accessor :n_description
143
+
144
+ # (This method is generated in Translator_default#buildImpl)
145
+ #
146
+ # @private
147
+ # @return [String]
148
+ def get_description
149
+ return @m_description
150
+ end
151
+
152
+ # (This method is generated in Translator_default#buildImpl)
153
+ #
154
+ # @private
155
+ # @param [String] v
156
+ # @return [String]
157
+ def set_description(v)
158
+ Saklient::Util::validate_type(v, 'String')
159
+ @m_description = v
160
+ @n_description = true
161
+ return @m_description
162
+ end
163
+
164
+ public
165
+
166
+ # 説明
167
+ #
168
+ # @return [String]
169
+ attr_accessor :description
170
+
171
+ def description
172
+ get_description
173
+ end
174
+
175
+ def description=(v)
176
+ set_description(v)
177
+ end
178
+
179
+ protected
180
+
181
+ # (This method is generated in Translator_default#buildImpl)
182
+ #
183
+ # @param [any] r
184
+ def api_deserialize_impl(r)
185
+ @is_new = (r).nil?
186
+ r = {} if @is_new
187
+ @is_incomplete = false
188
+ if Saklient::Util::exists_path(r, 'ID')
189
+ @m_id = (Saklient::Util::get_by_path(r, 'ID')).nil? ? nil : Saklient::Util::get_by_path(r, 'ID').to_s
190
+ else
191
+ @m_id = nil
192
+ @is_incomplete = true
193
+ end
194
+ @n_id = false
195
+ if Saklient::Util::exists_path(r, 'Name')
196
+ @m_name = (Saklient::Util::get_by_path(r, 'Name')).nil? ? nil : Saklient::Util::get_by_path(r, 'Name').to_s
197
+ else
198
+ @m_name = nil
199
+ @is_incomplete = true
200
+ end
201
+ @n_name = false
202
+ if Saklient::Util::exists_path(r, 'Description')
203
+ @m_description = (Saklient::Util::get_by_path(r, 'Description')).nil? ? nil : Saklient::Util::get_by_path(r, 'Description').to_s
204
+ else
205
+ @m_description = nil
206
+ @is_incomplete = true
207
+ end
208
+ @n_description = false
209
+ end
210
+
211
+ # @private
212
+ # @param [bool] withClean
213
+ # @return [any]
214
+ def api_serialize_impl(withClean = false)
215
+ Saklient::Util::validate_type(withClean, 'bool')
216
+ missing = []
217
+ ret = {}
218
+ Saklient::Util::set_by_path(ret, 'ID', @m_id) if withClean || @n_id
219
+ if withClean || @n_name
220
+ Saklient::Util::set_by_path(ret, 'Name', @m_name)
221
+ else
222
+ missing << 'name' if @is_new
223
+ end
224
+ Saklient::Util::set_by_path(ret, 'Description', @m_description) if withClean || @n_description
225
+ raise Saklient::Errors::SaklientException.new('required_field', 'Required fields must be set before the Region creation: ' + missing.join(', ')) if missing.length > 0
226
+ return ret
227
+ end
228
+
229
+ end
230
+
231
+ end
232
+ end
233
+ end
@@ -274,12 +274,6 @@ module Saklient
274
274
  return api_serialize(true)
275
275
  end
276
276
 
277
- # @private
278
- # @return [String]
279
- def true_class_name
280
- return nil
281
- end
282
-
283
277
  # @private
284
278
  # @param [String] className
285
279
  # @param [Saklient::Cloud::Client] client
@@ -295,10 +289,7 @@ module Saklient
295
289
  obj,
296
290
  wrapped
297
291
  ]
298
- ret = Saklient::Util::create_class_instance('saklient.cloud.resources.' + className, a)
299
- trueClassName = ret.true_class_name
300
- ret = Saklient::Util::create_class_instance('saklient.cloud.resources.' + trueClassName, a) if !(trueClassName).nil?
301
- return ret
292
+ return Saklient::Util::create_class_instance('saklient.cloud.resources.' + className, a)
302
293
  end
303
294
 
304
295
  # @param [String] method
@@ -41,7 +41,7 @@ module Saklient
41
41
  # @return [String]
42
42
  attr_accessor :m_description
43
43
 
44
- # タグ
44
+ # タグ文字列の配列
45
45
  #
46
46
  # @return [Array<String>]
47
47
  attr_accessor :m_tags
@@ -298,7 +298,7 @@ module Saklient
298
298
 
299
299
  public
300
300
 
301
- # タグ
301
+ # タグ文字列の配列
302
302
  #
303
303
  # @return [Array<String>]
304
304
  attr_accessor :tags
@@ -38,7 +38,7 @@ module Saklient
38
38
  # @return [String]
39
39
  attr_accessor :m_description
40
40
 
41
- # タグ
41
+ # タグ文字列の配列
42
42
  #
43
43
  # @return [Array<String>]
44
44
  attr_accessor :m_tags
@@ -403,7 +403,7 @@ module Saklient
403
403
 
404
404
  public
405
405
 
406
- # タグ
406
+ # タグ文字列の配列
407
407
  #
408
408
  # @return [Array<String>]
409
409
  attr_accessor :tags
@@ -32,6 +32,16 @@ module Saklient
32
32
  # @return [String]
33
33
  attr_accessor :m_description
34
34
 
35
+ # タグ文字列の配列
36
+ #
37
+ # @return [Array<String>]
38
+ attr_accessor :m_tags
39
+
40
+ # アイコン
41
+ #
42
+ # @return [Icon]
43
+ attr_accessor :m_icon
44
+
35
45
  # ユーザ設定IPv4ネットワークのゲートウェイ
36
46
  #
37
47
  # @return [String]
@@ -47,12 +57,12 @@ module Saklient
47
57
  # @return [Router]
48
58
  attr_accessor :m_router
49
59
 
50
- # IPv4ネットワーク(ルータによる自動割当)
60
+ # IPv4ネットワーク(ルータによる自動割当) {Ipv4Net} の配列
51
61
  #
52
62
  # @return [Array<Ipv4Net>]
53
63
  attr_accessor :m_ipv4_nets
54
64
 
55
- # IPv6ネットワーク(ルータによる自動割当)
65
+ # IPv6ネットワーク(ルータによる自動割当) {Ipv6Net} の配列
56
66
  #
57
67
  # @return [Array<Ipv6Net>]
58
68
  attr_accessor :m_ipv6_nets
@@ -274,6 +284,87 @@ module Saklient
274
284
 
275
285
  protected
276
286
 
287
+ # @return [bool]
288
+ attr_accessor :n_tags
289
+
290
+ # (This method is generated in Translator_default#buildImpl)
291
+ #
292
+ # @private
293
+ # @return [Array<String>]
294
+ def get_tags
295
+ @n_tags = true
296
+ return @m_tags
297
+ end
298
+
299
+ # (This method is generated in Translator_default#buildImpl)
300
+ #
301
+ # @private
302
+ # @param [Array<String>] v
303
+ # @return [Array<String>]
304
+ def set_tags(v)
305
+ Saklient::Util::validate_type(v, 'Array')
306
+ @m_tags = v
307
+ @n_tags = true
308
+ return @m_tags
309
+ end
310
+
311
+ public
312
+
313
+ # タグ文字列の配列
314
+ #
315
+ # @return [Array<String>]
316
+ attr_accessor :tags
317
+
318
+ def tags
319
+ get_tags
320
+ end
321
+
322
+ def tags=(v)
323
+ set_tags(v)
324
+ end
325
+
326
+ protected
327
+
328
+ # @return [bool]
329
+ attr_accessor :n_icon
330
+
331
+ # (This method is generated in Translator_default#buildImpl)
332
+ #
333
+ # @private
334
+ # @return [Icon]
335
+ def get_icon
336
+ return @m_icon
337
+ end
338
+
339
+ # (This method is generated in Translator_default#buildImpl)
340
+ #
341
+ # @private
342
+ # @param [Icon] v
343
+ # @return [Icon]
344
+ def set_icon(v)
345
+ Saklient::Util::validate_type(v, 'Saklient::Cloud::Resources::Icon')
346
+ @m_icon = v
347
+ @n_icon = true
348
+ return @m_icon
349
+ end
350
+
351
+ public
352
+
353
+ # アイコン
354
+ #
355
+ # @return [Icon]
356
+ attr_accessor :icon
357
+
358
+ def icon
359
+ get_icon
360
+ end
361
+
362
+ def icon=(v)
363
+ set_icon(v)
364
+ end
365
+
366
+ protected
367
+
277
368
  # @return [bool]
278
369
  attr_accessor :n_user_default_route
279
370
 
@@ -359,7 +450,7 @@ module Saklient
359
450
 
360
451
  public
361
452
 
362
- # IPv4ネットワーク(ルータによる自動割当)
453
+ # IPv4ネットワーク(ルータによる自動割当) {Ipv4Net} の配列
363
454
  #
364
455
  # @return [Array<Ipv4Net>]
365
456
  attr_reader :ipv4_nets
@@ -383,7 +474,7 @@ module Saklient
383
474
 
384
475
  public
385
476
 
386
- # IPv6ネットワーク(ルータによる自動割当)
477
+ # IPv6ネットワーク(ルータによる自動割当) {Ipv6Net} の配列
387
478
  #
388
479
  # @return [Array<Ipv6Net>]
389
480
  attr_reader :ipv6_nets
@@ -422,6 +513,29 @@ module Saklient
422
513
  @is_incomplete = true
423
514
  end
424
515
  @n_description = false
516
+ if Saklient::Util::exists_path(r, 'Tags')
517
+ if (Saklient::Util::get_by_path(r, 'Tags')).nil?
518
+ @m_tags = []
519
+ else
520
+ @m_tags = []
521
+ for t in Saklient::Util::get_by_path(r, 'Tags')
522
+ v1 = nil
523
+ v1 = (t).nil? ? nil : t.to_s
524
+ @m_tags << v1
525
+ end
526
+ end
527
+ else
528
+ @m_tags = nil
529
+ @is_incomplete = true
530
+ end
531
+ @n_tags = false
532
+ if Saklient::Util::exists_path(r, 'Icon')
533
+ @m_icon = (Saklient::Util::get_by_path(r, 'Icon')).nil? ? nil : Saklient::Cloud::Resources::Icon.new(@_client, Saklient::Util::get_by_path(r, 'Icon'))
534
+ else
535
+ @m_icon = nil
536
+ @is_incomplete = true
537
+ end
538
+ @n_icon = false
425
539
  if Saklient::Util::exists_path(r, 'UserSubnet.DefaultRoute')
426
540
  @m_user_default_route = (Saklient::Util::get_by_path(r, 'UserSubnet.DefaultRoute')).nil? ? nil : Saklient::Util::get_by_path(r, 'UserSubnet.DefaultRoute').to_s
427
541
  else
@@ -449,9 +563,9 @@ module Saklient
449
563
  else
450
564
  @m_ipv4_nets = []
451
565
  for t in Saklient::Util::get_by_path(r, 'Subnets')
452
- v1 = nil
453
- v1 = (t).nil? ? nil : Saklient::Cloud::Resources::Ipv4Net.new(@_client, t)
454
- @m_ipv4_nets << v1
566
+ v2 = nil
567
+ v2 = (t).nil? ? nil : Saklient::Cloud::Resources::Ipv4Net.new(@_client, t)
568
+ @m_ipv4_nets << v2
455
569
  end
456
570
  end
457
571
  else
@@ -465,9 +579,9 @@ module Saklient
465
579
  else
466
580
  @m_ipv6_nets = []
467
581
  for t in Saklient::Util::get_by_path(r, 'IPv6Nets')
468
- v2 = nil
469
- v2 = (t).nil? ? nil : Saklient::Cloud::Resources::Ipv6Net.new(@_client, t)
470
- @m_ipv6_nets << v2
582
+ v3 = nil
583
+ v3 = (t).nil? ? nil : Saklient::Cloud::Resources::Ipv6Net.new(@_client, t)
584
+ @m_ipv6_nets << v3
471
585
  end
472
586
  end
473
587
  else
@@ -491,22 +605,31 @@ module Saklient
491
605
  missing << 'name' if @is_new
492
606
  end
493
607
  Saklient::Util::set_by_path(ret, 'Description', @m_description) if withClean || @n_description
608
+ if withClean || @n_tags
609
+ Saklient::Util::set_by_path(ret, 'Tags', [])
610
+ for r1 in @m_tags
611
+ v = nil
612
+ v = r1
613
+ ret[:Tags] << v
614
+ end
615
+ end
616
+ Saklient::Util::set_by_path(ret, 'Icon', withClean ? ((@m_icon).nil? ? nil : @m_icon.api_serialize(withClean)) : ((@m_icon).nil? ? { ID: '0' } : @m_icon.api_serialize_id)) if withClean || @n_icon
494
617
  Saklient::Util::set_by_path(ret, 'UserSubnet.DefaultRoute', @m_user_default_route) if withClean || @n_user_default_route
495
618
  Saklient::Util::set_by_path(ret, 'UserSubnet.NetworkMaskLen', @m_user_mask_len) if withClean || @n_user_mask_len
496
619
  Saklient::Util::set_by_path(ret, 'Internet', withClean ? ((@m_router).nil? ? nil : @m_router.api_serialize(withClean)) : ((@m_router).nil? ? { ID: '0' } : @m_router.api_serialize_id)) if withClean || @n_router
497
620
  if withClean || @n_ipv4_nets
498
621
  Saklient::Util::set_by_path(ret, 'Subnets', [])
499
- for r1 in @m_ipv4_nets
622
+ for r2 in @m_ipv4_nets
500
623
  v = nil
501
- v = withClean ? ((r1).nil? ? nil : r1.api_serialize(withClean)) : ((r1).nil? ? { ID: '0' } : r1.api_serialize_id)
624
+ v = withClean ? ((r2).nil? ? nil : r2.api_serialize(withClean)) : ((r2).nil? ? { ID: '0' } : r2.api_serialize_id)
502
625
  ret[:Subnets] << v
503
626
  end
504
627
  end
505
628
  if withClean || @n_ipv6_nets
506
629
  Saklient::Util::set_by_path(ret, 'IPv6Nets', [])
507
- for r2 in @m_ipv6_nets
630
+ for r3 in @m_ipv6_nets
508
631
  v = nil
509
- v = withClean ? ((r2).nil? ? nil : r2.api_serialize(withClean)) : ((r2).nil? ? { ID: '0' } : r2.api_serialize_id)
632
+ v = withClean ? ((r3).nil? ? nil : r3.api_serialize(withClean)) : ((r3).nil? ? { ID: '0' } : r3.api_serialize_id)
510
633
  ret[:IPv6Nets] << v
511
634
  end
512
635
  end