forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateSecretCmdImpl.java
More file actions
34 lines (27 loc) · 984 Bytes
/
Copy pathCreateSecretCmdImpl.java
File metadata and controls
34 lines (27 loc) · 984 Bytes
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
package com.github.dockerjava.core.command;
import com.github.dockerjava.api.command.CreateSecretCmd;
import com.github.dockerjava.api.command.CreateSecretResponse;
import com.github.dockerjava.api.model.SecretSpec;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Creates a new secret
*/
public class CreateSecretCmdImpl extends AbstrDockerCmd<CreateSecretCmd, CreateSecretResponse> implements
CreateSecretCmd {
private SecretSpec secretSpec;
public CreateSecretCmdImpl(Exec exec, SecretSpec secretSpec) {
super(exec);
checkNotNull(secretSpec, "secretSpec was not specified");
withSecretSpec(secretSpec);
}
@Override
public SecretSpec getSecretSpec() {
return secretSpec;
}
@Override
public CreateSecretCmd withSecretSpec(SecretSpec secretSpec) {
checkNotNull(secretSpec, "secretSpec was not specified");
this.secretSpec = secretSpec;
return this;
}
}