Initial commit: Complete WooCommerce Smart Google Pricing plugin with vendor dependencies

This commit is contained in:
2025-12-23 07:48:45 +01:00
commit 9b66109ca1
32472 changed files with 4065017 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class Promotion extends \Google\Collection
{
protected $collection_key = 'bodyLines';
protected $bodyLinesType = PromotionBodyLines::class;
protected $bodyLinesDataType = 'array';
/**
* An abridged version of this search's result URL, e.g. www.example.com.
*
* @var string
*/
public $displayLink;
/**
* The title of the promotion, in HTML.
*
* @var string
*/
public $htmlTitle;
protected $imageType = PromotionImage::class;
protected $imageDataType = '';
/**
* The URL of the promotion.
*
* @var string
*/
public $link;
/**
* The title of the promotion.
*
* @var string
*/
public $title;
/**
* An array of block objects for this promotion.
*
* @param PromotionBodyLines[] $bodyLines
*/
public function setBodyLines($bodyLines)
{
$this->bodyLines = $bodyLines;
}
/**
* @return PromotionBodyLines[]
*/
public function getBodyLines()
{
return $this->bodyLines;
}
/**
* An abridged version of this search's result URL, e.g. www.example.com.
*
* @param string $displayLink
*/
public function setDisplayLink($displayLink)
{
$this->displayLink = $displayLink;
}
/**
* @return string
*/
public function getDisplayLink()
{
return $this->displayLink;
}
/**
* The title of the promotion, in HTML.
*
* @param string $htmlTitle
*/
public function setHtmlTitle($htmlTitle)
{
$this->htmlTitle = $htmlTitle;
}
/**
* @return string
*/
public function getHtmlTitle()
{
return $this->htmlTitle;
}
/**
* Image belonging to a promotion.
*
* @param PromotionImage $image
*/
public function setImage(PromotionImage $image)
{
$this->image = $image;
}
/**
* @return PromotionImage
*/
public function getImage()
{
return $this->image;
}
/**
* The URL of the promotion.
*
* @param string $link
*/
public function setLink($link)
{
$this->link = $link;
}
/**
* @return string
*/
public function getLink()
{
return $this->link;
}
/**
* The title of the promotion.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Promotion::class, 'Google_Service_CustomSearchAPI_Promotion');

View File

@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class PromotionBodyLines extends \Google\Model
{
/**
* The block object's text in HTML, if it has text.
*
* @var string
*/
public $htmlTitle;
/**
* The anchor text of the block object's link, if it has a link.
*
* @var string
*/
public $link;
/**
* The block object's text, if it has text.
*
* @var string
*/
public $title;
/**
* The URL of the block object's link, if it has one.
*
* @var string
*/
public $url;
/**
* The block object's text in HTML, if it has text.
*
* @param string $htmlTitle
*/
public function setHtmlTitle($htmlTitle)
{
$this->htmlTitle = $htmlTitle;
}
/**
* @return string
*/
public function getHtmlTitle()
{
return $this->htmlTitle;
}
/**
* The anchor text of the block object's link, if it has a link.
*
* @param string $link
*/
public function setLink($link)
{
$this->link = $link;
}
/**
* @return string
*/
public function getLink()
{
return $this->link;
}
/**
* The block object's text, if it has text.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* The URL of the block object's link, if it has one.
*
* @param string $url
*/
public function setUrl($url)
{
$this->url = $url;
}
/**
* @return string
*/
public function getUrl()
{
return $this->url;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PromotionBodyLines::class, 'Google_Service_CustomSearchAPI_PromotionBodyLines');

View File

@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class PromotionImage extends \Google\Model
{
/**
* Image height in pixels.
*
* @var int
*/
public $height;
/**
* URL of the image for this promotion link.
*
* @var string
*/
public $source;
/**
* Image width in pixels.
*
* @var int
*/
public $width;
/**
* Image height in pixels.
*
* @param int $height
*/
public function setHeight($height)
{
$this->height = $height;
}
/**
* @return int
*/
public function getHeight()
{
return $this->height;
}
/**
* URL of the image for this promotion link.
*
* @param string $source
*/
public function setSource($source)
{
$this->source = $source;
}
/**
* @return string
*/
public function getSource()
{
return $this->source;
}
/**
* Image width in pixels.
*
* @param int $width
*/
public function setWidth($width)
{
$this->width = $width;
}
/**
* @return int
*/
public function getWidth()
{
return $this->width;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PromotionImage::class, 'Google_Service_CustomSearchAPI_PromotionImage');

View File

@@ -0,0 +1,186 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI\Resource;
use Google\Service\CustomSearchAPI\Search;
/**
* The "cse" collection of methods.
* Typical usage is:
* <code>
* $customsearchService = new Google\Service\CustomSearchAPI(...);
* $cse = $customsearchService->cse;
* </code>
*/
class Cse extends \Google\Service\Resource
{
/**
* Returns metadata about the search performed, metadata about the engine used
* for the search, and the search results. (cse.listCse)
*
* @param array $optParams Optional parameters.
*
* @opt_param string c2coff Enables or disables [Simplified and Traditional
* Chinese Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch). The default value for this
* parameter is 0 (zero), meaning that the feature is enabled. Supported values
* are: * `1`: Disabled * `0`: Enabled (default)
* @opt_param string cr Restricts search results to documents originating in a
* particular country. You may use [Boolean
* operators](https://developers.google.com/custom-
* search/docs/json_api_reference#booleanOperators) in the cr parameter's value.
* Google Search determines the country of a document by analyzing: * the top-
* level domain (TLD) of the document's URL * the geographic location of the Web
* server's IP address See the [Country Parameter
* Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) page for a list of valid
* values for this parameter.
* @opt_param string cx The Programmable Search Engine ID to use for this
* request.
* @opt_param string dateRestrict Restricts results to URLs based on date.
* Supported values include: * `d[number]`: requests results from the specified
* number of past days. * `w[number]`: requests results from the specified
* number of past weeks. * `m[number]`: requests results from the specified
* number of past months. * `y[number]`: requests results from the specified
* number of past years.
* @opt_param bool enableAlternateSearchHandler Optional. Enables routing of
* Programmable Search Engine requests to an alternate search handler.
* @opt_param string exactTerms Identifies a phrase that all documents in the
* search results must contain.
* @opt_param string excludeTerms Identifies a word or phrase that should not
* appear in any documents in the search results.
* @opt_param string fileType Restricts results to files of a specified
* extension. A list of file types indexable by Google can be found in Search
* Console [Help Center](https://support.google.com/webmasters/answer/35287).
* @opt_param string filter Controls turning on or off the duplicate content
* filter. * See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information about
* Google's search results filters. Note that host crowding filtering applies
* only to multi-site searches. * By default, Google applies filtering to all
* search results to improve the quality of those results. Acceptable values
* are: * `0`: Turns off duplicate content filter. * `1`: Turns on duplicate
* content filter.
* @opt_param string gl Geolocation of end user. * The `gl` parameter value is a
* two-letter country code. The `gl` parameter boosts search results whose
* country of origin matches the parameter value. See the [Country
* Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) page for a list of valid values.
* * Specifying a `gl` parameter value should lead to more relevant results.
* This is particularly true for international customers and, even more
* specifically, for customers in English- speaking countries other than the
* United States.
* @opt_param string googlehost **Deprecated**. Use the `gl` parameter for a
* similar effect. The local Google domain (for example, google.com, google.de,
* or google.fr) to use to perform the search.
* @opt_param string highRange Specifies the ending value for a search range. *
* Use `lowRange` and `highRange` to append an inclusive search range of
* `lowRange...highRange` to the query.
* @opt_param string hl Sets the user interface language. * Explicitly setting
* this parameter improves the performance and the quality of your search
* results. * See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
* @opt_param string hq Appends the specified query terms to the query, as if
* they were combined with a logical AND operator.
* @opt_param string imgColorType Returns black and white, grayscale,
* transparent, or color images. Acceptable values are: * `"color"` * `"gray"` *
* `"mono"`: black and white * `"trans"`: transparent background
* @opt_param string imgDominantColor Returns images of a specific dominant
* color. Acceptable values are: * `"black"` * `"blue"` * `"brown"` * `"gray"` *
* `"green"` * `"orange"` * `"pink"` * `"purple"` * `"red"` * `"teal"` *
* `"white"` * `"yellow"`
* @opt_param string imgSize Returns images of a specified size. Acceptable
* values are: * `"huge"` * `"icon"` * `"large"` * `"medium"` * `"small"` *
* `"xlarge"` * `"xxlarge"`
* @opt_param string imgType Returns images of a type. Acceptable values are: *
* `"clipart"` * `"face"` * `"lineart"` * `"stock"` * `"photo"` * `"animated"`
* @opt_param string linkSite Specifies that all search results should contain a
* link to a particular URL.
* @opt_param string lowRange Specifies the starting value for a search range.
* Use `lowRange` and `highRange` to append an inclusive search range of
* `lowRange...highRange` to the query.
* @opt_param string lr Restricts the search to documents written in a
* particular language (e.g., `lr=lang_ja`). Acceptable values are: *
* `"lang_ar"`: Arabic * `"lang_bg"`: Bulgarian * `"lang_ca"`: Catalan *
* `"lang_cs"`: Czech * `"lang_da"`: Danish * `"lang_de"`: German * `"lang_el"`:
* Greek * `"lang_en"`: English * `"lang_es"`: Spanish * `"lang_et"`: Estonian *
* `"lang_fi"`: Finnish * `"lang_fr"`: French * `"lang_hr"`: Croatian *
* `"lang_hu"`: Hungarian * `"lang_id"`: Indonesian * `"lang_is"`: Icelandic *
* `"lang_it"`: Italian * `"lang_iw"`: Hebrew * `"lang_ja"`: Japanese *
* `"lang_ko"`: Korean * `"lang_lt"`: Lithuanian * `"lang_lv"`: Latvian *
* `"lang_nl"`: Dutch * `"lang_no"`: Norwegian * `"lang_pl"`: Polish *
* `"lang_pt"`: Portuguese * `"lang_ro"`: Romanian * `"lang_ru"`: Russian *
* `"lang_sk"`: Slovak * `"lang_sl"`: Slovenian * `"lang_sr"`: Serbian *
* `"lang_sv"`: Swedish * `"lang_tr"`: Turkish * `"lang_zh-CN"`: Chinese
* (Simplified) * `"lang_zh-TW"`: Chinese (Traditional)
* @opt_param int num Number of search results to return. * Valid values are
* integers between 1 and 10, inclusive.
* @opt_param string orTerms Provides additional search terms to check for in a
* document, where each document in the search results must contain at least one
* of the additional search terms.
* @opt_param string q Query
* @opt_param string relatedSite Deprecated.
* @opt_param string rights Filters based on licensing. Supported values
* include: `cc_publicdomain`, `cc_attribute`, `cc_sharealike`,
* `cc_noncommercial`, `cc_nonderived` and combinations of these. See [typical
* combinations](https://wiki.creativecommons.org/wiki/CC_Search_integration).
* @opt_param string safe Search safety level. Acceptable values are: *
* `"active"`: Enables SafeSearch filtering. * `"off"`: Disables SafeSearch
* filtering. (default)
* @opt_param string searchType Specifies the search type: `image`. If
* unspecified, results are limited to webpages. Acceptable values are: *
* `"image"`: custom image search.
* @opt_param string siteSearch Specifies a given site which should always be
* included or excluded from results (see `siteSearchFilter` parameter, below).
* @opt_param string siteSearchFilter Controls whether to include or exclude
* results from the site named in the `siteSearch` parameter. Acceptable values
* are: * `"e"`: exclude * `"i"`: include
* @opt_param int snippetLength Optional. Maximum length of snippet text, in
* characters, to be returned with results. Note: this feature is limited to
* specific engines. * Valid values are integers between 161 and 1000,
* inclusive.
* @opt_param string sort The sort expression to apply to the results. The sort
* parameter specifies that the results be sorted according to the specified
* expression i.e. sort by date. [Example:
* sort=date](https://developers.google.com/custom-
* search/docs/structured_search#sort-by-attribute).
* @opt_param string start The index of the first result to return. The default
* number of results per page is 10, so `&start=11` would start at the top of
* the second page of results. **Note**: The JSON API will never return more
* than 100 results, even if more than 100 documents match the query, so setting
* the sum of `start + num` to a number greater than 100 will produce an error.
* Also note that the maximum value for `num` is 10.
* @return Search
* @throws \Google\Service\Exception
*/
public function listCse($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], Search::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Cse::class, 'Google_Service_CustomSearchAPI_Resource_Cse');

View File

@@ -0,0 +1,187 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI\Resource;
use Google\Service\CustomSearchAPI\Search;
/**
* The "siterestrict" collection of methods.
* Typical usage is:
* <code>
* $customsearchService = new Google\Service\CustomSearchAPI(...);
* $siterestrict = $customsearchService->cse_siterestrict;
* </code>
*/
class CseSiterestrict extends \Google\Service\Resource
{
/**
* Returns metadata about the search performed, metadata about the engine used
* for the search, and the search results. Uses a small set of url patterns.
* (siterestrict.listCseSiterestrict)
*
* @param array $optParams Optional parameters.
*
* @opt_param string c2coff Enables or disables [Simplified and Traditional
* Chinese Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch). The default value for this
* parameter is 0 (zero), meaning that the feature is enabled. Supported values
* are: * `1`: Disabled * `0`: Enabled (default)
* @opt_param string cr Restricts search results to documents originating in a
* particular country. You may use [Boolean
* operators](https://developers.google.com/custom-
* search/docs/json_api_reference#booleanOperators) in the cr parameter's value.
* Google Search determines the country of a document by analyzing: * the top-
* level domain (TLD) of the document's URL * the geographic location of the Web
* server's IP address See the [Country Parameter
* Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) page for a list of valid
* values for this parameter.
* @opt_param string cx The Programmable Search Engine ID to use for this
* request.
* @opt_param string dateRestrict Restricts results to URLs based on date.
* Supported values include: * `d[number]`: requests results from the specified
* number of past days. * `w[number]`: requests results from the specified
* number of past weeks. * `m[number]`: requests results from the specified
* number of past months. * `y[number]`: requests results from the specified
* number of past years.
* @opt_param bool enableAlternateSearchHandler Optional. Enables routing of
* Programmable Search Engine requests to an alternate search handler.
* @opt_param string exactTerms Identifies a phrase that all documents in the
* search results must contain.
* @opt_param string excludeTerms Identifies a word or phrase that should not
* appear in any documents in the search results.
* @opt_param string fileType Restricts results to files of a specified
* extension. A list of file types indexable by Google can be found in Search
* Console [Help Center](https://support.google.com/webmasters/answer/35287).
* @opt_param string filter Controls turning on or off the duplicate content
* filter. * See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information about
* Google's search results filters. Note that host crowding filtering applies
* only to multi-site searches. * By default, Google applies filtering to all
* search results to improve the quality of those results. Acceptable values
* are: * `0`: Turns off duplicate content filter. * `1`: Turns on duplicate
* content filter.
* @opt_param string gl Geolocation of end user. * The `gl` parameter value is a
* two-letter country code. The `gl` parameter boosts search results whose
* country of origin matches the parameter value. See the [Country
* Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) page for a list of valid values.
* * Specifying a `gl` parameter value should lead to more relevant results.
* This is particularly true for international customers and, even more
* specifically, for customers in English- speaking countries other than the
* United States.
* @opt_param string googlehost **Deprecated**. Use the `gl` parameter for a
* similar effect. The local Google domain (for example, google.com, google.de,
* or google.fr) to use to perform the search.
* @opt_param string highRange Specifies the ending value for a search range. *
* Use `lowRange` and `highRange` to append an inclusive search range of
* `lowRange...highRange` to the query.
* @opt_param string hl Sets the user interface language. * Explicitly setting
* this parameter improves the performance and the quality of your search
* results. * See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
* @opt_param string hq Appends the specified query terms to the query, as if
* they were combined with a logical AND operator.
* @opt_param string imgColorType Returns black and white, grayscale,
* transparent, or color images. Acceptable values are: * `"color"` * `"gray"` *
* `"mono"`: black and white * `"trans"`: transparent background
* @opt_param string imgDominantColor Returns images of a specific dominant
* color. Acceptable values are: * `"black"` * `"blue"` * `"brown"` * `"gray"` *
* `"green"` * `"orange"` * `"pink"` * `"purple"` * `"red"` * `"teal"` *
* `"white"` * `"yellow"`
* @opt_param string imgSize Returns images of a specified size. Acceptable
* values are: * `"huge"` * `"icon"` * `"large"` * `"medium"` * `"small"` *
* `"xlarge"` * `"xxlarge"`
* @opt_param string imgType Returns images of a type. Acceptable values are: *
* `"clipart"` * `"face"` * `"lineart"` * `"stock"` * `"photo"` * `"animated"`
* @opt_param string linkSite Specifies that all search results should contain a
* link to a particular URL.
* @opt_param string lowRange Specifies the starting value for a search range.
* Use `lowRange` and `highRange` to append an inclusive search range of
* `lowRange...highRange` to the query.
* @opt_param string lr Restricts the search to documents written in a
* particular language (e.g., `lr=lang_ja`). Acceptable values are: *
* `"lang_ar"`: Arabic * `"lang_bg"`: Bulgarian * `"lang_ca"`: Catalan *
* `"lang_cs"`: Czech * `"lang_da"`: Danish * `"lang_de"`: German * `"lang_el"`:
* Greek * `"lang_en"`: English * `"lang_es"`: Spanish * `"lang_et"`: Estonian *
* `"lang_fi"`: Finnish * `"lang_fr"`: French * `"lang_hr"`: Croatian *
* `"lang_hu"`: Hungarian * `"lang_id"`: Indonesian * `"lang_is"`: Icelandic *
* `"lang_it"`: Italian * `"lang_iw"`: Hebrew * `"lang_ja"`: Japanese *
* `"lang_ko"`: Korean * `"lang_lt"`: Lithuanian * `"lang_lv"`: Latvian *
* `"lang_nl"`: Dutch * `"lang_no"`: Norwegian * `"lang_pl"`: Polish *
* `"lang_pt"`: Portuguese * `"lang_ro"`: Romanian * `"lang_ru"`: Russian *
* `"lang_sk"`: Slovak * `"lang_sl"`: Slovenian * `"lang_sr"`: Serbian *
* `"lang_sv"`: Swedish * `"lang_tr"`: Turkish * `"lang_zh-CN"`: Chinese
* (Simplified) * `"lang_zh-TW"`: Chinese (Traditional)
* @opt_param int num Number of search results to return. * Valid values are
* integers between 1 and 10, inclusive.
* @opt_param string orTerms Provides additional search terms to check for in a
* document, where each document in the search results must contain at least one
* of the additional search terms.
* @opt_param string q Query
* @opt_param string relatedSite Deprecated.
* @opt_param string rights Filters based on licensing. Supported values
* include: `cc_publicdomain`, `cc_attribute`, `cc_sharealike`,
* `cc_noncommercial`, `cc_nonderived` and combinations of these. See [typical
* combinations](https://wiki.creativecommons.org/wiki/CC_Search_integration).
* @opt_param string safe Search safety level. Acceptable values are: *
* `"active"`: Enables SafeSearch filtering. * `"off"`: Disables SafeSearch
* filtering. (default)
* @opt_param string searchType Specifies the search type: `image`. If
* unspecified, results are limited to webpages. Acceptable values are: *
* `"image"`: custom image search.
* @opt_param string siteSearch Specifies a given site which should always be
* included or excluded from results (see `siteSearchFilter` parameter, below).
* @opt_param string siteSearchFilter Controls whether to include or exclude
* results from the site named in the `siteSearch` parameter. Acceptable values
* are: * `"e"`: exclude * `"i"`: include
* @opt_param int snippetLength Optional. Maximum length of snippet text, in
* characters, to be returned with results. Note: this feature is limited to
* specific engines. * Valid values are integers between 161 and 1000,
* inclusive.
* @opt_param string sort The sort expression to apply to the results. The sort
* parameter specifies that the results be sorted according to the specified
* expression i.e. sort by date. [Example:
* sort=date](https://developers.google.com/custom-
* search/docs/structured_search#sort-by-attribute).
* @opt_param string start The index of the first result to return. The default
* number of results per page is 10, so `&start=11` would start at the top of
* the second page of results. **Note**: The JSON API will never return more
* than 100 results, even if more than 100 documents match the query, so setting
* the sum of `start + num` to a number greater than 100 will produce an error.
* Also note that the maximum value for `num` is 10.
* @return Search
* @throws \Google\Service\Exception
*/
public function listCseSiterestrict($optParams = [])
{
$params = [];
$params = array_merge($params, $optParams);
return $this->call('list', [$params], Search::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CseSiterestrict::class, 'Google_Service_CustomSearchAPI_Resource_CseSiterestrict');

View File

@@ -0,0 +1,355 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class Result extends \Google\Collection
{
protected $collection_key = 'labels';
/**
* Indicates the ID of Google's cached version of the search result.
*
* @var string
*/
public $cacheId;
/**
* An abridged version of this search results URL, e.g. www.example.com.
*
* @var string
*/
public $displayLink;
/**
* The file format of the search result.
*
* @var string
*/
public $fileFormat;
/**
* The URL displayed after the snippet for each search result.
*
* @var string
*/
public $formattedUrl;
/**
* The HTML-formatted URL displayed after the snippet for each search result.
*
* @var string
*/
public $htmlFormattedUrl;
/**
* The snippet of the search result, in HTML.
*
* @var string
*/
public $htmlSnippet;
/**
* The title of the search result, in HTML.
*
* @var string
*/
public $htmlTitle;
protected $imageType = ResultImage::class;
protected $imageDataType = '';
/**
* A unique identifier for the type of current object. For this API, it is
* `customsearch#result.`
*
* @var string
*/
public $kind;
protected $labelsType = ResultLabels::class;
protected $labelsDataType = 'array';
/**
* The full URL to which the search result is pointing, e.g.
* http://www.example.com/foo/bar.
*
* @var string
*/
public $link;
/**
* The MIME type of the search result.
*
* @var string
*/
public $mime;
/**
* Contains [PageMap](https://developers.google.com/custom-
* search/docs/structured_data#pagemaps) information for this search result.
*
* @var array[]
*/
public $pagemap;
/**
* The snippet of the search result, in plain text.
*
* @var string
*/
public $snippet;
/**
* The title of the search result, in plain text.
*
* @var string
*/
public $title;
/**
* Indicates the ID of Google's cached version of the search result.
*
* @param string $cacheId
*/
public function setCacheId($cacheId)
{
$this->cacheId = $cacheId;
}
/**
* @return string
*/
public function getCacheId()
{
return $this->cacheId;
}
/**
* An abridged version of this search results URL, e.g. www.example.com.
*
* @param string $displayLink
*/
public function setDisplayLink($displayLink)
{
$this->displayLink = $displayLink;
}
/**
* @return string
*/
public function getDisplayLink()
{
return $this->displayLink;
}
/**
* The file format of the search result.
*
* @param string $fileFormat
*/
public function setFileFormat($fileFormat)
{
$this->fileFormat = $fileFormat;
}
/**
* @return string
*/
public function getFileFormat()
{
return $this->fileFormat;
}
/**
* The URL displayed after the snippet for each search result.
*
* @param string $formattedUrl
*/
public function setFormattedUrl($formattedUrl)
{
$this->formattedUrl = $formattedUrl;
}
/**
* @return string
*/
public function getFormattedUrl()
{
return $this->formattedUrl;
}
/**
* The HTML-formatted URL displayed after the snippet for each search result.
*
* @param string $htmlFormattedUrl
*/
public function setHtmlFormattedUrl($htmlFormattedUrl)
{
$this->htmlFormattedUrl = $htmlFormattedUrl;
}
/**
* @return string
*/
public function getHtmlFormattedUrl()
{
return $this->htmlFormattedUrl;
}
/**
* The snippet of the search result, in HTML.
*
* @param string $htmlSnippet
*/
public function setHtmlSnippet($htmlSnippet)
{
$this->htmlSnippet = $htmlSnippet;
}
/**
* @return string
*/
public function getHtmlSnippet()
{
return $this->htmlSnippet;
}
/**
* The title of the search result, in HTML.
*
* @param string $htmlTitle
*/
public function setHtmlTitle($htmlTitle)
{
$this->htmlTitle = $htmlTitle;
}
/**
* @return string
*/
public function getHtmlTitle()
{
return $this->htmlTitle;
}
/**
* Image belonging to a custom search result.
*
* @param ResultImage $image
*/
public function setImage(ResultImage $image)
{
$this->image = $image;
}
/**
* @return ResultImage
*/
public function getImage()
{
return $this->image;
}
/**
* A unique identifier for the type of current object. For this API, it is
* `customsearch#result.`
*
* @param string $kind
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* Encapsulates all information about refinement labels.
*
* @param ResultLabels[] $labels
*/
public function setLabels($labels)
{
$this->labels = $labels;
}
/**
* @return ResultLabels[]
*/
public function getLabels()
{
return $this->labels;
}
/**
* The full URL to which the search result is pointing, e.g.
* http://www.example.com/foo/bar.
*
* @param string $link
*/
public function setLink($link)
{
$this->link = $link;
}
/**
* @return string
*/
public function getLink()
{
return $this->link;
}
/**
* The MIME type of the search result.
*
* @param string $mime
*/
public function setMime($mime)
{
$this->mime = $mime;
}
/**
* @return string
*/
public function getMime()
{
return $this->mime;
}
/**
* Contains [PageMap](https://developers.google.com/custom-
* search/docs/structured_data#pagemaps) information for this search result.
*
* @param array[] $pagemap
*/
public function setPagemap($pagemap)
{
$this->pagemap = $pagemap;
}
/**
* @return array[]
*/
public function getPagemap()
{
return $this->pagemap;
}
/**
* The snippet of the search result, in plain text.
*
* @param string $snippet
*/
public function setSnippet($snippet)
{
$this->snippet = $snippet;
}
/**
* @return string
*/
public function getSnippet()
{
return $this->snippet;
}
/**
* The title of the search result, in plain text.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Result::class, 'Google_Service_CustomSearchAPI_Result');

View File

@@ -0,0 +1,180 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class ResultImage extends \Google\Model
{
/**
* The size of the image, in bytes.
*
* @var int
*/
public $byteSize;
/**
* A URL pointing to the webpage hosting the image.
*
* @var string
*/
public $contextLink;
/**
* The height of the image, in pixels.
*
* @var int
*/
public $height;
/**
* The height of the thumbnail image, in pixels.
*
* @var int
*/
public $thumbnailHeight;
/**
* A URL to the thumbnail image.
*
* @var string
*/
public $thumbnailLink;
/**
* The width of the thumbnail image, in pixels.
*
* @var int
*/
public $thumbnailWidth;
/**
* The width of the image, in pixels.
*
* @var int
*/
public $width;
/**
* The size of the image, in bytes.
*
* @param int $byteSize
*/
public function setByteSize($byteSize)
{
$this->byteSize = $byteSize;
}
/**
* @return int
*/
public function getByteSize()
{
return $this->byteSize;
}
/**
* A URL pointing to the webpage hosting the image.
*
* @param string $contextLink
*/
public function setContextLink($contextLink)
{
$this->contextLink = $contextLink;
}
/**
* @return string
*/
public function getContextLink()
{
return $this->contextLink;
}
/**
* The height of the image, in pixels.
*
* @param int $height
*/
public function setHeight($height)
{
$this->height = $height;
}
/**
* @return int
*/
public function getHeight()
{
return $this->height;
}
/**
* The height of the thumbnail image, in pixels.
*
* @param int $thumbnailHeight
*/
public function setThumbnailHeight($thumbnailHeight)
{
$this->thumbnailHeight = $thumbnailHeight;
}
/**
* @return int
*/
public function getThumbnailHeight()
{
return $this->thumbnailHeight;
}
/**
* A URL to the thumbnail image.
*
* @param string $thumbnailLink
*/
public function setThumbnailLink($thumbnailLink)
{
$this->thumbnailLink = $thumbnailLink;
}
/**
* @return string
*/
public function getThumbnailLink()
{
return $this->thumbnailLink;
}
/**
* The width of the thumbnail image, in pixels.
*
* @param int $thumbnailWidth
*/
public function setThumbnailWidth($thumbnailWidth)
{
$this->thumbnailWidth = $thumbnailWidth;
}
/**
* @return int
*/
public function getThumbnailWidth()
{
return $this->thumbnailWidth;
}
/**
* The width of the image, in pixels.
*
* @param int $width
*/
public function setWidth($width)
{
$this->width = $width;
}
/**
* @return int
*/
public function getWidth()
{
return $this->width;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ResultImage::class, 'Google_Service_CustomSearchAPI_ResultImage');

View File

@@ -0,0 +1,99 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class ResultLabels extends \Google\Model
{
protected $internal_gapi_mappings = [
"labelWithOp" => "label_with_op",
];
/**
* The display name of a refinement label. This is the name you should display
* in your user interface.
*
* @var string
*/
public $displayName;
/**
* Refinement label and the associated refinement operation.
*
* @var string
*/
public $labelWithOp;
/**
* The name of a refinement label, which you can use to refine searches. Don't
* display this in your user interface; instead, use displayName.
*
* @var string
*/
public $name;
/**
* The display name of a refinement label. This is the name you should display
* in your user interface.
*
* @param string $displayName
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* Refinement label and the associated refinement operation.
*
* @param string $labelWithOp
*/
public function setLabelWithOp($labelWithOp)
{
$this->labelWithOp = $labelWithOp;
}
/**
* @return string
*/
public function getLabelWithOp()
{
return $this->labelWithOp;
}
/**
* The name of a refinement label, which you can use to refine searches. Don't
* display this in your user interface; instead, use displayName.
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ResultLabels::class, 'Google_Service_CustomSearchAPI_ResultLabels');

View File

@@ -0,0 +1,191 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class Search extends \Google\Collection
{
protected $collection_key = 'promotions';
/**
* Metadata and refinements associated with the given search engine,
* including: * The name of the search engine that was used for the query. * A
* set of [facet objects](https://developers.google.com/custom-
* search/docs/refinements#create) (refinements) you can use for refining a
* search.
*
* @var array[]
*/
public $context;
protected $itemsType = Result::class;
protected $itemsDataType = 'array';
/**
* Unique identifier for the type of current object. For this API, it is
* customsearch#search.
*
* @var string
*/
public $kind;
protected $promotionsType = Promotion::class;
protected $promotionsDataType = 'array';
protected $queriesType = SearchQueries::class;
protected $queriesDataType = '';
protected $searchInformationType = SearchSearchInformation::class;
protected $searchInformationDataType = '';
protected $spellingType = SearchSpelling::class;
protected $spellingDataType = '';
protected $urlType = SearchUrl::class;
protected $urlDataType = '';
/**
* Metadata and refinements associated with the given search engine,
* including: * The name of the search engine that was used for the query. * A
* set of [facet objects](https://developers.google.com/custom-
* search/docs/refinements#create) (refinements) you can use for refining a
* search.
*
* @param array[] $context
*/
public function setContext($context)
{
$this->context = $context;
}
/**
* @return array[]
*/
public function getContext()
{
return $this->context;
}
/**
* The current set of custom search results.
*
* @param Result[] $items
*/
public function setItems($items)
{
$this->items = $items;
}
/**
* @return Result[]
*/
public function getItems()
{
return $this->items;
}
/**
* Unique identifier for the type of current object. For this API, it is
* customsearch#search.
*
* @param string $kind
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* The set of [promotions](https://developers.google.com/custom-
* search/docs/promotions). Present only if the custom search engine's
* configuration files define any promotions for the given query.
*
* @param Promotion[] $promotions
*/
public function setPromotions($promotions)
{
$this->promotions = $promotions;
}
/**
* @return Promotion[]
*/
public function getPromotions()
{
return $this->promotions;
}
/**
* Query metadata for the previous, current, and next pages of results.
*
* @param SearchQueries $queries
*/
public function setQueries(SearchQueries $queries)
{
$this->queries = $queries;
}
/**
* @return SearchQueries
*/
public function getQueries()
{
return $this->queries;
}
/**
* Metadata about a search operation.
*
* @param SearchSearchInformation $searchInformation
*/
public function setSearchInformation(SearchSearchInformation $searchInformation)
{
$this->searchInformation = $searchInformation;
}
/**
* @return SearchSearchInformation
*/
public function getSearchInformation()
{
return $this->searchInformation;
}
/**
* Spell correction information for a query.
*
* @param SearchSpelling $spelling
*/
public function setSpelling(SearchSpelling $spelling)
{
$this->spelling = $spelling;
}
/**
* @return SearchSpelling
*/
public function getSpelling()
{
return $this->spelling;
}
/**
* OpenSearch template and URL.
*
* @param SearchUrl $url
*/
public function setUrl(SearchUrl $url)
{
$this->url = $url;
}
/**
* @return SearchUrl
*/
public function getUrl()
{
return $this->url;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Search::class, 'Google_Service_CustomSearchAPI_Search');

View File

@@ -0,0 +1,81 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class SearchQueries extends \Google\Collection
{
protected $collection_key = 'request';
protected $nextPageType = SearchQueriesNextPage::class;
protected $nextPageDataType = 'array';
protected $previousPageType = SearchQueriesPreviousPage::class;
protected $previousPageDataType = 'array';
protected $requestType = SearchQueriesRequest::class;
protected $requestDataType = 'array';
/**
* Metadata representing the next page of results, if applicable.
*
* @param SearchQueriesNextPage[] $nextPage
*/
public function setNextPage($nextPage)
{
$this->nextPage = $nextPage;
}
/**
* @return SearchQueriesNextPage[]
*/
public function getNextPage()
{
return $this->nextPage;
}
/**
* Metadata representing the previous page of results, if applicable.
*
* @param SearchQueriesPreviousPage[] $previousPage
*/
public function setPreviousPage($previousPage)
{
$this->previousPage = $previousPage;
}
/**
* @return SearchQueriesPreviousPage[]
*/
public function getPreviousPage()
{
return $this->previousPage;
}
/**
* Metadata representing the current request.
*
* @param SearchQueriesRequest[] $request
*/
public function setRequest($request)
{
$this->request = $request;
}
/**
* @return SearchQueriesRequest[]
*/
public function getRequest()
{
return $this->request;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchQueries::class, 'Google_Service_CustomSearchAPI_SearchQueries');

View File

@@ -0,0 +1,976 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class SearchQueriesNextPage extends \Google\Model
{
/**
* Number of search results returned in this set.
*
* @var int
*/
public $count;
/**
* Restricts search results to documents originating in a particular country.
* You may use [Boolean operators](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) in the `cr` parameter's
* value. Google WebSearch determines the country of a document by analyzing
* the following: * The top-level domain (TLD) of the document's URL. * The
* geographic location of the web server's IP address. See [Country (cr)
* Parameter Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) for a list of valid
* values for this parameter.
*
* @var string
*/
public $cr;
/**
* The identifier of an engine created using the Programmable Search Engine
* [Control Panel](https://programmablesearchengine.google.com/). This is a
* custom property not defined in the OpenSearch spec. This parameter is
* **required**.
*
* @var string
*/
public $cx;
/**
* Restricts results to URLs based on date. Supported values include: *
* `d[number]`: requests results from the specified number of past days. *
* `w[number]`: requests results from the specified number of past weeks. *
* `m[number]`: requests results from the specified number of past months. *
* `y[number]`: requests results from the specified number of past years.
*
* @var string
*/
public $dateRestrict;
/**
* Enables or disables the [Simplified and Traditional Chinese
* Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch) feature. Supported values
* are: * `0`: enabled (default) * `1`: disabled
*
* @var string
*/
public $disableCnTwTranslation;
/**
* Identifies a phrase that all documents in the search results must contain.
*
* @var string
*/
public $exactTerms;
/**
* Identifies a word or phrase that should not appear in any documents in the
* search results.
*
* @var string
*/
public $excludeTerms;
/**
* Restricts results to files of a specified extension. Filetypes supported by
* Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript
* (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`,
* `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`)
* * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works
* (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`)
* * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may
* be added in the future. An up-to-date list can always be found in Google's
* [file type FAQ](https://support.google.com/webmasters/answer/35287).
*
* @var string
*/
public $fileType;
/**
* Activates or deactivates the automatic filtering of Google search results.
* See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information
* about Google's search results filters. Valid values for this parameter are:
* * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google
* applies filtering to all search results to improve the quality of those
* results.
*
* @var string
*/
public $filter;
/**
* Boosts search results whose country of origin matches the parameter value.
* See [Country Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) for a list of valid values.
* Specifying a `gl` parameter value in WebSearch requests should improve the
* relevance of results. This is particularly true for international customers
* and, even more specifically, for customers in English-speaking countries
* other than the United States.
*
* @var string
*/
public $gl;
/**
* Specifies the Google domain (for example, google.com, google.de, or
* google.fr) to which the search should be limited.
*
* @var string
*/
public $googleHost;
/**
* Specifies the ending value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @var string
*/
public $highRange;
/**
* Specifies the interface language (host language) of your user interface.
* Explicitly setting this parameter improves the performance and the quality
* of your search results. See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
*
* @var string
*/
public $hl;
/**
* Appends the specified query terms to the query, as if they were combined
* with a logical `AND` operator.
*
* @var string
*/
public $hq;
/**
* Restricts results to images of a specified color type. Supported values
* are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
*
* @var string
*/
public $imgColorType;
/**
* Restricts results to images with a specific dominant color. Supported
* values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` *
* `purple` * `pink` * `white` * `gray` * `black` * `brown`
*
* @var string
*/
public $imgDominantColor;
/**
* Restricts results to images of a specified size. Supported values are: *
* `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge`
* (large) * `huge` (extra-large)
*
* @var string
*/
public $imgSize;
/**
* Restricts results to images of a specified type. Supported values are: *
* `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo`
* (Photo) * `animated` (Animated) * `stock` (Stock)
*
* @var string
*/
public $imgType;
/**
* The character encoding supported for search requests.
*
* @var string
*/
public $inputEncoding;
/**
* The language of the search results.
*
* @var string
*/
public $language;
/**
* Specifies that all results should contain a link to a specific URL.
*
* @var string
*/
public $linkSite;
/**
* Specifies the starting value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @var string
*/
public $lowRange;
/**
* Provides additional search terms to check for in a document, where each
* document in the search results must contain at least one of the additional
* search terms. You can also use the [Boolean
* OR](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) query term for this type of
* query.
*
* @var string
*/
public $orTerms;
/**
* The character encoding supported for search results.
*
* @var string
*/
public $outputEncoding;
/**
* Specifies that all search results should be pages that are related to the
* specified URL. The parameter value should be a URL.
*
* @var string
*/
public $relatedSite;
/**
* Filters based on licensing. Supported values include: * `cc_publicdomain` *
* `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
*
* @var string
*/
public $rights;
/**
* Specifies the [SafeSearch level](https://developers.google.com/custom-
* search/docs/json_api_reference#safeSearchLevels) used for filtering out
* adult results. This is a custom property not defined in the OpenSearch
* spec. Valid parameter values are: * `"off"`: Disable SafeSearch *
* `"active"`: Enable SafeSearch
*
* @var string
*/
public $safe;
/**
* The search terms entered by the user.
*
* @var string
*/
public $searchTerms;
/**
* Allowed values are `web` or `image`. If unspecified, results are limited to
* webpages.
*
* @var string
*/
public $searchType;
/**
* Restricts results to URLs from a specified site.
*
* @var string
*/
public $siteSearch;
/**
* Specifies whether to include or exclude results from the site named in the
* `sitesearch` parameter. Supported values are: * `i`: include content from
* site * `e`: exclude content from site
*
* @var string
*/
public $siteSearchFilter;
/**
* Specifies that results should be sorted according to the specified
* expression. For example, sort by date.
*
* @var string
*/
public $sort;
/**
* The index of the current set of search results into the total set of
* results, where the index of the first result is 1.
*
* @var int
*/
public $startIndex;
/**
* The page number of this set of results, where the page length is set by the
* `count` property.
*
* @var int
*/
public $startPage;
/**
* A description of the query.
*
* @var string
*/
public $title;
/**
* Estimated number of total search results. May not be accurate.
*
* @var string
*/
public $totalResults;
/**
* Number of search results returned in this set.
*
* @param int $count
*/
public function setCount($count)
{
$this->count = $count;
}
/**
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* Restricts search results to documents originating in a particular country.
* You may use [Boolean operators](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) in the `cr` parameter's
* value. Google WebSearch determines the country of a document by analyzing
* the following: * The top-level domain (TLD) of the document's URL. * The
* geographic location of the web server's IP address. See [Country (cr)
* Parameter Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) for a list of valid
* values for this parameter.
*
* @param string $cr
*/
public function setCr($cr)
{
$this->cr = $cr;
}
/**
* @return string
*/
public function getCr()
{
return $this->cr;
}
/**
* The identifier of an engine created using the Programmable Search Engine
* [Control Panel](https://programmablesearchengine.google.com/). This is a
* custom property not defined in the OpenSearch spec. This parameter is
* **required**.
*
* @param string $cx
*/
public function setCx($cx)
{
$this->cx = $cx;
}
/**
* @return string
*/
public function getCx()
{
return $this->cx;
}
/**
* Restricts results to URLs based on date. Supported values include: *
* `d[number]`: requests results from the specified number of past days. *
* `w[number]`: requests results from the specified number of past weeks. *
* `m[number]`: requests results from the specified number of past months. *
* `y[number]`: requests results from the specified number of past years.
*
* @param string $dateRestrict
*/
public function setDateRestrict($dateRestrict)
{
$this->dateRestrict = $dateRestrict;
}
/**
* @return string
*/
public function getDateRestrict()
{
return $this->dateRestrict;
}
/**
* Enables or disables the [Simplified and Traditional Chinese
* Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch) feature. Supported values
* are: * `0`: enabled (default) * `1`: disabled
*
* @param string $disableCnTwTranslation
*/
public function setDisableCnTwTranslation($disableCnTwTranslation)
{
$this->disableCnTwTranslation = $disableCnTwTranslation;
}
/**
* @return string
*/
public function getDisableCnTwTranslation()
{
return $this->disableCnTwTranslation;
}
/**
* Identifies a phrase that all documents in the search results must contain.
*
* @param string $exactTerms
*/
public function setExactTerms($exactTerms)
{
$this->exactTerms = $exactTerms;
}
/**
* @return string
*/
public function getExactTerms()
{
return $this->exactTerms;
}
/**
* Identifies a word or phrase that should not appear in any documents in the
* search results.
*
* @param string $excludeTerms
*/
public function setExcludeTerms($excludeTerms)
{
$this->excludeTerms = $excludeTerms;
}
/**
* @return string
*/
public function getExcludeTerms()
{
return $this->excludeTerms;
}
/**
* Restricts results to files of a specified extension. Filetypes supported by
* Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript
* (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`,
* `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`)
* * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works
* (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`)
* * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may
* be added in the future. An up-to-date list can always be found in Google's
* [file type FAQ](https://support.google.com/webmasters/answer/35287).
*
* @param string $fileType
*/
public function setFileType($fileType)
{
$this->fileType = $fileType;
}
/**
* @return string
*/
public function getFileType()
{
return $this->fileType;
}
/**
* Activates or deactivates the automatic filtering of Google search results.
* See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information
* about Google's search results filters. Valid values for this parameter are:
* * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google
* applies filtering to all search results to improve the quality of those
* results.
*
* @param string $filter
*/
public function setFilter($filter)
{
$this->filter = $filter;
}
/**
* @return string
*/
public function getFilter()
{
return $this->filter;
}
/**
* Boosts search results whose country of origin matches the parameter value.
* See [Country Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) for a list of valid values.
* Specifying a `gl` parameter value in WebSearch requests should improve the
* relevance of results. This is particularly true for international customers
* and, even more specifically, for customers in English-speaking countries
* other than the United States.
*
* @param string $gl
*/
public function setGl($gl)
{
$this->gl = $gl;
}
/**
* @return string
*/
public function getGl()
{
return $this->gl;
}
/**
* Specifies the Google domain (for example, google.com, google.de, or
* google.fr) to which the search should be limited.
*
* @param string $googleHost
*/
public function setGoogleHost($googleHost)
{
$this->googleHost = $googleHost;
}
/**
* @return string
*/
public function getGoogleHost()
{
return $this->googleHost;
}
/**
* Specifies the ending value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @param string $highRange
*/
public function setHighRange($highRange)
{
$this->highRange = $highRange;
}
/**
* @return string
*/
public function getHighRange()
{
return $this->highRange;
}
/**
* Specifies the interface language (host language) of your user interface.
* Explicitly setting this parameter improves the performance and the quality
* of your search results. See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
*
* @param string $hl
*/
public function setHl($hl)
{
$this->hl = $hl;
}
/**
* @return string
*/
public function getHl()
{
return $this->hl;
}
/**
* Appends the specified query terms to the query, as if they were combined
* with a logical `AND` operator.
*
* @param string $hq
*/
public function setHq($hq)
{
$this->hq = $hq;
}
/**
* @return string
*/
public function getHq()
{
return $this->hq;
}
/**
* Restricts results to images of a specified color type. Supported values
* are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
*
* @param string $imgColorType
*/
public function setImgColorType($imgColorType)
{
$this->imgColorType = $imgColorType;
}
/**
* @return string
*/
public function getImgColorType()
{
return $this->imgColorType;
}
/**
* Restricts results to images with a specific dominant color. Supported
* values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` *
* `purple` * `pink` * `white` * `gray` * `black` * `brown`
*
* @param string $imgDominantColor
*/
public function setImgDominantColor($imgDominantColor)
{
$this->imgDominantColor = $imgDominantColor;
}
/**
* @return string
*/
public function getImgDominantColor()
{
return $this->imgDominantColor;
}
/**
* Restricts results to images of a specified size. Supported values are: *
* `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge`
* (large) * `huge` (extra-large)
*
* @param string $imgSize
*/
public function setImgSize($imgSize)
{
$this->imgSize = $imgSize;
}
/**
* @return string
*/
public function getImgSize()
{
return $this->imgSize;
}
/**
* Restricts results to images of a specified type. Supported values are: *
* `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo`
* (Photo) * `animated` (Animated) * `stock` (Stock)
*
* @param string $imgType
*/
public function setImgType($imgType)
{
$this->imgType = $imgType;
}
/**
* @return string
*/
public function getImgType()
{
return $this->imgType;
}
/**
* The character encoding supported for search requests.
*
* @param string $inputEncoding
*/
public function setInputEncoding($inputEncoding)
{
$this->inputEncoding = $inputEncoding;
}
/**
* @return string
*/
public function getInputEncoding()
{
return $this->inputEncoding;
}
/**
* The language of the search results.
*
* @param string $language
*/
public function setLanguage($language)
{
$this->language = $language;
}
/**
* @return string
*/
public function getLanguage()
{
return $this->language;
}
/**
* Specifies that all results should contain a link to a specific URL.
*
* @param string $linkSite
*/
public function setLinkSite($linkSite)
{
$this->linkSite = $linkSite;
}
/**
* @return string
*/
public function getLinkSite()
{
return $this->linkSite;
}
/**
* Specifies the starting value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @param string $lowRange
*/
public function setLowRange($lowRange)
{
$this->lowRange = $lowRange;
}
/**
* @return string
*/
public function getLowRange()
{
return $this->lowRange;
}
/**
* Provides additional search terms to check for in a document, where each
* document in the search results must contain at least one of the additional
* search terms. You can also use the [Boolean
* OR](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) query term for this type of
* query.
*
* @param string $orTerms
*/
public function setOrTerms($orTerms)
{
$this->orTerms = $orTerms;
}
/**
* @return string
*/
public function getOrTerms()
{
return $this->orTerms;
}
/**
* The character encoding supported for search results.
*
* @param string $outputEncoding
*/
public function setOutputEncoding($outputEncoding)
{
$this->outputEncoding = $outputEncoding;
}
/**
* @return string
*/
public function getOutputEncoding()
{
return $this->outputEncoding;
}
/**
* Specifies that all search results should be pages that are related to the
* specified URL. The parameter value should be a URL.
*
* @param string $relatedSite
*/
public function setRelatedSite($relatedSite)
{
$this->relatedSite = $relatedSite;
}
/**
* @return string
*/
public function getRelatedSite()
{
return $this->relatedSite;
}
/**
* Filters based on licensing. Supported values include: * `cc_publicdomain` *
* `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
*
* @param string $rights
*/
public function setRights($rights)
{
$this->rights = $rights;
}
/**
* @return string
*/
public function getRights()
{
return $this->rights;
}
/**
* Specifies the [SafeSearch level](https://developers.google.com/custom-
* search/docs/json_api_reference#safeSearchLevels) used for filtering out
* adult results. This is a custom property not defined in the OpenSearch
* spec. Valid parameter values are: * `"off"`: Disable SafeSearch *
* `"active"`: Enable SafeSearch
*
* @param string $safe
*/
public function setSafe($safe)
{
$this->safe = $safe;
}
/**
* @return string
*/
public function getSafe()
{
return $this->safe;
}
/**
* The search terms entered by the user.
*
* @param string $searchTerms
*/
public function setSearchTerms($searchTerms)
{
$this->searchTerms = $searchTerms;
}
/**
* @return string
*/
public function getSearchTerms()
{
return $this->searchTerms;
}
/**
* Allowed values are `web` or `image`. If unspecified, results are limited to
* webpages.
*
* @param string $searchType
*/
public function setSearchType($searchType)
{
$this->searchType = $searchType;
}
/**
* @return string
*/
public function getSearchType()
{
return $this->searchType;
}
/**
* Restricts results to URLs from a specified site.
*
* @param string $siteSearch
*/
public function setSiteSearch($siteSearch)
{
$this->siteSearch = $siteSearch;
}
/**
* @return string
*/
public function getSiteSearch()
{
return $this->siteSearch;
}
/**
* Specifies whether to include or exclude results from the site named in the
* `sitesearch` parameter. Supported values are: * `i`: include content from
* site * `e`: exclude content from site
*
* @param string $siteSearchFilter
*/
public function setSiteSearchFilter($siteSearchFilter)
{
$this->siteSearchFilter = $siteSearchFilter;
}
/**
* @return string
*/
public function getSiteSearchFilter()
{
return $this->siteSearchFilter;
}
/**
* Specifies that results should be sorted according to the specified
* expression. For example, sort by date.
*
* @param string $sort
*/
public function setSort($sort)
{
$this->sort = $sort;
}
/**
* @return string
*/
public function getSort()
{
return $this->sort;
}
/**
* The index of the current set of search results into the total set of
* results, where the index of the first result is 1.
*
* @param int $startIndex
*/
public function setStartIndex($startIndex)
{
$this->startIndex = $startIndex;
}
/**
* @return int
*/
public function getStartIndex()
{
return $this->startIndex;
}
/**
* The page number of this set of results, where the page length is set by the
* `count` property.
*
* @param int $startPage
*/
public function setStartPage($startPage)
{
$this->startPage = $startPage;
}
/**
* @return int
*/
public function getStartPage()
{
return $this->startPage;
}
/**
* A description of the query.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Estimated number of total search results. May not be accurate.
*
* @param string $totalResults
*/
public function setTotalResults($totalResults)
{
$this->totalResults = $totalResults;
}
/**
* @return string
*/
public function getTotalResults()
{
return $this->totalResults;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchQueriesNextPage::class, 'Google_Service_CustomSearchAPI_SearchQueriesNextPage');

View File

@@ -0,0 +1,976 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class SearchQueriesPreviousPage extends \Google\Model
{
/**
* Number of search results returned in this set.
*
* @var int
*/
public $count;
/**
* Restricts search results to documents originating in a particular country.
* You may use [Boolean operators](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) in the `cr` parameter's
* value. Google WebSearch determines the country of a document by analyzing
* the following: * The top-level domain (TLD) of the document's URL. * The
* geographic location of the web server's IP address. See [Country (cr)
* Parameter Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) for a list of valid
* values for this parameter.
*
* @var string
*/
public $cr;
/**
* The identifier of an engine created using the Programmable Search Engine
* [Control Panel](https://programmablesearchengine.google.com/). This is a
* custom property not defined in the OpenSearch spec. This parameter is
* **required**.
*
* @var string
*/
public $cx;
/**
* Restricts results to URLs based on date. Supported values include: *
* `d[number]`: requests results from the specified number of past days. *
* `w[number]`: requests results from the specified number of past weeks. *
* `m[number]`: requests results from the specified number of past months. *
* `y[number]`: requests results from the specified number of past years.
*
* @var string
*/
public $dateRestrict;
/**
* Enables or disables the [Simplified and Traditional Chinese
* Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch) feature. Supported values
* are: * `0`: enabled (default) * `1`: disabled
*
* @var string
*/
public $disableCnTwTranslation;
/**
* Identifies a phrase that all documents in the search results must contain.
*
* @var string
*/
public $exactTerms;
/**
* Identifies a word or phrase that should not appear in any documents in the
* search results.
*
* @var string
*/
public $excludeTerms;
/**
* Restricts results to files of a specified extension. Filetypes supported by
* Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript
* (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`,
* `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`)
* * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works
* (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`)
* * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may
* be added in the future. An up-to-date list can always be found in Google's
* [file type FAQ](https://support.google.com/webmasters/answer/35287).
*
* @var string
*/
public $fileType;
/**
* Activates or deactivates the automatic filtering of Google search results.
* See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information
* about Google's search results filters. Valid values for this parameter are:
* * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google
* applies filtering to all search results to improve the quality of those
* results.
*
* @var string
*/
public $filter;
/**
* Boosts search results whose country of origin matches the parameter value.
* See [Country Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) for a list of valid values.
* Specifying a `gl` parameter value in WebSearch requests should improve the
* relevance of results. This is particularly true for international customers
* and, even more specifically, for customers in English-speaking countries
* other than the United States.
*
* @var string
*/
public $gl;
/**
* Specifies the Google domain (for example, google.com, google.de, or
* google.fr) to which the search should be limited.
*
* @var string
*/
public $googleHost;
/**
* Specifies the ending value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @var string
*/
public $highRange;
/**
* Specifies the interface language (host language) of your user interface.
* Explicitly setting this parameter improves the performance and the quality
* of your search results. See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
*
* @var string
*/
public $hl;
/**
* Appends the specified query terms to the query, as if they were combined
* with a logical `AND` operator.
*
* @var string
*/
public $hq;
/**
* Restricts results to images of a specified color type. Supported values
* are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
*
* @var string
*/
public $imgColorType;
/**
* Restricts results to images with a specific dominant color. Supported
* values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` *
* `purple` * `pink` * `white` * `gray` * `black` * `brown`
*
* @var string
*/
public $imgDominantColor;
/**
* Restricts results to images of a specified size. Supported values are: *
* `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge`
* (large) * `huge` (extra-large)
*
* @var string
*/
public $imgSize;
/**
* Restricts results to images of a specified type. Supported values are: *
* `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo`
* (Photo) * `animated` (Animated) * `stock` (Stock)
*
* @var string
*/
public $imgType;
/**
* The character encoding supported for search requests.
*
* @var string
*/
public $inputEncoding;
/**
* The language of the search results.
*
* @var string
*/
public $language;
/**
* Specifies that all results should contain a link to a specific URL.
*
* @var string
*/
public $linkSite;
/**
* Specifies the starting value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @var string
*/
public $lowRange;
/**
* Provides additional search terms to check for in a document, where each
* document in the search results must contain at least one of the additional
* search terms. You can also use the [Boolean
* OR](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) query term for this type of
* query.
*
* @var string
*/
public $orTerms;
/**
* The character encoding supported for search results.
*
* @var string
*/
public $outputEncoding;
/**
* Specifies that all search results should be pages that are related to the
* specified URL. The parameter value should be a URL.
*
* @var string
*/
public $relatedSite;
/**
* Filters based on licensing. Supported values include: * `cc_publicdomain` *
* `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
*
* @var string
*/
public $rights;
/**
* Specifies the [SafeSearch level](https://developers.google.com/custom-
* search/docs/json_api_reference#safeSearchLevels) used for filtering out
* adult results. This is a custom property not defined in the OpenSearch
* spec. Valid parameter values are: * `"off"`: Disable SafeSearch *
* `"active"`: Enable SafeSearch
*
* @var string
*/
public $safe;
/**
* The search terms entered by the user.
*
* @var string
*/
public $searchTerms;
/**
* Allowed values are `web` or `image`. If unspecified, results are limited to
* webpages.
*
* @var string
*/
public $searchType;
/**
* Restricts results to URLs from a specified site.
*
* @var string
*/
public $siteSearch;
/**
* Specifies whether to include or exclude results from the site named in the
* `sitesearch` parameter. Supported values are: * `i`: include content from
* site * `e`: exclude content from site
*
* @var string
*/
public $siteSearchFilter;
/**
* Specifies that results should be sorted according to the specified
* expression. For example, sort by date.
*
* @var string
*/
public $sort;
/**
* The index of the current set of search results into the total set of
* results, where the index of the first result is 1.
*
* @var int
*/
public $startIndex;
/**
* The page number of this set of results, where the page length is set by the
* `count` property.
*
* @var int
*/
public $startPage;
/**
* A description of the query.
*
* @var string
*/
public $title;
/**
* Estimated number of total search results. May not be accurate.
*
* @var string
*/
public $totalResults;
/**
* Number of search results returned in this set.
*
* @param int $count
*/
public function setCount($count)
{
$this->count = $count;
}
/**
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* Restricts search results to documents originating in a particular country.
* You may use [Boolean operators](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) in the `cr` parameter's
* value. Google WebSearch determines the country of a document by analyzing
* the following: * The top-level domain (TLD) of the document's URL. * The
* geographic location of the web server's IP address. See [Country (cr)
* Parameter Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) for a list of valid
* values for this parameter.
*
* @param string $cr
*/
public function setCr($cr)
{
$this->cr = $cr;
}
/**
* @return string
*/
public function getCr()
{
return $this->cr;
}
/**
* The identifier of an engine created using the Programmable Search Engine
* [Control Panel](https://programmablesearchengine.google.com/). This is a
* custom property not defined in the OpenSearch spec. This parameter is
* **required**.
*
* @param string $cx
*/
public function setCx($cx)
{
$this->cx = $cx;
}
/**
* @return string
*/
public function getCx()
{
return $this->cx;
}
/**
* Restricts results to URLs based on date. Supported values include: *
* `d[number]`: requests results from the specified number of past days. *
* `w[number]`: requests results from the specified number of past weeks. *
* `m[number]`: requests results from the specified number of past months. *
* `y[number]`: requests results from the specified number of past years.
*
* @param string $dateRestrict
*/
public function setDateRestrict($dateRestrict)
{
$this->dateRestrict = $dateRestrict;
}
/**
* @return string
*/
public function getDateRestrict()
{
return $this->dateRestrict;
}
/**
* Enables or disables the [Simplified and Traditional Chinese
* Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch) feature. Supported values
* are: * `0`: enabled (default) * `1`: disabled
*
* @param string $disableCnTwTranslation
*/
public function setDisableCnTwTranslation($disableCnTwTranslation)
{
$this->disableCnTwTranslation = $disableCnTwTranslation;
}
/**
* @return string
*/
public function getDisableCnTwTranslation()
{
return $this->disableCnTwTranslation;
}
/**
* Identifies a phrase that all documents in the search results must contain.
*
* @param string $exactTerms
*/
public function setExactTerms($exactTerms)
{
$this->exactTerms = $exactTerms;
}
/**
* @return string
*/
public function getExactTerms()
{
return $this->exactTerms;
}
/**
* Identifies a word or phrase that should not appear in any documents in the
* search results.
*
* @param string $excludeTerms
*/
public function setExcludeTerms($excludeTerms)
{
$this->excludeTerms = $excludeTerms;
}
/**
* @return string
*/
public function getExcludeTerms()
{
return $this->excludeTerms;
}
/**
* Restricts results to files of a specified extension. Filetypes supported by
* Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript
* (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`,
* `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`)
* * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works
* (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`)
* * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may
* be added in the future. An up-to-date list can always be found in Google's
* [file type FAQ](https://support.google.com/webmasters/answer/35287).
*
* @param string $fileType
*/
public function setFileType($fileType)
{
$this->fileType = $fileType;
}
/**
* @return string
*/
public function getFileType()
{
return $this->fileType;
}
/**
* Activates or deactivates the automatic filtering of Google search results.
* See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information
* about Google's search results filters. Valid values for this parameter are:
* * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google
* applies filtering to all search results to improve the quality of those
* results.
*
* @param string $filter
*/
public function setFilter($filter)
{
$this->filter = $filter;
}
/**
* @return string
*/
public function getFilter()
{
return $this->filter;
}
/**
* Boosts search results whose country of origin matches the parameter value.
* See [Country Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) for a list of valid values.
* Specifying a `gl` parameter value in WebSearch requests should improve the
* relevance of results. This is particularly true for international customers
* and, even more specifically, for customers in English-speaking countries
* other than the United States.
*
* @param string $gl
*/
public function setGl($gl)
{
$this->gl = $gl;
}
/**
* @return string
*/
public function getGl()
{
return $this->gl;
}
/**
* Specifies the Google domain (for example, google.com, google.de, or
* google.fr) to which the search should be limited.
*
* @param string $googleHost
*/
public function setGoogleHost($googleHost)
{
$this->googleHost = $googleHost;
}
/**
* @return string
*/
public function getGoogleHost()
{
return $this->googleHost;
}
/**
* Specifies the ending value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @param string $highRange
*/
public function setHighRange($highRange)
{
$this->highRange = $highRange;
}
/**
* @return string
*/
public function getHighRange()
{
return $this->highRange;
}
/**
* Specifies the interface language (host language) of your user interface.
* Explicitly setting this parameter improves the performance and the quality
* of your search results. See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
*
* @param string $hl
*/
public function setHl($hl)
{
$this->hl = $hl;
}
/**
* @return string
*/
public function getHl()
{
return $this->hl;
}
/**
* Appends the specified query terms to the query, as if they were combined
* with a logical `AND` operator.
*
* @param string $hq
*/
public function setHq($hq)
{
$this->hq = $hq;
}
/**
* @return string
*/
public function getHq()
{
return $this->hq;
}
/**
* Restricts results to images of a specified color type. Supported values
* are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
*
* @param string $imgColorType
*/
public function setImgColorType($imgColorType)
{
$this->imgColorType = $imgColorType;
}
/**
* @return string
*/
public function getImgColorType()
{
return $this->imgColorType;
}
/**
* Restricts results to images with a specific dominant color. Supported
* values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` *
* `purple` * `pink` * `white` * `gray` * `black` * `brown`
*
* @param string $imgDominantColor
*/
public function setImgDominantColor($imgDominantColor)
{
$this->imgDominantColor = $imgDominantColor;
}
/**
* @return string
*/
public function getImgDominantColor()
{
return $this->imgDominantColor;
}
/**
* Restricts results to images of a specified size. Supported values are: *
* `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge`
* (large) * `huge` (extra-large)
*
* @param string $imgSize
*/
public function setImgSize($imgSize)
{
$this->imgSize = $imgSize;
}
/**
* @return string
*/
public function getImgSize()
{
return $this->imgSize;
}
/**
* Restricts results to images of a specified type. Supported values are: *
* `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo`
* (Photo) * `animated` (Animated) * `stock` (Stock)
*
* @param string $imgType
*/
public function setImgType($imgType)
{
$this->imgType = $imgType;
}
/**
* @return string
*/
public function getImgType()
{
return $this->imgType;
}
/**
* The character encoding supported for search requests.
*
* @param string $inputEncoding
*/
public function setInputEncoding($inputEncoding)
{
$this->inputEncoding = $inputEncoding;
}
/**
* @return string
*/
public function getInputEncoding()
{
return $this->inputEncoding;
}
/**
* The language of the search results.
*
* @param string $language
*/
public function setLanguage($language)
{
$this->language = $language;
}
/**
* @return string
*/
public function getLanguage()
{
return $this->language;
}
/**
* Specifies that all results should contain a link to a specific URL.
*
* @param string $linkSite
*/
public function setLinkSite($linkSite)
{
$this->linkSite = $linkSite;
}
/**
* @return string
*/
public function getLinkSite()
{
return $this->linkSite;
}
/**
* Specifies the starting value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @param string $lowRange
*/
public function setLowRange($lowRange)
{
$this->lowRange = $lowRange;
}
/**
* @return string
*/
public function getLowRange()
{
return $this->lowRange;
}
/**
* Provides additional search terms to check for in a document, where each
* document in the search results must contain at least one of the additional
* search terms. You can also use the [Boolean
* OR](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) query term for this type of
* query.
*
* @param string $orTerms
*/
public function setOrTerms($orTerms)
{
$this->orTerms = $orTerms;
}
/**
* @return string
*/
public function getOrTerms()
{
return $this->orTerms;
}
/**
* The character encoding supported for search results.
*
* @param string $outputEncoding
*/
public function setOutputEncoding($outputEncoding)
{
$this->outputEncoding = $outputEncoding;
}
/**
* @return string
*/
public function getOutputEncoding()
{
return $this->outputEncoding;
}
/**
* Specifies that all search results should be pages that are related to the
* specified URL. The parameter value should be a URL.
*
* @param string $relatedSite
*/
public function setRelatedSite($relatedSite)
{
$this->relatedSite = $relatedSite;
}
/**
* @return string
*/
public function getRelatedSite()
{
return $this->relatedSite;
}
/**
* Filters based on licensing. Supported values include: * `cc_publicdomain` *
* `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
*
* @param string $rights
*/
public function setRights($rights)
{
$this->rights = $rights;
}
/**
* @return string
*/
public function getRights()
{
return $this->rights;
}
/**
* Specifies the [SafeSearch level](https://developers.google.com/custom-
* search/docs/json_api_reference#safeSearchLevels) used for filtering out
* adult results. This is a custom property not defined in the OpenSearch
* spec. Valid parameter values are: * `"off"`: Disable SafeSearch *
* `"active"`: Enable SafeSearch
*
* @param string $safe
*/
public function setSafe($safe)
{
$this->safe = $safe;
}
/**
* @return string
*/
public function getSafe()
{
return $this->safe;
}
/**
* The search terms entered by the user.
*
* @param string $searchTerms
*/
public function setSearchTerms($searchTerms)
{
$this->searchTerms = $searchTerms;
}
/**
* @return string
*/
public function getSearchTerms()
{
return $this->searchTerms;
}
/**
* Allowed values are `web` or `image`. If unspecified, results are limited to
* webpages.
*
* @param string $searchType
*/
public function setSearchType($searchType)
{
$this->searchType = $searchType;
}
/**
* @return string
*/
public function getSearchType()
{
return $this->searchType;
}
/**
* Restricts results to URLs from a specified site.
*
* @param string $siteSearch
*/
public function setSiteSearch($siteSearch)
{
$this->siteSearch = $siteSearch;
}
/**
* @return string
*/
public function getSiteSearch()
{
return $this->siteSearch;
}
/**
* Specifies whether to include or exclude results from the site named in the
* `sitesearch` parameter. Supported values are: * `i`: include content from
* site * `e`: exclude content from site
*
* @param string $siteSearchFilter
*/
public function setSiteSearchFilter($siteSearchFilter)
{
$this->siteSearchFilter = $siteSearchFilter;
}
/**
* @return string
*/
public function getSiteSearchFilter()
{
return $this->siteSearchFilter;
}
/**
* Specifies that results should be sorted according to the specified
* expression. For example, sort by date.
*
* @param string $sort
*/
public function setSort($sort)
{
$this->sort = $sort;
}
/**
* @return string
*/
public function getSort()
{
return $this->sort;
}
/**
* The index of the current set of search results into the total set of
* results, where the index of the first result is 1.
*
* @param int $startIndex
*/
public function setStartIndex($startIndex)
{
$this->startIndex = $startIndex;
}
/**
* @return int
*/
public function getStartIndex()
{
return $this->startIndex;
}
/**
* The page number of this set of results, where the page length is set by the
* `count` property.
*
* @param int $startPage
*/
public function setStartPage($startPage)
{
$this->startPage = $startPage;
}
/**
* @return int
*/
public function getStartPage()
{
return $this->startPage;
}
/**
* A description of the query.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Estimated number of total search results. May not be accurate.
*
* @param string $totalResults
*/
public function setTotalResults($totalResults)
{
$this->totalResults = $totalResults;
}
/**
* @return string
*/
public function getTotalResults()
{
return $this->totalResults;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchQueriesPreviousPage::class, 'Google_Service_CustomSearchAPI_SearchQueriesPreviousPage');

View File

@@ -0,0 +1,976 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class SearchQueriesRequest extends \Google\Model
{
/**
* Number of search results returned in this set.
*
* @var int
*/
public $count;
/**
* Restricts search results to documents originating in a particular country.
* You may use [Boolean operators](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) in the `cr` parameter's
* value. Google WebSearch determines the country of a document by analyzing
* the following: * The top-level domain (TLD) of the document's URL. * The
* geographic location of the web server's IP address. See [Country (cr)
* Parameter Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) for a list of valid
* values for this parameter.
*
* @var string
*/
public $cr;
/**
* The identifier of an engine created using the Programmable Search Engine
* [Control Panel](https://programmablesearchengine.google.com/). This is a
* custom property not defined in the OpenSearch spec. This parameter is
* **required**.
*
* @var string
*/
public $cx;
/**
* Restricts results to URLs based on date. Supported values include: *
* `d[number]`: requests results from the specified number of past days. *
* `w[number]`: requests results from the specified number of past weeks. *
* `m[number]`: requests results from the specified number of past months. *
* `y[number]`: requests results from the specified number of past years.
*
* @var string
*/
public $dateRestrict;
/**
* Enables or disables the [Simplified and Traditional Chinese
* Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch) feature. Supported values
* are: * `0`: enabled (default) * `1`: disabled
*
* @var string
*/
public $disableCnTwTranslation;
/**
* Identifies a phrase that all documents in the search results must contain.
*
* @var string
*/
public $exactTerms;
/**
* Identifies a word or phrase that should not appear in any documents in the
* search results.
*
* @var string
*/
public $excludeTerms;
/**
* Restricts results to files of a specified extension. Filetypes supported by
* Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript
* (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`,
* `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`)
* * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works
* (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`)
* * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may
* be added in the future. An up-to-date list can always be found in Google's
* [file type FAQ](https://support.google.com/webmasters/answer/35287).
*
* @var string
*/
public $fileType;
/**
* Activates or deactivates the automatic filtering of Google search results.
* See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information
* about Google's search results filters. Valid values for this parameter are:
* * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google
* applies filtering to all search results to improve the quality of those
* results.
*
* @var string
*/
public $filter;
/**
* Boosts search results whose country of origin matches the parameter value.
* See [Country Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) for a list of valid values.
* Specifying a `gl` parameter value in WebSearch requests should improve the
* relevance of results. This is particularly true for international customers
* and, even more specifically, for customers in English-speaking countries
* other than the United States.
*
* @var string
*/
public $gl;
/**
* Specifies the Google domain (for example, google.com, google.de, or
* google.fr) to which the search should be limited.
*
* @var string
*/
public $googleHost;
/**
* Specifies the ending value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @var string
*/
public $highRange;
/**
* Specifies the interface language (host language) of your user interface.
* Explicitly setting this parameter improves the performance and the quality
* of your search results. See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
*
* @var string
*/
public $hl;
/**
* Appends the specified query terms to the query, as if they were combined
* with a logical `AND` operator.
*
* @var string
*/
public $hq;
/**
* Restricts results to images of a specified color type. Supported values
* are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
*
* @var string
*/
public $imgColorType;
/**
* Restricts results to images with a specific dominant color. Supported
* values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` *
* `purple` * `pink` * `white` * `gray` * `black` * `brown`
*
* @var string
*/
public $imgDominantColor;
/**
* Restricts results to images of a specified size. Supported values are: *
* `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge`
* (large) * `huge` (extra-large)
*
* @var string
*/
public $imgSize;
/**
* Restricts results to images of a specified type. Supported values are: *
* `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo`
* (Photo) * `animated` (Animated) * `stock` (Stock)
*
* @var string
*/
public $imgType;
/**
* The character encoding supported for search requests.
*
* @var string
*/
public $inputEncoding;
/**
* The language of the search results.
*
* @var string
*/
public $language;
/**
* Specifies that all results should contain a link to a specific URL.
*
* @var string
*/
public $linkSite;
/**
* Specifies the starting value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @var string
*/
public $lowRange;
/**
* Provides additional search terms to check for in a document, where each
* document in the search results must contain at least one of the additional
* search terms. You can also use the [Boolean
* OR](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) query term for this type of
* query.
*
* @var string
*/
public $orTerms;
/**
* The character encoding supported for search results.
*
* @var string
*/
public $outputEncoding;
/**
* Specifies that all search results should be pages that are related to the
* specified URL. The parameter value should be a URL.
*
* @var string
*/
public $relatedSite;
/**
* Filters based on licensing. Supported values include: * `cc_publicdomain` *
* `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
*
* @var string
*/
public $rights;
/**
* Specifies the [SafeSearch level](https://developers.google.com/custom-
* search/docs/json_api_reference#safeSearchLevels) used for filtering out
* adult results. This is a custom property not defined in the OpenSearch
* spec. Valid parameter values are: * `"off"`: Disable SafeSearch *
* `"active"`: Enable SafeSearch
*
* @var string
*/
public $safe;
/**
* The search terms entered by the user.
*
* @var string
*/
public $searchTerms;
/**
* Allowed values are `web` or `image`. If unspecified, results are limited to
* webpages.
*
* @var string
*/
public $searchType;
/**
* Restricts results to URLs from a specified site.
*
* @var string
*/
public $siteSearch;
/**
* Specifies whether to include or exclude results from the site named in the
* `sitesearch` parameter. Supported values are: * `i`: include content from
* site * `e`: exclude content from site
*
* @var string
*/
public $siteSearchFilter;
/**
* Specifies that results should be sorted according to the specified
* expression. For example, sort by date.
*
* @var string
*/
public $sort;
/**
* The index of the current set of search results into the total set of
* results, where the index of the first result is 1.
*
* @var int
*/
public $startIndex;
/**
* The page number of this set of results, where the page length is set by the
* `count` property.
*
* @var int
*/
public $startPage;
/**
* A description of the query.
*
* @var string
*/
public $title;
/**
* Estimated number of total search results. May not be accurate.
*
* @var string
*/
public $totalResults;
/**
* Number of search results returned in this set.
*
* @param int $count
*/
public function setCount($count)
{
$this->count = $count;
}
/**
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* Restricts search results to documents originating in a particular country.
* You may use [Boolean operators](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) in the `cr` parameter's
* value. Google WebSearch determines the country of a document by analyzing
* the following: * The top-level domain (TLD) of the document's URL. * The
* geographic location of the web server's IP address. See [Country (cr)
* Parameter Values](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCollections) for a list of valid
* values for this parameter.
*
* @param string $cr
*/
public function setCr($cr)
{
$this->cr = $cr;
}
/**
* @return string
*/
public function getCr()
{
return $this->cr;
}
/**
* The identifier of an engine created using the Programmable Search Engine
* [Control Panel](https://programmablesearchengine.google.com/). This is a
* custom property not defined in the OpenSearch spec. This parameter is
* **required**.
*
* @param string $cx
*/
public function setCx($cx)
{
$this->cx = $cx;
}
/**
* @return string
*/
public function getCx()
{
return $this->cx;
}
/**
* Restricts results to URLs based on date. Supported values include: *
* `d[number]`: requests results from the specified number of past days. *
* `w[number]`: requests results from the specified number of past weeks. *
* `m[number]`: requests results from the specified number of past months. *
* `y[number]`: requests results from the specified number of past years.
*
* @param string $dateRestrict
*/
public function setDateRestrict($dateRestrict)
{
$this->dateRestrict = $dateRestrict;
}
/**
* @return string
*/
public function getDateRestrict()
{
return $this->dateRestrict;
}
/**
* Enables or disables the [Simplified and Traditional Chinese
* Search](https://developers.google.com/custom-
* search/docs/json_api_reference#chineseSearch) feature. Supported values
* are: * `0`: enabled (default) * `1`: disabled
*
* @param string $disableCnTwTranslation
*/
public function setDisableCnTwTranslation($disableCnTwTranslation)
{
$this->disableCnTwTranslation = $disableCnTwTranslation;
}
/**
* @return string
*/
public function getDisableCnTwTranslation()
{
return $this->disableCnTwTranslation;
}
/**
* Identifies a phrase that all documents in the search results must contain.
*
* @param string $exactTerms
*/
public function setExactTerms($exactTerms)
{
$this->exactTerms = $exactTerms;
}
/**
* @return string
*/
public function getExactTerms()
{
return $this->exactTerms;
}
/**
* Identifies a word or phrase that should not appear in any documents in the
* search results.
*
* @param string $excludeTerms
*/
public function setExcludeTerms($excludeTerms)
{
$this->excludeTerms = $excludeTerms;
}
/**
* @return string
*/
public function getExcludeTerms()
{
return $this->excludeTerms;
}
/**
* Restricts results to files of a specified extension. Filetypes supported by
* Google include: * Adobe Portable Document Format (`pdf`) * Adobe PostScript
* (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`, `wki`, `wks`,
* `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft Excel (`xls`)
* * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) * Microsoft Works
* (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text Format (`rtf`)
* * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional filetypes may
* be added in the future. An up-to-date list can always be found in Google's
* [file type FAQ](https://support.google.com/webmasters/answer/35287).
*
* @param string $fileType
*/
public function setFileType($fileType)
{
$this->fileType = $fileType;
}
/**
* @return string
*/
public function getFileType()
{
return $this->fileType;
}
/**
* Activates or deactivates the automatic filtering of Google search results.
* See [Automatic Filtering](https://developers.google.com/custom-
* search/docs/json_api_reference#automaticFiltering) for more information
* about Google's search results filters. Valid values for this parameter are:
* * `0`: Disabled * `1`: Enabled (default) **Note**: By default, Google
* applies filtering to all search results to improve the quality of those
* results.
*
* @param string $filter
*/
public function setFilter($filter)
{
$this->filter = $filter;
}
/**
* @return string
*/
public function getFilter()
{
return $this->filter;
}
/**
* Boosts search results whose country of origin matches the parameter value.
* See [Country Codes](https://developers.google.com/custom-
* search/docs/json_api_reference#countryCodes) for a list of valid values.
* Specifying a `gl` parameter value in WebSearch requests should improve the
* relevance of results. This is particularly true for international customers
* and, even more specifically, for customers in English-speaking countries
* other than the United States.
*
* @param string $gl
*/
public function setGl($gl)
{
$this->gl = $gl;
}
/**
* @return string
*/
public function getGl()
{
return $this->gl;
}
/**
* Specifies the Google domain (for example, google.com, google.de, or
* google.fr) to which the search should be limited.
*
* @param string $googleHost
*/
public function setGoogleHost($googleHost)
{
$this->googleHost = $googleHost;
}
/**
* @return string
*/
public function getGoogleHost()
{
return $this->googleHost;
}
/**
* Specifies the ending value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @param string $highRange
*/
public function setHighRange($highRange)
{
$this->highRange = $highRange;
}
/**
* @return string
*/
public function getHighRange()
{
return $this->highRange;
}
/**
* Specifies the interface language (host language) of your user interface.
* Explicitly setting this parameter improves the performance and the quality
* of your search results. See the [Interface
* Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInterfaceLanguages) section of
* [Internationalizing Queries and Results
* Presentation](https://developers.google.com/custom-
* search/docs/json_api_reference#wsInternationalizing) for more information,
* and [Supported Interface Languages](https://developers.google.com/custom-
* search/docs/json_api_reference#interfaceLanguages) for a list of supported
* languages.
*
* @param string $hl
*/
public function setHl($hl)
{
$this->hl = $hl;
}
/**
* @return string
*/
public function getHl()
{
return $this->hl;
}
/**
* Appends the specified query terms to the query, as if they were combined
* with a logical `AND` operator.
*
* @param string $hq
*/
public function setHq($hq)
{
$this->hq = $hq;
}
/**
* @return string
*/
public function getHq()
{
return $this->hq;
}
/**
* Restricts results to images of a specified color type. Supported values
* are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)
*
* @param string $imgColorType
*/
public function setImgColorType($imgColorType)
{
$this->imgColorType = $imgColorType;
}
/**
* @return string
*/
public function getImgColorType()
{
return $this->imgColorType;
}
/**
* Restricts results to images with a specific dominant color. Supported
* values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` *
* `purple` * `pink` * `white` * `gray` * `black` * `brown`
*
* @param string $imgDominantColor
*/
public function setImgDominantColor($imgDominantColor)
{
$this->imgDominantColor = $imgDominantColor;
}
/**
* @return string
*/
public function getImgDominantColor()
{
return $this->imgDominantColor;
}
/**
* Restricts results to images of a specified size. Supported values are: *
* `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge`
* (large) * `huge` (extra-large)
*
* @param string $imgSize
*/
public function setImgSize($imgSize)
{
$this->imgSize = $imgSize;
}
/**
* @return string
*/
public function getImgSize()
{
return $this->imgSize;
}
/**
* Restricts results to images of a specified type. Supported values are: *
* `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) * `photo`
* (Photo) * `animated` (Animated) * `stock` (Stock)
*
* @param string $imgType
*/
public function setImgType($imgType)
{
$this->imgType = $imgType;
}
/**
* @return string
*/
public function getImgType()
{
return $this->imgType;
}
/**
* The character encoding supported for search requests.
*
* @param string $inputEncoding
*/
public function setInputEncoding($inputEncoding)
{
$this->inputEncoding = $inputEncoding;
}
/**
* @return string
*/
public function getInputEncoding()
{
return $this->inputEncoding;
}
/**
* The language of the search results.
*
* @param string $language
*/
public function setLanguage($language)
{
$this->language = $language;
}
/**
* @return string
*/
public function getLanguage()
{
return $this->language;
}
/**
* Specifies that all results should contain a link to a specific URL.
*
* @param string $linkSite
*/
public function setLinkSite($linkSite)
{
$this->linkSite = $linkSite;
}
/**
* @return string
*/
public function getLinkSite()
{
return $this->linkSite;
}
/**
* Specifies the starting value for a search range. Use `cse:lowRange` and
* `cse:highrange` to append an inclusive search range of
* `lowRange...highRange` to the query.
*
* @param string $lowRange
*/
public function setLowRange($lowRange)
{
$this->lowRange = $lowRange;
}
/**
* @return string
*/
public function getLowRange()
{
return $this->lowRange;
}
/**
* Provides additional search terms to check for in a document, where each
* document in the search results must contain at least one of the additional
* search terms. You can also use the [Boolean
* OR](https://developers.google.com/custom-
* search/docs/json_api_reference#BooleanOrSearch) query term for this type of
* query.
*
* @param string $orTerms
*/
public function setOrTerms($orTerms)
{
$this->orTerms = $orTerms;
}
/**
* @return string
*/
public function getOrTerms()
{
return $this->orTerms;
}
/**
* The character encoding supported for search results.
*
* @param string $outputEncoding
*/
public function setOutputEncoding($outputEncoding)
{
$this->outputEncoding = $outputEncoding;
}
/**
* @return string
*/
public function getOutputEncoding()
{
return $this->outputEncoding;
}
/**
* Specifies that all search results should be pages that are related to the
* specified URL. The parameter value should be a URL.
*
* @param string $relatedSite
*/
public function setRelatedSite($relatedSite)
{
$this->relatedSite = $relatedSite;
}
/**
* @return string
*/
public function getRelatedSite()
{
return $this->relatedSite;
}
/**
* Filters based on licensing. Supported values include: * `cc_publicdomain` *
* `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`
*
* @param string $rights
*/
public function setRights($rights)
{
$this->rights = $rights;
}
/**
* @return string
*/
public function getRights()
{
return $this->rights;
}
/**
* Specifies the [SafeSearch level](https://developers.google.com/custom-
* search/docs/json_api_reference#safeSearchLevels) used for filtering out
* adult results. This is a custom property not defined in the OpenSearch
* spec. Valid parameter values are: * `"off"`: Disable SafeSearch *
* `"active"`: Enable SafeSearch
*
* @param string $safe
*/
public function setSafe($safe)
{
$this->safe = $safe;
}
/**
* @return string
*/
public function getSafe()
{
return $this->safe;
}
/**
* The search terms entered by the user.
*
* @param string $searchTerms
*/
public function setSearchTerms($searchTerms)
{
$this->searchTerms = $searchTerms;
}
/**
* @return string
*/
public function getSearchTerms()
{
return $this->searchTerms;
}
/**
* Allowed values are `web` or `image`. If unspecified, results are limited to
* webpages.
*
* @param string $searchType
*/
public function setSearchType($searchType)
{
$this->searchType = $searchType;
}
/**
* @return string
*/
public function getSearchType()
{
return $this->searchType;
}
/**
* Restricts results to URLs from a specified site.
*
* @param string $siteSearch
*/
public function setSiteSearch($siteSearch)
{
$this->siteSearch = $siteSearch;
}
/**
* @return string
*/
public function getSiteSearch()
{
return $this->siteSearch;
}
/**
* Specifies whether to include or exclude results from the site named in the
* `sitesearch` parameter. Supported values are: * `i`: include content from
* site * `e`: exclude content from site
*
* @param string $siteSearchFilter
*/
public function setSiteSearchFilter($siteSearchFilter)
{
$this->siteSearchFilter = $siteSearchFilter;
}
/**
* @return string
*/
public function getSiteSearchFilter()
{
return $this->siteSearchFilter;
}
/**
* Specifies that results should be sorted according to the specified
* expression. For example, sort by date.
*
* @param string $sort
*/
public function setSort($sort)
{
$this->sort = $sort;
}
/**
* @return string
*/
public function getSort()
{
return $this->sort;
}
/**
* The index of the current set of search results into the total set of
* results, where the index of the first result is 1.
*
* @param int $startIndex
*/
public function setStartIndex($startIndex)
{
$this->startIndex = $startIndex;
}
/**
* @return int
*/
public function getStartIndex()
{
return $this->startIndex;
}
/**
* The page number of this set of results, where the page length is set by the
* `count` property.
*
* @param int $startPage
*/
public function setStartPage($startPage)
{
$this->startPage = $startPage;
}
/**
* @return int
*/
public function getStartPage()
{
return $this->startPage;
}
/**
* A description of the query.
*
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Estimated number of total search results. May not be accurate.
*
* @param string $totalResults
*/
public function setTotalResults($totalResults)
{
$this->totalResults = $totalResults;
}
/**
* @return string
*/
public function getTotalResults()
{
return $this->totalResults;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchQueriesRequest::class, 'Google_Service_CustomSearchAPI_SearchQueriesRequest');

View File

@@ -0,0 +1,108 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class SearchSearchInformation extends \Google\Model
{
/**
* The time taken for the server to return search results, formatted according
* to locale style.
*
* @var string
*/
public $formattedSearchTime;
/**
* The total number of search results, formatted according to locale style.
*
* @var string
*/
public $formattedTotalResults;
/**
* The time taken for the server to return search results.
*
* @var
*/
public $searchTime;
/**
* The total number of search results returned by the query.
*
* @var string
*/
public $totalResults;
/**
* The time taken for the server to return search results, formatted according
* to locale style.
*
* @param string $formattedSearchTime
*/
public function setFormattedSearchTime($formattedSearchTime)
{
$this->formattedSearchTime = $formattedSearchTime;
}
/**
* @return string
*/
public function getFormattedSearchTime()
{
return $this->formattedSearchTime;
}
/**
* The total number of search results, formatted according to locale style.
*
* @param string $formattedTotalResults
*/
public function setFormattedTotalResults($formattedTotalResults)
{
$this->formattedTotalResults = $formattedTotalResults;
}
/**
* @return string
*/
public function getFormattedTotalResults()
{
return $this->formattedTotalResults;
}
public function setSearchTime($searchTime)
{
$this->searchTime = $searchTime;
}
public function getSearchTime()
{
return $this->searchTime;
}
/**
* The total number of search results returned by the query.
*
* @param string $totalResults
*/
public function setTotalResults($totalResults)
{
$this->totalResults = $totalResults;
}
/**
* @return string
*/
public function getTotalResults()
{
return $this->totalResults;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchSearchInformation::class, 'Google_Service_CustomSearchAPI_SearchSearchInformation');

View File

@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class SearchSpelling extends \Google\Model
{
/**
* The corrected query.
*
* @var string
*/
public $correctedQuery;
/**
* The corrected query, formatted in HTML.
*
* @var string
*/
public $htmlCorrectedQuery;
/**
* The corrected query.
*
* @param string $correctedQuery
*/
public function setCorrectedQuery($correctedQuery)
{
$this->correctedQuery = $correctedQuery;
}
/**
* @return string
*/
public function getCorrectedQuery()
{
return $this->correctedQuery;
}
/**
* The corrected query, formatted in HTML.
*
* @param string $htmlCorrectedQuery
*/
public function setHtmlCorrectedQuery($htmlCorrectedQuery)
{
$this->htmlCorrectedQuery = $htmlCorrectedQuery;
}
/**
* @return string
*/
public function getHtmlCorrectedQuery()
{
return $this->htmlCorrectedQuery;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchSpelling::class, 'Google_Service_CustomSearchAPI_SearchSpelling');

View File

@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 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.
*/
namespace Google\Service\CustomSearchAPI;
class SearchUrl extends \Google\Model
{
/**
* The actual [OpenSearch template](http://www.opensearch.org/specifications/o
* pensearch/1.1#opensearch_url_template_syntax) for this API.
*
* @var string
*/
public $template;
/**
* The MIME type of the OpenSearch URL template for the Custom Search JSON
* API.
*
* @var string
*/
public $type;
/**
* The actual [OpenSearch template](http://www.opensearch.org/specifications/o
* pensearch/1.1#opensearch_url_template_syntax) for this API.
*
* @param string $template
*/
public function setTemplate($template)
{
$this->template = $template;
}
/**
* @return string
*/
public function getTemplate()
{
return $this->template;
}
/**
* The MIME type of the OpenSearch URL template for the Custom Search JSON
* API.
*
* @param string $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SearchUrl::class, 'Google_Service_CustomSearchAPI_SearchUrl');