Package com.google.api.server.spi.tools
Class GenClientLibAction
- java.lang.Object
-
- com.google.appengine.tools.util.Action
-
- com.google.api.server.spi.tools.EndpointsToolAction
-
- com.google.api.server.spi.tools.GenClientLibAction
-
public class GenClientLibAction extends EndpointsToolAction
Command to generated a client library from a Discovery document.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.server.spi.tools.EndpointsToolAction
EndpointsToolAction.EndpointsOption
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from class com.google.api.server.spi.tools.EndpointsToolAction
OPTION_BASE_PATH_LONG, OPTION_BASE_PATH_SHORT, OPTION_BUILD_SYSTEM_LONG, OPTION_BUILD_SYSTEM_SHORT, OPTION_CLASS_PATH_LONG, OPTION_CLASS_PATH_SHORT, OPTION_DEBUG, OPTION_FORMAT_LONG, OPTION_FORMAT_SHORT, OPTION_HOSTNAME_LONG, OPTION_HOSTNAME_SHORT, OPTION_LANGUAGE_LONG, OPTION_LANGUAGE_SHORT, OPTION_OUTPUT_DIR_LONG, OPTION_OUTPUT_DIR_SHORT, OPTION_WAR_LONG, OPTION_WAR_SHORT
-
-
Constructor Summary
Constructors Constructor Description GenClientLibAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexecute()Executes the command with the given arguments.ObjectgenClientLib(String language, String outputDirPath, String discoveryDoc, String buildSystem)Generates a client library for an API.ObjectgenClientLibFromFile(String language, String outputDirPath, String discoveryDocPath, String buildSystem)Generates a client library for an API.StringgetUsageString()Returns a usage string for help output.-
Methods inherited from class com.google.api.server.spi.tools.EndpointsToolAction
apply, computeClassPath, getBasePath, getBuildSystem, getClassPath, getDebug, getExampleString, getFormat, getHelpLines, getHostname, getLanguage, getOpenApiOutputPath, getOptionOrDefault, getOutputPath, getServiceClassNames, getWarOutputPath, getWarPath, isHelpDisplayNeeded, makeBasePathOption, makeBuildSystemOption, makeClassPathOption, makeDebugOption, makeFormatOption, makeHostnameOption, makeLanguageOption, makeOpenApiOutputOption, makeOutputOption, makeWarOption, makeWarOutputOption, setExampleString, setHelpDisplayNeeded
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public boolean execute() throws IOExceptionDescription copied from class:EndpointsToolActionExecutes the command with the given arguments.- Specified by:
executein classEndpointsToolAction- Returns:
- whether or not all required arguments were provided
- Throws:
IOException
-
genClientLibFromFile
public Object genClientLibFromFile(String language, String outputDirPath, String discoveryDocPath, String buildSystem) throws IOException
Generates a client library for an API.- Parameters:
language- Language of the client library.outputDirPath- Directory to write generated client library intodiscoveryDocPath- Path to Discovery doc filebuildSystem- The build system to use for the client library- Throws:
IOException
-
genClientLib
public Object genClientLib(String language, String outputDirPath, String discoveryDoc, String buildSystem) throws IOException
Generates a client library for an API.- Parameters:
language- Language of the client library.outputDirPath- Directory to write generated client library intodiscoveryDoc- Discovery doc text.buildSystem- The build system to use for the client library- Throws:
IOException
-
getUsageString
public String getUsageString()
Description copied from class:EndpointsToolActionReturns a usage string for help output.- Specified by:
getUsageStringin classEndpointsToolAction
-
-