com.google.api.services.customsearch.model.Search 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.customsearch.model;
/**
* Model definition for Search.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the CustomSearch API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class Search extends com.google.api.client.json.GenericJson {
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Context context;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List items;
static {
// hack to force ProGuard to consider Result used, since otherwise it would be stripped out
// see https://github.com/google/google-api-java-client/issues/543
com.google.api.client.util.Data.nullOf(Result.class);
}
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String kind;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List promotions;
static {
// hack to force ProGuard to consider Promotion used, since otherwise it would be stripped out
// see https://github.com/google/google-api-java-client/issues/543
com.google.api.client.util.Data.nullOf(Promotion.class);
}
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.Map> queries;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private SearchInformation searchInformation;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Spelling spelling;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private Url url;
/**
* @return value or {@code null} for none
*/
public Context getContext() {
return context;
}
/**
* @param context context or {@code null} for none
*/
public Search setContext(Context context) {
this.context = context;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.util.List getItems() {
return items;
}
/**
* @param items items or {@code null} for none
*/
public Search setItems(java.util.List items) {
this.items = items;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.lang.String getKind() {
return kind;
}
/**
* @param kind kind or {@code null} for none
*/
public Search setKind(java.lang.String kind) {
this.kind = kind;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.util.List getPromotions() {
return promotions;
}
/**
* @param promotions promotions or {@code null} for none
*/
public Search setPromotions(java.util.List promotions) {
this.promotions = promotions;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.util.Map> getQueries() {
return queries;
}
/**
* @param queries queries or {@code null} for none
*/
public Search setQueries(java.util.Map> queries) {
this.queries = queries;
return this;
}
/**
* @return value or {@code null} for none
*/
public SearchInformation getSearchInformation() {
return searchInformation;
}
/**
* @param searchInformation searchInformation or {@code null} for none
*/
public Search setSearchInformation(SearchInformation searchInformation) {
this.searchInformation = searchInformation;
return this;
}
/**
* @return value or {@code null} for none
*/
public Spelling getSpelling() {
return spelling;
}
/**
* @param spelling spelling or {@code null} for none
*/
public Search setSpelling(Spelling spelling) {
this.spelling = spelling;
return this;
}
/**
* @return value or {@code null} for none
*/
public Url getUrl() {
return url;
}
/**
* @param url url or {@code null} for none
*/
public Search setUrl(Url url) {
this.url = url;
return this;
}
@Override
public Search set(String fieldName, Object value) {
return (Search) super.set(fieldName, value);
}
@Override
public Search clone() {
return (Search) super.clone();
}
/**
* Model definition for SearchSearchInformation.
*/
public static final class SearchInformation extends com.google.api.client.json.GenericJson {
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String formattedSearchTime;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String formattedTotalResults;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Double searchTime;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key @com.google.api.client.json.JsonString
private java.lang.Long totalResults;
/**
* @return value or {@code null} for none
*/
public java.lang.String getFormattedSearchTime() {
return formattedSearchTime;
}
/**
* @param formattedSearchTime formattedSearchTime or {@code null} for none
*/
public SearchInformation setFormattedSearchTime(java.lang.String formattedSearchTime) {
this.formattedSearchTime = formattedSearchTime;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.lang.String getFormattedTotalResults() {
return formattedTotalResults;
}
/**
* @param formattedTotalResults formattedTotalResults or {@code null} for none
*/
public SearchInformation setFormattedTotalResults(java.lang.String formattedTotalResults) {
this.formattedTotalResults = formattedTotalResults;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.lang.Double getSearchTime() {
return searchTime;
}
/**
* @param searchTime searchTime or {@code null} for none
*/
public SearchInformation setSearchTime(java.lang.Double searchTime) {
this.searchTime = searchTime;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.lang.Long getTotalResults() {
return totalResults;
}
/**
* @param totalResults totalResults or {@code null} for none
*/
public SearchInformation setTotalResults(java.lang.Long totalResults) {
this.totalResults = totalResults;
return this;
}
@Override
public SearchInformation set(String fieldName, Object value) {
return (SearchInformation) super.set(fieldName, value);
}
@Override
public SearchInformation clone() {
return (SearchInformation) super.clone();
}
}
/**
* Model definition for SearchSpelling.
*/
public static final class Spelling extends com.google.api.client.json.GenericJson {
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String correctedQuery;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String htmlCorrectedQuery;
/**
* @return value or {@code null} for none
*/
public java.lang.String getCorrectedQuery() {
return correctedQuery;
}
/**
* @param correctedQuery correctedQuery or {@code null} for none
*/
public Spelling setCorrectedQuery(java.lang.String correctedQuery) {
this.correctedQuery = correctedQuery;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.lang.String getHtmlCorrectedQuery() {
return htmlCorrectedQuery;
}
/**
* @param htmlCorrectedQuery htmlCorrectedQuery or {@code null} for none
*/
public Spelling setHtmlCorrectedQuery(java.lang.String htmlCorrectedQuery) {
this.htmlCorrectedQuery = htmlCorrectedQuery;
return this;
}
@Override
public Spelling set(String fieldName, Object value) {
return (Spelling) super.set(fieldName, value);
}
@Override
public Spelling clone() {
return (Spelling) super.clone();
}
}
/**
* Model definition for SearchUrl.
*/
public static final class Url extends com.google.api.client.json.GenericJson {
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String template;
/**
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String type;
/**
* @return value or {@code null} for none
*/
public java.lang.String getTemplate() {
return template;
}
/**
* @param template template or {@code null} for none
*/
public Url setTemplate(java.lang.String template) {
this.template = template;
return this;
}
/**
* @return value or {@code null} for none
*/
public java.lang.String getType() {
return type;
}
/**
* @param type type or {@code null} for none
*/
public Url setType(java.lang.String type) {
this.type = type;
return this;
}
@Override
public Url set(String fieldName, Object value) {
return (Url) super.set(fieldName, value);
}
@Override
public Url clone() {
return (Url) super.clone();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy