/* * 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-07-31 at 20:50:19 UTC * Modify at your own risk. */ package it.fdev.unisaconnect.model.bustrattaendpoint; /** * Service definition for Bustrattaendpoint (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 BustrattaendpointRequestInitializer} to initialize global parameters via its * {@link Builder}. * </p> * * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Bustrattaendpoint 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.18.0-rc of the bustrattaendpoint 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://unisaconnectbus.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 = "bustrattaendpoint/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 Bustrattaendpoint(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 */ Bustrattaendpoint(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 "getBusTratta". * * This request holds the parameters needed by the bustrattaendpoint server. After setting any * optional parameters, call the {@link GetBusTratta#execute()} method to invoke the remote * operation. * * @param id * @return the request */ public GetBusTratta getBusTratta(java.lang.Long id) throws java.io.IOException { GetBusTratta result = new GetBusTratta(id); initialize(result); return result; } public class GetBusTratta extends BustrattaendpointRequest<it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta> { private static final String REST_PATH = "bustratta/{id}"; /** * Create a request for the method "getBusTratta". * * This request holds the parameters needed by the the bustrattaendpoint server. After setting * any optional parameters, call the {@link GetBusTratta#execute()} method to invoke the remote * operation. <p> {@link * GetBusTratta#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 GetBusTratta(java.lang.Long id) { super(Bustrattaendpoint.this, "GET", REST_PATH, null, it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta.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 GetBusTratta setAlt(java.lang.String alt) { return (GetBusTratta) super.setAlt(alt); } @Override public GetBusTratta setFields(java.lang.String fields) { return (GetBusTratta) super.setFields(fields); } @Override public GetBusTratta setKey(java.lang.String key) { return (GetBusTratta) super.setKey(key); } @Override public GetBusTratta setOauthToken(java.lang.String oauthToken) { return (GetBusTratta) super.setOauthToken(oauthToken); } @Override public GetBusTratta setPrettyPrint(java.lang.Boolean prettyPrint) { return (GetBusTratta) super.setPrettyPrint(prettyPrint); } @Override public GetBusTratta setQuotaUser(java.lang.String quotaUser) { return (GetBusTratta) super.setQuotaUser(quotaUser); } @Override public GetBusTratta setUserIp(java.lang.String userIp) { return (GetBusTratta) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.Long id; /** */ public java.lang.Long getId() { return id; } public GetBusTratta setId(java.lang.Long id) { this.id = id; return this; } @Override public GetBusTratta set(String parameterName, Object value) { return (GetBusTratta) super.set(parameterName, value); } } /** * Create a request for the method "insertBusTratta". * * This request holds the parameters needed by the bustrattaendpoint server. After setting any * optional parameters, call the {@link InsertBusTratta#execute()} method to invoke the remote * operation. * * @param content the {@link it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta} * @return the request */ public InsertBusTratta insertBusTratta(it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta content) throws java.io.IOException { InsertBusTratta result = new InsertBusTratta(content); initialize(result); return result; } public class InsertBusTratta extends BustrattaendpointRequest<it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta> { private static final String REST_PATH = "bustratta"; /** * Create a request for the method "insertBusTratta". * * This request holds the parameters needed by the the bustrattaendpoint server. After setting * any optional parameters, call the {@link InsertBusTratta#execute()} method to invoke the remote * operation. <p> {@link InsertBusTratta#initialize(com.google.api.client.googleapis.services.Abst * ractGoogleClientRequest)} must be called to initialize this instance immediately after invoking * the constructor. </p> * * @param content the {@link it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta} * @since 1.13 */ protected InsertBusTratta(it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta content) { super(Bustrattaendpoint.this, "POST", REST_PATH, content, it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta.class); } @Override public InsertBusTratta setAlt(java.lang.String alt) { return (InsertBusTratta) super.setAlt(alt); } @Override public InsertBusTratta setFields(java.lang.String fields) { return (InsertBusTratta) super.setFields(fields); } @Override public InsertBusTratta setKey(java.lang.String key) { return (InsertBusTratta) super.setKey(key); } @Override public InsertBusTratta setOauthToken(java.lang.String oauthToken) { return (InsertBusTratta) super.setOauthToken(oauthToken); } @Override public InsertBusTratta setPrettyPrint(java.lang.Boolean prettyPrint) { return (InsertBusTratta) super.setPrettyPrint(prettyPrint); } @Override public InsertBusTratta setQuotaUser(java.lang.String quotaUser) { return (InsertBusTratta) super.setQuotaUser(quotaUser); } @Override public InsertBusTratta setUserIp(java.lang.String userIp) { return (InsertBusTratta) super.setUserIp(userIp); } @Override public InsertBusTratta set(String parameterName, Object value) { return (InsertBusTratta) super.set(parameterName, value); } } /** * Create a request for the method "listBusTratta". * * This request holds the parameters needed by the bustrattaendpoint server. After setting any * optional parameters, call the {@link ListBusTratta#execute()} method to invoke the remote * operation. * * @return the request */ public ListBusTratta listBusTratta() throws java.io.IOException { ListBusTratta result = new ListBusTratta(); initialize(result); return result; } public class ListBusTratta extends BustrattaendpointRequest<it.fdev.unisaconnect.model.bustrattaendpoint.model.CollectionResponseBusTratta> { private static final String REST_PATH = "bustratta"; /** * Create a request for the method "listBusTratta". * * This request holds the parameters needed by the the bustrattaendpoint server. After setting * any optional parameters, call the {@link ListBusTratta#execute()} method to invoke the remote * operation. <p> {@link ListBusTratta#initialize(com.google.api.client.googleapis.services.Abstra * ctGoogleClientRequest)} must be called to initialize this instance immediately after invoking * the constructor. </p> * * @since 1.13 */ protected ListBusTratta() { super(Bustrattaendpoint.this, "GET", REST_PATH, null, it.fdev.unisaconnect.model.bustrattaendpoint.model.CollectionResponseBusTratta.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 ListBusTratta setAlt(java.lang.String alt) { return (ListBusTratta) super.setAlt(alt); } @Override public ListBusTratta setFields(java.lang.String fields) { return (ListBusTratta) super.setFields(fields); } @Override public ListBusTratta setKey(java.lang.String key) { return (ListBusTratta) super.setKey(key); } @Override public ListBusTratta setOauthToken(java.lang.String oauthToken) { return (ListBusTratta) super.setOauthToken(oauthToken); } @Override public ListBusTratta setPrettyPrint(java.lang.Boolean prettyPrint) { return (ListBusTratta) super.setPrettyPrint(prettyPrint); } @Override public ListBusTratta setQuotaUser(java.lang.String quotaUser) { return (ListBusTratta) super.setQuotaUser(quotaUser); } @Override public ListBusTratta setUserIp(java.lang.String userIp) { return (ListBusTratta) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.String cursor; /** */ public java.lang.String getCursor() { return cursor; } public ListBusTratta 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 ListBusTratta setLimit(java.lang.Integer limit) { this.limit = limit; return this; } @Override public ListBusTratta set(String parameterName, Object value) { return (ListBusTratta) super.set(parameterName, value); } } /** * Create a request for the method "removeBusTratta". * * This request holds the parameters needed by the bustrattaendpoint server. After setting any * optional parameters, call the {@link RemoveBusTratta#execute()} method to invoke the remote * operation. * * @param id * @return the request */ public RemoveBusTratta removeBusTratta(java.lang.Long id) throws java.io.IOException { RemoveBusTratta result = new RemoveBusTratta(id); initialize(result); return result; } public class RemoveBusTratta extends BustrattaendpointRequest<Void> { private static final String REST_PATH = "bustratta/{id}"; /** * Create a request for the method "removeBusTratta". * * This request holds the parameters needed by the the bustrattaendpoint server. After setting * any optional parameters, call the {@link RemoveBusTratta#execute()} method to invoke the remote * operation. <p> {@link RemoveBusTratta#initialize(com.google.api.client.googleapis.services.Abst * ractGoogleClientRequest)} must be called to initialize this instance immediately after invoking * the constructor. </p> * * @param id * @since 1.13 */ protected RemoveBusTratta(java.lang.Long id) { super(Bustrattaendpoint.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 RemoveBusTratta setAlt(java.lang.String alt) { return (RemoveBusTratta) super.setAlt(alt); } @Override public RemoveBusTratta setFields(java.lang.String fields) { return (RemoveBusTratta) super.setFields(fields); } @Override public RemoveBusTratta setKey(java.lang.String key) { return (RemoveBusTratta) super.setKey(key); } @Override public RemoveBusTratta setOauthToken(java.lang.String oauthToken) { return (RemoveBusTratta) super.setOauthToken(oauthToken); } @Override public RemoveBusTratta setPrettyPrint(java.lang.Boolean prettyPrint) { return (RemoveBusTratta) super.setPrettyPrint(prettyPrint); } @Override public RemoveBusTratta setQuotaUser(java.lang.String quotaUser) { return (RemoveBusTratta) super.setQuotaUser(quotaUser); } @Override public RemoveBusTratta setUserIp(java.lang.String userIp) { return (RemoveBusTratta) super.setUserIp(userIp); } @com.google.api.client.util.Key private java.lang.Long id; /** */ public java.lang.Long getId() { return id; } public RemoveBusTratta setId(java.lang.Long id) { this.id = id; return this; } @Override public RemoveBusTratta set(String parameterName, Object value) { return (RemoveBusTratta) super.set(parameterName, value); } } /** * Create a request for the method "updateBusTratta". * * This request holds the parameters needed by the bustrattaendpoint server. After setting any * optional parameters, call the {@link UpdateBusTratta#execute()} method to invoke the remote * operation. * * @param content the {@link it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta} * @return the request */ public UpdateBusTratta updateBusTratta(it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta content) throws java.io.IOException { UpdateBusTratta result = new UpdateBusTratta(content); initialize(result); return result; } public class UpdateBusTratta extends BustrattaendpointRequest<it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta> { private static final String REST_PATH = "bustratta"; /** * Create a request for the method "updateBusTratta". * * This request holds the parameters needed by the the bustrattaendpoint server. After setting * any optional parameters, call the {@link UpdateBusTratta#execute()} method to invoke the remote * operation. <p> {@link UpdateBusTratta#initialize(com.google.api.client.googleapis.services.Abst * ractGoogleClientRequest)} must be called to initialize this instance immediately after invoking * the constructor. </p> * * @param content the {@link it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta} * @since 1.13 */ protected UpdateBusTratta(it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta content) { super(Bustrattaendpoint.this, "PUT", REST_PATH, content, it.fdev.unisaconnect.model.bustrattaendpoint.model.BusTratta.class); } @Override public UpdateBusTratta setAlt(java.lang.String alt) { return (UpdateBusTratta) super.setAlt(alt); } @Override public UpdateBusTratta setFields(java.lang.String fields) { return (UpdateBusTratta) super.setFields(fields); } @Override public UpdateBusTratta setKey(java.lang.String key) { return (UpdateBusTratta) super.setKey(key); } @Override public UpdateBusTratta setOauthToken(java.lang.String oauthToken) { return (UpdateBusTratta) super.setOauthToken(oauthToken); } @Override public UpdateBusTratta setPrettyPrint(java.lang.Boolean prettyPrint) { return (UpdateBusTratta) super.setPrettyPrint(prettyPrint); } @Override public UpdateBusTratta setQuotaUser(java.lang.String quotaUser) { return (UpdateBusTratta) super.setQuotaUser(quotaUser); } @Override public UpdateBusTratta setUserIp(java.lang.String userIp) { return (UpdateBusTratta) super.setUserIp(userIp); } @Override public UpdateBusTratta set(String parameterName, Object value) { return (UpdateBusTratta) super.set(parameterName, value); } } /** * Builder for {@link Bustrattaendpoint}. * * <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 Bustrattaendpoint}. */ @Override public Bustrattaendpoint build() { return new Bustrattaendpoint(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 BustrattaendpointRequestInitializer}. * * @since 1.12 */ public Builder setBustrattaendpointRequestInitializer( BustrattaendpointRequestInitializer bustrattaendpointRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(bustrattaendpointRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } } }