@Test public void testCopyTo() { DockerTemplateOptions options = DockerTemplateOptions.Builder .memory(512) .cpuShares(4) .entrypoint("entry", "point") .commands("test", "abc") .portBindings( ImmutableMap.<Integer, Integer> builder() .put(8443, 443).build()) .hostname("hostname") .networkMode("host") .userMetadata(ImmutableMap.of("key", "value")) .env(ImmutableList.of("HOST=abc", "PORT=1234")) .dns("8.8.8.8", "8.8.4.4") .volumes(ImmutableMap.of("/tmp", "/tmp")); DockerTemplateOptions optionsCopy = new DockerTemplateOptions(); options.copyTo(optionsCopy); assertEquals(optionsCopy, options); }
@Override public void copyTo(TemplateOptions to) { super.copyTo(to); if (to instanceof DockerTemplateOptions) { DockerTemplateOptions eTo = DockerTemplateOptions.class.cast(to); eTo.volumes(volumes); eTo.hostname(hostname); eTo.dns(dns); eTo.memory(memory); eTo.cpuShares(cpuShares); eTo.entrypoint(entrypoint); eTo.commands(commands); eTo.env(env); eTo.portBindings(portBindings); eTo.networkMode(networkMode); eTo.extraHosts(extraHosts); eTo.volumesFrom(volumesFrom); eTo.privileged(privileged); eTo.openStdin(openStdin); eTo.configBuilder(configBuilder); } }
DockerTemplateOptions extends TemplateOptions implements Cloneable { @Override public void copyTo(TemplateOptions to) { super.copyTo(to); if (to instanceof DockerTemplateOptions) { DockerTemplateOptions eTo = DockerTemplateOptions.class.cast(to); eTo.volumes(volumes); eTo.hostname(hostname); eTo.dns(dns); eTo.memory(memory); eTo.cpuShares(cpuShares); eTo.entrypoint(entrypoint); eTo.commands(commands); eTo.env(env); eTo.portBindings(portBindings); eTo.networkMode(networkMode); eTo.extraHosts(extraHosts); eTo.volumesFrom(volumesFrom); eTo.privileged(privileged); eTo.openStdin(openStdin); eTo.configBuilder(configBuilder); } } }
DockerTemplateOptions extends TemplateOptions implements Cloneable { @Override public void copyTo(TemplateOptions to) { super.copyTo(to); if (to instanceof DockerTemplateOptions) { DockerTemplateOptions eTo = DockerTemplateOptions.class.cast(to); eTo.volumes(volumes); eTo.hostname(hostname); eTo.dns(dns); eTo.memory(memory); eTo.cpuShares(cpuShares); eTo.entrypoint(entrypoint); eTo.commands(commands); eTo.env(env); eTo.portBindings(portBindings); eTo.networkMode(networkMode); eTo.extraHosts(extraHosts); eTo.volumesFrom(volumesFrom); eTo.privileged(privileged); eTo.openStdin(openStdin); eTo.configBuilder(configBuilder); } }  }
DockerTemplateOptions extends TemplateOptions implements Cloneable { @Override public void copyTo(TemplateOptions to) { super.copyTo(to); if (to instanceof DockerTemplateOptions) { DockerTemplateOptions eTo = DockerTemplateOptions.class.cast(to); eTo.volumes(volumes); eTo.hostname(hostname); eTo.dns(dns); eTo.memory(memory); eTo.cpuShares(cpuShares); eTo.entrypoint(entrypoint); eTo.commands(commands); eTo.env(env); eTo.portBindings(portBindings); eTo.networkMode(networkMode); eTo.extraHosts(extraHosts); eTo.volumesFrom(volumesFrom); eTo.privileged(privileged); eTo.openStdin(openStdin); eTo.configBuilder(configBuilder); } }  @Override DockerTemplateOptions clone(); @Override void copyTo(TemplateOptions to); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); DockerTemplateOptions volumes(Map<String, String> volumes); DockerTemplateOptions dns(Iterable<String> dns); DockerTemplateOptions dns(String...dns); DockerTemplateOptions hostname(@Nullable String hostname); DockerTemplateOptions memory(@Nullable Integer memory); DockerTemplateOptions entrypoint(Iterable<String> entrypoint); DockerTemplateOptions entrypoint(String... entrypoint); DockerTemplateOptions commands(Iterable<String> commands); DockerTemplateOptions commands(String...commands); DockerTemplateOptions cpuShares(@Nullable Integer cpuShares); DockerTemplateOptions env(Iterable<String> env); DockerTemplateOptions env(String...env); DockerTemplateOptions portBindings(Map<Integer, Integer> portBindings); DockerTemplateOptions networkMode(@Nullable String networkMode); DockerTemplateOptions extraHosts(Map<String, String> extraHosts); DockerTemplateOptions volumesFrom(Iterable<String> volumesFrom); DockerTemplateOptions privileged(boolean privileged); DockerTemplateOptions openStdin(boolean openStdin); DockerTemplateOptions configBuilder(Config.Builder configBuilder); Map<String, String> getVolumes(); List<String> getDns(); List<String> getVolumesFrom(); String getHostname(); Integer getMemory(); List<String> getEntrypoint(); List<String> getCommands(); Integer getCpuShares(); List<String> getEnv(); Map<Integer, Integer> getPortBindings(); String getNetworkMode(); Map<String, String> getExtraHosts(); boolean getPrivileged(); boolean getOpenStdin(); Config.Builder getConfigBuilder(); @Override DockerTemplateOptions blockOnPort(int port, int seconds); @Override DockerTemplateOptions inboundPorts(int... ports); @Override DockerTemplateOptions authorizePublicKey(String publicKey); @Override DockerTemplateOptions installPrivateKey(String privateKey); @Override DockerTemplateOptions blockUntilRunning(boolean blockUntilRunning); @Override DockerTemplateOptions dontAuthorizePublicKey(); @Override DockerTemplateOptions nameTask(String name); @Override DockerTemplateOptions runAsRoot(boolean runAsRoot); @Override DockerTemplateOptions runScript(Statement script); @Override DockerTemplateOptions overrideLoginCredentials(LoginCredentials overridingCredentials); @Override DockerTemplateOptions overrideLoginPassword(String password); @Override DockerTemplateOptions overrideLoginPrivateKey(String privateKey); @Override DockerTemplateOptions overrideLoginUser(String loginUser); @Override DockerTemplateOptions overrideAuthenticateSudo(boolean authenticateSudo); @Override DockerTemplateOptions userMetadata(Map<String, String> userMetadata); @Override DockerTemplateOptions userMetadata(String key, String value); @Override DockerTemplateOptions nodeNames(Iterable<String> nodeNames); @Override DockerTemplateOptions networks(Iterable<String> networks); }
DockerTemplateOptions extends TemplateOptions implements Cloneable { @Override public void copyTo(TemplateOptions to) { super.copyTo(to); if (to instanceof DockerTemplateOptions) { DockerTemplateOptions eTo = DockerTemplateOptions.class.cast(to); eTo.volumes(volumes); eTo.hostname(hostname); eTo.dns(dns); eTo.memory(memory); eTo.cpuShares(cpuShares); eTo.entrypoint(entrypoint); eTo.commands(commands); eTo.env(env); eTo.portBindings(portBindings); eTo.networkMode(networkMode); eTo.extraHosts(extraHosts); eTo.volumesFrom(volumesFrom); eTo.privileged(privileged); eTo.openStdin(openStdin); eTo.configBuilder(configBuilder); } }  @Override DockerTemplateOptions clone(); @Override void copyTo(TemplateOptions to); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); DockerTemplateOptions volumes(Map<String, String> volumes); DockerTemplateOptions dns(Iterable<String> dns); DockerTemplateOptions dns(String...dns); DockerTemplateOptions hostname(@Nullable String hostname); DockerTemplateOptions memory(@Nullable Integer memory); DockerTemplateOptions entrypoint(Iterable<String> entrypoint); DockerTemplateOptions entrypoint(String... entrypoint); DockerTemplateOptions commands(Iterable<String> commands); DockerTemplateOptions commands(String...commands); DockerTemplateOptions cpuShares(@Nullable Integer cpuShares); DockerTemplateOptions env(Iterable<String> env); DockerTemplateOptions env(String...env); DockerTemplateOptions portBindings(Map<Integer, Integer> portBindings); DockerTemplateOptions networkMode(@Nullable String networkMode); DockerTemplateOptions extraHosts(Map<String, String> extraHosts); DockerTemplateOptions volumesFrom(Iterable<String> volumesFrom); DockerTemplateOptions privileged(boolean privileged); DockerTemplateOptions openStdin(boolean openStdin); DockerTemplateOptions configBuilder(Config.Builder configBuilder); Map<String, String> getVolumes(); List<String> getDns(); List<String> getVolumesFrom(); String getHostname(); Integer getMemory(); List<String> getEntrypoint(); List<String> getCommands(); Integer getCpuShares(); List<String> getEnv(); Map<Integer, Integer> getPortBindings(); String getNetworkMode(); Map<String, String> getExtraHosts(); boolean getPrivileged(); boolean getOpenStdin(); Config.Builder getConfigBuilder(); @Override DockerTemplateOptions blockOnPort(int port, int seconds); @Override DockerTemplateOptions inboundPorts(int... ports); @Override DockerTemplateOptions authorizePublicKey(String publicKey); @Override DockerTemplateOptions installPrivateKey(String privateKey); @Override DockerTemplateOptions blockUntilRunning(boolean blockUntilRunning); @Override DockerTemplateOptions dontAuthorizePublicKey(); @Override DockerTemplateOptions nameTask(String name); @Override DockerTemplateOptions runAsRoot(boolean runAsRoot); @Override DockerTemplateOptions runScript(Statement script); @Override DockerTemplateOptions overrideLoginCredentials(LoginCredentials overridingCredentials); @Override DockerTemplateOptions overrideLoginPassword(String password); @Override DockerTemplateOptions overrideLoginPrivateKey(String privateKey); @Override DockerTemplateOptions overrideLoginUser(String loginUser); @Override DockerTemplateOptions overrideAuthenticateSudo(boolean authenticateSudo); @Override DockerTemplateOptions userMetadata(Map<String, String> userMetadata); @Override DockerTemplateOptions userMetadata(String key, String value); @Override DockerTemplateOptions nodeNames(Iterable<String> nodeNames); @Override DockerTemplateOptions networks(Iterable<String> networks);  }