com.google.api.services.datastore.Datastore Maven / Gradle / Ivy
/*
* 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: 2016-01-08 17:48:37 UTC)
* on 2016-01-12 at 04:49:09 UTC
* Modify at your own risk.
*/
package com.google.api.services.datastore;
/**
* Service definition for Datastore (v1beta1).
*
*
* API for accessing Google Cloud Datastore.
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link DatastoreRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class Datastore 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.1 of the Google Cloud Datastore 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 = "datastore/v1beta1/datasets/";
/**
* 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 Datastore(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
*/
Datastore(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 Datasets collection.
*
* The typical use is:
*
* {@code Datastore datastore = new Datastore(...);}
* {@code Datastore.Datasets.List request = datastore.datasets().list(parameters ...)}
*
*
* @return the resource collection
*/
public Datasets datasets() {
return new Datasets();
}
/**
* The "datasets" collection of methods.
*/
public class Datasets {
/**
* Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).
*
* Create a request for the method "datasets.allocateIds".
*
* This request holds the parameters needed by the datastore server. After setting any optional
* parameters, call the {@link AllocateIds#execute()} method to invoke the remote operation.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.AllocateIdsRequest}
* @return the request
*/
public AllocateIds allocateIds(java.lang.String datasetId, com.google.api.services.datastore.model.AllocateIdsRequest content) throws java.io.IOException {
AllocateIds result = new AllocateIds(datasetId, content);
initialize(result);
return result;
}
public class AllocateIds extends DatastoreRequest {
private static final String REST_PATH = "{datasetId}/allocateIds";
/**
* Allocate IDs for incomplete keys (useful for referencing an entity before it is inserted).
*
* Create a request for the method "datasets.allocateIds".
*
* This request holds the parameters needed by the the datastore server. After setting any
* optional parameters, call the {@link AllocateIds#execute()} method to invoke the remote
* operation. {@link
* AllocateIds#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.AllocateIdsRequest}
* @since 1.13
*/
protected AllocateIds(java.lang.String datasetId, com.google.api.services.datastore.model.AllocateIdsRequest content) {
super(Datastore.this, "POST", REST_PATH, content, com.google.api.services.datastore.model.AllocateIdsResponse.class);
this.datasetId = com.google.api.client.util.Preconditions.checkNotNull(datasetId, "Required parameter datasetId must be specified.");
set("alt", "json");
}
@Override
public AllocateIds setAlt(java.lang.String alt) {
return (AllocateIds) super.setAlt(alt);
}
@Override
public AllocateIds setFields(java.lang.String fields) {
return (AllocateIds) super.setFields(fields);
}
@Override
public AllocateIds setKey(java.lang.String key) {
return (AllocateIds) super.setKey(key);
}
@Override
public AllocateIds setOauthToken(java.lang.String oauthToken) {
return (AllocateIds) super.setOauthToken(oauthToken);
}
@Override
public AllocateIds setPrettyPrint(java.lang.Boolean prettyPrint) {
return (AllocateIds) super.setPrettyPrint(prettyPrint);
}
@Override
public AllocateIds setQuotaUser(java.lang.String quotaUser) {
return (AllocateIds) super.setQuotaUser(quotaUser);
}
@Override
public AllocateIds setUserIp(java.lang.String userIp) {
return (AllocateIds) super.setUserIp(userIp);
}
/** Identifies the dataset. */
@com.google.api.client.util.Key
private java.lang.String datasetId;
/** Identifies the dataset.
*/
public java.lang.String getDatasetId() {
return datasetId;
}
/** Identifies the dataset. */
public AllocateIds setDatasetId(java.lang.String datasetId) {
this.datasetId = datasetId;
return this;
}
@Override
public AllocateIds set(String parameterName, Object value) {
return (AllocateIds) super.set(parameterName, value);
}
}
/**
* Begin a new transaction.
*
* Create a request for the method "datasets.beginTransaction".
*
* This request holds the parameters needed by the datastore server. After setting any optional
* parameters, call the {@link BeginTransaction#execute()} method to invoke the remote operation.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.BeginTransactionRequest}
* @return the request
*/
public BeginTransaction beginTransaction(java.lang.String datasetId, com.google.api.services.datastore.model.BeginTransactionRequest content) throws java.io.IOException {
BeginTransaction result = new BeginTransaction(datasetId, content);
initialize(result);
return result;
}
public class BeginTransaction extends DatastoreRequest {
private static final String REST_PATH = "{datasetId}/beginTransaction";
/**
* Begin a new transaction.
*
* Create a request for the method "datasets.beginTransaction".
*
* This request holds the parameters needed by the the datastore server. After setting any
* optional parameters, call the {@link BeginTransaction#execute()} method to invoke the remote
* operation. {@link BeginTransaction#initialize(com.google.api.client.googleapis.services.Abs
* tractGoogleClientRequest)} must be called to initialize this instance immediately after
* invoking the constructor.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.BeginTransactionRequest}
* @since 1.13
*/
protected BeginTransaction(java.lang.String datasetId, com.google.api.services.datastore.model.BeginTransactionRequest content) {
super(Datastore.this, "POST", REST_PATH, content, com.google.api.services.datastore.model.BeginTransactionResponse.class);
this.datasetId = com.google.api.client.util.Preconditions.checkNotNull(datasetId, "Required parameter datasetId must be specified.");
set("alt", "json");
}
@Override
public BeginTransaction setAlt(java.lang.String alt) {
return (BeginTransaction) super.setAlt(alt);
}
@Override
public BeginTransaction setFields(java.lang.String fields) {
return (BeginTransaction) super.setFields(fields);
}
@Override
public BeginTransaction setKey(java.lang.String key) {
return (BeginTransaction) super.setKey(key);
}
@Override
public BeginTransaction setOauthToken(java.lang.String oauthToken) {
return (BeginTransaction) super.setOauthToken(oauthToken);
}
@Override
public BeginTransaction setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BeginTransaction) super.setPrettyPrint(prettyPrint);
}
@Override
public BeginTransaction setQuotaUser(java.lang.String quotaUser) {
return (BeginTransaction) super.setQuotaUser(quotaUser);
}
@Override
public BeginTransaction setUserIp(java.lang.String userIp) {
return (BeginTransaction) super.setUserIp(userIp);
}
/** Identifies the dataset. */
@com.google.api.client.util.Key
private java.lang.String datasetId;
/** Identifies the dataset.
*/
public java.lang.String getDatasetId() {
return datasetId;
}
/** Identifies the dataset. */
public BeginTransaction setDatasetId(java.lang.String datasetId) {
this.datasetId = datasetId;
return this;
}
@Override
public BeginTransaction set(String parameterName, Object value) {
return (BeginTransaction) super.set(parameterName, value);
}
}
/**
* Create, delete or modify some entities outside a transaction.
*
* Create a request for the method "datasets.blindWrite".
*
* This request holds the parameters needed by the datastore server. After setting any optional
* parameters, call the {@link BlindWrite#execute()} method to invoke the remote operation.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.BlindWriteRequest}
* @return the request
*/
public BlindWrite blindWrite(java.lang.String datasetId, com.google.api.services.datastore.model.BlindWriteRequest content) throws java.io.IOException {
BlindWrite result = new BlindWrite(datasetId, content);
initialize(result);
return result;
}
public class BlindWrite extends DatastoreRequest {
private static final String REST_PATH = "{datasetId}/blindWrite";
/**
* Create, delete or modify some entities outside a transaction.
*
* Create a request for the method "datasets.blindWrite".
*
* This request holds the parameters needed by the the datastore server. After setting any
* optional parameters, call the {@link BlindWrite#execute()} method to invoke the remote
* operation. {@link
* BlindWrite#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.BlindWriteRequest}
* @since 1.13
*/
protected BlindWrite(java.lang.String datasetId, com.google.api.services.datastore.model.BlindWriteRequest content) {
super(Datastore.this, "POST", REST_PATH, content, com.google.api.services.datastore.model.BlindWriteResponse.class);
this.datasetId = com.google.api.client.util.Preconditions.checkNotNull(datasetId, "Required parameter datasetId must be specified.");
set("alt", "json");
}
@Override
public BlindWrite setAlt(java.lang.String alt) {
return (BlindWrite) super.setAlt(alt);
}
@Override
public BlindWrite setFields(java.lang.String fields) {
return (BlindWrite) super.setFields(fields);
}
@Override
public BlindWrite setKey(java.lang.String key) {
return (BlindWrite) super.setKey(key);
}
@Override
public BlindWrite setOauthToken(java.lang.String oauthToken) {
return (BlindWrite) super.setOauthToken(oauthToken);
}
@Override
public BlindWrite setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BlindWrite) super.setPrettyPrint(prettyPrint);
}
@Override
public BlindWrite setQuotaUser(java.lang.String quotaUser) {
return (BlindWrite) super.setQuotaUser(quotaUser);
}
@Override
public BlindWrite setUserIp(java.lang.String userIp) {
return (BlindWrite) super.setUserIp(userIp);
}
/** Identifies the dataset. */
@com.google.api.client.util.Key
private java.lang.String datasetId;
/** Identifies the dataset.
*/
public java.lang.String getDatasetId() {
return datasetId;
}
/** Identifies the dataset. */
public BlindWrite setDatasetId(java.lang.String datasetId) {
this.datasetId = datasetId;
return this;
}
@Override
public BlindWrite set(String parameterName, Object value) {
return (BlindWrite) super.set(parameterName, value);
}
}
/**
* Commit a transaction, optionally creating, deleting or modifying some entities.
*
* Create a request for the method "datasets.commit".
*
* This request holds the parameters needed by the datastore server. After setting any optional
* parameters, call the {@link Commit#execute()} method to invoke the remote operation.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.CommitRequest}
* @return the request
*/
public Commit commit(java.lang.String datasetId, com.google.api.services.datastore.model.CommitRequest content) throws java.io.IOException {
Commit result = new Commit(datasetId, content);
initialize(result);
return result;
}
public class Commit extends DatastoreRequest {
private static final String REST_PATH = "{datasetId}/commit";
/**
* Commit a transaction, optionally creating, deleting or modifying some entities.
*
* Create a request for the method "datasets.commit".
*
* This request holds the parameters needed by the the datastore server. After setting any
* optional parameters, call the {@link Commit#execute()} method to invoke the remote operation.
* {@link
* Commit#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.CommitRequest}
* @since 1.13
*/
protected Commit(java.lang.String datasetId, com.google.api.services.datastore.model.CommitRequest content) {
super(Datastore.this, "POST", REST_PATH, content, com.google.api.services.datastore.model.CommitResponse.class);
this.datasetId = com.google.api.client.util.Preconditions.checkNotNull(datasetId, "Required parameter datasetId must be specified.");
set("alt", "json");
}
@Override
public Commit setAlt(java.lang.String alt) {
return (Commit) super.setAlt(alt);
}
@Override
public Commit setFields(java.lang.String fields) {
return (Commit) super.setFields(fields);
}
@Override
public Commit setKey(java.lang.String key) {
return (Commit) super.setKey(key);
}
@Override
public Commit setOauthToken(java.lang.String oauthToken) {
return (Commit) super.setOauthToken(oauthToken);
}
@Override
public Commit setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Commit) super.setPrettyPrint(prettyPrint);
}
@Override
public Commit setQuotaUser(java.lang.String quotaUser) {
return (Commit) super.setQuotaUser(quotaUser);
}
@Override
public Commit setUserIp(java.lang.String userIp) {
return (Commit) super.setUserIp(userIp);
}
/** Identifies the dataset. */
@com.google.api.client.util.Key
private java.lang.String datasetId;
/** Identifies the dataset.
*/
public java.lang.String getDatasetId() {
return datasetId;
}
/** Identifies the dataset. */
public Commit setDatasetId(java.lang.String datasetId) {
this.datasetId = datasetId;
return this;
}
@Override
public Commit set(String parameterName, Object value) {
return (Commit) super.set(parameterName, value);
}
}
/**
* Look up some entities by key.
*
* Create a request for the method "datasets.lookup".
*
* This request holds the parameters needed by the datastore server. After setting any optional
* parameters, call the {@link Lookup#execute()} method to invoke the remote operation.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.LookupRequest}
* @return the request
*/
public Lookup lookup(java.lang.String datasetId, com.google.api.services.datastore.model.LookupRequest content) throws java.io.IOException {
Lookup result = new Lookup(datasetId, content);
initialize(result);
return result;
}
public class Lookup extends DatastoreRequest {
private static final String REST_PATH = "{datasetId}/lookup";
/**
* Look up some entities by key.
*
* Create a request for the method "datasets.lookup".
*
* This request holds the parameters needed by the the datastore server. After setting any
* optional parameters, call the {@link Lookup#execute()} method to invoke the remote operation.
* {@link
* Lookup#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.LookupRequest}
* @since 1.13
*/
protected Lookup(java.lang.String datasetId, com.google.api.services.datastore.model.LookupRequest content) {
super(Datastore.this, "POST", REST_PATH, content, com.google.api.services.datastore.model.LookupResponse.class);
this.datasetId = com.google.api.client.util.Preconditions.checkNotNull(datasetId, "Required parameter datasetId must be specified.");
set("alt", "json");
}
@Override
public Lookup setAlt(java.lang.String alt) {
return (Lookup) super.setAlt(alt);
}
@Override
public Lookup setFields(java.lang.String fields) {
return (Lookup) super.setFields(fields);
}
@Override
public Lookup setKey(java.lang.String key) {
return (Lookup) super.setKey(key);
}
@Override
public Lookup setOauthToken(java.lang.String oauthToken) {
return (Lookup) super.setOauthToken(oauthToken);
}
@Override
public Lookup setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Lookup) super.setPrettyPrint(prettyPrint);
}
@Override
public Lookup setQuotaUser(java.lang.String quotaUser) {
return (Lookup) super.setQuotaUser(quotaUser);
}
@Override
public Lookup setUserIp(java.lang.String userIp) {
return (Lookup) super.setUserIp(userIp);
}
/** Identifies the dataset. */
@com.google.api.client.util.Key
private java.lang.String datasetId;
/** Identifies the dataset.
*/
public java.lang.String getDatasetId() {
return datasetId;
}
/** Identifies the dataset. */
public Lookup setDatasetId(java.lang.String datasetId) {
this.datasetId = datasetId;
return this;
}
@Override
public Lookup set(String parameterName, Object value) {
return (Lookup) super.set(parameterName, value);
}
}
/**
* Roll back a transaction.
*
* Create a request for the method "datasets.rollback".
*
* This request holds the parameters needed by the datastore server. After setting any optional
* parameters, call the {@link Rollback#execute()} method to invoke the remote operation.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.RollbackRequest}
* @return the request
*/
public Rollback rollback(java.lang.String datasetId, com.google.api.services.datastore.model.RollbackRequest content) throws java.io.IOException {
Rollback result = new Rollback(datasetId, content);
initialize(result);
return result;
}
public class Rollback extends DatastoreRequest {
private static final String REST_PATH = "{datasetId}/rollback";
/**
* Roll back a transaction.
*
* Create a request for the method "datasets.rollback".
*
* This request holds the parameters needed by the the datastore server. After setting any
* optional parameters, call the {@link Rollback#execute()} method to invoke the remote operation.
* {@link
* Rollback#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.RollbackRequest}
* @since 1.13
*/
protected Rollback(java.lang.String datasetId, com.google.api.services.datastore.model.RollbackRequest content) {
super(Datastore.this, "POST", REST_PATH, content, com.google.api.services.datastore.model.RollbackResponse.class);
this.datasetId = com.google.api.client.util.Preconditions.checkNotNull(datasetId, "Required parameter datasetId must be specified.");
set("alt", "json");
}
@Override
public Rollback setAlt(java.lang.String alt) {
return (Rollback) super.setAlt(alt);
}
@Override
public Rollback setFields(java.lang.String fields) {
return (Rollback) super.setFields(fields);
}
@Override
public Rollback setKey(java.lang.String key) {
return (Rollback) super.setKey(key);
}
@Override
public Rollback setOauthToken(java.lang.String oauthToken) {
return (Rollback) super.setOauthToken(oauthToken);
}
@Override
public Rollback setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Rollback) super.setPrettyPrint(prettyPrint);
}
@Override
public Rollback setQuotaUser(java.lang.String quotaUser) {
return (Rollback) super.setQuotaUser(quotaUser);
}
@Override
public Rollback setUserIp(java.lang.String userIp) {
return (Rollback) super.setUserIp(userIp);
}
/** Identifies the dataset. */
@com.google.api.client.util.Key
private java.lang.String datasetId;
/** Identifies the dataset.
*/
public java.lang.String getDatasetId() {
return datasetId;
}
/** Identifies the dataset. */
public Rollback setDatasetId(java.lang.String datasetId) {
this.datasetId = datasetId;
return this;
}
@Override
public Rollback set(String parameterName, Object value) {
return (Rollback) super.set(parameterName, value);
}
}
/**
* Query for entities.
*
* Create a request for the method "datasets.runQuery".
*
* This request holds the parameters needed by the datastore server. After setting any optional
* parameters, call the {@link RunQuery#execute()} method to invoke the remote operation.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.RunQueryRequest}
* @return the request
*/
public RunQuery runQuery(java.lang.String datasetId, com.google.api.services.datastore.model.RunQueryRequest content) throws java.io.IOException {
RunQuery result = new RunQuery(datasetId, content);
initialize(result);
return result;
}
public class RunQuery extends DatastoreRequest {
private static final String REST_PATH = "{datasetId}/runQuery";
/**
* Query for entities.
*
* Create a request for the method "datasets.runQuery".
*
* This request holds the parameters needed by the the datastore server. After setting any
* optional parameters, call the {@link RunQuery#execute()} method to invoke the remote operation.
* {@link
* RunQuery#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor.
*
* @param datasetId Identifies the dataset.
* @param content the {@link com.google.api.services.datastore.model.RunQueryRequest}
* @since 1.13
*/
protected RunQuery(java.lang.String datasetId, com.google.api.services.datastore.model.RunQueryRequest content) {
super(Datastore.this, "POST", REST_PATH, content, com.google.api.services.datastore.model.RunQueryResponse.class);
this.datasetId = com.google.api.client.util.Preconditions.checkNotNull(datasetId, "Required parameter datasetId must be specified.");
set("alt", "json");
}
@Override
public RunQuery setAlt(java.lang.String alt) {
return (RunQuery) super.setAlt(alt);
}
@Override
public RunQuery setFields(java.lang.String fields) {
return (RunQuery) super.setFields(fields);
}
@Override
public RunQuery setKey(java.lang.String key) {
return (RunQuery) super.setKey(key);
}
@Override
public RunQuery setOauthToken(java.lang.String oauthToken) {
return (RunQuery) super.setOauthToken(oauthToken);
}
@Override
public RunQuery setPrettyPrint(java.lang.Boolean prettyPrint) {
return (RunQuery) super.setPrettyPrint(prettyPrint);
}
@Override
public RunQuery setQuotaUser(java.lang.String quotaUser) {
return (RunQuery) super.setQuotaUser(quotaUser);
}
@Override
public RunQuery setUserIp(java.lang.String userIp) {
return (RunQuery) super.setUserIp(userIp);
}
/** Identifies the dataset. */
@com.google.api.client.util.Key
private java.lang.String datasetId;
/** Identifies the dataset.
*/
public java.lang.String getDatasetId() {
return datasetId;
}
/** Identifies the dataset. */
public RunQuery setDatasetId(java.lang.String datasetId) {
this.datasetId = datasetId;
return this;
}
@Override
public RunQuery set(String parameterName, Object value) {
return (RunQuery) super.set(parameterName, value);
}
}
}
/**
* Builder for {@link Datastore}.
*
*
* 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 Datastore}. */
@Override
public Datastore build() {
return new Datastore(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 DatastoreRequestInitializer}.
*
* @since 1.12
*/
public Builder setDatastoreRequestInitializer(
DatastoreRequestInitializer datastoreRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(datastoreRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}