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: - * - * @param jsonFactory JSON factory, which may be: - * - * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public {{ api.className }}(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - this(new Builder(transport, jsonFactory, httpRequestInitializer)); - } - - /** - * @param builder builder - */ - {{ api.className }}(Builder builder) { - super(builder); - } - - @Override - protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { - super.initialize(httpClientRequest); - } - -{% for resource in api.resources %} -{% indent %}{% call_template _resource resource=resource %}{% endindent %} -{% endfor %} -{% for method in api.methods %} -{% indent %}{% call_template _method method=method %}{% endindent %} -{% endfor %} - - /** - * Builder for {@link {{ api.className }}}. - * - *

- * 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: - * - * @param jsonFactory JSON factory, which may be: - * - * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { -{% filter noblanklines %} - super( - transport, - jsonFactory, - DEFAULT_ROOT_URL, - DEFAULT_SERVICE_PATH, - httpRequestInitializer, - {% if api.dataWrapper %}true{% else %}false{% endif %}); -{% endfilter %} - setBatchPath(DEFAULT_BATCH_PATH); - } - - /** Builds a new instance of {@link {{ api.className }}}. */ - @Override - public {{ api.className }} build() { - return new {{ api.className }}(this); - } - - @Override - public Builder setRootUrl(String rootUrl) { - return (Builder) super.setRootUrl(rootUrl); - } - - @Override - public Builder setServicePath(String servicePath) { - return (Builder) super.setServicePath(servicePath); - } - - @Override - public Builder setBatchPath(String batchPath) { - return (Builder) super.setBatchPath(batchPath); - } - - @Override - public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); - } - - @Override - public Builder setApplicationName(String applicationName) { - return (Builder) super.setApplicationName(applicationName); - } - - @Override - public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { - return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); - } - - @Override - public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { - return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); - } - - @Override - public Builder setSuppressAllChecks(boolean suppressAllChecks) { - return (Builder) super.setSuppressAllChecks(suppressAllChecks); - } - - /** - * Set the {@link {{ api.className }}RequestInitializer}. - * - * @since 1.12 - */ - public Builder set{{ api.className }}RequestInitializer( - {{ api.className }}RequestInitializer {{ api.className|lower }}RequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer({{ api.className|lower }}RequestInitializer); - } - - @Override - public Builder setGoogleClientRequestInitializer( - com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); - } - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___Request.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___Request.java.tmpl deleted file mode 100644 index 9bdd5991703..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___Request.java.tmpl +++ /dev/null @@ -1,76 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request. - * - * @since 1.3 - */ -@SuppressWarnings("javadoc") -public abstract class {{ api.className }}Request extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { - - /** - * @param client Google client - * @param method HTTP Method - * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" - * the base path from the base URL will be stripped out. The URI template can also be a - * full URL. URI template expansion is done using - * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} - * @param content A POJO that can be serialized into JSON or {@code null} for none - * @param responseClass response class to parse into - */ - public {{ api.className }}Request( - {{ api.className }} client, String method, String uriTemplate, Object content, Class responseClass) { -{% filter noblanklines %} - super( - client, - method, - uriTemplate, - content, - responseClass); -{% endfilter %} - } -{% for param in api.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 {{ api.className }}Request {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - this.{{ param.memberName }} = {{ param.memberName }}; - return this; - }{% endfor %} - - @Override - public final {{ api.className }} getAbstractGoogleClient() { - return ({{ api.className }}) super.getAbstractGoogleClient(); - } - - @Override - public {{ api.className }}Request setDisableGZipContent(boolean disableGZipContent) { - return ({{ api.className }}Request) super.setDisableGZipContent(disableGZipContent); - } - - @Override - public {{ api.className }}Request setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { - return ({{ api.className }}Request) super.setRequestHeaders(headers); - } - - @Override - public {{ api.className }}Request set(String parameterName, Object value) { - return ({{ api.className }}Request) super.set(parameterName, value); - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___RequestInitializer.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___RequestInitializer.java.tmpl deleted file mode 100644 index bc0129c3a81..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/___api_className___RequestInitializer.java.tmpl +++ /dev/null @@ -1,105 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request initializer for setting properties like key and userIp. - * - *

- * 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 all() { - java.util.Set set = new java.util.HashSet();{% for authscope in api.authscopes %} - set.add({{ authscope.name }});{% endfor %} - return java.util.Collections.unmodifiableSet(set); - } - - private {{ api.className }}Scopes() { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/model/___topLevelModels_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/model/___topLevelModels_className___.java.tmpl deleted file mode 100644 index 06238f9fe7f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/___package___/model/___topLevelModels_className___.java.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ model.module.name }}; - -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %} - * - *

- * 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.List' %} - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), - "Parameter {{ param.memberName }} elements must conform to the pattern " + - {% literal param.pattern %}); - {% endif %} - } - } - {% else %} - {% if param.code_type == 'java.lang.String' %} - if (!getSuppressPatternChecks()) { - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), - "Parameter {{ param.memberName }} must conform to the pattern " + - {% literal param.pattern %}); - } - {% endif %} - {% endif %} - {% endif %} 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 e5c564c8dc5..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_pom_xml.tmpl +++ /dev/null @@ -1,201 +0,0 @@ - - 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - - {{ api.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - {{ api.title }} {{ api.maven.version }} - jar - - 2011 - - - - GoogleAPIs - GoogleAPIs - googleapis@googlegroups.com - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - https://www.google.com{% endif %} - - - - - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - http://www.google.com/{% endif %} - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - - - - - maven-compiler-plugin - 3.5.1 - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - com.google.api.services.{{ api.name }} - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - attach-javadocs - - jar - - - - - none - {{ api.title }} ${project.version} - {{ api.title }} ${project.version} - {% for link in features.javadoc_links %} - {{ link }}{% endfor %} - - - - - {% if layout.unzip_source %}{{ layout.source_location }}{% else %}.{% endif %} - - - ./resources - - - - - - - com.google.api-client - google-api-client - {{ features.baseClientLibrary }} - - - - - UTF-8 - - - - - - release-sonatype - - - - !artifact-registry-url - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - sonatype-nexus-staging - https://google.oss.sonatype.org/ - false - - - - - - - - release-gcp-artifact-registry - - artifactregistry://please-define-artifact-registry-url-property - - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - - - - diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_proguard_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_proguard_content_def.tmpl deleted file mode 100644 index 31b395f7900..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_proguard_content_def.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} -TODO: not schema.reference does not capture the complete solution to b/8167652. - There should instead be a mechanism to get the right answer easily. -{% endcomment %} -{% if not schema.builtIn and not schema.reference %} static { -{% if schema.arrayOf %} - // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); -{% else %} - // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); -{% endif %} - }{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_required_param_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_required_param_def.tmpl deleted file mode 100644 index 3d4335536ff..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_required_param_def.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{% for property in properties %} - {% if property.data_type.required_for_methods %} - {% for required_method in property.data_type.required_for_methods %} - {% ifequal method.id required_method %} - checkRequiredParameter(content, "content"); - checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); - {% if property.data_type.properties %} - {% call_template _required_param_def properties=property.data_type.properties %} - {% endif %} - {% endifequal %} - {% endfor %} - {% endif %} -{% endfor %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_resource.tmpl b/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_resource.tmpl deleted file mode 100644 index 8650753977b..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.26.0/templates/_resource.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * An accessor for creating requests from the {{ resource.className }} collection. - * - *

The 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public {{ api.className }}(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - this(new Builder(transport, jsonFactory, httpRequestInitializer)); - } - - /** - * @param builder builder - */ - {{ api.className }}(Builder builder) { - super(builder); - } - - @Override - protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { - super.initialize(httpClientRequest); - } - -{% for resource in api.resources %} -{% indent %}{% call_template _resource resource=resource %}{% endindent %} -{% endfor %} -{% for method in api.methods %} -{% indent %}{% call_template _method method=method %}{% endindent %} -{% endfor %} - - /** - * Builder for {@link {{ api.className }}}. - * - *

- * 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { -{% filter noblanklines %} - super( - transport, - jsonFactory, - DEFAULT_ROOT_URL, - DEFAULT_SERVICE_PATH, - httpRequestInitializer, - {% if api.dataWrapper %}true{% else %}false{% endif %}); -{% endfilter %} - setBatchPath(DEFAULT_BATCH_PATH); - } - - /** Builds a new instance of {@link {{ api.className }}}. */ - @Override - public {{ api.className }} build() { - return new {{ api.className }}(this); - } - - @Override - public Builder setRootUrl(String rootUrl) { - return (Builder) super.setRootUrl(rootUrl); - } - - @Override - public Builder setServicePath(String servicePath) { - return (Builder) super.setServicePath(servicePath); - } - - @Override - public Builder setBatchPath(String batchPath) { - return (Builder) super.setBatchPath(batchPath); - } - - @Override - public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); - } - - @Override - public Builder setApplicationName(String applicationName) { - return (Builder) super.setApplicationName(applicationName); - } - - @Override - public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { - return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); - } - - @Override - public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { - return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); - } - - @Override - public Builder setSuppressAllChecks(boolean suppressAllChecks) { - return (Builder) super.setSuppressAllChecks(suppressAllChecks); - } - - /** - * Set the {@link {{ api.className }}RequestInitializer}. - * - * @since 1.12 - */ - public Builder set{{ api.className }}RequestInitializer( - {{ api.className }}RequestInitializer {{ api.className|lower }}RequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer({{ api.className|lower }}RequestInitializer); - } - - @Override - public Builder setGoogleClientRequestInitializer( - com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); - } - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___Request.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___Request.java.tmpl deleted file mode 100644 index 9bdd5991703..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___Request.java.tmpl +++ /dev/null @@ -1,76 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request. - * - * @since 1.3 - */ -@SuppressWarnings("javadoc") -public abstract class {{ api.className }}Request extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { - - /** - * @param client Google client - * @param method HTTP Method - * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" - * the base path from the base URL will be stripped out. The URI template can also be a - * full URL. URI template expansion is done using - * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} - * @param content A POJO that can be serialized into JSON or {@code null} for none - * @param responseClass response class to parse into - */ - public {{ api.className }}Request( - {{ api.className }} client, String method, String uriTemplate, Object content, Class responseClass) { -{% filter noblanklines %} - super( - client, - method, - uriTemplate, - content, - responseClass); -{% endfilter %} - } -{% for param in api.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 {{ api.className }}Request {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - this.{{ param.memberName }} = {{ param.memberName }}; - return this; - }{% endfor %} - - @Override - public final {{ api.className }} getAbstractGoogleClient() { - return ({{ api.className }}) super.getAbstractGoogleClient(); - } - - @Override - public {{ api.className }}Request setDisableGZipContent(boolean disableGZipContent) { - return ({{ api.className }}Request) super.setDisableGZipContent(disableGZipContent); - } - - @Override - public {{ api.className }}Request setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { - return ({{ api.className }}Request) super.setRequestHeaders(headers); - } - - @Override - public {{ api.className }}Request set(String parameterName, Object value) { - return ({{ api.className }}Request) super.set(parameterName, value); - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___RequestInitializer.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___RequestInitializer.java.tmpl deleted file mode 100644 index bc0129c3a81..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/___api_className___RequestInitializer.java.tmpl +++ /dev/null @@ -1,105 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request initializer for setting properties like key and userIp. - * - *

- * 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 all() { - java.util.Set set = new java.util.HashSet();{% for authscope in api.authscopes %} - set.add({{ authscope.name }});{% endfor %} - return java.util.Collections.unmodifiableSet(set); - } - - private {{ api.className }}Scopes() { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/model/___topLevelModels_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/model/___topLevelModels_className___.java.tmpl deleted file mode 100644 index 06238f9fe7f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/___package___/model/___topLevelModels_className___.java.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ model.module.name }}; - -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %} - * - *

- * 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.List' %} - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), - "Parameter {{ param.memberName }} elements must conform to the pattern " + - {% literal param.pattern %}); - {% endif %} - } - } - {% else %} - {% if param.code_type == 'java.lang.String' %} - if (!getSuppressPatternChecks()) { - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), - "Parameter {{ param.memberName }} must conform to the pattern " + - {% literal param.pattern %}); - } - {% endif %} - {% endif %} - {% endif %} 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 e5c564c8dc5..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_pom_xml.tmpl +++ /dev/null @@ -1,201 +0,0 @@ - - 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - - {{ api.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - {{ api.title }} {{ api.maven.version }} - jar - - 2011 - - - - GoogleAPIs - GoogleAPIs - googleapis@googlegroups.com - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - https://www.google.com{% endif %} - - - - - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - http://www.google.com/{% endif %} - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - - - - - maven-compiler-plugin - 3.5.1 - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - com.google.api.services.{{ api.name }} - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - attach-javadocs - - jar - - - - - none - {{ api.title }} ${project.version} - {{ api.title }} ${project.version} - {% for link in features.javadoc_links %} - {{ link }}{% endfor %} - - - - - {% if layout.unzip_source %}{{ layout.source_location }}{% else %}.{% endif %} - - - ./resources - - - - - - - com.google.api-client - google-api-client - {{ features.baseClientLibrary }} - - - - - UTF-8 - - - - - - release-sonatype - - - - !artifact-registry-url - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - sonatype-nexus-staging - https://google.oss.sonatype.org/ - false - - - - - - - - release-gcp-artifact-registry - - artifactregistry://please-define-artifact-registry-url-property - - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - - - - diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_proguard_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_proguard_content_def.tmpl deleted file mode 100644 index 31b395f7900..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_proguard_content_def.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} -TODO: not schema.reference does not capture the complete solution to b/8167652. - There should instead be a mechanism to get the right answer easily. -{% endcomment %} -{% if not schema.builtIn and not schema.reference %} static { -{% if schema.arrayOf %} - // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); -{% else %} - // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); -{% endif %} - }{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_required_param_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_required_param_def.tmpl deleted file mode 100644 index 3d4335536ff..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_required_param_def.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{% for property in properties %} - {% if property.data_type.required_for_methods %} - {% for required_method in property.data_type.required_for_methods %} - {% ifequal method.id required_method %} - checkRequiredParameter(content, "content"); - checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); - {% if property.data_type.properties %} - {% call_template _required_param_def properties=property.data_type.properties %} - {% endif %} - {% endifequal %} - {% endfor %} - {% endif %} -{% endfor %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_resource.tmpl b/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_resource.tmpl deleted file mode 100644 index 8650753977b..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.27.0/templates/_resource.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * An accessor for creating requests from the {{ resource.className }} collection. - * - *

The 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public {{ api.className }}(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - this(new Builder(transport, jsonFactory, httpRequestInitializer)); - } - - /** - * @param builder builder - */ - {{ api.className }}(Builder builder) { - super(builder); - } - - @Override - protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { - super.initialize(httpClientRequest); - } - -{% for resource in api.resources %} -{% indent %}{% call_template _resource resource=resource %}{% endindent %} -{% endfor %} -{% for method in api.methods %} -{% indent %}{% call_template _method method=method %}{% endindent %} -{% endfor %} - - /** - * Builder for {@link {{ api.className }}}. - * - *

- * 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { -{% filter noblanklines %} - super( - transport, - jsonFactory, - DEFAULT_ROOT_URL, - DEFAULT_SERVICE_PATH, - httpRequestInitializer, - {% if api.dataWrapper %}true{% else %}false{% endif %}); -{% endfilter %} - setBatchPath(DEFAULT_BATCH_PATH); - } - - /** Builds a new instance of {@link {{ api.className }}}. */ - @Override - public {{ api.className }} build() { - return new {{ api.className }}(this); - } - - @Override - public Builder setRootUrl(String rootUrl) { - return (Builder) super.setRootUrl(rootUrl); - } - - @Override - public Builder setServicePath(String servicePath) { - return (Builder) super.setServicePath(servicePath); - } - - @Override - public Builder setBatchPath(String batchPath) { - return (Builder) super.setBatchPath(batchPath); - } - - @Override - public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); - } - - @Override - public Builder setApplicationName(String applicationName) { - return (Builder) super.setApplicationName(applicationName); - } - - @Override - public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { - return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); - } - - @Override - public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { - return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); - } - - @Override - public Builder setSuppressAllChecks(boolean suppressAllChecks) { - return (Builder) super.setSuppressAllChecks(suppressAllChecks); - } - - /** - * Set the {@link {{ api.className }}RequestInitializer}. - * - * @since 1.12 - */ - public Builder set{{ api.className }}RequestInitializer( - {{ api.className }}RequestInitializer {{ api.className|lower }}RequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer({{ api.className|lower }}RequestInitializer); - } - - @Override - public Builder setGoogleClientRequestInitializer( - com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); - } - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___Request.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___Request.java.tmpl deleted file mode 100644 index 9bdd5991703..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___Request.java.tmpl +++ /dev/null @@ -1,76 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request. - * - * @since 1.3 - */ -@SuppressWarnings("javadoc") -public abstract class {{ api.className }}Request extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { - - /** - * @param client Google client - * @param method HTTP Method - * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" - * the base path from the base URL will be stripped out. The URI template can also be a - * full URL. URI template expansion is done using - * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} - * @param content A POJO that can be serialized into JSON or {@code null} for none - * @param responseClass response class to parse into - */ - public {{ api.className }}Request( - {{ api.className }} client, String method, String uriTemplate, Object content, Class responseClass) { -{% filter noblanklines %} - super( - client, - method, - uriTemplate, - content, - responseClass); -{% endfilter %} - } -{% for param in api.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 {{ api.className }}Request {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - this.{{ param.memberName }} = {{ param.memberName }}; - return this; - }{% endfor %} - - @Override - public final {{ api.className }} getAbstractGoogleClient() { - return ({{ api.className }}) super.getAbstractGoogleClient(); - } - - @Override - public {{ api.className }}Request setDisableGZipContent(boolean disableGZipContent) { - return ({{ api.className }}Request) super.setDisableGZipContent(disableGZipContent); - } - - @Override - public {{ api.className }}Request setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { - return ({{ api.className }}Request) super.setRequestHeaders(headers); - } - - @Override - public {{ api.className }}Request set(String parameterName, Object value) { - return ({{ api.className }}Request) super.set(parameterName, value); - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___RequestInitializer.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___RequestInitializer.java.tmpl deleted file mode 100644 index bc0129c3a81..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/___api_className___RequestInitializer.java.tmpl +++ /dev/null @@ -1,105 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request initializer for setting properties like key and userIp. - * - *

- * 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 all() { - java.util.Set set = new java.util.HashSet();{% for authscope in api.authscopes %} - set.add({{ authscope.name }});{% endfor %} - return java.util.Collections.unmodifiableSet(set); - } - - private {{ api.className }}Scopes() { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/model/___topLevelModels_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/model/___topLevelModels_className___.java.tmpl deleted file mode 100644 index 06238f9fe7f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/___package___/model/___topLevelModels_className___.java.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ model.module.name }}; - -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %} - * - *

- * 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.List' %} - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), - "Parameter {{ param.memberName }} elements must conform to the pattern " + - {% literal param.pattern %}); - {% endif %} - } - } - {% else %} - {% if param.code_type == 'java.lang.String' %} - if (!getSuppressPatternChecks()) { - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), - "Parameter {{ param.memberName }} must conform to the pattern " + - {% literal param.pattern %}); - } - {% endif %} - {% endif %} - {% endif %} 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 018fdcc3e75..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_pom_xml.tmpl +++ /dev/null @@ -1,200 +0,0 @@ - - 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - - {{ api.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - {{ api.title }} {{ api.maven.version }} - jar - - 2011 - - - - GoogleAPIs - GoogleAPIs - googleapis@googlegroups.com - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - https://www.google.com{% endif %} - - - - - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - http://www.google.com/{% endif %} - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - - - - - maven-compiler-plugin - 3.5.1 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - - com.google.api.services.{{ api.name }} - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - attach-javadocs - - jar - - - - - none - {{ api.title }} ${project.version} - {{ api.title }} ${project.version} - {% for link in features.javadoc_links %} - {{ link }}{% endfor %} - - - - - {% if layout.unzip_source %}{{ layout.source_location }}{% else %}.{% endif %} - - - ./resources - - - - - - - com.google.api-client - google-api-client - {{ features.baseClientLibrary }} - - - - - UTF-8 - - - - - - release-sonatype - - - - !artifact-registry-url - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - sonatype-nexus-staging - https://google.oss.sonatype.org/ - false - - - - - - - - release-gcp-artifact-registry - - artifactregistry://please-define-artifact-registry-url-property - - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - - - - diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_proguard_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_proguard_content_def.tmpl deleted file mode 100644 index 31b395f7900..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_proguard_content_def.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} -TODO: not schema.reference does not capture the complete solution to b/8167652. - There should instead be a mechanism to get the right answer easily. -{% endcomment %} -{% if not schema.builtIn and not schema.reference %} static { -{% if schema.arrayOf %} - // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); -{% else %} - // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); -{% endif %} - }{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_required_param_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_required_param_def.tmpl deleted file mode 100644 index 3d4335536ff..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_required_param_def.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{% for property in properties %} - {% if property.data_type.required_for_methods %} - {% for required_method in property.data_type.required_for_methods %} - {% ifequal method.id required_method %} - checkRequiredParameter(content, "content"); - checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); - {% if property.data_type.properties %} - {% call_template _required_param_def properties=property.data_type.properties %} - {% endif %} - {% endifequal %} - {% endfor %} - {% endif %} -{% endfor %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_resource.tmpl b/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_resource.tmpl deleted file mode 100644 index 8650753977b..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.28.0/templates/_resource.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * An accessor for creating requests from the {{ resource.className }} collection. - * - *

The 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public {{ api.className }}(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - this(new Builder(transport, jsonFactory, httpRequestInitializer)); - } - - /** - * @param builder builder - */ - {{ api.className }}(Builder builder) { - super(builder); - } - - @Override - protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { - super.initialize(httpClientRequest); - } - -{% for resource in api.resources %} -{% indent %}{% call_template _resource resource=resource %}{% endindent %} -{% endfor %} -{% for method in api.methods %} -{% indent %}{% call_template _method method=method %}{% endindent %} -{% endfor %} - - /** - * Builder for {@link {{ api.className }}}. - * - *

- * 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { -{% filter noblanklines %} - super( - transport, - jsonFactory, - DEFAULT_ROOT_URL, - DEFAULT_SERVICE_PATH, - httpRequestInitializer, - {% if api.dataWrapper %}true{% else %}false{% endif %}); -{% endfilter %} - setBatchPath(DEFAULT_BATCH_PATH); - } - - /** Builds a new instance of {@link {{ api.className }}}. */ - @Override - public {{ api.className }} build() { - return new {{ api.className }}(this); - } - - @Override - public Builder setRootUrl(String rootUrl) { - return (Builder) super.setRootUrl(rootUrl); - } - - @Override - public Builder setServicePath(String servicePath) { - return (Builder) super.setServicePath(servicePath); - } - - @Override - public Builder setBatchPath(String batchPath) { - return (Builder) super.setBatchPath(batchPath); - } - - @Override - public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); - } - - @Override - public Builder setApplicationName(String applicationName) { - return (Builder) super.setApplicationName(applicationName); - } - - @Override - public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { - return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); - } - - @Override - public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { - return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); - } - - @Override - public Builder setSuppressAllChecks(boolean suppressAllChecks) { - return (Builder) super.setSuppressAllChecks(suppressAllChecks); - } - - /** - * Set the {@link {{ api.className }}RequestInitializer}. - * - * @since 1.12 - */ - public Builder set{{ api.className }}RequestInitializer( - {{ api.className }}RequestInitializer {{ api.className|lower }}RequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer({{ api.className|lower }}RequestInitializer); - } - - @Override - public Builder setGoogleClientRequestInitializer( - com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); - } - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___Request.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___Request.java.tmpl deleted file mode 100644 index 9bdd5991703..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___Request.java.tmpl +++ /dev/null @@ -1,76 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request. - * - * @since 1.3 - */ -@SuppressWarnings("javadoc") -public abstract class {{ api.className }}Request extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { - - /** - * @param client Google client - * @param method HTTP Method - * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" - * the base path from the base URL will be stripped out. The URI template can also be a - * full URL. URI template expansion is done using - * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} - * @param content A POJO that can be serialized into JSON or {@code null} for none - * @param responseClass response class to parse into - */ - public {{ api.className }}Request( - {{ api.className }} client, String method, String uriTemplate, Object content, Class responseClass) { -{% filter noblanklines %} - super( - client, - method, - uriTemplate, - content, - responseClass); -{% endfilter %} - } -{% for param in api.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 {{ api.className }}Request {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - this.{{ param.memberName }} = {{ param.memberName }}; - return this; - }{% endfor %} - - @Override - public final {{ api.className }} getAbstractGoogleClient() { - return ({{ api.className }}) super.getAbstractGoogleClient(); - } - - @Override - public {{ api.className }}Request setDisableGZipContent(boolean disableGZipContent) { - return ({{ api.className }}Request) super.setDisableGZipContent(disableGZipContent); - } - - @Override - public {{ api.className }}Request setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { - return ({{ api.className }}Request) super.setRequestHeaders(headers); - } - - @Override - public {{ api.className }}Request set(String parameterName, Object value) { - return ({{ api.className }}Request) super.set(parameterName, value); - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___RequestInitializer.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___RequestInitializer.java.tmpl deleted file mode 100644 index bc0129c3a81..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/___api_className___RequestInitializer.java.tmpl +++ /dev/null @@ -1,105 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request initializer for setting properties like key and userIp. - * - *

- * 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 all() { - java.util.Set set = new java.util.HashSet();{% for authscope in api.authscopes %} - set.add({{ authscope.name }});{% endfor %} - return java.util.Collections.unmodifiableSet(set); - } - - private {{ api.className }}Scopes() { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/model/___topLevelModels_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/model/___topLevelModels_className___.java.tmpl deleted file mode 100644 index 06238f9fe7f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/___package___/model/___topLevelModels_className___.java.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ model.module.name }}; - -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %} - * - *

- * 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.List' %} - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), - "Parameter {{ param.memberName }} elements must conform to the pattern " + - {% literal param.pattern %}); - {% endif %} - } - } - {% else %} - {% if param.code_type == 'java.lang.String' %} - if (!getSuppressPatternChecks()) { - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), - "Parameter {{ param.memberName }} must conform to the pattern " + - {% literal param.pattern %}); - } - {% endif %} - {% endif %} - {% endif %} 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 ae0c34126d2..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_pom_xml.tmpl +++ /dev/null @@ -1,200 +0,0 @@ - - 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - - {{ api.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - {{ api.title }} {{ api.maven.version }} - jar - - 2011 - - - - GoogleAPIs - GoogleAPIs - googleapis@googlegroups.com - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - https://www.google.com{% endif %} - - - - - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - http://www.google.com/{% endif %} - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - - - - - maven-compiler-plugin - 3.5.1 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - - com.google.api.services.{{ api.name }} - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - attach-javadocs - - jar - - - - - none - {{ api.title }} ${project.version} - {{ api.title }} ${project.version} - {% for link in features.javadoc_links %} - {{ link }}{% endfor %} - - - - - {% if layout.unzip_source %}{{ layout.source_location }}{% else %}.{% endif %} - - - ./resources - - - - - - - com.google.api-client - google-api-client - {{ features.baseClientLibrary }} - - - - - UTF-8 - - - - - - release-sonatype - - - - !artifact-registry-url - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - sonatype-nexus-staging - https://google.oss.sonatype.org/ - false - - - - - - - - release-gcp-artifact-registry - - artifactregistry://please-define-artifact-registry-url-property - - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - - - - diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_proguard_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_proguard_content_def.tmpl deleted file mode 100644 index 31b395f7900..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_proguard_content_def.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} -TODO: not schema.reference does not capture the complete solution to b/8167652. - There should instead be a mechanism to get the right answer easily. -{% endcomment %} -{% if not schema.builtIn and not schema.reference %} static { -{% if schema.arrayOf %} - // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); -{% else %} - // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); -{% endif %} - }{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_required_param_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_required_param_def.tmpl deleted file mode 100644 index 3d4335536ff..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_required_param_def.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{% for property in properties %} - {% if property.data_type.required_for_methods %} - {% for required_method in property.data_type.required_for_methods %} - {% ifequal method.id required_method %} - checkRequiredParameter(content, "content"); - checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); - {% if property.data_type.properties %} - {% call_template _required_param_def properties=property.data_type.properties %} - {% endif %} - {% endifequal %} - {% endfor %} - {% endif %} -{% endfor %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_resource.tmpl b/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_resource.tmpl deleted file mode 100644 index 8650753977b..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.29.2/templates/_resource.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * An accessor for creating requests from the {{ resource.className }} collection. - * - *

The 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.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - - - -``` - -### Gradle - -```gradle -repositories { - mavenCentral() -} -dependencies { - compile '{{ api.maven.group_id }}:{{ api.maven.artifact_id }}:{{ api.maven.version }}' -} -``` - -[javadoc]: https://googleapis.dev/java/{{ api.maven.artifact_id }}/latest/index.html -[google-api-client]: https://github.com/googleapis/google-api-java-client/ -[api-explorer]: https://developers.google.com/apis-explorer/#p/{{ api.name }}/v1/ diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___.java.tmpl deleted file mode 100644 index fe2c5d6dfb1..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public {{ api.className }}(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - this(new Builder(transport, jsonFactory, httpRequestInitializer)); - } - - /** - * @param builder builder - */ - {{ api.className }}(Builder builder) { - super(builder); - } - - @Override - protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { - super.initialize(httpClientRequest); - } - -{% for resource in api.resources %} -{% indent %}{% call_template _resource resource=resource %}{% endindent %} -{% endfor %} -{% for method in api.methods %} -{% indent %}{% call_template _method method=method %}{% endindent %} -{% endfor %} - - /** - * Builder for {@link {{ api.className }}}. - * - *

- * 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { -{% filter noblanklines %} - super( - transport, - jsonFactory, - DEFAULT_ROOT_URL, - DEFAULT_SERVICE_PATH, - httpRequestInitializer, - {% if api.dataWrapper %}true{% else %}false{% endif %}); -{% endfilter %} - setBatchPath(DEFAULT_BATCH_PATH); - } - - /** Builds a new instance of {@link {{ api.className }}}. */ - @Override - public {{ api.className }} build() { - return new {{ api.className }}(this); - } - - @Override - public Builder setRootUrl(String rootUrl) { - return (Builder) super.setRootUrl(rootUrl); - } - - @Override - public Builder setServicePath(String servicePath) { - return (Builder) super.setServicePath(servicePath); - } - - @Override - public Builder setBatchPath(String batchPath) { - return (Builder) super.setBatchPath(batchPath); - } - - @Override - public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); - } - - @Override - public Builder setApplicationName(String applicationName) { - return (Builder) super.setApplicationName(applicationName); - } - - @Override - public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { - return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); - } - - @Override - public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { - return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); - } - - @Override - public Builder setSuppressAllChecks(boolean suppressAllChecks) { - return (Builder) super.setSuppressAllChecks(suppressAllChecks); - } - - /** - * Set the {@link {{ api.className }}RequestInitializer}. - * - * @since 1.12 - */ - public Builder set{{ api.className }}RequestInitializer( - {{ api.className }}RequestInitializer {{ api.className|lower }}RequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer({{ api.className|lower }}RequestInitializer); - } - - @Override - public Builder setGoogleClientRequestInitializer( - com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); - } - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___Request.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___Request.java.tmpl deleted file mode 100644 index 9bdd5991703..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___Request.java.tmpl +++ /dev/null @@ -1,76 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request. - * - * @since 1.3 - */ -@SuppressWarnings("javadoc") -public abstract class {{ api.className }}Request extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { - - /** - * @param client Google client - * @param method HTTP Method - * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" - * the base path from the base URL will be stripped out. The URI template can also be a - * full URL. URI template expansion is done using - * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} - * @param content A POJO that can be serialized into JSON or {@code null} for none - * @param responseClass response class to parse into - */ - public {{ api.className }}Request( - {{ api.className }} client, String method, String uriTemplate, Object content, Class responseClass) { -{% filter noblanklines %} - super( - client, - method, - uriTemplate, - content, - responseClass); -{% endfilter %} - } -{% for param in api.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 {{ api.className }}Request {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - this.{{ param.memberName }} = {{ param.memberName }}; - return this; - }{% endfor %} - - @Override - public final {{ api.className }} getAbstractGoogleClient() { - return ({{ api.className }}) super.getAbstractGoogleClient(); - } - - @Override - public {{ api.className }}Request setDisableGZipContent(boolean disableGZipContent) { - return ({{ api.className }}Request) super.setDisableGZipContent(disableGZipContent); - } - - @Override - public {{ api.className }}Request setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { - return ({{ api.className }}Request) super.setRequestHeaders(headers); - } - - @Override - public {{ api.className }}Request set(String parameterName, Object value) { - return ({{ api.className }}Request) super.set(parameterName, value); - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___RequestInitializer.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___RequestInitializer.java.tmpl deleted file mode 100644 index bc0129c3a81..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/___api_className___RequestInitializer.java.tmpl +++ /dev/null @@ -1,105 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request initializer for setting properties like key and userIp. - * - *

- * 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 all() { - java.util.Set set = new java.util.HashSet();{% for authscope in api.authscopes %} - set.add({{ authscope.name }});{% endfor %} - return java.util.Collections.unmodifiableSet(set); - } - - private {{ api.className }}Scopes() { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/model/___topLevelModels_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/model/___topLevelModels_className___.java.tmpl deleted file mode 100644 index 06238f9fe7f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/___package___/model/___topLevelModels_className___.java.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ model.module.name }}; - -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %} - * - *

- * 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.List' %} - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), - "Parameter {{ param.memberName }} elements must conform to the pattern " + - {% literal param.pattern %}); - {% endif %} - } - } - {% else %} - {% if param.code_type == 'java.lang.String' %} - if (!getSuppressPatternChecks()) { - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), - "Parameter {{ param.memberName }} must conform to the pattern " + - {% literal param.pattern %}); - } - {% endif %} - {% endif %} - {% endif %} 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 fa3f7eb099f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_pom_xml.tmpl +++ /dev/null @@ -1,216 +0,0 @@ - - 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - - {{ api.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - {{ api.title }} {{ api.maven.version }} - jar - - 2011 - - - - GoogleAPIs - GoogleAPIs - googleapis@googlegroups.com - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - https://www.google.com{% endif %} - - - - - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - http://www.google.com/{% endif %} - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - - - - - maven-compiler-plugin - 3.5.1 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - - com.google.api.services.{{ api.name }} - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - attach-javadocs - - jar - - - - - none - {{ api.title }} ${project.version} - {{ api.title }} ${project.version} - {% for link in features.javadoc_links %} - {{ link }}{% endfor %} - - - - - org.codehaus.mojo - clirr-maven-plugin - 2.8 - - clirr-ignored-differences.xml - true - - - - - check - - - - - - {% if layout.unzip_source %}{{ layout.source_location }}{% else %}.{% endif %} - - - ./resources - - - - - - - com.google.api-client - google-api-client - {{ features.baseClientLibrary }} - - - - - UTF-8 - - - - - - release-sonatype - - - - !artifact-registry-url - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - sonatype-nexus-staging - https://google.oss.sonatype.org/ - false - - - - - - - - release-gcp-artifact-registry - - artifactregistry://please-define-artifact-registry-url-property - - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - - - - diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_proguard_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_proguard_content_def.tmpl deleted file mode 100644 index 31b395f7900..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_proguard_content_def.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} -TODO: not schema.reference does not capture the complete solution to b/8167652. - There should instead be a mechanism to get the right answer easily. -{% endcomment %} -{% if not schema.builtIn and not schema.reference %} static { -{% if schema.arrayOf %} - // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); -{% else %} - // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); -{% endif %} - }{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_required_param_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_required_param_def.tmpl deleted file mode 100644 index 3d4335536ff..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_required_param_def.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{% for property in properties %} - {% if property.data_type.required_for_methods %} - {% for required_method in property.data_type.required_for_methods %} - {% ifequal method.id required_method %} - checkRequiredParameter(content, "content"); - checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); - {% if property.data_type.properties %} - {% call_template _required_param_def properties=property.data_type.properties %} - {% endif %} - {% endifequal %} - {% endfor %} - {% endif %} -{% endfor %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_resource.tmpl b/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_resource.tmpl deleted file mode 100644 index 8650753977b..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.30.1/templates/_resource.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * An accessor for creating requests from the {{ resource.className }} collection. - * - *

The 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.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - - - -``` - -### Gradle - -```gradle -repositories { - mavenCentral() -} -dependencies { - implementation '{{ api.maven.group_id }}:{{ api.maven.artifact_id }}:{{ api.maven.version }}' -} -``` - -[javadoc]: https://googleapis.dev/java/{{ api.maven.artifact_id }}/latest/index.html -[google-api-client]: https://github.com/googleapis/google-api-java-client/ -[api-explorer]: https://developers.google.com/apis-explorer/#p/{{ api.name }}/v1/ diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___.java.tmpl deleted file mode 100644 index cc26f0d532f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___.java.tmpl +++ /dev/null @@ -1,250 +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 >= 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public {{ api.className }}(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - this(new Builder(transport, jsonFactory, httpRequestInitializer)); - } - - /** - * @param builder builder - */ - {{ api.className }}(Builder builder) { - super(builder); - } - - @Override - protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { - super.initialize(httpClientRequest); - } - -{% for resource in api.resources %} -{% indent %}{% call_template _resource resource=resource %}{% endindent %} -{% endfor %} -{% for method in api.methods %} -{% indent %}{% call_template _method method=method %}{% endindent %} -{% endfor %} - - /** - * Builder for {@link {{ api.className }}}. - * - *

- * 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { -{% filter noblanklines %} - super( - transport, - jsonFactory, - Builder.chooseEndpoint(transport), - DEFAULT_SERVICE_PATH, - httpRequestInitializer, - {% if api.dataWrapper %}true{% else %}false{% endif %}); -{% endfilter %} - setBatchPath(DEFAULT_BATCH_PATH); - } - - /** Builds a new instance of {@link {{ api.className }}}. */ - @Override - public {{ api.className }} build() { - return new {{ api.className }}(this); - } - - @Override - public Builder setRootUrl(String rootUrl) { - return (Builder) super.setRootUrl(rootUrl); - } - - @Override - public Builder setServicePath(String servicePath) { - return (Builder) super.setServicePath(servicePath); - } - - @Override - public Builder setBatchPath(String batchPath) { - return (Builder) super.setBatchPath(batchPath); - } - - @Override - public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); - } - - @Override - public Builder setApplicationName(String applicationName) { - return (Builder) super.setApplicationName(applicationName); - } - - @Override - public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { - return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); - } - - @Override - public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { - return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); - } - - @Override - public Builder setSuppressAllChecks(boolean suppressAllChecks) { - return (Builder) super.setSuppressAllChecks(suppressAllChecks); - } - - /** - * Set the {@link {{ api.className }}RequestInitializer}. - * - * @since 1.12 - */ - public Builder set{{ api.className }}RequestInitializer( - {{ api.className }}RequestInitializer {{ api.className|lower }}RequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer({{ api.className|lower }}RequestInitializer); - } - - @Override - public Builder setGoogleClientRequestInitializer( - com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); - } - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___Request.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___Request.java.tmpl deleted file mode 100644 index 9bdd5991703..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___Request.java.tmpl +++ /dev/null @@ -1,76 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request. - * - * @since 1.3 - */ -@SuppressWarnings("javadoc") -public abstract class {{ api.className }}Request extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { - - /** - * @param client Google client - * @param method HTTP Method - * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" - * the base path from the base URL will be stripped out. The URI template can also be a - * full URL. URI template expansion is done using - * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} - * @param content A POJO that can be serialized into JSON or {@code null} for none - * @param responseClass response class to parse into - */ - public {{ api.className }}Request( - {{ api.className }} client, String method, String uriTemplate, Object content, Class responseClass) { -{% filter noblanklines %} - super( - client, - method, - uriTemplate, - content, - responseClass); -{% endfilter %} - } -{% for param in api.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 {{ api.className }}Request {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - this.{{ param.memberName }} = {{ param.memberName }}; - return this; - }{% endfor %} - - @Override - public final {{ api.className }} getAbstractGoogleClient() { - return ({{ api.className }}) super.getAbstractGoogleClient(); - } - - @Override - public {{ api.className }}Request setDisableGZipContent(boolean disableGZipContent) { - return ({{ api.className }}Request) super.setDisableGZipContent(disableGZipContent); - } - - @Override - public {{ api.className }}Request setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { - return ({{ api.className }}Request) super.setRequestHeaders(headers); - } - - @Override - public {{ api.className }}Request set(String parameterName, Object value) { - return ({{ api.className }}Request) super.set(parameterName, value); - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___RequestInitializer.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___RequestInitializer.java.tmpl deleted file mode 100644 index bc0129c3a81..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/___api_className___RequestInitializer.java.tmpl +++ /dev/null @@ -1,105 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request initializer for setting properties like key and userIp. - * - *

- * 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 all() { - java.util.Set set = new java.util.HashSet();{% for authscope in api.authscopes %} - set.add({{ authscope.name }});{% endfor %} - return java.util.Collections.unmodifiableSet(set); - } - - private {{ api.className }}Scopes() { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/model/___topLevelModels_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/model/___topLevelModels_className___.java.tmpl deleted file mode 100644 index 06238f9fe7f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/___package___/model/___topLevelModels_className___.java.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ model.module.name }}; - -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %} - * - *

- * 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.List' %} - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), - "Parameter {{ param.memberName }} elements must conform to the pattern " + - {% literal param.pattern %}); - {% endif %} - } - } - {% else %} - {% if param.code_type == 'java.lang.String' %} - if (!getSuppressPatternChecks()) { - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), - "Parameter {{ param.memberName }} must conform to the pattern " + - {% literal param.pattern %}); - } - {% endif %} - {% endif %} - {% endif %} 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 371b1d337d0..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_pom_xml.tmpl +++ /dev/null @@ -1,216 +0,0 @@ - - 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - - {{ api.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - {{ api.title }} {{ api.maven.version }} - jar - - 2011 - - - - GoogleAPIs - GoogleAPIs - googleapis@googlegroups.com - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - https://www.google.com{% endif %} - - - - - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - http://www.google.com/{% endif %} - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - ossrh - https://google.oss.sonatype.org/content/repositories/snapshots - - - - - - - maven-compiler-plugin - 3.9.0 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-source-plugin - 2.4 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - - com.google.api.services.{{ api.name }} - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - attach-javadocs - - jar - - - - - none - {{ api.title }} ${project.version} - {{ api.title }} ${project.version} - {% for link in features.javadoc_links %} - {{ link }}{% endfor %} - - - - - org.codehaus.mojo - clirr-maven-plugin - 2.8 - - clirr-ignored-differences.xml - true - - - - - check - - - - - - {% if layout.unzip_source %}{{ layout.source_location }}{% else %}.{% endif %} - - - ./resources - - - - - - - com.google.api-client - google-api-client - {{ features.baseClientLibrary }} - - - - - UTF-8 - - - - - - release-sonatype - - - - !artifact-registry-url - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - true - - sonatype-nexus-staging - https://google.oss.sonatype.org/ - false - - - - - - - - release-gcp-artifact-registry - - artifactregistry://please-define-artifact-registry-url-property - - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - gcp-artifact-registry-repository - ${artifact-registry-url} - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - - - - diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_proguard_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_proguard_content_def.tmpl deleted file mode 100644 index 31b395f7900..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_proguard_content_def.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} -TODO: not schema.reference does not capture the complete solution to b/8167652. - There should instead be a mechanism to get the right answer easily. -{% endcomment %} -{% if not schema.builtIn and not schema.reference %} static { -{% if schema.arrayOf %} - // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); -{% else %} - // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); -{% endif %} - }{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_required_param_def.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_required_param_def.tmpl deleted file mode 100644 index 3d4335536ff..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_required_param_def.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{% for property in properties %} - {% if property.data_type.required_for_methods %} - {% for required_method in property.data_type.required_for_methods %} - {% ifequal method.id required_method %} - checkRequiredParameter(content, "content"); - checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); - {% if property.data_type.properties %} - {% call_template _required_param_def properties=property.data_type.properties %} - {% endif %} - {% endifequal %} - {% endfor %} - {% endif %} -{% endfor %} - diff --git a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_resource.tmpl b/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_resource.tmpl deleted file mode 100644 index 8650753977b..00000000000 --- a/generator/src/googleapis/codegen/languages/java/1.31.0/templates/_resource.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * An accessor for creating requests from the {{ resource.className }} collection. - * - *

The 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.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - - - -``` - -### Gradle - -```gradle -repositories { - mavenCentral() -} -dependencies { - implementation '{{ api.maven.group_id }}:{{ api.maven.artifact_id }}:{{ api.maven.version }}' -} -``` - -[javadoc]: https://googleapis.dev/java/{{ api.maven.artifact_id }}/latest/index.html -[google-api-client]: https://github.com/googleapis/google-api-java-client/ -[api-explorer]: https://developers.google.com/apis-explorer/#p/abusiveexperiencereport/v1/ diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___.java.tmpl deleted file mode 100644 index fe2c5d6dfb1..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public {{ api.className }}(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - this(new Builder(transport, jsonFactory, httpRequestInitializer)); - } - - /** - * @param builder builder - */ - {{ api.className }}(Builder builder) { - super(builder); - } - - @Override - protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { - super.initialize(httpClientRequest); - } - -{% for resource in api.resources %} -{% indent %}{% call_template _resource resource=resource %}{% endindent %} -{% endfor %} -{% for method in api.methods %} -{% indent %}{% call_template _method method=method %}{% endindent %} -{% endfor %} - - /** - * Builder for {@link {{ api.className }}}. - * - *

- * 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: - *
    - *
  • Google App Engine: - * {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}
  • - *
  • Android: {@code newCompatibleTransport} from - * {@code com.google.api.client.extensions.android.http.AndroidHttp}
  • - *
  • Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()} - *
  • - *
- * @param jsonFactory JSON factory, which may be: - *
    - *
  • Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}
  • - *
  • Google GSON: {@code com.google.api.client.json.gson.GsonFactory}
  • - *
  • Android Honeycomb or higher: - * {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}
  • - *
- * @param httpRequestInitializer HTTP request initializer or {@code null} for none - * @since 1.7 - */ - public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory, - com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { -{% filter noblanklines %} - super( - transport, - jsonFactory, - DEFAULT_ROOT_URL, - DEFAULT_SERVICE_PATH, - httpRequestInitializer, - {% if api.dataWrapper %}true{% else %}false{% endif %}); -{% endfilter %} - setBatchPath(DEFAULT_BATCH_PATH); - } - - /** Builds a new instance of {@link {{ api.className }}}. */ - @Override - public {{ api.className }} build() { - return new {{ api.className }}(this); - } - - @Override - public Builder setRootUrl(String rootUrl) { - return (Builder) super.setRootUrl(rootUrl); - } - - @Override - public Builder setServicePath(String servicePath) { - return (Builder) super.setServicePath(servicePath); - } - - @Override - public Builder setBatchPath(String batchPath) { - return (Builder) super.setBatchPath(batchPath); - } - - @Override - public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) { - return (Builder) super.setHttpRequestInitializer(httpRequestInitializer); - } - - @Override - public Builder setApplicationName(String applicationName) { - return (Builder) super.setApplicationName(applicationName); - } - - @Override - public Builder setSuppressPatternChecks(boolean suppressPatternChecks) { - return (Builder) super.setSuppressPatternChecks(suppressPatternChecks); - } - - @Override - public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) { - return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks); - } - - @Override - public Builder setSuppressAllChecks(boolean suppressAllChecks) { - return (Builder) super.setSuppressAllChecks(suppressAllChecks); - } - - /** - * Set the {@link {{ api.className }}RequestInitializer}. - * - * @since 1.12 - */ - public Builder set{{ api.className }}RequestInitializer( - {{ api.className }}RequestInitializer {{ api.className|lower }}RequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer({{ api.className|lower }}RequestInitializer); - } - - @Override - public Builder setGoogleClientRequestInitializer( - com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { - return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); - } - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___Request.java.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___Request.java.tmpl deleted file mode 100644 index 9bdd5991703..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___Request.java.tmpl +++ /dev/null @@ -1,76 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request. - * - * @since 1.3 - */ -@SuppressWarnings("javadoc") -public abstract class {{ api.className }}Request extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest { - - /** - * @param client Google client - * @param method HTTP Method - * @param uriTemplate URI template for the path relative to the base URL. If it starts with a "/" - * the base path from the base URL will be stripped out. The URI template can also be a - * full URL. URI template expansion is done using - * {@link com.google.api.client.http.UriTemplate#expand(String, String, Object, boolean)} - * @param content A POJO that can be serialized into JSON or {@code null} for none - * @param responseClass response class to parse into - */ - public {{ api.className }}Request( - {{ api.className }} client, String method, String uriTemplate, Object content, Class responseClass) { -{% filter noblanklines %} - super( - client, - method, - uriTemplate, - content, - responseClass); -{% endfilter %} - } -{% for param in api.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 {{ api.className }}Request {{ param.setterName }}({{ param.codeType }} {{ param.memberName }}) { - this.{{ param.memberName }} = {{ param.memberName }}; - return this; - }{% endfor %} - - @Override - public final {{ api.className }} getAbstractGoogleClient() { - return ({{ api.className }}) super.getAbstractGoogleClient(); - } - - @Override - public {{ api.className }}Request setDisableGZipContent(boolean disableGZipContent) { - return ({{ api.className }}Request) super.setDisableGZipContent(disableGZipContent); - } - - @Override - public {{ api.className }}Request setRequestHeaders(com.google.api.client.http.HttpHeaders headers) { - return ({{ api.className }}Request) super.setRequestHeaders(headers); - } - - @Override - public {{ api.className }}Request set(String parameterName, Object value) { - return ({{ api.className }}Request) super.set(parameterName, value); - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___RequestInitializer.java.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___RequestInitializer.java.tmpl deleted file mode 100644 index bc0129c3a81..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/___api_className___RequestInitializer.java.tmpl +++ /dev/null @@ -1,105 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ api.module.name }}; - -/** - * {{ api.className }} request initializer for setting properties like key and userIp. - * - *

- * 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 all() { - java.util.Set set = new java.util.HashSet();{% for authscope in api.authscopes %} - set.add({{ authscope.name }});{% endfor %} - return java.util.Collections.unmodifiableSet(set); - } - - private {{ api.className }}Scopes() { - } -}{% endcollapsenewlines %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/model/___topLevelModels_className___.java.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/___package___/model/___topLevelModels_className___.java.tmpl deleted file mode 100644 index 06238f9fe7f..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/___package___/model/___topLevelModels_className___.java.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{% language java %}{% collapsenewlines %}{% call_template _file_header %} - -package {{ model.module.name }}; - -/**{% filter block_comment %} - * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %} - * - *

- * 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.List' %} - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), - "Parameter {{ param.memberName }} elements must conform to the pattern " + - {% literal param.pattern %}); - {% endif %} - } - } - {% else %} - {% if param.code_type == 'java.lang.String' %} - if (!getSuppressPatternChecks()) { - com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), - "Parameter {{ param.memberName }} must conform to the pattern " + - {% literal param.pattern %}); - } - {% endif %} - {% endif %} - {% endif %} 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 794a6da66ee..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_pom_xml.tmpl +++ /dev/null @@ -1,169 +0,0 @@ - - 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - - {{ api.maven.group_id }} - {{ api.maven.artifact_id }} - {{ api.maven.version }} - {{ api.title }} {{ api.maven.version }} - jar - - 2011 - - - {{ api.ownerName }}{% if api.ownerDomain == "google.com" %} - http://www.google.com/{% endif %} - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - ossrh - https://google.oss.sonatype.org/content/repositories/snapshots - - - - - - - maven-compiler-plugin - 3.5.1 - - 1.6 - 1.6 - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - true - - ossrh - https://google.oss.sonatype.org/ - true - - - - org.apache.maven.plugins - maven-source-plugin - 2.4 - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.2 - - - ${project.build.outputDirectory}/META-INF/MANIFEST.MF - - com.google.api.services.{{ api.name }} - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.1.0 - - - attach-javadocs - - jar - - - - - none - {{ api.title }} ${project.version} - {{ api.title }} ${project.version} - {% for link in features.javadoc_links %} - {{ link }}{% endfor %} - - - - - org.codehaus.mojo - clirr-maven-plugin - 2.8 - - clirr-ignored-differences.xml - true - - - - - check - - - - - - {% if layout.unzip_source %}{{ layout.source_location }}{% else %}.{% endif %} - - - ./resources - - - - - - - com.google.api-client - google-api-client - {{ features.baseClientLibrary }} - - - - - UTF-8 - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.7 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - - - - diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_proguard_content_def.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_proguard_content_def.tmpl deleted file mode 100644 index 31b395f7900..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_proguard_content_def.tmpl +++ /dev/null @@ -1,15 +0,0 @@ -{% comment %} -TODO: not schema.reference does not capture the complete solution to b/8167652. - There should instead be a mechanism to get the right answer easily. -{% endcomment %} -{% if not schema.builtIn and not schema.reference %} static { -{% if schema.arrayOf %} - // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); -{% else %} - // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out - // see https://github.com/google/google-api-java-client/issues/543 - com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); -{% endif %} - }{% endif %} diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_required_param_def.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_required_param_def.tmpl deleted file mode 100644 index 3d4335536ff..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_required_param_def.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{% for property in properties %} - {% if property.data_type.required_for_methods %} - {% for required_method in property.data_type.required_for_methods %} - {% ifequal method.id required_method %} - checkRequiredParameter(content, "content"); - checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); - {% if property.data_type.properties %} - {% call_template _required_param_def properties=property.data_type.properties %} - {% endif %} - {% endifequal %} - {% endfor %} - {% endif %} -{% endfor %} - diff --git a/generator/src/googleapis/codegen/languages/java/default/templates/_resource.tmpl b/generator/src/googleapis/codegen/languages/java/default/templates/_resource.tmpl deleted file mode 100644 index 8650753977b..00000000000 --- a/generator/src/googleapis/codegen/languages/java/default/templates/_resource.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -/** - * An accessor for creating requests from the {{ resource.className }} collection. - * - *

The 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" } } }