All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.prediction.Prediction Maven / Gradle / Ivy

There is a newer version: v1.6-rev67-1.23.0
Show newest version
/*
 * Copyright 2010 Google Inc.
 *
 * 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: 2013-12-19 23:55:21 UTC)
 * on 2014-01-07 at 21:42:56 UTC 
 * Modify at your own risk.
 */

package com.google.api.services.prediction;

/**
 * Service definition for Prediction (v1.5).
 *
 * 

* Lets you access a cloud hosted machine learning service that makes it easy to build smart apps *

* *

* For more information about this service, see the * API Documentation *

* *

* This service uses {@link PredictionRequestInitializer} to initialize global parameters via its * {@link Builder}. *

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Prediction 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 == 14, "You are currently running with version %s of google-api-client. " + "You need version 1.14 of google-api-client to run version " + "1.14.2-beta of the Prediction API 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://www.googleapis.com/"; /** * 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 = "prediction/v1.5/"; /** * 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. * *

* 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 Prediction(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 */ Prediction(Builder builder) { super(builder); } @Override protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest httpClientRequest) throws java.io.IOException { super.initialize(httpClientRequest); } /** * An accessor for creating requests from the Hostedmodels collection. * *

The typical use is:

*
   *   {@code Prediction prediction = new Prediction(...);}
   *   {@code Prediction.Hostedmodels.List request = prediction.hostedmodels().list(parameters ...)}
   * 
* * @return the resource collection */ public Hostedmodels hostedmodels() { return new Hostedmodels(); } /** * The "hostedmodels" collection of methods. */ public class Hostedmodels { /** * Submit input and request an output against a hosted model. * * Create a request for the method "hostedmodels.predict". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Predict#execute()} method to invoke the remote operation. * * @param hostedModelName The name of a hosted model. * @param content the {@link com.google.api.services.prediction.model.Input} * @return the request */ public Predict predict(java.lang.String hostedModelName, com.google.api.services.prediction.model.Input content) throws java.io.IOException { Predict result = new Predict(hostedModelName, content); initialize(result); return result; } public class Predict extends PredictionRequest { private static final String REST_PATH = "hostedmodels/{hostedModelName}/predict"; /** * Submit input and request an output against a hosted model. * * Create a request for the method "hostedmodels.predict". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Predict#execute()} method to invoke the remote operation. *

{@link * Predict#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param hostedModelName The name of a hosted model. * @param content the {@link com.google.api.services.prediction.model.Input} * @since 1.13 */ protected Predict(java.lang.String hostedModelName, com.google.api.services.prediction.model.Input content) { super(Prediction.this, "POST", REST_PATH, content, com.google.api.services.prediction.model.Output.class); this.hostedModelName = com.google.api.client.util.Preconditions.checkNotNull(hostedModelName, "Required parameter hostedModelName must be specified."); } @Override public Predict setAlt(java.lang.String alt) { return (Predict) super.setAlt(alt); } @Override public Predict setFields(java.lang.String fields) { return (Predict) super.setFields(fields); } @Override public Predict setKey(java.lang.String key) { return (Predict) super.setKey(key); } @Override public Predict setOauthToken(java.lang.String oauthToken) { return (Predict) super.setOauthToken(oauthToken); } @Override public Predict setPrettyPrint(java.lang.Boolean prettyPrint) { return (Predict) super.setPrettyPrint(prettyPrint); } @Override public Predict setQuotaUser(java.lang.String quotaUser) { return (Predict) super.setQuotaUser(quotaUser); } @Override public Predict setUserIp(java.lang.String userIp) { return (Predict) super.setUserIp(userIp); } /** The name of a hosted model. */ @com.google.api.client.util.Key private java.lang.String hostedModelName; /** The name of a hosted model. */ public java.lang.String getHostedModelName() { return hostedModelName; } /** The name of a hosted model. */ public Predict setHostedModelName(java.lang.String hostedModelName) { this.hostedModelName = hostedModelName; return this; } @Override public Predict set(String parameterName, Object value) { return (Predict) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Trainedmodels collection. * *

The typical use is:

*
   *   {@code Prediction prediction = new Prediction(...);}
   *   {@code Prediction.Trainedmodels.List request = prediction.trainedmodels().list(parameters ...)}
   * 
* * @return the resource collection */ public Trainedmodels trainedmodels() { return new Trainedmodels(); } /** * The "trainedmodels" collection of methods. */ public class Trainedmodels { /** * Get analysis of the model and the data the model was trained on. * * Create a request for the method "trainedmodels.analyze". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Analyze#execute()} method to invoke the remote operation. * * @param id The unique name for the predictive model. * @return the request */ public Analyze analyze(java.lang.String id) throws java.io.IOException { Analyze result = new Analyze(id); initialize(result); return result; } public class Analyze extends PredictionRequest { private static final String REST_PATH = "trainedmodels/{id}/analyze"; /** * Get analysis of the model and the data the model was trained on. * * Create a request for the method "trainedmodels.analyze". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Analyze#execute()} method to invoke the remote operation. *

{@link * Analyze#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param id The unique name for the predictive model. * @since 1.13 */ protected Analyze(java.lang.String id) { super(Prediction.this, "GET", REST_PATH, null, com.google.api.services.prediction.model.Analyze.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 Analyze setAlt(java.lang.String alt) { return (Analyze) super.setAlt(alt); } @Override public Analyze setFields(java.lang.String fields) { return (Analyze) super.setFields(fields); } @Override public Analyze setKey(java.lang.String key) { return (Analyze) super.setKey(key); } @Override public Analyze setOauthToken(java.lang.String oauthToken) { return (Analyze) super.setOauthToken(oauthToken); } @Override public Analyze setPrettyPrint(java.lang.Boolean prettyPrint) { return (Analyze) super.setPrettyPrint(prettyPrint); } @Override public Analyze setQuotaUser(java.lang.String quotaUser) { return (Analyze) super.setQuotaUser(quotaUser); } @Override public Analyze setUserIp(java.lang.String userIp) { return (Analyze) super.setUserIp(userIp); } /** The unique name for the predictive model. */ @com.google.api.client.util.Key private java.lang.String id; /** The unique name for the predictive model. */ public java.lang.String getId() { return id; } /** The unique name for the predictive model. */ public Analyze setId(java.lang.String id) { this.id = id; return this; } @Override public Analyze set(String parameterName, Object value) { return (Analyze) super.set(parameterName, value); } } /** * Delete a trained model. * * Create a request for the method "trainedmodels.delete". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param id The unique name for the predictive model. * @return the request */ public Delete delete(java.lang.String id) throws java.io.IOException { Delete result = new Delete(id); initialize(result); return result; } public class Delete extends PredictionRequest { private static final String REST_PATH = "trainedmodels/{id}"; /** * Delete a trained model. * * Create a request for the method "trainedmodels.delete". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation. *

{@link * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param id The unique name for the predictive model. * @since 1.13 */ protected Delete(java.lang.String id) { super(Prediction.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 Delete setAlt(java.lang.String alt) { return (Delete) super.setAlt(alt); } @Override public Delete setFields(java.lang.String fields) { return (Delete) super.setFields(fields); } @Override public Delete setKey(java.lang.String key) { return (Delete) super.setKey(key); } @Override public Delete setOauthToken(java.lang.String oauthToken) { return (Delete) super.setOauthToken(oauthToken); } @Override public Delete setPrettyPrint(java.lang.Boolean prettyPrint) { return (Delete) super.setPrettyPrint(prettyPrint); } @Override public Delete setQuotaUser(java.lang.String quotaUser) { return (Delete) super.setQuotaUser(quotaUser); } @Override public Delete setUserIp(java.lang.String userIp) { return (Delete) super.setUserIp(userIp); } /** The unique name for the predictive model. */ @com.google.api.client.util.Key private java.lang.String id; /** The unique name for the predictive model. */ public java.lang.String getId() { return id; } /** The unique name for the predictive model. */ public Delete setId(java.lang.String id) { this.id = id; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Check training status of your model. * * Create a request for the method "trainedmodels.get". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param id The unique name for the predictive model. * @return the request */ public Get get(java.lang.String id) throws java.io.IOException { Get result = new Get(id); initialize(result); return result; } public class Get extends PredictionRequest { private static final String REST_PATH = "trainedmodels/{id}"; /** * Check training status of your model. * * Create a request for the method "trainedmodels.get". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

* {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} * must be called to initialize this instance immediately after invoking the constructor.

* * @param id The unique name for the predictive model. * @since 1.13 */ protected Get(java.lang.String id) { super(Prediction.this, "GET", REST_PATH, null, com.google.api.services.prediction.model.Training.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 Get setAlt(java.lang.String alt) { return (Get) super.setAlt(alt); } @Override public Get setFields(java.lang.String fields) { return (Get) super.setFields(fields); } @Override public Get setKey(java.lang.String key) { return (Get) super.setKey(key); } @Override public Get setOauthToken(java.lang.String oauthToken) { return (Get) super.setOauthToken(oauthToken); } @Override public Get setPrettyPrint(java.lang.Boolean prettyPrint) { return (Get) super.setPrettyPrint(prettyPrint); } @Override public Get setQuotaUser(java.lang.String quotaUser) { return (Get) super.setQuotaUser(quotaUser); } @Override public Get setUserIp(java.lang.String userIp) { return (Get) super.setUserIp(userIp); } /** The unique name for the predictive model. */ @com.google.api.client.util.Key private java.lang.String id; /** The unique name for the predictive model. */ public java.lang.String getId() { return id; } /** The unique name for the predictive model. */ public Get setId(java.lang.String id) { this.id = id; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Begin training your model. * * Create a request for the method "trainedmodels.insert". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Insert#execute()} method to invoke the remote operation. * * @param content the {@link com.google.api.services.prediction.model.Training} * @return the request */ public Insert insert(com.google.api.services.prediction.model.Training content) throws java.io.IOException { Insert result = new Insert(content); initialize(result); return result; } public class Insert extends PredictionRequest { private static final String REST_PATH = "trainedmodels"; /** * Begin training your model. * * Create a request for the method "trainedmodels.insert". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Insert#execute()} method to invoke the remote operation. *

{@link * Insert#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param content the {@link com.google.api.services.prediction.model.Training} * @since 1.13 */ protected Insert(com.google.api.services.prediction.model.Training content) { super(Prediction.this, "POST", REST_PATH, content, com.google.api.services.prediction.model.Training.class); } @Override public Insert setAlt(java.lang.String alt) { return (Insert) super.setAlt(alt); } @Override public Insert setFields(java.lang.String fields) { return (Insert) super.setFields(fields); } @Override public Insert setKey(java.lang.String key) { return (Insert) super.setKey(key); } @Override public Insert setOauthToken(java.lang.String oauthToken) { return (Insert) super.setOauthToken(oauthToken); } @Override public Insert setPrettyPrint(java.lang.Boolean prettyPrint) { return (Insert) super.setPrettyPrint(prettyPrint); } @Override public Insert setQuotaUser(java.lang.String quotaUser) { return (Insert) super.setQuotaUser(quotaUser); } @Override public Insert setUserIp(java.lang.String userIp) { return (Insert) super.setUserIp(userIp); } @Override public Insert set(String parameterName, Object value) { return (Insert) super.set(parameterName, value); } } /** * List available models. * * Create a request for the method "trainedmodels.list". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link List#execute()} method to invoke the remote operation. * * @return the request */ public List list() throws java.io.IOException { List result = new List(); initialize(result); return result; } public class List extends PredictionRequest { private static final String REST_PATH = "trainedmodels/list"; /** * List available models. * * Create a request for the method "trainedmodels.list". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} * must be called to initialize this instance immediately after invoking the constructor.

* * @since 1.13 */ protected List() { super(Prediction.this, "GET", REST_PATH, null, com.google.api.services.prediction.model.List.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 List setAlt(java.lang.String alt) { return (List) super.setAlt(alt); } @Override public List setFields(java.lang.String fields) { return (List) super.setFields(fields); } @Override public List setKey(java.lang.String key) { return (List) super.setKey(key); } @Override public List setOauthToken(java.lang.String oauthToken) { return (List) super.setOauthToken(oauthToken); } @Override public List setPrettyPrint(java.lang.Boolean prettyPrint) { return (List) super.setPrettyPrint(prettyPrint); } @Override public List setQuotaUser(java.lang.String quotaUser) { return (List) super.setQuotaUser(quotaUser); } @Override public List setUserIp(java.lang.String userIp) { return (List) super.setUserIp(userIp); } /** Pagination token */ @com.google.api.client.util.Key private java.lang.String pageToken; /** Pagination token */ public java.lang.String getPageToken() { return pageToken; } /** Pagination token */ public List setPageToken(java.lang.String pageToken) { this.pageToken = pageToken; return this; } /** Maximum number of results to return */ @com.google.api.client.util.Key private java.lang.Long maxResults; /** Maximum number of results to return [minimum: 0] */ public java.lang.Long getMaxResults() { return maxResults; } /** Maximum number of results to return */ public List setMaxResults(java.lang.Long maxResults) { this.maxResults = maxResults; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Submit model id and request a prediction. * * Create a request for the method "trainedmodels.predict". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Predict#execute()} method to invoke the remote operation. * * @param id The unique name for the predictive model. * @param content the {@link com.google.api.services.prediction.model.Input} * @return the request */ public Predict predict(java.lang.String id, com.google.api.services.prediction.model.Input content) throws java.io.IOException { Predict result = new Predict(id, content); initialize(result); return result; } public class Predict extends PredictionRequest { private static final String REST_PATH = "trainedmodels/{id}/predict"; /** * Submit model id and request a prediction. * * Create a request for the method "trainedmodels.predict". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Predict#execute()} method to invoke the remote operation. *

{@link * Predict#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param id The unique name for the predictive model. * @param content the {@link com.google.api.services.prediction.model.Input} * @since 1.13 */ protected Predict(java.lang.String id, com.google.api.services.prediction.model.Input content) { super(Prediction.this, "POST", REST_PATH, content, com.google.api.services.prediction.model.Output.class); this.id = com.google.api.client.util.Preconditions.checkNotNull(id, "Required parameter id must be specified."); } @Override public Predict setAlt(java.lang.String alt) { return (Predict) super.setAlt(alt); } @Override public Predict setFields(java.lang.String fields) { return (Predict) super.setFields(fields); } @Override public Predict setKey(java.lang.String key) { return (Predict) super.setKey(key); } @Override public Predict setOauthToken(java.lang.String oauthToken) { return (Predict) super.setOauthToken(oauthToken); } @Override public Predict setPrettyPrint(java.lang.Boolean prettyPrint) { return (Predict) super.setPrettyPrint(prettyPrint); } @Override public Predict setQuotaUser(java.lang.String quotaUser) { return (Predict) super.setQuotaUser(quotaUser); } @Override public Predict setUserIp(java.lang.String userIp) { return (Predict) super.setUserIp(userIp); } /** The unique name for the predictive model. */ @com.google.api.client.util.Key private java.lang.String id; /** The unique name for the predictive model. */ public java.lang.String getId() { return id; } /** The unique name for the predictive model. */ public Predict setId(java.lang.String id) { this.id = id; return this; } @Override public Predict set(String parameterName, Object value) { return (Predict) super.set(parameterName, value); } } /** * Add new data to a trained model. * * Create a request for the method "trainedmodels.update". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Update#execute()} method to invoke the remote operation. * * @param id The unique name for the predictive model. * @param content the {@link com.google.api.services.prediction.model.Update} * @return the request */ public Update update(java.lang.String id, com.google.api.services.prediction.model.Update content) throws java.io.IOException { Update result = new Update(id, content); initialize(result); return result; } public class Update extends PredictionRequest { private static final String REST_PATH = "trainedmodels/{id}"; /** * Add new data to a trained model. * * Create a request for the method "trainedmodels.update". * * This request holds the parameters needed by the the prediction server. After setting any * optional parameters, call the {@link Update#execute()} method to invoke the remote operation. *

{@link * Update#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must * be called to initialize this instance immediately after invoking the constructor.

* * @param id The unique name for the predictive model. * @param content the {@link com.google.api.services.prediction.model.Update} * @since 1.13 */ protected Update(java.lang.String id, com.google.api.services.prediction.model.Update content) { super(Prediction.this, "PUT", REST_PATH, content, com.google.api.services.prediction.model.Training.class); this.id = com.google.api.client.util.Preconditions.checkNotNull(id, "Required parameter id must be specified."); } @Override public Update setAlt(java.lang.String alt) { return (Update) super.setAlt(alt); } @Override public Update setFields(java.lang.String fields) { return (Update) super.setFields(fields); } @Override public Update setKey(java.lang.String key) { return (Update) super.setKey(key); } @Override public Update setOauthToken(java.lang.String oauthToken) { return (Update) super.setOauthToken(oauthToken); } @Override public Update setPrettyPrint(java.lang.Boolean prettyPrint) { return (Update) super.setPrettyPrint(prettyPrint); } @Override public Update setQuotaUser(java.lang.String quotaUser) { return (Update) super.setQuotaUser(quotaUser); } @Override public Update setUserIp(java.lang.String userIp) { return (Update) super.setUserIp(userIp); } /** The unique name for the predictive model. */ @com.google.api.client.util.Key private java.lang.String id; /** The unique name for the predictive model. */ public java.lang.String getId() { return id; } /** The unique name for the predictive model. */ public Update setId(java.lang.String id) { this.id = id; return this; } @Override public Update set(String parameterName, Object value) { return (Update) super.set(parameterName, value); } } } /** * Builder for {@link Prediction}. * *

* 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) { super( transport, jsonFactory, DEFAULT_ROOT_URL, DEFAULT_SERVICE_PATH, httpRequestInitializer, false); } /** Builds a new instance of {@link Prediction}. */ @Override public Prediction build() { return new Prediction(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 PredictionRequestInitializer}. * * @since 1.12 */ public Builder setPredictionRequestInitializer( PredictionRequestInitializer predictionRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(predictionRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy