Skip to content

Commit 3e3c5e5

Browse files
committed
Update part of apis to 1.37
1 parent 2122188 commit 3e3c5e5

18 files changed

Lines changed: 923 additions & 564 deletions

src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java

Lines changed: 99 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.github.dockerjava.api.exception.NotFoundException;
55
import com.github.dockerjava.api.model.AuthConfig;
66
import com.github.dockerjava.api.model.ExposedPort;
7+
import com.github.dockerjava.api.model.HealthCheck;
78
import com.github.dockerjava.api.model.HostConfig;
89
import com.github.dockerjava.api.model.Volume;
910

@@ -16,171 +17,186 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
1617
@CheckForNull
1718
AuthConfig getAuthConfig();
1819

20+
/**
21+
* While using swarm classic, you can provide an optional auth config which will be used to pull images from a private registry,
22+
* if the swarm node does not already have the docker image.
23+
* Note: This option does not have any effect in normal docker
24+
*
25+
* @param authConfig The optional auth config
26+
*/
27+
CreateContainerCmd withAuthConfig(AuthConfig authConfig);
28+
1929
@CheckForNull
2030
List<String> getAliases();
2131

32+
/**
33+
* Add network-scoped alias for the container
34+
*
35+
* @param aliases on ore more aliases
36+
*/
37+
CreateContainerCmd withAliases(List<String> aliases);
38+
39+
/**
40+
* Add network-scoped alias for the container
41+
*
42+
* @param aliases on ore more aliases
43+
*/
44+
CreateContainerCmd withAliases(String... aliases);
45+
2246
@CheckForNull
2347
String[] getCmd();
2448

49+
CreateContainerCmd withCmd(String... cmd);
50+
51+
CreateContainerCmd withCmd(List<String> cmd);
52+
53+
@CheckForNull
54+
HealthCheck getHealthcheck();
55+
56+
CreateContainerCmd withHealthcheck(HealthCheck healthCheck);
57+
58+
@CheckForNull
59+
Boolean getArgsEscaped();
60+
61+
CreateContainerCmd withArgsEscaped(Boolean argsEscaped);
62+
2563
@CheckForNull
2664
String getDomainName();
2765

66+
CreateContainerCmd withDomainName(String domainName);
67+
2868
@CheckForNull
2969
String[] getEntrypoint();
3070

71+
CreateContainerCmd withEntrypoint(String... entrypoint);
72+
73+
CreateContainerCmd withEntrypoint(List<String> entrypoint);
74+
3175
@CheckForNull
3276
String[] getEnv();
3377

78+
CreateContainerCmd withEnv(String... env);
79+
80+
CreateContainerCmd withEnv(List<String> env);
81+
3482
@CheckForNull
3583
ExposedPort[] getExposedPorts();
3684

85+
CreateContainerCmd withExposedPorts(List<ExposedPort> exposedPorts);
86+
87+
CreateContainerCmd withExposedPorts(ExposedPort... exposedPorts);
88+
3789
@CheckForNull
3890
String getStopSignal();
3991

92+
CreateContainerCmd withStopSignal(String stopSignal);
93+
4094
@CheckForNull
41-
public Integer getStopTimeout();
95+
Integer getStopTimeout();
96+
97+
CreateContainerCmd withStopTimeout(Integer stopTimeout);
4298

4399
@CheckForNull
44100
String getHostName();
45101

102+
CreateContainerCmd withHostName(String hostName);
103+
46104
@CheckForNull
47105
String getImage();
48106

107+
CreateContainerCmd withImage(String image);
108+
49109
@CheckForNull
50110
String getIpv4Address();
51111

112+
CreateContainerCmd withIpv4Address(String ipv4Address);
113+
52114
@CheckForNull
53115
String getIpv6Address();
54116

117+
CreateContainerCmd withIpv6Address(String ipv6Address);
118+
55119
@CheckForNull
56120
Map<String, String> getLabels();
57121

122+
CreateContainerCmd withLabels(Map<String, String> labels);
123+
58124
@CheckForNull
59125
String getMacAddress();
60126

127+
CreateContainerCmd withMacAddress(String macAddress);
128+
61129
@CheckForNull
62130
String getName();
63131

132+
CreateContainerCmd withName(String name);
133+
64134
@CheckForNull
65135
String[] getPortSpecs();
66136

137+
CreateContainerCmd withPortSpecs(String... portSpecs);
138+
139+
CreateContainerCmd withPortSpecs(List<String> portSpecs);
140+
67141
@CheckForNull
68142
String getUser();
69143

144+
CreateContainerCmd withUser(String user);
145+
70146
@CheckForNull
71147
Volume[] getVolumes();
72148

149+
CreateContainerCmd withVolumes(Volume... volumes);
150+
151+
CreateContainerCmd withVolumes(List<Volume> volumes);
152+
73153
@CheckForNull
74154
String getWorkingDir();
75155

156+
CreateContainerCmd withWorkingDir(String workingDir);
157+
76158
@CheckForNull
77159
Boolean isAttachStderr();
78160

161+
CreateContainerCmd withAttachStderr(Boolean attachStderr);
162+
79163
@CheckForNull
80164
Boolean isAttachStdin();
81165

166+
CreateContainerCmd withAttachStdin(Boolean attachStdin);
167+
82168
@CheckForNull
83169
Boolean isAttachStdout();
84170

171+
CreateContainerCmd withAttachStdout(Boolean attachStdout);
172+
85173
@CheckForNull
86174
Boolean isNetworkDisabled();
87175

176+
CreateContainerCmd withNetworkDisabled(Boolean disableNetwork);
177+
88178
@CheckForNull
89179
Boolean isStdInOnce();
90180

181+
CreateContainerCmd withStdInOnce(Boolean stdInOnce);
182+
91183
@CheckForNull
92184
Boolean isStdinOpen();
93185

94-
@CheckForNull
95-
HostConfig getHostConfig();
186+
CreateContainerCmd withStdinOpen(Boolean stdinOpen);
96187

97188
@CheckForNull
98189
Boolean isTty();
99190

100-
/**
101-
* While using swarm classic, you can provide an optional auth config which will be used to pull images from a private registry,
102-
* if the swarm node does not already have the docker image.
103-
* Note: This option does not have any effect in normal docker
104-
*
105-
* @param authConfig The optional auth config
106-
*/
107-
CreateContainerCmd withAuthConfig(AuthConfig authConfig);
108-
109-
/**
110-
* Add network-scoped alias for the container
111-
*
112-
* @param aliases on ore more aliases
113-
*/
114-
CreateContainerCmd withAliases(String... aliases);
115-
116-
/**
117-
* Add network-scoped alias for the container
118-
*
119-
* @param aliases on ore more aliases
120-
*/
121-
CreateContainerCmd withAliases(List<String> aliases);
122-
123-
CreateContainerCmd withAttachStderr(Boolean attachStderr);
124-
125-
CreateContainerCmd withAttachStdin(Boolean attachStdin);
126-
127-
CreateContainerCmd withAttachStdout(Boolean attachStdout);
128-
129-
CreateContainerCmd withCmd(String... cmd);
130-
131-
CreateContainerCmd withCmd(List<String> cmd);
132-
133-
CreateContainerCmd withDomainName(String domainName);
134-
135-
CreateContainerCmd withEntrypoint(String... entrypoint);
136-
137-
CreateContainerCmd withEntrypoint(List<String> entrypoint);
138-
139-
CreateContainerCmd withEnv(String... env);
140-
141-
CreateContainerCmd withEnv(List<String> env);
142-
143-
CreateContainerCmd withExposedPorts(ExposedPort... exposedPorts);
144-
145-
CreateContainerCmd withStopSignal(String stopSignal);
146-
147-
CreateContainerCmd withStopTimeout(Integer stopTimeout);
148-
149-
CreateContainerCmd withExposedPorts(List<ExposedPort> exposedPorts);
150-
151-
CreateContainerCmd withHostName(String hostName);
152-
153-
CreateContainerCmd withImage(String image);
154-
155-
CreateContainerCmd withIpv4Address(String ipv4Address);
156-
157-
CreateContainerCmd withIpv6Address(String ipv6Address);
158-
159-
CreateContainerCmd withLabels(Map<String, String> labels);
160-
161-
CreateContainerCmd withMacAddress(String macAddress);
162-
163-
CreateContainerCmd withName(String name);
164-
165-
CreateContainerCmd withNetworkDisabled(Boolean disableNetwork);
166-
167-
CreateContainerCmd withPortSpecs(String... portSpecs);
168-
169-
CreateContainerCmd withPortSpecs(List<String> portSpecs);
170-
171-
CreateContainerCmd withStdInOnce(Boolean stdInOnce);
172-
173-
CreateContainerCmd withStdinOpen(Boolean stdinOpen);
174-
175191
CreateContainerCmd withTty(Boolean tty);
176192

177-
CreateContainerCmd withUser(String user);
178-
179-
CreateContainerCmd withVolumes(Volume... volumes);
193+
@CheckForNull
194+
List<String> getOnBuild();
180195

181-
CreateContainerCmd withVolumes(List<Volume> volumes);
196+
CreateContainerCmd withOnBuild(List<String> onBuild);
182197

183-
CreateContainerCmd withWorkingDir(String workingDir);
198+
@CheckForNull
199+
HostConfig getHostConfig();
184200

185201
CreateContainerCmd withHostConfig(HostConfig hostConfig);
186202

src/main/java/com/github/dockerjava/api/model/AuthConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ public class AuthConfig implements Serializable {
2121
*/
2222
public static final String DEFAULT_SERVER_ADDRESS = "https://index.docker.io/v1/";
2323

24-
@JsonProperty
24+
@JsonProperty("username")
2525
private String username;
2626

27-
@JsonProperty
27+
@JsonProperty("password")
2828
private String password;
2929

30-
@JsonProperty
30+
@JsonProperty("email")
3131
private String email;
3232

3333
@JsonProperty("serveraddress")
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package com.github.dockerjava.api.model;
2+
3+
import com.fasterxml.jackson.annotation.JsonProperty;
4+
import org.apache.commons.lang.builder.EqualsBuilder;
5+
import org.apache.commons.lang.builder.HashCodeBuilder;
6+
import org.apache.commons.lang.builder.ToStringBuilder;
7+
8+
import java.io.Serializable;
9+
10+
import static org.apache.commons.lang.builder.ToStringStyle.SHORT_PREFIX_STYLE;
11+
12+
public class BlkioRateDevice implements Serializable {
13+
public static final long serialVersionUID = 1L;
14+
15+
@JsonProperty("Path")
16+
private String path;
17+
18+
@JsonProperty("Rate")
19+
private Long rate;
20+
21+
public String getPath() {
22+
return path;
23+
}
24+
25+
public BlkioRateDevice withPath(String path) {
26+
this.path = path;
27+
return this;
28+
}
29+
30+
public Long getRate() {
31+
return rate;
32+
}
33+
34+
public BlkioRateDevice withRate(Long rate) {
35+
this.rate = rate;
36+
return this;
37+
}
38+
39+
@Override
40+
public String toString() {
41+
return ToStringBuilder.reflectionToString(this, SHORT_PREFIX_STYLE);
42+
}
43+
44+
@Override
45+
public boolean equals(Object o) {
46+
return EqualsBuilder.reflectionEquals(this, o);
47+
}
48+
49+
@Override
50+
public int hashCode() {
51+
return HashCodeBuilder.reflectionHashCode(this);
52+
}
53+
54+
}

0 commit comments

Comments
 (0)