docker-engine-ruby 0.3.0 → 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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/docker_engine_ruby/models/config_list_response.rb +1 -1
  5. data/lib/docker_engine_ruby/models/config_object.rb +77 -0
  6. data/lib/docker_engine_ruby/models/config_spec.rb +68 -0
  7. data/lib/docker_engine_ruby/models/image_list_response.rb +1 -1
  8. data/lib/docker_engine_ruby/models/image_summary.rb +638 -0
  9. data/lib/docker_engine_ruby/models/info.rb +3 -3
  10. data/lib/docker_engine_ruby/models/network_create_response.rb +27 -0
  11. data/lib/docker_engine_ruby/models/network_list_response.rb +1 -1
  12. data/lib/docker_engine_ruby/models/network_summary.rb +260 -0
  13. data/lib/docker_engine_ruby/models/node.rb +3 -3
  14. data/lib/docker_engine_ruby/models/node_spec.rb +67 -0
  15. data/lib/docker_engine_ruby/models/secret.rb +3 -3
  16. data/lib/docker_engine_ruby/models/secret_spec.rb +99 -0
  17. data/lib/docker_engine_ruby/models/service.rb +3 -3
  18. data/lib/docker_engine_ruby/models/service_create_response.rb +32 -0
  19. data/lib/docker_engine_ruby/models/{spec.rb → service_spec.rb} +73 -67
  20. data/lib/docker_engine_ruby/models/service_update_response.rb +17 -0
  21. data/lib/docker_engine_ruby/models/swarm.rb +3 -3
  22. data/lib/docker_engine_ruby/models/swarm_init_params.rb +3 -3
  23. data/lib/docker_engine_ruby/models/swarm_spec.rb +270 -0
  24. data/lib/docker_engine_ruby/models/task.rb +3 -3
  25. data/lib/docker_engine_ruby/models/task_spec.rb +1439 -0
  26. data/lib/docker_engine_ruby/models.rb +23 -1
  27. data/lib/docker_engine_ruby/resources/configs.rb +6 -6
  28. data/lib/docker_engine_ruby/resources/images.rb +2 -2
  29. data/lib/docker_engine_ruby/resources/networks.rb +4 -4
  30. data/lib/docker_engine_ruby/resources/nodes.rb +1 -1
  31. data/lib/docker_engine_ruby/resources/secrets.rb +2 -2
  32. data/lib/docker_engine_ruby/resources/services.rb +6 -6
  33. data/lib/docker_engine_ruby/resources/swarm.rb +2 -2
  34. data/lib/docker_engine_ruby/version.rb +1 -1
  35. data/lib/docker_engine_ruby.rb +16 -5
  36. data/rbi/docker_engine_ruby/models/config_list_response.rbi +3 -1
  37. data/rbi/docker_engine_ruby/models/config_object.rbi +130 -0
  38. data/rbi/docker_engine_ruby/models/config_spec.rbi +127 -0
  39. data/rbi/docker_engine_ruby/models/image_list_response.rbi +3 -1
  40. data/rbi/docker_engine_ruby/models/image_summary.rbi +1073 -0
  41. data/rbi/docker_engine_ruby/models/info.rbi +4 -4
  42. data/rbi/docker_engine_ruby/models/network_create_response.rbi +37 -0
  43. data/rbi/docker_engine_ruby/models/network_list_response.rbi +3 -1
  44. data/rbi/docker_engine_ruby/models/network_summary.rbi +444 -0
  45. data/rbi/docker_engine_ruby/models/node.rbi +4 -4
  46. data/rbi/docker_engine_ruby/models/node_spec.rbi +126 -0
  47. data/rbi/docker_engine_ruby/models/secret.rbi +4 -4
  48. data/rbi/docker_engine_ruby/models/secret_spec.rbi +181 -0
  49. data/rbi/docker_engine_ruby/models/service.rbi +4 -4
  50. data/rbi/docker_engine_ruby/models/service_create_response.rbi +50 -0
  51. data/rbi/docker_engine_ruby/models/{spec.rbi → service_spec.rbi} +148 -104
  52. data/rbi/docker_engine_ruby/models/service_update_response.rbi +33 -0
  53. data/rbi/docker_engine_ruby/models/swarm.rbi +4 -4
  54. data/rbi/docker_engine_ruby/models/swarm_init_params.rbi +4 -4
  55. data/rbi/docker_engine_ruby/models/swarm_spec.rbi +568 -0
  56. data/rbi/docker_engine_ruby/models/task.rbi +4 -4
  57. data/rbi/docker_engine_ruby/models/task_spec.rbi +3011 -0
  58. data/rbi/docker_engine_ruby/models.rbi +23 -1
  59. data/rbi/docker_engine_ruby/resources/configs.rbi +4 -4
  60. data/rbi/docker_engine_ruby/resources/images.rbi +1 -1
  61. data/rbi/docker_engine_ruby/resources/networks.rbi +2 -2
  62. data/rbi/docker_engine_ruby/resources/nodes.rbi +1 -1
  63. data/rbi/docker_engine_ruby/resources/secrets.rbi +2 -2
  64. data/rbi/docker_engine_ruby/resources/services.rbi +4 -4
  65. data/rbi/docker_engine_ruby/resources/swarm.rbi +2 -2
  66. data/sig/docker_engine_ruby/models/config_list_response.rbs +1 -1
  67. data/sig/docker_engine_ruby/models/config_object.rbs +64 -0
  68. data/sig/docker_engine_ruby/models/config_spec.rbs +59 -0
  69. data/sig/docker_engine_ruby/models/image_list_response.rbs +1 -1
  70. data/sig/docker_engine_ruby/models/image_summary.rbs +457 -0
  71. data/sig/docker_engine_ruby/models/info.rbs +7 -5
  72. data/sig/docker_engine_ruby/models/network_create_response.rbs +15 -0
  73. data/sig/docker_engine_ruby/models/network_list_response.rbs +1 -1
  74. data/sig/docker_engine_ruby/models/network_summary.rbs +238 -0
  75. data/sig/docker_engine_ruby/models/node.rbs +5 -5
  76. data/sig/docker_engine_ruby/models/node_spec.rbs +70 -0
  77. data/sig/docker_engine_ruby/models/secret.rbs +5 -5
  78. data/sig/docker_engine_ruby/models/secret_spec.rbs +82 -0
  79. data/sig/docker_engine_ruby/models/service.rbs +7 -5
  80. data/sig/docker_engine_ruby/models/service_create_response.rbs +17 -0
  81. data/sig/docker_engine_ruby/models/{spec.rbs → service_spec.rbs} +107 -103
  82. data/sig/docker_engine_ruby/models/service_update_response.rbs +15 -0
  83. data/sig/docker_engine_ruby/models/swarm.rbs +5 -5
  84. data/sig/docker_engine_ruby/models/swarm_init_params.rbs +5 -5
  85. data/sig/docker_engine_ruby/models/swarm_spec.rbs +293 -0
  86. data/sig/docker_engine_ruby/models/task.rbs +5 -5
  87. data/sig/docker_engine_ruby/models/task_spec.rbs +1480 -0
  88. data/sig/docker_engine_ruby/models.rbs +23 -1
  89. data/sig/docker_engine_ruby/resources/configs.rbs +3 -3
  90. data/sig/docker_engine_ruby/resources/networks.rbs +1 -1
  91. data/sig/docker_engine_ruby/resources/nodes.rbs +1 -1
  92. data/sig/docker_engine_ruby/resources/secrets.rbs +2 -2
  93. data/sig/docker_engine_ruby/resources/services.rbs +4 -4
  94. data/sig/docker_engine_ruby/resources/swarm.rbs +2 -2
  95. metadata +37 -4
@@ -0,0 +1,1439 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DockerEngineRuby
4
+ module Models
5
+ class TaskSpec < DockerEngineRuby::Internal::Type::BaseModel
6
+ # @!attribute container_spec
7
+ # Container spec for the service.
8
+ #
9
+ # <p><br /></p>
10
+ #
11
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
12
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
13
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
14
+ #
15
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec, nil]
16
+ optional :container_spec, -> { DockerEngineRuby::TaskSpec::ContainerSpec }, api_name: :ContainerSpec
17
+
18
+ # @!attribute force_update
19
+ # A counter that triggers an update even if no relevant parameters have been
20
+ # changed.
21
+ #
22
+ # @return [Integer, nil]
23
+ optional :force_update, Integer, api_name: :ForceUpdate
24
+
25
+ # @!attribute log_driver
26
+ # Specifies the log driver to use for tasks created from this spec. If not
27
+ # present, the default one for the swarm will be used, finally falling back to the
28
+ # engine default if not specified.
29
+ #
30
+ # @return [DockerEngineRuby::Models::TaskSpec::LogDriver, nil]
31
+ optional :log_driver, -> { DockerEngineRuby::TaskSpec::LogDriver }, api_name: :LogDriver
32
+
33
+ # @!attribute network_attachment_spec
34
+ # Read-only spec type for non-swarm containers attached to swarm overlay networks.
35
+ #
36
+ # <p><br /></p>
37
+ #
38
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
39
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
40
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
41
+ #
42
+ # @return [DockerEngineRuby::Models::TaskSpec::NetworkAttachmentSpec, nil]
43
+ optional :network_attachment_spec,
44
+ -> { DockerEngineRuby::TaskSpec::NetworkAttachmentSpec },
45
+ api_name: :NetworkAttachmentSpec
46
+
47
+ # @!attribute networks
48
+ # Specifies which networks the service should attach to.
49
+ #
50
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::Network>, nil]
51
+ optional :networks,
52
+ -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::Network] },
53
+ api_name: :Networks
54
+
55
+ # @!attribute placement
56
+ #
57
+ # @return [DockerEngineRuby::Models::TaskSpec::Placement, nil]
58
+ optional :placement, -> { DockerEngineRuby::TaskSpec::Placement }, api_name: :Placement
59
+
60
+ # @!attribute plugin_spec
61
+ # Plugin spec for the service. _(Experimental release only.)_
62
+ #
63
+ # <p><br /></p>
64
+ #
65
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
66
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
67
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
68
+ #
69
+ # @return [DockerEngineRuby::Models::TaskSpec::PluginSpec, nil]
70
+ optional :plugin_spec, -> { DockerEngineRuby::TaskSpec::PluginSpec }, api_name: :PluginSpec
71
+
72
+ # @!attribute resources
73
+ # Resource requirements which apply to each individual container created as part
74
+ # of the service.
75
+ #
76
+ # @return [DockerEngineRuby::Models::TaskSpec::Resources, nil]
77
+ optional :resources, -> { DockerEngineRuby::TaskSpec::Resources }, api_name: :Resources
78
+
79
+ # @!attribute restart_policy
80
+ # Specification for the restart policy which applies to containers created as part
81
+ # of this service.
82
+ #
83
+ # @return [DockerEngineRuby::Models::TaskSpec::RestartPolicy, nil]
84
+ optional :restart_policy, -> { DockerEngineRuby::TaskSpec::RestartPolicy }, api_name: :RestartPolicy
85
+
86
+ # @!attribute runtime
87
+ # Runtime is the type of runtime specified for the task executor.
88
+ #
89
+ # @return [String, nil]
90
+ optional :runtime, String, api_name: :Runtime
91
+
92
+ # @!method initialize(container_spec: nil, force_update: nil, log_driver: nil, network_attachment_spec: nil, networks: nil, placement: nil, plugin_spec: nil, resources: nil, restart_policy: nil, runtime: nil)
93
+ # Some parameter documentations has been truncated, see
94
+ # {DockerEngineRuby::Models::TaskSpec} for more details.
95
+ #
96
+ # User modifiable task configuration.
97
+ #
98
+ # @param container_spec [DockerEngineRuby::Models::TaskSpec::ContainerSpec] Container spec for the service.
99
+ #
100
+ # @param force_update [Integer] A counter that triggers an update even if no relevant parameters have
101
+ #
102
+ # @param log_driver [DockerEngineRuby::Models::TaskSpec::LogDriver] Specifies the log driver to use for tasks created from this spec. If
103
+ #
104
+ # @param network_attachment_spec [DockerEngineRuby::Models::TaskSpec::NetworkAttachmentSpec] Read-only spec type for non-swarm containers attached to swarm overlay
105
+ #
106
+ # @param networks [Array<DockerEngineRuby::Models::TaskSpec::Network>] Specifies which networks the service should attach to.
107
+ #
108
+ # @param placement [DockerEngineRuby::Models::TaskSpec::Placement]
109
+ #
110
+ # @param plugin_spec [DockerEngineRuby::Models::TaskSpec::PluginSpec] Plugin spec for the service. _(Experimental release only.)_
111
+ #
112
+ # @param resources [DockerEngineRuby::Models::TaskSpec::Resources] Resource requirements which apply to each individual container created
113
+ #
114
+ # @param restart_policy [DockerEngineRuby::Models::TaskSpec::RestartPolicy] Specification for the restart policy which applies to containers
115
+ #
116
+ # @param runtime [String] Runtime is the type of runtime specified for the task executor.
117
+
118
+ # @see DockerEngineRuby::Models::TaskSpec#container_spec
119
+ class ContainerSpec < DockerEngineRuby::Internal::Type::BaseModel
120
+ # @!attribute args
121
+ #
122
+ # @return [Array<String>, nil]
123
+ optional :args, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Args
124
+
125
+ # @!attribute capability_add
126
+ #
127
+ # @return [Array<String>, nil]
128
+ optional :capability_add, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :CapabilityAdd
129
+
130
+ # @!attribute capability_drop
131
+ #
132
+ # @return [Array<String>, nil]
133
+ optional :capability_drop,
134
+ DockerEngineRuby::Internal::Type::ArrayOf[String],
135
+ api_name: :CapabilityDrop
136
+
137
+ # @!attribute command
138
+ #
139
+ # @return [Array<String>, nil]
140
+ optional :command, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Command
141
+
142
+ # @!attribute configs
143
+ #
144
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Config>, nil]
145
+ optional :configs,
146
+ -> {
147
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::ContainerSpec::Config]
148
+ },
149
+ api_name: :Configs
150
+
151
+ # @!attribute dir
152
+ #
153
+ # @return [String, nil]
154
+ optional :dir, String, api_name: :Dir
155
+
156
+ # @!attribute dns_config
157
+ #
158
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::DNSConfig, nil]
159
+ optional :dns_config,
160
+ -> {
161
+ DockerEngineRuby::TaskSpec::ContainerSpec::DNSConfig
162
+ },
163
+ api_name: :DNSConfig
164
+
165
+ # @!attribute env
166
+ #
167
+ # @return [Array<String>, nil]
168
+ optional :env, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Env
169
+
170
+ # @!attribute groups
171
+ #
172
+ # @return [Array<String>, nil]
173
+ optional :groups, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Groups
174
+
175
+ # @!attribute health_check
176
+ # A test to perform to check that the container is healthy. Healthcheck commands
177
+ # should be side-effect free.
178
+ #
179
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::HealthCheck, nil]
180
+ optional :health_check,
181
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::HealthCheck },
182
+ api_name: :HealthCheck
183
+
184
+ # @!attribute hostname
185
+ #
186
+ # @return [String, nil]
187
+ optional :hostname, String, api_name: :Hostname
188
+
189
+ # @!attribute hosts
190
+ #
191
+ # @return [Array<String>, nil]
192
+ optional :hosts, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Hosts
193
+
194
+ # @!attribute image
195
+ #
196
+ # @return [String, nil]
197
+ optional :image, String, api_name: :Image
198
+
199
+ # @!attribute init
200
+ #
201
+ # @return [Boolean, nil]
202
+ optional :init, DockerEngineRuby::Internal::Type::Boolean, api_name: :Init, nil?: true
203
+
204
+ # @!attribute isolation
205
+ #
206
+ # @return [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Isolation, nil]
207
+ optional :isolation,
208
+ enum: -> { DockerEngineRuby::TaskSpec::ContainerSpec::Isolation },
209
+ api_name: :Isolation
210
+
211
+ # @!attribute labels
212
+ #
213
+ # @return [Hash{Symbol=>String}, nil]
214
+ optional :labels, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Labels
215
+
216
+ # @!attribute mounts
217
+ #
218
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount>, nil]
219
+ optional :mounts,
220
+ -> {
221
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::ContainerSpec::Mount]
222
+ },
223
+ api_name: :Mounts
224
+
225
+ # @!attribute oom_score_adj
226
+ #
227
+ # @return [Integer, nil]
228
+ optional :oom_score_adj, Integer, api_name: :OomScoreAdj
229
+
230
+ # @!attribute open_stdin
231
+ #
232
+ # @return [Boolean, nil]
233
+ optional :open_stdin, DockerEngineRuby::Internal::Type::Boolean, api_name: :OpenStdin
234
+
235
+ # @!attribute privileges
236
+ #
237
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges, nil]
238
+ optional :privileges,
239
+ -> {
240
+ DockerEngineRuby::TaskSpec::ContainerSpec::Privileges
241
+ },
242
+ api_name: :Privileges
243
+
244
+ # @!attribute read_only
245
+ #
246
+ # @return [Boolean, nil]
247
+ optional :read_only, DockerEngineRuby::Internal::Type::Boolean, api_name: :ReadOnly
248
+
249
+ # @!attribute secrets
250
+ #
251
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Secret>, nil]
252
+ optional :secrets,
253
+ -> {
254
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::ContainerSpec::Secret]
255
+ },
256
+ api_name: :Secrets
257
+
258
+ # @!attribute stop_grace_period
259
+ #
260
+ # @return [Integer, nil]
261
+ optional :stop_grace_period, Integer, api_name: :StopGracePeriod
262
+
263
+ # @!attribute stop_signal
264
+ #
265
+ # @return [String, nil]
266
+ optional :stop_signal, String, api_name: :StopSignal
267
+
268
+ # @!attribute sysctls
269
+ #
270
+ # @return [Hash{Symbol=>String}, nil]
271
+ optional :sysctls, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Sysctls
272
+
273
+ # @!attribute tty
274
+ #
275
+ # @return [Boolean, nil]
276
+ optional :tty, DockerEngineRuby::Internal::Type::Boolean, api_name: :TTY
277
+
278
+ # @!attribute ulimits
279
+ #
280
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Ulimit>, nil]
281
+ optional :ulimits,
282
+ -> {
283
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::ContainerSpec::Ulimit]
284
+ },
285
+ api_name: :Ulimits
286
+
287
+ # @!attribute user
288
+ #
289
+ # @return [String, nil]
290
+ optional :user, String, api_name: :User
291
+
292
+ # @!method initialize(args: nil, capability_add: nil, capability_drop: nil, command: nil, configs: nil, dir: nil, dns_config: nil, env: nil, groups: nil, health_check: nil, hostname: nil, hosts: nil, image: nil, init: nil, isolation: nil, labels: nil, mounts: nil, oom_score_adj: nil, open_stdin: nil, privileges: nil, read_only: nil, secrets: nil, stop_grace_period: nil, stop_signal: nil, sysctls: nil, tty: nil, ulimits: nil, user: nil)
293
+ # Some parameter documentations has been truncated, see
294
+ # {DockerEngineRuby::Models::TaskSpec::ContainerSpec} for more details.
295
+ #
296
+ # Container spec for the service.
297
+ #
298
+ # <p><br /></p>
299
+ #
300
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
301
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
302
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
303
+ #
304
+ # @param args [Array<String>]
305
+ #
306
+ # @param capability_add [Array<String>]
307
+ #
308
+ # @param capability_drop [Array<String>]
309
+ #
310
+ # @param command [Array<String>]
311
+ #
312
+ # @param configs [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Config>]
313
+ #
314
+ # @param dir [String]
315
+ #
316
+ # @param dns_config [DockerEngineRuby::Models::TaskSpec::ContainerSpec::DNSConfig]
317
+ #
318
+ # @param env [Array<String>]
319
+ #
320
+ # @param groups [Array<String>]
321
+ #
322
+ # @param health_check [DockerEngineRuby::Models::TaskSpec::ContainerSpec::HealthCheck] A test to perform to check that the container is healthy.
323
+ #
324
+ # @param hostname [String]
325
+ #
326
+ # @param hosts [Array<String>]
327
+ #
328
+ # @param image [String]
329
+ #
330
+ # @param init [Boolean, nil]
331
+ #
332
+ # @param isolation [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Isolation]
333
+ #
334
+ # @param labels [Hash{Symbol=>String}]
335
+ #
336
+ # @param mounts [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount>]
337
+ #
338
+ # @param oom_score_adj [Integer]
339
+ #
340
+ # @param open_stdin [Boolean]
341
+ #
342
+ # @param privileges [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges]
343
+ #
344
+ # @param read_only [Boolean]
345
+ #
346
+ # @param secrets [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Secret>]
347
+ #
348
+ # @param stop_grace_period [Integer]
349
+ #
350
+ # @param stop_signal [String]
351
+ #
352
+ # @param sysctls [Hash{Symbol=>String}]
353
+ #
354
+ # @param tty [Boolean]
355
+ #
356
+ # @param ulimits [Array<DockerEngineRuby::Models::TaskSpec::ContainerSpec::Ulimit>]
357
+ #
358
+ # @param user [String]
359
+
360
+ class Config < DockerEngineRuby::Internal::Type::BaseModel
361
+ # @!attribute config_id
362
+ #
363
+ # @return [String, nil]
364
+ optional :config_id, String, api_name: :ConfigID
365
+
366
+ # @!attribute config_name
367
+ #
368
+ # @return [String, nil]
369
+ optional :config_name, String, api_name: :ConfigName
370
+
371
+ # @!attribute file
372
+ #
373
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Config::File, nil]
374
+ optional :file, -> { DockerEngineRuby::TaskSpec::ContainerSpec::Config::File }, api_name: :File
375
+
376
+ # @!attribute runtime
377
+ #
378
+ # @return [Hash{Symbol=>Object}, nil]
379
+ optional :runtime,
380
+ DockerEngineRuby::Internal::Type::HashOf[DockerEngineRuby::Internal::Type::Unknown],
381
+ api_name: :Runtime
382
+
383
+ # @!method initialize(config_id: nil, config_name: nil, file: nil, runtime: nil)
384
+ # @param config_id [String]
385
+ # @param config_name [String]
386
+ # @param file [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Config::File]
387
+ # @param runtime [Hash{Symbol=>Object}]
388
+
389
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Config#file
390
+ class File < DockerEngineRuby::Internal::Type::BaseModel
391
+ # @!attribute gid
392
+ #
393
+ # @return [String, nil]
394
+ optional :gid, String, api_name: :GID
395
+
396
+ # @!attribute mode
397
+ #
398
+ # @return [Integer, nil]
399
+ optional :mode, Integer, api_name: :Mode
400
+
401
+ # @!attribute name
402
+ #
403
+ # @return [String, nil]
404
+ optional :name, String, api_name: :Name
405
+
406
+ # @!attribute uid
407
+ #
408
+ # @return [String, nil]
409
+ optional :uid, String, api_name: :UID
410
+
411
+ # @!method initialize(gid: nil, mode: nil, name: nil, uid: nil)
412
+ # @param gid [String]
413
+ # @param mode [Integer]
414
+ # @param name [String]
415
+ # @param uid [String]
416
+ end
417
+ end
418
+
419
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec#dns_config
420
+ class DNSConfig < DockerEngineRuby::Internal::Type::BaseModel
421
+ # @!attribute nameservers
422
+ #
423
+ # @return [Array<String>, nil]
424
+ optional :nameservers, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Nameservers
425
+
426
+ # @!attribute options
427
+ #
428
+ # @return [Array<String>, nil]
429
+ optional :options, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Options
430
+
431
+ # @!attribute search
432
+ #
433
+ # @return [Array<String>, nil]
434
+ optional :search, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Search
435
+
436
+ # @!method initialize(nameservers: nil, options: nil, search: nil)
437
+ # @param nameservers [Array<String>]
438
+ # @param options [Array<String>]
439
+ # @param search [Array<String>]
440
+ end
441
+
442
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec#health_check
443
+ class HealthCheck < DockerEngineRuby::Internal::Type::BaseModel
444
+ # @!attribute interval
445
+ # The time to wait between checks in nanoseconds. It should be 0 or at least
446
+ # 1000000 (1 ms). 0 means inherit.
447
+ #
448
+ # @return [Integer, nil]
449
+ optional :interval, Integer, api_name: :Interval
450
+
451
+ # @!attribute retries
452
+ # The number of consecutive failures needed to consider a container as unhealthy.
453
+ # 0 means inherit.
454
+ #
455
+ # @return [Integer, nil]
456
+ optional :retries, Integer, api_name: :Retries
457
+
458
+ # @!attribute start_interval
459
+ # The time to wait between checks in nanoseconds during the start period. It
460
+ # should be 0 or at least 1000000 (1 ms). 0 means inherit.
461
+ #
462
+ # @return [Integer, nil]
463
+ optional :start_interval, Integer, api_name: :StartInterval
464
+
465
+ # @!attribute start_period
466
+ # Start period for the container to initialize before starting health-retries
467
+ # countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means
468
+ # inherit.
469
+ #
470
+ # @return [Integer, nil]
471
+ optional :start_period, Integer, api_name: :StartPeriod
472
+
473
+ # @!attribute test_
474
+ # The test to perform. Possible values are:
475
+ #
476
+ # - `[]` inherit healthcheck from image or parent image
477
+ # - `["NONE"]` disable healthcheck
478
+ # - `["CMD", args...]` exec arguments directly
479
+ # - `["CMD-SHELL", command]` run command with system's default shell
480
+ #
481
+ # A non-zero exit code indicates a failed healthcheck:
482
+ #
483
+ # - `0` healthy
484
+ # - `1` unhealthy
485
+ # - `2` reserved (treated as unhealthy)
486
+ # - other values: error running probe
487
+ #
488
+ # @return [Array<String>, nil]
489
+ optional :test_, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Test
490
+
491
+ # @!attribute timeout
492
+ # The time to wait before considering the check to have hung. It should be 0 or at
493
+ # least 1000000 (1 ms). 0 means inherit.
494
+ #
495
+ # If the health check command does not complete within this timeout, the check is
496
+ # considered failed and the health check process is forcibly terminated without a
497
+ # graceful shutdown.
498
+ #
499
+ # @return [Integer, nil]
500
+ optional :timeout, Integer, api_name: :Timeout
501
+
502
+ # @!method initialize(interval: nil, retries: nil, start_interval: nil, start_period: nil, test_: nil, timeout: nil)
503
+ # Some parameter documentations has been truncated, see
504
+ # {DockerEngineRuby::Models::TaskSpec::ContainerSpec::HealthCheck} for more
505
+ # details.
506
+ #
507
+ # A test to perform to check that the container is healthy. Healthcheck commands
508
+ # should be side-effect free.
509
+ #
510
+ # @param interval [Integer] The time to wait between checks in nanoseconds. It should be 0 or at
511
+ #
512
+ # @param retries [Integer] The number of consecutive failures needed to consider a container as
513
+ #
514
+ # @param start_interval [Integer] The time to wait between checks in nanoseconds during the start period.
515
+ #
516
+ # @param start_period [Integer] Start period for the container to initialize before starting
517
+ #
518
+ # @param test_ [Array<String>] The test to perform. Possible values are:
519
+ #
520
+ # @param timeout [Integer] The time to wait before considering the check to have hung. It should
521
+ end
522
+
523
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec#isolation
524
+ module Isolation
525
+ extend DockerEngineRuby::Internal::Type::Enum
526
+
527
+ DEFAULT = :default
528
+ PROCESS = :process
529
+ HYPERV = :hyperv
530
+ EMPTY = :""
531
+
532
+ # @!method self.values
533
+ # @return [Array<Symbol>]
534
+ end
535
+
536
+ class Mount < DockerEngineRuby::Internal::Type::BaseModel
537
+ # @!attribute bind_options
538
+ # Optional configuration for the `bind` type.
539
+ #
540
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::BindOptions, nil]
541
+ optional :bind_options,
542
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Mount::BindOptions },
543
+ api_name: :BindOptions
544
+
545
+ # @!attribute consistency
546
+ # The consistency requirement for the mount: `default`, `consistent`, `cached`, or
547
+ # `delegated`.
548
+ #
549
+ # @return [String, nil]
550
+ optional :consistency, String, api_name: :Consistency
551
+
552
+ # @!attribute image_options
553
+ # Optional configuration for the `image` type.
554
+ #
555
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::ImageOptions, nil]
556
+ optional :image_options,
557
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Mount::ImageOptions },
558
+ api_name: :ImageOptions
559
+
560
+ # @!attribute read_only
561
+ # Whether the mount should be read-only.
562
+ #
563
+ # @return [Boolean, nil]
564
+ optional :read_only, DockerEngineRuby::Internal::Type::Boolean, api_name: :ReadOnly
565
+
566
+ # @!attribute source
567
+ # Mount source (e.g. a volume name, a host path). The source cannot be specified
568
+ # when using `Type=tmpfs`. For `Type=bind`, the source path must either exist, or
569
+ # the `CreateMountpoint` must be set to `true` to create the source path on the
570
+ # host if missing.
571
+ #
572
+ # For `Type=npipe`, the pipe must exist prior to creating the container.
573
+ #
574
+ # @return [String, nil]
575
+ optional :source, String, api_name: :Source
576
+
577
+ # @!attribute target
578
+ # Container path.
579
+ #
580
+ # @return [String, nil]
581
+ optional :target, String, api_name: :Target
582
+
583
+ # @!attribute tmpfs_options
584
+ # Optional configuration for the `tmpfs` type.
585
+ #
586
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::TmpfsOptions, nil]
587
+ optional :tmpfs_options,
588
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Mount::TmpfsOptions },
589
+ api_name: :TmpfsOptions
590
+
591
+ # @!attribute type
592
+ # The mount type. Available types:
593
+ #
594
+ # - `bind` a mount of a file or directory from the host into the container.
595
+ # - `cluster` a Swarm cluster volume.
596
+ # - `image` an OCI image.
597
+ # - `npipe` a named pipe from the host into the container.
598
+ # - `tmpfs` a `tmpfs`.
599
+ # - `volume` a docker volume with the given `Name`.
600
+ #
601
+ # @return [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::Type, nil]
602
+ optional :type, enum: -> { DockerEngineRuby::TaskSpec::ContainerSpec::Mount::Type }, api_name: :Type
603
+
604
+ # @!attribute volume_options
605
+ # Optional configuration for the `volume` type.
606
+ #
607
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::VolumeOptions, nil]
608
+ optional :volume_options,
609
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Mount::VolumeOptions },
610
+ api_name: :VolumeOptions
611
+
612
+ # @!method initialize(bind_options: nil, consistency: nil, image_options: nil, read_only: nil, source: nil, target: nil, tmpfs_options: nil, type: nil, volume_options: nil)
613
+ # Some parameter documentations has been truncated, see
614
+ # {DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount} for more details.
615
+ #
616
+ # @param bind_options [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::BindOptions] Optional configuration for the `bind` type.
617
+ #
618
+ # @param consistency [String] The consistency requirement for the mount: `default`, `consistent`, `cached`, or
619
+ #
620
+ # @param image_options [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::ImageOptions] Optional configuration for the `image` type.
621
+ #
622
+ # @param read_only [Boolean] Whether the mount should be read-only.
623
+ #
624
+ # @param source [String] Mount source (e.g. a volume name, a host path). The source cannot be
625
+ #
626
+ # @param target [String] Container path.
627
+ #
628
+ # @param tmpfs_options [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::TmpfsOptions] Optional configuration for the `tmpfs` type.
629
+ #
630
+ # @param type [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::Type] The mount type. Available types:
631
+ #
632
+ # @param volume_options [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::VolumeOptions] Optional configuration for the `volume` type.
633
+
634
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount#bind_options
635
+ class BindOptions < DockerEngineRuby::Internal::Type::BaseModel
636
+ # @!attribute create_mountpoint
637
+ #
638
+ # @return [Boolean, nil]
639
+ optional :create_mountpoint,
640
+ DockerEngineRuby::Internal::Type::Boolean,
641
+ api_name: :CreateMountpoint
642
+
643
+ # @!attribute non_recursive
644
+ #
645
+ # @return [Boolean, nil]
646
+ optional :non_recursive, DockerEngineRuby::Internal::Type::Boolean, api_name: :NonRecursive
647
+
648
+ # @!attribute propagation
649
+ #
650
+ # @return [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::BindOptions::Propagation, nil]
651
+ optional :propagation,
652
+ enum: -> { DockerEngineRuby::TaskSpec::ContainerSpec::Mount::BindOptions::Propagation },
653
+ api_name: :Propagation
654
+
655
+ # @!attribute read_only_force_recursive
656
+ #
657
+ # @return [Boolean, nil]
658
+ optional :read_only_force_recursive,
659
+ DockerEngineRuby::Internal::Type::Boolean,
660
+ api_name: :ReadOnlyForceRecursive
661
+
662
+ # @!attribute read_only_non_recursive
663
+ #
664
+ # @return [Boolean, nil]
665
+ optional :read_only_non_recursive,
666
+ DockerEngineRuby::Internal::Type::Boolean,
667
+ api_name: :ReadOnlyNonRecursive
668
+
669
+ # @!method initialize(create_mountpoint: nil, non_recursive: nil, propagation: nil, read_only_force_recursive: nil, read_only_non_recursive: nil)
670
+ # Optional configuration for the `bind` type.
671
+ #
672
+ # @param create_mountpoint [Boolean]
673
+ # @param non_recursive [Boolean]
674
+ # @param propagation [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::BindOptions::Propagation]
675
+ # @param read_only_force_recursive [Boolean]
676
+ # @param read_only_non_recursive [Boolean]
677
+
678
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::BindOptions#propagation
679
+ module Propagation
680
+ extend DockerEngineRuby::Internal::Type::Enum
681
+
682
+ PRIVATE = :private
683
+ RPRIVATE = :rprivate
684
+ SHARED = :shared
685
+ RSHARED = :rshared
686
+ SLAVE = :slave
687
+ RSLAVE = :rslave
688
+
689
+ # @!method self.values
690
+ # @return [Array<Symbol>]
691
+ end
692
+ end
693
+
694
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount#image_options
695
+ class ImageOptions < DockerEngineRuby::Internal::Type::BaseModel
696
+ # @!attribute subpath
697
+ #
698
+ # @return [String, nil]
699
+ optional :subpath, String, api_name: :Subpath
700
+
701
+ # @!method initialize(subpath: nil)
702
+ # Optional configuration for the `image` type.
703
+ #
704
+ # @param subpath [String]
705
+ end
706
+
707
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount#tmpfs_options
708
+ class TmpfsOptions < DockerEngineRuby::Internal::Type::BaseModel
709
+ # @!attribute mode
710
+ #
711
+ # @return [Integer, nil]
712
+ optional :mode, Integer, api_name: :Mode
713
+
714
+ # @!attribute options
715
+ #
716
+ # @return [Array<Array<String>>, nil]
717
+ optional :options,
718
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Internal::Type::ArrayOf[String]],
719
+ api_name: :Options
720
+
721
+ # @!attribute size_bytes
722
+ #
723
+ # @return [Integer, nil]
724
+ optional :size_bytes, Integer, api_name: :SizeBytes
725
+
726
+ # @!method initialize(mode: nil, options: nil, size_bytes: nil)
727
+ # Optional configuration for the `tmpfs` type.
728
+ #
729
+ # @param mode [Integer]
730
+ # @param options [Array<Array<String>>]
731
+ # @param size_bytes [Integer]
732
+ end
733
+
734
+ # The mount type. Available types:
735
+ #
736
+ # - `bind` a mount of a file or directory from the host into the container.
737
+ # - `cluster` a Swarm cluster volume.
738
+ # - `image` an OCI image.
739
+ # - `npipe` a named pipe from the host into the container.
740
+ # - `tmpfs` a `tmpfs`.
741
+ # - `volume` a docker volume with the given `Name`.
742
+ #
743
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount#type
744
+ module Type
745
+ extend DockerEngineRuby::Internal::Type::Enum
746
+
747
+ BIND = :bind
748
+ CLUSTER = :cluster
749
+ IMAGE = :image
750
+ NPIPE = :npipe
751
+ TMPFS = :tmpfs
752
+ VOLUME = :volume
753
+
754
+ # @!method self.values
755
+ # @return [Array<Symbol>]
756
+ end
757
+
758
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount#volume_options
759
+ class VolumeOptions < DockerEngineRuby::Internal::Type::BaseModel
760
+ # @!attribute driver_config
761
+ #
762
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::VolumeOptions::DriverConfig, nil]
763
+ optional :driver_config,
764
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Mount::VolumeOptions::DriverConfig },
765
+ api_name: :DriverConfig
766
+
767
+ # @!attribute labels
768
+ #
769
+ # @return [Hash{Symbol=>String}, nil]
770
+ optional :labels, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Labels
771
+
772
+ # @!attribute no_copy
773
+ #
774
+ # @return [Boolean, nil]
775
+ optional :no_copy, DockerEngineRuby::Internal::Type::Boolean, api_name: :NoCopy
776
+
777
+ # @!attribute subpath
778
+ #
779
+ # @return [String, nil]
780
+ optional :subpath, String, api_name: :Subpath
781
+
782
+ # @!method initialize(driver_config: nil, labels: nil, no_copy: nil, subpath: nil)
783
+ # Optional configuration for the `volume` type.
784
+ #
785
+ # @param driver_config [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::VolumeOptions::DriverConfig]
786
+ # @param labels [Hash{Symbol=>String}]
787
+ # @param no_copy [Boolean]
788
+ # @param subpath [String]
789
+
790
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Mount::VolumeOptions#driver_config
791
+ class DriverConfig < DockerEngineRuby::Internal::Type::BaseModel
792
+ # @!attribute name
793
+ #
794
+ # @return [String, nil]
795
+ optional :name, String, api_name: :Name
796
+
797
+ # @!attribute options
798
+ #
799
+ # @return [Hash{Symbol=>String}, nil]
800
+ optional :options, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Options
801
+
802
+ # @!method initialize(name: nil, options: nil)
803
+ # @param name [String]
804
+ # @param options [Hash{Symbol=>String}]
805
+ end
806
+ end
807
+ end
808
+
809
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec#privileges
810
+ class Privileges < DockerEngineRuby::Internal::Type::BaseModel
811
+ # @!attribute app_armor
812
+ #
813
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::AppArmor, nil]
814
+ optional :app_armor,
815
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Privileges::AppArmor },
816
+ api_name: :AppArmor
817
+
818
+ # @!attribute credential_spec
819
+ #
820
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::CredentialSpec, nil]
821
+ optional :credential_spec,
822
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Privileges::CredentialSpec },
823
+ api_name: :CredentialSpec
824
+
825
+ # @!attribute no_new_privileges
826
+ #
827
+ # @return [Boolean, nil]
828
+ optional :no_new_privileges, DockerEngineRuby::Internal::Type::Boolean, api_name: :NoNewPrivileges
829
+
830
+ # @!attribute seccomp
831
+ #
832
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::Seccomp, nil]
833
+ optional :seccomp,
834
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Privileges::Seccomp },
835
+ api_name: :Seccomp
836
+
837
+ # @!attribute se_linux_context
838
+ #
839
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::SeLinuxContext, nil]
840
+ optional :se_linux_context,
841
+ -> { DockerEngineRuby::TaskSpec::ContainerSpec::Privileges::SeLinuxContext },
842
+ api_name: :SELinuxContext
843
+
844
+ # @!method initialize(app_armor: nil, credential_spec: nil, no_new_privileges: nil, seccomp: nil, se_linux_context: nil)
845
+ # @param app_armor [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::AppArmor]
846
+ # @param credential_spec [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::CredentialSpec]
847
+ # @param no_new_privileges [Boolean]
848
+ # @param seccomp [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::Seccomp]
849
+ # @param se_linux_context [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::SeLinuxContext]
850
+
851
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges#app_armor
852
+ class AppArmor < DockerEngineRuby::Internal::Type::BaseModel
853
+ # @!attribute mode
854
+ #
855
+ # @return [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::AppArmor::Mode, nil]
856
+ optional :mode,
857
+ enum: -> { DockerEngineRuby::TaskSpec::ContainerSpec::Privileges::AppArmor::Mode },
858
+ api_name: :Mode
859
+
860
+ # @!method initialize(mode: nil)
861
+ # @param mode [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::AppArmor::Mode]
862
+
863
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::AppArmor#mode
864
+ module Mode
865
+ extend DockerEngineRuby::Internal::Type::Enum
866
+
867
+ DEFAULT = :default
868
+ DISABLED = :disabled
869
+
870
+ # @!method self.values
871
+ # @return [Array<Symbol>]
872
+ end
873
+ end
874
+
875
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges#credential_spec
876
+ class CredentialSpec < DockerEngineRuby::Internal::Type::BaseModel
877
+ # @!attribute config
878
+ #
879
+ # @return [String, nil]
880
+ optional :config, String, api_name: :Config
881
+
882
+ # @!attribute file
883
+ #
884
+ # @return [String, nil]
885
+ optional :file, String, api_name: :File
886
+
887
+ # @!attribute registry
888
+ #
889
+ # @return [String, nil]
890
+ optional :registry, String, api_name: :Registry
891
+
892
+ # @!method initialize(config: nil, file: nil, registry: nil)
893
+ # @param config [String]
894
+ # @param file [String]
895
+ # @param registry [String]
896
+ end
897
+
898
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges#seccomp
899
+ class Seccomp < DockerEngineRuby::Internal::Type::BaseModel
900
+ # @!attribute mode
901
+ #
902
+ # @return [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::Seccomp::Mode, nil]
903
+ optional :mode,
904
+ enum: -> { DockerEngineRuby::TaskSpec::ContainerSpec::Privileges::Seccomp::Mode },
905
+ api_name: :Mode
906
+
907
+ # @!attribute profile
908
+ #
909
+ # @return [String, nil]
910
+ optional :profile, String, api_name: :Profile
911
+
912
+ # @!method initialize(mode: nil, profile: nil)
913
+ # @param mode [Symbol, DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::Seccomp::Mode]
914
+ # @param profile [String]
915
+
916
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges::Seccomp#mode
917
+ module Mode
918
+ extend DockerEngineRuby::Internal::Type::Enum
919
+
920
+ DEFAULT = :default
921
+ UNCONFINED = :unconfined
922
+ CUSTOM = :custom
923
+
924
+ # @!method self.values
925
+ # @return [Array<Symbol>]
926
+ end
927
+ end
928
+
929
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Privileges#se_linux_context
930
+ class SeLinuxContext < DockerEngineRuby::Internal::Type::BaseModel
931
+ # @!attribute disable
932
+ #
933
+ # @return [Boolean, nil]
934
+ optional :disable, DockerEngineRuby::Internal::Type::Boolean, api_name: :Disable
935
+
936
+ # @!attribute level
937
+ #
938
+ # @return [String, nil]
939
+ optional :level, String, api_name: :Level
940
+
941
+ # @!attribute role
942
+ #
943
+ # @return [String, nil]
944
+ optional :role, String, api_name: :Role
945
+
946
+ # @!attribute type
947
+ #
948
+ # @return [String, nil]
949
+ optional :type, String, api_name: :Type
950
+
951
+ # @!attribute user
952
+ #
953
+ # @return [String, nil]
954
+ optional :user, String, api_name: :User
955
+
956
+ # @!method initialize(disable: nil, level: nil, role: nil, type: nil, user: nil)
957
+ # @param disable [Boolean]
958
+ # @param level [String]
959
+ # @param role [String]
960
+ # @param type [String]
961
+ # @param user [String]
962
+ end
963
+ end
964
+
965
+ class Secret < DockerEngineRuby::Internal::Type::BaseModel
966
+ # @!attribute file
967
+ #
968
+ # @return [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Secret::File, nil]
969
+ optional :file, -> { DockerEngineRuby::TaskSpec::ContainerSpec::Secret::File }, api_name: :File
970
+
971
+ # @!attribute secret_id
972
+ #
973
+ # @return [String, nil]
974
+ optional :secret_id, String, api_name: :SecretID
975
+
976
+ # @!attribute secret_name
977
+ #
978
+ # @return [String, nil]
979
+ optional :secret_name, String, api_name: :SecretName
980
+
981
+ # @!method initialize(file: nil, secret_id: nil, secret_name: nil)
982
+ # @param file [DockerEngineRuby::Models::TaskSpec::ContainerSpec::Secret::File]
983
+ # @param secret_id [String]
984
+ # @param secret_name [String]
985
+
986
+ # @see DockerEngineRuby::Models::TaskSpec::ContainerSpec::Secret#file
987
+ class File < DockerEngineRuby::Internal::Type::BaseModel
988
+ # @!attribute gid
989
+ #
990
+ # @return [String, nil]
991
+ optional :gid, String, api_name: :GID
992
+
993
+ # @!attribute mode
994
+ #
995
+ # @return [Integer, nil]
996
+ optional :mode, Integer, api_name: :Mode
997
+
998
+ # @!attribute name
999
+ #
1000
+ # @return [String, nil]
1001
+ optional :name, String, api_name: :Name
1002
+
1003
+ # @!attribute uid
1004
+ #
1005
+ # @return [String, nil]
1006
+ optional :uid, String, api_name: :UID
1007
+
1008
+ # @!method initialize(gid: nil, mode: nil, name: nil, uid: nil)
1009
+ # @param gid [String]
1010
+ # @param mode [Integer]
1011
+ # @param name [String]
1012
+ # @param uid [String]
1013
+ end
1014
+ end
1015
+
1016
+ class Ulimit < DockerEngineRuby::Internal::Type::BaseModel
1017
+ # @!attribute hard
1018
+ #
1019
+ # @return [Integer, nil]
1020
+ optional :hard, Integer, api_name: :Hard
1021
+
1022
+ # @!attribute name
1023
+ #
1024
+ # @return [String, nil]
1025
+ optional :name, String, api_name: :Name
1026
+
1027
+ # @!attribute soft
1028
+ #
1029
+ # @return [Integer, nil]
1030
+ optional :soft, Integer, api_name: :Soft
1031
+
1032
+ # @!method initialize(hard: nil, name: nil, soft: nil)
1033
+ # @param hard [Integer]
1034
+ # @param name [String]
1035
+ # @param soft [Integer]
1036
+ end
1037
+ end
1038
+
1039
+ # @see DockerEngineRuby::Models::TaskSpec#log_driver
1040
+ class LogDriver < DockerEngineRuby::Internal::Type::BaseModel
1041
+ # @!attribute name
1042
+ #
1043
+ # @return [String, nil]
1044
+ optional :name, String, api_name: :Name
1045
+
1046
+ # @!attribute options
1047
+ #
1048
+ # @return [Hash{Symbol=>String}, nil]
1049
+ optional :options, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Options
1050
+
1051
+ # @!method initialize(name: nil, options: nil)
1052
+ # Specifies the log driver to use for tasks created from this spec. If not
1053
+ # present, the default one for the swarm will be used, finally falling back to the
1054
+ # engine default if not specified.
1055
+ #
1056
+ # @param name [String]
1057
+ # @param options [Hash{Symbol=>String}]
1058
+ end
1059
+
1060
+ # @see DockerEngineRuby::Models::TaskSpec#network_attachment_spec
1061
+ class NetworkAttachmentSpec < DockerEngineRuby::Internal::Type::BaseModel
1062
+ # @!attribute container_id
1063
+ #
1064
+ # @return [String, nil]
1065
+ optional :container_id, String, api_name: :ContainerID
1066
+
1067
+ # @!method initialize(container_id: nil)
1068
+ # Read-only spec type for non-swarm containers attached to swarm overlay networks.
1069
+ #
1070
+ # <p><br /></p>
1071
+ #
1072
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
1073
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
1074
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
1075
+ #
1076
+ # @param container_id [String]
1077
+ end
1078
+
1079
+ class Network < DockerEngineRuby::Internal::Type::BaseModel
1080
+ # @!attribute aliases
1081
+ # Discoverable alternate names for the service on this network.
1082
+ #
1083
+ # @return [Array<String>, nil]
1084
+ optional :aliases, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Aliases
1085
+
1086
+ # @!attribute driver_opts
1087
+ # Driver attachment options for the network target.
1088
+ #
1089
+ # @return [Hash{Symbol=>String}, nil]
1090
+ optional :driver_opts, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :DriverOpts
1091
+
1092
+ # @!attribute target
1093
+ # The target network for attachment. Must be a network name or ID.
1094
+ #
1095
+ # @return [String, nil]
1096
+ optional :target, String, api_name: :Target
1097
+
1098
+ # @!method initialize(aliases: nil, driver_opts: nil, target: nil)
1099
+ # Specifies how a service should be attached to a particular network.
1100
+ #
1101
+ # @param aliases [Array<String>] Discoverable alternate names for the service on this network.
1102
+ #
1103
+ # @param driver_opts [Hash{Symbol=>String}] Driver attachment options for the network target.
1104
+ #
1105
+ # @param target [String] The target network for attachment. Must be a network name or ID.
1106
+ end
1107
+
1108
+ # @see DockerEngineRuby::Models::TaskSpec#placement
1109
+ class Placement < DockerEngineRuby::Internal::Type::BaseModel
1110
+ # @!attribute constraints
1111
+ #
1112
+ # @return [Array<String>, nil]
1113
+ optional :constraints, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Constraints
1114
+
1115
+ # @!attribute max_replicas
1116
+ #
1117
+ # @return [Integer, nil]
1118
+ optional :max_replicas, Integer, api_name: :MaxReplicas
1119
+
1120
+ # @!attribute platforms
1121
+ #
1122
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::Placement::Platform>, nil]
1123
+ optional :platforms,
1124
+ -> {
1125
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::Placement::Platform]
1126
+ },
1127
+ api_name: :Platforms
1128
+
1129
+ # @!attribute preferences
1130
+ #
1131
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::Placement::Preference>, nil]
1132
+ optional :preferences,
1133
+ -> {
1134
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::Placement::Preference]
1135
+ },
1136
+ api_name: :Preferences
1137
+
1138
+ # @!method initialize(constraints: nil, max_replicas: nil, platforms: nil, preferences: nil)
1139
+ # @param constraints [Array<String>]
1140
+ # @param max_replicas [Integer]
1141
+ # @param platforms [Array<DockerEngineRuby::Models::TaskSpec::Placement::Platform>]
1142
+ # @param preferences [Array<DockerEngineRuby::Models::TaskSpec::Placement::Preference>]
1143
+
1144
+ class Platform < DockerEngineRuby::Internal::Type::BaseModel
1145
+ # @!attribute architecture
1146
+ # Architecture represents the hardware architecture (for example, `x86_64`).
1147
+ #
1148
+ # @return [String, nil]
1149
+ optional :architecture, String, api_name: :Architecture
1150
+
1151
+ # @!attribute os
1152
+ # OS represents the Operating System (for example, `linux` or `windows`).
1153
+ #
1154
+ # @return [String, nil]
1155
+ optional :os, String, api_name: :OS
1156
+
1157
+ # @!method initialize(architecture: nil, os: nil)
1158
+ # Some parameter documentations has been truncated, see
1159
+ # {DockerEngineRuby::Models::TaskSpec::Placement::Platform} for more details.
1160
+ #
1161
+ # Platform represents the platform (Arch/OS).
1162
+ #
1163
+ # @param architecture [String] Architecture represents the hardware architecture (for example,
1164
+ #
1165
+ # @param os [String] OS represents the Operating System (for example, `linux` or `windows`).
1166
+ end
1167
+
1168
+ class Preference < DockerEngineRuby::Internal::Type::BaseModel
1169
+ # @!attribute spread
1170
+ #
1171
+ # @return [DockerEngineRuby::Models::TaskSpec::Placement::Preference::Spread, nil]
1172
+ optional :spread,
1173
+ -> {
1174
+ DockerEngineRuby::TaskSpec::Placement::Preference::Spread
1175
+ },
1176
+ api_name: :Spread
1177
+
1178
+ # @!method initialize(spread: nil)
1179
+ # @param spread [DockerEngineRuby::Models::TaskSpec::Placement::Preference::Spread]
1180
+
1181
+ # @see DockerEngineRuby::Models::TaskSpec::Placement::Preference#spread
1182
+ class Spread < DockerEngineRuby::Internal::Type::BaseModel
1183
+ # @!attribute spread_descriptor
1184
+ #
1185
+ # @return [String, nil]
1186
+ optional :spread_descriptor, String, api_name: :SpreadDescriptor
1187
+
1188
+ # @!method initialize(spread_descriptor: nil)
1189
+ # @param spread_descriptor [String]
1190
+ end
1191
+ end
1192
+ end
1193
+
1194
+ # @see DockerEngineRuby::Models::TaskSpec#plugin_spec
1195
+ class PluginSpec < DockerEngineRuby::Internal::Type::BaseModel
1196
+ # @!attribute disabled
1197
+ #
1198
+ # @return [Boolean, nil]
1199
+ optional :disabled, DockerEngineRuby::Internal::Type::Boolean, api_name: :Disabled
1200
+
1201
+ # @!attribute name
1202
+ #
1203
+ # @return [String, nil]
1204
+ optional :name, String, api_name: :Name
1205
+
1206
+ # @!attribute plugin_privilege
1207
+ #
1208
+ # @return [Array<DockerEngineRuby::Models::Privilege>, nil]
1209
+ optional :plugin_privilege,
1210
+ -> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Privilege] },
1211
+ api_name: :PluginPrivilege
1212
+
1213
+ # @!attribute remote
1214
+ #
1215
+ # @return [String, nil]
1216
+ optional :remote, String, api_name: :Remote
1217
+
1218
+ # @!method initialize(disabled: nil, name: nil, plugin_privilege: nil, remote: nil)
1219
+ # Plugin spec for the service. _(Experimental release only.)_
1220
+ #
1221
+ # <p><br /></p>
1222
+ #
1223
+ # > **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually
1224
+ # > exclusive. PluginSpec is only used when the Runtime field is set to `plugin`.
1225
+ # > NetworkAttachmentSpec is used when the Runtime field is set to `attachment`.
1226
+ #
1227
+ # @param disabled [Boolean]
1228
+ # @param name [String]
1229
+ # @param plugin_privilege [Array<DockerEngineRuby::Models::Privilege>]
1230
+ # @param remote [String]
1231
+ end
1232
+
1233
+ # @see DockerEngineRuby::Models::TaskSpec#resources
1234
+ class Resources < DockerEngineRuby::Internal::Type::BaseModel
1235
+ # @!attribute limits
1236
+ # An object describing a limit on resources which can be requested by a task.
1237
+ #
1238
+ # @return [DockerEngineRuby::Models::TaskSpec::Resources::Limits, nil]
1239
+ optional :limits, -> { DockerEngineRuby::TaskSpec::Resources::Limits }, api_name: :Limits
1240
+
1241
+ # @!attribute memory_swappiness
1242
+ #
1243
+ # @return [Integer, nil]
1244
+ optional :memory_swappiness, Integer, api_name: :MemorySwappiness, nil?: true
1245
+
1246
+ # @!attribute reservations
1247
+ # An object describing the resources which can be advertised by a node and
1248
+ # requested by a task.
1249
+ #
1250
+ # @return [DockerEngineRuby::Models::TaskSpec::Resources::Reservations, nil]
1251
+ optional :reservations,
1252
+ -> { DockerEngineRuby::TaskSpec::Resources::Reservations },
1253
+ api_name: :Reservations
1254
+
1255
+ # @!attribute swap_bytes
1256
+ #
1257
+ # @return [Integer, nil]
1258
+ optional :swap_bytes, Integer, api_name: :SwapBytes, nil?: true
1259
+
1260
+ # @!method initialize(limits: nil, memory_swappiness: nil, reservations: nil, swap_bytes: nil)
1261
+ # Some parameter documentations has been truncated, see
1262
+ # {DockerEngineRuby::Models::TaskSpec::Resources} for more details.
1263
+ #
1264
+ # Resource requirements which apply to each individual container created as part
1265
+ # of the service.
1266
+ #
1267
+ # @param limits [DockerEngineRuby::Models::TaskSpec::Resources::Limits] An object describing a limit on resources which can be requested by a task.
1268
+ #
1269
+ # @param memory_swappiness [Integer, nil]
1270
+ #
1271
+ # @param reservations [DockerEngineRuby::Models::TaskSpec::Resources::Reservations] An object describing the resources which can be advertised by a node and
1272
+ #
1273
+ # @param swap_bytes [Integer, nil]
1274
+
1275
+ # @see DockerEngineRuby::Models::TaskSpec::Resources#limits
1276
+ class Limits < DockerEngineRuby::Internal::Type::BaseModel
1277
+ # @!attribute memory_bytes
1278
+ #
1279
+ # @return [Integer, nil]
1280
+ optional :memory_bytes, Integer, api_name: :MemoryBytes
1281
+
1282
+ # @!attribute nano_cpus
1283
+ #
1284
+ # @return [Integer, nil]
1285
+ optional :nano_cpus, Integer, api_name: :NanoCPUs
1286
+
1287
+ # @!attribute pids
1288
+ # Limits the maximum number of PIDs in the container. Set `0` for unlimited.
1289
+ #
1290
+ # @return [Integer, nil]
1291
+ optional :pids, Integer, api_name: :Pids
1292
+
1293
+ # @!method initialize(memory_bytes: nil, nano_cpus: nil, pids: nil)
1294
+ # An object describing a limit on resources which can be requested by a task.
1295
+ #
1296
+ # @param memory_bytes [Integer]
1297
+ #
1298
+ # @param nano_cpus [Integer]
1299
+ #
1300
+ # @param pids [Integer] Limits the maximum number of PIDs in the container. Set `0` for unlimited.
1301
+ end
1302
+
1303
+ # @see DockerEngineRuby::Models::TaskSpec::Resources#reservations
1304
+ class Reservations < DockerEngineRuby::Internal::Type::BaseModel
1305
+ # @!attribute generic_resources
1306
+ #
1307
+ # @return [Array<DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource>, nil]
1308
+ optional :generic_resources,
1309
+ -> {
1310
+ DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::TaskSpec::Resources::Reservations::GenericResource]
1311
+ },
1312
+ api_name: :GenericResources
1313
+
1314
+ # @!attribute memory_bytes
1315
+ #
1316
+ # @return [Integer, nil]
1317
+ optional :memory_bytes, Integer, api_name: :MemoryBytes
1318
+
1319
+ # @!attribute nano_cpus
1320
+ #
1321
+ # @return [Integer, nil]
1322
+ optional :nano_cpus, Integer, api_name: :NanoCPUs
1323
+
1324
+ # @!method initialize(generic_resources: nil, memory_bytes: nil, nano_cpus: nil)
1325
+ # An object describing the resources which can be advertised by a node and
1326
+ # requested by a task.
1327
+ #
1328
+ # @param generic_resources [Array<DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource>]
1329
+ # @param memory_bytes [Integer]
1330
+ # @param nano_cpus [Integer]
1331
+
1332
+ class GenericResource < DockerEngineRuby::Internal::Type::BaseModel
1333
+ # @!attribute discrete_resource_spec
1334
+ #
1335
+ # @return [DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource::DiscreteResourceSpec, nil]
1336
+ optional :discrete_resource_spec,
1337
+ -> {
1338
+ DockerEngineRuby::TaskSpec::Resources::Reservations::GenericResource::DiscreteResourceSpec
1339
+ },
1340
+ api_name: :DiscreteResourceSpec
1341
+
1342
+ # @!attribute named_resource_spec
1343
+ #
1344
+ # @return [DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource::NamedResourceSpec, nil]
1345
+ optional :named_resource_spec,
1346
+ -> {
1347
+ DockerEngineRuby::TaskSpec::Resources::Reservations::GenericResource::NamedResourceSpec
1348
+ },
1349
+ api_name: :NamedResourceSpec
1350
+
1351
+ # @!method initialize(discrete_resource_spec: nil, named_resource_spec: nil)
1352
+ # @param discrete_resource_spec [DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource::DiscreteResourceSpec]
1353
+ # @param named_resource_spec [DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource::NamedResourceSpec]
1354
+
1355
+ # @see DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource#discrete_resource_spec
1356
+ class DiscreteResourceSpec < DockerEngineRuby::Internal::Type::BaseModel
1357
+ # @!attribute kind
1358
+ #
1359
+ # @return [String, nil]
1360
+ optional :kind, String, api_name: :Kind
1361
+
1362
+ # @!attribute value
1363
+ #
1364
+ # @return [Integer, nil]
1365
+ optional :value, Integer, api_name: :Value
1366
+
1367
+ # @!method initialize(kind: nil, value: nil)
1368
+ # @param kind [String]
1369
+ # @param value [Integer]
1370
+ end
1371
+
1372
+ # @see DockerEngineRuby::Models::TaskSpec::Resources::Reservations::GenericResource#named_resource_spec
1373
+ class NamedResourceSpec < DockerEngineRuby::Internal::Type::BaseModel
1374
+ # @!attribute kind
1375
+ #
1376
+ # @return [String, nil]
1377
+ optional :kind, String, api_name: :Kind
1378
+
1379
+ # @!attribute value
1380
+ #
1381
+ # @return [String, nil]
1382
+ optional :value, String, api_name: :Value
1383
+
1384
+ # @!method initialize(kind: nil, value: nil)
1385
+ # @param kind [String]
1386
+ # @param value [String]
1387
+ end
1388
+ end
1389
+ end
1390
+ end
1391
+
1392
+ # @see DockerEngineRuby::Models::TaskSpec#restart_policy
1393
+ class RestartPolicy < DockerEngineRuby::Internal::Type::BaseModel
1394
+ # @!attribute condition
1395
+ #
1396
+ # @return [Symbol, DockerEngineRuby::Models::TaskSpec::RestartPolicy::Condition, nil]
1397
+ optional :condition,
1398
+ enum: -> { DockerEngineRuby::TaskSpec::RestartPolicy::Condition },
1399
+ api_name: :Condition
1400
+
1401
+ # @!attribute delay
1402
+ #
1403
+ # @return [Integer, nil]
1404
+ optional :delay, Integer, api_name: :Delay
1405
+
1406
+ # @!attribute max_attempts
1407
+ #
1408
+ # @return [Integer, nil]
1409
+ optional :max_attempts, Integer, api_name: :MaxAttempts
1410
+
1411
+ # @!attribute window
1412
+ #
1413
+ # @return [Integer, nil]
1414
+ optional :window, Integer, api_name: :Window
1415
+
1416
+ # @!method initialize(condition: nil, delay: nil, max_attempts: nil, window: nil)
1417
+ # Specification for the restart policy which applies to containers created as part
1418
+ # of this service.
1419
+ #
1420
+ # @param condition [Symbol, DockerEngineRuby::Models::TaskSpec::RestartPolicy::Condition]
1421
+ # @param delay [Integer]
1422
+ # @param max_attempts [Integer]
1423
+ # @param window [Integer]
1424
+
1425
+ # @see DockerEngineRuby::Models::TaskSpec::RestartPolicy#condition
1426
+ module Condition
1427
+ extend DockerEngineRuby::Internal::Type::Enum
1428
+
1429
+ NONE = :none
1430
+ ON_FAILURE = :"on-failure"
1431
+ ANY = :any
1432
+
1433
+ # @!method self.values
1434
+ # @return [Array<Symbol>]
1435
+ end
1436
+ end
1437
+ end
1438
+ end
1439
+ end