forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPullImageCmdImpl.java
More file actions
79 lines (62 loc) · 1.84 KB
/
Copy pathPullImageCmdImpl.java
File metadata and controls
79 lines (62 loc) · 1.84 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
package com.github.dockerjava.core.command;
import java.util.Objects;
import com.github.dockerjava.api.command.PullImageCmd;
import com.github.dockerjava.api.model.AuthConfig;
import com.github.dockerjava.api.model.PullResponseItem;
/**
*
* Pull image from repository.
*
*/
public class PullImageCmdImpl extends AbstrAsyncDockerCmd<PullImageCmd, PullResponseItem> implements PullImageCmd {
private String repository, tag, platform, registry;
private AuthConfig authConfig;
public PullImageCmdImpl(PullImageCmd.Exec exec, AuthConfig authConfig, String repository) {
super(exec);
withAuthConfig(authConfig);
withRepository(repository);
}
public AuthConfig getAuthConfig() {
return authConfig;
}
public PullImageCmd withAuthConfig(AuthConfig authConfig) {
this.authConfig = authConfig;
return this;
}
@Override
public String getRepository() {
return repository;
}
@Override
public String getTag() {
return tag;
}
@Override
public String getPlatform() {
return platform;
}
@Override
public String getRegistry() {
return registry;
}
@Override
public PullImageCmd withRepository(String repository) {
this.repository = Objects.requireNonNull(repository, "repository was not specified");
return this;
}
@Override
public PullImageCmd withTag(String tag) {
this.tag = Objects.requireNonNull(tag, "tag was not specified");
return this;
}
@Override
public PullImageCmd withPlatform(String platform) {
this.platform = platform;
return this;
}
@Override
public PullImageCmd withRegistry(String registry) {
this.registry = Objects.requireNonNull(registry, "registry was not specified");
return this;
}
}