Source code for azure.cognitiveservices.search.videosearch.models._models_py3

# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from msrest.exceptions import HttpOperationError


[docs]class ResponseBase(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. :param _type: Required. Constant filled by server. :type _type: str """ _validation = { '_type': {'required': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, } _subtype_map = { '_type': {'Identifiable': 'Identifiable'} } def __init__(self, **kwargs) -> None: super(ResponseBase, self).__init__(**kwargs) self._type = None
[docs]class Identifiable(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, } _subtype_map = { '_type': {'Response': 'Response'} } def __init__(self, **kwargs) -> None: super(Identifiable, self).__init__(**kwargs) self.id = None self._type = 'Identifiable'
[docs]class Response(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, } _subtype_map = { '_type': {'Answer': 'Answer', 'Thing': 'Thing', 'ErrorResponse': 'ErrorResponse', 'TrendingVideos': 'TrendingVideos', 'VideoDetails': 'VideoDetails'} } def __init__(self, **kwargs) -> None: super(Response, self).__init__(**kwargs) self.web_search_url = None self._type = 'Response'
[docs]class Answer(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar follow_up_queries: :vartype follow_up_queries: list[~azure.cognitiveservices.search.videosearch.models.Query] """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'follow_up_queries': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'follow_up_queries': {'key': 'followUpQueries', 'type': '[Query]'}, } _subtype_map = { '_type': {'SearchResultsAnswer': 'SearchResultsAnswer'} } def __init__(self, **kwargs) -> None: super(Answer, self).__init__(**kwargs) self.follow_up_queries = None self._type = 'Answer'
[docs]class Thing(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar name: The name of the thing represented by this object. :vartype name: str :ivar url: The URL to get more information about the thing represented by this object. :vartype url: str :ivar image: :vartype image: ~azure.cognitiveservices.search.videosearch.models.ImageObject :ivar description: A short description of the item. :vartype description: str :ivar alternate_name: :vartype alternate_name: str :ivar bing_id: An ID that uniquely identifies this item. :vartype bing_id: str """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'readonly': True}, 'image': {'readonly': True}, 'description': {'readonly': True}, 'alternate_name': {'readonly': True}, 'bing_id': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'image': {'key': 'image', 'type': 'ImageObject'}, 'description': {'key': 'description', 'type': 'str'}, 'alternate_name': {'key': 'alternateName', 'type': 'str'}, 'bing_id': {'key': 'bingId', 'type': 'str'}, } _subtype_map = { '_type': {'CreativeWork': 'CreativeWork'} } def __init__(self, **kwargs) -> None: super(Thing, self).__init__(**kwargs) self.name = None self.url = None self.image = None self.description = None self.alternate_name = None self.bing_id = None self._type = 'Thing'
[docs]class CreativeWork(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar name: The name of the thing represented by this object. :vartype name: str :ivar url: The URL to get more information about the thing represented by this object. :vartype url: str :ivar image: :vartype image: ~azure.cognitiveservices.search.videosearch.models.ImageObject :ivar description: A short description of the item. :vartype description: str :ivar alternate_name: :vartype alternate_name: str :ivar bing_id: An ID that uniquely identifies this item. :vartype bing_id: str :ivar thumbnail_url: The URL to a thumbnail of the item. :vartype thumbnail_url: str :ivar provider: The source of the creative work. :vartype provider: list[~azure.cognitiveservices.search.videosearch.models.Thing] :ivar text: :vartype text: str """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'readonly': True}, 'image': {'readonly': True}, 'description': {'readonly': True}, 'alternate_name': {'readonly': True}, 'bing_id': {'readonly': True}, 'thumbnail_url': {'readonly': True}, 'provider': {'readonly': True}, 'text': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'image': {'key': 'image', 'type': 'ImageObject'}, 'description': {'key': 'description', 'type': 'str'}, 'alternate_name': {'key': 'alternateName', 'type': 'str'}, 'bing_id': {'key': 'bingId', 'type': 'str'}, 'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'}, 'provider': {'key': 'provider', 'type': '[Thing]'}, 'text': {'key': 'text', 'type': 'str'}, } _subtype_map = { '_type': {'MediaObject': 'MediaObject'} } def __init__(self, **kwargs) -> None: super(CreativeWork, self).__init__(**kwargs) self.thumbnail_url = None self.provider = None self.text = None self._type = 'CreativeWork'
[docs]class Error(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. :param code: Required. The error code that identifies the category of error. Possible values include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'. Default value: "None" . :type code: str or ~azure.cognitiveservices.search.videosearch.models.ErrorCode :ivar sub_code: The error code that further helps to identify the error. Possible values include: 'UnexpectedError', 'ResourceError', 'NotImplemented', 'ParameterMissing', 'ParameterInvalidValue', 'HttpNotAllowed', 'Blocked', 'AuthorizationMissing', 'AuthorizationRedundancy', 'AuthorizationDisabled', 'AuthorizationExpired' :vartype sub_code: str or ~azure.cognitiveservices.search.videosearch.models.ErrorSubCode :param message: Required. A description of the error. :type message: str :ivar more_details: A description that provides additional information about the error. :vartype more_details: str :ivar parameter: The parameter in the request that caused the error. :vartype parameter: str :ivar value: The parameter's value in the request that was not valid. :vartype value: str """ _validation = { 'code': {'required': True}, 'sub_code': {'readonly': True}, 'message': {'required': True}, 'more_details': {'readonly': True}, 'parameter': {'readonly': True}, 'value': {'readonly': True}, } _attribute_map = { 'code': {'key': 'code', 'type': 'ErrorCode'}, 'sub_code': {'key': 'subCode', 'type': 'ErrorSubCode'}, 'message': {'key': 'message', 'type': 'str'}, 'more_details': {'key': 'moreDetails', 'type': 'str'}, 'parameter': {'key': 'parameter', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'}, } def __init__(self, *, message: str, code="None", **kwargs) -> None: super(Error, self).__init__(**kwargs) self.code = code self.sub_code = None self.message = message self.more_details = None self.parameter = None self.value = None
[docs]class ErrorResponse(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :param errors: Required. A list of errors that describe the reasons why the request failed. :type errors: list[~azure.cognitiveservices.search.videosearch.models.Error] """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'errors': {'required': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'errors': {'key': 'errors', 'type': '[Error]'}, } def __init__(self, *, errors, **kwargs) -> None: super(ErrorResponse, self).__init__(**kwargs) self.errors = errors self._type = 'ErrorResponse'
[docs]class ErrorResponseException(HttpOperationError): """Server responsed with exception of type: 'ErrorResponse'. :param deserialize: A deserializer :param response: Server response to be deserialized. """ def __init__(self, deserialize, response, *args): super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args)
[docs]class MediaObject(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar name: The name of the thing represented by this object. :vartype name: str :ivar url: The URL to get more information about the thing represented by this object. :vartype url: str :ivar image: :vartype image: ~azure.cognitiveservices.search.videosearch.models.ImageObject :ivar description: A short description of the item. :vartype description: str :ivar alternate_name: :vartype alternate_name: str :ivar bing_id: An ID that uniquely identifies this item. :vartype bing_id: str :ivar thumbnail_url: The URL to a thumbnail of the item. :vartype thumbnail_url: str :ivar provider: The source of the creative work. :vartype provider: list[~azure.cognitiveservices.search.videosearch.models.Thing] :ivar text: :vartype text: str :ivar content_url: Original URL to retrieve the source (file) for the media object (e.g the source URL for the image). :vartype content_url: str :ivar host_page_url: URL of the page that hosts the media object. :vartype host_page_url: str :ivar width: The width of the source media object, in pixels. :vartype width: int :ivar height: The height of the source media object, in pixels. :vartype height: int """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'readonly': True}, 'image': {'readonly': True}, 'description': {'readonly': True}, 'alternate_name': {'readonly': True}, 'bing_id': {'readonly': True}, 'thumbnail_url': {'readonly': True}, 'provider': {'readonly': True}, 'text': {'readonly': True}, 'content_url': {'readonly': True}, 'host_page_url': {'readonly': True}, 'width': {'readonly': True}, 'height': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'image': {'key': 'image', 'type': 'ImageObject'}, 'description': {'key': 'description', 'type': 'str'}, 'alternate_name': {'key': 'alternateName', 'type': 'str'}, 'bing_id': {'key': 'bingId', 'type': 'str'}, 'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'}, 'provider': {'key': 'provider', 'type': '[Thing]'}, 'text': {'key': 'text', 'type': 'str'}, 'content_url': {'key': 'contentUrl', 'type': 'str'}, 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, 'width': {'key': 'width', 'type': 'int'}, 'height': {'key': 'height', 'type': 'int'}, } _subtype_map = { '_type': {'ImageObject': 'ImageObject', 'VideoObject': 'VideoObject'} } def __init__(self, **kwargs) -> None: super(MediaObject, self).__init__(**kwargs) self.content_url = None self.host_page_url = None self.width = None self.height = None self._type = 'MediaObject'
[docs]class ImageObject(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar name: The name of the thing represented by this object. :vartype name: str :ivar url: The URL to get more information about the thing represented by this object. :vartype url: str :ivar image: :vartype image: ~azure.cognitiveservices.search.videosearch.models.ImageObject :ivar description: A short description of the item. :vartype description: str :ivar alternate_name: :vartype alternate_name: str :ivar bing_id: An ID that uniquely identifies this item. :vartype bing_id: str :ivar thumbnail_url: The URL to a thumbnail of the item. :vartype thumbnail_url: str :ivar provider: The source of the creative work. :vartype provider: list[~azure.cognitiveservices.search.videosearch.models.Thing] :ivar text: :vartype text: str :ivar content_url: Original URL to retrieve the source (file) for the media object (e.g the source URL for the image). :vartype content_url: str :ivar host_page_url: URL of the page that hosts the media object. :vartype host_page_url: str :ivar width: The width of the source media object, in pixels. :vartype width: int :ivar height: The height of the source media object, in pixels. :vartype height: int :ivar thumbnail: The URL to a thumbnail of the image :vartype thumbnail: ~azure.cognitiveservices.search.videosearch.models.ImageObject """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'readonly': True}, 'image': {'readonly': True}, 'description': {'readonly': True}, 'alternate_name': {'readonly': True}, 'bing_id': {'readonly': True}, 'thumbnail_url': {'readonly': True}, 'provider': {'readonly': True}, 'text': {'readonly': True}, 'content_url': {'readonly': True}, 'host_page_url': {'readonly': True}, 'width': {'readonly': True}, 'height': {'readonly': True}, 'thumbnail': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'image': {'key': 'image', 'type': 'ImageObject'}, 'description': {'key': 'description', 'type': 'str'}, 'alternate_name': {'key': 'alternateName', 'type': 'str'}, 'bing_id': {'key': 'bingId', 'type': 'str'}, 'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'}, 'provider': {'key': 'provider', 'type': '[Thing]'}, 'text': {'key': 'text', 'type': 'str'}, 'content_url': {'key': 'contentUrl', 'type': 'str'}, 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, 'width': {'key': 'width', 'type': 'int'}, 'height': {'key': 'height', 'type': 'int'}, 'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'}, } def __init__(self, **kwargs) -> None: super(ImageObject, self).__init__(**kwargs) self.thumbnail = None self._type = 'ImageObject'
[docs]class PivotSuggestions(Model): """PivotSuggestions. All required parameters must be populated in order to send to Azure. :param pivot: Required. :type pivot: str :param suggestions: Required. :type suggestions: list[~azure.cognitiveservices.search.videosearch.models.Query] """ _validation = { 'pivot': {'required': True}, 'suggestions': {'required': True}, } _attribute_map = { 'pivot': {'key': 'pivot', 'type': 'str'}, 'suggestions': {'key': 'suggestions', 'type': '[Query]'}, } def __init__(self, *, pivot: str, suggestions, **kwargs) -> None: super(PivotSuggestions, self).__init__(**kwargs) self.pivot = pivot self.suggestions = suggestions
[docs]class Query(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. :param text: Required. The query string. Use this string as the query term in a new search request. :type text: str :ivar display_text: 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 :vartype display_text: str :ivar web_search_url: The URL that takes the user to the Bing search results page for the query.Only related search results include this field. :vartype web_search_url: str :ivar search_link: :vartype search_link: str :ivar thumbnail: :vartype thumbnail: ~azure.cognitiveservices.search.videosearch.models.ImageObject """ _validation = { 'text': {'required': True}, 'display_text': {'readonly': True}, 'web_search_url': {'readonly': True}, 'search_link': {'readonly': True}, 'thumbnail': {'readonly': True}, } _attribute_map = { 'text': {'key': 'text', 'type': 'str'}, 'display_text': {'key': 'displayText', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'search_link': {'key': 'searchLink', 'type': 'str'}, 'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'}, } def __init__(self, *, text: str, **kwargs) -> None: super(Query, self).__init__(**kwargs) self.text = text self.display_text = None self.web_search_url = None self.search_link = None self.thumbnail = None
[docs]class QueryContext(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. :param original_query: Required. The query string as specified in the request. :type original_query: str :ivar altered_query: 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. :vartype altered_query: str :ivar alteration_override_query: 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. :vartype alteration_override_query: str :ivar adult_intent: A Boolean value that indicates whether the specified query has adult intent. The value is true if the query has adult intent; otherwise, false. :vartype adult_intent: bool :ivar ask_user_for_location: 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". :vartype ask_user_for_location: bool :ivar is_transactional: :vartype is_transactional: bool """ _validation = { 'original_query': {'required': True}, 'altered_query': {'readonly': True}, 'alteration_override_query': {'readonly': True}, 'adult_intent': {'readonly': True}, 'ask_user_for_location': {'readonly': True}, 'is_transactional': {'readonly': True}, } _attribute_map = { 'original_query': {'key': 'originalQuery', 'type': 'str'}, 'altered_query': {'key': 'alteredQuery', 'type': 'str'}, 'alteration_override_query': {'key': 'alterationOverrideQuery', 'type': 'str'}, 'adult_intent': {'key': 'adultIntent', 'type': 'bool'}, 'ask_user_for_location': {'key': 'askUserForLocation', 'type': 'bool'}, 'is_transactional': {'key': 'isTransactional', 'type': 'bool'}, } def __init__(self, *, original_query: str, **kwargs) -> None: super(QueryContext, self).__init__(**kwargs) self.original_query = original_query self.altered_query = None self.alteration_override_query = None self.adult_intent = None self.ask_user_for_location = None self.is_transactional = None
[docs]class SearchResultsAnswer(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar follow_up_queries: :vartype follow_up_queries: list[~azure.cognitiveservices.search.videosearch.models.Query] :ivar total_estimated_matches: 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. :vartype total_estimated_matches: long :ivar is_family_friendly: :vartype is_family_friendly: bool """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'follow_up_queries': {'readonly': True}, 'total_estimated_matches': {'readonly': True}, 'is_family_friendly': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'follow_up_queries': {'key': 'followUpQueries', 'type': '[Query]'}, 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, 'is_family_friendly': {'key': 'isFamilyFriendly', 'type': 'bool'}, } _subtype_map = { '_type': {'Videos': 'Videos'} } def __init__(self, **kwargs) -> None: super(SearchResultsAnswer, self).__init__(**kwargs) self.total_estimated_matches = None self.is_family_friendly = None self._type = 'SearchResultsAnswer'
[docs]class TrendingVideos(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :param banner_tiles: Required. :type banner_tiles: list[~azure.cognitiveservices.search.videosearch.models.TrendingVideosTile] :param categories: Required. :type categories: list[~azure.cognitiveservices.search.videosearch.models.TrendingVideosCategory] """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'banner_tiles': {'required': True}, 'categories': {'required': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'banner_tiles': {'key': 'bannerTiles', 'type': '[TrendingVideosTile]'}, 'categories': {'key': 'categories', 'type': '[TrendingVideosCategory]'}, } def __init__(self, *, banner_tiles, categories, **kwargs) -> None: super(TrendingVideos, self).__init__(**kwargs) self.banner_tiles = banner_tiles self.categories = categories self._type = 'TrendingVideos'
[docs]class TrendingVideosCategory(Model): """TrendingVideosCategory. All required parameters must be populated in order to send to Azure. :param title: Required. :type title: str :param subcategories: Required. :type subcategories: list[~azure.cognitiveservices.search.videosearch.models.TrendingVideosSubcategory] """ _validation = { 'title': {'required': True}, 'subcategories': {'required': True}, } _attribute_map = { 'title': {'key': 'title', 'type': 'str'}, 'subcategories': {'key': 'subcategories', 'type': '[TrendingVideosSubcategory]'}, } def __init__(self, *, title: str, subcategories, **kwargs) -> None: super(TrendingVideosCategory, self).__init__(**kwargs) self.title = title self.subcategories = subcategories
[docs]class TrendingVideosSubcategory(Model): """TrendingVideosSubcategory. All required parameters must be populated in order to send to Azure. :param title: Required. :type title: str :param tiles: Required. :type tiles: list[~azure.cognitiveservices.search.videosearch.models.TrendingVideosTile] """ _validation = { 'title': {'required': True}, 'tiles': {'required': True}, } _attribute_map = { 'title': {'key': 'title', 'type': 'str'}, 'tiles': {'key': 'tiles', 'type': '[TrendingVideosTile]'}, } def __init__(self, *, title: str, tiles, **kwargs) -> None: super(TrendingVideosSubcategory, self).__init__(**kwargs) self.title = title self.tiles = tiles
[docs]class TrendingVideosTile(Model): """TrendingVideosTile. All required parameters must be populated in order to send to Azure. :param query: Required. :type query: ~azure.cognitiveservices.search.videosearch.models.Query :param image: Required. :type image: ~azure.cognitiveservices.search.videosearch.models.ImageObject """ _validation = { 'query': {'required': True}, 'image': {'required': True}, } _attribute_map = { 'query': {'key': 'query', 'type': 'Query'}, 'image': {'key': 'image', 'type': 'ImageObject'}, } def __init__(self, *, query, image, **kwargs) -> None: super(TrendingVideosTile, self).__init__(**kwargs) self.query = query self.image = image
[docs]class VideoDetails(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar related_videos: :vartype related_videos: ~azure.cognitiveservices.search.videosearch.models.VideosModule :ivar video_result: :vartype video_result: ~azure.cognitiveservices.search.videosearch.models.VideoObject """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'related_videos': {'readonly': True}, 'video_result': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'related_videos': {'key': 'relatedVideos', 'type': 'VideosModule'}, 'video_result': {'key': 'videoResult', 'type': 'VideoObject'}, } def __init__(self, **kwargs) -> None: super(VideoDetails, self).__init__(**kwargs) self.related_videos = None self.video_result = None self._type = 'VideoDetails'
[docs]class VideoObject(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar name: The name of the thing represented by this object. :vartype name: str :ivar url: The URL to get more information about the thing represented by this object. :vartype url: str :ivar image: :vartype image: ~azure.cognitiveservices.search.videosearch.models.ImageObject :ivar description: A short description of the item. :vartype description: str :ivar alternate_name: :vartype alternate_name: str :ivar bing_id: An ID that uniquely identifies this item. :vartype bing_id: str :ivar thumbnail_url: The URL to a thumbnail of the item. :vartype thumbnail_url: str :ivar provider: The source of the creative work. :vartype provider: list[~azure.cognitiveservices.search.videosearch.models.Thing] :ivar text: :vartype text: str :ivar content_url: Original URL to retrieve the source (file) for the media object (e.g the source URL for the image). :vartype content_url: str :ivar host_page_url: URL of the page that hosts the media object. :vartype host_page_url: str :ivar width: The width of the source media object, in pixels. :vartype width: int :ivar height: The height of the source media object, in pixels. :vartype height: int :ivar motion_thumbnail_url: :vartype motion_thumbnail_url: str :ivar motion_thumbnail_id: :vartype motion_thumbnail_id: str :ivar embed_html: :vartype embed_html: str :ivar allow_https_embed: :vartype allow_https_embed: bool :ivar view_count: :vartype view_count: int :ivar thumbnail: :vartype thumbnail: ~azure.cognitiveservices.search.videosearch.models.ImageObject :ivar video_id: :vartype video_id: str :ivar allow_mobile_embed: :vartype allow_mobile_embed: bool :ivar is_superfresh: :vartype is_superfresh: bool """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'readonly': True}, 'image': {'readonly': True}, 'description': {'readonly': True}, 'alternate_name': {'readonly': True}, 'bing_id': {'readonly': True}, 'thumbnail_url': {'readonly': True}, 'provider': {'readonly': True}, 'text': {'readonly': True}, 'content_url': {'readonly': True}, 'host_page_url': {'readonly': True}, 'width': {'readonly': True}, 'height': {'readonly': True}, 'motion_thumbnail_url': {'readonly': True}, 'motion_thumbnail_id': {'readonly': True}, 'embed_html': {'readonly': True}, 'allow_https_embed': {'readonly': True}, 'view_count': {'readonly': True}, 'thumbnail': {'readonly': True}, 'video_id': {'readonly': True}, 'allow_mobile_embed': {'readonly': True}, 'is_superfresh': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'image': {'key': 'image', 'type': 'ImageObject'}, 'description': {'key': 'description', 'type': 'str'}, 'alternate_name': {'key': 'alternateName', 'type': 'str'}, 'bing_id': {'key': 'bingId', 'type': 'str'}, 'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'}, 'provider': {'key': 'provider', 'type': '[Thing]'}, 'text': {'key': 'text', 'type': 'str'}, 'content_url': {'key': 'contentUrl', 'type': 'str'}, 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, 'width': {'key': 'width', 'type': 'int'}, 'height': {'key': 'height', 'type': 'int'}, 'motion_thumbnail_url': {'key': 'motionThumbnailUrl', 'type': 'str'}, 'motion_thumbnail_id': {'key': 'motionThumbnailId', 'type': 'str'}, 'embed_html': {'key': 'embedHtml', 'type': 'str'}, 'allow_https_embed': {'key': 'allowHttpsEmbed', 'type': 'bool'}, 'view_count': {'key': 'viewCount', 'type': 'int'}, 'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'}, 'video_id': {'key': 'videoId', 'type': 'str'}, 'allow_mobile_embed': {'key': 'allowMobileEmbed', 'type': 'bool'}, 'is_superfresh': {'key': 'isSuperfresh', 'type': 'bool'}, } def __init__(self, **kwargs) -> None: super(VideoObject, self).__init__(**kwargs) self.motion_thumbnail_url = None self.motion_thumbnail_id = None self.embed_html = None self.allow_https_embed = None self.view_count = None self.thumbnail = None self.video_id = None self.allow_mobile_embed = None self.is_superfresh = None self._type = 'VideoObject'
[docs]class Videos(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. :param _type: Required. Constant filled by server. :type _type: str :ivar id: A String identifier. :vartype id: str :ivar web_search_url: The URL To Bing's search result for this item. :vartype web_search_url: str :ivar follow_up_queries: :vartype follow_up_queries: list[~azure.cognitiveservices.search.videosearch.models.Query] :ivar total_estimated_matches: 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. :vartype total_estimated_matches: long :ivar is_family_friendly: :vartype is_family_friendly: bool :param value: Required. A list of video objects that are relevant to the query. :type value: list[~azure.cognitiveservices.search.videosearch.models.VideoObject] :ivar next_offset: :vartype next_offset: int :ivar scenario: Possible values include: 'List', 'SingleDominantVideo' :vartype scenario: str or ~azure.cognitiveservices.search.videosearch.models.VideoQueryScenario :ivar query_expansions: :vartype query_expansions: list[~azure.cognitiveservices.search.videosearch.models.Query] :ivar pivot_suggestions: :vartype pivot_suggestions: list[~azure.cognitiveservices.search.videosearch.models.PivotSuggestions] """ _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'web_search_url': {'readonly': True}, 'follow_up_queries': {'readonly': True}, 'total_estimated_matches': {'readonly': True}, 'is_family_friendly': {'readonly': True}, 'value': {'required': True}, 'next_offset': {'readonly': True}, 'scenario': {'readonly': True}, 'query_expansions': {'readonly': True}, 'pivot_suggestions': {'readonly': True}, } _attribute_map = { '_type': {'key': '_type', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, 'follow_up_queries': {'key': 'followUpQueries', 'type': '[Query]'}, 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, 'is_family_friendly': {'key': 'isFamilyFriendly', 'type': 'bool'}, 'value': {'key': 'value', 'type': '[VideoObject]'}, 'next_offset': {'key': 'nextOffset', 'type': 'int'}, 'scenario': {'key': 'scenario', 'type': 'VideoQueryScenario'}, 'query_expansions': {'key': 'queryExpansions', 'type': '[Query]'}, 'pivot_suggestions': {'key': 'pivotSuggestions', 'type': '[PivotSuggestions]'}, } def __init__(self, *, value, **kwargs) -> None: super(Videos, self).__init__(**kwargs) self.value = value self.next_offset = None self.scenario = None self.query_expansions = None self.pivot_suggestions = None self._type = 'Videos'
[docs]class VideosModule(Model): """VideosModule. Variables are only populated by the server, and will be ignored when sending a request. :ivar value: :vartype value: list[~azure.cognitiveservices.search.videosearch.models.VideoObject] """ _validation = { 'value': {'readonly': True}, } _attribute_map = { 'value': {'key': 'value', 'type': '[VideoObject]'}, } def __init__(self, **kwargs) -> None: super(VideosModule, self).__init__(**kwargs) self.value = None