azure.cognitiveservices.search.videosearch.models module

exception azure.cognitiveservices.search.videosearch.models.ErrorResponseException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘ErrorResponse’.

Parameters
  • deserialize – A deserializer

  • response – Server response to be deserialized.

class azure.cognitiveservices.search.videosearch.models.Answer(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Response

Answer.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: SearchResultsAnswer

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

class azure.cognitiveservices.search.videosearch.models.CreativeWork(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Thing

CreativeWork.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MediaObject

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • alternate_name (str) –

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

class azure.cognitiveservices.search.videosearch.models.Error(*, message: str, code='None', **kwargs)[source]

Bases: msrest.serialization.Model

Defines the error that occurred.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • code (str or ErrorCode) – Required. The error code that identifies the category of error. Possible values include: ‘None’, ‘ServerError’, ‘InvalidRequest’, ‘RateLimitExceeded’, ‘InvalidAuthorization’, ‘InsufficientAuthorization’. Default value: “None” .

  • message (str) – Required. A description of the error.

Variables
  • sub_code (str or ErrorSubCode) – The error code that further helps to identify the error. Possible values include: ‘UnexpectedError’, ‘ResourceError’, ‘NotImplemented’, ‘ParameterMissing’, ‘ParameterInvalidValue’, ‘HttpNotAllowed’, ‘Blocked’, ‘AuthorizationMissing’, ‘AuthorizationRedundancy’, ‘AuthorizationDisabled’, ‘AuthorizationExpired’

  • more_details (str) – A description that provides additional information about the error.

  • parameter (str) – The parameter in the request that caused the error.

  • value (str) – The parameter’s value in the request that was not valid.

class azure.cognitiveservices.search.videosearch.models.ErrorResponse(*, errors, **kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Response

The top-level response that represents a failed request.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • errors (list[Error]) – Required. A list of errors that describe the reasons why the request failed.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

class azure.cognitiveservices.search.videosearch.models.Identifiable(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.ResponseBase

Defines the identity of a resource.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: Response

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables

id (str) – A String identifier.

class azure.cognitiveservices.search.videosearch.models.ImageObject(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.MediaObject

Defines an image.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • alternate_name (str) –

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).

  • host_page_url (str) – URL of the page that hosts the media object.

  • width (int) – The width of the source media object, in pixels.

  • height (int) – The height of the source media object, in pixels.

  • thumbnail (ImageObject) – The URL to a thumbnail of the image

class azure.cognitiveservices.search.videosearch.models.MediaObject(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.CreativeWork

MediaObject.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: ImageObject, VideoObject

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • alternate_name (str) –

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).

  • host_page_url (str) – URL of the page that hosts the media object.

  • width (int) – The width of the source media object, in pixels.

  • height (int) – The height of the source media object, in pixels.

class azure.cognitiveservices.search.videosearch.models.PivotSuggestions(*, pivot: str, suggestions, **kwargs)[source]

Bases: msrest.serialization.Model

PivotSuggestions.

All required parameters must be populated in order to send to Azure.

Parameters
  • pivot (str) – Required.

  • suggestions (list[Query]) – Required.

class azure.cognitiveservices.search.videosearch.models.Query(*, text: str, **kwargs)[source]

Bases: msrest.serialization.Model

Defines a search query.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

text (str) – Required. The query string. Use this string as the query term in a new search request.

Variables
  • display_text (str) – The display version of the query term. This version of the query term may contain special characters that highlight the search term found in the query string. The string contains the highlighting characters only if the query enabled hit highlighting

  • web_search_url (str) – The URL that takes the user to the Bing search results page for the query.Only related search results include this field.

  • search_link (str) –

  • thumbnail (ImageObject) –

class azure.cognitiveservices.search.videosearch.models.QueryContext(*, original_query: str, **kwargs)[source]

Bases: msrest.serialization.Model

Defines the query context that Bing used for the request.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

original_query (str) – Required. The query string as specified in the request.

Variables
  • altered_query (str) – The query string used by Bing to perform the query. Bing uses the altered query string if the original query string contained spelling mistakes. For example, if the query string is “saling downwind”, the altered query string will be “sailing downwind”. This field is included only if the original query string contains a spelling mistake.

  • alteration_override_query (str) – The query string to use to force Bing to use the original string. For example, if the query string is “saling downwind”, the override query string will be “+saling downwind”. Remember to encode the query string which results in “%2Bsaling+downwind”. This field is included only if the original query string contains a spelling mistake.

  • adult_intent (bool) – A Boolean value that indicates whether the specified query has adult intent. The value is true if the query has adult intent; otherwise, false.

  • ask_user_for_location (bool) – A Boolean value that indicates whether Bing requires the user’s location to provide accurate results. If you specified the user’s location by using the X-MSEdge-ClientIP and X-Search-Location headers, you can ignore this field. For location aware queries, such as “today’s weather” or “restaurants near me” that need the user’s location to provide accurate results, this field is set to true. For location aware queries that include the location (for example, “Seattle weather”), this field is set to false. This field is also set to false for queries that are not location aware, such as “best sellers”.

  • is_transactional (bool) –

class azure.cognitiveservices.search.videosearch.models.Response(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Identifiable

Defines a response. All schemas that could be returned at the root of a response should inherit from this.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: Answer, Thing, ErrorResponse, TrendingVideos, VideoDetails

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

class azure.cognitiveservices.search.videosearch.models.ResponseBase(**kwargs)[source]

Bases: msrest.serialization.Model

ResponseBase.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: Identifiable

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

class azure.cognitiveservices.search.videosearch.models.SearchResultsAnswer(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Answer

SearchResultsAnswer.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: Videos

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

class azure.cognitiveservices.search.videosearch.models.Thing(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Response

Thing.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: CreativeWork

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • alternate_name (str) –

  • bing_id (str) – An ID that uniquely identifies this item.

class azure.cognitiveservices.search.videosearch.models.TrendingVideos(*, banner_tiles, categories, **kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Response

TrendingVideos.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

class azure.cognitiveservices.search.videosearch.models.TrendingVideosCategory(*, title: str, subcategories, **kwargs)[source]

Bases: msrest.serialization.Model

TrendingVideosCategory.

All required parameters must be populated in order to send to Azure.

Parameters
class azure.cognitiveservices.search.videosearch.models.TrendingVideosSubcategory(*, title: str, tiles, **kwargs)[source]

Bases: msrest.serialization.Model

TrendingVideosSubcategory.

All required parameters must be populated in order to send to Azure.

Parameters
class azure.cognitiveservices.search.videosearch.models.TrendingVideosTile(*, query, image, **kwargs)[source]

Bases: msrest.serialization.Model

TrendingVideosTile.

All required parameters must be populated in order to send to Azure.

Parameters
class azure.cognitiveservices.search.videosearch.models.VideoDetails(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.Response

VideoDetails.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
class azure.cognitiveservices.search.videosearch.models.VideoObject(**kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.MediaObject

Defines a video object that is relevant to the query.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

_type (str) – Required. Constant filled by server.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • name (str) – The name of the thing represented by this object.

  • url (str) – The URL to get more information about the thing represented by this object.

  • image (ImageObject) –

  • description (str) – A short description of the item.

  • alternate_name (str) –

  • bing_id (str) – An ID that uniquely identifies this item.

  • thumbnail_url (str) – The URL to a thumbnail of the item.

  • provider (list[Thing]) – The source of the creative work.

  • text (str) –

  • content_url (str) – Original URL to retrieve the source (file) for the media object (e.g the source URL for the image).

  • host_page_url (str) – URL of the page that hosts the media object.

  • width (int) – The width of the source media object, in pixels.

  • height (int) – The height of the source media object, in pixels.

  • motion_thumbnail_url (str) –

  • motion_thumbnail_id (str) –

  • embed_html (str) –

  • allow_https_embed (bool) –

  • view_count (int) –

  • thumbnail (ImageObject) –

  • video_id (str) –

  • allow_mobile_embed (bool) –

  • is_superfresh (bool) –

class azure.cognitiveservices.search.videosearch.models.Videos(*, value, **kwargs)[source]

Bases: azure.cognitiveservices.search.videosearch.models._models_py3.SearchResultsAnswer

Defines a video answer.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters
  • _type (str) – Required. Constant filled by server.

  • value (list[VideoObject]) – Required. A list of video objects that are relevant to the query.

Variables
  • id (str) – A String identifier.

  • web_search_url (str) – The URL To Bing’s search result for this item.

  • follow_up_queries (list[Query]) –

  • total_estimated_matches (long) – The estimated number of webpages that are relevant to the query. Use this number along with the count and offset query parameters to page the results.

  • is_family_friendly (bool) –

  • next_offset (int) –

  • scenario (str or VideoQueryScenario) – Possible values include: ‘List’, ‘SingleDominantVideo’

  • query_expansions (list[Query]) –

  • pivot_suggestions (list[PivotSuggestions]) –

class azure.cognitiveservices.search.videosearch.models.VideosModule(**kwargs)[source]

Bases: msrest.serialization.Model

VideosModule.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

value (list[VideoObject]) –

class azure.cognitiveservices.search.videosearch.models.VideoQueryScenario[source]

Bases: str, enum.Enum

An enumeration.

list = 'List'
single_dominant_video = 'SingleDominantVideo'
class azure.cognitiveservices.search.videosearch.models.ErrorCode[source]

Bases: str, enum.Enum

An enumeration.

insufficient_authorization = 'InsufficientAuthorization'
invalid_authorization = 'InvalidAuthorization'
invalid_request = 'InvalidRequest'
none = 'None'
rate_limit_exceeded = 'RateLimitExceeded'
server_error = 'ServerError'
class azure.cognitiveservices.search.videosearch.models.ErrorSubCode[source]

Bases: str, enum.Enum

An enumeration.

authorization_disabled = 'AuthorizationDisabled'
authorization_expired = 'AuthorizationExpired'
authorization_missing = 'AuthorizationMissing'
authorization_redundancy = 'AuthorizationRedundancy'
blocked = 'Blocked'
http_not_allowed = 'HttpNotAllowed'
not_implemented = 'NotImplemented'
parameter_invalid_value = 'ParameterInvalidValue'
parameter_missing = 'ParameterMissing'
resource_error = 'ResourceError'
unexpected_error = 'UnexpectedError'
class azure.cognitiveservices.search.videosearch.models.Freshness[source]

Bases: str, enum.Enum

An enumeration.

day = 'Day'
month = 'Month'
week = 'Week'
class azure.cognitiveservices.search.videosearch.models.VideoLength[source]

Bases: str, enum.Enum

An enumeration.

all = 'All'
long_enum = 'Long'
medium = 'Medium'
short = 'Short'
class azure.cognitiveservices.search.videosearch.models.VideoPricing[source]

Bases: str, enum.Enum

An enumeration.

all = 'All'
free = 'Free'
paid = 'Paid'
class azure.cognitiveservices.search.videosearch.models.VideoResolution[source]

Bases: str, enum.Enum

An enumeration.

all = 'All'
hd1080p = 'HD1080p'
hd720p = 'HD720p'
sd480p = 'SD480p'
class azure.cognitiveservices.search.videosearch.models.SafeSearch[source]

Bases: str, enum.Enum

An enumeration.

moderate = 'Moderate'
off = 'Off'
strict = 'Strict'
class azure.cognitiveservices.search.videosearch.models.TextFormat[source]

Bases: str, enum.Enum

An enumeration.

html = 'Html'
raw = 'Raw'
class azure.cognitiveservices.search.videosearch.models.VideoInsightModule[source]

Bases: str, enum.Enum

An enumeration.

all = 'All'
related_videos = 'RelatedVideos'
video_result = 'VideoResult'