Back to project page mobile-shopping-assistant-appengine.
The source code is released under:
Apache License
If you think the Android project mobile-shopping-assistant-appengine listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * 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 *//ww w .j a va 2s.co m * 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: 2013-12-19 23:55:21 UTC) * on 2013-12-23 at 19:44:37 UTC * Modify at your own risk. */ package ch.yereaztian.mobileassistant.recommendationendpoint; /** * Service definition for Recommendationendpoint (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 RecommendationendpointRequestInitializer} to initialize global parameters via its * {@link Builder}. * </p> * * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Recommendationendpoint 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.16.0-rc of the recommendationendpoint 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://myapp.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 = "recommendationendpoint/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 Recommendationendpoint(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 */ Recommendationendpoint(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 "getRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After setting * any optional parameters, call the {@link GetRecommendation#execute()} method to invoke the remote * operation. * * @param id * @return the request */ public GetRecommendation getRecommendation(java.lang.Long id) throws java.io.IOException { GetRecommendation result = new GetRecommendation(id); initialize(result); return result; } public class GetRecommendation extends RecommendationendpointRequest<ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation> { private static final String REST_PATH = "recommendation/{id}"; /** * Create a request for the method "getRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After * setting any optional parameters, call the {@link GetRecommendation#execute()} method to invoke * the remote operation. <p> {@link GetRecommendation#initialize(com.google.api.client.googleapis. * services.AbstractGoogleClientRequest)} must be called to initialize this instance immediately * after invoking the constructor. </p> * * @param id * @since 1.13 */ protected GetRecommendation(java.lang.Long id) { super(Recommendationendpoint.this, "GET", REST_PATH, null, ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation.class); this.id = com.google.api.client.util.Preconditions.checkNotNull(id, "Required parameter id must be specified."); } @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 GetRecommendation setAlt(java.lang.String alt) { return (GetRecommendation) super.setAlt(alt); } @Override public GetRecommendation setFields(java.lang.String fields) { return (GetRecommendation) super.setFields(fields); } @Override public GetRecommendation setKey(java.lang.String key) { return (GetRecommendation) super.setKey(key); } @Override public GetRecommendation setOauthToken(java.lang.String oauthToken) { return (GetRecommendation) super.setOauthToken(oauthToken); } @Override public GetRecommendation setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetRecommendation) super.setPrettyPrint(prettyPrint); } @Override public GetRecommendation setQuotaUser(java.lang.String quotaUser) { return (GetRecommendation) super.setQuotaUser(quotaUser); } @Override public GetRecommendation setUserIp(java.lang.String userIp) { return (GetRecommendation) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.Long id; /** */ public java.lang.Long getId() { return id; } public GetRecommendation setId(java.lang.Long id) { this.id = id; return this; } @Override public GetRecommendation set(String parameterName, Object value) { return (GetRecommendation) super.set(parameterName, value); } } /** * Create a request for the method "insertRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After setting * any optional parameters, call the {@link InsertRecommendation#execute()} method to invoke the * remote operation. * * @param content the {@link ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation} * @return the request */ public InsertRecommendation insertRecommendation(ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation content) throws java.io.IOException { InsertRecommendation result = new InsertRecommendation(content); initialize(result); return result; } public class InsertRecommendation extends RecommendationendpointRequest<ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation> { private static final String REST_PATH = "recommendation"; /** * Create a request for the method "insertRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After * setting any optional parameters, call the {@link InsertRecommendation#execute()} method to * invoke the remote operation. <p> {@link InsertRecommendation#initialize(com.google.api.client.g * oogleapis.services.AbstractGoogleClientRequest)} must be called to initialize this instance * immediately after invoking the constructor. </p> * * @param content the {@link ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation} * @since 1.13 */ protected InsertRecommendation(ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation content) { super(Recommendationendpoint.this, "POST", REST_PATH, content, ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation.class); } @Override public InsertRecommendation setAlt(java.lang.String alt) { return (InsertRecommendation) super.setAlt(alt); } @Override public InsertRecommendation setFields(java.lang.String fields) { return (InsertRecommendation) super.setFields(fields); } @Override public InsertRecommendation setKey(java.lang.String key) { return (InsertRecommendation) super.setKey(key); } @Override public InsertRecommendation setOauthToken(java.lang.String oauthToken) { return (InsertRecommendation) super.setOauthToken(oauthToken); } @Override public InsertRecommendation setPrettyPrint(java.lang.Boolean prettyPrint) { return (InsertRecommendation) super.setPrettyPrint(prettyPrint); } @Override public InsertRecommendation setQuotaUser(java.lang.String quotaUser) { return (InsertRecommendation) super.setQuotaUser(quotaUser); } @Override public InsertRecommendation setUserIp(java.lang.String userIp) { return (InsertRecommendation) super.setUserIp(userIp); } @Override public InsertRecommendation set(String parameterName, Object value) { return (InsertRecommendation) super.set(parameterName, value); } } /** * Create a request for the method "listRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After setting * any optional parameters, call the {@link ListRecommendation#execute()} method to invoke the * remote operation. * * @return the request */ public ListRecommendation listRecommendation() throws java.io.IOException { ListRecommendation result = new ListRecommendation(); initialize(result); return result; } public class ListRecommendation extends RecommendationendpointRequest<ch.yereaztian.mobileassistant.recommendationendpoint.model.CollectionResponseRecommendation> { private static final String REST_PATH = "recommendation"; /** * Create a request for the method "listRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After * setting any optional parameters, call the {@link ListRecommendation#execute()} method to invoke * the remote operation. <p> {@link ListRecommendation#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 ListRecommendation() { super(Recommendationendpoint.this, "GET", REST_PATH, null, ch.yereaztian.mobileassistant.recommendationendpoint.model.CollectionResponseRecommendation.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 ListRecommendation setAlt(java.lang.String alt) { return (ListRecommendation) super.setAlt(alt); } @Override public ListRecommendation setFields(java.lang.String fields) { return (ListRecommendation) super.setFields(fields); } @Override public ListRecommendation setKey(java.lang.String key) { return (ListRecommendation) super.setKey(key); } @Override public ListRecommendation setOauthToken(java.lang.String oauthToken) { return (ListRecommendation) super.setOauthToken(oauthToken); } @Override public ListRecommendation setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListRecommendation) super.setPrettyPrint(prettyPrint); } @Override public ListRecommendation setQuotaUser(java.lang.String quotaUser) { return (ListRecommendation) super.setQuotaUser(quotaUser); } @Override public ListRecommendation setUserIp(java.lang.String userIp) { return (ListRecommendation) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.String cursor; /** */ public java.lang.String getCursor() { return cursor; } public ListRecommendation setCursor(java.lang.String cursor) { this.cursor = cursor; return this; } @com.google.api.client.util.Key private java.lang.Integer limit; /** */ public java.lang.Integer getLimit() { return limit; } public ListRecommendation setLimit(java.lang.Integer limit) { this.limit = limit; return this; } @Override public ListRecommendation set(String parameterName, Object value) { return (ListRecommendation) super.set(parameterName, value); } } /** * Create a request for the method "removeRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After setting * any optional parameters, call the {@link RemoveRecommendation#execute()} method to invoke the * remote operation. * * @param id * @return the request */ public RemoveRecommendation removeRecommendation(java.lang.Long id) throws java.io.IOException { RemoveRecommendation result = new RemoveRecommendation(id); initialize(result); return result; } public class RemoveRecommendation extends RecommendationendpointRequest<Void> { private static final String REST_PATH = "recommendation/{id}"; /** * Create a request for the method "removeRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After * setting any optional parameters, call the {@link RemoveRecommendation#execute()} method to * invoke the remote operation. <p> {@link RemoveRecommendation#initialize(com.google.api.client.g * oogleapis.services.AbstractGoogleClientRequest)} must be called to initialize this instance * immediately after invoking the constructor. </p> * * @param id * @since 1.13 */ protected RemoveRecommendation(java.lang.Long id) { super(Recommendationendpoint.this, "DELETE", REST_PATH, null, Void.class); this.id = com.google.api.client.util.Preconditions.checkNotNull(id, "Required parameter id must be specified."); } @Override public RemoveRecommendation setAlt(java.lang.String alt) { return (RemoveRecommendation) super.setAlt(alt); } @Override public RemoveRecommendation setFields(java.lang.String fields) { return (RemoveRecommendation) super.setFields(fields); } @Override public RemoveRecommendation setKey(java.lang.String key) { return (RemoveRecommendation) super.setKey(key); } @Override public RemoveRecommendation setOauthToken(java.lang.String oauthToken) { return (RemoveRecommendation) super.setOauthToken(oauthToken); } @Override public RemoveRecommendation setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveRecommendation) super.setPrettyPrint(prettyPrint); } @Override public RemoveRecommendation setQuotaUser(java.lang.String quotaUser) { return (RemoveRecommendation) super.setQuotaUser(quotaUser); } @Override public RemoveRecommendation setUserIp(java.lang.String userIp) { return (RemoveRecommendation) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.Long id; /** */ public java.lang.Long getId() { return id; } public RemoveRecommendation setId(java.lang.Long id) { this.id = id; return this; } @Override public RemoveRecommendation set(String parameterName, Object value) { return (RemoveRecommendation) super.set(parameterName, value); } } /** * Create a request for the method "updateRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After setting * any optional parameters, call the {@link UpdateRecommendation#execute()} method to invoke the * remote operation. * * @param content the {@link ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation} * @return the request */ public UpdateRecommendation updateRecommendation(ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation content) throws java.io.IOException { UpdateRecommendation result = new UpdateRecommendation(content); initialize(result); return result; } public class UpdateRecommendation extends RecommendationendpointRequest<ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation> { private static final String REST_PATH = "recommendation"; /** * Create a request for the method "updateRecommendation". * * This request holds the parameters needed by the the recommendationendpoint server. After * setting any optional parameters, call the {@link UpdateRecommendation#execute()} method to * invoke the remote operation. <p> {@link UpdateRecommendation#initialize(com.google.api.client.g * oogleapis.services.AbstractGoogleClientRequest)} must be called to initialize this instance * immediately after invoking the constructor. </p> * * @param content the {@link ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation} * @since 1.13 */ protected UpdateRecommendation(ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation content) { super(Recommendationendpoint.this, "PUT", REST_PATH, content, ch.yereaztian.mobileassistant.recommendationendpoint.model.Recommendation.class); } @Override public UpdateRecommendation setAlt(java.lang.String alt) { return (UpdateRecommendation) super.setAlt(alt); } @Override public UpdateRecommendation setFields(java.lang.String fields) { return (UpdateRecommendation) super.setFields(fields); } @Override public UpdateRecommendation setKey(java.lang.String key) { return (UpdateRecommendation) super.setKey(key); } @Override public UpdateRecommendation setOauthToken(java.lang.String oauthToken) { return (UpdateRecommendation) super.setOauthToken(oauthToken); } @Override public UpdateRecommendation setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdateRecommendation) super.setPrettyPrint(prettyPrint); } @Override public UpdateRecommendation setQuotaUser(java.lang.String quotaUser) { return (UpdateRecommendation) super.setQuotaUser(quotaUser); } @Override public UpdateRecommendation setUserIp(java.lang.String userIp) { return (UpdateRecommendation) super.setUserIp(userIp); } @Override public UpdateRecommendation set(String parameterName, Object value) { return (UpdateRecommendation) super.set(parameterName, value); } } /** * Builder for {@link Recommendationendpoint}. * * <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 Recommendationendpoint}. */ @Override public Recommendationendpoint build() { return new Recommendationendpoint(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 RecommendationendpointRequestInitializer}. * * @since 1.12 */ public Builder setRecommendationendpointRequestInitializer( RecommendationendpointRequestInitializer recommendationendpointRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(recommendationendpointRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } } }