Repository navigation
Expand file tree
/
Copy pathMountBindOptions.php
More file actions
167 lines (146 loc) · 4.88 KB
/
Copy pathMountBindOptions.php
File metadata and controls
167 lines (146 loc) · 4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php
declare(strict_types=1);
namespace Docker\API\Model;
use Docker\API\Runtime\AdditionalAndPatternProperties;
use Docker\API\Runtime\AdditionalPropertiesInterface;
class MountBindOptions implements AdditionalPropertiesInterface
{
use AdditionalAndPatternProperties;
/**
* @var array
*/
protected $initialized = [];
public function isInitialized($property): bool
{
return \array_key_exists($property, $this->initialized);
}
/**
* A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
*
* @var string|null
*/
protected $propagation;
/**
* Disable recursive bind mount.
*
* @var bool|null
*/
protected $nonRecursive = false;
/**
* Create mount point on host if missing.
*
* @var bool|null
*/
protected $createMountpoint = false;
/**
* Make the mount non-recursively read-only, but still leave the mount recursive
* (unless NonRecursive is set to `true` in conjunction).
*
* Added in v1.44, before that version all read-only mounts were
* non-recursive by default. To match the previous behaviour this
* will default to `true` for clients on versions prior to v1.44.
*
* @var bool|null
*/
protected $readOnlyNonRecursive = false;
/**
* Raise an error if the mount cannot be made recursively read-only.
*
* @var bool|null
*/
protected $readOnlyForceRecursive = false;
/**
* A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
*/
public function getPropagation(): ?string
{
return $this->propagation;
}
/**
* A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
*/
public function setPropagation(?string $propagation): self
{
$this->initialized['propagation'] = true;
$this->propagation = $propagation;
return $this;
}
/**
* Disable recursive bind mount.
*/
public function getNonRecursive(): ?bool
{
return $this->nonRecursive;
}
/**
* Disable recursive bind mount.
*/
public function setNonRecursive(?bool $nonRecursive): self
{
$this->initialized['nonRecursive'] = true;
$this->nonRecursive = $nonRecursive;
return $this;
}
/**
* Create mount point on host if missing.
*/
public function getCreateMountpoint(): ?bool
{
return $this->createMountpoint;
}
/**
* Create mount point on host if missing.
*/
public function setCreateMountpoint(?bool $createMountpoint): self
{
$this->initialized['createMountpoint'] = true;
$this->createMountpoint = $createMountpoint;
return $this;
}
/**
* Make the mount non-recursively read-only, but still leave the mount recursive
* (unless NonRecursive is set to `true` in conjunction).
*
* Added in v1.44, before that version all read-only mounts were
* non-recursive by default. To match the previous behaviour this
* will default to `true` for clients on versions prior to v1.44.
*/
public function getReadOnlyNonRecursive(): ?bool
{
return $this->readOnlyNonRecursive;
}
/**
* Make the mount non-recursively read-only, but still leave the mount recursive
* (unless NonRecursive is set to `true` in conjunction).
*
* Added in v1.44, before that version all read-only mounts were
* non-recursive by default. To match the previous behaviour this
* will default to `true` for clients on versions prior to v1.44.
*/
public function setReadOnlyNonRecursive(?bool $readOnlyNonRecursive): self
{
$this->initialized['readOnlyNonRecursive'] = true;
$this->readOnlyNonRecursive = $readOnlyNonRecursive;
return $this;
}
/**
* Raise an error if the mount cannot be made recursively read-only.
*/
public function getReadOnlyForceRecursive(): ?bool
{
return $this->readOnlyForceRecursive;
}
/**
* Raise an error if the mount cannot be made recursively read-only.
*/
public function setReadOnlyForceRecursive(?bool $readOnlyForceRecursive): self
{
$this->initialized['readOnlyForceRecursive'] = true;
$this->readOnlyForceRecursive = $readOnlyForceRecursive;
return $this;
}
public function definedProperties(): array
{
return ['propagation' => ['Propagation', 'getPropagation', 'setPropagation'], 'nonRecursive' => ['NonRecursive', 'getNonRecursive', 'setNonRecursive'], 'createMountpoint' => ['CreateMountpoint', 'getCreateMountpoint', 'setCreateMountpoint'], 'readOnlyNonRecursive' => ['ReadOnlyNonRecursive', 'getReadOnlyNonRecursive', 'setReadOnlyNonRecursive'], 'readOnlyForceRecursive' => ['ReadOnlyForceRecursive', 'getReadOnlyForceRecursive', 'setReadOnlyForceRecursive']];
}
}