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

com.google.api.services.webmasters.Webmasters Maven / Gradle / Ivy

/*
 * 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/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.webmasters;

/**
 * Service definition for Webmasters (v3).
 *
 * 

* View Google Search Console data for your verified sites. *

* *

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

* *

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

* * @since 1.3 * @author Google, Inc. */ @SuppressWarnings("javadoc") public class Webmasters 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.30.1 of the Search Console 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 = "webmasters/v3/"; /** * 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/webmasters/v3"; /** * 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 Webmasters(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 */ Webmasters(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 Searchanalytics collection. * *

The typical use is:

*
   *   {@code Webmasters webmasters = new Webmasters(...);}
   *   {@code Webmasters.Searchanalytics.List request = webmasters.searchanalytics().list(parameters ...)}
   * 
* * @return the resource collection */ public Searchanalytics searchanalytics() { return new Searchanalytics(); } /** * The "searchanalytics" collection of methods. */ public class Searchanalytics { /** * Query your data with filters and parameters that you define. Returns zero or more rows grouped by * the row keys that you define. You must define a date range of one or more days. * * When date is one of the group by values, any days without data are omitted from the result list. * If you need to know which days have data, issue a broad date range query grouped by date for any * metric, and see which day rows are returned. * * Create a request for the method "searchanalytics.query". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link Query#execute()} method to invoke the remote operation. * * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param content the {@link com.google.api.services.webmasters.model.SearchAnalyticsQueryRequest} * @return the request */ public Query query(java.lang.String siteUrl, com.google.api.services.webmasters.model.SearchAnalyticsQueryRequest content) throws java.io.IOException { Query result = new Query(siteUrl, content); initialize(result); return result; } public class Query extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}/searchAnalytics/query"; /** * Query your data with filters and parameters that you define. Returns zero or more rows grouped * by the row keys that you define. You must define a date range of one or more days. * * When date is one of the group by values, any days without data are omitted from the result * list. If you need to know which days have data, issue a broad date range query grouped by date * for any metric, and see which day rows are returned. * * Create a request for the method "searchanalytics.query". * * This request holds the parameters needed by the the webmasters server. After setting any * optional parameters, call the {@link Query#execute()} method to invoke the remote operation. *

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

* * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param content the {@link com.google.api.services.webmasters.model.SearchAnalyticsQueryRequest} * @since 1.13 */ protected Query(java.lang.String siteUrl, com.google.api.services.webmasters.model.SearchAnalyticsQueryRequest content) { super(Webmasters.this, "POST", REST_PATH, content, com.google.api.services.webmasters.model.SearchAnalyticsQueryResponse.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl must be specified."); } @Override public Query setAlt(java.lang.String alt) { return (Query) super.setAlt(alt); } @Override public Query setFields(java.lang.String fields) { return (Query) super.setFields(fields); } @Override public Query setKey(java.lang.String key) { return (Query) super.setKey(key); } @Override public Query setOauthToken(java.lang.String oauthToken) { return (Query) super.setOauthToken(oauthToken); } @Override public Query setPrettyPrint(java.lang.Boolean prettyPrint) { return (Query) super.setPrettyPrint(prettyPrint); } @Override public Query setQuotaUser(java.lang.String quotaUser) { return (Query) super.setQuotaUser(quotaUser); } @Override public Query setUserIp(java.lang.String userIp) { return (Query) super.setUserIp(userIp); } /** The site's URL, including protocol. For example: http://www.example.com/ */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The site's URL, including protocol. For example: http://www.example.com/ */ public java.lang.String getSiteUrl() { return siteUrl; } /** The site's URL, including protocol. For example: http://www.example.com/ */ public Query setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } @Override public Query set(String parameterName, Object value) { return (Query) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Sitemaps collection. * *

The typical use is:

*
   *   {@code Webmasters webmasters = new Webmasters(...);}
   *   {@code Webmasters.Sitemaps.List request = webmasters.sitemaps().list(parameters ...)}
   * 
* * @return the resource collection */ public Sitemaps sitemaps() { return new Sitemaps(); } /** * The "sitemaps" collection of methods. */ public class Sitemaps { /** * Deletes a sitemap from this site. * * Create a request for the method "sitemaps.delete". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param feedpath The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml * @return the request */ public Delete delete(java.lang.String siteUrl, java.lang.String feedpath) throws java.io.IOException { Delete result = new Delete(siteUrl, feedpath); initialize(result); return result; } public class Delete extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}/sitemaps/{feedpath}"; /** * Deletes a sitemap from this site. * * Create a request for the method "sitemaps.delete". * * This request holds the parameters needed by the the webmasters 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 siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param feedpath The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml * @since 1.13 */ protected Delete(java.lang.String siteUrl, java.lang.String feedpath) { super(Webmasters.this, "DELETE", REST_PATH, null, Void.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl must be specified."); this.feedpath = com.google.api.client.util.Preconditions.checkNotNull(feedpath, "Required parameter feedpath 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 site's URL, including protocol. For example: http://www.example.com/ */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The site's URL, including protocol. For example: http://www.example.com/ */ public java.lang.String getSiteUrl() { return siteUrl; } /** The site's URL, including protocol. For example: http://www.example.com/ */ public Delete setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } /** The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml */ @com.google.api.client.util.Key private java.lang.String feedpath; /** The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml */ public java.lang.String getFeedpath() { return feedpath; } /** The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml */ public Delete setFeedpath(java.lang.String feedpath) { this.feedpath = feedpath; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves information about a specific sitemap. * * Create a request for the method "sitemaps.get". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param feedpath The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml * @return the request */ public Get get(java.lang.String siteUrl, java.lang.String feedpath) throws java.io.IOException { Get result = new Get(siteUrl, feedpath); initialize(result); return result; } public class Get extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}/sitemaps/{feedpath}"; /** * Retrieves information about a specific sitemap. * * Create a request for the method "sitemaps.get". * * This request holds the parameters needed by the the webmasters 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 siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param feedpath The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml * @since 1.13 */ protected Get(java.lang.String siteUrl, java.lang.String feedpath) { super(Webmasters.this, "GET", REST_PATH, null, com.google.api.services.webmasters.model.WmxSitemap.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl must be specified."); this.feedpath = com.google.api.client.util.Preconditions.checkNotNull(feedpath, "Required parameter feedpath 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 site's URL, including protocol. For example: http://www.example.com/ */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The site's URL, including protocol. For example: http://www.example.com/ */ public java.lang.String getSiteUrl() { return siteUrl; } /** The site's URL, including protocol. For example: http://www.example.com/ */ public Get setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } /** The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml */ @com.google.api.client.util.Key private java.lang.String feedpath; /** The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml */ public java.lang.String getFeedpath() { return feedpath; } /** The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml */ public Get setFeedpath(java.lang.String feedpath) { this.feedpath = feedpath; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if * sitemapIndex is specified in the request). * * Create a request for the method "sitemaps.list". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @return the request */ public List list(java.lang.String siteUrl) throws java.io.IOException { List result = new List(siteUrl); initialize(result); return result; } public class List extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}/sitemaps"; /** * Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if * sitemapIndex is specified in the request). * * Create a request for the method "sitemaps.list". * * This request holds the parameters needed by the the webmasters 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.

* * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @since 1.13 */ protected List(java.lang.String siteUrl) { super(Webmasters.this, "GET", REST_PATH, null, com.google.api.services.webmasters.model.SitemapsListResponse.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl 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 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); } /** The site's URL, including protocol. For example: http://www.example.com/ */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The site's URL, including protocol. For example: http://www.example.com/ */ public java.lang.String getSiteUrl() { return siteUrl; } /** The site's URL, including protocol. For example: http://www.example.com/ */ public List setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } /** A URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml */ @com.google.api.client.util.Key private java.lang.String sitemapIndex; /** A URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml */ public java.lang.String getSitemapIndex() { return sitemapIndex; } /** A URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml */ public List setSitemapIndex(java.lang.String sitemapIndex) { this.sitemapIndex = sitemapIndex; return this; } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } /** * Submits a sitemap for a site. * * Create a request for the method "sitemaps.submit". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link Submit#execute()} method to invoke the remote operation. * * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param feedpath The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml * @return the request */ public Submit submit(java.lang.String siteUrl, java.lang.String feedpath) throws java.io.IOException { Submit result = new Submit(siteUrl, feedpath); initialize(result); return result; } public class Submit extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}/sitemaps/{feedpath}"; /** * Submits a sitemap for a site. * * Create a request for the method "sitemaps.submit". * * This request holds the parameters needed by the the webmasters server. After setting any * optional parameters, call the {@link Submit#execute()} method to invoke the remote operation. *

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

* * @param siteUrl The site's URL, including protocol. For example: http://www.example.com/ * @param feedpath The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml * @since 1.13 */ protected Submit(java.lang.String siteUrl, java.lang.String feedpath) { super(Webmasters.this, "PUT", REST_PATH, null, Void.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl must be specified."); this.feedpath = com.google.api.client.util.Preconditions.checkNotNull(feedpath, "Required parameter feedpath must be specified."); } @Override public Submit setAlt(java.lang.String alt) { return (Submit) super.setAlt(alt); } @Override public Submit setFields(java.lang.String fields) { return (Submit) super.setFields(fields); } @Override public Submit setKey(java.lang.String key) { return (Submit) super.setKey(key); } @Override public Submit setOauthToken(java.lang.String oauthToken) { return (Submit) super.setOauthToken(oauthToken); } @Override public Submit setPrettyPrint(java.lang.Boolean prettyPrint) { return (Submit) super.setPrettyPrint(prettyPrint); } @Override public Submit setQuotaUser(java.lang.String quotaUser) { return (Submit) super.setQuotaUser(quotaUser); } @Override public Submit setUserIp(java.lang.String userIp) { return (Submit) super.setUserIp(userIp); } /** The site's URL, including protocol. For example: http://www.example.com/ */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The site's URL, including protocol. For example: http://www.example.com/ */ public java.lang.String getSiteUrl() { return siteUrl; } /** The site's URL, including protocol. For example: http://www.example.com/ */ public Submit setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } /** The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml */ @com.google.api.client.util.Key private java.lang.String feedpath; /** The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml */ public java.lang.String getFeedpath() { return feedpath; } /** The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml */ public Submit setFeedpath(java.lang.String feedpath) { this.feedpath = feedpath; return this; } @Override public Submit set(String parameterName, Object value) { return (Submit) super.set(parameterName, value); } } } /** * An accessor for creating requests from the Sites collection. * *

The typical use is:

*
   *   {@code Webmasters webmasters = new Webmasters(...);}
   *   {@code Webmasters.Sites.List request = webmasters.sites().list(parameters ...)}
   * 
* * @return the resource collection */ public Sites sites() { return new Sites(); } /** * The "sites" collection of methods. */ public class Sites { /** * Adds a site to the set of the user's sites in Search Console. * * Create a request for the method "sites.add". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link Add#execute()} method to invoke the remote operation. * * @param siteUrl The URL of the site to add. * @return the request */ public Add add(java.lang.String siteUrl) throws java.io.IOException { Add result = new Add(siteUrl); initialize(result); return result; } public class Add extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}"; /** * Adds a site to the set of the user's sites in Search Console. * * Create a request for the method "sites.add". * * This request holds the parameters needed by the the webmasters server. After setting any * optional parameters, call the {@link Add#execute()} method to invoke the remote operation.

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

* * @param siteUrl The URL of the site to add. * @since 1.13 */ protected Add(java.lang.String siteUrl) { super(Webmasters.this, "PUT", REST_PATH, null, Void.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl must be specified."); } @Override public Add setAlt(java.lang.String alt) { return (Add) super.setAlt(alt); } @Override public Add setFields(java.lang.String fields) { return (Add) super.setFields(fields); } @Override public Add setKey(java.lang.String key) { return (Add) super.setKey(key); } @Override public Add setOauthToken(java.lang.String oauthToken) { return (Add) super.setOauthToken(oauthToken); } @Override public Add setPrettyPrint(java.lang.Boolean prettyPrint) { return (Add) super.setPrettyPrint(prettyPrint); } @Override public Add setQuotaUser(java.lang.String quotaUser) { return (Add) super.setQuotaUser(quotaUser); } @Override public Add setUserIp(java.lang.String userIp) { return (Add) super.setUserIp(userIp); } /** The URL of the site to add. */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The URL of the site to add. */ public java.lang.String getSiteUrl() { return siteUrl; } /** The URL of the site to add. */ public Add setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } @Override public Add set(String parameterName, Object value) { return (Add) super.set(parameterName, value); } } /** * Removes a site from the set of the user's Search Console sites. * * Create a request for the method "sites.delete". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param siteUrl The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android- * app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is * used in Search Console URLs. * @return the request */ public Delete delete(java.lang.String siteUrl) throws java.io.IOException { Delete result = new Delete(siteUrl); initialize(result); return result; } public class Delete extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}"; /** * Removes a site from the set of the user's Search Console sites. * * Create a request for the method "sites.delete". * * This request holds the parameters needed by the the webmasters 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 siteUrl The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android- * app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is * used in Search Console URLs. * @since 1.13 */ protected Delete(java.lang.String siteUrl) { super(Webmasters.this, "DELETE", REST_PATH, null, Void.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl 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 URI of the property as defined in Search Console. Examples: http://www.example.com/ or * android-app://com.example/ Note: for property-sets, use the URI that starts with sc-set: * which is used in Search Console URLs. */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android- app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is used in Search Console URLs. */ public java.lang.String getSiteUrl() { return siteUrl; } /** * The URI of the property as defined in Search Console. Examples: http://www.example.com/ or * android-app://com.example/ Note: for property-sets, use the URI that starts with sc-set: * which is used in Search Console URLs. */ public Delete setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } @Override public Delete set(String parameterName, Object value) { return (Delete) super.set(parameterName, value); } } /** * Retrieves information about specific site. * * Create a request for the method "sites.get". * * This request holds the parameters needed by the webmasters server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param siteUrl The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android- * app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is * used in Search Console URLs. * @return the request */ public Get get(java.lang.String siteUrl) throws java.io.IOException { Get result = new Get(siteUrl); initialize(result); return result; } public class Get extends WebmastersRequest { private static final String REST_PATH = "sites/{siteUrl}"; /** * Retrieves information about specific site. * * Create a request for the method "sites.get". * * This request holds the parameters needed by the the webmasters 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 siteUrl The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android- * app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is * used in Search Console URLs. * @since 1.13 */ protected Get(java.lang.String siteUrl) { super(Webmasters.this, "GET", REST_PATH, null, com.google.api.services.webmasters.model.WmxSite.class); this.siteUrl = com.google.api.client.util.Preconditions.checkNotNull(siteUrl, "Required parameter siteUrl 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 URI of the property as defined in Search Console. Examples: http://www.example.com/ or * android-app://com.example/ Note: for property-sets, use the URI that starts with sc-set: * which is used in Search Console URLs. */ @com.google.api.client.util.Key private java.lang.String siteUrl; /** The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android- app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is used in Search Console URLs. */ public java.lang.String getSiteUrl() { return siteUrl; } /** * The URI of the property as defined in Search Console. Examples: http://www.example.com/ or * android-app://com.example/ Note: for property-sets, use the URI that starts with sc-set: * which is used in Search Console URLs. */ public Get setSiteUrl(java.lang.String siteUrl) { this.siteUrl = siteUrl; return this; } @Override public Get set(String parameterName, Object value) { return (Get) super.set(parameterName, value); } } /** * Lists the user's Search Console sites. * * Create a request for the method "sites.list". * * This request holds the parameters needed by the webmasters 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 WebmastersRequest { private static final String REST_PATH = "sites"; /** * Lists the user's Search Console sites. * * Create a request for the method "sites.list". * * This request holds the parameters needed by the the webmasters 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(Webmasters.this, "GET", REST_PATH, null, com.google.api.services.webmasters.model.SitesListResponse.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); } @Override public List set(String parameterName, Object value) { return (List) super.set(parameterName, value); } } } /** * Builder for {@link Webmasters}. * *

* 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 Webmasters}. */ @Override public Webmasters build() { return new Webmasters(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 WebmastersRequestInitializer}. * * @since 1.12 */ public Builder setWebmastersRequestInitializer( WebmastersRequestInitializer webmastersRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(webmastersRequestInitializer); } @Override public Builder setGoogleClientRequestInitializer( com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) { return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy