/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://code.google.com/p/google-apis-client-generator/
* (build: 2014-07-22 21:53:01 UTC)
* on 2014-08-14 at 18:33:26 UTC
* Modify at your own risk.
*/
package com.gabilheri.backend.com.gabilheri.backend.todoApi;
/**
* Service definition for TodoApi (v1).
*
* <p>
* This is an API
* </p>
*
* <p>
* For more information about this service, see the
* <a href="" target="_blank">API Documentation</a>
* </p>
*
* <p>
* This service uses {@link TodoApiRequestInitializer} to initialize global parameters via its
* {@link Builder}.
* </p>
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class TodoApi 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 " +
"1.19.0 of the todoApi 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 = "https://gabilheri-cloud.appspot.com/_ah/api/";
/**
* 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 = "todoApi/v1/";
/**
* 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;
/**
* Constructor.
*
* <p>
* Use {@link Builder} if you need to specify any of the optional parameters.
* </p>
*
* @param transport HTTP transport, which should normally be:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public TodoApi(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
*/
TodoApi(Builder builder) {
super(builder);
}
@Override
protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
super.initialize(httpClientRequest);
}
/**
* Create a request for the method "clearTodo".
*
* This request holds the parameters needed by the todoApi server. After setting any optional
* parameters, call the {@link ClearTodo#execute()} method to invoke the remote operation.
*
* @return the request
*/
public ClearTodo clearTodo() throws java.io.IOException {
ClearTodo result = new ClearTodo();
initialize(result);
return result;
}
public class ClearTodo extends TodoApiRequest<Void> {
private static final String REST_PATH = "clearTodo";
/**
* Create a request for the method "clearTodo".
*
* This request holds the parameters needed by the the todoApi server. After setting any optional
* parameters, call the {@link ClearTodo#execute()} method to invoke the remote operation. <p>
* {@link
* ClearTodo#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @since 1.13
*/
protected ClearTodo() {
super(TodoApi.this, "POST", REST_PATH, null, Void.class);
}
@Override
public ClearTodo setAlt(java.lang.String alt) {
return (ClearTodo) super.setAlt(alt);
}
@Override
public ClearTodo setFields(java.lang.String fields) {
return (ClearTodo) super.setFields(fields);
}
@Override
public ClearTodo setKey(java.lang.String key) {
return (ClearTodo) super.setKey(key);
}
@Override
public ClearTodo setOauthToken(java.lang.String oauthToken) {
return (ClearTodo) super.setOauthToken(oauthToken);
}
@Override
public ClearTodo setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ClearTodo) super.setPrettyPrint(prettyPrint);
}
@Override
public ClearTodo setQuotaUser(java.lang.String quotaUser) {
return (ClearTodo) super.setQuotaUser(quotaUser);
}
@Override
public ClearTodo setUserIp(java.lang.String userIp) {
return (ClearTodo) super.setUserIp(userIp);
}
@Override
public ClearTodo set(String parameterName, Object value) {
return (ClearTodo) super.set(parameterName, value);
}
}
/**
* Create a request for the method "getTodo".
*
* This request holds the parameters needed by the todoApi server. After setting any optional
* parameters, call the {@link GetTodo#execute()} method to invoke the remote operation.
*
* @return the request
*/
public GetTodo getTodo() throws java.io.IOException {
GetTodo result = new GetTodo();
initialize(result);
return result;
}
public class GetTodo extends TodoApiRequest<com.gabilheri.backend.com.gabilheri.backend.todoApi.model.TodoBeanCollection> {
private static final String REST_PATH = "todobeancollection";
/**
* Create a request for the method "getTodo".
*
* This request holds the parameters needed by the the todoApi server. After setting any optional
* parameters, call the {@link GetTodo#execute()} method to invoke the remote operation. <p>
* {@link
* GetTodo#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @since 1.13
*/
protected GetTodo() {
super(TodoApi.this, "GET", REST_PATH, null, com.gabilheri.backend.com.gabilheri.backend.todoApi.model.TodoBeanCollection.class);
}
@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();
}
@Override
public GetTodo setAlt(java.lang.String alt) {
return (GetTodo) super.setAlt(alt);
}
@Override
public GetTodo setFields(java.lang.String fields) {
return (GetTodo) super.setFields(fields);
}
@Override
public GetTodo setKey(java.lang.String key) {
return (GetTodo) super.setKey(key);
}
@Override
public GetTodo setOauthToken(java.lang.String oauthToken) {
return (GetTodo) super.setOauthToken(oauthToken);
}
@Override
public GetTodo setPrettyPrint(java.lang.Boolean prettyPrint) {
return (GetTodo) super.setPrettyPrint(prettyPrint);
}
@Override
public GetTodo setQuotaUser(java.lang.String quotaUser) {
return (GetTodo) super.setQuotaUser(quotaUser);
}
@Override
public GetTodo setUserIp(java.lang.String userIp) {
return (GetTodo) super.setUserIp(userIp);
}
@Override
public GetTodo set(String parameterName, Object value) {
return (GetTodo) super.set(parameterName, value);
}
}
/**
* Create a request for the method "storeTodo".
*
* This request holds the parameters needed by the todoApi server. After setting any optional
* parameters, call the {@link StoreTodo#execute()} method to invoke the remote operation.
*
* @param content the {@link com.gabilheri.backend.com.gabilheri.backend.todoApi.model.TodoBean}
* @return the request
*/
public StoreTodo storeTodo(com.gabilheri.backend.com.gabilheri.backend.todoApi.model.TodoBean content) throws java.io.IOException {
StoreTodo result = new StoreTodo(content);
initialize(result);
return result;
}
public class StoreTodo extends TodoApiRequest<Void> {
private static final String REST_PATH = "storeTodo";
/**
* Create a request for the method "storeTodo".
*
* This request holds the parameters needed by the the todoApi server. After setting any optional
* parameters, call the {@link StoreTodo#execute()} method to invoke the remote operation. <p>
* {@link
* StoreTodo#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param content the {@link com.gabilheri.backend.com.gabilheri.backend.todoApi.model.TodoBean}
* @since 1.13
*/
protected StoreTodo(com.gabilheri.backend.com.gabilheri.backend.todoApi.model.TodoBean content) {
super(TodoApi.this, "POST", REST_PATH, content, Void.class);
}
@Override
public StoreTodo setAlt(java.lang.String alt) {
return (StoreTodo) super.setAlt(alt);
}
@Override
public StoreTodo setFields(java.lang.String fields) {
return (StoreTodo) super.setFields(fields);
}
@Override
public StoreTodo setKey(java.lang.String key) {
return (StoreTodo) super.setKey(key);
}
@Override
public StoreTodo setOauthToken(java.lang.String oauthToken) {
return (StoreTodo) super.setOauthToken(oauthToken);
}
@Override
public StoreTodo setPrettyPrint(java.lang.Boolean prettyPrint) {
return (StoreTodo) super.setPrettyPrint(prettyPrint);
}
@Override
public StoreTodo setQuotaUser(java.lang.String quotaUser) {
return (StoreTodo) super.setQuotaUser(quotaUser);
}
@Override
public StoreTodo setUserIp(java.lang.String userIp) {
return (StoreTodo) super.setUserIp(userIp);
}
@Override
public StoreTodo set(String parameterName, Object value) {
return (StoreTodo) super.set(parameterName, value);
}
}
/**
* Builder for {@link TodoApi}.
*
* <p>
* Implementation is not thread-safe.
* </p>
*
* @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:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @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) {
super(
transport,
jsonFactory,
DEFAULT_ROOT_URL,
DEFAULT_SERVICE_PATH,
httpRequestInitializer,
false);
}
/** Builds a new instance of {@link TodoApi}. */
@Override
public TodoApi build() {
return new TodoApi(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 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 TodoApiRequestInitializer}.
*
* @since 1.12
*/
public Builder setTodoApiRequestInitializer(
TodoApiRequestInitializer todoapiRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(todoapiRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}