com.google.api.services.factchecktools.v1alpha1.FactCheckTools 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://github.com/google/apis-client-generator/
* (build: 2018-10-08 17:45:39 UTC)
* on 2019-06-19 at 22:27:04 UTC
* Modify at your own risk.
*/
package com.google.api.services.factchecktools.v1alpha1;
/**
* Service definition for FactCheckTools (v1alpha1).
*
*
*
*
*
*
* For more information about this service, see the
* API Documentation
*
*
*
* This service uses {@link FactCheckToolsRequestInitializer} to initialize global parameters via its
* {@link Builder}.
*
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class FactCheckTools 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.25.0 of the Fact Check Tools 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://factchecktools.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 = "";
/**
* The default encoded batch path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.23
*/
public static final String DEFAULT_BATCH_PATH = "batch";
/**
* 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 FactCheckTools(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
*/
FactCheckTools(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 Claims collection.
*
* The typical use is:
*
* {@code FactCheckTools factchecktools = new FactCheckTools(...);}
* {@code FactCheckTools.Claims.List request = factchecktools.claims().list(parameters ...)}
*
*
* @return the resource collection
*/
public Claims claims() {
return new Claims();
}
/**
* The "claims" collection of methods.
*/
public class Claims {
/**
* Search through fact-checked claims.
*
* Create a request for the method "claims.search".
*
* This request holds the parameters needed by the factchecktools server. After setting any
* optional parameters, call the {@link Search#execute()} method to invoke the remote operation.
*
* @return the request
*/
public Search search() throws java.io.IOException {
Search result = new Search();
initialize(result);
return result;
}
public class Search extends FactCheckToolsRequest {
private static final String REST_PATH = "v1alpha1/claims:search";
/**
* Search through fact-checked claims.
*
* Create a request for the method "claims.search".
*
* This request holds the parameters needed by the the factchecktools server. After setting any
* optional parameters, call the {@link Search#execute()} method to invoke the remote operation.
* {@link
* Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor.
*
* @since 1.13
*/
protected Search() {
super(FactCheckTools.this, "GET", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1FactCheckedClaimSearchResponse.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 Search set$Xgafv(java.lang.String $Xgafv) {
return (Search) super.set$Xgafv($Xgafv);
}
@Override
public Search setAccessToken(java.lang.String accessToken) {
return (Search) super.setAccessToken(accessToken);
}
@Override
public Search setAlt(java.lang.String alt) {
return (Search) super.setAlt(alt);
}
@Override
public Search setCallback(java.lang.String callback) {
return (Search) super.setCallback(callback);
}
@Override
public Search setFields(java.lang.String fields) {
return (Search) super.setFields(fields);
}
@Override
public Search setKey(java.lang.String key) {
return (Search) super.setKey(key);
}
@Override
public Search setOauthToken(java.lang.String oauthToken) {
return (Search) super.setOauthToken(oauthToken);
}
@Override
public Search setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Search) super.setPrettyPrint(prettyPrint);
}
@Override
public Search setQuotaUser(java.lang.String quotaUser) {
return (Search) super.setQuotaUser(quotaUser);
}
@Override
public Search setUploadType(java.lang.String uploadType) {
return (Search) super.setUploadType(uploadType);
}
@Override
public Search setUploadProtocol(java.lang.String uploadProtocol) {
return (Search) super.setUploadProtocol(uploadProtocol);
}
/**
* An integer that specifies the current offset (that is, starting result location) in search
* results. This field is only considered if `page_token` is unset. For example, 0 means to
* return results starting from the first matching result, and 10 means to return from the
* 11th result.
*/
@com.google.api.client.util.Key
private java.lang.Integer offset;
/** An integer that specifies the current offset (that is, starting result location) in search results.
This field is only considered if `page_token` is unset. For example, 0 means to return results
starting from the first matching result, and 10 means to return from the 11th result.
*/
public java.lang.Integer getOffset() {
return offset;
}
/**
* An integer that specifies the current offset (that is, starting result location) in search
* results. This field is only considered if `page_token` is unset. For example, 0 means to
* return results starting from the first matching result, and 10 means to return from the
* 11th result.
*/
public Search setOffset(java.lang.Integer offset) {
this.offset = offset;
return this;
}
/**
* The pagination token. You may provide the `next_page_token` returned from a previous List
* request, if any, in order to get the next page. All other fields must have the same values
* as in the previous request.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The pagination token. You may provide the `next_page_token` returned from a previous List request,
if any, in order to get the next page. All other fields must have the same values as in the
previous request.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The pagination token. You may provide the `next_page_token` returned from a previous List
* request, if any, in order to get the next page. All other fields must have the same values
* as in the previous request.
*/
public Search setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/** The review publisher site to filter results by, e.g. nytimes.com. */
@com.google.api.client.util.Key
private java.lang.String reviewPublisherSiteFilter;
/** The review publisher site to filter results by, e.g. nytimes.com.
*/
public java.lang.String getReviewPublisherSiteFilter() {
return reviewPublisherSiteFilter;
}
/** The review publisher site to filter results by, e.g. nytimes.com. */
public Search setReviewPublisherSiteFilter(java.lang.String reviewPublisherSiteFilter) {
this.reviewPublisherSiteFilter = reviewPublisherSiteFilter;
return this;
}
/**
* The pagination size. We will return up to that many results. Defaults to 10 if not set.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The pagination size. We will return up to that many results. Defaults to 10 if not set.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The pagination size. We will return up to that many results. Defaults to 10 if not set.
*/
public Search setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Textual query string. Required unless `review_publisher_site_filter` is specified.
*/
@com.google.api.client.util.Key
private java.lang.String query;
/** Textual query string. Required unless `review_publisher_site_filter` is specified.
*/
public java.lang.String getQuery() {
return query;
}
/**
* Textual query string. Required unless `review_publisher_site_filter` is specified.
*/
public Search setQuery(java.lang.String query) {
this.query = query;
return this;
}
/**
* The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to restrict results by
* language, though we do not currently consider the region.
*/
@com.google.api.client.util.Key
private java.lang.String languageCode;
/** The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to restrict results by
language, though we do not currently consider the region.
*/
public java.lang.String getLanguageCode() {
return languageCode;
}
/**
* The BCP-47 language code, such as "en-US" or "sr-Latn". Can be used to restrict results by
* language, though we do not currently consider the region.
*/
public Search setLanguageCode(java.lang.String languageCode) {
this.languageCode = languageCode;
return this;
}
/**
* The maximum age of the returned search results, in days. Age is determined by either claim
* date or review date, whichever is newer.
*/
@com.google.api.client.util.Key
private java.lang.Integer maxAgeDays;
/** The maximum age of the returned search results, in days. Age is determined by either claim date or
review date, whichever is newer.
*/
public java.lang.Integer getMaxAgeDays() {
return maxAgeDays;
}
/**
* The maximum age of the returned search results, in days. Age is determined by either claim
* date or review date, whichever is newer.
*/
public Search setMaxAgeDays(java.lang.Integer maxAgeDays) {
this.maxAgeDays = maxAgeDays;
return this;
}
@Override
public Search set(String parameterName, Object value) {
return (Search) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Pages collection.
*
* The typical use is:
*
* {@code FactCheckTools factchecktools = new FactCheckTools(...);}
* {@code FactCheckTools.Pages.List request = factchecktools.pages().list(parameters ...)}
*
*
* @return the resource collection
*/
public Pages pages() {
return new Pages();
}
/**
* The "pages" collection of methods.
*/
public class Pages {
/**
* Create `ClaimReview` markup on a page.
*
* Create a request for the method "pages.create".
*
* This request holds the parameters needed by the factchecktools server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
* @return the request
*/
public Create create(com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) throws java.io.IOException {
Create result = new Create(content);
initialize(result);
return result;
}
public class Create extends FactCheckToolsRequest {
private static final String REST_PATH = "v1alpha1/pages";
/**
* Create `ClaimReview` markup on a page.
*
* Create a request for the method "pages.create".
*
* This request holds the parameters needed by the the factchecktools server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
* {@link
* Create#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.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
* @since 1.13
*/
protected Create(com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) {
super(FactCheckTools.this, "POST", REST_PATH, content, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.class);
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Delete all `ClaimReview` markup on a page.
*
* Create a request for the method "pages.delete".
*
* This request holds the parameters needed by the factchecktools server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param name The name of the resource to delete, in the form of `pages/{page_id}`.
* @return the request
*/
public Delete delete(java.lang.String name) throws java.io.IOException {
Delete result = new Delete(name);
initialize(result);
return result;
}
public class Delete extends FactCheckToolsRequest {
private static final String REST_PATH = "v1alpha1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^pages/[^/]+$");
/**
* Delete all `ClaimReview` markup on a page.
*
* Create a request for the method "pages.delete".
*
* This request holds the parameters needed by the the factchecktools 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 name The name of the resource to delete, in the form of `pages/{page_id}`.
* @since 1.13
*/
protected Delete(java.lang.String name) {
super(FactCheckTools.this, "DELETE", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleProtobufEmpty.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^pages/[^/]+$");
}
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@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 setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** The name of the resource to delete, in the form of `pages/{page_id}`. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the resource to delete, in the form of `pages/{page_id}`.
*/
public java.lang.String getName() {
return name;
}
/** The name of the resource to delete, in the form of `pages/{page_id}`. */
public Delete setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^pages/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Get all `ClaimReview` markup on a page.
*
* Create a request for the method "pages.get".
*
* This request holds the parameters needed by the factchecktools server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param name The name of the resource to get, in the form of `pages/{page_id}`.
* @return the request
*/
public Get get(java.lang.String name) throws java.io.IOException {
Get result = new Get(name);
initialize(result);
return result;
}
public class Get extends FactCheckToolsRequest {
private static final String REST_PATH = "v1alpha1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^pages/[^/]+$");
/**
* Get all `ClaimReview` markup on a page.
*
* Create a request for the method "pages.get".
*
* This request holds the parameters needed by the the factchecktools 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 name The name of the resource to get, in the form of `pages/{page_id}`.
* @since 1.13
*/
protected Get(java.lang.String name) {
super(FactCheckTools.this, "GET", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^pages/[^/]+$");
}
}
@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 set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@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 setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** The name of the resource to get, in the form of `pages/{page_id}`. */
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of the resource to get, in the form of `pages/{page_id}`.
*/
public java.lang.String getName() {
return name;
}
/** The name of the resource to get, in the form of `pages/{page_id}`. */
public Get setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^pages/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* List the `ClaimReview` markup pages for a specific URL or for an organization.
*
* Create a request for the method "pages.list".
*
* This request holds the parameters needed by the factchecktools 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 FactCheckToolsRequest {
private static final String REST_PATH = "v1alpha1/pages";
/**
* List the `ClaimReview` markup pages for a specific URL or for an organization.
*
* Create a request for the method "pages.list".
*
* This request holds the parameters needed by the the factchecktools 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(FactCheckTools.this, "GET", REST_PATH, null, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ListClaimReviewMarkupPagesResponse.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 set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@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 setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* An integer that specifies the current offset (that is, starting result location) in search
* results. This field is only considered if `page_token` is unset, and if the request is not
* for a specific URL. For example, 0 means to return results starting from the first matching
* result, and 10 means to return from the 11th result.
*/
@com.google.api.client.util.Key
private java.lang.Integer offset;
/** An integer that specifies the current offset (that is, starting result location) in search results.
This field is only considered if `page_token` is unset, and if the request is not for a specific
URL. For example, 0 means to return results starting from the first matching result, and 10 means
to return from the 11th result.
*/
public java.lang.Integer getOffset() {
return offset;
}
/**
* An integer that specifies the current offset (that is, starting result location) in search
* results. This field is only considered if `page_token` is unset, and if the request is not
* for a specific URL. For example, 0 means to return results starting from the first matching
* result, and 10 means to return from the 11th result.
*/
public List setOffset(java.lang.Integer offset) {
this.offset = offset;
return this;
}
/**
* The pagination token. You may provide the `next_page_token` returned from a previous List
* request, if any, in order to get the next page. All other fields must have the same values
* as in the previous request.
*/
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** The pagination token. You may provide the `next_page_token` returned from a previous List request,
if any, in order to get the next page. All other fields must have the same values as in the
previous request.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/**
* The pagination token. You may provide the `next_page_token` returned from a previous List
* request, if any, in order to get the next page. All other fields must have the same values
* as in the previous request.
*/
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* The organization for which we want to fetch markups for. For instance, "site.com". Cannot
* be specified along with an URL.
*/
@com.google.api.client.util.Key
private java.lang.String organization;
/** The organization for which we want to fetch markups for. For instance, "site.com". Cannot be
specified along with an URL.
*/
public java.lang.String getOrganization() {
return organization;
}
/**
* The organization for which we want to fetch markups for. For instance, "site.com". Cannot
* be specified along with an URL.
*/
public List setOrganization(java.lang.String organization) {
this.organization = organization;
return this;
}
/**
* The pagination size. We will return up to that many results. Defaults to 10 if not set. Has
* no effect if a URL is requested.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** The pagination size. We will return up to that many results. Defaults to 10 if not set. Has no
effect if a URL is requested.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* The pagination size. We will return up to that many results. Defaults to 10 if not set. Has
* no effect if a URL is requested.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* The URL from which to get `ClaimReview` markup. There will be at most one result. If markup
* is associated with a more canonical version of the URL provided, we will return that URL
* instead. Cannot be specified along with an organization.
*/
@com.google.api.client.util.Key
private java.lang.String url;
/** The URL from which to get `ClaimReview` markup. There will be at most one result. If markup is
associated with a more canonical version of the URL provided, we will return that URL instead.
Cannot be specified along with an organization.
*/
public java.lang.String getUrl() {
return url;
}
/**
* The URL from which to get `ClaimReview` markup. There will be at most one result. If markup
* is associated with a more canonical version of the URL provided, we will return that URL
* instead. Cannot be specified along with an organization.
*/
public List setUrl(java.lang.String url) {
this.url = url;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
/**
* Update for all `ClaimReview` markup on a page
*
* Note that this is a full update. To retain the existing `ClaimReview` markup on a page, first
* perform a Get operation, then modify the returned markup, and finally call Update with the entire
* `ClaimReview` markup as the body.
*
* Create a request for the method "pages.update".
*
* This request holds the parameters needed by the factchecktools server. After setting any
* optional parameters, call the {@link Update#execute()} method to invoke the remote operation.
*
* @param name The name of this `ClaimReview` markup page resource, in the form of
`pages/{page_id}`. Except for
* update requests, this field is output-only
and should not be set by the user.
* @param content the {@link com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
* @return the request
*/
public Update update(java.lang.String name, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) throws java.io.IOException {
Update result = new Update(name, content);
initialize(result);
return result;
}
public class Update extends FactCheckToolsRequest {
private static final String REST_PATH = "v1alpha1/{+name}";
private final java.util.regex.Pattern NAME_PATTERN =
java.util.regex.Pattern.compile("^pages/[^/]+$");
/**
* Update for all `ClaimReview` markup on a page
*
* Note that this is a full update. To retain the existing `ClaimReview` markup on a page, first
* perform a Get operation, then modify the returned markup, and finally call Update with the
* entire `ClaimReview` markup as the body.
*
* Create a request for the method "pages.update".
*
* This request holds the parameters needed by the the factchecktools 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 name The name of this `ClaimReview` markup page resource, in the form of
`pages/{page_id}`. Except for
* update requests, this field is output-only
and should not be set by the user.
* @param content the {@link com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage}
* @since 1.13
*/
protected Update(java.lang.String name, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage content) {
super(FactCheckTools.this, "PUT", REST_PATH, content, com.google.api.services.factchecktools.v1alpha1.model.GoogleFactcheckingFactchecktoolsV1alpha1ClaimReviewMarkupPage.class);
this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^pages/[^/]+$");
}
}
@Override
public Update set$Xgafv(java.lang.String $Xgafv) {
return (Update) super.set$Xgafv($Xgafv);
}
@Override
public Update setAccessToken(java.lang.String accessToken) {
return (Update) super.setAccessToken(accessToken);
}
@Override
public Update setAlt(java.lang.String alt) {
return (Update) super.setAlt(alt);
}
@Override
public Update setCallback(java.lang.String callback) {
return (Update) super.setCallback(callback);
}
@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 setUploadType(java.lang.String uploadType) {
return (Update) super.setUploadType(uploadType);
}
@Override
public Update setUploadProtocol(java.lang.String uploadProtocol) {
return (Update) super.setUploadProtocol(uploadProtocol);
}
/**
* The name of this `ClaimReview` markup page resource, in the form of `pages/{page_id}`.
* Except for update requests, this field is output-only and should not be set by the user.
*/
@com.google.api.client.util.Key
private java.lang.String name;
/** The name of this `ClaimReview` markup page resource, in the form of `pages/{page_id}`. Except for
update requests, this field is output-only and should not be set by the user.
*/
public java.lang.String getName() {
return name;
}
/**
* The name of this `ClaimReview` markup page resource, in the form of `pages/{page_id}`.
* Except for update requests, this field is output-only and should not be set by the user.
*/
public Update setName(java.lang.String name) {
if (!getSuppressPatternChecks()) {
com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
"Parameter name must conform to the pattern " +
"^pages/[^/]+$");
}
this.name = name;
return this;
}
@Override
public Update set(String parameterName, Object value) {
return (Update) super.set(parameterName, value);
}
}
}
/**
* Builder for {@link FactCheckTools}.
*
*
* 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);
setBatchPath(DEFAULT_BATCH_PATH);
}
/** Builds a new instance of {@link FactCheckTools}. */
@Override
public FactCheckTools build() {
return new FactCheckTools(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 setBatchPath(String batchPath) {
return (Builder) super.setBatchPath(batchPath);
}
@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 FactCheckToolsRequestInitializer}.
*
* @since 1.12
*/
public Builder setFactCheckToolsRequestInitializer(
FactCheckToolsRequestInitializer factchecktoolsRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(factchecktoolsRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}