models.py•39.2 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-07-08T17:07:02+00:00
from __future__ import annotations
from enum import Enum
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Field
class BodyLine(BaseModel):
htmlTitle: Optional[str] = Field(
None, description="The block object's text in HTML, if it has text."
)
link: Optional[str] = Field(
None,
description="The anchor text of the block object's link, if it has a link.",
)
title: Optional[str] = Field(
None, description="The block object's text, if it has text."
)
url: Optional[str] = Field(
None, description="The URL of the block object's link, if it has one."
)
class Image(BaseModel):
height: Optional[int] = Field(None, description='Image height in pixels.')
source: Optional[str] = Field(
None, description='URL of the image for this promotion link.'
)
width: Optional[int] = Field(None, description='Image width in pixels.')
class Promotion(BaseModel):
bodyLines: Optional[List[BodyLine]] = Field(
None, description='An array of block objects for this promotion.'
)
displayLink: Optional[str] = Field(
None,
description="An abridged version of this search's result URL, e.g. www.example.com.",
)
htmlTitle: Optional[str] = Field(
None, description='The title of the promotion, in HTML.'
)
image: Optional[Image] = Field(None, description='Image belonging to a promotion.')
link: Optional[str] = Field(None, description='The URL of the promotion.')
title: Optional[str] = Field(None, description='The title of the promotion.')
class Image1(BaseModel):
byteSize: Optional[int] = Field(
None, description='The size of the image, in bytes.'
)
contextLink: Optional[str] = Field(
None, description='A URL pointing to the webpage hosting the image.'
)
height: Optional[int] = Field(
None, description='The height of the image, in pixels.'
)
thumbnailHeight: Optional[int] = Field(
None, description='The height of the thumbnail image, in pixels.'
)
thumbnailLink: Optional[str] = Field(
None, description='A URL to the thumbnail image.'
)
thumbnailWidth: Optional[int] = Field(
None, description='The width of the thumbnail image, in pixels.'
)
width: Optional[int] = Field(None, description='The width of the image, in pixels.')
class Label(BaseModel):
displayName: Optional[str] = Field(
None,
description='The display name of a refinement label. This is the name you should display in your user interface.',
)
label_with_op: Optional[str] = Field(
None, description='Refinement label and the associated refinement operation.'
)
name: Optional[str] = Field(
None,
description="The name of a refinement label, which you can use to refine searches. Don't display this in your user interface; instead, use displayName.",
)
class Result(BaseModel):
cacheId: Optional[str] = Field(
None,
description="Indicates the ID of Google's cached version of the search result.",
)
displayLink: Optional[str] = Field(
None,
description='An abridged version of this search result’s URL, e.g. www.example.com.',
)
fileFormat: Optional[str] = Field(
None, description='The file format of the search result.'
)
formattedUrl: Optional[str] = Field(
None, description='The URL displayed after the snippet for each search result.'
)
htmlFormattedUrl: Optional[str] = Field(
None,
description='The HTML-formatted URL displayed after the snippet for each search result.',
)
htmlSnippet: Optional[str] = Field(
None, description='The snippet of the search result, in HTML.'
)
htmlTitle: Optional[str] = Field(
None, description='The title of the search result, in HTML.'
)
image: Optional[Image1] = Field(
None, description='Image belonging to a custom search result.'
)
kind: Optional[str] = Field(
None,
description='A unique identifier for the type of current object. For this API, it is `customsearch#result.`',
)
labels: Optional[List[Label]] = Field(
None, description='Encapsulates all information about refinement labels.'
)
link: Optional[str] = Field(
None,
description='The full URL to which the search result is pointing, e.g. http://www.example.com/foo/bar.',
)
mime: Optional[str] = Field(None, description='The MIME type of the search result.')
pagemap: Optional[Dict[str, Any]] = Field(
None,
description='Contains [PageMap](https://developers.google.com/custom-search/docs/structured_data#pagemaps) information for this search result.',
)
snippet: Optional[str] = Field(
None, description='The snippet of the search result, in plain text.'
)
title: Optional[str] = Field(
None, description='The title of the search result, in plain text.'
)
class NextPageItem(BaseModel):
count: Optional[int] = Field(
None, description='Number of search results returned in this set.'
)
cr: Optional[str] = Field(
None,
description="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.",
)
cx: Optional[str] = Field(
None,
description='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**.',
)
dateRestrict: Optional[str] = Field(
None,
description='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.',
)
disableCnTwTranslation: Optional[str] = Field(
None,
description='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',
)
exactTerms: Optional[str] = Field(
None,
description='Identifies a phrase that all documents in the search results must contain.',
)
excludeTerms: Optional[str] = Field(
None,
description='Identifies a word or phrase that should not appear in any documents in the search results.',
)
fileType: Optional[str] = Field(
None,
description="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).",
)
filter: Optional[str] = Field(
None,
description="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.",
)
gl: Optional[str] = Field(
None,
description='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.',
)
googleHost: Optional[str] = Field(
None,
description='Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited.',
)
highRange: Optional[str] = Field(
None,
description='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.',
)
hl: Optional[str] = Field(
None,
description='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.',
)
hq: Optional[str] = Field(
None,
description='Appends the specified query terms to the query, as if they were combined with a logical `AND` operator.',
)
imgColorType: Optional[str] = Field(
None,
description='Restricts results to images of a specified color type. Supported values are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)',
)
imgDominantColor: Optional[str] = Field(
None,
description='Restricts results to images with a specific dominant color. Supported values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`',
)
imgSize: Optional[str] = Field(
None,
description='Restricts results to images of a specified size. Supported values are: * `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge` (large) * `huge` (extra-large)',
)
imgType: Optional[str] = Field(
None,
description='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)',
)
inputEncoding: Optional[str] = Field(
None, description='The character encoding supported for search requests.'
)
language: Optional[str] = Field(
None, description='The language of the search results.'
)
linkSite: Optional[str] = Field(
None,
description='Specifies that all results should contain a link to a specific URL.',
)
lowRange: Optional[str] = Field(
None,
description='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.',
)
orTerms: Optional[str] = Field(
None,
description='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.',
)
outputEncoding: Optional[str] = Field(
None, description='The character encoding supported for search results.'
)
relatedSite: Optional[str] = Field(
None,
description='Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL.',
)
rights: Optional[str] = Field(
None,
description='Filters based on licensing. Supported values include: * `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`',
)
safe: Optional[str] = Field(
None,
description='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',
)
searchTerms: Optional[str] = Field(
None, description='The search terms entered by the user.'
)
searchType: Optional[str] = Field(
None,
description='Allowed values are `web` or `image`. If unspecified, results are limited to webpages.',
)
siteSearch: Optional[str] = Field(
None, description='Restricts results to URLs from a specified site.'
)
siteSearchFilter: Optional[str] = Field(
None,
description='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',
)
sort: Optional[str] = Field(
None,
description='Specifies that results should be sorted according to the specified expression. For example, sort by date.',
)
startIndex: Optional[int] = Field(
None,
description='The index of the current set of search results into the total set of results, where the index of the first result is 1.',
)
startPage: Optional[int] = Field(
None,
description='The page number of this set of results, where the page length is set by the `count` property.',
)
title: Optional[str] = Field(None, description='A description of the query.')
totalResults: Optional[str] = Field(
None,
description='Estimated number of total search results. May not be accurate.',
)
class PreviousPageItem(BaseModel):
count: Optional[int] = Field(
None, description='Number of search results returned in this set.'
)
cr: Optional[str] = Field(
None,
description="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.",
)
cx: Optional[str] = Field(
None,
description='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**.',
)
dateRestrict: Optional[str] = Field(
None,
description='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.',
)
disableCnTwTranslation: Optional[str] = Field(
None,
description='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',
)
exactTerms: Optional[str] = Field(
None,
description='Identifies a phrase that all documents in the search results must contain.',
)
excludeTerms: Optional[str] = Field(
None,
description='Identifies a word or phrase that should not appear in any documents in the search results.',
)
fileType: Optional[str] = Field(
None,
description="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).",
)
filter: Optional[str] = Field(
None,
description="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.",
)
gl: Optional[str] = Field(
None,
description='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.',
)
googleHost: Optional[str] = Field(
None,
description='Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited.',
)
highRange: Optional[str] = Field(
None,
description='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.',
)
hl: Optional[str] = Field(
None,
description='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.',
)
hq: Optional[str] = Field(
None,
description='Appends the specified query terms to the query, as if they were combined with a logical `AND` operator.',
)
imgColorType: Optional[str] = Field(
None,
description='Restricts results to images of a specified color type. Supported values are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)',
)
imgDominantColor: Optional[str] = Field(
None,
description='Restricts results to images with a specific dominant color. Supported values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`',
)
imgSize: Optional[str] = Field(
None,
description='Restricts results to images of a specified size. Supported values are: * `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge` (large) * `huge` (extra-large)',
)
imgType: Optional[str] = Field(
None,
description='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)',
)
inputEncoding: Optional[str] = Field(
None, description='The character encoding supported for search requests.'
)
language: Optional[str] = Field(
None, description='The language of the search results.'
)
linkSite: Optional[str] = Field(
None,
description='Specifies that all results should contain a link to a specific URL.',
)
lowRange: Optional[str] = Field(
None,
description='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.',
)
orTerms: Optional[str] = Field(
None,
description='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.',
)
outputEncoding: Optional[str] = Field(
None, description='The character encoding supported for search results.'
)
relatedSite: Optional[str] = Field(
None,
description='Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL.',
)
rights: Optional[str] = Field(
None,
description='Filters based on licensing. Supported values include: * `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`',
)
safe: Optional[str] = Field(
None,
description='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',
)
searchTerms: Optional[str] = Field(
None, description='The search terms entered by the user.'
)
searchType: Optional[str] = Field(
None,
description='Allowed values are `web` or `image`. If unspecified, results are limited to webpages.',
)
siteSearch: Optional[str] = Field(
None, description='Restricts results to URLs from a specified site.'
)
siteSearchFilter: Optional[str] = Field(
None,
description='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',
)
sort: Optional[str] = Field(
None,
description='Specifies that results should be sorted according to the specified expression. For example, sort by date.',
)
startIndex: Optional[int] = Field(
None,
description='The index of the current set of search results into the total set of results, where the index of the first result is 1.',
)
startPage: Optional[int] = Field(
None,
description='The page number of this set of results, where the page length is set by the `count` property.',
)
title: Optional[str] = Field(None, description='A description of the query.')
totalResults: Optional[str] = Field(
None,
description='Estimated number of total search results. May not be accurate.',
)
class RequestItem(BaseModel):
count: Optional[int] = Field(
None, description='Number of search results returned in this set.'
)
cr: Optional[str] = Field(
None,
description="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.",
)
cx: Optional[str] = Field(
None,
description='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**.',
)
dateRestrict: Optional[str] = Field(
None,
description='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.',
)
disableCnTwTranslation: Optional[str] = Field(
None,
description='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',
)
exactTerms: Optional[str] = Field(
None,
description='Identifies a phrase that all documents in the search results must contain.',
)
excludeTerms: Optional[str] = Field(
None,
description='Identifies a word or phrase that should not appear in any documents in the search results.',
)
fileType: Optional[str] = Field(
None,
description="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).",
)
filter: Optional[str] = Field(
None,
description="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.",
)
gl: Optional[str] = Field(
None,
description='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.',
)
googleHost: Optional[str] = Field(
None,
description='Specifies the Google domain (for example, google.com, google.de, or google.fr) to which the search should be limited.',
)
highRange: Optional[str] = Field(
None,
description='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.',
)
hl: Optional[str] = Field(
None,
description='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.',
)
hq: Optional[str] = Field(
None,
description='Appends the specified query terms to the query, as if they were combined with a logical `AND` operator.',
)
imgColorType: Optional[str] = Field(
None,
description='Restricts results to images of a specified color type. Supported values are: * `mono` (black and white) * `gray` (grayscale) * `color` (color)',
)
imgDominantColor: Optional[str] = Field(
None,
description='Restricts results to images with a specific dominant color. Supported values are: * `red` * `orange` * `yellow` * `green` * `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`',
)
imgSize: Optional[str] = Field(
None,
description='Restricts results to images of a specified size. Supported values are: * `icon` (small) * `small | medium | large | xlarge` (medium) * `xxlarge` (large) * `huge` (extra-large)',
)
imgType: Optional[str] = Field(
None,
description='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)',
)
inputEncoding: Optional[str] = Field(
None, description='The character encoding supported for search requests.'
)
language: Optional[str] = Field(
None, description='The language of the search results.'
)
linkSite: Optional[str] = Field(
None,
description='Specifies that all results should contain a link to a specific URL.',
)
lowRange: Optional[str] = Field(
None,
description='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.',
)
orTerms: Optional[str] = Field(
None,
description='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.',
)
outputEncoding: Optional[str] = Field(
None, description='The character encoding supported for search results.'
)
relatedSite: Optional[str] = Field(
None,
description='Specifies that all search results should be pages that are related to the specified URL. The parameter value should be a URL.',
)
rights: Optional[str] = Field(
None,
description='Filters based on licensing. Supported values include: * `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` * `cc_nonderived`',
)
safe: Optional[str] = Field(
None,
description='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',
)
searchTerms: Optional[str] = Field(
None, description='The search terms entered by the user.'
)
searchType: Optional[str] = Field(
None,
description='Allowed values are `web` or `image`. If unspecified, results are limited to webpages.',
)
siteSearch: Optional[str] = Field(
None, description='Restricts results to URLs from a specified site.'
)
siteSearchFilter: Optional[str] = Field(
None,
description='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',
)
sort: Optional[str] = Field(
None,
description='Specifies that results should be sorted according to the specified expression. For example, sort by date.',
)
startIndex: Optional[int] = Field(
None,
description='The index of the current set of search results into the total set of results, where the index of the first result is 1.',
)
startPage: Optional[int] = Field(
None,
description='The page number of this set of results, where the page length is set by the `count` property.',
)
title: Optional[str] = Field(None, description='A description of the query.')
totalResults: Optional[str] = Field(
None,
description='Estimated number of total search results. May not be accurate.',
)
class Queries(BaseModel):
nextPage: Optional[List[NextPageItem]] = Field(
None,
description='Metadata representing the next page of results, if applicable.',
)
previousPage: Optional[List[PreviousPageItem]] = Field(
None,
description='Metadata representing the previous page of results, if applicable.',
)
request: Optional[List[RequestItem]] = Field(
None, description='Metadata representing the current request.'
)
class SearchInformation(BaseModel):
formattedSearchTime: Optional[str] = Field(
None,
description='The time taken for the server to return search results, formatted according to locale style.',
)
formattedTotalResults: Optional[str] = Field(
None,
description='The total number of search results, formatted according to locale style.',
)
searchTime: Optional[float] = Field(
None, description='The time taken for the server to return search results.'
)
totalResults: Optional[str] = Field(
None, description='The total number of search results returned by the query.'
)
class Spelling(BaseModel):
correctedQuery: Optional[str] = Field(None, description='The corrected query.')
htmlCorrectedQuery: Optional[str] = Field(
None, description='The corrected query, formatted in HTML.'
)
class Url(BaseModel):
template: Optional[str] = Field(
None,
description='The actual [OpenSearch template](http://www.opensearch.org/specifications/opensearch/1.1#opensearch_url_template_syntax) for this API.',
)
type: Optional[str] = Field(
None,
description='The MIME type of the OpenSearch URL template for the Custom Search JSON API.',
)
class Search(BaseModel):
context: Optional[Dict[str, Any]] = Field(
None,
description='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.',
)
items: Optional[List[Result]] = Field(
None, description='The current set of custom search results.'
)
kind: Optional[str] = Field(
None,
description='Unique identifier for the type of current object. For this API, it is customsearch#search.',
)
promotions: Optional[List[Promotion]] = Field(
None,
description="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.",
)
queries: Optional[Queries] = Field(
None,
description='Query metadata for the previous, current, and next pages of results.',
)
searchInformation: Optional[SearchInformation] = Field(
None, description='Metadata about a search operation.'
)
spelling: Optional[Spelling] = Field(
None, description='Spell correction information for a query.'
)
url: Optional[Url] = Field(None, description='OpenSearch template and URL.')
class ImgColorType(Enum):
imgColorTypeUndefined = 'imgColorTypeUndefined'
mono = 'mono'
gray = 'gray'
color = 'color'
trans = 'trans'
class ImgDominantColor(Enum):
imgDominantColorUndefined = 'imgDominantColorUndefined'
black = 'black'
blue = 'blue'
brown = 'brown'
gray = 'gray'
green = 'green'
orange = 'orange'
pink = 'pink'
purple = 'purple'
red = 'red'
teal = 'teal'
white = 'white'
yellow = 'yellow'
class ImgSize(Enum):
imgSizeUndefined = 'imgSizeUndefined'
HUGE = 'HUGE'
ICON = 'ICON'
LARGE = 'LARGE'
MEDIUM = 'MEDIUM'
SMALL = 'SMALL'
XLARGE = 'XLARGE'
XXLARGE = 'XXLARGE'
class ImgType(Enum):
imgTypeUndefined = 'imgTypeUndefined'
clipart = 'clipart'
face = 'face'
lineart = 'lineart'
stock = 'stock'
photo = 'photo'
animated = 'animated'
class Safe(Enum):
safeUndefined = 'safeUndefined'
active = 'active'
high = 'high'
medium = 'medium'
off = 'off'
class SearchType(Enum):
searchTypeUndefined = 'searchTypeUndefined'
image = 'image'
class SiteSearchFilter(Enum):
siteSearchFilterUndefined = 'siteSearchFilterUndefined'
e = 'e'
i = 'i'
class FieldXgafv(Enum):
field_1 = '1'
field_2 = '2'
class Alt(Enum):
json = 'json'
media = 'media'
proto = 'proto'