diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/features.json b/generator/src/googleapis/codegen/languages/java/1.26.0/features.json deleted file mode 100644 index d306b36cc21..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/features.json +++ /dev/null @@ -1,487 +0,0 @@ -{ - "language": "java", - "description": "Java libraries for Google APIs.", - "generator": "java1_15", - "releaseVersion": "1.26.0", - "baseClientLibrary": "1.26.0", - "oauthClientLibrary": "1.26.0", - "httpClientLibrary": "1.26.0", - "gsonVersion": "2.1", - "httpClientVersion": "4.5.5", - "jackson2CoreVersion": "2.9.6", - "jdo2ApiVersion": "2.3-eb", - "jettyVersion": "6.1.26", - "jettyUtilVersion": "6.1.26", - "jsr305Version": "3.0.2", - "transactionApiVersion": "1.1", - "descriptor_additions": { - "proguard-config": "proguard-google-api-client.txt", - "files": [ - { - "path": "${___library_file_name___}.jar.properties", - "type": "android.properties" - } ] - }, - "javadoc_links": [ - "http://docs.oracle.com/javase/6/docs/api", - "https://googleapis.dev/java/google-http-client/${httpClientLibrary}/index.html", - "https://googleapis.dev/java/google-oauth-client/${oauthClientLibrary}/index.html", - "https://googleapis.dev/java/google-api-client/${baseClientLibrary}/index.html" - ], - "requires": [ - { - "name": "Google API Java Client Bundle", - "environments": ["manual"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "bundle", - "downloadUrl": "http://google-api-java-client.googlecode.com/files/google-api-java-client-${baseClientLibrary}.zip" - } - ] - },{ - "name": "Google APIs Client Library", - "environments": ["*"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-api-client-${baseClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-api-client-${baseClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-api-client-${baseClientLibrary}.jar.properties" - } - ] - },{ - "name": "Android platform extensions to the Google APIs Client Library", - "environments": ["android"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-api-client-android-${baseClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-api-client-android-${baseClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-api-client-android-${baseClientLibrary}.jar.properties" - } - ] - },{ - "name": "Google App Engine extensions to the Google APIs Client Library", - "environments": ["appengine"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-api-client-appengine-${baseClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-api-client-appengine-${baseClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "GSON extensions to the Google APIs Client Library", - "environments": ["generic"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-api-client-gson-${baseClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-api-client-gson-${baseClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Jackson 2 extensions to the Google APIs Client Library", - "environments": ["generic"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-api-client-jackson2-${baseClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-api-client-jackson2-${baseClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Java 6 (and higher) extensions to the Google APIs Client Library", - "environments": ["generic"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-api-client-java6-${baseClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-api-client-java6-${baseClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Servlet extensions to the Google APIs Client Library", - "environments": ["appengine", "servlet"], - "version": "${baseClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-api-client-servlet-${baseClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-api-client-servlet-${baseClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Google OAuth Client Library", - "environments": ["*"], - "version": "${oauthClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-oauth-client-${oauthClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-oauth-client-${oauthClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-oauth-client-${oauthClientLibrary}.jar.properties" - } - ] - },{ - "name": "Google App Engine extensions to the Google OAuth Client Library", - "environments": ["appengine"], - "version": "${oauthClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-oauth-client-appengine-${oauthClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-oauth-client-appengine-${oauthClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Java 6 (and higher) extensions to the Google OAuth Client Library", - "environments": ["generic"], - "version": "${oauthClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-oauth-client-java6-${oauthClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-oauth-client-java6-${oauthClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Jetty extensions to the Google OAuth Client Library", - "environments": ["generic"], - "version": "${oauthClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-oauth-client-jetty-${oauthClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-oauth-client-jetty-${oauthClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Servlet and JDO extensions to the Google OAuth Client Library", - "environments": ["appengine", "servlet"], - "version": "${oauthClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-oauth-client-servlet-${oauthClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-oauth-client-servlet-${oauthClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Google HTTP Client Library", - "environments": ["*"], - "version": "${httpClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-http-client-${httpClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-http-client-${httpClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-http-client-${httpClientLibrary}.jar.properties" - } - ] - },{ - "name": "Android platform extensions to the Google HTTP Client Library", - "environments": ["android"], - "version": "${httpClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-http-client-android-${httpClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-http-client-android-${httpClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-http-client-android-${httpClientLibrary}.jar.properties" - } - ] - },{ - "name": "Google App Engine extensions to the Google HTTP Client Library", - "environments": ["appengine"], - "version": "${httpClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-http-client-appengine-${httpClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-http-client-appengine-${httpClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "GSON extensions to the Google HTTP Client Library", - "environments": ["*"], - "version": "${httpClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-http-client-gson-${httpClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-http-client-gson-${httpClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-http-client-gson-${httpClientLibrary}.jar.properties" - } - ] - },{ - "name": "Jackson 2 extensions to the Google HTTP Client Library", - "environments": ["*"], - "version": "${httpClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-http-client-jackson2-${httpClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar.properties" - } - ] - },{ - "name": "JDO extensions to the Google HTTP Client Library", - "environments": ["*"], - "version": "${httpClientLibrary}", - "files": [ - { - "type": "binary", - "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar" - },{ - "type": "source", - "path": "libs-sources/google-http-client-jdo-${httpClientLibrary}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar.properties" - } - ] - },{ - "name": "GSON", - "environments": ["*"], - "version": "${gsonVersion}", - "files": [ - { - "type": "binary", - "path": "libs/gson-${gsonVersion}.jar" - },{ - "type": "source", - "path": "libs-sources/gson-${gsonVersion}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/gson-${gsonVersion}.jar.properties" - } - ] - },{ - "name": "HTTP Client", - "environments": ["servlet", "generic"], - "version": "${httpClientVersion}", - "files": [ - { - "type": "binary", - "path": "libs/httpclient-${httpClientVersion}.jar" - },{ - "type": "source", - "path": "libs-sources/httpclient-${httpClientVersion}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Jackson2 Core", - "environments": ["*"], - "version": "${jackson2CoreVersion}", - "files": [ - { - "type": "binary", - "path": "libs/jackson-core-${jackson2CoreVersion}.jar" - },{ - "type": "source", - "path": "libs-sources/jackson-core-${jackson2CoreVersion}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - },{ - "type": "android-properties", - "path": "libs/jackson-core-${jackson2CoreVersion}.jar.properties" - } - ] - },{ - "name": "JDO2 API", - "environments": ["appengine", "servlet"], - "version": "${jdo2ApiVersion}", - "files": [ - { - "type": "binary", - "path": "libs/jdo2-api-${jdo2ApiVersion}.jar" - },{ - "type": "source", - "path": "libs-sources/jdo2-api-${jdo2ApiVersion}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Jetty", - "environments": ["generic"], - "version": "${jettyVersion}", - "files": [ - { - "type": "binary", - "path": "libs/jetty-${jettyVersion}.jar" - },{ - "type": "source", - "path": "libs-sources/jetty-${jettyVersion}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Jetty Util", - "environments": ["generic"], - "version": "${jettyUtilVersion}", - "files": [ - { - "type": "binary", - "path": "libs/jetty-util-${jettyUtilVersion}.jar" - },{ - "type": "source", - "path": "libs-sources/jetty-util-${jettyUtilVersion}-sources.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "JSR 305", - "environments": ["*"], - "version": "${jsr305Version}", - "files": [ - { - "type": "binary", - "path": "libs/jsr305-${jsr305Version}.jar" - },{ - "type": "license", - "path": "dependencies/APACHE-LICENSE.txt" - } - ] - },{ - "name": "Transaction API", - "environments": ["appengine", "servlet"], - "version": "${transactionApiVersion}", - "files": [ - { - "type": "binary", - "path": "libs/transaction-api-${transactionApiVersion}.jar" - },{ - "type": "source", - "path": "libs-sources/transaction-api-${transactionApiVersion}-sources.jar" - },{ - "type": "license", - "path": "dependencies/CDDL-LICENSE.txt" - } - ] - } - ] -} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/layouts.json b/generator/src/googleapis/codegen/languages/java/1.26.0/layouts.json deleted file mode 100644 index e777cd0b456..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/layouts.json +++ /dev/null @@ -1,17 +0,0 @@ -{"layouts": { - "maven": { - "source_location": "src/main/java", - "unzip_source": true, - "bundle_dir": "{api[name]}", - "include_dependencies": false, - "include_descriptor": false - }, - "gradle": { - "source_location": "src/main/java", - "unzip_source": true, - "bundle_dir": "{api[name]}", - "include_dependencies": false, - "include_descriptor": false - } - } -} \ No newline at end of file diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___.java.tmpl deleted file mode 100644 index fe2c5d6dfb1..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___.java.tmpl +++ /dev/null @@ -1,228 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * Service definition for {{ api.className }} ({{ api.version }}). - * - *
- * {{ api.description }} - *
- * - *- * For more information about this service, see the - * API Documentation - *
- * - *- * This service uses {@link {{ api.className }}RequestInitializer} to initialize global parameters via its - * {@link Builder}. - *
- * - * @since 1.3 - * @author Google, Inc. - */ -@SuppressWarnings("javadoc") -public class {{ api.className }} extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { - - // Note: Leave this static initializer at the top of the file. - static { - com.google.api.client.util.Preconditions.checkState( - com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && - com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15, - "You are currently running with version %s of google-api-client. " + - "You need at least version 1.15 of google-api-client to run version " + - "{{ features.releaseVersion }} of the {{ api.title }} library.", com.google.api.client.googleapis.GoogleUtils.VERSION); - } - - /** - * The default encoded root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_ROOT_URL = "{{ api.rootUrl }}"; - - /** - * The default encoded service path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_SERVICE_PATH = "{{ api.servicePath }}"; - - /** - * The default encoded batch path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.23 - */ - public static final String DEFAULT_BATCH_PATH = "{{ api.batchPath }}"; - - /** - * The default encoded base URL of the service. This is determined when the library is generated - * and normally should not be changed. - */ - public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; - - /**{% filter block_comment %} - * Constructor. - * {% endfilter %} - * - *- * Use {@link Builder} if you need to specify any of the optional parameters. - *
- * - * @param transport HTTP transport, which should normally be: - *- * Implementation is not thread-safe. - *
- * - * @since 1.3.0 - */ - public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { - - /** - * Returns an instance of a new builder. - * - * @param transport HTTP transport, which should normally be: - *- * The simplest usage is to use it to set the key parameter: - *
- * - *
- public static final GoogleClientRequestInitializer KEY_INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY);
- *
- *
- * - * There is also a constructor to set both the key and userIp parameters: - *
- * - *
- public static final GoogleClientRequestInitializer INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY, USER_IP);
- *
- *
- * - * If you want to implement custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer extends {{ api.className }}RequestInitializer {
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer2 extends {{ api.className }}RequestInitializer {
-
- public MyKeyRequestInitializer() {
- super(KEY, USER_IP);
- }
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Subclasses should be thread-safe. - *
- * - * @since 1.12 - */ -public class {{ api.className }}RequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { - - public {{ api.className }}RequestInitializer() { - super(); - } - - /** - * @param key API key or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key) { - super(key); - } - - /** - * @param key API key or {@code null} to leave it unchanged - * @param userIp user IP or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key, String userIp) { - super(key, userIp); - } - - @Override - public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest> request) throws java.io.IOException { - super.initializeJsonRequest(request); - initialize{{ api.className }}Request(({{ api.className }}Request>) request); - } - - /** - * Initializes {{ api.className }} request. - * - *- * Default implementation does nothing. Called from - * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. - *
- * - * @throws java.io.IOException I/O exception - */ - protected void initialize{{ api.className }}Request({{ api.className }}Request> request) throws java.io.IOException { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___Scopes.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___Scopes.java.tmpl deleted file mode 100644 index 9507ad28953..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___Scopes.java.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} -{% if not api.authscopes %}{% halt %}{% endif %} -package {{ api.module.name }}; - -/** - * Available OAuth 2.0 scopes for use with the {{ api.title }}. - * - * @since 1.4 - */ -public class {{ api.className }}Scopes { -{% for authscope in api.authscopes %} - /** {{ authscope.description }}. */ - public static final String {{ authscope.name }} = "{{ authscope.value }}"; -{% endfor %} - - /** - * Returns an unmodifiable set that contains all scopes declared by this class. - * - * @since 1.16 - */ - public static java.util.Set- * This is the Java data model class that specifies how to parse/serialize into the JSON that is - * transmitted over HTTP when working with the {{ api.title }}. For a detailed explanation see: - * {% endfilter %} - * https://developers.google.com/api-client-library/java/google-http-java-client/json - *
- * - * @author Google, Inc. - */ -{% filter noblanklines %} -@SuppressWarnings("javadoc") -{% if model.is_variant_base %} -public class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% elif model.superClass %} -public final class {{ model.className }} extends {{ model.superClass }} { -{% else %} -public final class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% endif %}{% endfilter %} - -{% filter noblanklines %} -{% if model.is_variant_base %} - protected {{ model.className }}(java.lang.String typeValue) { - this.{{ model.discriminant.memberName }} = typeValue; - } - - public {{ model.className }}() {} -{% elif model.discriminantValue %} - /** Constructs {{ model.className }}. **/ - public {{ model.className }}() { - super({% literal model.discriminantValue %}); - } -{% endif %}{% endfilter %} - -{% call_template _model_content_def current_model=model %} - -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %} -{% endfor %}}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_alt_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_alt_def.tmpl deleted file mode 100644 index 63bb0053eb2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_alt_def.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -{% comment %} -This template is used to determine when alt should be set to "json" in a method. -set("alt", "json") is generated if any of the cases are true: -* If method parameter alt!=json. -* If method does not have an alt parameter and global parameter alt!=json. -* If method does not have an alt parameter and global parameters does not have an alt parameter. -{% endcomment %} -{% if method.alt.default %} - {% ifnotequal method.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% else %} - {% ifnotequal api.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_bool_getter_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_bool_getter_content_def.tmpl deleted file mode 100644 index ed92c7251d4..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_bool_getter_content_def.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -{% filter noblanklines %} - /** - * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. - * - *- * Boolean properties can have four possible values: - * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} - * or {@link Boolean#FALSE}. - *
- * - *- * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} - * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and - * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - *
- * - *- *{% filter block_comment %}{{ property.description }}{% endfilter %} - *
- */ - public boolean is{{ property.memberName|capfirst }}() { - if ({{ property.memberName }} == null || {{ property.memberName }} == com.google.api.client.util.Data.NULL_BOOLEAN) { - return {{ property.default }}; - } - return {{ property.memberName }}; - }{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_file_header.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_file_header.tmpl deleted file mode 100644 index 62ca053ef11..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_file_header.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{% filter noblanklines %} -{% copyright_block %} -/* - * This code was generated by https://github.com/googleapis/google-api-java-client-services/ -{% if options.include_timestamp %} - * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} - * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} - * Modify at your own risk. - */ -{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_method.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_method.tmpl deleted file mode 100644 index 0d3dc2ff0c6..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_method.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @return the request - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% end_parameter_list %}); - initialize(result); - return result; -} -{% if method.simple_upload_supported or method.resumable_upload_supported %} -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * - *- * This method should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @return the request - * @throws java.io.IOException if the initialization of the request fails - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% parameter %}mediaContent{% end_parameter %} - {% end_parameter_list %}); - initialize(result); - return result; -}{% endif %} - -public class {{ method.className }} extends {{ api.className }}Request<{{ method.responseType.fullClassName }}> { - - private static final String REST_PATH = "{{ method.restPath }}"; - - {% for param in method.parameters %} - {% if param.pattern %} - private final java.util.regex.Pattern {{ param.constantName }}_PATTERN = - java.util.regex.Pattern.compile({% literal param.pattern %}); - {% endif %} - {% endfor %} - -{% filter noblanklines %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% call_template _pattern_check_def param=param %} - {% endfor %} - {% if method.requestType and method.responseType.properties %} - {% call_template _required_param_def properties=method.responseType.properties %} - {% endif %} - {% call_template _alt_def method=method %} - {% if method.supportsMediaDownload %} - initializeMediaDownload(); - {% endif %} - } -{% endfilter %} - -{% filter noblanklines %} -{% if method.simple_upload_supported or method.resumable_upload_supported %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * - *- * This constructor should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", "/upload/" + getServicePath() + REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% endfor %} - initializeMediaUpload(mediaContent); - {% call_template _alt_def method=method %} - } -{% endif %} -{% endfilter %} -{% if method.supportsMediaDownload %} - @Override - public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { - super.executeMediaAndDownloadTo(outputStream); - } - - @Override - public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { - return super.executeMediaAsInputStream(); - } - - @Override - public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { - return super.executeMedia(); - } - -{% if method.useMediaDownloadService %} - - @Override - public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { - java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) - ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); - return new com.google.api.client.http.GenericUrl( - com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); - } -{% endif %} -{% endif %} -{% ifequal method.httpMethod "GET" %} - - @Override - public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { - return super.executeUsingHead(); - } - - @Override - public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { - return super.buildHttpRequestUsingHead(); - } -{% endifequal %} -{% for param in api.parameters %} - - @Override - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - return ({{ method.className }}) super.{{ param.setterName }}({{ param.memberName }}); - }{% endfor %} -{% for param in method.parameters %} -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - @com.google.api.client.util.Key{% ifnotequal param.wireName param.memberName %}("{{ param.wireName }}"){% endifnotequal %} - private {{ param.codeType }} {{ param.memberName }}; - - /**{% filter block_comment %}{{ param.description }} -{% if param.default %} [default: {{ param.default }}]{% endif %} -{% if param.minimum %} [minimum: {{ param.minimum }}]{% endif %} -{% if param.maximum %} [maximum: {{ param.maximum }}]{% endif %} {% endfilter %} - */ - public {{ param.codeType }} {{ param.getterName }}() { - return {{ param.memberName }}; - } - -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { -{% filter noblanklines %} - {% call_template _pattern_check_def param=param %} - this.{{ param.memberName }} = {{ param.memberName }}; - return this; -{% endfilter %} - } -{% ifequal param.codeType "java.lang.Boolean" %}{% ifnotequal param.default null %} -{% call_template _bool_getter_content_def property=param %} -{% endifnotequal %}{% endifequal %}{% endfor %} - - @Override - public {{ method.className }} set(String parameterName, Object value) { - return ({{ method.className }}) super.set(parameterName, value); - } -} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_model_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_model_content_def.tmpl deleted file mode 100644 index 98b1e8f1899..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_model_content_def.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -{% if current_model.arrayOf %} -@com.google.api.client.util.Key -{{ current_model.safeCodeType}} items; -{% endif %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * The value may be {@code null}. - */ - @com.google.api.client.util.Key{% if not property.member_name_is_json_name %}("{{ property.wireName }}"){% endif %}{% if property.requiresJsonString %} @com.google.api.client.json.JsonString{% endif %} - {% if property.is_variant_key %} - @com.google.api.client.json.JsonPolymorphicTypeMap(typeDefinitions={ - {% for key, ref in property.variant_map.items %} - @com.google.api.client.json.JsonPolymorphicTypeMap.TypeDef(key = {% literal key %}, ref = {{ ref.safe_code_type }}.class), - {% endfor %}}) - {% endif %} - {% if features.thin_models %}public{% else %}private{% endif %} {{ property.safeCodeType }} {{ property.memberName }}; -{% endfilter %} - -{% filter noblanklines %} - {% if property.data_type.isContainer %} -{% call_template _proguard_content_def schema=property.data_type.baseType %} - {% endif %} -{% endfilter %} -{% endfor %} -{% if not features.thin_models %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #decode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @return value or {@code null} for none - */ -{% endfilter %} - public {{ property.safeCodeType }} {{ property.getterName }}() { - return {{ property.memberName }}; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.getterName }}() - * @return Base64 decoded value or {@code null} for none - * - * @since 1.14 - */ - public byte[] decode{{ property.memberName|capfirst }}() { - return com.google.api.client.util.Base64.decodeBase64({{ property.memberName }}); - } -{% endifequal %}{% endifequal %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #encode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @param {{property.memberName }} {{property.memberName }} or {@code null} for none - */ -{% endfilter %} - public {{ current_model.safeClassName }} {{ property.setterName }}({{ property.safeCodeType }} {{property.memberName }}) { - this.{{ property.memberName }} = {{ property.memberName }}; - return this; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.setterName }}() - * - *- * The value is encoded Base64 or {@code null} for none. - *
- * - * @since 1.14 - */ - public {{ current_model.safeClassName }} encode{{ property.memberName|capfirst }}(byte[] {{property.memberName}}) { - this.{{ property.memberName }} = com.google.api.client.util.Base64.encodeBase64URLSafeString({{ property.memberName }}); - return this; - } -{% endifequal %}{% endifequal %} -{% ifequal property.codeType "java.lang.Boolean" %}{% ifnotequal property.default null %} -{% call_template _bool_getter_content_def property=property %} -{% endifnotequal %}{% endifequal %}{% endfor %}{% endif %} -{% if not features.thin_models %} - - @Override - public {{ current_model.safeClassName }} set(String fieldName, Object value) { - return ({{ current_model.safeClassName }}) super.set(fieldName, value); - } - - @Override - public {{ current_model.safeClassName }} clone() { - return ({{ current_model.safeClassName }}) super.clone(); - } -{% endif %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_model_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_model_def.tmpl deleted file mode 100644 index f19e5132036..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_model_def.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -{% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} - */ -public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { - -{% call_template _model_content_def current_model=child %} -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} -}{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_parameter.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_parameter.tmpl deleted file mode 100644 index 61735303b3a..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_parameter.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} -{% if parameter.default %}[default: {{ parameter.default }}]{% endif %} -{% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} -{% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} -{% endfilter %}{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_pattern_check_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_pattern_check_def.tmpl deleted file mode 100644 index f5bd8fa74a9..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_pattern_check_def.tmpl +++ /dev/null @@ -1,21 +0,0 @@ - {% if param.pattern %} - {% if param.repeated %} - if (!getSuppressPatternChecks()) { - for (String {{ param.memberName }}Elem : {{ param.memberName }}) { - {% if param.code_type == 'java.util.ListThe typical use is:
- *
- * {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
- * {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
- *
- *
- * @return the resource collection
- */
-public {{ resource.className }} {{ resource.codeName }}() {
- return new {{ resource.className }}();
-}
-
-/**
- * The "{{ resource.wireName }}" collection of methods.
- */
-public class {{ resource.className }} {{% indent %}
-{% for method in resource.methods %}
-{% call_template _method method=method %}{% endfor %}
-{% for subr in resource.resources %}
-{% call_template _resource resource=subr %}{% endfor %}
-{% endindent %}}
diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/pom.xml.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/pom.xml.tmpl
deleted file mode 100644
index 47c75299939..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/pom.xml.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-{% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/features.json b/generator/src/googleapis/codegen/languages/java/1.27.0/features.json
deleted file mode 100644
index 2e6454d71b8..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.27.0/features.json
+++ /dev/null
@@ -1,487 +0,0 @@
-{
- "language": "java",
- "description": "Java libraries for Google APIs.",
- "generator": "java1_15",
- "releaseVersion": "1.27.0",
- "baseClientLibrary": "1.27.0",
- "oauthClientLibrary": "1.27.0",
- "httpClientLibrary": "1.27.0",
- "gsonVersion": "2.1",
- "httpClientVersion": "4.5.5",
- "jackson2CoreVersion": "2.9.6",
- "jdo2ApiVersion": "2.3-eb",
- "jettyVersion": "6.1.26",
- "jettyUtilVersion": "6.1.26",
- "jsr305Version": "3.0.2",
- "transactionApiVersion": "1.1",
- "descriptor_additions": {
- "proguard-config": "proguard-google-api-client.txt",
- "files": [
- {
- "path": "${___library_file_name___}.jar.properties",
- "type": "android.properties"
- } ]
- },
- "javadoc_links": [
- "http://docs.oracle.com/javase/6/docs/api",
- "https://googleapis.dev/java/google-http-client/${httpClientLibrary}/index.html",
- "https://googleapis.dev/java/google-oauth-client/${oauthClientLibrary}/index.html",
- "https://googleapis.dev/java/google-api-client/${baseClientLibrary}/index.html"
- ],
- "requires": [
- {
- "name": "Google API Java Client Bundle",
- "environments": ["manual"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "bundle",
- "downloadUrl": "http://google-api-java-client.googlecode.com/files/google-api-java-client-${baseClientLibrary}.zip"
- }
- ]
- },{
- "name": "Google APIs Client Library",
- "environments": ["*"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google APIs Client Library",
- "environments": ["android"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-android-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google APIs Client Library",
- "environments": ["appengine"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-appengine-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-appengine-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-gson-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-gson-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-jackson2-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-jackson2-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-java6-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-java6-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet extensions to the Google APIs Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-servlet-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-servlet-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google OAuth Client Library",
- "environments": ["*"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google OAuth Client Library",
- "environments": ["appengine"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-appengine-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-appengine-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-java6-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-java6-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-jetty-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-jetty-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet and JDO extensions to the Google OAuth Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-servlet-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-servlet-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google HTTP Client Library",
- "environments": ["android"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-android-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google HTTP Client Library",
- "environments": ["appengine"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-appengine-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-appengine-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-gson-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jackson2-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "JDO extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jdo-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "GSON",
- "environments": ["*"],
- "version": "${gsonVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/gson-${gsonVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/gson-${gsonVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/gson-${gsonVersion}.jar.properties"
- }
- ]
- },{
- "name": "HTTP Client",
- "environments": ["servlet", "generic"],
- "version": "${httpClientVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/httpclient-${httpClientVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/httpclient-${httpClientVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson2 Core",
- "environments": ["*"],
- "version": "${jackson2CoreVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jackson-core-${jackson2CoreVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar.properties"
- }
- ]
- },{
- "name": "JDO2 API",
- "environments": ["appengine", "servlet"],
- "version": "${jdo2ApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jdo2-api-${jdo2ApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jdo2-api-${jdo2ApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty",
- "environments": ["generic"],
- "version": "${jettyVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-${jettyVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-${jettyVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty Util",
- "environments": ["generic"],
- "version": "${jettyUtilVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-util-${jettyUtilVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-util-${jettyUtilVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "JSR 305",
- "environments": ["*"],
- "version": "${jsr305Version}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jsr305-${jsr305Version}.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Transaction API",
- "environments": ["appengine", "servlet"],
- "version": "${transactionApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/transaction-api-${transactionApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/transaction-api-${transactionApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/CDDL-LICENSE.txt"
- }
- ]
- }
- ]
-}
diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/layouts.json b/generator/src/googleapis/codegen/languages/java/1.27.0/layouts.json
deleted file mode 100644
index e777cd0b456..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.27.0/layouts.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{"layouts": {
- "maven": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- },
- "gradle": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- }
- }
-}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___.java.tmpl
deleted file mode 100644
index fe2c5d6dfb1..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___.java.tmpl
+++ /dev/null
@@ -1,228 +0,0 @@
-{% language java %}{% collapsenewlines %}{% call_template _file_header %}
-
-package {{ api.module.name }};
-
-/**
- * Service definition for {{ api.className }} ({{ api.version }}).
- *
- * - * {{ api.description }} - *
- * - *- * For more information about this service, see the - * API Documentation - *
- * - *- * This service uses {@link {{ api.className }}RequestInitializer} to initialize global parameters via its - * {@link Builder}. - *
- * - * @since 1.3 - * @author Google, Inc. - */ -@SuppressWarnings("javadoc") -public class {{ api.className }} extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { - - // Note: Leave this static initializer at the top of the file. - static { - com.google.api.client.util.Preconditions.checkState( - com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && - com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15, - "You are currently running with version %s of google-api-client. " + - "You need at least version 1.15 of google-api-client to run version " + - "{{ features.releaseVersion }} of the {{ api.title }} library.", com.google.api.client.googleapis.GoogleUtils.VERSION); - } - - /** - * The default encoded root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_ROOT_URL = "{{ api.rootUrl }}"; - - /** - * The default encoded service path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_SERVICE_PATH = "{{ api.servicePath }}"; - - /** - * The default encoded batch path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.23 - */ - public static final String DEFAULT_BATCH_PATH = "{{ api.batchPath }}"; - - /** - * The default encoded base URL of the service. This is determined when the library is generated - * and normally should not be changed. - */ - public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; - - /**{% filter block_comment %} - * Constructor. - * {% endfilter %} - * - *- * Use {@link Builder} if you need to specify any of the optional parameters. - *
- * - * @param transport HTTP transport, which should normally be: - *- * Implementation is not thread-safe. - *
- * - * @since 1.3.0 - */ - public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { - - /** - * Returns an instance of a new builder. - * - * @param transport HTTP transport, which should normally be: - *- * The simplest usage is to use it to set the key parameter: - *
- * - *
- public static final GoogleClientRequestInitializer KEY_INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY);
- *
- *
- * - * There is also a constructor to set both the key and userIp parameters: - *
- * - *
- public static final GoogleClientRequestInitializer INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY, USER_IP);
- *
- *
- * - * If you want to implement custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer extends {{ api.className }}RequestInitializer {
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer2 extends {{ api.className }}RequestInitializer {
-
- public MyKeyRequestInitializer() {
- super(KEY, USER_IP);
- }
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Subclasses should be thread-safe. - *
- * - * @since 1.12 - */ -public class {{ api.className }}RequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { - - public {{ api.className }}RequestInitializer() { - super(); - } - - /** - * @param key API key or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key) { - super(key); - } - - /** - * @param key API key or {@code null} to leave it unchanged - * @param userIp user IP or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key, String userIp) { - super(key, userIp); - } - - @Override - public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest> request) throws java.io.IOException { - super.initializeJsonRequest(request); - initialize{{ api.className }}Request(({{ api.className }}Request>) request); - } - - /** - * Initializes {{ api.className }} request. - * - *- * Default implementation does nothing. Called from - * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. - *
- * - * @throws java.io.IOException I/O exception - */ - protected void initialize{{ api.className }}Request({{ api.className }}Request> request) throws java.io.IOException { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___Scopes.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___Scopes.java.tmpl deleted file mode 100644 index 9507ad28953..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___Scopes.java.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} -{% if not api.authscopes %}{% halt %}{% endif %} -package {{ api.module.name }}; - -/** - * Available OAuth 2.0 scopes for use with the {{ api.title }}. - * - * @since 1.4 - */ -public class {{ api.className }}Scopes { -{% for authscope in api.authscopes %} - /** {{ authscope.description }}. */ - public static final String {{ authscope.name }} = "{{ authscope.value }}"; -{% endfor %} - - /** - * Returns an unmodifiable set that contains all scopes declared by this class. - * - * @since 1.16 - */ - public static java.util.Set- * This is the Java data model class that specifies how to parse/serialize into the JSON that is - * transmitted over HTTP when working with the {{ api.title }}. For a detailed explanation see: - * {% endfilter %} - * https://developers.google.com/api-client-library/java/google-http-java-client/json - *
- * - * @author Google, Inc. - */ -{% filter noblanklines %} -@SuppressWarnings("javadoc") -{% if model.is_variant_base %} -public class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% elif model.superClass %} -public final class {{ model.className }} extends {{ model.superClass }} { -{% else %} -public final class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% endif %}{% endfilter %} - -{% filter noblanklines %} -{% if model.is_variant_base %} - protected {{ model.className }}(java.lang.String typeValue) { - this.{{ model.discriminant.memberName }} = typeValue; - } - - public {{ model.className }}() {} -{% elif model.discriminantValue %} - /** Constructs {{ model.className }}. **/ - public {{ model.className }}() { - super({% literal model.discriminantValue %}); - } -{% endif %}{% endfilter %} - -{% call_template _model_content_def current_model=model %} - -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %} -{% endfor %}}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_alt_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_alt_def.tmpl deleted file mode 100644 index 63bb0053eb2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_alt_def.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -{% comment %} -This template is used to determine when alt should be set to "json" in a method. -set("alt", "json") is generated if any of the cases are true: -* If method parameter alt!=json. -* If method does not have an alt parameter and global parameter alt!=json. -* If method does not have an alt parameter and global parameters does not have an alt parameter. -{% endcomment %} -{% if method.alt.default %} - {% ifnotequal method.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% else %} - {% ifnotequal api.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_bool_getter_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_bool_getter_content_def.tmpl deleted file mode 100644 index ed92c7251d4..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_bool_getter_content_def.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -{% filter noblanklines %} - /** - * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. - * - *- * Boolean properties can have four possible values: - * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} - * or {@link Boolean#FALSE}. - *
- * - *- * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} - * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and - * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - *
- * - *- *{% filter block_comment %}{{ property.description }}{% endfilter %} - *
- */ - public boolean is{{ property.memberName|capfirst }}() { - if ({{ property.memberName }} == null || {{ property.memberName }} == com.google.api.client.util.Data.NULL_BOOLEAN) { - return {{ property.default }}; - } - return {{ property.memberName }}; - }{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_file_header.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_file_header.tmpl deleted file mode 100644 index 62ca053ef11..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_file_header.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{% filter noblanklines %} -{% copyright_block %} -/* - * This code was generated by https://github.com/googleapis/google-api-java-client-services/ -{% if options.include_timestamp %} - * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} - * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} - * Modify at your own risk. - */ -{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_method.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_method.tmpl deleted file mode 100644 index 0d3dc2ff0c6..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_method.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @return the request - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% end_parameter_list %}); - initialize(result); - return result; -} -{% if method.simple_upload_supported or method.resumable_upload_supported %} -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * - *- * This method should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @return the request - * @throws java.io.IOException if the initialization of the request fails - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% parameter %}mediaContent{% end_parameter %} - {% end_parameter_list %}); - initialize(result); - return result; -}{% endif %} - -public class {{ method.className }} extends {{ api.className }}Request<{{ method.responseType.fullClassName }}> { - - private static final String REST_PATH = "{{ method.restPath }}"; - - {% for param in method.parameters %} - {% if param.pattern %} - private final java.util.regex.Pattern {{ param.constantName }}_PATTERN = - java.util.regex.Pattern.compile({% literal param.pattern %}); - {% endif %} - {% endfor %} - -{% filter noblanklines %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% call_template _pattern_check_def param=param %} - {% endfor %} - {% if method.requestType and method.responseType.properties %} - {% call_template _required_param_def properties=method.responseType.properties %} - {% endif %} - {% call_template _alt_def method=method %} - {% if method.supportsMediaDownload %} - initializeMediaDownload(); - {% endif %} - } -{% endfilter %} - -{% filter noblanklines %} -{% if method.simple_upload_supported or method.resumable_upload_supported %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * - *- * This constructor should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", "/upload/" + getServicePath() + REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% endfor %} - initializeMediaUpload(mediaContent); - {% call_template _alt_def method=method %} - } -{% endif %} -{% endfilter %} -{% if method.supportsMediaDownload %} - @Override - public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { - super.executeMediaAndDownloadTo(outputStream); - } - - @Override - public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { - return super.executeMediaAsInputStream(); - } - - @Override - public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { - return super.executeMedia(); - } - -{% if method.useMediaDownloadService %} - - @Override - public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { - java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) - ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); - return new com.google.api.client.http.GenericUrl( - com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); - } -{% endif %} -{% endif %} -{% ifequal method.httpMethod "GET" %} - - @Override - public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { - return super.executeUsingHead(); - } - - @Override - public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { - return super.buildHttpRequestUsingHead(); - } -{% endifequal %} -{% for param in api.parameters %} - - @Override - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - return ({{ method.className }}) super.{{ param.setterName }}({{ param.memberName }}); - }{% endfor %} -{% for param in method.parameters %} -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - @com.google.api.client.util.Key{% ifnotequal param.wireName param.memberName %}("{{ param.wireName }}"){% endifnotequal %} - private {{ param.codeType }} {{ param.memberName }}; - - /**{% filter block_comment %}{{ param.description }} -{% if param.default %} [default: {{ param.default }}]{% endif %} -{% if param.minimum %} [minimum: {{ param.minimum }}]{% endif %} -{% if param.maximum %} [maximum: {{ param.maximum }}]{% endif %} {% endfilter %} - */ - public {{ param.codeType }} {{ param.getterName }}() { - return {{ param.memberName }}; - } - -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { -{% filter noblanklines %} - {% call_template _pattern_check_def param=param %} - this.{{ param.memberName }} = {{ param.memberName }}; - return this; -{% endfilter %} - } -{% ifequal param.codeType "java.lang.Boolean" %}{% ifnotequal param.default null %} -{% call_template _bool_getter_content_def property=param %} -{% endifnotequal %}{% endifequal %}{% endfor %} - - @Override - public {{ method.className }} set(String parameterName, Object value) { - return ({{ method.className }}) super.set(parameterName, value); - } -} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_model_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_model_content_def.tmpl deleted file mode 100644 index 98b1e8f1899..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_model_content_def.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -{% if current_model.arrayOf %} -@com.google.api.client.util.Key -{{ current_model.safeCodeType}} items; -{% endif %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * The value may be {@code null}. - */ - @com.google.api.client.util.Key{% if not property.member_name_is_json_name %}("{{ property.wireName }}"){% endif %}{% if property.requiresJsonString %} @com.google.api.client.json.JsonString{% endif %} - {% if property.is_variant_key %} - @com.google.api.client.json.JsonPolymorphicTypeMap(typeDefinitions={ - {% for key, ref in property.variant_map.items %} - @com.google.api.client.json.JsonPolymorphicTypeMap.TypeDef(key = {% literal key %}, ref = {{ ref.safe_code_type }}.class), - {% endfor %}}) - {% endif %} - {% if features.thin_models %}public{% else %}private{% endif %} {{ property.safeCodeType }} {{ property.memberName }}; -{% endfilter %} - -{% filter noblanklines %} - {% if property.data_type.isContainer %} -{% call_template _proguard_content_def schema=property.data_type.baseType %} - {% endif %} -{% endfilter %} -{% endfor %} -{% if not features.thin_models %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #decode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @return value or {@code null} for none - */ -{% endfilter %} - public {{ property.safeCodeType }} {{ property.getterName }}() { - return {{ property.memberName }}; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.getterName }}() - * @return Base64 decoded value or {@code null} for none - * - * @since 1.14 - */ - public byte[] decode{{ property.memberName|capfirst }}() { - return com.google.api.client.util.Base64.decodeBase64({{ property.memberName }}); - } -{% endifequal %}{% endifequal %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #encode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @param {{property.memberName }} {{property.memberName }} or {@code null} for none - */ -{% endfilter %} - public {{ current_model.safeClassName }} {{ property.setterName }}({{ property.safeCodeType }} {{property.memberName }}) { - this.{{ property.memberName }} = {{ property.memberName }}; - return this; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.setterName }}() - * - *- * The value is encoded Base64 or {@code null} for none. - *
- * - * @since 1.14 - */ - public {{ current_model.safeClassName }} encode{{ property.memberName|capfirst }}(byte[] {{property.memberName}}) { - this.{{ property.memberName }} = com.google.api.client.util.Base64.encodeBase64URLSafeString({{ property.memberName }}); - return this; - } -{% endifequal %}{% endifequal %} -{% ifequal property.codeType "java.lang.Boolean" %}{% ifnotequal property.default null %} -{% call_template _bool_getter_content_def property=property %} -{% endifnotequal %}{% endifequal %}{% endfor %}{% endif %} -{% if not features.thin_models %} - - @Override - public {{ current_model.safeClassName }} set(String fieldName, Object value) { - return ({{ current_model.safeClassName }}) super.set(fieldName, value); - } - - @Override - public {{ current_model.safeClassName }} clone() { - return ({{ current_model.safeClassName }}) super.clone(); - } -{% endif %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_model_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_model_def.tmpl deleted file mode 100644 index f19e5132036..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_model_def.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -{% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} - */ -public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { - -{% call_template _model_content_def current_model=child %} -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} -}{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_parameter.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_parameter.tmpl deleted file mode 100644 index 61735303b3a..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_parameter.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} -{% if parameter.default %}[default: {{ parameter.default }}]{% endif %} -{% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} -{% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} -{% endfilter %}{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_pattern_check_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_pattern_check_def.tmpl deleted file mode 100644 index f5bd8fa74a9..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_pattern_check_def.tmpl +++ /dev/null @@ -1,21 +0,0 @@ - {% if param.pattern %} - {% if param.repeated %} - if (!getSuppressPatternChecks()) { - for (String {{ param.memberName }}Elem : {{ param.memberName }}) { - {% if param.code_type == 'java.util.ListThe typical use is:
- *
- * {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
- * {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
- *
- *
- * @return the resource collection
- */
-public {{ resource.className }} {{ resource.codeName }}() {
- return new {{ resource.className }}();
-}
-
-/**
- * The "{{ resource.wireName }}" collection of methods.
- */
-public class {{ resource.className }} {{% indent %}
-{% for method in resource.methods %}
-{% call_template _method method=method %}{% endfor %}
-{% for subr in resource.resources %}
-{% call_template _resource resource=subr %}{% endfor %}
-{% endindent %}}
diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/pom.xml.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/pom.xml.tmpl
deleted file mode 100644
index 47c75299939..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/pom.xml.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-{% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/features.json b/generator/src/googleapis/codegen/languages/java/1.28.0/features.json
deleted file mode 100644
index 4fb4c6276e8..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.28.0/features.json
+++ /dev/null
@@ -1,487 +0,0 @@
-{
- "language": "java",
- "description": "Java libraries for Google APIs.",
- "generator": "java1_15",
- "releaseVersion": "1.28.0",
- "baseClientLibrary": "1.28.0",
- "oauthClientLibrary": "1.28.0",
- "httpClientLibrary": "1.28.0",
- "gsonVersion": "2.1",
- "httpClientVersion": "4.5.5",
- "jackson2CoreVersion": "2.9.6",
- "jdo2ApiVersion": "2.3-eb",
- "jettyVersion": "6.1.26",
- "jettyUtilVersion": "6.1.26",
- "jsr305Version": "3.0.2",
- "transactionApiVersion": "1.1",
- "descriptor_additions": {
- "proguard-config": "proguard-google-api-client.txt",
- "files": [
- {
- "path": "${___library_file_name___}.jar.properties",
- "type": "android.properties"
- } ]
- },
- "javadoc_links": [
- "http://docs.oracle.com/javase/7/docs/api",
- "https://googleapis.dev/java/google-http-client/${httpClientLibrary}/",
- "https://googleapis.dev/java/google-oauth-client/${oauthClientLibrary}/",
- "https://googleapis.dev/java/google-api-client/${baseClientLibrary}/"
- ],
- "requires": [
- {
- "name": "Google API Java Client Bundle",
- "environments": ["manual"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "bundle",
- "downloadUrl": "http://google-api-java-client.googlecode.com/files/google-api-java-client-${baseClientLibrary}.zip"
- }
- ]
- },{
- "name": "Google APIs Client Library",
- "environments": ["*"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google APIs Client Library",
- "environments": ["android"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-android-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google APIs Client Library",
- "environments": ["appengine"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-appengine-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-appengine-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-gson-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-gson-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-jackson2-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-jackson2-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-java6-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-java6-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet extensions to the Google APIs Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-servlet-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-servlet-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google OAuth Client Library",
- "environments": ["*"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google OAuth Client Library",
- "environments": ["appengine"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-appengine-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-appengine-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-java6-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-java6-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-jetty-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-jetty-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet and JDO extensions to the Google OAuth Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-servlet-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-servlet-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google HTTP Client Library",
- "environments": ["android"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-android-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google HTTP Client Library",
- "environments": ["appengine"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-appengine-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-appengine-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-gson-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jackson2-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "JDO extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jdo-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "GSON",
- "environments": ["*"],
- "version": "${gsonVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/gson-${gsonVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/gson-${gsonVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/gson-${gsonVersion}.jar.properties"
- }
- ]
- },{
- "name": "HTTP Client",
- "environments": ["servlet", "generic"],
- "version": "${httpClientVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/httpclient-${httpClientVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/httpclient-${httpClientVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson2 Core",
- "environments": ["*"],
- "version": "${jackson2CoreVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jackson-core-${jackson2CoreVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar.properties"
- }
- ]
- },{
- "name": "JDO2 API",
- "environments": ["appengine", "servlet"],
- "version": "${jdo2ApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jdo2-api-${jdo2ApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jdo2-api-${jdo2ApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty",
- "environments": ["generic"],
- "version": "${jettyVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-${jettyVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-${jettyVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty Util",
- "environments": ["generic"],
- "version": "${jettyUtilVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-util-${jettyUtilVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-util-${jettyUtilVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "JSR 305",
- "environments": ["*"],
- "version": "${jsr305Version}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jsr305-${jsr305Version}.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Transaction API",
- "environments": ["appengine", "servlet"],
- "version": "${transactionApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/transaction-api-${transactionApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/transaction-api-${transactionApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/CDDL-LICENSE.txt"
- }
- ]
- }
- ]
-}
diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/layouts.json b/generator/src/googleapis/codegen/languages/java/1.28.0/layouts.json
deleted file mode 100644
index e777cd0b456..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.28.0/layouts.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{"layouts": {
- "maven": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- },
- "gradle": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- }
- }
-}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___.java.tmpl
deleted file mode 100644
index fe2c5d6dfb1..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___.java.tmpl
+++ /dev/null
@@ -1,228 +0,0 @@
-{% language java %}{% collapsenewlines %}{% call_template _file_header %}
-
-package {{ api.module.name }};
-
-/**
- * Service definition for {{ api.className }} ({{ api.version }}).
- *
- * - * {{ api.description }} - *
- * - *- * For more information about this service, see the - * API Documentation - *
- * - *- * This service uses {@link {{ api.className }}RequestInitializer} to initialize global parameters via its - * {@link Builder}. - *
- * - * @since 1.3 - * @author Google, Inc. - */ -@SuppressWarnings("javadoc") -public class {{ api.className }} extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { - - // Note: Leave this static initializer at the top of the file. - static { - com.google.api.client.util.Preconditions.checkState( - com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && - com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15, - "You are currently running with version %s of google-api-client. " + - "You need at least version 1.15 of google-api-client to run version " + - "{{ features.releaseVersion }} of the {{ api.title }} library.", com.google.api.client.googleapis.GoogleUtils.VERSION); - } - - /** - * The default encoded root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_ROOT_URL = "{{ api.rootUrl }}"; - - /** - * The default encoded service path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_SERVICE_PATH = "{{ api.servicePath }}"; - - /** - * The default encoded batch path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.23 - */ - public static final String DEFAULT_BATCH_PATH = "{{ api.batchPath }}"; - - /** - * The default encoded base URL of the service. This is determined when the library is generated - * and normally should not be changed. - */ - public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; - - /**{% filter block_comment %} - * Constructor. - * {% endfilter %} - * - *- * Use {@link Builder} if you need to specify any of the optional parameters. - *
- * - * @param transport HTTP transport, which should normally be: - *- * Implementation is not thread-safe. - *
- * - * @since 1.3.0 - */ - public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { - - /** - * Returns an instance of a new builder. - * - * @param transport HTTP transport, which should normally be: - *- * The simplest usage is to use it to set the key parameter: - *
- * - *
- public static final GoogleClientRequestInitializer KEY_INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY);
- *
- *
- * - * There is also a constructor to set both the key and userIp parameters: - *
- * - *
- public static final GoogleClientRequestInitializer INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY, USER_IP);
- *
- *
- * - * If you want to implement custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer extends {{ api.className }}RequestInitializer {
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer2 extends {{ api.className }}RequestInitializer {
-
- public MyKeyRequestInitializer() {
- super(KEY, USER_IP);
- }
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Subclasses should be thread-safe. - *
- * - * @since 1.12 - */ -public class {{ api.className }}RequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { - - public {{ api.className }}RequestInitializer() { - super(); - } - - /** - * @param key API key or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key) { - super(key); - } - - /** - * @param key API key or {@code null} to leave it unchanged - * @param userIp user IP or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key, String userIp) { - super(key, userIp); - } - - @Override - public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest> request) throws java.io.IOException { - super.initializeJsonRequest(request); - initialize{{ api.className }}Request(({{ api.className }}Request>) request); - } - - /** - * Initializes {{ api.className }} request. - * - *- * Default implementation does nothing. Called from - * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. - *
- * - * @throws java.io.IOException I/O exception - */ - protected void initialize{{ api.className }}Request({{ api.className }}Request> request) throws java.io.IOException { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___Scopes.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___Scopes.java.tmpl deleted file mode 100644 index 9507ad28953..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___Scopes.java.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} -{% if not api.authscopes %}{% halt %}{% endif %} -package {{ api.module.name }}; - -/** - * Available OAuth 2.0 scopes for use with the {{ api.title }}. - * - * @since 1.4 - */ -public class {{ api.className }}Scopes { -{% for authscope in api.authscopes %} - /** {{ authscope.description }}. */ - public static final String {{ authscope.name }} = "{{ authscope.value }}"; -{% endfor %} - - /** - * Returns an unmodifiable set that contains all scopes declared by this class. - * - * @since 1.16 - */ - public static java.util.Set- * This is the Java data model class that specifies how to parse/serialize into the JSON that is - * transmitted over HTTP when working with the {{ api.title }}. For a detailed explanation see: - * {% endfilter %} - * https://developers.google.com/api-client-library/java/google-http-java-client/json - *
- * - * @author Google, Inc. - */ -{% filter noblanklines %} -@SuppressWarnings("javadoc") -{% if model.is_variant_base %} -public class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% elif model.superClass %} -public final class {{ model.className }} extends {{ model.superClass }} { -{% else %} -public final class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% endif %}{% endfilter %} - -{% filter noblanklines %} -{% if model.is_variant_base %} - protected {{ model.className }}(java.lang.String typeValue) { - this.{{ model.discriminant.memberName }} = typeValue; - } - - public {{ model.className }}() {} -{% elif model.discriminantValue %} - /** Constructs {{ model.className }}. **/ - public {{ model.className }}() { - super({% literal model.discriminantValue %}); - } -{% endif %}{% endfilter %} - -{% call_template _model_content_def current_model=model %} - -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %} -{% endfor %}}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_alt_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_alt_def.tmpl deleted file mode 100644 index 63bb0053eb2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_alt_def.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -{% comment %} -This template is used to determine when alt should be set to "json" in a method. -set("alt", "json") is generated if any of the cases are true: -* If method parameter alt!=json. -* If method does not have an alt parameter and global parameter alt!=json. -* If method does not have an alt parameter and global parameters does not have an alt parameter. -{% endcomment %} -{% if method.alt.default %} - {% ifnotequal method.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% else %} - {% ifnotequal api.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_bool_getter_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_bool_getter_content_def.tmpl deleted file mode 100644 index ed92c7251d4..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_bool_getter_content_def.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -{% filter noblanklines %} - /** - * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. - * - *- * Boolean properties can have four possible values: - * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} - * or {@link Boolean#FALSE}. - *
- * - *- * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} - * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and - * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - *
- * - *- *{% filter block_comment %}{{ property.description }}{% endfilter %} - *
- */ - public boolean is{{ property.memberName|capfirst }}() { - if ({{ property.memberName }} == null || {{ property.memberName }} == com.google.api.client.util.Data.NULL_BOOLEAN) { - return {{ property.default }}; - } - return {{ property.memberName }}; - }{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_file_header.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_file_header.tmpl deleted file mode 100644 index 62ca053ef11..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_file_header.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{% filter noblanklines %} -{% copyright_block %} -/* - * This code was generated by https://github.com/googleapis/google-api-java-client-services/ -{% if options.include_timestamp %} - * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} - * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} - * Modify at your own risk. - */ -{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_method.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_method.tmpl deleted file mode 100644 index 0d3dc2ff0c6..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_method.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @return the request - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% end_parameter_list %}); - initialize(result); - return result; -} -{% if method.simple_upload_supported or method.resumable_upload_supported %} -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * - *- * This method should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @return the request - * @throws java.io.IOException if the initialization of the request fails - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% parameter %}mediaContent{% end_parameter %} - {% end_parameter_list %}); - initialize(result); - return result; -}{% endif %} - -public class {{ method.className }} extends {{ api.className }}Request<{{ method.responseType.fullClassName }}> { - - private static final String REST_PATH = "{{ method.restPath }}"; - - {% for param in method.parameters %} - {% if param.pattern %} - private final java.util.regex.Pattern {{ param.constantName }}_PATTERN = - java.util.regex.Pattern.compile({% literal param.pattern %}); - {% endif %} - {% endfor %} - -{% filter noblanklines %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% call_template _pattern_check_def param=param %} - {% endfor %} - {% if method.requestType and method.responseType.properties %} - {% call_template _required_param_def properties=method.responseType.properties %} - {% endif %} - {% call_template _alt_def method=method %} - {% if method.supportsMediaDownload %} - initializeMediaDownload(); - {% endif %} - } -{% endfilter %} - -{% filter noblanklines %} -{% if method.simple_upload_supported or method.resumable_upload_supported %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * - *- * This constructor should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", "/upload/" + getServicePath() + REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% endfor %} - initializeMediaUpload(mediaContent); - {% call_template _alt_def method=method %} - } -{% endif %} -{% endfilter %} -{% if method.supportsMediaDownload %} - @Override - public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { - super.executeMediaAndDownloadTo(outputStream); - } - - @Override - public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { - return super.executeMediaAsInputStream(); - } - - @Override - public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { - return super.executeMedia(); - } - -{% if method.useMediaDownloadService %} - - @Override - public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { - java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) - ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); - return new com.google.api.client.http.GenericUrl( - com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); - } -{% endif %} -{% endif %} -{% ifequal method.httpMethod "GET" %} - - @Override - public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { - return super.executeUsingHead(); - } - - @Override - public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { - return super.buildHttpRequestUsingHead(); - } -{% endifequal %} -{% for param in api.parameters %} - - @Override - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - return ({{ method.className }}) super.{{ param.setterName }}({{ param.memberName }}); - }{% endfor %} -{% for param in method.parameters %} -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - @com.google.api.client.util.Key{% ifnotequal param.wireName param.memberName %}("{{ param.wireName }}"){% endifnotequal %} - private {{ param.codeType }} {{ param.memberName }}; - - /**{% filter block_comment %}{{ param.description }} -{% if param.default %} [default: {{ param.default }}]{% endif %} -{% if param.minimum %} [minimum: {{ param.minimum }}]{% endif %} -{% if param.maximum %} [maximum: {{ param.maximum }}]{% endif %} {% endfilter %} - */ - public {{ param.codeType }} {{ param.getterName }}() { - return {{ param.memberName }}; - } - -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { -{% filter noblanklines %} - {% call_template _pattern_check_def param=param %} - this.{{ param.memberName }} = {{ param.memberName }}; - return this; -{% endfilter %} - } -{% ifequal param.codeType "java.lang.Boolean" %}{% ifnotequal param.default null %} -{% call_template _bool_getter_content_def property=param %} -{% endifnotequal %}{% endifequal %}{% endfor %} - - @Override - public {{ method.className }} set(String parameterName, Object value) { - return ({{ method.className }}) super.set(parameterName, value); - } -} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_model_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_model_content_def.tmpl deleted file mode 100644 index 98b1e8f1899..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_model_content_def.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -{% if current_model.arrayOf %} -@com.google.api.client.util.Key -{{ current_model.safeCodeType}} items; -{% endif %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * The value may be {@code null}. - */ - @com.google.api.client.util.Key{% if not property.member_name_is_json_name %}("{{ property.wireName }}"){% endif %}{% if property.requiresJsonString %} @com.google.api.client.json.JsonString{% endif %} - {% if property.is_variant_key %} - @com.google.api.client.json.JsonPolymorphicTypeMap(typeDefinitions={ - {% for key, ref in property.variant_map.items %} - @com.google.api.client.json.JsonPolymorphicTypeMap.TypeDef(key = {% literal key %}, ref = {{ ref.safe_code_type }}.class), - {% endfor %}}) - {% endif %} - {% if features.thin_models %}public{% else %}private{% endif %} {{ property.safeCodeType }} {{ property.memberName }}; -{% endfilter %} - -{% filter noblanklines %} - {% if property.data_type.isContainer %} -{% call_template _proguard_content_def schema=property.data_type.baseType %} - {% endif %} -{% endfilter %} -{% endfor %} -{% if not features.thin_models %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #decode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @return value or {@code null} for none - */ -{% endfilter %} - public {{ property.safeCodeType }} {{ property.getterName }}() { - return {{ property.memberName }}; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.getterName }}() - * @return Base64 decoded value or {@code null} for none - * - * @since 1.14 - */ - public byte[] decode{{ property.memberName|capfirst }}() { - return com.google.api.client.util.Base64.decodeBase64({{ property.memberName }}); - } -{% endifequal %}{% endifequal %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #encode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @param {{property.memberName }} {{property.memberName }} or {@code null} for none - */ -{% endfilter %} - public {{ current_model.safeClassName }} {{ property.setterName }}({{ property.safeCodeType }} {{property.memberName }}) { - this.{{ property.memberName }} = {{ property.memberName }}; - return this; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.setterName }}() - * - *- * The value is encoded Base64 or {@code null} for none. - *
- * - * @since 1.14 - */ - public {{ current_model.safeClassName }} encode{{ property.memberName|capfirst }}(byte[] {{property.memberName}}) { - this.{{ property.memberName }} = com.google.api.client.util.Base64.encodeBase64URLSafeString({{ property.memberName }}); - return this; - } -{% endifequal %}{% endifequal %} -{% ifequal property.codeType "java.lang.Boolean" %}{% ifnotequal property.default null %} -{% call_template _bool_getter_content_def property=property %} -{% endifnotequal %}{% endifequal %}{% endfor %}{% endif %} -{% if not features.thin_models %} - - @Override - public {{ current_model.safeClassName }} set(String fieldName, Object value) { - return ({{ current_model.safeClassName }}) super.set(fieldName, value); - } - - @Override - public {{ current_model.safeClassName }} clone() { - return ({{ current_model.safeClassName }}) super.clone(); - } -{% endif %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_model_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_model_def.tmpl deleted file mode 100644 index f19e5132036..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_model_def.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -{% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} - */ -public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { - -{% call_template _model_content_def current_model=child %} -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} -}{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_parameter.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_parameter.tmpl deleted file mode 100644 index 61735303b3a..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_parameter.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} -{% if parameter.default %}[default: {{ parameter.default }}]{% endif %} -{% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} -{% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} -{% endfilter %}{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_pattern_check_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_pattern_check_def.tmpl deleted file mode 100644 index f5bd8fa74a9..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_pattern_check_def.tmpl +++ /dev/null @@ -1,21 +0,0 @@ - {% if param.pattern %} - {% if param.repeated %} - if (!getSuppressPatternChecks()) { - for (String {{ param.memberName }}Elem : {{ param.memberName }}) { - {% if param.code_type == 'java.util.ListThe typical use is:
- *
- * {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
- * {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
- *
- *
- * @return the resource collection
- */
-public {{ resource.className }} {{ resource.codeName }}() {
- return new {{ resource.className }}();
-}
-
-/**
- * The "{{ resource.wireName }}" collection of methods.
- */
-public class {{ resource.className }} {{% indent %}
-{% for method in resource.methods %}
-{% call_template _method method=method %}{% endfor %}
-{% for subr in resource.resources %}
-{% call_template _resource resource=subr %}{% endfor %}
-{% endindent %}}
diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/pom.xml.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/pom.xml.tmpl
deleted file mode 100644
index 47c75299939..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/pom.xml.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-{% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/features.json b/generator/src/googleapis/codegen/languages/java/1.29.2/features.json
deleted file mode 100644
index 7ab909c6eac..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.29.2/features.json
+++ /dev/null
@@ -1,487 +0,0 @@
-{
- "language": "java",
- "description": "Java libraries for Google APIs.",
- "generator": "java1_15",
- "releaseVersion": "1.29.2",
- "baseClientLibrary": "1.29.2",
- "oauthClientLibrary": "1.29.2",
- "httpClientLibrary": "1.29.2",
- "gsonVersion": "2.1",
- "httpClientVersion": "4.5.5",
- "jackson2CoreVersion": "2.9.6",
- "jdo2ApiVersion": "2.3-eb",
- "jettyVersion": "6.1.26",
- "jettyUtilVersion": "6.1.26",
- "jsr305Version": "3.0.2",
- "transactionApiVersion": "1.1",
- "descriptor_additions": {
- "proguard-config": "proguard-google-api-client.txt",
- "files": [
- {
- "path": "${___library_file_name___}.jar.properties",
- "type": "android.properties"
- } ]
- },
- "javadoc_links": [
- "http://docs.oracle.com/javase/7/docs/api",
- "https://googleapis.dev/java/google-http-client/${httpClientLibrary}/",
- "https://googleapis.dev/java/google-oauth-client/${oauthClientLibrary}/",
- "https://googleapis.dev/java/google-api-client/${baseClientLibrary}/"
- ],
- "requires": [
- {
- "name": "Google API Java Client Bundle",
- "environments": ["manual"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "bundle",
- "downloadUrl": "http://google-api-java-client.googlecode.com/files/google-api-java-client-${baseClientLibrary}.zip"
- }
- ]
- },{
- "name": "Google APIs Client Library",
- "environments": ["*"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google APIs Client Library",
- "environments": ["android"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-android-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google APIs Client Library",
- "environments": ["appengine"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-appengine-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-appengine-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-gson-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-gson-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-jackson2-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-jackson2-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-java6-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-java6-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet extensions to the Google APIs Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-servlet-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-servlet-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google OAuth Client Library",
- "environments": ["*"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google OAuth Client Library",
- "environments": ["appengine"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-appengine-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-appengine-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-java6-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-java6-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-jetty-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-jetty-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet and JDO extensions to the Google OAuth Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-servlet-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-servlet-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google HTTP Client Library",
- "environments": ["android"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-android-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google HTTP Client Library",
- "environments": ["appengine"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-appengine-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-appengine-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-gson-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jackson2-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "JDO extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jdo-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "GSON",
- "environments": ["*"],
- "version": "${gsonVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/gson-${gsonVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/gson-${gsonVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/gson-${gsonVersion}.jar.properties"
- }
- ]
- },{
- "name": "HTTP Client",
- "environments": ["servlet", "generic"],
- "version": "${httpClientVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/httpclient-${httpClientVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/httpclient-${httpClientVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson2 Core",
- "environments": ["*"],
- "version": "${jackson2CoreVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jackson-core-${jackson2CoreVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar.properties"
- }
- ]
- },{
- "name": "JDO2 API",
- "environments": ["appengine", "servlet"],
- "version": "${jdo2ApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jdo2-api-${jdo2ApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jdo2-api-${jdo2ApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty",
- "environments": ["generic"],
- "version": "${jettyVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-${jettyVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-${jettyVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty Util",
- "environments": ["generic"],
- "version": "${jettyUtilVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-util-${jettyUtilVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-util-${jettyUtilVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "JSR 305",
- "environments": ["*"],
- "version": "${jsr305Version}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jsr305-${jsr305Version}.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Transaction API",
- "environments": ["appengine", "servlet"],
- "version": "${transactionApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/transaction-api-${transactionApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/transaction-api-${transactionApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/CDDL-LICENSE.txt"
- }
- ]
- }
- ]
-}
diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/layouts.json b/generator/src/googleapis/codegen/languages/java/1.29.2/layouts.json
deleted file mode 100644
index e777cd0b456..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.29.2/layouts.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{"layouts": {
- "maven": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- },
- "gradle": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- }
- }
-}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___.java.tmpl
deleted file mode 100644
index fe2c5d6dfb1..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___.java.tmpl
+++ /dev/null
@@ -1,228 +0,0 @@
-{% language java %}{% collapsenewlines %}{% call_template _file_header %}
-
-package {{ api.module.name }};
-
-/**
- * Service definition for {{ api.className }} ({{ api.version }}).
- *
- * - * {{ api.description }} - *
- * - *- * For more information about this service, see the - * API Documentation - *
- * - *- * This service uses {@link {{ api.className }}RequestInitializer} to initialize global parameters via its - * {@link Builder}. - *
- * - * @since 1.3 - * @author Google, Inc. - */ -@SuppressWarnings("javadoc") -public class {{ api.className }} extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { - - // Note: Leave this static initializer at the top of the file. - static { - com.google.api.client.util.Preconditions.checkState( - com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && - com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15, - "You are currently running with version %s of google-api-client. " + - "You need at least version 1.15 of google-api-client to run version " + - "{{ features.releaseVersion }} of the {{ api.title }} library.", com.google.api.client.googleapis.GoogleUtils.VERSION); - } - - /** - * The default encoded root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_ROOT_URL = "{{ api.rootUrl }}"; - - /** - * The default encoded service path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_SERVICE_PATH = "{{ api.servicePath }}"; - - /** - * The default encoded batch path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.23 - */ - public static final String DEFAULT_BATCH_PATH = "{{ api.batchPath }}"; - - /** - * The default encoded base URL of the service. This is determined when the library is generated - * and normally should not be changed. - */ - public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; - - /**{% filter block_comment %} - * Constructor. - * {% endfilter %} - * - *- * Use {@link Builder} if you need to specify any of the optional parameters. - *
- * - * @param transport HTTP transport, which should normally be: - *- * Implementation is not thread-safe. - *
- * - * @since 1.3.0 - */ - public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { - - /** - * Returns an instance of a new builder. - * - * @param transport HTTP transport, which should normally be: - *- * The simplest usage is to use it to set the key parameter: - *
- * - *
- public static final GoogleClientRequestInitializer KEY_INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY);
- *
- *
- * - * There is also a constructor to set both the key and userIp parameters: - *
- * - *
- public static final GoogleClientRequestInitializer INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY, USER_IP);
- *
- *
- * - * If you want to implement custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer extends {{ api.className }}RequestInitializer {
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer2 extends {{ api.className }}RequestInitializer {
-
- public MyKeyRequestInitializer() {
- super(KEY, USER_IP);
- }
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Subclasses should be thread-safe. - *
- * - * @since 1.12 - */ -public class {{ api.className }}RequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { - - public {{ api.className }}RequestInitializer() { - super(); - } - - /** - * @param key API key or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key) { - super(key); - } - - /** - * @param key API key or {@code null} to leave it unchanged - * @param userIp user IP or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key, String userIp) { - super(key, userIp); - } - - @Override - public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest> request) throws java.io.IOException { - super.initializeJsonRequest(request); - initialize{{ api.className }}Request(({{ api.className }}Request>) request); - } - - /** - * Initializes {{ api.className }} request. - * - *- * Default implementation does nothing. Called from - * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. - *
- * - * @throws java.io.IOException I/O exception - */ - protected void initialize{{ api.className }}Request({{ api.className }}Request> request) throws java.io.IOException { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___Scopes.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___Scopes.java.tmpl deleted file mode 100644 index 9507ad28953..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___Scopes.java.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} -{% if not api.authscopes %}{% halt %}{% endif %} -package {{ api.module.name }}; - -/** - * Available OAuth 2.0 scopes for use with the {{ api.title }}. - * - * @since 1.4 - */ -public class {{ api.className }}Scopes { -{% for authscope in api.authscopes %} - /** {{ authscope.description }}. */ - public static final String {{ authscope.name }} = "{{ authscope.value }}"; -{% endfor %} - - /** - * Returns an unmodifiable set that contains all scopes declared by this class. - * - * @since 1.16 - */ - public static java.util.Set- * This is the Java data model class that specifies how to parse/serialize into the JSON that is - * transmitted over HTTP when working with the {{ api.title }}. For a detailed explanation see: - * {% endfilter %} - * https://developers.google.com/api-client-library/java/google-http-java-client/json - *
- * - * @author Google, Inc. - */ -{% filter noblanklines %} -@SuppressWarnings("javadoc") -{% if model.is_variant_base %} -public class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% elif model.superClass %} -public final class {{ model.className }} extends {{ model.superClass }} { -{% else %} -public final class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% endif %}{% endfilter %} - -{% filter noblanklines %} -{% if model.is_variant_base %} - protected {{ model.className }}(java.lang.String typeValue) { - this.{{ model.discriminant.memberName }} = typeValue; - } - - public {{ model.className }}() {} -{% elif model.discriminantValue %} - /** Constructs {{ model.className }}. **/ - public {{ model.className }}() { - super({% literal model.discriminantValue %}); - } -{% endif %}{% endfilter %} - -{% call_template _model_content_def current_model=model %} - -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %} -{% endfor %}}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_alt_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_alt_def.tmpl deleted file mode 100644 index 63bb0053eb2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_alt_def.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -{% comment %} -This template is used to determine when alt should be set to "json" in a method. -set("alt", "json") is generated if any of the cases are true: -* If method parameter alt!=json. -* If method does not have an alt parameter and global parameter alt!=json. -* If method does not have an alt parameter and global parameters does not have an alt parameter. -{% endcomment %} -{% if method.alt.default %} - {% ifnotequal method.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% else %} - {% ifnotequal api.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_bool_getter_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_bool_getter_content_def.tmpl deleted file mode 100644 index ed92c7251d4..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_bool_getter_content_def.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -{% filter noblanklines %} - /** - * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. - * - *- * Boolean properties can have four possible values: - * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} - * or {@link Boolean#FALSE}. - *
- * - *- * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} - * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and - * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - *
- * - *- *{% filter block_comment %}{{ property.description }}{% endfilter %} - *
- */ - public boolean is{{ property.memberName|capfirst }}() { - if ({{ property.memberName }} == null || {{ property.memberName }} == com.google.api.client.util.Data.NULL_BOOLEAN) { - return {{ property.default }}; - } - return {{ property.memberName }}; - }{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_file_header.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_file_header.tmpl deleted file mode 100644 index 62ca053ef11..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_file_header.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{% filter noblanklines %} -{% copyright_block %} -/* - * This code was generated by https://github.com/googleapis/google-api-java-client-services/ -{% if options.include_timestamp %} - * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} - * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} - * Modify at your own risk. - */ -{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_method.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_method.tmpl deleted file mode 100644 index 0d3dc2ff0c6..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_method.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @return the request - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% end_parameter_list %}); - initialize(result); - return result; -} -{% if method.simple_upload_supported or method.resumable_upload_supported %} -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * - *- * This method should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @return the request - * @throws java.io.IOException if the initialization of the request fails - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% parameter %}mediaContent{% end_parameter %} - {% end_parameter_list %}); - initialize(result); - return result; -}{% endif %} - -public class {{ method.className }} extends {{ api.className }}Request<{{ method.responseType.fullClassName }}> { - - private static final String REST_PATH = "{{ method.restPath }}"; - - {% for param in method.parameters %} - {% if param.pattern %} - private final java.util.regex.Pattern {{ param.constantName }}_PATTERN = - java.util.regex.Pattern.compile({% literal param.pattern %}); - {% endif %} - {% endfor %} - -{% filter noblanklines %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% call_template _pattern_check_def param=param %} - {% endfor %} - {% if method.requestType and method.responseType.properties %} - {% call_template _required_param_def properties=method.responseType.properties %} - {% endif %} - {% call_template _alt_def method=method %} - {% if method.supportsMediaDownload %} - initializeMediaDownload(); - {% endif %} - } -{% endfilter %} - -{% filter noblanklines %} -{% if method.simple_upload_supported or method.resumable_upload_supported %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * - *- * This constructor should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", "/upload/" + getServicePath() + REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% endfor %} - initializeMediaUpload(mediaContent); - {% call_template _alt_def method=method %} - } -{% endif %} -{% endfilter %} -{% if method.supportsMediaDownload %} - @Override - public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { - super.executeMediaAndDownloadTo(outputStream); - } - - @Override - public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { - return super.executeMediaAsInputStream(); - } - - @Override - public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { - return super.executeMedia(); - } - -{% if method.useMediaDownloadService %} - - @Override - public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { - java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) - ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); - return new com.google.api.client.http.GenericUrl( - com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); - } -{% endif %} -{% endif %} -{% ifequal method.httpMethod "GET" %} - - @Override - public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { - return super.executeUsingHead(); - } - - @Override - public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { - return super.buildHttpRequestUsingHead(); - } -{% endifequal %} -{% for param in api.parameters %} - - @Override - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - return ({{ method.className }}) super.{{ param.setterName }}({{ param.memberName }}); - }{% endfor %} -{% for param in method.parameters %} -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - @com.google.api.client.util.Key{% ifnotequal param.wireName param.memberName %}("{{ param.wireName }}"){% endifnotequal %} - private {{ param.codeType }} {{ param.memberName }}; - - /**{% filter block_comment %}{{ param.description }} -{% if param.default %} [default: {{ param.default }}]{% endif %} -{% if param.minimum %} [minimum: {{ param.minimum }}]{% endif %} -{% if param.maximum %} [maximum: {{ param.maximum }}]{% endif %} {% endfilter %} - */ - public {{ param.codeType }} {{ param.getterName }}() { - return {{ param.memberName }}; - } - -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { -{% filter noblanklines %} - {% call_template _pattern_check_def param=param %} - this.{{ param.memberName }} = {{ param.memberName }}; - return this; -{% endfilter %} - } -{% ifequal param.codeType "java.lang.Boolean" %}{% ifnotequal param.default null %} -{% call_template _bool_getter_content_def property=param %} -{% endifnotequal %}{% endifequal %}{% endfor %} - - @Override - public {{ method.className }} set(String parameterName, Object value) { - return ({{ method.className }}) super.set(parameterName, value); - } -} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_model_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_model_content_def.tmpl deleted file mode 100644 index 98b1e8f1899..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_model_content_def.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -{% if current_model.arrayOf %} -@com.google.api.client.util.Key -{{ current_model.safeCodeType}} items; -{% endif %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * The value may be {@code null}. - */ - @com.google.api.client.util.Key{% if not property.member_name_is_json_name %}("{{ property.wireName }}"){% endif %}{% if property.requiresJsonString %} @com.google.api.client.json.JsonString{% endif %} - {% if property.is_variant_key %} - @com.google.api.client.json.JsonPolymorphicTypeMap(typeDefinitions={ - {% for key, ref in property.variant_map.items %} - @com.google.api.client.json.JsonPolymorphicTypeMap.TypeDef(key = {% literal key %}, ref = {{ ref.safe_code_type }}.class), - {% endfor %}}) - {% endif %} - {% if features.thin_models %}public{% else %}private{% endif %} {{ property.safeCodeType }} {{ property.memberName }}; -{% endfilter %} - -{% filter noblanklines %} - {% if property.data_type.isContainer %} -{% call_template _proguard_content_def schema=property.data_type.baseType %} - {% endif %} -{% endfilter %} -{% endfor %} -{% if not features.thin_models %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #decode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @return value or {@code null} for none - */ -{% endfilter %} - public {{ property.safeCodeType }} {{ property.getterName }}() { - return {{ property.memberName }}; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.getterName }}() - * @return Base64 decoded value or {@code null} for none - * - * @since 1.14 - */ - public byte[] decode{{ property.memberName|capfirst }}() { - return com.google.api.client.util.Base64.decodeBase64({{ property.memberName }}); - } -{% endifequal %}{% endifequal %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #encode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @param {{property.memberName }} {{property.memberName }} or {@code null} for none - */ -{% endfilter %} - public {{ current_model.safeClassName }} {{ property.setterName }}({{ property.safeCodeType }} {{property.memberName }}) { - this.{{ property.memberName }} = {{ property.memberName }}; - return this; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.setterName }}() - * - *- * The value is encoded Base64 or {@code null} for none. - *
- * - * @since 1.14 - */ - public {{ current_model.safeClassName }} encode{{ property.memberName|capfirst }}(byte[] {{property.memberName}}) { - this.{{ property.memberName }} = com.google.api.client.util.Base64.encodeBase64URLSafeString({{ property.memberName }}); - return this; - } -{% endifequal %}{% endifequal %} -{% ifequal property.codeType "java.lang.Boolean" %}{% ifnotequal property.default null %} -{% call_template _bool_getter_content_def property=property %} -{% endifnotequal %}{% endifequal %}{% endfor %}{% endif %} -{% if not features.thin_models %} - - @Override - public {{ current_model.safeClassName }} set(String fieldName, Object value) { - return ({{ current_model.safeClassName }}) super.set(fieldName, value); - } - - @Override - public {{ current_model.safeClassName }} clone() { - return ({{ current_model.safeClassName }}) super.clone(); - } -{% endif %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_model_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_model_def.tmpl deleted file mode 100644 index f19e5132036..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_model_def.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -{% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} - */ -public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { - -{% call_template _model_content_def current_model=child %} -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} -}{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_parameter.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_parameter.tmpl deleted file mode 100644 index 61735303b3a..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_parameter.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} -{% if parameter.default %}[default: {{ parameter.default }}]{% endif %} -{% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} -{% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} -{% endfilter %}{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_pattern_check_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_pattern_check_def.tmpl deleted file mode 100644 index f5bd8fa74a9..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_pattern_check_def.tmpl +++ /dev/null @@ -1,21 +0,0 @@ - {% if param.pattern %} - {% if param.repeated %} - if (!getSuppressPatternChecks()) { - for (String {{ param.memberName }}Elem : {{ param.memberName }}) { - {% if param.code_type == 'java.util.ListThe typical use is:
- *
- * {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
- * {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
- *
- *
- * @return the resource collection
- */
-public {{ resource.className }} {{ resource.codeName }}() {
- return new {{ resource.className }}();
-}
-
-/**
- * The "{{ resource.wireName }}" collection of methods.
- */
-public class {{ resource.className }} {{% indent %}
-{% for method in resource.methods %}
-{% call_template _method method=method %}{% endfor %}
-{% for subr in resource.resources %}
-{% call_template _resource resource=subr %}{% endfor %}
-{% endindent %}}
diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/pom.xml.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/pom.xml.tmpl
deleted file mode 100644
index 47c75299939..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/pom.xml.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-{% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/features.json b/generator/src/googleapis/codegen/languages/java/1.30.1/features.json
deleted file mode 100644
index 49e6076ca9e..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.30.1/features.json
+++ /dev/null
@@ -1,487 +0,0 @@
-{
- "language": "java",
- "description": "Java libraries for Google APIs.",
- "generator": "java1_15",
- "releaseVersion": "1.30.10",
- "baseClientLibrary": "1.30.10",
- "oauthClientLibrary": "1.31.0",
- "httpClientLibrary": "1.36.0",
- "gsonVersion": "2.8.6",
- "httpClientVersion": "4.5.11",
- "jackson2CoreVersion": "2.11.1",
- "jdo2ApiVersion": "2.3-eb",
- "jettyVersion": "6.1.26",
- "jettyUtilVersion": "6.1.26",
- "jsr305Version": "3.0.2",
- "transactionApiVersion": "1.1",
- "descriptor_additions": {
- "proguard-config": "proguard-google-api-client.txt",
- "files": [
- {
- "path": "${___library_file_name___}.jar.properties",
- "type": "android.properties"
- } ]
- },
- "javadoc_links": [
- "http://docs.oracle.com/javase/7/docs/api",
- "https://googleapis.dev/java/google-http-client/${httpClientLibrary}/",
- "https://googleapis.dev/java/google-oauth-client/${oauthClientLibrary}/",
- "https://googleapis.dev/java/google-api-client/${baseClientLibrary}/"
- ],
- "requires": [
- {
- "name": "Google API Java Client Bundle",
- "environments": ["manual"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "bundle",
- "downloadUrl": "http://google-api-java-client.googlecode.com/files/google-api-java-client-${baseClientLibrary}.zip"
- }
- ]
- },{
- "name": "Google APIs Client Library",
- "environments": ["*"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google APIs Client Library",
- "environments": ["android"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-android-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google APIs Client Library",
- "environments": ["appengine"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-appengine-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-appengine-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-gson-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-gson-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-jackson2-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-jackson2-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-java6-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-java6-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet extensions to the Google APIs Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-servlet-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-servlet-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google OAuth Client Library",
- "environments": ["*"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google OAuth Client Library",
- "environments": ["appengine"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-appengine-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-appengine-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-java6-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-java6-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-jetty-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-jetty-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet and JDO extensions to the Google OAuth Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-servlet-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-servlet-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google HTTP Client Library",
- "environments": ["android"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-android-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google HTTP Client Library",
- "environments": ["appengine"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-appengine-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-appengine-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-gson-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jackson2-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "JDO extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jdo-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "GSON",
- "environments": ["*"],
- "version": "${gsonVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/gson-${gsonVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/gson-${gsonVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/gson-${gsonVersion}.jar.properties"
- }
- ]
- },{
- "name": "HTTP Client",
- "environments": ["servlet", "generic"],
- "version": "${httpClientVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/httpclient-${httpClientVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/httpclient-${httpClientVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson2 Core",
- "environments": ["*"],
- "version": "${jackson2CoreVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jackson-core-${jackson2CoreVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar.properties"
- }
- ]
- },{
- "name": "JDO2 API",
- "environments": ["appengine", "servlet"],
- "version": "${jdo2ApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jdo2-api-${jdo2ApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jdo2-api-${jdo2ApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty",
- "environments": ["generic"],
- "version": "${jettyVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-${jettyVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-${jettyVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty Util",
- "environments": ["generic"],
- "version": "${jettyUtilVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-util-${jettyUtilVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-util-${jettyUtilVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "JSR 305",
- "environments": ["*"],
- "version": "${jsr305Version}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jsr305-${jsr305Version}.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Transaction API",
- "environments": ["appengine", "servlet"],
- "version": "${transactionApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/transaction-api-${transactionApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/transaction-api-${transactionApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/CDDL-LICENSE.txt"
- }
- ]
- }
- ]
-}
diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/layouts.json b/generator/src/googleapis/codegen/languages/java/1.30.1/layouts.json
deleted file mode 100644
index e777cd0b456..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.30.1/layouts.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{"layouts": {
- "maven": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- },
- "gradle": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- }
- }
-}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/README.md.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/README.md.tmpl
deleted file mode 100644
index 79b31cc8d80..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/README.md.tmpl
+++ /dev/null
@@ -1,44 +0,0 @@
-# {{ api.title }} Client Library for Java
-
-{{ api.description }}
-
-This page contains information about getting started with the {{ api.title }}
-using the Google API Client Library for Java. In addition, you may be interested
-in the following documentation:
-
-* Browse the [Javadoc reference for the {{ api.title }}][javadoc]
-* Read the [Developer's Guide for the Google API Client Library for Java][google-api-client].
-* Interact with this API in your browser using the [APIs Explorer for the {{ api.title }}][api-explorer]
-
-## Installation
-
-### Maven
-
-Add the following lines to your `pom.xml` file:
-
-```xml
-- * {{ api.description }} - *
- * - *- * For more information about this service, see the - * API Documentation - *
- * - *- * This service uses {@link {{ api.className }}RequestInitializer} to initialize global parameters via its - * {@link Builder}. - *
- * - * @since 1.3 - * @author Google, Inc. - */ -@SuppressWarnings("javadoc") -public class {{ api.className }} extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { - - // Note: Leave this static initializer at the top of the file. - static { - com.google.api.client.util.Preconditions.checkState( - com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && - com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15, - "You are currently running with version %s of google-api-client. " + - "You need at least version 1.15 of google-api-client to run version " + - "{{ features.releaseVersion }} of the {{ api.title }} library.", com.google.api.client.googleapis.GoogleUtils.VERSION); - } - - /** - * The default encoded root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_ROOT_URL = "{{ api.rootUrl }}"; - - /** - * The default encoded service path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_SERVICE_PATH = "{{ api.servicePath }}"; - - /** - * The default encoded batch path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.23 - */ - public static final String DEFAULT_BATCH_PATH = "{{ api.batchPath }}"; - - /** - * The default encoded base URL of the service. This is determined when the library is generated - * and normally should not be changed. - */ - public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; - - /**{% filter block_comment %} - * Constructor. - * {% endfilter %} - * - *- * Use {@link Builder} if you need to specify any of the optional parameters. - *
- * - * @param transport HTTP transport, which should normally be: - *- * Implementation is not thread-safe. - *
- * - * @since 1.3.0 - */ - public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { - - /** - * Returns an instance of a new builder. - * - * @param transport HTTP transport, which should normally be: - *- * The simplest usage is to use it to set the key parameter: - *
- * - *
- public static final GoogleClientRequestInitializer KEY_INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY);
- *
- *
- * - * There is also a constructor to set both the key and userIp parameters: - *
- * - *
- public static final GoogleClientRequestInitializer INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY, USER_IP);
- *
- *
- * - * If you want to implement custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer extends {{ api.className }}RequestInitializer {
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer2 extends {{ api.className }}RequestInitializer {
-
- public MyKeyRequestInitializer() {
- super(KEY, USER_IP);
- }
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Subclasses should be thread-safe. - *
- * - * @since 1.12 - */ -public class {{ api.className }}RequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { - - public {{ api.className }}RequestInitializer() { - super(); - } - - /** - * @param key API key or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key) { - super(key); - } - - /** - * @param key API key or {@code null} to leave it unchanged - * @param userIp user IP or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key, String userIp) { - super(key, userIp); - } - - @Override - public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest> request) throws java.io.IOException { - super.initializeJsonRequest(request); - initialize{{ api.className }}Request(({{ api.className }}Request>) request); - } - - /** - * Initializes {{ api.className }} request. - * - *- * Default implementation does nothing. Called from - * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. - *
- * - * @throws java.io.IOException I/O exception - */ - protected void initialize{{ api.className }}Request({{ api.className }}Request> request) throws java.io.IOException { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___Scopes.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___Scopes.java.tmpl deleted file mode 100644 index 9507ad28953..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___Scopes.java.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} -{% if not api.authscopes %}{% halt %}{% endif %} -package {{ api.module.name }}; - -/** - * Available OAuth 2.0 scopes for use with the {{ api.title }}. - * - * @since 1.4 - */ -public class {{ api.className }}Scopes { -{% for authscope in api.authscopes %} - /** {{ authscope.description }}. */ - public static final String {{ authscope.name }} = "{{ authscope.value }}"; -{% endfor %} - - /** - * Returns an unmodifiable set that contains all scopes declared by this class. - * - * @since 1.16 - */ - public static java.util.Set- * This is the Java data model class that specifies how to parse/serialize into the JSON that is - * transmitted over HTTP when working with the {{ api.title }}. For a detailed explanation see: - * {% endfilter %} - * https://developers.google.com/api-client-library/java/google-http-java-client/json - *
- * - * @author Google, Inc. - */ -{% filter noblanklines %} -@SuppressWarnings("javadoc") -{% if model.is_variant_base %} -public class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% elif model.superClass %} -public final class {{ model.className }} extends {{ model.superClass }} { -{% else %} -public final class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% endif %}{% endfilter %} - -{% filter noblanklines %} -{% if model.is_variant_base %} - protected {{ model.className }}(java.lang.String typeValue) { - this.{{ model.discriminant.memberName }} = typeValue; - } - - public {{ model.className }}() {} -{% elif model.discriminantValue %} - /** Constructs {{ model.className }}. **/ - public {{ model.className }}() { - super({% literal model.discriminantValue %}); - } -{% endif %}{% endfilter %} - -{% call_template _model_content_def current_model=model %} - -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %} -{% endfor %}}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_alt_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_alt_def.tmpl deleted file mode 100644 index 63bb0053eb2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_alt_def.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -{% comment %} -This template is used to determine when alt should be set to "json" in a method. -set("alt", "json") is generated if any of the cases are true: -* If method parameter alt!=json. -* If method does not have an alt parameter and global parameter alt!=json. -* If method does not have an alt parameter and global parameters does not have an alt parameter. -{% endcomment %} -{% if method.alt.default %} - {% ifnotequal method.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% else %} - {% ifnotequal api.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_bool_getter_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_bool_getter_content_def.tmpl deleted file mode 100644 index ed92c7251d4..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_bool_getter_content_def.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -{% filter noblanklines %} - /** - * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. - * - *- * Boolean properties can have four possible values: - * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} - * or {@link Boolean#FALSE}. - *
- * - *- * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} - * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and - * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - *
- * - *- *{% filter block_comment %}{{ property.description }}{% endfilter %} - *
- */ - public boolean is{{ property.memberName|capfirst }}() { - if ({{ property.memberName }} == null || {{ property.memberName }} == com.google.api.client.util.Data.NULL_BOOLEAN) { - return {{ property.default }}; - } - return {{ property.memberName }}; - }{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_file_header.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_file_header.tmpl deleted file mode 100644 index 62ca053ef11..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_file_header.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{% filter noblanklines %} -{% copyright_block %} -/* - * This code was generated by https://github.com/googleapis/google-api-java-client-services/ -{% if options.include_timestamp %} - * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} - * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} - * Modify at your own risk. - */ -{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_method.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_method.tmpl deleted file mode 100644 index 0d3dc2ff0c6..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_method.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @return the request - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% end_parameter_list %}); - initialize(result); - return result; -} -{% if method.simple_upload_supported or method.resumable_upload_supported %} -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * - *- * This method should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @return the request - * @throws java.io.IOException if the initialization of the request fails - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% parameter %}mediaContent{% end_parameter %} - {% end_parameter_list %}); - initialize(result); - return result; -}{% endif %} - -public class {{ method.className }} extends {{ api.className }}Request<{{ method.responseType.fullClassName }}> { - - private static final String REST_PATH = "{{ method.restPath }}"; - - {% for param in method.parameters %} - {% if param.pattern %} - private final java.util.regex.Pattern {{ param.constantName }}_PATTERN = - java.util.regex.Pattern.compile({% literal param.pattern %}); - {% endif %} - {% endfor %} - -{% filter noblanklines %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% call_template _pattern_check_def param=param %} - {% endfor %} - {% if method.requestType and method.responseType.properties %} - {% call_template _required_param_def properties=method.responseType.properties %} - {% endif %} - {% call_template _alt_def method=method %} - {% if method.supportsMediaDownload %} - initializeMediaDownload(); - {% endif %} - } -{% endfilter %} - -{% filter noblanklines %} -{% if method.simple_upload_supported or method.resumable_upload_supported %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * - *- * This constructor should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", "/upload/" + getServicePath() + REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% endfor %} - initializeMediaUpload(mediaContent); - {% call_template _alt_def method=method %} - } -{% endif %} -{% endfilter %} -{% if method.supportsMediaDownload %} - @Override - public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { - super.executeMediaAndDownloadTo(outputStream); - } - - @Override - public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { - return super.executeMediaAsInputStream(); - } - - @Override - public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { - return super.executeMedia(); - } - -{% if method.useMediaDownloadService %} - - @Override - public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { - java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) - ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); - return new com.google.api.client.http.GenericUrl( - com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); - } -{% endif %} -{% endif %} -{% ifequal method.httpMethod "GET" %} - - @Override - public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { - return super.executeUsingHead(); - } - - @Override - public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { - return super.buildHttpRequestUsingHead(); - } -{% endifequal %} -{% for param in api.parameters %} - - @Override - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - return ({{ method.className }}) super.{{ param.setterName }}({{ param.memberName }}); - }{% endfor %} -{% for param in method.parameters %} -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - @com.google.api.client.util.Key{% ifnotequal param.wireName param.memberName %}("{{ param.wireName }}"){% endifnotequal %} - private {{ param.codeType }} {{ param.memberName }}; - - /**{% filter block_comment %}{{ param.description }} -{% if param.default %} [default: {{ param.default }}]{% endif %} -{% if param.minimum %} [minimum: {{ param.minimum }}]{% endif %} -{% if param.maximum %} [maximum: {{ param.maximum }}]{% endif %} {% endfilter %} - */ - public {{ param.codeType }} {{ param.getterName }}() { - return {{ param.memberName }}; - } - -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { -{% filter noblanklines %} - {% call_template _pattern_check_def param=param %} - this.{{ param.memberName }} = {{ param.memberName }}; - return this; -{% endfilter %} - } -{% ifequal param.codeType "java.lang.Boolean" %}{% ifnotequal param.default null %} -{% call_template _bool_getter_content_def property=param %} -{% endifnotequal %}{% endifequal %}{% endfor %} - - @Override - public {{ method.className }} set(String parameterName, Object value) { - return ({{ method.className }}) super.set(parameterName, value); - } -} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_model_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_model_content_def.tmpl deleted file mode 100644 index 98b1e8f1899..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_model_content_def.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -{% if current_model.arrayOf %} -@com.google.api.client.util.Key -{{ current_model.safeCodeType}} items; -{% endif %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * The value may be {@code null}. - */ - @com.google.api.client.util.Key{% if not property.member_name_is_json_name %}("{{ property.wireName }}"){% endif %}{% if property.requiresJsonString %} @com.google.api.client.json.JsonString{% endif %} - {% if property.is_variant_key %} - @com.google.api.client.json.JsonPolymorphicTypeMap(typeDefinitions={ - {% for key, ref in property.variant_map.items %} - @com.google.api.client.json.JsonPolymorphicTypeMap.TypeDef(key = {% literal key %}, ref = {{ ref.safe_code_type }}.class), - {% endfor %}}) - {% endif %} - {% if features.thin_models %}public{% else %}private{% endif %} {{ property.safeCodeType }} {{ property.memberName }}; -{% endfilter %} - -{% filter noblanklines %} - {% if property.data_type.isContainer %} -{% call_template _proguard_content_def schema=property.data_type.baseType %} - {% endif %} -{% endfilter %} -{% endfor %} -{% if not features.thin_models %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #decode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @return value or {@code null} for none - */ -{% endfilter %} - public {{ property.safeCodeType }} {{ property.getterName }}() { - return {{ property.memberName }}; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.getterName }}() - * @return Base64 decoded value or {@code null} for none - * - * @since 1.14 - */ - public byte[] decode{{ property.memberName|capfirst }}() { - return com.google.api.client.util.Base64.decodeBase64({{ property.memberName }}); - } -{% endifequal %}{% endifequal %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #encode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @param {{property.memberName }} {{property.memberName }} or {@code null} for none - */ -{% endfilter %} - public {{ current_model.safeClassName }} {{ property.setterName }}({{ property.safeCodeType }} {{property.memberName }}) { - this.{{ property.memberName }} = {{ property.memberName }}; - return this; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.setterName }}() - * - *- * The value is encoded Base64 or {@code null} for none. - *
- * - * @since 1.14 - */ - public {{ current_model.safeClassName }} encode{{ property.memberName|capfirst }}(byte[] {{property.memberName}}) { - this.{{ property.memberName }} = com.google.api.client.util.Base64.encodeBase64URLSafeString({{ property.memberName }}); - return this; - } -{% endifequal %}{% endifequal %} -{% ifequal property.codeType "java.lang.Boolean" %}{% ifnotequal property.default null %} -{% call_template _bool_getter_content_def property=property %} -{% endifnotequal %}{% endifequal %}{% endfor %}{% endif %} -{% if not features.thin_models %} - - @Override - public {{ current_model.safeClassName }} set(String fieldName, Object value) { - return ({{ current_model.safeClassName }}) super.set(fieldName, value); - } - - @Override - public {{ current_model.safeClassName }} clone() { - return ({{ current_model.safeClassName }}) super.clone(); - } -{% endif %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_model_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_model_def.tmpl deleted file mode 100644 index f19e5132036..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_model_def.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -{% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} - */ -public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { - -{% call_template _model_content_def current_model=child %} -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} -}{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_parameter.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_parameter.tmpl deleted file mode 100644 index 61735303b3a..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_parameter.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} -{% if parameter.default %}[default: {{ parameter.default }}]{% endif %} -{% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} -{% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} -{% endfilter %}{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_pattern_check_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_pattern_check_def.tmpl deleted file mode 100644 index f5bd8fa74a9..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_pattern_check_def.tmpl +++ /dev/null @@ -1,21 +0,0 @@ - {% if param.pattern %} - {% if param.repeated %} - if (!getSuppressPatternChecks()) { - for (String {{ param.memberName }}Elem : {{ param.memberName }}) { - {% if param.code_type == 'java.util.ListThe typical use is:
- *
- * {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
- * {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
- *
- *
- * @return the resource collection
- */
-public {{ resource.className }} {{ resource.codeName }}() {
- return new {{ resource.className }}();
-}
-
-/**
- * The "{{ resource.wireName }}" collection of methods.
- */
-public class {{ resource.className }} {{% indent %}
-{% for method in resource.methods %}
-{% call_template _method method=method %}{% endfor %}
-{% for subr in resource.resources %}
-{% call_template _resource resource=subr %}{% endfor %}
-{% endindent %}}
diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/pom.xml.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/pom.xml.tmpl
deleted file mode 100644
index 47c75299939..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/pom.xml.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-{% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/features.json b/generator/src/googleapis/codegen/languages/java/1.31.0/features.json
deleted file mode 100644
index c07d1eda029..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.31.0/features.json
+++ /dev/null
@@ -1,487 +0,0 @@
-{
- "language": "java",
- "description": "Java libraries for Google APIs.",
- "generator": "java1_15",
- "releaseVersion": "1.32.1",
- "baseClientLibrary": "1.34.0",
- "oauthClientLibrary": "1.31.2",
- "httpClientLibrary": "1.41.7",
- "gsonVersion": "2.8.6",
- "httpClientVersion": "4.5.11",
- "jackson2CoreVersion": "2.11.1",
- "jdo2ApiVersion": "2.3-eb",
- "jettyVersion": "6.1.26",
- "jettyUtilVersion": "6.1.26",
- "jsr305Version": "3.0.2",
- "transactionApiVersion": "1.1",
- "descriptor_additions": {
- "proguard-config": "proguard-google-api-client.txt",
- "files": [
- {
- "path": "${___library_file_name___}.jar.properties",
- "type": "android.properties"
- } ]
- },
- "javadoc_links": [
- "http://docs.oracle.com/javase/7/docs/api",
- "https://googleapis.dev/java/google-http-client/${httpClientLibrary}/",
- "https://googleapis.dev/java/google-oauth-client/${oauthClientLibrary}/",
- "https://googleapis.dev/java/google-api-client/${baseClientLibrary}/"
- ],
- "requires": [
- {
- "name": "Google API Java Client Bundle",
- "environments": ["manual"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "bundle",
- "downloadUrl": "http://google-api-java-client.googlecode.com/files/google-api-java-client-${baseClientLibrary}.zip"
- }
- ]
- },{
- "name": "Google APIs Client Library",
- "environments": ["*"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google APIs Client Library",
- "environments": ["android"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-android-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google APIs Client Library",
- "environments": ["appengine"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-appengine-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-appengine-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-gson-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-gson-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-jackson2-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-jackson2-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-java6-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-java6-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet extensions to the Google APIs Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-servlet-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-servlet-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google OAuth Client Library",
- "environments": ["*"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google OAuth Client Library",
- "environments": ["appengine"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-appengine-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-appengine-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-java6-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-java6-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-jetty-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-jetty-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet and JDO extensions to the Google OAuth Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-servlet-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-servlet-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google HTTP Client Library",
- "environments": ["android"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-android-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google HTTP Client Library",
- "environments": ["appengine"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-appengine-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-appengine-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-gson-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jackson2-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "JDO extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jdo-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "GSON",
- "environments": ["*"],
- "version": "${gsonVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/gson-${gsonVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/gson-${gsonVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/gson-${gsonVersion}.jar.properties"
- }
- ]
- },{
- "name": "HTTP Client",
- "environments": ["servlet", "generic"],
- "version": "${httpClientVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/httpclient-${httpClientVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/httpclient-${httpClientVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson2 Core",
- "environments": ["*"],
- "version": "${jackson2CoreVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jackson-core-${jackson2CoreVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar.properties"
- }
- ]
- },{
- "name": "JDO2 API",
- "environments": ["appengine", "servlet"],
- "version": "${jdo2ApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jdo2-api-${jdo2ApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jdo2-api-${jdo2ApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty",
- "environments": ["generic"],
- "version": "${jettyVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-${jettyVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-${jettyVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty Util",
- "environments": ["generic"],
- "version": "${jettyUtilVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-util-${jettyUtilVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-util-${jettyUtilVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "JSR 305",
- "environments": ["*"],
- "version": "${jsr305Version}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jsr305-${jsr305Version}.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Transaction API",
- "environments": ["appengine", "servlet"],
- "version": "${transactionApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/transaction-api-${transactionApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/transaction-api-${transactionApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/CDDL-LICENSE.txt"
- }
- ]
- }
- ]
-}
diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/layouts.json b/generator/src/googleapis/codegen/languages/java/1.31.0/layouts.json
deleted file mode 100644
index e777cd0b456..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.31.0/layouts.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{"layouts": {
- "maven": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- },
- "gradle": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- }
- }
-}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/README.md.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/README.md.tmpl
deleted file mode 100644
index 0b5a79932fa..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/README.md.tmpl
+++ /dev/null
@@ -1,44 +0,0 @@
-# {{ api.title }} Client Library for Java
-
-{{ api.description }}
-
-This page contains information about getting started with the {{ api.title }}
-using the Google API Client Library for Java. In addition, you may be interested
-in the following documentation:
-
-* Browse the [Javadoc reference for the {{ api.title }}][javadoc]
-* Read the [Developer's Guide for the Google API Client Library for Java][google-api-client].
-* Interact with this API in your browser using the [APIs Explorer for the {{ api.title }}][api-explorer]
-
-## Installation
-
-### Maven
-
-Add the following lines to your `pom.xml` file:
-
-```xml
-- * {{ api.description }} - *
- * - *- * For more information about this service, see the - * API Documentation - *
- * - *- * This service uses {@link {{ api.className }}RequestInitializer} to initialize global parameters via its - * {@link Builder}. - *
- * - * @since 1.3 - * @author Google, Inc. - */ -@SuppressWarnings("javadoc") -public class {{ api.className }} extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { - - // Note: Leave this static initializer at the top of the file. - static { - com.google.api.client.util.Preconditions.checkState( - com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && - (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 || - (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 && - com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1)), - "You are currently running with version %s of google-api-client. " + - "You need at least version 1.31.1 of google-api-client to run version " + - "{{ features.releaseVersion }} of the {{ api.title }} library.", com.google.api.client.googleapis.GoogleUtils.VERSION); - } - - /** - * The default encoded root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_ROOT_URL = "{{ api.rootUrl }}"; - - /** - * The default encoded mTLS root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.31 - */ - public static final String DEFAULT_MTLS_ROOT_URL = "{{ api.mtlsRootUrl }}"; - - /** - * The default encoded service path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_SERVICE_PATH = "{{ api.servicePath }}"; - - /** - * The default encoded batch path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.23 - */ - public static final String DEFAULT_BATCH_PATH = "{{ api.batchPath }}"; - - /** - * The default encoded base URL of the service. This is determined when the library is generated - * and normally should not be changed. - */ - public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; - - /**{% filter block_comment %} - * Constructor. - * {% endfilter %} - * - *- * Use {@link Builder} if you need to specify any of the optional parameters. - *
- * - * @param transport HTTP transport, which should normally be: - *- * Implementation is not thread-safe. - *
- * - * @since 1.3.0 - */ - public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { - - private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) { - // If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint. - // If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS. - // Use the regular endpoint for all other cases. - String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT"); - useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint; - if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) { - return DEFAULT_MTLS_ROOT_URL; - } - return DEFAULT_ROOT_URL; - } - - /** - * Returns an instance of a new builder. - * - * @param transport HTTP transport, which should normally be: - *- * The simplest usage is to use it to set the key parameter: - *
- * - *
- public static final GoogleClientRequestInitializer KEY_INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY);
- *
- *
- * - * There is also a constructor to set both the key and userIp parameters: - *
- * - *
- public static final GoogleClientRequestInitializer INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY, USER_IP);
- *
- *
- * - * If you want to implement custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer extends {{ api.className }}RequestInitializer {
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer2 extends {{ api.className }}RequestInitializer {
-
- public MyKeyRequestInitializer() {
- super(KEY, USER_IP);
- }
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Subclasses should be thread-safe. - *
- * - * @since 1.12 - */ -public class {{ api.className }}RequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { - - public {{ api.className }}RequestInitializer() { - super(); - } - - /** - * @param key API key or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key) { - super(key); - } - - /** - * @param key API key or {@code null} to leave it unchanged - * @param userIp user IP or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key, String userIp) { - super(key, userIp); - } - - @Override - public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest> request) throws java.io.IOException { - super.initializeJsonRequest(request); - initialize{{ api.className }}Request(({{ api.className }}Request>) request); - } - - /** - * Initializes {{ api.className }} request. - * - *- * Default implementation does nothing. Called from - * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. - *
- * - * @throws java.io.IOException I/O exception - */ - protected void initialize{{ api.className }}Request({{ api.className }}Request> request) throws java.io.IOException { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___Scopes.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___Scopes.java.tmpl deleted file mode 100644 index 9507ad28953..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___Scopes.java.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} -{% if not api.authscopes %}{% halt %}{% endif %} -package {{ api.module.name }}; - -/** - * Available OAuth 2.0 scopes for use with the {{ api.title }}. - * - * @since 1.4 - */ -public class {{ api.className }}Scopes { -{% for authscope in api.authscopes %} - /** {{ authscope.description }}. */ - public static final String {{ authscope.name }} = "{{ authscope.value }}"; -{% endfor %} - - /** - * Returns an unmodifiable set that contains all scopes declared by this class. - * - * @since 1.16 - */ - public static java.util.Set- * This is the Java data model class that specifies how to parse/serialize into the JSON that is - * transmitted over HTTP when working with the {{ api.title }}. For a detailed explanation see: - * {% endfilter %} - * https://developers.google.com/api-client-library/java/google-http-java-client/json - *
- * - * @author Google, Inc. - */ -{% filter noblanklines %} -@SuppressWarnings("javadoc") -{% if model.is_variant_base %} -public class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% elif model.superClass %} -public final class {{ model.className }} extends {{ model.superClass }} { -{% else %} -public final class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% endif %}{% endfilter %} - -{% filter noblanklines %} -{% if model.is_variant_base %} - protected {{ model.className }}(java.lang.String typeValue) { - this.{{ model.discriminant.memberName }} = typeValue; - } - - public {{ model.className }}() {} -{% elif model.discriminantValue %} - /** Constructs {{ model.className }}. **/ - public {{ model.className }}() { - super({% literal model.discriminantValue %}); - } -{% endif %}{% endfilter %} - -{% call_template _model_content_def current_model=model %} - -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %} -{% endfor %}}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_alt_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_alt_def.tmpl deleted file mode 100644 index 63bb0053eb2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_alt_def.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -{% comment %} -This template is used to determine when alt should be set to "json" in a method. -set("alt", "json") is generated if any of the cases are true: -* If method parameter alt!=json. -* If method does not have an alt parameter and global parameter alt!=json. -* If method does not have an alt parameter and global parameters does not have an alt parameter. -{% endcomment %} -{% if method.alt.default %} - {% ifnotequal method.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% else %} - {% ifnotequal api.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_bool_getter_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_bool_getter_content_def.tmpl deleted file mode 100644 index ed92c7251d4..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_bool_getter_content_def.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -{% filter noblanklines %} - /** - * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. - * - *- * Boolean properties can have four possible values: - * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} - * or {@link Boolean#FALSE}. - *
- * - *- * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} - * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and - * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - *
- * - *- *{% filter block_comment %}{{ property.description }}{% endfilter %} - *
- */ - public boolean is{{ property.memberName|capfirst }}() { - if ({{ property.memberName }} == null || {{ property.memberName }} == com.google.api.client.util.Data.NULL_BOOLEAN) { - return {{ property.default }}; - } - return {{ property.memberName }}; - }{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_file_header.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_file_header.tmpl deleted file mode 100644 index 62ca053ef11..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_file_header.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{% filter noblanklines %} -{% copyright_block %} -/* - * This code was generated by https://github.com/googleapis/google-api-java-client-services/ -{% if options.include_timestamp %} - * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} - * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} - * Modify at your own risk. - */ -{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_method.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_method.tmpl deleted file mode 100644 index 0d3dc2ff0c6..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_method.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @return the request - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% end_parameter_list %}); - initialize(result); - return result; -} -{% if method.simple_upload_supported or method.resumable_upload_supported %} -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * - *- * This method should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @return the request - * @throws java.io.IOException if the initialization of the request fails - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% parameter %}mediaContent{% end_parameter %} - {% end_parameter_list %}); - initialize(result); - return result; -}{% endif %} - -public class {{ method.className }} extends {{ api.className }}Request<{{ method.responseType.fullClassName }}> { - - private static final String REST_PATH = "{{ method.restPath }}"; - - {% for param in method.parameters %} - {% if param.pattern %} - private final java.util.regex.Pattern {{ param.constantName }}_PATTERN = - java.util.regex.Pattern.compile({% literal param.pattern %}); - {% endif %} - {% endfor %} - -{% filter noblanklines %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% call_template _pattern_check_def param=param %} - {% endfor %} - {% if method.requestType and method.responseType.properties %} - {% call_template _required_param_def properties=method.responseType.properties %} - {% endif %} - {% call_template _alt_def method=method %} - {% if method.supportsMediaDownload %} - initializeMediaDownload(); - {% endif %} - } -{% endfilter %} - -{% filter noblanklines %} -{% if method.simple_upload_supported or method.resumable_upload_supported %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * - *- * This constructor should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", "/upload/" + getServicePath() + REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% endfor %} - initializeMediaUpload(mediaContent); - {% call_template _alt_def method=method %} - } -{% endif %} -{% endfilter %} -{% if method.supportsMediaDownload %} - @Override - public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { - super.executeMediaAndDownloadTo(outputStream); - } - - @Override - public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { - return super.executeMediaAsInputStream(); - } - - @Override - public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { - return super.executeMedia(); - } - -{% if method.useMediaDownloadService %} - - @Override - public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { - java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) - ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); - return new com.google.api.client.http.GenericUrl( - com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); - } -{% endif %} -{% endif %} -{% ifequal method.httpMethod "GET" %} - - @Override - public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { - return super.executeUsingHead(); - } - - @Override - public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { - return super.buildHttpRequestUsingHead(); - } -{% endifequal %} -{% for param in api.parameters %} - - @Override - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - return ({{ method.className }}) super.{{ param.setterName }}({{ param.memberName }}); - }{% endfor %} -{% for param in method.parameters %} -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - @com.google.api.client.util.Key{% ifnotequal param.wireName param.memberName %}("{{ param.wireName }}"){% endifnotequal %} - private {{ param.codeType }} {{ param.memberName }}; - - /**{% filter block_comment %}{{ param.description }} -{% if param.default %} [default: {{ param.default }}]{% endif %} -{% if param.minimum %} [minimum: {{ param.minimum }}]{% endif %} -{% if param.maximum %} [maximum: {{ param.maximum }}]{% endif %} {% endfilter %} - */ - public {{ param.codeType }} {{ param.getterName }}() { - return {{ param.memberName }}; - } - -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { -{% filter noblanklines %} - {% call_template _pattern_check_def param=param %} - this.{{ param.memberName }} = {{ param.memberName }}; - return this; -{% endfilter %} - } -{% ifequal param.codeType "java.lang.Boolean" %}{% ifnotequal param.default null %} -{% call_template _bool_getter_content_def property=param %} -{% endifnotequal %}{% endifequal %}{% endfor %} - - @Override - public {{ method.className }} set(String parameterName, Object value) { - return ({{ method.className }}) super.set(parameterName, value); - } -} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_model_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_model_content_def.tmpl deleted file mode 100644 index 98b1e8f1899..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_model_content_def.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -{% if current_model.arrayOf %} -@com.google.api.client.util.Key -{{ current_model.safeCodeType}} items; -{% endif %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * The value may be {@code null}. - */ - @com.google.api.client.util.Key{% if not property.member_name_is_json_name %}("{{ property.wireName }}"){% endif %}{% if property.requiresJsonString %} @com.google.api.client.json.JsonString{% endif %} - {% if property.is_variant_key %} - @com.google.api.client.json.JsonPolymorphicTypeMap(typeDefinitions={ - {% for key, ref in property.variant_map.items %} - @com.google.api.client.json.JsonPolymorphicTypeMap.TypeDef(key = {% literal key %}, ref = {{ ref.safe_code_type }}.class), - {% endfor %}}) - {% endif %} - {% if features.thin_models %}public{% else %}private{% endif %} {{ property.safeCodeType }} {{ property.memberName }}; -{% endfilter %} - -{% filter noblanklines %} - {% if property.data_type.isContainer %} -{% call_template _proguard_content_def schema=property.data_type.baseType %} - {% endif %} -{% endfilter %} -{% endfor %} -{% if not features.thin_models %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #decode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @return value or {@code null} for none - */ -{% endfilter %} - public {{ property.safeCodeType }} {{ property.getterName }}() { - return {{ property.memberName }}; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.getterName }}() - * @return Base64 decoded value or {@code null} for none - * - * @since 1.14 - */ - public byte[] decode{{ property.memberName|capfirst }}() { - return com.google.api.client.util.Base64.decodeBase64({{ property.memberName }}); - } -{% endifequal %}{% endifequal %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #encode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @param {{property.memberName }} {{property.memberName }} or {@code null} for none - */ -{% endfilter %} - public {{ current_model.safeClassName }} {{ property.setterName }}({{ property.safeCodeType }} {{property.memberName }}) { - this.{{ property.memberName }} = {{ property.memberName }}; - return this; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.setterName }}() - * - *- * The value is encoded Base64 or {@code null} for none. - *
- * - * @since 1.14 - */ - public {{ current_model.safeClassName }} encode{{ property.memberName|capfirst }}(byte[] {{property.memberName}}) { - this.{{ property.memberName }} = com.google.api.client.util.Base64.encodeBase64URLSafeString({{ property.memberName }}); - return this; - } -{% endifequal %}{% endifequal %} -{% ifequal property.codeType "java.lang.Boolean" %}{% ifnotequal property.default null %} -{% call_template _bool_getter_content_def property=property %} -{% endifnotequal %}{% endifequal %}{% endfor %}{% endif %} -{% if not features.thin_models %} - - @Override - public {{ current_model.safeClassName }} set(String fieldName, Object value) { - return ({{ current_model.safeClassName }}) super.set(fieldName, value); - } - - @Override - public {{ current_model.safeClassName }} clone() { - return ({{ current_model.safeClassName }}) super.clone(); - } -{% endif %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_model_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_model_def.tmpl deleted file mode 100644 index f19e5132036..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_model_def.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -{% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} - */ -public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { - -{% call_template _model_content_def current_model=child %} -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} -}{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_parameter.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_parameter.tmpl deleted file mode 100644 index 61735303b3a..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_parameter.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} -{% if parameter.default %}[default: {{ parameter.default }}]{% endif %} -{% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} -{% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} -{% endfilter %}{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_pattern_check_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_pattern_check_def.tmpl deleted file mode 100644 index f5bd8fa74a9..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_pattern_check_def.tmpl +++ /dev/null @@ -1,21 +0,0 @@ - {% if param.pattern %} - {% if param.repeated %} - if (!getSuppressPatternChecks()) { - for (String {{ param.memberName }}Elem : {{ param.memberName }}) { - {% if param.code_type == 'java.util.ListThe typical use is:
- *
- * {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
- * {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
- *
- *
- * @return the resource collection
- */
-public {{ resource.className }} {{ resource.codeName }}() {
- return new {{ resource.className }}();
-}
-
-/**
- * The "{{ resource.wireName }}" collection of methods.
- */
-public class {{ resource.className }} {{% indent %}
-{% for method in resource.methods %}
-{% call_template _method method=method %}{% endfor %}
-{% for subr in resource.resources %}
-{% call_template _resource resource=subr %}{% endfor %}
-{% endindent %}}
diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/pom.xml.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/pom.xml.tmpl
deleted file mode 100644
index 47c75299939..00000000000
--- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/pom.xml.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-{% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/default/features.json b/generator/src/googleapis/codegen/languages/java/default/features.json
deleted file mode 100644
index 3ea6ae0b321..00000000000
--- a/generator/src/googleapis/codegen/languages/java/default/features.json
+++ /dev/null
@@ -1,487 +0,0 @@
-{
- "language": "java",
- "description": "Java libraries for Google APIs.",
- "generator": "java1_15",
- "releaseVersion": "1.26.1-SNAPSHOT",
- "baseClientLibrary": "1.26.1-SNAPSHOT",
- "oauthClientLibrary": "1.26.1-SNAPSHOT",
- "httpClientLibrary": "1.26.1-SNAPSHOT",
- "gsonVersion": "2.1",
- "httpClientVersion": "4.5.5",
- "jackson2CoreVersion": "2.9.6",
- "jdo2ApiVersion": "2.3-eb",
- "jettyVersion": "6.1.26",
- "jettyUtilVersion": "6.1.26",
- "jsr305Version": "3.0.2",
- "transactionApiVersion": "1.1",
- "descriptor_additions": {
- "proguard-config": "proguard-google-api-client.txt",
- "files": [
- {
- "path": "${___library_file_name___}.jar.properties",
- "type": "android.properties"
- } ]
- },
- "javadoc_links": [
- "http://docs.oracle.com/javase/6/docs/api",
- "http://javadoc.google-http-java-client.googlecode.com/hg/${httpClientLibrary}",
- "http://javadoc.google-oauth-java-client.googlecode.com/hg/${oauthClientLibrary}",
- "http://javadoc.google-api-java-client.googlecode.com/hg/${baseClientLibrary}"
- ],
- "requires": [
- {
- "name": "Google API Java Client Bundle",
- "environments": ["manual"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "bundle",
- "downloadUrl": "http://google-api-java-client.googlecode.com/files/google-api-java-client-${baseClientLibrary}.zip"
- }
- ]
- },{
- "name": "Google APIs Client Library",
- "environments": ["*"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google APIs Client Library",
- "environments": ["android"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-android-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-api-client-android-${baseClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google APIs Client Library",
- "environments": ["appengine"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-appengine-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-appengine-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-gson-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-gson-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-jackson2-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-jackson2-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google APIs Client Library",
- "environments": ["generic"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-java6-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-java6-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet extensions to the Google APIs Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${baseClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-api-client-servlet-${baseClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-api-client-servlet-${baseClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google OAuth Client Library",
- "environments": ["*"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-oauth-client-${oauthClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google OAuth Client Library",
- "environments": ["appengine"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-appengine-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-appengine-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Java 6 (and higher) extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-java6-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-java6-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty extensions to the Google OAuth Client Library",
- "environments": ["generic"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-jetty-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-jetty-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Servlet and JDO extensions to the Google OAuth Client Library",
- "environments": ["appengine", "servlet"],
- "version": "${oauthClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-oauth-client-servlet-${oauthClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-oauth-client-servlet-${oauthClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Android platform extensions to the Google HTTP Client Library",
- "environments": ["android"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-android-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-android-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Google App Engine extensions to the Google HTTP Client Library",
- "environments": ["appengine"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-appengine-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-appengine-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "GSON extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-gson-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-gson-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "Jackson 2 extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jackson2-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jackson2-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "JDO extensions to the Google HTTP Client Library",
- "environments": ["*"],
- "version": "${httpClientLibrary}",
- "files": [
- {
- "type": "binary",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar"
- },{
- "type": "source",
- "path": "libs-sources/google-http-client-jdo-${httpClientLibrary}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/google-http-client-jdo-${httpClientLibrary}.jar.properties"
- }
- ]
- },{
- "name": "GSON",
- "environments": ["*"],
- "version": "${gsonVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/gson-${gsonVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/gson-${gsonVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/gson-${gsonVersion}.jar.properties"
- }
- ]
- },{
- "name": "HTTP Client",
- "environments": ["servlet", "generic"],
- "version": "${httpClientVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/httpclient-${httpClientVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/httpclient-${httpClientVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jackson2 Core",
- "environments": ["*"],
- "version": "${jackson2CoreVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jackson-core-${jackson2CoreVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- },{
- "type": "android-properties",
- "path": "libs/jackson-core-${jackson2CoreVersion}.jar.properties"
- }
- ]
- },{
- "name": "JDO2 API",
- "environments": ["appengine", "servlet"],
- "version": "${jdo2ApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jdo2-api-${jdo2ApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jdo2-api-${jdo2ApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty",
- "environments": ["generic"],
- "version": "${jettyVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-${jettyVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-${jettyVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Jetty Util",
- "environments": ["generic"],
- "version": "${jettyUtilVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jetty-util-${jettyUtilVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/jetty-util-${jettyUtilVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "JSR 305",
- "environments": ["*"],
- "version": "${jsr305Version}",
- "files": [
- {
- "type": "binary",
- "path": "libs/jsr305-${jsr305Version}.jar"
- },{
- "type": "license",
- "path": "dependencies/APACHE-LICENSE.txt"
- }
- ]
- },{
- "name": "Transaction API",
- "environments": ["appengine", "servlet"],
- "version": "${transactionApiVersion}",
- "files": [
- {
- "type": "binary",
- "path": "libs/transaction-api-${transactionApiVersion}.jar"
- },{
- "type": "source",
- "path": "libs-sources/transaction-api-${transactionApiVersion}-sources.jar"
- },{
- "type": "license",
- "path": "dependencies/CDDL-LICENSE.txt"
- }
- ]
- }
- ]
-}
diff --git a/generator/src/googleapis/codegen/languages/java/default/layouts.json b/generator/src/googleapis/codegen/languages/java/default/layouts.json
deleted file mode 100644
index e777cd0b456..00000000000
--- a/generator/src/googleapis/codegen/languages/java/default/layouts.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{"layouts": {
- "maven": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- },
- "gradle": {
- "source_location": "src/main/java",
- "unzip_source": true,
- "bundle_dir": "{api[name]}",
- "include_dependencies": false,
- "include_descriptor": false
- }
- }
-}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/README.md.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/README.md.tmpl
deleted file mode 100644
index 0240b31f43b..00000000000
--- a/generator/src/googleapis/codegen/languages/java/default/templates/README.md.tmpl
+++ /dev/null
@@ -1,44 +0,0 @@
-# {{ api.title }} Client Library for Java
-
-{{ api.description }}
-
-This page contains information about getting started with the {{ api.title }}
-using the Google API Client Library for Java. In addition, you may be interested
-in the following documentation:
-
-* Browse the [Javadoc reference for the {{ api.title }}][javadoc]
-* Read the [Developer's Guide for the Google API Client Library for Java][google-api-client].
-* Interact with this API in your browser using the [APIs Explorer for the {{ api.title }}][api-explorer]
-
-## Installation
-
-### Maven
-
-Add the following lines to your `pom.xml` file:
-
-```xml
-- * {{ api.description }} - *
- * - *- * For more information about this service, see the - * API Documentation - *
- * - *- * This service uses {@link {{ api.className }}RequestInitializer} to initialize global parameters via its - * {@link Builder}. - *
- * - * @since 1.3 - * @author Google, Inc. - */ -@SuppressWarnings("javadoc") -public class {{ api.className }} extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient { - - // Note: Leave this static initializer at the top of the file. - static { - com.google.api.client.util.Preconditions.checkState( - com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 && - com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15, - "You are currently running with version %s of google-api-client. " + - "You need at least version 1.15 of google-api-client to run version " + - "{{ features.releaseVersion }} of the {{ api.title }} library.", com.google.api.client.googleapis.GoogleUtils.VERSION); - } - - /** - * The default encoded root URL of the service. This is determined when the library is generated - * and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_ROOT_URL = "{{ api.rootUrl }}"; - - /** - * The default encoded service path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.7 - */ - public static final String DEFAULT_SERVICE_PATH = "{{ api.servicePath }}"; - - /** - * The default encoded batch path of the service. This is determined when the library is - * generated and normally should not be changed. - * - * @since 1.23 - */ - public static final String DEFAULT_BATCH_PATH = "{{ api.batchPath }}"; - - /** - * The default encoded base URL of the service. This is determined when the library is generated - * and normally should not be changed. - */ - public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH; - - /**{% filter block_comment %} - * Constructor. - * {% endfilter %} - * - *- * Use {@link Builder} if you need to specify any of the optional parameters. - *
- * - * @param transport HTTP transport, which should normally be: - *- * Implementation is not thread-safe. - *
- * - * @since 1.3.0 - */ - public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder { - - /** - * Returns an instance of a new builder. - * - * @param transport HTTP transport, which should normally be: - *- * The simplest usage is to use it to set the key parameter: - *
- * - *
- public static final GoogleClientRequestInitializer KEY_INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY);
- *
- *
- * - * There is also a constructor to set both the key and userIp parameters: - *
- * - *
- public static final GoogleClientRequestInitializer INITIALIZER =
- new {{ api.className }}RequestInitializer(KEY, USER_IP);
- *
- *
- * - * If you want to implement custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer extends {{ api.className }}RequestInitializer {
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Finally, to set the key and userIp parameters and insert custom logic, extend it like this: - *
- * - *
- public static class MyRequestInitializer2 extends {{ api.className }}RequestInitializer {
-
- public MyKeyRequestInitializer() {
- super(KEY, USER_IP);
- }
-
- {@literal @}Override
- public void initialize{{ api.className }}Request({{ api.className }}Request{@literal <}?{@literal >} request)
- throws IOException {
- // custom logic
- }
- }
- *
- *
- * - * Subclasses should be thread-safe. - *
- * - * @since 1.12 - */ -public class {{ api.className }}RequestInitializer extends com.google.api.client.googleapis.services.json.CommonGoogleJsonClientRequestInitializer { - - public {{ api.className }}RequestInitializer() { - super(); - } - - /** - * @param key API key or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key) { - super(key); - } - - /** - * @param key API key or {@code null} to leave it unchanged - * @param userIp user IP or {@code null} to leave it unchanged - */ - public {{ api.className }}RequestInitializer(String key, String userIp) { - super(key, userIp); - } - - @Override - public final void initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest> request) throws java.io.IOException { - super.initializeJsonRequest(request); - initialize{{ api.className }}Request(({{ api.className }}Request>) request); - } - - /** - * Initializes {{ api.className }} request. - * - *- * Default implementation does nothing. Called from - * {@link #initializeJsonRequest(com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest)}. - *
- * - * @throws java.io.IOException I/O exception - */ - protected void initialize{{ api.className }}Request({{ api.className }}Request> request) throws java.io.IOException { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___Scopes.java.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___Scopes.java.tmpl deleted file mode 100644 index 9507ad28953..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___Scopes.java.tmpl +++ /dev/null @@ -1,29 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} -{% if not api.authscopes %}{% halt %}{% endif %} -package {{ api.module.name }}; - -/** - * Available OAuth 2.0 scopes for use with the {{ api.title }}. - * - * @since 1.4 - */ -public class {{ api.className }}Scopes { -{% for authscope in api.authscopes %} - /** {{ authscope.description }}. */ - public static final String {{ authscope.name }} = "{{ authscope.value }}"; -{% endfor %} - - /** - * Returns an unmodifiable set that contains all scopes declared by this class. - * - * @since 1.16 - */ - public static java.util.Set- * This is the Java data model class that specifies how to parse/serialize into the JSON that is - * transmitted over HTTP when working with the {{ api.title }}. For a detailed explanation see: - * {% endfilter %} - * https://developers.google.com/api-client-library/java/google-http-java-client/json - *
- * - * @author Google, Inc. - */ -{% filter noblanklines %} -@SuppressWarnings("javadoc") -{% if model.is_variant_base %} -public class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% elif model.superClass %} -public final class {{ model.className }} extends {{ model.superClass }} { -{% else %} -public final class {{ model.className }} extends com.google.api.client.json.GenericJson { -{% endif %}{% endfilter %} - -{% filter noblanklines %} -{% if model.is_variant_base %} - protected {{ model.className }}(java.lang.String typeValue) { - this.{{ model.discriminant.memberName }} = typeValue; - } - - public {{ model.className }}() {} -{% elif model.discriminantValue %} - /** Constructs {{ model.className }}. **/ - public {{ model.className }}() { - super({% literal model.discriminantValue %}); - } -{% endif %}{% endfilter %} - -{% call_template _model_content_def current_model=model %} - -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %} -{% endfor %}}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_alt_def.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_alt_def.tmpl deleted file mode 100644 index 63bb0053eb2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_alt_def.tmpl +++ /dev/null @@ -1,16 +0,0 @@ -{% comment %} -This template is used to determine when alt should be set to "json" in a method. -set("alt", "json") is generated if any of the cases are true: -* If method parameter alt!=json. -* If method does not have an alt parameter and global parameter alt!=json. -* If method does not have an alt parameter and global parameters does not have an alt parameter. -{% endcomment %} -{% if method.alt.default %} - {% ifnotequal method.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% else %} - {% ifnotequal api.alt.default "json" %} - set("alt", "json"); - {% endifnotequal %} -{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_bool_getter_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_bool_getter_content_def.tmpl deleted file mode 100644 index ed92c7251d4..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_bool_getter_content_def.tmpl +++ /dev/null @@ -1,27 +0,0 @@ -{% filter noblanklines %} - /** - * Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}. - * - *- * Boolean properties can have four possible values: - * {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE} - * or {@link Boolean#FALSE}. - *
- * - *- * This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE} - * and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - * {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and - * it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}. - *
- * - *- *{% filter block_comment %}{{ property.description }}{% endfilter %} - *
- */ - public boolean is{{ property.memberName|capfirst }}() { - if ({{ property.memberName }} == null || {{ property.memberName }} == com.google.api.client.util.Data.NULL_BOOLEAN) { - return {{ property.default }}; - } - return {{ property.memberName }}; - }{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_file_header.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_file_header.tmpl deleted file mode 100644 index 62ca053ef11..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_file_header.tmpl +++ /dev/null @@ -1,10 +0,0 @@ -{% filter noblanklines %} -{% copyright_block %} -/* - * This code was generated by https://github.com/googleapis/google-api-java-client-services/ -{% if options.include_timestamp %} - * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} - * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} - * Modify at your own risk. - */ -{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_method.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_method.tmpl deleted file mode 100644 index 0d3dc2ff0c6..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_method.tmpl +++ /dev/null @@ -1,264 +0,0 @@ -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @return the request - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% end_parameter_list %}); - initialize(result); - return result; -} -{% if method.simple_upload_supported or method.resumable_upload_supported %} -/**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - * {% endfilter %} - * - *- * This method should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @return the request - * @throws java.io.IOException if the initialization of the request fails - */ -public {{ method.className }} {{ method.codeName }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %} - {{ method.requestType.fullClassName }} content - {% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) throws java.io.IOException { - {{ method.className }} result = new {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}content{% end_parameter %} - {% endif %} - {% parameter %}mediaContent{% end_parameter %} - {% end_parameter_list %}); - initialize(result); - return result; -}{% endif %} - -public class {{ method.className }} extends {{ api.className }}Request<{{ method.responseType.fullClassName }}> { - - private static final String REST_PATH = "{{ method.restPath }}"; - - {% for param in method.parameters %} - {% if param.pattern %} - private final java.util.regex.Pattern {{ param.constantName }}_PATTERN = - java.util.regex.Pattern.compile({% literal param.pattern %}); - {% endif %} - {% endfor %} - -{% filter noblanklines %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * {% for param in method.requiredParameters %} - * @param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}}{% endif %} - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% call_template _pattern_check_def param=param %} - {% endfor %} - {% if method.requestType and method.responseType.properties %} - {% call_template _required_param_def properties=method.responseType.properties %} - {% endif %} - {% call_template _alt_def method=method %} - {% if method.supportsMediaDownload %} - initializeMediaDownload(); - {% endif %} - } -{% endfilter %} - -{% filter noblanklines %} -{% if method.simple_upload_supported or method.resumable_upload_supported %} - /**{% filter block_comment %} - * {% if method.description %}{{ method.description }} - * {% endif %} - * Create a request for the method - * "{% if resource %}{{ resource.wireName }}.{% endif %}{{ method.wireName }}". - * - * This request holds the parameters needed by the the {{ api.name }} - * server. After setting any optional parameters, call the - * {@link {{ method.className }}#execute()} - * method to invoke the remote operation. - *- * {@link {{ method.className }}#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this - * instance immediately after invoking the constructor. - *
- * {% endfilter %} - * - *- * This constructor should be used for uploading media content. - *
- * - * {% for param in method.requiredParameters %}@param {{ param.memberName }} {% emit_parameter_doc param %}{% endfor %}{% if method.requestType %} - * @param content the {@link {{ method.requestType.fullClassName }}} media metadata or {@code null} if none{% endif %} - * @param mediaContent The media HTTP content or {@code null} if none. - * @since 1.13 - */ - protected {{ method.className }}({% parameter_list %} - {% for p in method.requiredParameters %} - {% parameter %}{{ p.codeType }} {{ p.memberName }}{% end_parameter %} - {% endfor %} - {% if method.requestType %} - {% parameter %}{{ method.requestType.fullClassName }} content{% end_parameter %} - {% endif %} - {% parameter %} - com.google.api.client.http.AbstractInputStreamContent mediaContent - {% end_parameter %} - {% end_parameter_list %}) { - super({{ api.className }}.this, "{{ method.httpMethod }}", "/upload/" + getServicePath() + REST_PATH, {% if method.requestType %}content{% else %}null{% endif %}, {{ method.responseType.fullClassName }}.class); - {% for param in method.requiredParameters %} - this.{{ param.memberName }} = com.google.api.client.util.Preconditions.checkNotNull({{ param.memberName }}, "Required parameter {{ param.memberName }} must be specified."); - {% endfor %} - initializeMediaUpload(mediaContent); - {% call_template _alt_def method=method %} - } -{% endif %} -{% endfilter %} -{% if method.supportsMediaDownload %} - @Override - public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException { - super.executeMediaAndDownloadTo(outputStream); - } - - @Override - public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException { - return super.executeMediaAsInputStream(); - } - - @Override - public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException { - return super.executeMedia(); - } - -{% if method.useMediaDownloadService %} - - @Override - public com.google.api.client.http.GenericUrl buildHttpRequestUrl() { - java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null) - ? getRootUrl() + "download/" + getServicePath() : getBaseUrl(); - return new com.google.api.client.http.GenericUrl( - com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true)); - } -{% endif %} -{% endif %} -{% ifequal method.httpMethod "GET" %} - - @Override - public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { - return super.executeUsingHead(); - } - - @Override - public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { - return super.buildHttpRequestUsingHead(); - } -{% endifequal %} -{% for param in api.parameters %} - - @Override - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - return ({{ method.className }}) super.{{ param.setterName }}({{ param.memberName }}); - }{% endfor %} -{% for param in method.parameters %} -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - @com.google.api.client.util.Key{% ifnotequal param.wireName param.memberName %}("{{ param.wireName }}"){% endifnotequal %} - private {{ param.codeType }} {{ param.memberName }}; - - /**{% filter block_comment %}{{ param.description }} -{% if param.default %} [default: {{ param.default }}]{% endif %} -{% if param.minimum %} [minimum: {{ param.minimum }}]{% endif %} -{% if param.maximum %} [maximum: {{ param.maximum }}]{% endif %} {% endfilter %} - */ - public {{ param.codeType }} {{ param.getterName }}() { - return {{ param.memberName }}; - } - -{% indent 1 %}{% doc_comment_if param.description %}{% endindent %} - public {{ method.className }} {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { -{% filter noblanklines %} - {% call_template _pattern_check_def param=param %} - this.{{ param.memberName }} = {{ param.memberName }}; - return this; -{% endfilter %} - } -{% ifequal param.codeType "java.lang.Boolean" %}{% ifnotequal param.default null %} -{% call_template _bool_getter_content_def property=param %} -{% endifnotequal %}{% endifequal %}{% endfor %} - - @Override - public {{ method.className }} set(String parameterName, Object value) { - return ({{ method.className }}) super.set(parameterName, value); - } -} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_model_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_model_content_def.tmpl deleted file mode 100644 index 98b1e8f1899..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_model_content_def.tmpl +++ /dev/null @@ -1,95 +0,0 @@ -{% if current_model.arrayOf %} -@com.google.api.client.util.Key -{{ current_model.safeCodeType}} items; -{% endif %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * The value may be {@code null}. - */ - @com.google.api.client.util.Key{% if not property.member_name_is_json_name %}("{{ property.wireName }}"){% endif %}{% if property.requiresJsonString %} @com.google.api.client.json.JsonString{% endif %} - {% if property.is_variant_key %} - @com.google.api.client.json.JsonPolymorphicTypeMap(typeDefinitions={ - {% for key, ref in property.variant_map.items %} - @com.google.api.client.json.JsonPolymorphicTypeMap.TypeDef(key = {% literal key %}, ref = {{ ref.safe_code_type }}.class), - {% endfor %}}) - {% endif %} - {% if features.thin_models %}public{% else %}private{% endif %} {{ property.safeCodeType }} {{ property.memberName }}; -{% endfilter %} - -{% filter noblanklines %} - {% if property.data_type.isContainer %} -{% call_template _proguard_content_def schema=property.data_type.baseType %} - {% endif %} -{% endfilter %} -{% endfor %} -{% if not features.thin_models %}{% for property in current_model.properties %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #decode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @return value or {@code null} for none - */ -{% endfilter %} - public {{ property.safeCodeType }} {{ property.getterName }}() { - return {{ property.memberName }}; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.getterName }}() - * @return Base64 decoded value or {@code null} for none - * - * @since 1.14 - */ - public byte[] decode{{ property.memberName|capfirst }}() { - return com.google.api.client.util.Base64.decodeBase64({{ property.memberName }}); - } -{% endifequal %}{% endifequal %} -{% filter noblanklines %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - * @see #encode{{ property.memberName|capfirst }}() -{% endifequal %}{% endifequal %} - * @param {{property.memberName }} {{property.memberName }} or {@code null} for none - */ -{% endfilter %} - public {{ current_model.safeClassName }} {{ property.setterName }}({{ property.safeCodeType }} {{property.memberName }}) { - this.{{ property.memberName }} = {{ property.memberName }}; - return this; - } -{% ifequal property.safeCodeType "java.lang.String" %}{% ifequal property.format "byte" %} - /**{% filter block_comment %} - * {{ property.description }}{% endfilter %} - * @see #{{ property.setterName }}() - * - *- * The value is encoded Base64 or {@code null} for none. - *
- * - * @since 1.14 - */ - public {{ current_model.safeClassName }} encode{{ property.memberName|capfirst }}(byte[] {{property.memberName}}) { - this.{{ property.memberName }} = com.google.api.client.util.Base64.encodeBase64URLSafeString({{ property.memberName }}); - return this; - } -{% endifequal %}{% endifequal %} -{% ifequal property.codeType "java.lang.Boolean" %}{% ifnotequal property.default null %} -{% call_template _bool_getter_content_def property=property %} -{% endifnotequal %}{% endifequal %}{% endfor %}{% endif %} -{% if not features.thin_models %} - - @Override - public {{ current_model.safeClassName }} set(String fieldName, Object value) { - return ({{ current_model.safeClassName }}) super.set(fieldName, value); - } - - @Override - public {{ current_model.safeClassName }} clone() { - return ({{ current_model.safeClassName }}) super.clone(); - } -{% endif %} - diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_model_def.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_model_def.tmpl deleted file mode 100644 index f19e5132036..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_model_def.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -{% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} - */ -public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { - -{% call_template _model_content_def current_model=child %} -{% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} -}{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_parameter.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_parameter.tmpl deleted file mode 100644 index 61735303b3a..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_parameter.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} -{% if parameter.default %}[default: {{ parameter.default }}]{% endif %} -{% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} -{% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} -{% endfilter %}{% endfilter %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_pattern_check_def.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_pattern_check_def.tmpl deleted file mode 100644 index f5bd8fa74a9..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_pattern_check_def.tmpl +++ /dev/null @@ -1,21 +0,0 @@ - {% if param.pattern %} - {% if param.repeated %} - if (!getSuppressPatternChecks()) { - for (String {{ param.memberName }}Elem : {{ param.memberName }}) { - {% if param.code_type == 'java.util.ListThe typical use is:
- *
- * {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
- * {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
- *
- *
- * @return the resource collection
- */
-public {{ resource.className }} {{ resource.codeName }}() {
- return new {{ resource.className }}();
-}
-
-/**
- * The "{{ resource.wireName }}" collection of methods.
- */
-public class {{ resource.className }} {{% indent %}
-{% for method in resource.methods %}
-{% call_template _method method=method %}{% endfor %}
-{% for subr in resource.resources %}
-{% call_template _resource resource=subr %}{% endfor %}
-{% endindent %}}
diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/pom.xml.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/pom.xml.tmpl
deleted file mode 100644
index 47c75299939..00000000000
--- a/generator/src/googleapis/codegen/languages/java/default/templates/pom.xml.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-{% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %}
\ No newline at end of file
diff --git a/generator/src/googleapis/codegen/languages/targets.json b/generator/src/googleapis/codegen/languages/targets.json
index 012a9117152..a5514324ab1 100644
--- a/generator/src/googleapis/codegen/languages/targets.json
+++ b/generator/src/googleapis/codegen/languages/targets.json
@@ -5,10 +5,10 @@
"description": "Java libraries for Google APIs.",
"variations": {
"default": {
- "path": "default"
+ "path": "2.0.0"
},
"stable": {
- "path": "1.19.1"
+ "path": "2.0.0"
}
}
}