mirror of https://github.com/apache/jclouds.git
Options use boolean primitive instead of object
The Boolean object makes passing null value possible, which would cause NPE.
This commit is contained in:
parent
867b7f52e4
commit
be6ce141b6
|
@ -25,8 +25,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
* When TTY is disabled, the stream is multiplexed to separate stdout and stderr.
|
* When TTY is disabled, the stream is multiplexed to separate stdout and stderr.
|
||||||
* @return AttachOptions
|
* @return AttachOptions
|
||||||
*/
|
*/
|
||||||
public AttachOptions stream(Boolean stream) {
|
public AttachOptions stream(boolean stream) {
|
||||||
this.queryParameters.put("stream", stream.toString());
|
this.queryParameters.put("stream", String.valueOf(stream));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
* @param logs require logs to be attached. Default false.
|
* @param logs require logs to be attached. Default false.
|
||||||
* @return AttachOptions
|
* @return AttachOptions
|
||||||
*/
|
*/
|
||||||
public AttachOptions logs(Boolean logs) {
|
public AttachOptions logs(boolean logs) {
|
||||||
this.queryParameters.put("logs", logs.toString());
|
this.queryParameters.put("logs", String.valueOf(logs));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,8 +43,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
* @param stdin if stream=true, attach to stdin. Default false
|
* @param stdin if stream=true, attach to stdin. Default false
|
||||||
* @return AttachOptions
|
* @return AttachOptions
|
||||||
*/
|
*/
|
||||||
public AttachOptions stdin(Boolean stdin) {
|
public AttachOptions stdin(boolean stdin) {
|
||||||
this.queryParameters.put("stdin", stdin.toString());
|
this.queryParameters.put("stdin", String.valueOf(stdin));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
* @param stdout if logs=true, return stdout log, if stream=true, attach to stdout. Default false
|
* @param stdout if logs=true, return stdout log, if stream=true, attach to stdout. Default false
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AttachOptions stdout(Boolean stdout) {
|
public AttachOptions stdout(boolean stdout) {
|
||||||
this.queryParameters.put("stdout", stdout.toString());
|
this.queryParameters.put("stdout", String.valueOf(stdout));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
* @param stderr if logs=true, return stderr log, if stream=true, attach to stderr. Default false
|
* @param stderr if logs=true, return stderr log, if stream=true, attach to stderr. Default false
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AttachOptions stderr(Boolean stderr) {
|
public AttachOptions stderr(boolean stderr) {
|
||||||
this.queryParameters.put("stderr", stderr.toString());
|
this.queryParameters.put("stderr", String.valueOf(stderr));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.docker.options.AttachOptions#stream
|
* @see org.jclouds.docker.options.AttachOptions#stream
|
||||||
*/
|
*/
|
||||||
public static AttachOptions stream(Boolean stream) {
|
public static AttachOptions stream(boolean stream) {
|
||||||
AttachOptions options = new AttachOptions();
|
AttachOptions options = new AttachOptions();
|
||||||
return options.stream(stream);
|
return options.stream(stream);
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.docker.options.AttachOptions#logs(Boolean)
|
* @see org.jclouds.docker.options.AttachOptions#logs(Boolean)
|
||||||
*/
|
*/
|
||||||
public static AttachOptions logs(Boolean logs) {
|
public static AttachOptions logs(boolean logs) {
|
||||||
AttachOptions options = new AttachOptions();
|
AttachOptions options = new AttachOptions();
|
||||||
return options.logs(logs);
|
return options.logs(logs);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.docker.options.AttachOptions#stdin(Boolean)
|
* @see org.jclouds.docker.options.AttachOptions#stdin(Boolean)
|
||||||
*/
|
*/
|
||||||
public static AttachOptions stdin(Boolean stdin) {
|
public static AttachOptions stdin(boolean stdin) {
|
||||||
AttachOptions options = new AttachOptions();
|
AttachOptions options = new AttachOptions();
|
||||||
return options.stdin(stdin);
|
return options.stdin(stdin);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.docker.options.AttachOptions#stdout(Boolean)
|
* @see org.jclouds.docker.options.AttachOptions#stdout(Boolean)
|
||||||
*/
|
*/
|
||||||
public static AttachOptions stdout(Boolean stdout) {
|
public static AttachOptions stdout(boolean stdout) {
|
||||||
AttachOptions options = new AttachOptions();
|
AttachOptions options = new AttachOptions();
|
||||||
return options.stdout(stdout);
|
return options.stdout(stdout);
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ public class AttachOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see org.jclouds.docker.options.AttachOptions#stderr(Boolean)
|
* @see org.jclouds.docker.options.AttachOptions#stderr(Boolean)
|
||||||
*/
|
*/
|
||||||
public static AttachOptions stderr(Boolean stderr) {
|
public static AttachOptions stderr(boolean stderr) {
|
||||||
AttachOptions options = new AttachOptions();
|
AttachOptions options = new AttachOptions();
|
||||||
return options.stderr(stderr);
|
return options.stderr(stderr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,13 +25,13 @@ public class BuildOptions extends BaseHttpRequestOptions {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BuildOptions verbose(Boolean verbose) {
|
public BuildOptions verbose(boolean verbose) {
|
||||||
this.queryParameters.put("verbose", verbose.toString());
|
this.queryParameters.put("verbose", String.valueOf(verbose));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BuildOptions nocache(Boolean nocache) {
|
public BuildOptions nocache(boolean nocache) {
|
||||||
this.queryParameters.put("nocache", nocache.toString());
|
this.queryParameters.put("nocache", String.valueOf(nocache));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class BuildOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see BuildOptions#verbose(Boolean)
|
* @see BuildOptions#verbose(Boolean)
|
||||||
*/
|
*/
|
||||||
public static BuildOptions verbose(Boolean verbose) {
|
public static BuildOptions verbose(boolean verbose) {
|
||||||
BuildOptions options = new BuildOptions();
|
BuildOptions options = new BuildOptions();
|
||||||
return options.verbose(verbose);
|
return options.verbose(verbose);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class BuildOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see BuildOptions#nocache(Boolean)
|
* @see BuildOptions#nocache(Boolean)
|
||||||
*/
|
*/
|
||||||
public static BuildOptions nocache(Boolean nocache) {
|
public static BuildOptions nocache(boolean nocache) {
|
||||||
BuildOptions options = new BuildOptions();
|
BuildOptions options = new BuildOptions();
|
||||||
return options.nocache(nocache);
|
return options.nocache(nocache);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,13 +20,13 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
||||||
|
|
||||||
public class DeleteImageOptions extends BaseHttpRequestOptions {
|
public class DeleteImageOptions extends BaseHttpRequestOptions {
|
||||||
|
|
||||||
public DeleteImageOptions force(Boolean force) {
|
public DeleteImageOptions force(boolean force) {
|
||||||
this.queryParameters.put("force", force.toString());
|
this.queryParameters.put("force", String.valueOf(force));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeleteImageOptions noPrune(Boolean noPrune) {
|
public DeleteImageOptions noPrune(boolean noPrune) {
|
||||||
this.queryParameters.put("noPrune", noPrune.toString());
|
this.queryParameters.put("noPrune", String.valueOf(noPrune));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public class DeleteImageOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see DeleteImageOptions#force
|
* @see DeleteImageOptions#force
|
||||||
*/
|
*/
|
||||||
public static DeleteImageOptions force(Boolean force) {
|
public static DeleteImageOptions force(boolean force) {
|
||||||
DeleteImageOptions options = new DeleteImageOptions();
|
DeleteImageOptions options = new DeleteImageOptions();
|
||||||
return options.force(force);
|
return options.force(force);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public class DeleteImageOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see DeleteImageOptions#noPrune
|
* @see DeleteImageOptions#noPrune
|
||||||
*/
|
*/
|
||||||
public static DeleteImageOptions noPrune(Boolean noPrune) {
|
public static DeleteImageOptions noPrune(boolean noPrune) {
|
||||||
DeleteImageOptions options = new DeleteImageOptions();
|
DeleteImageOptions options = new DeleteImageOptions();
|
||||||
return options.noPrune(noPrune);
|
return options.noPrune(noPrune);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
||||||
|
|
||||||
public class ListContainerOptions extends BaseHttpRequestOptions {
|
public class ListContainerOptions extends BaseHttpRequestOptions {
|
||||||
|
|
||||||
public ListContainerOptions all(Boolean all) {
|
public ListContainerOptions all(boolean all) {
|
||||||
this.queryParameters.put("all", all.toString());
|
this.queryParameters.put("all", String.valueOf(all));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class ListContainerOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListContainerOptions#all
|
* @see ListContainerOptions#all
|
||||||
*/
|
*/
|
||||||
public static ListContainerOptions all(Boolean all) {
|
public static ListContainerOptions all(boolean all) {
|
||||||
ListContainerOptions options = new ListContainerOptions();
|
ListContainerOptions options = new ListContainerOptions();
|
||||||
return options.all(all);
|
return options.all(all);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,8 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
||||||
|
|
||||||
public class ListImageOptions extends BaseHttpRequestOptions {
|
public class ListImageOptions extends BaseHttpRequestOptions {
|
||||||
|
|
||||||
public ListImageOptions all(Boolean all) {
|
public ListImageOptions all(boolean all) {
|
||||||
this.queryParameters.put("all", all.toString());
|
this.queryParameters.put("all", String.valueOf(all));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ public class ListImageOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListImageOptions#all
|
* @see ListImageOptions#all
|
||||||
*/
|
*/
|
||||||
public static ListImageOptions all(Boolean all) {
|
public static ListImageOptions all(boolean all) {
|
||||||
ListImageOptions options = new ListImageOptions();
|
ListImageOptions options = new ListImageOptions();
|
||||||
return options.all(all);
|
return options.all(all);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,13 +20,13 @@ import org.jclouds.http.options.BaseHttpRequestOptions;
|
||||||
|
|
||||||
public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
||||||
|
|
||||||
public RemoveContainerOptions verbose(Boolean verbose) {
|
public RemoveContainerOptions verbose(boolean verbose) {
|
||||||
this.queryParameters.put("verbose", verbose.toString());
|
this.queryParameters.put("verbose", String.valueOf(verbose));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RemoveContainerOptions force(Boolean force) {
|
public RemoveContainerOptions force(boolean force) {
|
||||||
this.queryParameters.put("force", force.toString());
|
this.queryParameters.put("force", String.valueOf(force));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
||||||
* @param volume If set to true the volume associated to the container will be removed.
|
* @param volume If set to true the volume associated to the container will be removed.
|
||||||
* Otherwise it will not be removed.
|
* Otherwise it will not be removed.
|
||||||
*/
|
*/
|
||||||
public RemoveContainerOptions volume(Boolean volume) {
|
public RemoveContainerOptions volume(boolean volume) {
|
||||||
this.queryParameters.put("v", volume.toString());
|
this.queryParameters.put("v", String.valueOf(volume));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see RemoveContainerOptions#verbose
|
* @see RemoveContainerOptions#verbose
|
||||||
*/
|
*/
|
||||||
public static RemoveContainerOptions verbose(Boolean verbose) {
|
public static RemoveContainerOptions verbose(boolean verbose) {
|
||||||
RemoveContainerOptions options = new RemoveContainerOptions();
|
RemoveContainerOptions options = new RemoveContainerOptions();
|
||||||
return options.verbose(verbose);
|
return options.verbose(verbose);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see RemoveContainerOptions#force
|
* @see RemoveContainerOptions#force
|
||||||
*/
|
*/
|
||||||
public static RemoveContainerOptions force(Boolean force) {
|
public static RemoveContainerOptions force(boolean force) {
|
||||||
RemoveContainerOptions options = new RemoveContainerOptions();
|
RemoveContainerOptions options = new RemoveContainerOptions();
|
||||||
return options.force(force);
|
return options.force(force);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see RemoveContainerOptions#volume
|
* @see RemoveContainerOptions#volume
|
||||||
*/
|
*/
|
||||||
public static RemoveContainerOptions volume(Boolean volume) {
|
public static RemoveContainerOptions volume(boolean volume) {
|
||||||
RemoveContainerOptions options = new RemoveContainerOptions();
|
RemoveContainerOptions options = new RemoveContainerOptions();
|
||||||
return options.volume(volume);
|
return options.volume(volume);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue