diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/__init__.py index 0277a4eb3d1f..1d84b4371e56 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .visual_search_client import VisualSearchClient -from .version import VERSION +from ._configuration import VisualSearchClientConfiguration +from ._visual_search_client import VisualSearchClient +__all__ = ['VisualSearchClient', 'VisualSearchClientConfiguration'] -__all__ = ['VisualSearchClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/_configuration.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/_configuration.py new file mode 100644 index 000000000000..603b2fe6b963 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/_configuration.py @@ -0,0 +1,48 @@ +# 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 import Configuration + +from .version import VERSION + + +class VisualSearchClientConfiguration(Configuration): + """Configuration for VisualSearchClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: Supported Cognitive Services endpoints (protocol and + hostname, for example: "https://westus.api.cognitive.microsoft.com", + "https://api.cognitive.microsoft.com"). + :type endpoint: str + :param credentials: Subscription credentials which uniquely identify + client subscription. + :type credentials: None + """ + + def __init__( + self, endpoint, credentials): + + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + base_url = '{Endpoint}/bing/v7.0' + + super(VisualSearchClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-cognitiveservices-search-visualsearch/{}'.format(VERSION)) + + self.endpoint = endpoint + self.credentials = credentials diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/visual_search_client.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/_visual_search_client.py similarity index 62% rename from sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/visual_search_client.py rename to sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/_visual_search_client.py index 61bc4164f9a9..e8ee3149891d 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/visual_search_client.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/_visual_search_client.py @@ -10,45 +10,15 @@ # -------------------------------------------------------------------------- from msrest.service_client import SDKClient -from msrest import Configuration, Serializer, Deserializer -from .version import VERSION -from .operations.images_operations import ImagesOperations -from . import models - - -class VisualSearchClientConfiguration(Configuration): - """Configuration for VisualSearchClient - Note that all parameters used to create this instance are saved as instance - attributes. +from msrest import Serializer, Deserializer - :param endpoint: Supported Cognitive Services endpoints (protocol and - hostname, for example: "https://westus.api.cognitive.microsoft.com", - "https://api.cognitive.microsoft.com"). - :type endpoint: str - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - """ - - def __init__( - self, endpoint, credentials): - - if endpoint is None: - raise ValueError("Parameter 'endpoint' must not be None.") - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - base_url = '{Endpoint}/bing/v7.0' - - super(VisualSearchClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-cognitiveservices-search-visualsearch/{}'.format(VERSION)) - - self.endpoint = endpoint - self.credentials = credentials +from ._configuration import VisualSearchClientConfiguration +from .operations import ImagesOperations +from . import models class VisualSearchClient(SDKClient): - """Visual Search API lets you discover insights about an image such as visually similar images, shopping sources, and related searches. The API can also perform text recognition, identify entities (people, places, things), return other topical content for the user to explore, and more. For more information, see [Visual Search Overview](https://docs.microsoft.com/azure/cognitive-services/bing-visual-search/overview). + """Visual Search API lets you discover insights about an image such as visually similar images, shopping sources, and related searches. The API can also perform text recognition, identify entities (people, places, things), return other topical content for the user to explore, and more. For more information, see [Visual Search Overview](https://docs.microsoft.com/azure/cognitive-services/bing-visual-search/overview).<br/><br/><strong>NOTE:</strong> To comply with the new EU Copyright Directive in France, the Bing Visual Search API must omit some content from certain EU News sources for French users. The removed content may include thumbnail images and videos, video previews, and snippets which accompany search results from these sources. As a consequence, the Bing APIs may serve fewer results with thumbnail images and videos, video previews, and snippets to French users. :ivar config: Configuration for client. :vartype config: VisualSearchClientConfiguration diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/__init__.py index ff286cc5c9e5..527a90598bb8 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/__init__.py @@ -10,138 +10,138 @@ # -------------------------------------------------------------------------- try: - from .point2_d_py3 import Point2D - from .normalized_quadrilateral_py3 import NormalizedQuadrilateral - from .image_tag_region_py3 import ImageTagRegion - from .image_action_py3 import ImageAction - from .image_tag_py3 import ImageTag - from .organization_py3 import Organization - from .aggregate_rating_py3 import AggregateRating - from .offer_py3 import Offer - from .aggregate_offer_py3 import AggregateOffer - from .images_image_metadata_py3 import ImagesImageMetadata - from .image_object_py3 import ImageObject - from .image_knowledge_py3 import ImageKnowledge - from .response_py3 import Response - from .identifiable_py3 import Identifiable - from .error_py3 import Error - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .thing_py3 import Thing - from .action_py3 import Action - from .media_object_py3 import MediaObject - from .response_base_py3 import ResponseBase - from .creative_work_py3 import CreativeWork - from .person_py3 import Person - from .intangible_py3 import Intangible - from .image_entity_action_py3 import ImageEntityAction - from .images_module_py3 import ImagesModule - from .image_module_action_py3 import ImageModuleAction - from .recipe_py3 import Recipe - from .recipes_module_py3 import RecipesModule - from .image_recipes_action_py3 import ImageRecipesAction - from .query_py3 import Query - from .related_searches_module_py3 import RelatedSearchesModule - from .image_related_searches_action_py3 import ImageRelatedSearchesAction - from .image_shopping_sources_action_py3 import ImageShoppingSourcesAction - from .structured_value_py3 import StructuredValue - from .properties_item_py3 import PropertiesItem - from .rating_py3 import Rating - from .crop_area_py3 import CropArea - from .image_info_py3 import ImageInfo - from .filters_py3 import Filters - from .knowledge_request_py3 import KnowledgeRequest - from .visual_search_request_py3 import VisualSearchRequest + from ._models_py3 import Action + from ._models_py3 import AggregateOffer + from ._models_py3 import AggregateRating + from ._models_py3 import CreativeWork + from ._models_py3 import CropArea + from ._models_py3 import Error + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Filters + from ._models_py3 import Identifiable + from ._models_py3 import ImageAction + from ._models_py3 import ImageEntityAction + from ._models_py3 import ImageInfo + from ._models_py3 import ImageKnowledge + from ._models_py3 import ImageModuleAction + from ._models_py3 import ImageObject + from ._models_py3 import ImageRecipesAction + from ._models_py3 import ImageRelatedSearchesAction + from ._models_py3 import ImageShoppingSourcesAction + from ._models_py3 import ImagesImageMetadata + from ._models_py3 import ImagesModule + from ._models_py3 import ImageTag + from ._models_py3 import ImageTagRegion + from ._models_py3 import Intangible + from ._models_py3 import KnowledgeRequest + from ._models_py3 import MediaObject + from ._models_py3 import NormalizedQuadrilateral + from ._models_py3 import Offer + from ._models_py3 import Organization + from ._models_py3 import Person + from ._models_py3 import Point2D + from ._models_py3 import PropertiesItem + from ._models_py3 import Query + from ._models_py3 import Rating + from ._models_py3 import Recipe + from ._models_py3 import RecipesModule + from ._models_py3 import RelatedSearchesModule + from ._models_py3 import Response + from ._models_py3 import ResponseBase + from ._models_py3 import StructuredValue + from ._models_py3 import Thing + from ._models_py3 import VisualSearchRequest except (SyntaxError, ImportError): - from .point2_d import Point2D - from .normalized_quadrilateral import NormalizedQuadrilateral - from .image_tag_region import ImageTagRegion - from .image_action import ImageAction - from .image_tag import ImageTag - from .organization import Organization - from .aggregate_rating import AggregateRating - from .offer import Offer - from .aggregate_offer import AggregateOffer - from .images_image_metadata import ImagesImageMetadata - from .image_object import ImageObject - from .image_knowledge import ImageKnowledge - from .response import Response - from .identifiable import Identifiable - from .error import Error - from .error_response import ErrorResponse, ErrorResponseException - from .thing import Thing - from .action import Action - from .media_object import MediaObject - from .response_base import ResponseBase - from .creative_work import CreativeWork - from .person import Person - from .intangible import Intangible - from .image_entity_action import ImageEntityAction - from .images_module import ImagesModule - from .image_module_action import ImageModuleAction - from .recipe import Recipe - from .recipes_module import RecipesModule - from .image_recipes_action import ImageRecipesAction - from .query import Query - from .related_searches_module import RelatedSearchesModule - from .image_related_searches_action import ImageRelatedSearchesAction - from .image_shopping_sources_action import ImageShoppingSourcesAction - from .structured_value import StructuredValue - from .properties_item import PropertiesItem - from .rating import Rating - from .crop_area import CropArea - from .image_info import ImageInfo - from .filters import Filters - from .knowledge_request import KnowledgeRequest - from .visual_search_request import VisualSearchRequest -from .visual_search_client_enums import ( + from ._models import Action + from ._models import AggregateOffer + from ._models import AggregateRating + from ._models import CreativeWork + from ._models import CropArea + from ._models import Error + from ._models import ErrorResponse, ErrorResponseException + from ._models import Filters + from ._models import Identifiable + from ._models import ImageAction + from ._models import ImageEntityAction + from ._models import ImageInfo + from ._models import ImageKnowledge + from ._models import ImageModuleAction + from ._models import ImageObject + from ._models import ImageRecipesAction + from ._models import ImageRelatedSearchesAction + from ._models import ImageShoppingSourcesAction + from ._models import ImagesImageMetadata + from ._models import ImagesModule + from ._models import ImageTag + from ._models import ImageTagRegion + from ._models import Intangible + from ._models import KnowledgeRequest + from ._models import MediaObject + from ._models import NormalizedQuadrilateral + from ._models import Offer + from ._models import Organization + from ._models import Person + from ._models import Point2D + from ._models import PropertiesItem + from ._models import Query + from ._models import Rating + from ._models import Recipe + from ._models import RecipesModule + from ._models import RelatedSearchesModule + from ._models import Response + from ._models import ResponseBase + from ._models import StructuredValue + from ._models import Thing + from ._models import VisualSearchRequest +from ._visual_search_client_enums import ( Currency, - ItemAvailability, ErrorCode, ErrorSubCode, + ItemAvailability, SafeSearch, ) __all__ = [ - 'Point2D', - 'NormalizedQuadrilateral', - 'ImageTagRegion', - 'ImageAction', - 'ImageTag', - 'Organization', - 'AggregateRating', - 'Offer', + 'Action', 'AggregateOffer', - 'ImagesImageMetadata', - 'ImageObject', - 'ImageKnowledge', - 'Response', - 'Identifiable', + 'AggregateRating', + 'CreativeWork', + 'CropArea', 'Error', 'ErrorResponse', 'ErrorResponseException', - 'Thing', - 'Action', - 'MediaObject', - 'ResponseBase', - 'CreativeWork', - 'Person', - 'Intangible', + 'Filters', + 'Identifiable', + 'ImageAction', 'ImageEntityAction', - 'ImagesModule', + 'ImageInfo', + 'ImageKnowledge', 'ImageModuleAction', - 'Recipe', - 'RecipesModule', + 'ImageObject', 'ImageRecipesAction', - 'Query', - 'RelatedSearchesModule', 'ImageRelatedSearchesAction', 'ImageShoppingSourcesAction', - 'StructuredValue', + 'ImagesImageMetadata', + 'ImagesModule', + 'ImageTag', + 'ImageTagRegion', + 'Intangible', + 'KnowledgeRequest', + 'MediaObject', + 'NormalizedQuadrilateral', + 'Offer', + 'Organization', + 'Person', + 'Point2D', 'PropertiesItem', + 'Query', 'Rating', - 'CropArea', - 'ImageInfo', - 'Filters', - 'KnowledgeRequest', + 'Recipe', + 'RecipesModule', + 'RelatedSearchesModule', + 'Response', + 'ResponseBase', + 'StructuredValue', + 'Thing', 'VisualSearchRequest', 'Currency', 'ItemAvailability', diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_models.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_models.py new file mode 100644 index 000000000000..69110418f6ff --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_models.py @@ -0,0 +1,2906 @@ +# 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 + + +class ResponseBase(Model): + """Response base. + + 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): + super(ResponseBase, self).__init__(**kwargs) + self._type = None + + +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): + super(Identifiable, self).__init__(**kwargs) + self.id = None + self._type = 'Identifiable' + + +class Response(Identifiable): + """Defines a response. All schemas that return at the root of the response + must inherit from this object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageKnowledge, ErrorResponse, Thing + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', 'type': 'str'}, + 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'ImageKnowledge': 'ImageKnowledge', 'ErrorResponse': 'ErrorResponse', 'Thing': 'Thing'} + } + + def __init__(self, **kwargs): + super(Response, self).__init__(**kwargs) + self.read_link = None + self.web_search_url = None + self._type = 'Response' + + +class Thing(Response): + """Defines a thing. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTag, Organization, Offer, CreativeWork, Person, + Intangible + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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': {'ImageTag': 'ImageTag', 'Organization': 'Organization', 'Offer': 'Offer', 'CreativeWork': 'CreativeWork', 'Person': 'Person', 'Intangible': 'Intangible'} + } + + def __init__(self, **kwargs): + 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' + + +class CreativeWork(Thing): + """The most generic kind of creative work, including books, movies, + photographs, software programs, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Action, MediaObject, Recipe + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'Action': 'Action', 'MediaObject': 'MediaObject', 'Recipe': 'Recipe'} + } + + def __init__(self, **kwargs): + super(CreativeWork, self).__init__(**kwargs) + self.thumbnail_url = None + self.provider = None + self.date_published = None + self.text = None + self._type = 'CreativeWork' + + +class Action(CreativeWork): + """Defines an action. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageAction + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'ImageAction': 'ImageAction'} + } + + def __init__(self, **kwargs): + super(Action, self).__init__(**kwargs) + self.result = None + self.display_name = None + self.is_top_action = None + self.service_url = None + self._type = 'Action' + + +class Offer(Thing): + """Defines a merchant's offer. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AggregateOffer + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar seller: Seller for this offer. + :vartype seller: + ~azure.cognitiveservices.search.visualsearch.models.Organization + :ivar price: The item's price. + :vartype price: float + :ivar price_currency: The monetary currency. For example, USD. Possible + values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', + 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', + 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', + 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', + 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', + 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', + 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', + 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', + 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', + 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', + 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', + 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', + 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', + 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', + 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', + 'YER', 'ZAR', 'ZMW'. Default value: "USD" . + :vartype price_currency: str or + ~azure.cognitiveservices.search.visualsearch.models.Currency + :ivar availability: The item's availability. The following are the + possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, + OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: + 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', + 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' + :vartype availability: str or + ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability + :ivar aggregate_rating: An aggregated rating that indicates how well the + product has been rated by others. + :vartype aggregate_rating: + ~azure.cognitiveservices.search.visualsearch.models.AggregateRating + :ivar last_updated: The last date that the offer was updated. The date is + in the form YYYY-MM-DD. + :vartype last_updated: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'seller': {'readonly': True}, + 'price': {'readonly': True}, + 'price_currency': {'readonly': True}, + 'availability': {'readonly': True}, + 'aggregate_rating': {'readonly': True}, + 'last_updated': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'seller': {'key': 'seller', 'type': 'Organization'}, + 'price': {'key': 'price', 'type': 'float'}, + 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'AggregateOffer': 'AggregateOffer'} + } + + def __init__(self, **kwargs): + super(Offer, self).__init__(**kwargs) + self.seller = None + self.price = None + self.price_currency = None + self.availability = None + self.aggregate_rating = None + self.last_updated = None + self._type = 'Offer' + + +class AggregateOffer(Offer): + """Defines a list of offers from merchants that are related to the 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar seller: Seller for this offer. + :vartype seller: + ~azure.cognitiveservices.search.visualsearch.models.Organization + :ivar price: The item's price. + :vartype price: float + :ivar price_currency: The monetary currency. For example, USD. Possible + values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', + 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', + 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', + 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', + 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', + 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', + 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', + 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', + 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', + 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', + 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', + 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', + 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', + 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', + 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', + 'YER', 'ZAR', 'ZMW'. Default value: "USD" . + :vartype price_currency: str or + ~azure.cognitiveservices.search.visualsearch.models.Currency + :ivar availability: The item's availability. The following are the + possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, + OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: + 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', + 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' + :vartype availability: str or + ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability + :ivar aggregate_rating: An aggregated rating that indicates how well the + product has been rated by others. + :vartype aggregate_rating: + ~azure.cognitiveservices.search.visualsearch.models.AggregateRating + :ivar last_updated: The last date that the offer was updated. The date is + in the form YYYY-MM-DD. + :vartype last_updated: str + :ivar offers: A list of offers from merchants that have offerings related + to the image. + :vartype offers: + list[~azure.cognitiveservices.search.visualsearch.models.Offer] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'seller': {'readonly': True}, + 'price': {'readonly': True}, + 'price_currency': {'readonly': True}, + 'availability': {'readonly': True}, + 'aggregate_rating': {'readonly': True}, + 'last_updated': {'readonly': True}, + 'offers': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'seller': {'key': 'seller', 'type': 'Organization'}, + 'price': {'key': 'price', 'type': 'float'}, + 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + 'offers': {'key': 'offers', 'type': '[Offer]'}, + } + + def __init__(self, **kwargs): + super(AggregateOffer, self).__init__(**kwargs) + self.offers = None + self._type = 'AggregateOffer' + + +class PropertiesItem(Model): + """Defines an item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Rating + + 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. + + :ivar text: Text representation of an item. + :vartype text: str + :param _type: Required. Constant filled by server. + :type _type: str + """ + + _validation = { + 'text': {'readonly': True}, + '_type': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + '_type': {'key': '_type', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'Rating': 'Rating'} + } + + def __init__(self, **kwargs): + super(PropertiesItem, self).__init__(**kwargs) + self.text = None + self._type = None + + +class Rating(PropertiesItem): + """Defines a rating. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AggregateRating + + 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. + + :ivar text: Text representation of an item. + :vartype text: str + :param _type: Required. Constant filled by server. + :type _type: str + :param rating_value: Required. The mean (average) rating. The possible + values are 1.0 through 5.0. + :type rating_value: float + :ivar best_rating: The highest rated review. The possible values are 1.0 + through 5.0. + :vartype best_rating: float + """ + + _validation = { + 'text': {'readonly': True}, + '_type': {'required': True}, + 'rating_value': {'required': True}, + 'best_rating': {'readonly': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + '_type': {'key': '_type', 'type': 'str'}, + 'rating_value': {'key': 'ratingValue', 'type': 'float'}, + 'best_rating': {'key': 'bestRating', 'type': 'float'}, + } + + _subtype_map = { + '_type': {'AggregateRating': 'AggregateRating'} + } + + def __init__(self, **kwargs): + super(Rating, self).__init__(**kwargs) + self.rating_value = kwargs.get('rating_value', None) + self.best_rating = None + self._type = 'Rating' + + +class AggregateRating(Rating): + """Defines the metrics that indicate how well an item was rated by others. + + 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. + + :ivar text: Text representation of an item. + :vartype text: str + :param _type: Required. Constant filled by server. + :type _type: str + :param rating_value: Required. The mean (average) rating. The possible + values are 1.0 through 5.0. + :type rating_value: float + :ivar best_rating: The highest rated review. The possible values are 1.0 + through 5.0. + :vartype best_rating: float + :ivar review_count: The number of times the recipe has been rated or + reviewed. + :vartype review_count: int + """ + + _validation = { + 'text': {'readonly': True}, + '_type': {'required': True}, + 'rating_value': {'required': True}, + 'best_rating': {'readonly': True}, + 'review_count': {'readonly': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + '_type': {'key': '_type', 'type': 'str'}, + 'rating_value': {'key': 'ratingValue', 'type': 'float'}, + 'best_rating': {'key': 'bestRating', 'type': 'float'}, + 'review_count': {'key': 'reviewCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(AggregateRating, self).__init__(**kwargs) + self.review_count = None + self._type = 'AggregateRating' + + +class CropArea(Model): + """A JSON object consisting of coordinates specifying the four corners of a + cropped rectangle within the input image. + + All required parameters must be populated in order to send to Azure. + + :param top: Required. The top coordinate of the region to be cropped. The + coordinate is a fractional value of the original image's height and is + measured from the top edge of the image. Specify the coordinate as a value + from 0.0 through 1.0. + :type top: float + :param bottom: Required. The bottom coordinate of the region to be + cropped. The coordinate is a fractional value of the original image's + height and is measured from the top edge of the image. Specify the + coordinate as a value from 0.0 through 1.0. + :type bottom: float + :param left: Required. The left coordinate of the region to be cropped. + The coordinate is a fractional value of the original image's width and is + measured from the left edge of the image. Specify the coordinate as a + value from 0.0 through 1.0. + :type left: float + :param right: Required. The right coordinate of the region to be cropped. + The coordinate is a fractional value of the original image's width and is + measured from the left edge of the image. Specify the coordinate as a + value from 0.0 through 1.0. + :type right: float + """ + + _validation = { + 'top': {'required': True}, + 'bottom': {'required': True}, + 'left': {'required': True}, + 'right': {'required': True}, + } + + _attribute_map = { + 'top': {'key': 'top', 'type': 'float'}, + 'bottom': {'key': 'bottom', 'type': 'float'}, + 'left': {'key': 'left', 'type': 'float'}, + 'right': {'key': 'right', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(CropArea, self).__init__(**kwargs) + self.top = kwargs.get('top', None) + self.bottom = kwargs.get('bottom', None) + self.left = kwargs.get('left', None) + self.right = kwargs.get('right', None) + + +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.visualsearch.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.visualsearch.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': 'str'}, + 'sub_code': {'key': 'subCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'more_details': {'key': 'moreDetails', 'type': 'str'}, + 'parameter': {'key': 'parameter', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', "None") + self.sub_code = None + self.message = kwargs.get('message', None) + self.more_details = None + self.parameter = None + self.value = None + + +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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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.visualsearch.models.Error] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'errors': {'required': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', 'type': 'str'}, + 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[Error]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.errors = kwargs.get('errors', None) + self._type = 'ErrorResponse' + + +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) + + +class Filters(Model): + """A key-value object consisting of filters that may be specified to limit the + results returned by the API. Current available filters: site. + + :param site: The URL of the site to return similar images and similar + products from. (e.g., "www.bing.com", "bing.com"). + :type site: str + """ + + _attribute_map = { + 'site': {'key': 'site', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Filters, self).__init__(**kwargs) + self.site = kwargs.get('site', None) + + +class ImageAction(Action): + """Defines an image action. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageEntityAction, ImageModuleAction, ImageRecipesAction, + ImageRelatedSearchesAction, ImageShoppingSourcesAction + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'ImageEntityAction': 'ImageEntityAction', 'ImageModuleAction': 'ImageModuleAction', 'ImageRecipesAction': 'ImageRecipesAction', 'ImageRelatedSearchesAction': 'ImageRelatedSearchesAction', 'ImageShoppingSourcesAction': 'ImageShoppingSourcesAction'} + } + + def __init__(self, **kwargs): + super(ImageAction, self).__init__(**kwargs) + self.action_type = None + self._type = 'ImageAction' + + +class ImageEntityAction(ImageAction): + """Defines an entity action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageEntityAction, self).__init__(**kwargs) + self._type = 'ImageEntityAction' + + +class ImageInfo(Model): + """A JSON object that identities the image to get insights of . It also + includes the optional crop area that you use to identify the region of + interest in the image. + + :param image_insights_token: An image insights token. To get the insights + token, call one of the Image Search APIs (for example, /images/search). In + the search results, the + [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) + object's + [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) + field contains the token. The imageInsightsToken and url fields mutually + exclusive; do not specify both. Do not specify an insights token if the + request includes the image form data. + :type image_insights_token: str + :param url: The URL of the input image. The imageInsightsToken and url + fields are mutually exclusive; do not specify both. Do not specify the URL + if the request includes the image form data. + :type url: str + :param crop_area: A JSON object consisting of coordinates specifying the + four corners of a cropped rectangle within the input image. Use the crop + area to identify the region of interest in the image. You can apply the + crop area to the images specified using the imageInsightsToken or url + fields, or an image binary specified in an image form data. + :type crop_area: + ~azure.cognitiveservices.search.visualsearch.models.CropArea + """ + + _attribute_map = { + 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'crop_area': {'key': 'cropArea', 'type': 'CropArea'}, + } + + def __init__(self, **kwargs): + super(ImageInfo, self).__init__(**kwargs) + self.image_insights_token = kwargs.get('image_insights_token', None) + self.url = kwargs.get('url', None) + self.crop_area = kwargs.get('crop_area', None) + + +class ImageKnowledge(Response): + """Defines a visual search API 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 + :ivar read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: str + :ivar web_search_url: The URL to Bing's search result for this item. + :vartype web_search_url: str + :ivar tags: A list of visual search tags. + :vartype tags: + list[~azure.cognitiveservices.search.visualsearch.models.ImageTag] + :ivar image: Image object containing metadata about the requested image. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'tags': {'readonly': True}, + 'image': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', 'type': 'str'}, + 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '[ImageTag]'}, + 'image': {'key': 'image', 'type': 'ImageObject'}, + } + + def __init__(self, **kwargs): + super(ImageKnowledge, self).__init__(**kwargs) + self.tags = None + self.image = None + self._type = 'ImageKnowledge' + + +class ImageModuleAction(ImageAction): + """Defines an image list action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of images. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.ImagesModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'ImagesModule'}, + } + + def __init__(self, **kwargs): + super(ImageModuleAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageModuleAction' + + +class MediaObject(CreativeWork): + """Defines a media object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageObject + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :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 content_size: Size of the media object content. Use format "value + unit" (e.g., "1024 B"). + :vartype content_size: str + :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). + :vartype encoding_format: str + :ivar host_page_display_url: Display URL of the page that hosts the media + object. + :vartype host_page_display_url: str + :ivar width: The width of the media object, in pixels. + :vartype width: int + :ivar height: The height of the media object, in pixels. + :vartype height: int + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'content_url': {'readonly': True}, + 'host_page_url': {'readonly': True}, + 'content_size': {'readonly': True}, + 'encoding_format': {'readonly': True}, + 'host_page_display_url': {'readonly': True}, + 'width': {'readonly': True}, + 'height': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'content_url': {'key': 'contentUrl', 'type': 'str'}, + 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'str'}, + 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, + 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'int'}, + 'height': {'key': 'height', 'type': 'int'}, + } + + _subtype_map = { + '_type': {'ImageObject': 'ImageObject'} + } + + def __init__(self, **kwargs): + super(MediaObject, self).__init__(**kwargs) + self.content_url = None + self.host_page_url = None + self.content_size = None + self.encoding_format = None + self.host_page_display_url = None + self.width = None + self.height = None + self._type = 'MediaObject' + + +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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :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 content_size: Size of the media object content. Use format "value + unit" (e.g., "1024 B"). + :vartype content_size: str + :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). + :vartype encoding_format: str + :ivar host_page_display_url: Display URL of the page that hosts the media + object. + :vartype host_page_display_url: str + :ivar width: The width of the media object, in pixels. + :vartype width: int + :ivar height: The height of the media object, in pixels. + :vartype height: int + :ivar thumbnail: The URL to a thumbnail of the image. + :vartype thumbnail: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar image_insights_token: The token that you use in a subsequent call to + Visual Search API to get additional information about the image. For + information about using this token, see the imageInsightsToken field + inside the knowledgeRequest request parameter. + :vartype image_insights_token: str + :ivar insights_metadata: A count of the number of websites where you can + shop or perform other actions related to the image. For example, if the + image is of an apple pie, this object includes a count of the number of + websites where you can buy an apple pie. To indicate the number of offers + in your UX, include badging such as a shopping cart icon that contains the + count. When the user clicks on the icon, use imageInsightsToken in a + subsequent Visual Search API call to get the list of shopping websites. + :vartype insights_metadata: + ~azure.cognitiveservices.search.visualsearch.models.ImagesImageMetadata + :ivar image_id: Unique Id for the image. + :vartype image_id: str + :ivar accent_color: A three-byte hexadecimal number that represents the + color that dominates the image. Use the color as the temporary background + in your client until the image is loaded. + :vartype accent_color: str + :ivar visual_words: For internal use only. + :vartype visual_words: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'content_url': {'readonly': True}, + 'host_page_url': {'readonly': True}, + 'content_size': {'readonly': True}, + 'encoding_format': {'readonly': True}, + 'host_page_display_url': {'readonly': True}, + 'width': {'readonly': True}, + 'height': {'readonly': True}, + 'thumbnail': {'readonly': True}, + 'image_insights_token': {'readonly': True}, + 'insights_metadata': {'readonly': True}, + 'image_id': {'readonly': True}, + 'accent_color': {'readonly': True}, + 'visual_words': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'content_url': {'key': 'contentUrl', 'type': 'str'}, + 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'str'}, + 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, + 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'int'}, + 'height': {'key': 'height', 'type': 'int'}, + 'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'}, + 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, + 'insights_metadata': {'key': 'insightsMetadata', 'type': 'ImagesImageMetadata'}, + 'image_id': {'key': 'imageId', 'type': 'str'}, + 'accent_color': {'key': 'accentColor', 'type': 'str'}, + 'visual_words': {'key': 'visualWords', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ImageObject, self).__init__(**kwargs) + self.thumbnail = None + self.image_insights_token = None + self.insights_metadata = None + self.image_id = None + self.accent_color = None + self.visual_words = None + self._type = 'ImageObject' + + +class ImageRecipesAction(ImageAction): + """Defines an recipe action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of recipes related to the image. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.RecipesModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'RecipesModule'}, + } + + def __init__(self, **kwargs): + super(ImageRecipesAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageRecipesAction' + + +class ImageRelatedSearchesAction(ImageAction): + """Defines an related search action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of queries related to the image. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.RelatedSearchesModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'RelatedSearchesModule'}, + } + + def __init__(self, **kwargs): + super(ImageRelatedSearchesAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageRelatedSearchesAction' + + +class ImageShoppingSourcesAction(ImageAction): + """Defines a shopping sources action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of merchants that offer items related to the image. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'AggregateOffer'}, + } + + def __init__(self, **kwargs): + super(ImageShoppingSourcesAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageShoppingSourcesAction' + + +class ImagesImageMetadata(Model): + """Defines a count of the number of websites where you can shop or perform + other actions related to the image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar shopping_sources_count: The number of websites that sell the + products seen in the image. + :vartype shopping_sources_count: int + :ivar recipe_sources_count: The number of websites that offer recipes of + the food seen in the image. + :vartype recipe_sources_count: int + :ivar aggregate_offer: A summary of the online offers of products found in + the image. For example, if the image is of a dress, the offer might + identify the lowest price and the number of offers found. Only visually + similar products insights include this field. The offer includes the + following fields: Name, AggregateRating, OfferCount, and LowPrice. + :vartype aggregate_offer: + ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer + """ + + _validation = { + 'shopping_sources_count': {'readonly': True}, + 'recipe_sources_count': {'readonly': True}, + 'aggregate_offer': {'readonly': True}, + } + + _attribute_map = { + 'shopping_sources_count': {'key': 'shoppingSourcesCount', 'type': 'int'}, + 'recipe_sources_count': {'key': 'recipeSourcesCount', 'type': 'int'}, + 'aggregate_offer': {'key': 'aggregateOffer', 'type': 'AggregateOffer'}, + } + + def __init__(self, **kwargs): + super(ImagesImageMetadata, self).__init__(**kwargs) + self.shopping_sources_count = None + self.recipe_sources_count = None + self.aggregate_offer = None + + +class ImagesModule(Model): + """Defines a list of images. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of images. + :vartype value: + list[~azure.cognitiveservices.search.visualsearch.models.ImageObject] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImageObject]'}, + } + + def __init__(self, **kwargs): + super(ImagesModule, self).__init__(**kwargs) + self.value = None + + +class ImageTag(Thing): + """A visual search tag. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar display_name: Display name for this tag. For the default tag, the + display name is empty. + :vartype display_name: str + :ivar bounding_box: The bounding box for this tag. For the default tag, + there is no bounding box. + :vartype bounding_box: + ~azure.cognitiveservices.search.visualsearch.models.ImageTagRegion + :ivar actions: Actions within this tag. The order of the items denotes the + default ranking order of these actions, with the first action being the + most likely user intent. + :vartype actions: + list[~azure.cognitiveservices.search.visualsearch.models.ImageAction] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'display_name': {'readonly': True}, + 'bounding_box': {'readonly': True}, + 'actions': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'bounding_box': {'key': 'boundingBox', 'type': 'ImageTagRegion'}, + 'actions': {'key': 'actions', 'type': '[ImageAction]'}, + } + + def __init__(self, **kwargs): + super(ImageTag, self).__init__(**kwargs) + self.display_name = None + self.bounding_box = None + self.actions = None + self._type = 'ImageTag' + + +class ImageTagRegion(Model): + """Defines an image region relevant to the ImageTag. + + All required parameters must be populated in order to send to Azure. + + :param query_rectangle: Required. A rectangle that outlines the area of + interest for this tag. + :type query_rectangle: + ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral + :param display_rectangle: Required. A recommended rectangle to show to the + user. + :type display_rectangle: + ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral + """ + + _validation = { + 'query_rectangle': {'required': True}, + 'display_rectangle': {'required': True}, + } + + _attribute_map = { + 'query_rectangle': {'key': 'queryRectangle', 'type': 'NormalizedQuadrilateral'}, + 'display_rectangle': {'key': 'displayRectangle', 'type': 'NormalizedQuadrilateral'}, + } + + def __init__(self, **kwargs): + super(ImageTagRegion, self).__init__(**kwargs) + self.query_rectangle = kwargs.get('query_rectangle', None) + self.display_rectangle = kwargs.get('display_rectangle', None) + + +class Intangible(Thing): + """A utility class that serves as the umbrella for a number of 'intangible' + things such as quantities, structured values, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StructuredValue + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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': {'StructuredValue': 'StructuredValue'} + } + + def __init__(self, **kwargs): + super(Intangible, self).__init__(**kwargs) + self._type = 'Intangible' + + +class KnowledgeRequest(Model): + """A JSON object containing information about the request, such as filters for + the resulting actions. + + :param filters: A key-value object consisting of filters that may be + specified to limit the results returned by the API. + :type filters: ~azure.cognitiveservices.search.visualsearch.models.Filters + """ + + _attribute_map = { + 'filters': {'key': 'filters', 'type': 'Filters'}, + } + + def __init__(self, **kwargs): + super(KnowledgeRequest, self).__init__(**kwargs) + self.filters = kwargs.get('filters', None) + + +class StructuredValue(Intangible): + """StructuredValue. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Point2D, NormalizedQuadrilateral + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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': {'Point2D': 'Point2D', 'NormalizedQuadrilateral': 'NormalizedQuadrilateral'} + } + + def __init__(self, **kwargs): + super(StructuredValue, self).__init__(**kwargs) + self._type = 'StructuredValue' + + +class NormalizedQuadrilateral(StructuredValue): + """Defines a region of an image. The region is a convex quadrilateral defined + by coordinates of its top left, top right, bottom left, and bottom right + points. The coordinates are fractional values of the original image's width + and height in the range 0.0 through 1.0. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :param top_left: Required. The top left corner coordinate. + :type top_left: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + :param top_right: Required. The top right corner coordinate. + :type top_right: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + :param bottom_right: Required. The bottom right corner coordinate. + :type bottom_right: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + :param bottom_left: Required. The bottom left corner coordinate. + :type bottom_left: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'top_left': {'required': True}, + 'top_right': {'required': True}, + 'bottom_right': {'required': True}, + 'bottom_left': {'required': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'top_left': {'key': 'topLeft', 'type': 'Point2D'}, + 'top_right': {'key': 'topRight', 'type': 'Point2D'}, + 'bottom_right': {'key': 'bottomRight', 'type': 'Point2D'}, + 'bottom_left': {'key': 'bottomLeft', 'type': 'Point2D'}, + } + + def __init__(self, **kwargs): + super(NormalizedQuadrilateral, self).__init__(**kwargs) + self.top_left = kwargs.get('top_left', None) + self.top_right = kwargs.get('top_right', None) + self.bottom_right = kwargs.get('bottom_right', None) + self.bottom_left = kwargs.get('bottom_left', None) + self._type = 'NormalizedQuadrilateral' + + +class Organization(Thing): + """Defines an organization. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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'}, + } + + def __init__(self, **kwargs): + super(Organization, self).__init__(**kwargs) + self._type = 'Organization' + + +class Person(Thing): + """Defines a person. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar job_title: The person's job title. + :vartype job_title: str + :ivar twitter_profile: The URL of the person's twitter profile. + :vartype twitter_profile: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'job_title': {'readonly': True}, + 'twitter_profile': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'job_title': {'key': 'jobTitle', 'type': 'str'}, + 'twitter_profile': {'key': 'twitterProfile', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Person, self).__init__(**kwargs) + self.job_title = None + self.twitter_profile = None + self._type = 'Person' + + +class Point2D(StructuredValue): + """Defines a 2D point with X and Y coordinates. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :param x: Required. The x-coordinate of the point. + :type x: float + :param y: Required. The y-coordinate of the point. + :type y: float + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'x': {'required': True}, + 'y': {'required': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'x': {'key': 'x', 'type': 'float'}, + 'y': {'key': 'y', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(Point2D, self).__init__(**kwargs) + self.x = kwargs.get('x', None) + self.y = kwargs.get('y', None) + self._type = 'Point2D' + + +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. + :vartype display_text: str + :ivar web_search_url: The URL that takes the user to the Bing search + results page for the query. + :vartype web_search_url: str + :ivar search_link: The URL that you use to get the results of the related + search. Before using the URL, you must append query parameters as + appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL + if you're displaying the results in your own user interface. Otherwise, + use the webSearchUrl URL. + :vartype search_link: str + :ivar thumbnail: The URL to a thumbnail of a related image. + :vartype thumbnail: + ~azure.cognitiveservices.search.visualsearch.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, **kwargs): + super(Query, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.display_text = None + self.web_search_url = None + self.search_link = None + self.thumbnail = None + + +class Recipe(CreativeWork): + """Defines a cooking recipe. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar cook_time: The amount of time the food takes to cook. For example, + PT25M. For information about the time format, see + http://en.wikipedia.org/wiki/ISO_8601#Durations. + :vartype cook_time: str + :ivar prep_time: The amount of time required to prepare the ingredients. + For example, PT15M. For information about the time format, see + http://en.wikipedia.org/wiki/ISO_8601#Durations. + :vartype prep_time: str + :ivar total_time: The total amount of time it takes to prepare and cook + the recipe. For example, PT45M. For information about the time format, see + http://en.wikipedia.org/wiki/ISO_8601#Durations. + :vartype total_time: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'cook_time': {'readonly': True}, + 'prep_time': {'readonly': True}, + 'total_time': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'cook_time': {'key': 'cookTime', 'type': 'str'}, + 'prep_time': {'key': 'prepTime', 'type': 'str'}, + 'total_time': {'key': 'totalTime', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Recipe, self).__init__(**kwargs) + self.cook_time = None + self.prep_time = None + self.total_time = None + self._type = 'Recipe' + + +class RecipesModule(Model): + """Defines a list of recipes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of recipes. + :vartype value: + list[~azure.cognitiveservices.search.visualsearch.models.Recipe] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Recipe]'}, + } + + def __init__(self, **kwargs): + super(RecipesModule, self).__init__(**kwargs) + self.value = None + + +class RelatedSearchesModule(Model): + """Defines a list of related searches. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of related searches. + :vartype value: + list[~azure.cognitiveservices.search.visualsearch.models.Query] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Query]'}, + } + + def __init__(self, **kwargs): + super(RelatedSearchesModule, self).__init__(**kwargs) + self.value = None + + +class VisualSearchRequest(Model): + """A JSON object that contains information about the image to get insights of. + Specify this object only in a knowledgeRequest form data. + + :param image_info: A JSON object that identities the image to get insights + of. + :type image_info: + ~azure.cognitiveservices.search.visualsearch.models.ImageInfo + :param knowledge_request: A JSON object containing information about the + request, such as filters, or a description. + :type knowledge_request: + ~azure.cognitiveservices.search.visualsearch.models.KnowledgeRequest + """ + + _attribute_map = { + 'image_info': {'key': 'imageInfo', 'type': 'ImageInfo'}, + 'knowledge_request': {'key': 'knowledgeRequest', 'type': 'KnowledgeRequest'}, + } + + def __init__(self, **kwargs): + super(VisualSearchRequest, self).__init__(**kwargs) + self.image_info = kwargs.get('image_info', None) + self.knowledge_request = kwargs.get('knowledge_request', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_models_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_models_py3.py new file mode 100644 index 000000000000..6d8f18c8b4c9 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_models_py3.py @@ -0,0 +1,2906 @@ +# 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 + + +class ResponseBase(Model): + """Response base. + + 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 + + +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' + + +class Response(Identifiable): + """Defines a response. All schemas that return at the root of the response + must inherit from this object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageKnowledge, ErrorResponse, Thing + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', 'type': 'str'}, + 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'ImageKnowledge': 'ImageKnowledge', 'ErrorResponse': 'ErrorResponse', 'Thing': 'Thing'} + } + + def __init__(self, **kwargs) -> None: + super(Response, self).__init__(**kwargs) + self.read_link = None + self.web_search_url = None + self._type = 'Response' + + +class Thing(Response): + """Defines a thing. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageTag, Organization, Offer, CreativeWork, Person, + Intangible + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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': {'ImageTag': 'ImageTag', 'Organization': 'Organization', 'Offer': 'Offer', 'CreativeWork': 'CreativeWork', 'Person': 'Person', 'Intangible': 'Intangible'} + } + + 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' + + +class CreativeWork(Thing): + """The most generic kind of creative work, including books, movies, + photographs, software programs, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Action, MediaObject, Recipe + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'Action': 'Action', 'MediaObject': 'MediaObject', 'Recipe': 'Recipe'} + } + + def __init__(self, **kwargs) -> None: + super(CreativeWork, self).__init__(**kwargs) + self.thumbnail_url = None + self.provider = None + self.date_published = None + self.text = None + self._type = 'CreativeWork' + + +class Action(CreativeWork): + """Defines an action. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageAction + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'ImageAction': 'ImageAction'} + } + + def __init__(self, **kwargs) -> None: + super(Action, self).__init__(**kwargs) + self.result = None + self.display_name = None + self.is_top_action = None + self.service_url = None + self._type = 'Action' + + +class Offer(Thing): + """Defines a merchant's offer. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AggregateOffer + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar seller: Seller for this offer. + :vartype seller: + ~azure.cognitiveservices.search.visualsearch.models.Organization + :ivar price: The item's price. + :vartype price: float + :ivar price_currency: The monetary currency. For example, USD. Possible + values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', + 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', + 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', + 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', + 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', + 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', + 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', + 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', + 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', + 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', + 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', + 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', + 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', + 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', + 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', + 'YER', 'ZAR', 'ZMW'. Default value: "USD" . + :vartype price_currency: str or + ~azure.cognitiveservices.search.visualsearch.models.Currency + :ivar availability: The item's availability. The following are the + possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, + OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: + 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', + 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' + :vartype availability: str or + ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability + :ivar aggregate_rating: An aggregated rating that indicates how well the + product has been rated by others. + :vartype aggregate_rating: + ~azure.cognitiveservices.search.visualsearch.models.AggregateRating + :ivar last_updated: The last date that the offer was updated. The date is + in the form YYYY-MM-DD. + :vartype last_updated: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'seller': {'readonly': True}, + 'price': {'readonly': True}, + 'price_currency': {'readonly': True}, + 'availability': {'readonly': True}, + 'aggregate_rating': {'readonly': True}, + 'last_updated': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'seller': {'key': 'seller', 'type': 'Organization'}, + 'price': {'key': 'price', 'type': 'float'}, + 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'AggregateOffer': 'AggregateOffer'} + } + + def __init__(self, **kwargs) -> None: + super(Offer, self).__init__(**kwargs) + self.seller = None + self.price = None + self.price_currency = None + self.availability = None + self.aggregate_rating = None + self.last_updated = None + self._type = 'Offer' + + +class AggregateOffer(Offer): + """Defines a list of offers from merchants that are related to the 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar seller: Seller for this offer. + :vartype seller: + ~azure.cognitiveservices.search.visualsearch.models.Organization + :ivar price: The item's price. + :vartype price: float + :ivar price_currency: The monetary currency. For example, USD. Possible + values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', + 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', + 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', + 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', + 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', + 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', + 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', + 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', + 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', + 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', + 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', + 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', + 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', + 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', + 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', + 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', + 'YER', 'ZAR', 'ZMW'. Default value: "USD" . + :vartype price_currency: str or + ~azure.cognitiveservices.search.visualsearch.models.Currency + :ivar availability: The item's availability. The following are the + possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, + OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: + 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', + 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' + :vartype availability: str or + ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability + :ivar aggregate_rating: An aggregated rating that indicates how well the + product has been rated by others. + :vartype aggregate_rating: + ~azure.cognitiveservices.search.visualsearch.models.AggregateRating + :ivar last_updated: The last date that the offer was updated. The date is + in the form YYYY-MM-DD. + :vartype last_updated: str + :ivar offers: A list of offers from merchants that have offerings related + to the image. + :vartype offers: + list[~azure.cognitiveservices.search.visualsearch.models.Offer] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'seller': {'readonly': True}, + 'price': {'readonly': True}, + 'price_currency': {'readonly': True}, + 'availability': {'readonly': True}, + 'aggregate_rating': {'readonly': True}, + 'last_updated': {'readonly': True}, + 'offers': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'seller': {'key': 'seller', 'type': 'Organization'}, + 'price': {'key': 'price', 'type': 'float'}, + 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, + 'availability': {'key': 'availability', 'type': 'str'}, + 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + 'offers': {'key': 'offers', 'type': '[Offer]'}, + } + + def __init__(self, **kwargs) -> None: + super(AggregateOffer, self).__init__(**kwargs) + self.offers = None + self._type = 'AggregateOffer' + + +class PropertiesItem(Model): + """Defines an item. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Rating + + 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. + + :ivar text: Text representation of an item. + :vartype text: str + :param _type: Required. Constant filled by server. + :type _type: str + """ + + _validation = { + 'text': {'readonly': True}, + '_type': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + '_type': {'key': '_type', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'Rating': 'Rating'} + } + + def __init__(self, **kwargs) -> None: + super(PropertiesItem, self).__init__(**kwargs) + self.text = None + self._type = None + + +class Rating(PropertiesItem): + """Defines a rating. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AggregateRating + + 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. + + :ivar text: Text representation of an item. + :vartype text: str + :param _type: Required. Constant filled by server. + :type _type: str + :param rating_value: Required. The mean (average) rating. The possible + values are 1.0 through 5.0. + :type rating_value: float + :ivar best_rating: The highest rated review. The possible values are 1.0 + through 5.0. + :vartype best_rating: float + """ + + _validation = { + 'text': {'readonly': True}, + '_type': {'required': True}, + 'rating_value': {'required': True}, + 'best_rating': {'readonly': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + '_type': {'key': '_type', 'type': 'str'}, + 'rating_value': {'key': 'ratingValue', 'type': 'float'}, + 'best_rating': {'key': 'bestRating', 'type': 'float'}, + } + + _subtype_map = { + '_type': {'AggregateRating': 'AggregateRating'} + } + + def __init__(self, *, rating_value: float, **kwargs) -> None: + super(Rating, self).__init__(**kwargs) + self.rating_value = rating_value + self.best_rating = None + self._type = 'Rating' + + +class AggregateRating(Rating): + """Defines the metrics that indicate how well an item was rated by others. + + 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. + + :ivar text: Text representation of an item. + :vartype text: str + :param _type: Required. Constant filled by server. + :type _type: str + :param rating_value: Required. The mean (average) rating. The possible + values are 1.0 through 5.0. + :type rating_value: float + :ivar best_rating: The highest rated review. The possible values are 1.0 + through 5.0. + :vartype best_rating: float + :ivar review_count: The number of times the recipe has been rated or + reviewed. + :vartype review_count: int + """ + + _validation = { + 'text': {'readonly': True}, + '_type': {'required': True}, + 'rating_value': {'required': True}, + 'best_rating': {'readonly': True}, + 'review_count': {'readonly': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + '_type': {'key': '_type', 'type': 'str'}, + 'rating_value': {'key': 'ratingValue', 'type': 'float'}, + 'best_rating': {'key': 'bestRating', 'type': 'float'}, + 'review_count': {'key': 'reviewCount', 'type': 'int'}, + } + + def __init__(self, *, rating_value: float, **kwargs) -> None: + super(AggregateRating, self).__init__(rating_value=rating_value, **kwargs) + self.review_count = None + self._type = 'AggregateRating' + + +class CropArea(Model): + """A JSON object consisting of coordinates specifying the four corners of a + cropped rectangle within the input image. + + All required parameters must be populated in order to send to Azure. + + :param top: Required. The top coordinate of the region to be cropped. The + coordinate is a fractional value of the original image's height and is + measured from the top edge of the image. Specify the coordinate as a value + from 0.0 through 1.0. + :type top: float + :param bottom: Required. The bottom coordinate of the region to be + cropped. The coordinate is a fractional value of the original image's + height and is measured from the top edge of the image. Specify the + coordinate as a value from 0.0 through 1.0. + :type bottom: float + :param left: Required. The left coordinate of the region to be cropped. + The coordinate is a fractional value of the original image's width and is + measured from the left edge of the image. Specify the coordinate as a + value from 0.0 through 1.0. + :type left: float + :param right: Required. The right coordinate of the region to be cropped. + The coordinate is a fractional value of the original image's width and is + measured from the left edge of the image. Specify the coordinate as a + value from 0.0 through 1.0. + :type right: float + """ + + _validation = { + 'top': {'required': True}, + 'bottom': {'required': True}, + 'left': {'required': True}, + 'right': {'required': True}, + } + + _attribute_map = { + 'top': {'key': 'top', 'type': 'float'}, + 'bottom': {'key': 'bottom', 'type': 'float'}, + 'left': {'key': 'left', 'type': 'float'}, + 'right': {'key': 'right', 'type': 'float'}, + } + + def __init__(self, *, top: float, bottom: float, left: float, right: float, **kwargs) -> None: + super(CropArea, self).__init__(**kwargs) + self.top = top + self.bottom = bottom + self.left = left + self.right = right + + +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.visualsearch.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.visualsearch.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': 'str'}, + 'sub_code': {'key': 'subCode', 'type': 'str'}, + '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 + + +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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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.visualsearch.models.Error] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'errors': {'required': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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' + + +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) + + +class Filters(Model): + """A key-value object consisting of filters that may be specified to limit the + results returned by the API. Current available filters: site. + + :param site: The URL of the site to return similar images and similar + products from. (e.g., "www.bing.com", "bing.com"). + :type site: str + """ + + _attribute_map = { + 'site': {'key': 'site', 'type': 'str'}, + } + + def __init__(self, *, site: str=None, **kwargs) -> None: + super(Filters, self).__init__(**kwargs) + self.site = site + + +class ImageAction(Action): + """Defines an image action. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageEntityAction, ImageModuleAction, ImageRecipesAction, + ImageRelatedSearchesAction, ImageShoppingSourcesAction + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + _subtype_map = { + '_type': {'ImageEntityAction': 'ImageEntityAction', 'ImageModuleAction': 'ImageModuleAction', 'ImageRecipesAction': 'ImageRecipesAction', 'ImageRelatedSearchesAction': 'ImageRelatedSearchesAction', 'ImageShoppingSourcesAction': 'ImageShoppingSourcesAction'} + } + + def __init__(self, **kwargs) -> None: + super(ImageAction, self).__init__(**kwargs) + self.action_type = None + self._type = 'ImageAction' + + +class ImageEntityAction(ImageAction): + """Defines an entity action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageEntityAction, self).__init__(**kwargs) + self._type = 'ImageEntityAction' + + +class ImageInfo(Model): + """A JSON object that identities the image to get insights of . It also + includes the optional crop area that you use to identify the region of + interest in the image. + + :param image_insights_token: An image insights token. To get the insights + token, call one of the Image Search APIs (for example, /images/search). In + the search results, the + [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) + object's + [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) + field contains the token. The imageInsightsToken and url fields mutually + exclusive; do not specify both. Do not specify an insights token if the + request includes the image form data. + :type image_insights_token: str + :param url: The URL of the input image. The imageInsightsToken and url + fields are mutually exclusive; do not specify both. Do not specify the URL + if the request includes the image form data. + :type url: str + :param crop_area: A JSON object consisting of coordinates specifying the + four corners of a cropped rectangle within the input image. Use the crop + area to identify the region of interest in the image. You can apply the + crop area to the images specified using the imageInsightsToken or url + fields, or an image binary specified in an image form data. + :type crop_area: + ~azure.cognitiveservices.search.visualsearch.models.CropArea + """ + + _attribute_map = { + 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'crop_area': {'key': 'cropArea', 'type': 'CropArea'}, + } + + def __init__(self, *, image_insights_token: str=None, url: str=None, crop_area=None, **kwargs) -> None: + super(ImageInfo, self).__init__(**kwargs) + self.image_insights_token = image_insights_token + self.url = url + self.crop_area = crop_area + + +class ImageKnowledge(Response): + """Defines a visual search API 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 + :ivar read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: str + :ivar web_search_url: The URL to Bing's search result for this item. + :vartype web_search_url: str + :ivar tags: A list of visual search tags. + :vartype tags: + list[~azure.cognitiveservices.search.visualsearch.models.ImageTag] + :ivar image: Image object containing metadata about the requested image. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'tags': {'readonly': True}, + 'image': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', 'type': 'str'}, + 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '[ImageTag]'}, + 'image': {'key': 'image', 'type': 'ImageObject'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageKnowledge, self).__init__(**kwargs) + self.tags = None + self.image = None + self._type = 'ImageKnowledge' + + +class ImageModuleAction(ImageAction): + """Defines an image list action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of images. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.ImagesModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'ImagesModule'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageModuleAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageModuleAction' + + +class MediaObject(CreativeWork): + """Defines a media object. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageObject + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :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 content_size: Size of the media object content. Use format "value + unit" (e.g., "1024 B"). + :vartype content_size: str + :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). + :vartype encoding_format: str + :ivar host_page_display_url: Display URL of the page that hosts the media + object. + :vartype host_page_display_url: str + :ivar width: The width of the media object, in pixels. + :vartype width: int + :ivar height: The height of the media object, in pixels. + :vartype height: int + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'content_url': {'readonly': True}, + 'host_page_url': {'readonly': True}, + 'content_size': {'readonly': True}, + 'encoding_format': {'readonly': True}, + 'host_page_display_url': {'readonly': True}, + 'width': {'readonly': True}, + 'height': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'content_url': {'key': 'contentUrl', 'type': 'str'}, + 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'str'}, + 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, + 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'int'}, + 'height': {'key': 'height', 'type': 'int'}, + } + + _subtype_map = { + '_type': {'ImageObject': 'ImageObject'} + } + + def __init__(self, **kwargs) -> None: + super(MediaObject, self).__init__(**kwargs) + self.content_url = None + self.host_page_url = None + self.content_size = None + self.encoding_format = None + self.host_page_display_url = None + self.width = None + self.height = None + self._type = 'MediaObject' + + +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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :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 content_size: Size of the media object content. Use format "value + unit" (e.g., "1024 B"). + :vartype content_size: str + :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). + :vartype encoding_format: str + :ivar host_page_display_url: Display URL of the page that hosts the media + object. + :vartype host_page_display_url: str + :ivar width: The width of the media object, in pixels. + :vartype width: int + :ivar height: The height of the media object, in pixels. + :vartype height: int + :ivar thumbnail: The URL to a thumbnail of the image. + :vartype thumbnail: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar image_insights_token: The token that you use in a subsequent call to + Visual Search API to get additional information about the image. For + information about using this token, see the imageInsightsToken field + inside the knowledgeRequest request parameter. + :vartype image_insights_token: str + :ivar insights_metadata: A count of the number of websites where you can + shop or perform other actions related to the image. For example, if the + image is of an apple pie, this object includes a count of the number of + websites where you can buy an apple pie. To indicate the number of offers + in your UX, include badging such as a shopping cart icon that contains the + count. When the user clicks on the icon, use imageInsightsToken in a + subsequent Visual Search API call to get the list of shopping websites. + :vartype insights_metadata: + ~azure.cognitiveservices.search.visualsearch.models.ImagesImageMetadata + :ivar image_id: Unique Id for the image. + :vartype image_id: str + :ivar accent_color: A three-byte hexadecimal number that represents the + color that dominates the image. Use the color as the temporary background + in your client until the image is loaded. + :vartype accent_color: str + :ivar visual_words: For internal use only. + :vartype visual_words: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'content_url': {'readonly': True}, + 'host_page_url': {'readonly': True}, + 'content_size': {'readonly': True}, + 'encoding_format': {'readonly': True}, + 'host_page_display_url': {'readonly': True}, + 'width': {'readonly': True}, + 'height': {'readonly': True}, + 'thumbnail': {'readonly': True}, + 'image_insights_token': {'readonly': True}, + 'insights_metadata': {'readonly': True}, + 'image_id': {'readonly': True}, + 'accent_color': {'readonly': True}, + 'visual_words': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'content_url': {'key': 'contentUrl', 'type': 'str'}, + 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, + 'content_size': {'key': 'contentSize', 'type': 'str'}, + 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, + 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'int'}, + 'height': {'key': 'height', 'type': 'int'}, + 'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'}, + 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, + 'insights_metadata': {'key': 'insightsMetadata', 'type': 'ImagesImageMetadata'}, + 'image_id': {'key': 'imageId', 'type': 'str'}, + 'accent_color': {'key': 'accentColor', 'type': 'str'}, + 'visual_words': {'key': 'visualWords', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageObject, self).__init__(**kwargs) + self.thumbnail = None + self.image_insights_token = None + self.insights_metadata = None + self.image_id = None + self.accent_color = None + self.visual_words = None + self._type = 'ImageObject' + + +class ImageRecipesAction(ImageAction): + """Defines an recipe action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of recipes related to the image. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.RecipesModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'RecipesModule'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageRecipesAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageRecipesAction' + + +class ImageRelatedSearchesAction(ImageAction): + """Defines an related search action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of queries related to the image. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.RelatedSearchesModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'RelatedSearchesModule'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageRelatedSearchesAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageRelatedSearchesAction' + + +class ImageShoppingSourcesAction(ImageAction): + """Defines a shopping sources action. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar result: The result produced in the action. + :vartype result: + list[~azure.cognitiveservices.search.visualsearch.models.Thing] + :ivar display_name: A display name for the action. + :vartype display_name: str + :ivar is_top_action: A Boolean representing whether this result is the top + action. + :vartype is_top_action: bool + :ivar service_url: Use this URL to get additional data to determine how to + take the appropriate action. For example, the serviceUrl might return JSON + along with an image URL. + :vartype service_url: str + :ivar action_type: A string representing the type of action. + :vartype action_type: str + :ivar data: A list of merchants that offer items related to the image. + :vartype data: + ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'result': {'readonly': True}, + 'display_name': {'readonly': True}, + 'is_top_action': {'readonly': True}, + 'service_url': {'readonly': True}, + 'action_type': {'readonly': True}, + 'data': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'result': {'key': 'result', 'type': '[Thing]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, + 'service_url': {'key': 'serviceUrl', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'AggregateOffer'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageShoppingSourcesAction, self).__init__(**kwargs) + self.data = None + self._type = 'ImageShoppingSourcesAction' + + +class ImagesImageMetadata(Model): + """Defines a count of the number of websites where you can shop or perform + other actions related to the image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar shopping_sources_count: The number of websites that sell the + products seen in the image. + :vartype shopping_sources_count: int + :ivar recipe_sources_count: The number of websites that offer recipes of + the food seen in the image. + :vartype recipe_sources_count: int + :ivar aggregate_offer: A summary of the online offers of products found in + the image. For example, if the image is of a dress, the offer might + identify the lowest price and the number of offers found. Only visually + similar products insights include this field. The offer includes the + following fields: Name, AggregateRating, OfferCount, and LowPrice. + :vartype aggregate_offer: + ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer + """ + + _validation = { + 'shopping_sources_count': {'readonly': True}, + 'recipe_sources_count': {'readonly': True}, + 'aggregate_offer': {'readonly': True}, + } + + _attribute_map = { + 'shopping_sources_count': {'key': 'shoppingSourcesCount', 'type': 'int'}, + 'recipe_sources_count': {'key': 'recipeSourcesCount', 'type': 'int'}, + 'aggregate_offer': {'key': 'aggregateOffer', 'type': 'AggregateOffer'}, + } + + def __init__(self, **kwargs) -> None: + super(ImagesImageMetadata, self).__init__(**kwargs) + self.shopping_sources_count = None + self.recipe_sources_count = None + self.aggregate_offer = None + + +class ImagesModule(Model): + """Defines a list of images. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of images. + :vartype value: + list[~azure.cognitiveservices.search.visualsearch.models.ImageObject] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImageObject]'}, + } + + def __init__(self, **kwargs) -> None: + super(ImagesModule, self).__init__(**kwargs) + self.value = None + + +class ImageTag(Thing): + """A visual search tag. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar display_name: Display name for this tag. For the default tag, the + display name is empty. + :vartype display_name: str + :ivar bounding_box: The bounding box for this tag. For the default tag, + there is no bounding box. + :vartype bounding_box: + ~azure.cognitiveservices.search.visualsearch.models.ImageTagRegion + :ivar actions: Actions within this tag. The order of the items denotes the + default ranking order of these actions, with the first action being the + most likely user intent. + :vartype actions: + list[~azure.cognitiveservices.search.visualsearch.models.ImageAction] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'display_name': {'readonly': True}, + 'bounding_box': {'readonly': True}, + 'actions': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'bounding_box': {'key': 'boundingBox', 'type': 'ImageTagRegion'}, + 'actions': {'key': 'actions', 'type': '[ImageAction]'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageTag, self).__init__(**kwargs) + self.display_name = None + self.bounding_box = None + self.actions = None + self._type = 'ImageTag' + + +class ImageTagRegion(Model): + """Defines an image region relevant to the ImageTag. + + All required parameters must be populated in order to send to Azure. + + :param query_rectangle: Required. A rectangle that outlines the area of + interest for this tag. + :type query_rectangle: + ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral + :param display_rectangle: Required. A recommended rectangle to show to the + user. + :type display_rectangle: + ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral + """ + + _validation = { + 'query_rectangle': {'required': True}, + 'display_rectangle': {'required': True}, + } + + _attribute_map = { + 'query_rectangle': {'key': 'queryRectangle', 'type': 'NormalizedQuadrilateral'}, + 'display_rectangle': {'key': 'displayRectangle', 'type': 'NormalizedQuadrilateral'}, + } + + def __init__(self, *, query_rectangle, display_rectangle, **kwargs) -> None: + super(ImageTagRegion, self).__init__(**kwargs) + self.query_rectangle = query_rectangle + self.display_rectangle = display_rectangle + + +class Intangible(Thing): + """A utility class that serves as the umbrella for a number of 'intangible' + things such as quantities, structured values, etc. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: StructuredValue + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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': {'StructuredValue': 'StructuredValue'} + } + + def __init__(self, **kwargs) -> None: + super(Intangible, self).__init__(**kwargs) + self._type = 'Intangible' + + +class KnowledgeRequest(Model): + """A JSON object containing information about the request, such as filters for + the resulting actions. + + :param filters: A key-value object consisting of filters that may be + specified to limit the results returned by the API. + :type filters: ~azure.cognitiveservices.search.visualsearch.models.Filters + """ + + _attribute_map = { + 'filters': {'key': 'filters', 'type': 'Filters'}, + } + + def __init__(self, *, filters=None, **kwargs) -> None: + super(KnowledgeRequest, self).__init__(**kwargs) + self.filters = filters + + +class StructuredValue(Intangible): + """StructuredValue. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Point2D, NormalizedQuadrilateral + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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': {'Point2D': 'Point2D', 'NormalizedQuadrilateral': 'NormalizedQuadrilateral'} + } + + def __init__(self, **kwargs) -> None: + super(StructuredValue, self).__init__(**kwargs) + self._type = 'StructuredValue' + + +class NormalizedQuadrilateral(StructuredValue): + """Defines a region of an image. The region is a convex quadrilateral defined + by coordinates of its top left, top right, bottom left, and bottom right + points. The coordinates are fractional values of the original image's width + and height in the range 0.0 through 1.0. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :param top_left: Required. The top left corner coordinate. + :type top_left: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + :param top_right: Required. The top right corner coordinate. + :type top_right: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + :param bottom_right: Required. The bottom right corner coordinate. + :type bottom_right: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + :param bottom_left: Required. The bottom left corner coordinate. + :type bottom_left: + ~azure.cognitiveservices.search.visualsearch.models.Point2D + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'top_left': {'required': True}, + 'top_right': {'required': True}, + 'bottom_right': {'required': True}, + 'bottom_left': {'required': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'top_left': {'key': 'topLeft', 'type': 'Point2D'}, + 'top_right': {'key': 'topRight', 'type': 'Point2D'}, + 'bottom_right': {'key': 'bottomRight', 'type': 'Point2D'}, + 'bottom_left': {'key': 'bottomLeft', 'type': 'Point2D'}, + } + + def __init__(self, *, top_left, top_right, bottom_right, bottom_left, **kwargs) -> None: + super(NormalizedQuadrilateral, self).__init__(**kwargs) + self.top_left = top_left + self.top_right = top_right + self.bottom_right = bottom_right + self.bottom_left = bottom_left + self._type = 'NormalizedQuadrilateral' + + +class Organization(Thing): + """Defines an organization. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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}, + 'read_link': {'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'}, + 'read_link': {'key': 'readLink', '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'}, + } + + def __init__(self, **kwargs) -> None: + super(Organization, self).__init__(**kwargs) + self._type = 'Organization' + + +class Person(Thing): + """Defines a person. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :ivar job_title: The person's job title. + :vartype job_title: str + :ivar twitter_profile: The URL of the person's twitter profile. + :vartype twitter_profile: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'job_title': {'readonly': True}, + 'twitter_profile': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'job_title': {'key': 'jobTitle', 'type': 'str'}, + 'twitter_profile': {'key': 'twitterProfile', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Person, self).__init__(**kwargs) + self.job_title = None + self.twitter_profile = None + self._type = 'Person' + + +class Point2D(StructuredValue): + """Defines a 2D point with X and Y coordinates. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :vartype alternate_name: str + :ivar bing_id: An ID that uniquely identifies this item. + :vartype bing_id: str + :param x: Required. The x-coordinate of the point. + :type x: float + :param y: Required. The y-coordinate of the point. + :type y: float + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'x': {'required': True}, + 'y': {'required': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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'}, + 'x': {'key': 'x', 'type': 'float'}, + 'y': {'key': 'y', 'type': 'float'}, + } + + def __init__(self, *, x: float, y: float, **kwargs) -> None: + super(Point2D, self).__init__(**kwargs) + self.x = x + self.y = y + self._type = 'Point2D' + + +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. + :vartype display_text: str + :ivar web_search_url: The URL that takes the user to the Bing search + results page for the query. + :vartype web_search_url: str + :ivar search_link: The URL that you use to get the results of the related + search. Before using the URL, you must append query parameters as + appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL + if you're displaying the results in your own user interface. Otherwise, + use the webSearchUrl URL. + :vartype search_link: str + :ivar thumbnail: The URL to a thumbnail of a related image. + :vartype thumbnail: + ~azure.cognitiveservices.search.visualsearch.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 + + +class Recipe(CreativeWork): + """Defines a cooking recipe. + + 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 read_link: The URL that returns this resource. To use the URL, + append query parameters as appropriate and include the + Ocp-Apim-Subscription-Key header. + :vartype read_link: 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: An image of the item. + :vartype image: + ~azure.cognitiveservices.search.visualsearch.models.ImageObject + :ivar description: A short description of the item. + :vartype description: str + :ivar alternate_name: An alias for the item. + :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.visualsearch.models.Thing] + :ivar date_published: The date on which the CreativeWork was published. + :vartype date_published: str + :ivar text: Text content of this creative work. + :vartype text: str + :ivar cook_time: The amount of time the food takes to cook. For example, + PT25M. For information about the time format, see + http://en.wikipedia.org/wiki/ISO_8601#Durations. + :vartype cook_time: str + :ivar prep_time: The amount of time required to prepare the ingredients. + For example, PT15M. For information about the time format, see + http://en.wikipedia.org/wiki/ISO_8601#Durations. + :vartype prep_time: str + :ivar total_time: The total amount of time it takes to prepare and cook + the recipe. For example, PT45M. For information about the time format, see + http://en.wikipedia.org/wiki/ISO_8601#Durations. + :vartype total_time: str + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'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}, + 'date_published': {'readonly': True}, + 'text': {'readonly': True}, + 'cook_time': {'readonly': True}, + 'prep_time': {'readonly': True}, + 'total_time': {'readonly': True}, + } + + _attribute_map = { + '_type': {'key': '_type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'read_link': {'key': 'readLink', '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]'}, + 'date_published': {'key': 'datePublished', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'cook_time': {'key': 'cookTime', 'type': 'str'}, + 'prep_time': {'key': 'prepTime', 'type': 'str'}, + 'total_time': {'key': 'totalTime', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Recipe, self).__init__(**kwargs) + self.cook_time = None + self.prep_time = None + self.total_time = None + self._type = 'Recipe' + + +class RecipesModule(Model): + """Defines a list of recipes. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of recipes. + :vartype value: + list[~azure.cognitiveservices.search.visualsearch.models.Recipe] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Recipe]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecipesModule, self).__init__(**kwargs) + self.value = None + + +class RelatedSearchesModule(Model): + """Defines a list of related searches. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of related searches. + :vartype value: + list[~azure.cognitiveservices.search.visualsearch.models.Query] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Query]'}, + } + + def __init__(self, **kwargs) -> None: + super(RelatedSearchesModule, self).__init__(**kwargs) + self.value = None + + +class VisualSearchRequest(Model): + """A JSON object that contains information about the image to get insights of. + Specify this object only in a knowledgeRequest form data. + + :param image_info: A JSON object that identities the image to get insights + of. + :type image_info: + ~azure.cognitiveservices.search.visualsearch.models.ImageInfo + :param knowledge_request: A JSON object containing information about the + request, such as filters, or a description. + :type knowledge_request: + ~azure.cognitiveservices.search.visualsearch.models.KnowledgeRequest + """ + + _attribute_map = { + 'image_info': {'key': 'imageInfo', 'type': 'ImageInfo'}, + 'knowledge_request': {'key': 'knowledgeRequest', 'type': 'KnowledgeRequest'}, + } + + def __init__(self, *, image_info=None, knowledge_request=None, **kwargs) -> None: + super(VisualSearchRequest, self).__init__(**kwargs) + self.image_info = image_info + self.knowledge_request = knowledge_request diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_client_enums.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_visual_search_client_enums.py similarity index 100% rename from sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_client_enums.py rename to sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/_visual_search_client_enums.py diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/action.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/action.py deleted file mode 100644 index be8213c708f7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/action.py +++ /dev/null @@ -1,125 +0,0 @@ -# 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 .creative_work import CreativeWork - - -class Action(CreativeWork): - """Defines an action. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageAction - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'ImageAction': 'ImageAction'} - } - - def __init__(self, **kwargs): - super(Action, self).__init__(**kwargs) - self.result = None - self.display_name = None - self.is_top_action = None - self.service_url = None - self._type = 'Action' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/action_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/action_py3.py deleted file mode 100644 index d7bd005fe6a7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/action_py3.py +++ /dev/null @@ -1,125 +0,0 @@ -# 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 .creative_work_py3 import CreativeWork - - -class Action(CreativeWork): - """Defines an action. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageAction - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'ImageAction': 'ImageAction'} - } - - def __init__(self, **kwargs) -> None: - super(Action, self).__init__(**kwargs) - self.result = None - self.display_name = None - self.is_top_action = None - self.service_url = None - self._type = 'Action' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_offer.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_offer.py deleted file mode 100644 index 2d929c19dfef..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_offer.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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 .offer import Offer - - -class AggregateOffer(Offer): - """Defines a list of offers from merchants that are related to the 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar seller: Seller for this offer. - :vartype seller: - ~azure.cognitiveservices.search.visualsearch.models.Organization - :ivar price: The item's price. - :vartype price: float - :ivar price_currency: The monetary currency. For example, USD. Possible - values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', - 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', - 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', - 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', - 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', - 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', - 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', - 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', - 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', - 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', - 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', - 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', - 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', - 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', - 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', - 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', - 'YER', 'ZAR', 'ZMW'. Default value: "USD" . - :vartype price_currency: str or - ~azure.cognitiveservices.search.visualsearch.models.Currency - :ivar availability: The item's availability. The following are the - possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, - OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: - 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', - 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - :vartype availability: str or - ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability - :ivar aggregate_rating: An aggregated rating that indicates how well the - product has been rated by others. - :vartype aggregate_rating: - ~azure.cognitiveservices.search.visualsearch.models.AggregateRating - :ivar last_updated: The last date that the offer was updated. The date is - in the form YYYY-MM-DD. - :vartype last_updated: str - :ivar offers: A list of offers from merchants that have offerings related - to the image. - :vartype offers: - list[~azure.cognitiveservices.search.visualsearch.models.Offer] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'seller': {'readonly': True}, - 'price': {'readonly': True}, - 'price_currency': {'readonly': True}, - 'availability': {'readonly': True}, - 'aggregate_rating': {'readonly': True}, - 'last_updated': {'readonly': True}, - 'offers': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'seller': {'key': 'seller', 'type': 'Organization'}, - 'price': {'key': 'price', 'type': 'float'}, - 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, - 'availability': {'key': 'availability', 'type': 'str'}, - 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - 'offers': {'key': 'offers', 'type': '[Offer]'}, - } - - def __init__(self, **kwargs): - super(AggregateOffer, self).__init__(**kwargs) - self.offers = None - self._type = 'AggregateOffer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_offer_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_offer_py3.py deleted file mode 100644 index b1e0618c0bb3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_offer_py3.py +++ /dev/null @@ -1,135 +0,0 @@ -# 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 .offer_py3 import Offer - - -class AggregateOffer(Offer): - """Defines a list of offers from merchants that are related to the 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar seller: Seller for this offer. - :vartype seller: - ~azure.cognitiveservices.search.visualsearch.models.Organization - :ivar price: The item's price. - :vartype price: float - :ivar price_currency: The monetary currency. For example, USD. Possible - values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', - 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', - 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', - 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', - 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', - 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', - 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', - 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', - 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', - 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', - 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', - 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', - 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', - 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', - 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', - 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', - 'YER', 'ZAR', 'ZMW'. Default value: "USD" . - :vartype price_currency: str or - ~azure.cognitiveservices.search.visualsearch.models.Currency - :ivar availability: The item's availability. The following are the - possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, - OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: - 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', - 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - :vartype availability: str or - ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability - :ivar aggregate_rating: An aggregated rating that indicates how well the - product has been rated by others. - :vartype aggregate_rating: - ~azure.cognitiveservices.search.visualsearch.models.AggregateRating - :ivar last_updated: The last date that the offer was updated. The date is - in the form YYYY-MM-DD. - :vartype last_updated: str - :ivar offers: A list of offers from merchants that have offerings related - to the image. - :vartype offers: - list[~azure.cognitiveservices.search.visualsearch.models.Offer] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'seller': {'readonly': True}, - 'price': {'readonly': True}, - 'price_currency': {'readonly': True}, - 'availability': {'readonly': True}, - 'aggregate_rating': {'readonly': True}, - 'last_updated': {'readonly': True}, - 'offers': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'seller': {'key': 'seller', 'type': 'Organization'}, - 'price': {'key': 'price', 'type': 'float'}, - 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, - 'availability': {'key': 'availability', 'type': 'str'}, - 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - 'offers': {'key': 'offers', 'type': '[Offer]'}, - } - - def __init__(self, **kwargs) -> None: - super(AggregateOffer, self).__init__(**kwargs) - self.offers = None - self._type = 'AggregateOffer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_rating.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_rating.py deleted file mode 100644 index 288a2a2d0ea4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_rating.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .rating import Rating - - -class AggregateRating(Rating): - """Defines the metrics that indicate how well an item was rated by others. - - 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. - - :ivar text: Text representation of an item. - :vartype text: str - :param _type: Required. Constant filled by server. - :type _type: str - :param rating_value: Required. The mean (average) rating. The possible - values are 1.0 through 5.0. - :type rating_value: float - :ivar best_rating: The highest rated review. The possible values are 1.0 - through 5.0. - :vartype best_rating: float - :ivar review_count: The number of times the recipe has been rated or - reviewed. - :vartype review_count: int - """ - - _validation = { - 'text': {'readonly': True}, - '_type': {'required': True}, - 'rating_value': {'required': True}, - 'best_rating': {'readonly': True}, - 'review_count': {'readonly': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - '_type': {'key': '_type', 'type': 'str'}, - 'rating_value': {'key': 'ratingValue', 'type': 'float'}, - 'best_rating': {'key': 'bestRating', 'type': 'float'}, - 'review_count': {'key': 'reviewCount', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AggregateRating, self).__init__(**kwargs) - self.review_count = None - self._type = 'AggregateRating' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_rating_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_rating_py3.py deleted file mode 100644 index bdd901e708ea..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/aggregate_rating_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 .rating_py3 import Rating - - -class AggregateRating(Rating): - """Defines the metrics that indicate how well an item was rated by others. - - 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. - - :ivar text: Text representation of an item. - :vartype text: str - :param _type: Required. Constant filled by server. - :type _type: str - :param rating_value: Required. The mean (average) rating. The possible - values are 1.0 through 5.0. - :type rating_value: float - :ivar best_rating: The highest rated review. The possible values are 1.0 - through 5.0. - :vartype best_rating: float - :ivar review_count: The number of times the recipe has been rated or - reviewed. - :vartype review_count: int - """ - - _validation = { - 'text': {'readonly': True}, - '_type': {'required': True}, - 'rating_value': {'required': True}, - 'best_rating': {'readonly': True}, - 'review_count': {'readonly': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - '_type': {'key': '_type', 'type': 'str'}, - 'rating_value': {'key': 'ratingValue', 'type': 'float'}, - 'best_rating': {'key': 'bestRating', 'type': 'float'}, - 'review_count': {'key': 'reviewCount', 'type': 'int'}, - } - - def __init__(self, *, rating_value: float, **kwargs) -> None: - super(AggregateRating, self).__init__(rating_value=rating_value, **kwargs) - self.review_count = None - self._type = 'AggregateRating' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/creative_work.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/creative_work.py deleted file mode 100644 index 52904ea0f672..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/creative_work.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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 .thing import Thing - - -class CreativeWork(Thing): - """The most generic kind of creative work, including books, movies, - photographs, software programs, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Action, MediaObject, Recipe - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'Action': 'Action', 'MediaObject': 'MediaObject', 'Recipe': 'Recipe'} - } - - def __init__(self, **kwargs): - super(CreativeWork, self).__init__(**kwargs) - self.thumbnail_url = None - self.provider = None - self.date_published = None - self.text = None - self._type = 'CreativeWork' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/creative_work_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/creative_work_py3.py deleted file mode 100644 index c27b2c8d2e01..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/creative_work_py3.py +++ /dev/null @@ -1,106 +0,0 @@ -# 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 .thing_py3 import Thing - - -class CreativeWork(Thing): - """The most generic kind of creative work, including books, movies, - photographs, software programs, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Action, MediaObject, Recipe - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'Action': 'Action', 'MediaObject': 'MediaObject', 'Recipe': 'Recipe'} - } - - def __init__(self, **kwargs) -> None: - super(CreativeWork, self).__init__(**kwargs) - self.thumbnail_url = None - self.provider = None - self.date_published = None - self.text = None - self._type = 'CreativeWork' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/crop_area.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/crop_area.py deleted file mode 100644 index 79bd5454ec0c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/crop_area.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 - - -class CropArea(Model): - """A JSON object consisting of coordinates specifying the four corners of a - cropped rectangle within the input image. - - All required parameters must be populated in order to send to Azure. - - :param top: Required. The top coordinate of the region to be cropped. The - coordinate is a fractional value of the original image's height and is - measured from the top edge of the image. Specify the coordinate as a value - from 0.0 through 1.0. - :type top: float - :param bottom: Required. The bottom coordinate of the region to be - cropped. The coordinate is a fractional value of the original image's - height and is measured from the top edge of the image. Specify the - coordinate as a value from 0.0 through 1.0. - :type bottom: float - :param left: Required. The left coordinate of the region to be cropped. - The coordinate is a fractional value of the original image's width and is - measured from the left edge of the image. Specify the coordinate as a - value from 0.0 through 1.0. - :type left: float - :param right: Required. The right coordinate of the region to be cropped. - The coordinate is a fractional value of the original image's width and is - measured from the left edge of the image. Specify the coordinate as a - value from 0.0 through 1.0. - :type right: float - """ - - _validation = { - 'top': {'required': True}, - 'bottom': {'required': True}, - 'left': {'required': True}, - 'right': {'required': True}, - } - - _attribute_map = { - 'top': {'key': 'top', 'type': 'float'}, - 'bottom': {'key': 'bottom', 'type': 'float'}, - 'left': {'key': 'left', 'type': 'float'}, - 'right': {'key': 'right', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(CropArea, self).__init__(**kwargs) - self.top = kwargs.get('top', None) - self.bottom = kwargs.get('bottom', None) - self.left = kwargs.get('left', None) - self.right = kwargs.get('right', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/crop_area_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/crop_area_py3.py deleted file mode 100644 index 36386c7d6cbf..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/crop_area_py3.py +++ /dev/null @@ -1,62 +0,0 @@ -# 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 - - -class CropArea(Model): - """A JSON object consisting of coordinates specifying the four corners of a - cropped rectangle within the input image. - - All required parameters must be populated in order to send to Azure. - - :param top: Required. The top coordinate of the region to be cropped. The - coordinate is a fractional value of the original image's height and is - measured from the top edge of the image. Specify the coordinate as a value - from 0.0 through 1.0. - :type top: float - :param bottom: Required. The bottom coordinate of the region to be - cropped. The coordinate is a fractional value of the original image's - height and is measured from the top edge of the image. Specify the - coordinate as a value from 0.0 through 1.0. - :type bottom: float - :param left: Required. The left coordinate of the region to be cropped. - The coordinate is a fractional value of the original image's width and is - measured from the left edge of the image. Specify the coordinate as a - value from 0.0 through 1.0. - :type left: float - :param right: Required. The right coordinate of the region to be cropped. - The coordinate is a fractional value of the original image's width and is - measured from the left edge of the image. Specify the coordinate as a - value from 0.0 through 1.0. - :type right: float - """ - - _validation = { - 'top': {'required': True}, - 'bottom': {'required': True}, - 'left': {'required': True}, - 'right': {'required': True}, - } - - _attribute_map = { - 'top': {'key': 'top', 'type': 'float'}, - 'bottom': {'key': 'bottom', 'type': 'float'}, - 'left': {'key': 'left', 'type': 'float'}, - 'right': {'key': 'right', 'type': 'float'}, - } - - def __init__(self, *, top: float, bottom: float, left: float, right: float, **kwargs) -> None: - super(CropArea, self).__init__(**kwargs) - self.top = top - self.bottom = bottom - self.left = left - self.right = right diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error.py deleted file mode 100644 index f28e2d243a5d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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 - - -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.visualsearch.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.visualsearch.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': 'str'}, - 'sub_code': {'key': 'subCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'more_details': {'key': 'moreDetails', 'type': 'str'}, - 'parameter': {'key': 'parameter', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Error, self).__init__(**kwargs) - self.code = kwargs.get('code', "None") - self.sub_code = None - self.message = kwargs.get('message', None) - self.more_details = None - self.parameter = None - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_py3.py deleted file mode 100644 index 1369eb2e470a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_py3.py +++ /dev/null @@ -1,72 +0,0 @@ -# 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 - - -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.visualsearch.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.visualsearch.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': 'str'}, - 'sub_code': {'key': 'subCode', 'type': 'str'}, - '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 diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_response.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_response.py deleted file mode 100644 index 0b12131a6227..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_response.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .response import Response -from msrest.exceptions import HttpOperationError - - -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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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.visualsearch.models.Error] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'errors': {'required': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', 'type': 'str'}, - 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[Error]'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.errors = kwargs.get('errors', None) - self._type = 'ErrorResponse' - - -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) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_response_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_response_py3.py deleted file mode 100644 index 9f6e61658b3b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/error_response_py3.py +++ /dev/null @@ -1,71 +0,0 @@ -# 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 .response_py3 import Response -from msrest.exceptions import HttpOperationError - - -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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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.visualsearch.models.Error] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'errors': {'required': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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' - - -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) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/filters.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/filters.py deleted file mode 100644 index ff1daf4064e8..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/filters.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class Filters(Model): - """A key-value object consisting of filters that may be specified to limit the - results returned by the API. Current available filters: site. - - :param site: The URL of the site to return similar images and similar - products from. (e.g., "www.bing.com", "bing.com"). - :type site: str - """ - - _attribute_map = { - 'site': {'key': 'site', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Filters, self).__init__(**kwargs) - self.site = kwargs.get('site', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/filters_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/filters_py3.py deleted file mode 100644 index 6894fdfbd14e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/filters_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class Filters(Model): - """A key-value object consisting of filters that may be specified to limit the - results returned by the API. Current available filters: site. - - :param site: The URL of the site to return similar images and similar - products from. (e.g., "www.bing.com", "bing.com"). - :type site: str - """ - - _attribute_map = { - 'site': {'key': 'site', 'type': 'str'}, - } - - def __init__(self, *, site: str=None, **kwargs) -> None: - super(Filters, self).__init__(**kwargs) - self.site = site diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/identifiable.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/identifiable.py deleted file mode 100644 index 513e53d238bb..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/identifiable.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 .response_base import ResponseBase - - -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): - super(Identifiable, self).__init__(**kwargs) - self.id = None - self._type = 'Identifiable' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/identifiable_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/identifiable_py3.py deleted file mode 100644 index 2d24a2c45775..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/identifiable_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 .response_base_py3 import ResponseBase - - -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' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_action.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_action.py deleted file mode 100644 index ae3d56957457..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_action.py +++ /dev/null @@ -1,127 +0,0 @@ -# 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 .action import Action - - -class ImageAction(Action): - """Defines an image action. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageEntityAction, ImageModuleAction, ImageRecipesAction, - ImageRelatedSearchesAction, ImageShoppingSourcesAction - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'ImageEntityAction': 'ImageEntityAction', 'ImageModuleAction': 'ImageModuleAction', 'ImageRecipesAction': 'ImageRecipesAction', 'ImageRelatedSearchesAction': 'ImageRelatedSearchesAction', 'ImageShoppingSourcesAction': 'ImageShoppingSourcesAction'} - } - - def __init__(self, **kwargs): - super(ImageAction, self).__init__(**kwargs) - self.action_type = None - self._type = 'ImageAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_action_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_action_py3.py deleted file mode 100644 index 535a934682ee..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_action_py3.py +++ /dev/null @@ -1,127 +0,0 @@ -# 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 .action_py3 import Action - - -class ImageAction(Action): - """Defines an image action. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageEntityAction, ImageModuleAction, ImageRecipesAction, - ImageRelatedSearchesAction, ImageShoppingSourcesAction - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'ImageEntityAction': 'ImageEntityAction', 'ImageModuleAction': 'ImageModuleAction', 'ImageRecipesAction': 'ImageRecipesAction', 'ImageRelatedSearchesAction': 'ImageRelatedSearchesAction', 'ImageShoppingSourcesAction': 'ImageShoppingSourcesAction'} - } - - def __init__(self, **kwargs) -> None: - super(ImageAction, self).__init__(**kwargs) - self.action_type = None - self._type = 'ImageAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_entity_action.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_entity_action.py deleted file mode 100644 index 4a7a7dedcc31..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_entity_action.py +++ /dev/null @@ -1,118 +0,0 @@ -# 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 .image_action import ImageAction - - -class ImageEntityAction(ImageAction): - """Defines an entity action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageEntityAction, self).__init__(**kwargs) - self._type = 'ImageEntityAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_entity_action_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_entity_action_py3.py deleted file mode 100644 index c6fcb4cf8dc8..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_entity_action_py3.py +++ /dev/null @@ -1,118 +0,0 @@ -# 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 .image_action_py3 import ImageAction - - -class ImageEntityAction(ImageAction): - """Defines an entity action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageEntityAction, self).__init__(**kwargs) - self._type = 'ImageEntityAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_info.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_info.py deleted file mode 100644 index 64875b87c168..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_info.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 - - -class ImageInfo(Model): - """A JSON object that identities the image to get insights of . It also - includes the optional crop area that you use to identify the region of - interest in the image. - - :param image_insights_token: An image insights token. To get the insights - token, call one of the Image Search APIs (for example, /images/search). In - the search results, the - [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) - object's - [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) - field contains the token. The imageInsightsToken and url fields mutually - exclusive; do not specify both. Do not specify an insights token if the - request includes the image form data. - :type image_insights_token: str - :param url: The URL of the input image. The imageInsightsToken and url - fields are mutually exclusive; do not specify both. Do not specify the URL - if the request includes the image form data. - :type url: str - :param crop_area: A JSON object consisting of coordinates specifying the - four corners of a cropped rectangle within the input image. Use the crop - area to identify the region of interest in the image. You can apply the - crop area to the images specified using the imageInsightsToken or url - fields, or an image binary specified in an image form data. - :type crop_area: - ~azure.cognitiveservices.search.visualsearch.models.CropArea - """ - - _attribute_map = { - 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'crop_area': {'key': 'cropArea', 'type': 'CropArea'}, - } - - def __init__(self, **kwargs): - super(ImageInfo, self).__init__(**kwargs) - self.image_insights_token = kwargs.get('image_insights_token', None) - self.url = kwargs.get('url', None) - self.crop_area = kwargs.get('crop_area', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_info_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_info_py3.py deleted file mode 100644 index 8f3f52302e84..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_info_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 - - -class ImageInfo(Model): - """A JSON object that identities the image to get insights of . It also - includes the optional crop area that you use to identify the region of - interest in the image. - - :param image_insights_token: An image insights token. To get the insights - token, call one of the Image Search APIs (for example, /images/search). In - the search results, the - [Image](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) - object's - [imageInsightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) - field contains the token. The imageInsightsToken and url fields mutually - exclusive; do not specify both. Do not specify an insights token if the - request includes the image form data. - :type image_insights_token: str - :param url: The URL of the input image. The imageInsightsToken and url - fields are mutually exclusive; do not specify both. Do not specify the URL - if the request includes the image form data. - :type url: str - :param crop_area: A JSON object consisting of coordinates specifying the - four corners of a cropped rectangle within the input image. Use the crop - area to identify the region of interest in the image. You can apply the - crop area to the images specified using the imageInsightsToken or url - fields, or an image binary specified in an image form data. - :type crop_area: - ~azure.cognitiveservices.search.visualsearch.models.CropArea - """ - - _attribute_map = { - 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'crop_area': {'key': 'cropArea', 'type': 'CropArea'}, - } - - def __init__(self, *, image_insights_token: str=None, url: str=None, crop_area=None, **kwargs) -> None: - super(ImageInfo, self).__init__(**kwargs) - self.image_insights_token = image_insights_token - self.url = url - self.crop_area = crop_area diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_knowledge.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_knowledge.py deleted file mode 100644 index fc10954325c9..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_knowledge.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 .response import Response - - -class ImageKnowledge(Response): - """Defines a visual search API 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 - :ivar read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: str - :ivar web_search_url: The URL to Bing's search result for this item. - :vartype web_search_url: str - :ivar tags: A list of visual search tags. - :vartype tags: - list[~azure.cognitiveservices.search.visualsearch.models.ImageTag] - :ivar image: Image object containing metadata about the requested image. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'tags': {'readonly': True}, - 'image': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', 'type': 'str'}, - 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '[ImageTag]'}, - 'image': {'key': 'image', 'type': 'ImageObject'}, - } - - def __init__(self, **kwargs): - super(ImageKnowledge, self).__init__(**kwargs) - self.tags = None - self.image = None - self._type = 'ImageKnowledge' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_knowledge_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_knowledge_py3.py deleted file mode 100644 index 4148b7ded186..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_knowledge_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 .response_py3 import Response - - -class ImageKnowledge(Response): - """Defines a visual search API 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 - :ivar read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: str - :ivar web_search_url: The URL to Bing's search result for this item. - :vartype web_search_url: str - :ivar tags: A list of visual search tags. - :vartype tags: - list[~azure.cognitiveservices.search.visualsearch.models.ImageTag] - :ivar image: Image object containing metadata about the requested image. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'tags': {'readonly': True}, - 'image': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', 'type': 'str'}, - 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '[ImageTag]'}, - 'image': {'key': 'image', 'type': 'ImageObject'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageKnowledge, self).__init__(**kwargs) - self.tags = None - self.image = None - self._type = 'ImageKnowledge' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_module_action.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_module_action.py deleted file mode 100644 index b0235cef8087..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_module_action.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action import ImageAction - - -class ImageModuleAction(ImageAction): - """Defines an image list action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of images. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.ImagesModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'ImagesModule'}, - } - - def __init__(self, **kwargs): - super(ImageModuleAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageModuleAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_module_action_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_module_action_py3.py deleted file mode 100644 index 46982a59e63a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_module_action_py3.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action_py3 import ImageAction - - -class ImageModuleAction(ImageAction): - """Defines an image list action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of images. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.ImagesModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'ImagesModule'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageModuleAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageModuleAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_object.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_object.py deleted file mode 100644 index 65d5847fa39e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_object.py +++ /dev/null @@ -1,168 +0,0 @@ -# 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 .media_object import MediaObject - - -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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :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 content_size: Size of the media object content. Use format "value - unit" (e.g., "1024 B"). - :vartype content_size: str - :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). - :vartype encoding_format: str - :ivar host_page_display_url: Display URL of the page that hosts the media - object. - :vartype host_page_display_url: str - :ivar width: The width of the media object, in pixels. - :vartype width: int - :ivar height: The height of the media object, in pixels. - :vartype height: int - :ivar thumbnail: The URL to a thumbnail of the image. - :vartype thumbnail: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar image_insights_token: The token that you use in a subsequent call to - Visual Search API to get additional information about the image. For - information about using this token, see the imageInsightsToken field - inside the knowledgeRequest request parameter. - :vartype image_insights_token: str - :ivar insights_metadata: A count of the number of websites where you can - shop or perform other actions related to the image. For example, if the - image is of an apple pie, this object includes a count of the number of - websites where you can buy an apple pie. To indicate the number of offers - in your UX, include badging such as a shopping cart icon that contains the - count. When the user clicks on the icon, use imageInsightsToken in a - subsequent Visual Search API call to get the list of shopping websites. - :vartype insights_metadata: - ~azure.cognitiveservices.search.visualsearch.models.ImagesImageMetadata - :ivar image_id: Unique Id for the image. - :vartype image_id: str - :ivar accent_color: A three-byte hexadecimal number that represents the - color that dominates the image. Use the color as the temporary background - in your client until the image is loaded. - :vartype accent_color: str - :ivar visual_words: For internal use only. - :vartype visual_words: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'content_url': {'readonly': True}, - 'host_page_url': {'readonly': True}, - 'content_size': {'readonly': True}, - 'encoding_format': {'readonly': True}, - 'host_page_display_url': {'readonly': True}, - 'width': {'readonly': True}, - 'height': {'readonly': True}, - 'thumbnail': {'readonly': True}, - 'image_insights_token': {'readonly': True}, - 'insights_metadata': {'readonly': True}, - 'image_id': {'readonly': True}, - 'accent_color': {'readonly': True}, - 'visual_words': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'content_url': {'key': 'contentUrl', 'type': 'str'}, - 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'str'}, - 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, - 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'int'}, - 'height': {'key': 'height', 'type': 'int'}, - 'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'}, - 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, - 'insights_metadata': {'key': 'insightsMetadata', 'type': 'ImagesImageMetadata'}, - 'image_id': {'key': 'imageId', 'type': 'str'}, - 'accent_color': {'key': 'accentColor', 'type': 'str'}, - 'visual_words': {'key': 'visualWords', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ImageObject, self).__init__(**kwargs) - self.thumbnail = None - self.image_insights_token = None - self.insights_metadata = None - self.image_id = None - self.accent_color = None - self.visual_words = None - self._type = 'ImageObject' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_object_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_object_py3.py deleted file mode 100644 index fc1ff56628b0..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_object_py3.py +++ /dev/null @@ -1,168 +0,0 @@ -# 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 .media_object_py3 import MediaObject - - -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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :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 content_size: Size of the media object content. Use format "value - unit" (e.g., "1024 B"). - :vartype content_size: str - :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). - :vartype encoding_format: str - :ivar host_page_display_url: Display URL of the page that hosts the media - object. - :vartype host_page_display_url: str - :ivar width: The width of the media object, in pixels. - :vartype width: int - :ivar height: The height of the media object, in pixels. - :vartype height: int - :ivar thumbnail: The URL to a thumbnail of the image. - :vartype thumbnail: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar image_insights_token: The token that you use in a subsequent call to - Visual Search API to get additional information about the image. For - information about using this token, see the imageInsightsToken field - inside the knowledgeRequest request parameter. - :vartype image_insights_token: str - :ivar insights_metadata: A count of the number of websites where you can - shop or perform other actions related to the image. For example, if the - image is of an apple pie, this object includes a count of the number of - websites where you can buy an apple pie. To indicate the number of offers - in your UX, include badging such as a shopping cart icon that contains the - count. When the user clicks on the icon, use imageInsightsToken in a - subsequent Visual Search API call to get the list of shopping websites. - :vartype insights_metadata: - ~azure.cognitiveservices.search.visualsearch.models.ImagesImageMetadata - :ivar image_id: Unique Id for the image. - :vartype image_id: str - :ivar accent_color: A three-byte hexadecimal number that represents the - color that dominates the image. Use the color as the temporary background - in your client until the image is loaded. - :vartype accent_color: str - :ivar visual_words: For internal use only. - :vartype visual_words: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'content_url': {'readonly': True}, - 'host_page_url': {'readonly': True}, - 'content_size': {'readonly': True}, - 'encoding_format': {'readonly': True}, - 'host_page_display_url': {'readonly': True}, - 'width': {'readonly': True}, - 'height': {'readonly': True}, - 'thumbnail': {'readonly': True}, - 'image_insights_token': {'readonly': True}, - 'insights_metadata': {'readonly': True}, - 'image_id': {'readonly': True}, - 'accent_color': {'readonly': True}, - 'visual_words': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'content_url': {'key': 'contentUrl', 'type': 'str'}, - 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'str'}, - 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, - 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'int'}, - 'height': {'key': 'height', 'type': 'int'}, - 'thumbnail': {'key': 'thumbnail', 'type': 'ImageObject'}, - 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, - 'insights_metadata': {'key': 'insightsMetadata', 'type': 'ImagesImageMetadata'}, - 'image_id': {'key': 'imageId', 'type': 'str'}, - 'accent_color': {'key': 'accentColor', 'type': 'str'}, - 'visual_words': {'key': 'visualWords', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageObject, self).__init__(**kwargs) - self.thumbnail = None - self.image_insights_token = None - self.insights_metadata = None - self.image_id = None - self.accent_color = None - self.visual_words = None - self._type = 'ImageObject' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_recipes_action.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_recipes_action.py deleted file mode 100644 index eb7eb7696fe5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_recipes_action.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action import ImageAction - - -class ImageRecipesAction(ImageAction): - """Defines an recipe action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of recipes related to the image. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.RecipesModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'RecipesModule'}, - } - - def __init__(self, **kwargs): - super(ImageRecipesAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageRecipesAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_recipes_action_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_recipes_action_py3.py deleted file mode 100644 index e077892ca5a6..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_recipes_action_py3.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action_py3 import ImageAction - - -class ImageRecipesAction(ImageAction): - """Defines an recipe action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of recipes related to the image. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.RecipesModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'RecipesModule'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageRecipesAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageRecipesAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_related_searches_action.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_related_searches_action.py deleted file mode 100644 index 79324a221026..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_related_searches_action.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action import ImageAction - - -class ImageRelatedSearchesAction(ImageAction): - """Defines an related search action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of queries related to the image. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.RelatedSearchesModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'RelatedSearchesModule'}, - } - - def __init__(self, **kwargs): - super(ImageRelatedSearchesAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageRelatedSearchesAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_related_searches_action_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_related_searches_action_py3.py deleted file mode 100644 index da9fe87fa241..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_related_searches_action_py3.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action_py3 import ImageAction - - -class ImageRelatedSearchesAction(ImageAction): - """Defines an related search action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of queries related to the image. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.RelatedSearchesModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'RelatedSearchesModule'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageRelatedSearchesAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageRelatedSearchesAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_shopping_sources_action.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_shopping_sources_action.py deleted file mode 100644 index 74d6f083538c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_shopping_sources_action.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action import ImageAction - - -class ImageShoppingSourcesAction(ImageAction): - """Defines a shopping sources action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of merchants that offer items related to the image. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'AggregateOffer'}, - } - - def __init__(self, **kwargs): - super(ImageShoppingSourcesAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageShoppingSourcesAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_shopping_sources_action_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_shopping_sources_action_py3.py deleted file mode 100644 index 3d7bd526b8e5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_shopping_sources_action_py3.py +++ /dev/null @@ -1,124 +0,0 @@ -# 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 .image_action_py3 import ImageAction - - -class ImageShoppingSourcesAction(ImageAction): - """Defines a shopping sources action. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar result: The result produced in the action. - :vartype result: - list[~azure.cognitiveservices.search.visualsearch.models.Thing] - :ivar display_name: A display name for the action. - :vartype display_name: str - :ivar is_top_action: A Boolean representing whether this result is the top - action. - :vartype is_top_action: bool - :ivar service_url: Use this URL to get additional data to determine how to - take the appropriate action. For example, the serviceUrl might return JSON - along with an image URL. - :vartype service_url: str - :ivar action_type: A string representing the type of action. - :vartype action_type: str - :ivar data: A list of merchants that offer items related to the image. - :vartype data: - ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'result': {'readonly': True}, - 'display_name': {'readonly': True}, - 'is_top_action': {'readonly': True}, - 'service_url': {'readonly': True}, - 'action_type': {'readonly': True}, - 'data': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'result': {'key': 'result', 'type': '[Thing]'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'is_top_action': {'key': 'isTopAction', 'type': 'bool'}, - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'AggregateOffer'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageShoppingSourcesAction, self).__init__(**kwargs) - self.data = None - self._type = 'ImageShoppingSourcesAction' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag.py deleted file mode 100644 index 8d6dba99732f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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 .thing import Thing - - -class ImageTag(Thing): - """A visual search tag. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar display_name: Display name for this tag. For the default tag, the - display name is empty. - :vartype display_name: str - :ivar bounding_box: The bounding box for this tag. For the default tag, - there is no bounding box. - :vartype bounding_box: - ~azure.cognitiveservices.search.visualsearch.models.ImageTagRegion - :ivar actions: Actions within this tag. The order of the items denotes the - default ranking order of these actions, with the first action being the - most likely user intent. - :vartype actions: - list[~azure.cognitiveservices.search.visualsearch.models.ImageAction] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'display_name': {'readonly': True}, - 'bounding_box': {'readonly': True}, - 'actions': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': 'ImageTagRegion'}, - 'actions': {'key': 'actions', 'type': '[ImageAction]'}, - } - - def __init__(self, **kwargs): - super(ImageTag, self).__init__(**kwargs) - self.display_name = None - self.bounding_box = None - self.actions = None - self._type = 'ImageTag' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_py3.py deleted file mode 100644 index 31d34196bb68..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_py3.py +++ /dev/null @@ -1,98 +0,0 @@ -# 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 .thing_py3 import Thing - - -class ImageTag(Thing): - """A visual search tag. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar display_name: Display name for this tag. For the default tag, the - display name is empty. - :vartype display_name: str - :ivar bounding_box: The bounding box for this tag. For the default tag, - there is no bounding box. - :vartype bounding_box: - ~azure.cognitiveservices.search.visualsearch.models.ImageTagRegion - :ivar actions: Actions within this tag. The order of the items denotes the - default ranking order of these actions, with the first action being the - most likely user intent. - :vartype actions: - list[~azure.cognitiveservices.search.visualsearch.models.ImageAction] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'display_name': {'readonly': True}, - 'bounding_box': {'readonly': True}, - 'actions': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'bounding_box': {'key': 'boundingBox', 'type': 'ImageTagRegion'}, - 'actions': {'key': 'actions', 'type': '[ImageAction]'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageTag, self).__init__(**kwargs) - self.display_name = None - self.bounding_box = None - self.actions = None - self._type = 'ImageTag' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_region.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_region.py deleted file mode 100644 index 6ddf0148ff89..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_region.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 - - -class ImageTagRegion(Model): - """Defines an image region relevant to the ImageTag. - - All required parameters must be populated in order to send to Azure. - - :param query_rectangle: Required. A rectangle that outlines the area of - interest for this tag. - :type query_rectangle: - ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral - :param display_rectangle: Required. A recommended rectangle to show to the - user. - :type display_rectangle: - ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral - """ - - _validation = { - 'query_rectangle': {'required': True}, - 'display_rectangle': {'required': True}, - } - - _attribute_map = { - 'query_rectangle': {'key': 'queryRectangle', 'type': 'NormalizedQuadrilateral'}, - 'display_rectangle': {'key': 'displayRectangle', 'type': 'NormalizedQuadrilateral'}, - } - - def __init__(self, **kwargs): - super(ImageTagRegion, self).__init__(**kwargs) - self.query_rectangle = kwargs.get('query_rectangle', None) - self.display_rectangle = kwargs.get('display_rectangle', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_region_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_region_py3.py deleted file mode 100644 index ee7b2a63f8aa..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/image_tag_region_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 - - -class ImageTagRegion(Model): - """Defines an image region relevant to the ImageTag. - - All required parameters must be populated in order to send to Azure. - - :param query_rectangle: Required. A rectangle that outlines the area of - interest for this tag. - :type query_rectangle: - ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral - :param display_rectangle: Required. A recommended rectangle to show to the - user. - :type display_rectangle: - ~azure.cognitiveservices.search.visualsearch.models.NormalizedQuadrilateral - """ - - _validation = { - 'query_rectangle': {'required': True}, - 'display_rectangle': {'required': True}, - } - - _attribute_map = { - 'query_rectangle': {'key': 'queryRectangle', 'type': 'NormalizedQuadrilateral'}, - 'display_rectangle': {'key': 'displayRectangle', 'type': 'NormalizedQuadrilateral'}, - } - - def __init__(self, *, query_rectangle, display_rectangle, **kwargs) -> None: - super(ImageTagRegion, self).__init__(**kwargs) - self.query_rectangle = query_rectangle - self.display_rectangle = display_rectangle diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_image_metadata.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_image_metadata.py deleted file mode 100644 index 96d255ffc8d5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_image_metadata.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 - - -class ImagesImageMetadata(Model): - """Defines a count of the number of websites where you can shop or perform - other actions related to the image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar shopping_sources_count: The number of websites that sell the - products seen in the image. - :vartype shopping_sources_count: int - :ivar recipe_sources_count: The number of websites that offer recipes of - the food seen in the image. - :vartype recipe_sources_count: int - :ivar aggregate_offer: A summary of the online offers of products found in - the image. For example, if the image is of a dress, the offer might - identify the lowest price and the number of offers found. Only visually - similar products insights include this field. The offer includes the - following fields: Name, AggregateRating, OfferCount, and LowPrice. - :vartype aggregate_offer: - ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer - """ - - _validation = { - 'shopping_sources_count': {'readonly': True}, - 'recipe_sources_count': {'readonly': True}, - 'aggregate_offer': {'readonly': True}, - } - - _attribute_map = { - 'shopping_sources_count': {'key': 'shoppingSourcesCount', 'type': 'int'}, - 'recipe_sources_count': {'key': 'recipeSourcesCount', 'type': 'int'}, - 'aggregate_offer': {'key': 'aggregateOffer', 'type': 'AggregateOffer'}, - } - - def __init__(self, **kwargs): - super(ImagesImageMetadata, self).__init__(**kwargs) - self.shopping_sources_count = None - self.recipe_sources_count = None - self.aggregate_offer = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_image_metadata_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_image_metadata_py3.py deleted file mode 100644 index 0ba88c41b358..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_image_metadata_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 - - -class ImagesImageMetadata(Model): - """Defines a count of the number of websites where you can shop or perform - other actions related to the image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar shopping_sources_count: The number of websites that sell the - products seen in the image. - :vartype shopping_sources_count: int - :ivar recipe_sources_count: The number of websites that offer recipes of - the food seen in the image. - :vartype recipe_sources_count: int - :ivar aggregate_offer: A summary of the online offers of products found in - the image. For example, if the image is of a dress, the offer might - identify the lowest price and the number of offers found. Only visually - similar products insights include this field. The offer includes the - following fields: Name, AggregateRating, OfferCount, and LowPrice. - :vartype aggregate_offer: - ~azure.cognitiveservices.search.visualsearch.models.AggregateOffer - """ - - _validation = { - 'shopping_sources_count': {'readonly': True}, - 'recipe_sources_count': {'readonly': True}, - 'aggregate_offer': {'readonly': True}, - } - - _attribute_map = { - 'shopping_sources_count': {'key': 'shoppingSourcesCount', 'type': 'int'}, - 'recipe_sources_count': {'key': 'recipeSourcesCount', 'type': 'int'}, - 'aggregate_offer': {'key': 'aggregateOffer', 'type': 'AggregateOffer'}, - } - - def __init__(self, **kwargs) -> None: - super(ImagesImageMetadata, self).__init__(**kwargs) - self.shopping_sources_count = None - self.recipe_sources_count = None - self.aggregate_offer = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_module.py deleted file mode 100644 index d7bc800c4e69..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_module.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 - - -class ImagesModule(Model): - """Defines a list of images. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of images. - :vartype value: - list[~azure.cognitiveservices.search.visualsearch.models.ImageObject] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ImageObject]'}, - } - - def __init__(self, **kwargs): - super(ImagesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_module_py3.py deleted file mode 100644 index 2fea5770f20d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/images_module_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 - - -class ImagesModule(Model): - """Defines a list of images. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of images. - :vartype value: - list[~azure.cognitiveservices.search.visualsearch.models.ImageObject] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ImageObject]'}, - } - - def __init__(self, **kwargs) -> None: - super(ImagesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/intangible.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/intangible.py deleted file mode 100644 index df7e3dce1cbd..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/intangible.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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 .thing import Thing - - -class Intangible(Thing): - """A utility class that serves as the umbrella for a number of 'intangible' - things such as quantities, structured values, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StructuredValue - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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': {'StructuredValue': 'StructuredValue'} - } - - def __init__(self, **kwargs): - super(Intangible, self).__init__(**kwargs) - self._type = 'Intangible' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/intangible_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/intangible_py3.py deleted file mode 100644 index 0d2fb83e1249..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/intangible_py3.py +++ /dev/null @@ -1,85 +0,0 @@ -# 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 .thing_py3 import Thing - - -class Intangible(Thing): - """A utility class that serves as the umbrella for a number of 'intangible' - things such as quantities, structured values, etc. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StructuredValue - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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': {'StructuredValue': 'StructuredValue'} - } - - def __init__(self, **kwargs) -> None: - super(Intangible, self).__init__(**kwargs) - self._type = 'Intangible' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/knowledge_request.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/knowledge_request.py deleted file mode 100644 index ef7dc4749016..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/knowledge_request.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class KnowledgeRequest(Model): - """A JSON object containing information about the request, such as filters for - the resulting actions. - - :param filters: A key-value object consisting of filters that may be - specified to limit the results returned by the API. - :type filters: ~azure.cognitiveservices.search.visualsearch.models.Filters - """ - - _attribute_map = { - 'filters': {'key': 'filters', 'type': 'Filters'}, - } - - def __init__(self, **kwargs): - super(KnowledgeRequest, self).__init__(**kwargs) - self.filters = kwargs.get('filters', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/knowledge_request_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/knowledge_request_py3.py deleted file mode 100644 index 2f5aee6d0a54..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/knowledge_request_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class KnowledgeRequest(Model): - """A JSON object containing information about the request, such as filters for - the resulting actions. - - :param filters: A key-value object consisting of filters that may be - specified to limit the results returned by the API. - :type filters: ~azure.cognitiveservices.search.visualsearch.models.Filters - """ - - _attribute_map = { - 'filters': {'key': 'filters', 'type': 'Filters'}, - } - - def __init__(self, *, filters=None, **kwargs) -> None: - super(KnowledgeRequest, self).__init__(**kwargs) - self.filters = filters diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/media_object.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/media_object.py deleted file mode 100644 index 23ecb86e41cf..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/media_object.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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 .creative_work import CreativeWork - - -class MediaObject(CreativeWork): - """Defines a media object. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageObject - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :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 content_size: Size of the media object content. Use format "value - unit" (e.g., "1024 B"). - :vartype content_size: str - :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). - :vartype encoding_format: str - :ivar host_page_display_url: Display URL of the page that hosts the media - object. - :vartype host_page_display_url: str - :ivar width: The width of the media object, in pixels. - :vartype width: int - :ivar height: The height of the media object, in pixels. - :vartype height: int - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'content_url': {'readonly': True}, - 'host_page_url': {'readonly': True}, - 'content_size': {'readonly': True}, - 'encoding_format': {'readonly': True}, - 'host_page_display_url': {'readonly': True}, - 'width': {'readonly': True}, - 'height': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'content_url': {'key': 'contentUrl', 'type': 'str'}, - 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'str'}, - 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, - 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'int'}, - 'height': {'key': 'height', 'type': 'int'}, - } - - _subtype_map = { - '_type': {'ImageObject': 'ImageObject'} - } - - def __init__(self, **kwargs): - super(MediaObject, self).__init__(**kwargs) - self.content_url = None - self.host_page_url = None - self.content_size = None - self.encoding_format = None - self.host_page_display_url = None - self.width = None - self.height = None - self._type = 'MediaObject' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/media_object_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/media_object_py3.py deleted file mode 100644 index 59d2ea66aa16..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/media_object_py3.py +++ /dev/null @@ -1,139 +0,0 @@ -# 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 .creative_work_py3 import CreativeWork - - -class MediaObject(CreativeWork): - """Defines a media object. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageObject - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :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 content_size: Size of the media object content. Use format "value - unit" (e.g., "1024 B"). - :vartype content_size: str - :ivar encoding_format: Encoding format (e.g., png, gif, jpeg, etc). - :vartype encoding_format: str - :ivar host_page_display_url: Display URL of the page that hosts the media - object. - :vartype host_page_display_url: str - :ivar width: The width of the media object, in pixels. - :vartype width: int - :ivar height: The height of the media object, in pixels. - :vartype height: int - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'content_url': {'readonly': True}, - 'host_page_url': {'readonly': True}, - 'content_size': {'readonly': True}, - 'encoding_format': {'readonly': True}, - 'host_page_display_url': {'readonly': True}, - 'width': {'readonly': True}, - 'height': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'content_url': {'key': 'contentUrl', 'type': 'str'}, - 'host_page_url': {'key': 'hostPageUrl', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'str'}, - 'encoding_format': {'key': 'encodingFormat', 'type': 'str'}, - 'host_page_display_url': {'key': 'hostPageDisplayUrl', 'type': 'str'}, - 'width': {'key': 'width', 'type': 'int'}, - 'height': {'key': 'height', 'type': 'int'}, - } - - _subtype_map = { - '_type': {'ImageObject': 'ImageObject'} - } - - def __init__(self, **kwargs) -> None: - super(MediaObject, self).__init__(**kwargs) - self.content_url = None - self.host_page_url = None - self.content_size = None - self.encoding_format = None - self.host_page_display_url = None - self.width = None - self.height = None - self._type = 'MediaObject' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/normalized_quadrilateral.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/normalized_quadrilateral.py deleted file mode 100644 index c6af84a50235..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/normalized_quadrilateral.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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 .structured_value import StructuredValue - - -class NormalizedQuadrilateral(StructuredValue): - """Defines a region of an image. The region is a convex quadrilateral defined - by coordinates of its top left, top right, bottom left, and bottom right - points. The coordinates are fractional values of the original image's width - and height in the range 0.0 through 1.0. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :param top_left: Required. The top left corner coordinate. - :type top_left: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - :param top_right: Required. The top right corner coordinate. - :type top_right: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - :param bottom_right: Required. The bottom right corner coordinate. - :type bottom_right: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - :param bottom_left: Required. The bottom left corner coordinate. - :type bottom_left: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'top_left': {'required': True}, - 'top_right': {'required': True}, - 'bottom_right': {'required': True}, - 'bottom_left': {'required': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'top_left': {'key': 'topLeft', 'type': 'Point2D'}, - 'top_right': {'key': 'topRight', 'type': 'Point2D'}, - 'bottom_right': {'key': 'bottomRight', 'type': 'Point2D'}, - 'bottom_left': {'key': 'bottomLeft', 'type': 'Point2D'}, - } - - def __init__(self, **kwargs): - super(NormalizedQuadrilateral, self).__init__(**kwargs) - self.top_left = kwargs.get('top_left', None) - self.top_right = kwargs.get('top_right', None) - self.bottom_right = kwargs.get('bottom_right', None) - self.bottom_left = kwargs.get('bottom_left', None) - self._type = 'NormalizedQuadrilateral' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/normalized_quadrilateral_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/normalized_quadrilateral_py3.py deleted file mode 100644 index 6b9724e70a04..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/normalized_quadrilateral_py3.py +++ /dev/null @@ -1,104 +0,0 @@ -# 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 .structured_value_py3 import StructuredValue - - -class NormalizedQuadrilateral(StructuredValue): - """Defines a region of an image. The region is a convex quadrilateral defined - by coordinates of its top left, top right, bottom left, and bottom right - points. The coordinates are fractional values of the original image's width - and height in the range 0.0 through 1.0. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :param top_left: Required. The top left corner coordinate. - :type top_left: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - :param top_right: Required. The top right corner coordinate. - :type top_right: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - :param bottom_right: Required. The bottom right corner coordinate. - :type bottom_right: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - :param bottom_left: Required. The bottom left corner coordinate. - :type bottom_left: - ~azure.cognitiveservices.search.visualsearch.models.Point2D - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'top_left': {'required': True}, - 'top_right': {'required': True}, - 'bottom_right': {'required': True}, - 'bottom_left': {'required': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'top_left': {'key': 'topLeft', 'type': 'Point2D'}, - 'top_right': {'key': 'topRight', 'type': 'Point2D'}, - 'bottom_right': {'key': 'bottomRight', 'type': 'Point2D'}, - 'bottom_left': {'key': 'bottomLeft', 'type': 'Point2D'}, - } - - def __init__(self, *, top_left, top_right, bottom_right, bottom_left, **kwargs) -> None: - super(NormalizedQuadrilateral, self).__init__(**kwargs) - self.top_left = top_left - self.top_right = top_right - self.bottom_right = bottom_right - self.bottom_left = bottom_left - self._type = 'NormalizedQuadrilateral' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/offer.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/offer.py deleted file mode 100644 index bcb9f81f0496..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/offer.py +++ /dev/null @@ -1,141 +0,0 @@ -# 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 .thing import Thing - - -class Offer(Thing): - """Defines a merchant's offer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AggregateOffer - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar seller: Seller for this offer. - :vartype seller: - ~azure.cognitiveservices.search.visualsearch.models.Organization - :ivar price: The item's price. - :vartype price: float - :ivar price_currency: The monetary currency. For example, USD. Possible - values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', - 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', - 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', - 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', - 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', - 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', - 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', - 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', - 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', - 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', - 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', - 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', - 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', - 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', - 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', - 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', - 'YER', 'ZAR', 'ZMW'. Default value: "USD" . - :vartype price_currency: str or - ~azure.cognitiveservices.search.visualsearch.models.Currency - :ivar availability: The item's availability. The following are the - possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, - OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: - 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', - 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - :vartype availability: str or - ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability - :ivar aggregate_rating: An aggregated rating that indicates how well the - product has been rated by others. - :vartype aggregate_rating: - ~azure.cognitiveservices.search.visualsearch.models.AggregateRating - :ivar last_updated: The last date that the offer was updated. The date is - in the form YYYY-MM-DD. - :vartype last_updated: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'seller': {'readonly': True}, - 'price': {'readonly': True}, - 'price_currency': {'readonly': True}, - 'availability': {'readonly': True}, - 'aggregate_rating': {'readonly': True}, - 'last_updated': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'seller': {'key': 'seller', 'type': 'Organization'}, - 'price': {'key': 'price', 'type': 'float'}, - 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, - 'availability': {'key': 'availability', 'type': 'str'}, - 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'AggregateOffer': 'AggregateOffer'} - } - - def __init__(self, **kwargs): - super(Offer, self).__init__(**kwargs) - self.seller = None - self.price = None - self.price_currency = None - self.availability = None - self.aggregate_rating = None - self.last_updated = None - self._type = 'Offer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/offer_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/offer_py3.py deleted file mode 100644 index 5db668bb878a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/offer_py3.py +++ /dev/null @@ -1,141 +0,0 @@ -# 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 .thing_py3 import Thing - - -class Offer(Thing): - """Defines a merchant's offer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AggregateOffer - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar seller: Seller for this offer. - :vartype seller: - ~azure.cognitiveservices.search.visualsearch.models.Organization - :ivar price: The item's price. - :vartype price: float - :ivar price_currency: The monetary currency. For example, USD. Possible - values include: 'USD', 'CAD', 'GBP', 'EUR', 'COP', 'JPY', 'CNY', 'AUD', - 'INR', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AWG', 'AZN', - 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', - 'BRL', 'BSD', 'BTN', 'BWP', 'BYR', 'BZD', 'CDF', 'CHE', 'CHF', 'CHW', - 'CLF', 'CLP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK', 'DJF', 'DKK', - 'DOP', 'DZD', 'EGP', 'ERN', 'ETB', 'FJD', 'FKP', 'GEL', 'GHS', 'GIP', - 'GMD', 'GNF', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', - 'ILS', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'KES', 'KGS', 'KHR', 'KMF', - 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', - 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', - 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN', 'NAD', 'NGN', 'NIO', 'NOK', - 'NPR', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', - 'QAR', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', - 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STD', 'SYP', 'SZL', 'THB', - 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS', 'UAH', 'UGX', - 'UYU', 'UZS', 'VEF', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XOF', 'XPF', - 'YER', 'ZAR', 'ZMW'. Default value: "USD" . - :vartype price_currency: str or - ~azure.cognitiveservices.search.visualsearch.models.Currency - :ivar availability: The item's availability. The following are the - possible values: Discontinued, InStock, InStoreOnly, LimitedAvailability, - OnlineOnly, OutOfStock, PreOrder, SoldOut. Possible values include: - 'Discontinued', 'InStock', 'InStoreOnly', 'LimitedAvailability', - 'OnlineOnly', 'OutOfStock', 'PreOrder', 'SoldOut' - :vartype availability: str or - ~azure.cognitiveservices.search.visualsearch.models.ItemAvailability - :ivar aggregate_rating: An aggregated rating that indicates how well the - product has been rated by others. - :vartype aggregate_rating: - ~azure.cognitiveservices.search.visualsearch.models.AggregateRating - :ivar last_updated: The last date that the offer was updated. The date is - in the form YYYY-MM-DD. - :vartype last_updated: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'seller': {'readonly': True}, - 'price': {'readonly': True}, - 'price_currency': {'readonly': True}, - 'availability': {'readonly': True}, - 'aggregate_rating': {'readonly': True}, - 'last_updated': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'seller': {'key': 'seller', 'type': 'Organization'}, - 'price': {'key': 'price', 'type': 'float'}, - 'price_currency': {'key': 'priceCurrency', 'type': 'str'}, - 'availability': {'key': 'availability', 'type': 'str'}, - 'aggregate_rating': {'key': 'aggregateRating', 'type': 'AggregateRating'}, - 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'AggregateOffer': 'AggregateOffer'} - } - - def __init__(self, **kwargs) -> None: - super(Offer, self).__init__(**kwargs) - self.seller = None - self.price = None - self.price_currency = None - self.availability = None - self.aggregate_rating = None - self.last_updated = None - self._type = 'Offer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/organization.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/organization.py deleted file mode 100644 index 105e3f425e8e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/organization.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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 .thing import Thing - - -class Organization(Thing): - """Defines an organization. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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'}, - } - - def __init__(self, **kwargs): - super(Organization, self).__init__(**kwargs) - self._type = 'Organization' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/organization_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/organization_py3.py deleted file mode 100644 index 9a2876594144..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/organization_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# 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 .thing_py3 import Thing - - -class Organization(Thing): - """Defines an organization. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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'}, - } - - def __init__(self, **kwargs) -> None: - super(Organization, self).__init__(**kwargs) - self._type = 'Organization' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/person.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/person.py deleted file mode 100644 index da6fb850eebe..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/person.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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 .thing import Thing - - -class Person(Thing): - """Defines a person. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar job_title: The person's job title. - :vartype job_title: str - :ivar twitter_profile: The URL of the person's twitter profile. - :vartype twitter_profile: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'job_title': {'readonly': True}, - 'twitter_profile': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'job_title': {'key': 'jobTitle', 'type': 'str'}, - 'twitter_profile': {'key': 'twitterProfile', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Person, self).__init__(**kwargs) - self.job_title = None - self.twitter_profile = None - self._type = 'Person' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/person_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/person_py3.py deleted file mode 100644 index 0a499b58e07f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/person_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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 .thing_py3 import Thing - - -class Person(Thing): - """Defines a person. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :ivar job_title: The person's job title. - :vartype job_title: str - :ivar twitter_profile: The URL of the person's twitter profile. - :vartype twitter_profile: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'job_title': {'readonly': True}, - 'twitter_profile': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'job_title': {'key': 'jobTitle', 'type': 'str'}, - 'twitter_profile': {'key': 'twitterProfile', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Person, self).__init__(**kwargs) - self.job_title = None - self.twitter_profile = None - self._type = 'Person' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/point2_d.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/point2_d.py deleted file mode 100644 index e05d298f56ed..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/point2_d.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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 .structured_value import StructuredValue - - -class Point2D(StructuredValue): - """Defines a 2D point with X and Y coordinates. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :param x: Required. The x-coordinate of the point. - :type x: float - :param y: Required. The y-coordinate of the point. - :type y: float - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'x': {'required': True}, - 'y': {'required': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'x': {'key': 'x', 'type': 'float'}, - 'y': {'key': 'y', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(Point2D, self).__init__(**kwargs) - self.x = kwargs.get('x', None) - self.y = kwargs.get('y', None) - self._type = 'Point2D' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/point2_d_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/point2_d_py3.py deleted file mode 100644 index 3657c7c9eee8..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/point2_d_py3.py +++ /dev/null @@ -1,87 +0,0 @@ -# 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 .structured_value_py3 import StructuredValue - - -class Point2D(StructuredValue): - """Defines a 2D point with X and Y coordinates. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :vartype alternate_name: str - :ivar bing_id: An ID that uniquely identifies this item. - :vartype bing_id: str - :param x: Required. The x-coordinate of the point. - :type x: float - :param y: Required. The y-coordinate of the point. - :type y: float - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'x': {'required': True}, - 'y': {'required': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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'}, - 'x': {'key': 'x', 'type': 'float'}, - 'y': {'key': 'y', 'type': 'float'}, - } - - def __init__(self, *, x: float, y: float, **kwargs) -> None: - super(Point2D, self).__init__(**kwargs) - self.x = x - self.y = y - self._type = 'Point2D' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/properties_item.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/properties_item.py deleted file mode 100644 index 0826a1c9d662..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/properties_item.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 - - -class PropertiesItem(Model): - """Defines an item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Rating - - 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. - - :ivar text: Text representation of an item. - :vartype text: str - :param _type: Required. Constant filled by server. - :type _type: str - """ - - _validation = { - 'text': {'readonly': True}, - '_type': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - '_type': {'key': '_type', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'Rating': 'Rating'} - } - - def __init__(self, **kwargs): - super(PropertiesItem, self).__init__(**kwargs) - self.text = None - self._type = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/properties_item_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/properties_item_py3.py deleted file mode 100644 index 17ca93eba774..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/properties_item_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 - - -class PropertiesItem(Model): - """Defines an item. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Rating - - 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. - - :ivar text: Text representation of an item. - :vartype text: str - :param _type: Required. Constant filled by server. - :type _type: str - """ - - _validation = { - 'text': {'readonly': True}, - '_type': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - '_type': {'key': '_type', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'Rating': 'Rating'} - } - - def __init__(self, **kwargs) -> None: - super(PropertiesItem, self).__init__(**kwargs) - self.text = None - self._type = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/query.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/query.py deleted file mode 100644 index 0f031a8592d2..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/query.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 - - -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. - :vartype display_text: str - :ivar web_search_url: The URL that takes the user to the Bing search - results page for the query. - :vartype web_search_url: str - :ivar search_link: The URL that you use to get the results of the related - search. Before using the URL, you must append query parameters as - appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL - if you're displaying the results in your own user interface. Otherwise, - use the webSearchUrl URL. - :vartype search_link: str - :ivar thumbnail: The URL to a thumbnail of a related image. - :vartype thumbnail: - ~azure.cognitiveservices.search.visualsearch.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, **kwargs): - super(Query, self).__init__(**kwargs) - self.text = kwargs.get('text', None) - self.display_text = None - self.web_search_url = None - self.search_link = None - self.thumbnail = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/query_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/query_py3.py deleted file mode 100644 index 62a0b42cd4ec..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/query_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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 - - -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. - :vartype display_text: str - :ivar web_search_url: The URL that takes the user to the Bing search - results page for the query. - :vartype web_search_url: str - :ivar search_link: The URL that you use to get the results of the related - search. Before using the URL, you must append query parameters as - appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL - if you're displaying the results in your own user interface. Otherwise, - use the webSearchUrl URL. - :vartype search_link: str - :ivar thumbnail: The URL to a thumbnail of a related image. - :vartype thumbnail: - ~azure.cognitiveservices.search.visualsearch.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 diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/rating.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/rating.py deleted file mode 100644 index a749cf2f7c0b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/rating.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 .properties_item import PropertiesItem - - -class Rating(PropertiesItem): - """Defines a rating. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AggregateRating - - 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. - - :ivar text: Text representation of an item. - :vartype text: str - :param _type: Required. Constant filled by server. - :type _type: str - :param rating_value: Required. The mean (average) rating. The possible - values are 1.0 through 5.0. - :type rating_value: float - :ivar best_rating: The highest rated review. The possible values are 1.0 - through 5.0. - :vartype best_rating: float - """ - - _validation = { - 'text': {'readonly': True}, - '_type': {'required': True}, - 'rating_value': {'required': True}, - 'best_rating': {'readonly': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - '_type': {'key': '_type', 'type': 'str'}, - 'rating_value': {'key': 'ratingValue', 'type': 'float'}, - 'best_rating': {'key': 'bestRating', 'type': 'float'}, - } - - _subtype_map = { - '_type': {'AggregateRating': 'AggregateRating'} - } - - def __init__(self, **kwargs): - super(Rating, self).__init__(**kwargs) - self.rating_value = kwargs.get('rating_value', None) - self.best_rating = None - self._type = 'Rating' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/rating_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/rating_py3.py deleted file mode 100644 index e7334a8e6913..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/rating_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# 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 .properties_item_py3 import PropertiesItem - - -class Rating(PropertiesItem): - """Defines a rating. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AggregateRating - - 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. - - :ivar text: Text representation of an item. - :vartype text: str - :param _type: Required. Constant filled by server. - :type _type: str - :param rating_value: Required. The mean (average) rating. The possible - values are 1.0 through 5.0. - :type rating_value: float - :ivar best_rating: The highest rated review. The possible values are 1.0 - through 5.0. - :vartype best_rating: float - """ - - _validation = { - 'text': {'readonly': True}, - '_type': {'required': True}, - 'rating_value': {'required': True}, - 'best_rating': {'readonly': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - '_type': {'key': '_type', 'type': 'str'}, - 'rating_value': {'key': 'ratingValue', 'type': 'float'}, - 'best_rating': {'key': 'bestRating', 'type': 'float'}, - } - - _subtype_map = { - '_type': {'AggregateRating': 'AggregateRating'} - } - - def __init__(self, *, rating_value: float, **kwargs) -> None: - super(Rating, self).__init__(**kwargs) - self.rating_value = rating_value - self.best_rating = None - self._type = 'Rating' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe.py deleted file mode 100644 index aa3fe9bca3a4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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 .creative_work import CreativeWork - - -class Recipe(CreativeWork): - """Defines a cooking recipe. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar cook_time: The amount of time the food takes to cook. For example, - PT25M. For information about the time format, see - http://en.wikipedia.org/wiki/ISO_8601#Durations. - :vartype cook_time: str - :ivar prep_time: The amount of time required to prepare the ingredients. - For example, PT15M. For information about the time format, see - http://en.wikipedia.org/wiki/ISO_8601#Durations. - :vartype prep_time: str - :ivar total_time: The total amount of time it takes to prepare and cook - the recipe. For example, PT45M. For information about the time format, see - http://en.wikipedia.org/wiki/ISO_8601#Durations. - :vartype total_time: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'cook_time': {'readonly': True}, - 'prep_time': {'readonly': True}, - 'total_time': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'cook_time': {'key': 'cookTime', 'type': 'str'}, - 'prep_time': {'key': 'prepTime', 'type': 'str'}, - 'total_time': {'key': 'totalTime', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Recipe, self).__init__(**kwargs) - self.cook_time = None - self.prep_time = None - self.total_time = None - self._type = 'Recipe' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe_py3.py deleted file mode 100644 index c66c538c0d59..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe_py3.py +++ /dev/null @@ -1,115 +0,0 @@ -# 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 .creative_work_py3 import CreativeWork - - -class Recipe(CreativeWork): - """Defines a cooking recipe. - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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.visualsearch.models.Thing] - :ivar date_published: The date on which the CreativeWork was published. - :vartype date_published: str - :ivar text: Text content of this creative work. - :vartype text: str - :ivar cook_time: The amount of time the food takes to cook. For example, - PT25M. For information about the time format, see - http://en.wikipedia.org/wiki/ISO_8601#Durations. - :vartype cook_time: str - :ivar prep_time: The amount of time required to prepare the ingredients. - For example, PT15M. For information about the time format, see - http://en.wikipedia.org/wiki/ISO_8601#Durations. - :vartype prep_time: str - :ivar total_time: The total amount of time it takes to prepare and cook - the recipe. For example, PT45M. For information about the time format, see - http://en.wikipedia.org/wiki/ISO_8601#Durations. - :vartype total_time: str - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'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}, - 'date_published': {'readonly': True}, - 'text': {'readonly': True}, - 'cook_time': {'readonly': True}, - 'prep_time': {'readonly': True}, - 'total_time': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', '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]'}, - 'date_published': {'key': 'datePublished', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'cook_time': {'key': 'cookTime', 'type': 'str'}, - 'prep_time': {'key': 'prepTime', 'type': 'str'}, - 'total_time': {'key': 'totalTime', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Recipe, self).__init__(**kwargs) - self.cook_time = None - self.prep_time = None - self.total_time = None - self._type = 'Recipe' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipes_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipes_module.py deleted file mode 100644 index 8be39eb209e1..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipes_module.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 - - -class RecipesModule(Model): - """Defines a list of recipes. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of recipes. - :vartype value: - list[~azure.cognitiveservices.search.visualsearch.models.Recipe] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Recipe]'}, - } - - def __init__(self, **kwargs): - super(RecipesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipes_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipes_module_py3.py deleted file mode 100644 index bab50bb98a85..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipes_module_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 - - -class RecipesModule(Model): - """Defines a list of recipes. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of recipes. - :vartype value: - list[~azure.cognitiveservices.search.visualsearch.models.Recipe] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Recipe]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecipesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/related_searches_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/related_searches_module.py deleted file mode 100644 index 87d288d4494c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/related_searches_module.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 - - -class RelatedSearchesModule(Model): - """Defines a list of related searches. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of related searches. - :vartype value: - list[~azure.cognitiveservices.search.visualsearch.models.Query] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Query]'}, - } - - def __init__(self, **kwargs): - super(RelatedSearchesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/related_searches_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/related_searches_module_py3.py deleted file mode 100644 index ca2c318d271b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/related_searches_module_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 - - -class RelatedSearchesModule(Model): - """Defines a list of related searches. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of related searches. - :vartype value: - list[~azure.cognitiveservices.search.visualsearch.models.Query] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Query]'}, - } - - def __init__(self, **kwargs) -> None: - super(RelatedSearchesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response.py deleted file mode 100644 index 194070083cbf..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 .identifiable import Identifiable - - -class Response(Identifiable): - """Defines a response. All schemas that return at the root of the response - must inherit from this object. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageKnowledge, ErrorResponse, Thing - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', 'type': 'str'}, - 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'ImageKnowledge': 'ImageKnowledge', 'ErrorResponse': 'ErrorResponse', 'Thing': 'Thing'} - } - - def __init__(self, **kwargs): - super(Response, self).__init__(**kwargs) - self.read_link = None - self.web_search_url = None - self._type = 'Response' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_base.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_base.py deleted file mode 100644 index fd44632cfc0a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_base.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 - - -class ResponseBase(Model): - """Response base. - - 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): - super(ResponseBase, self).__init__(**kwargs) - self._type = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_base_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_base_py3.py deleted file mode 100644 index 680e0fe98ab4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_base_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 - - -class ResponseBase(Model): - """Response base. - - 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 diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_py3.py deleted file mode 100644 index 022dbc952da3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/response_py3.py +++ /dev/null @@ -1,61 +0,0 @@ -# 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 .identifiable_py3 import Identifiable - - -class Response(Identifiable): - """Defines a response. All schemas that return at the root of the response - must inherit from this object. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageKnowledge, ErrorResponse, Thing - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - } - - _attribute_map = { - '_type': {'key': '_type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'read_link': {'key': 'readLink', 'type': 'str'}, - 'web_search_url': {'key': 'webSearchUrl', 'type': 'str'}, - } - - _subtype_map = { - '_type': {'ImageKnowledge': 'ImageKnowledge', 'ErrorResponse': 'ErrorResponse', 'Thing': 'Thing'} - } - - def __init__(self, **kwargs) -> None: - super(Response, self).__init__(**kwargs) - self.read_link = None - self.web_search_url = None - self._type = 'Response' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/structured_value.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/structured_value.py deleted file mode 100644 index 7bbe5856b20c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/structured_value.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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 .intangible import Intangible - - -class StructuredValue(Intangible): - """StructuredValue. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Point2D, NormalizedQuadrilateral - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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': {'Point2D': 'Point2D', 'NormalizedQuadrilateral': 'NormalizedQuadrilateral'} - } - - def __init__(self, **kwargs): - super(StructuredValue, self).__init__(**kwargs) - self._type = 'StructuredValue' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/structured_value_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/structured_value_py3.py deleted file mode 100644 index e5db5c6ec567..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/structured_value_py3.py +++ /dev/null @@ -1,84 +0,0 @@ -# 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 .intangible_py3 import Intangible - - -class StructuredValue(Intangible): - """StructuredValue. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Point2D, NormalizedQuadrilateral - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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': {'Point2D': 'Point2D', 'NormalizedQuadrilateral': 'NormalizedQuadrilateral'} - } - - def __init__(self, **kwargs) -> None: - super(StructuredValue, self).__init__(**kwargs) - self._type = 'StructuredValue' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/thing.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/thing.py deleted file mode 100644 index 7fe2a1a8cc16..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/thing.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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 .response import Response - - -class Thing(Response): - """Defines a thing. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTag, Organization, Offer, CreativeWork, Person, - Intangible - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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': {'ImageTag': 'ImageTag', 'Organization': 'Organization', 'Offer': 'Offer', 'CreativeWork': 'CreativeWork', 'Person': 'Person', 'Intangible': 'Intangible'} - } - - def __init__(self, **kwargs): - 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' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/thing_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/thing_py3.py deleted file mode 100644 index ba7e7f40d474..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/thing_py3.py +++ /dev/null @@ -1,91 +0,0 @@ -# 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 .response_py3 import Response - - -class Thing(Response): - """Defines a thing. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageTag, Organization, Offer, CreativeWork, Person, - Intangible - - 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 read_link: The URL that returns this resource. To use the URL, - append query parameters as appropriate and include the - Ocp-Apim-Subscription-Key header. - :vartype read_link: 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: An image of the item. - :vartype image: - ~azure.cognitiveservices.search.visualsearch.models.ImageObject - :ivar description: A short description of the item. - :vartype description: str - :ivar alternate_name: An alias for the item. - :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}, - 'read_link': {'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'}, - 'read_link': {'key': 'readLink', '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': {'ImageTag': 'ImageTag', 'Organization': 'Organization', 'Offer': 'Offer', 'CreativeWork': 'CreativeWork', 'Person': 'Person', 'Intangible': 'Intangible'} - } - - 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' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_request.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_request.py deleted file mode 100644 index a6b139a4daa3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_request.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 - - -class VisualSearchRequest(Model): - """A JSON object that contains information about the image to get insights of. - Specify this object only in a knowledgeRequest form data. - - :param image_info: A JSON object that identities the image to get insights - of. - :type image_info: - ~azure.cognitiveservices.search.visualsearch.models.ImageInfo - :param knowledge_request: A JSON object containing information about the - request, such as filters, or a description. - :type knowledge_request: - ~azure.cognitiveservices.search.visualsearch.models.KnowledgeRequest - """ - - _attribute_map = { - 'image_info': {'key': 'imageInfo', 'type': 'ImageInfo'}, - 'knowledge_request': {'key': 'knowledgeRequest', 'type': 'KnowledgeRequest'}, - } - - def __init__(self, **kwargs): - super(VisualSearchRequest, self).__init__(**kwargs) - self.image_info = kwargs.get('image_info', None) - self.knowledge_request = kwargs.get('knowledge_request', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_request_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_request_py3.py deleted file mode 100644 index fc1dd53108c8..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/visual_search_request_py3.py +++ /dev/null @@ -1,37 +0,0 @@ -# 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 - - -class VisualSearchRequest(Model): - """A JSON object that contains information about the image to get insights of. - Specify this object only in a knowledgeRequest form data. - - :param image_info: A JSON object that identities the image to get insights - of. - :type image_info: - ~azure.cognitiveservices.search.visualsearch.models.ImageInfo - :param knowledge_request: A JSON object containing information about the - request, such as filters, or a description. - :type knowledge_request: - ~azure.cognitiveservices.search.visualsearch.models.KnowledgeRequest - """ - - _attribute_map = { - 'image_info': {'key': 'imageInfo', 'type': 'ImageInfo'}, - 'knowledge_request': {'key': 'knowledgeRequest', 'type': 'KnowledgeRequest'}, - } - - def __init__(self, *, image_info=None, knowledge_request=None, **kwargs) -> None: - super(VisualSearchRequest, self).__init__(**kwargs) - self.image_info = image_info - self.knowledge_request = knowledge_request diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/__init__.py index 5dbea237465e..dd241d832e85 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/__init__.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .images_operations import ImagesOperations +from ._images_operations import ImagesOperations __all__ = [ 'ImagesOperations', diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/images_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/_images_operations.py similarity index 99% rename from sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/images_operations.py rename to sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/_images_operations.py index 8c92fe3a77ed..1d0647efb7c6 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/images_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/operations/_images_operations.py @@ -17,6 +17,8 @@ class ImagesOperations(object): """ImagesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -296,7 +298,6 @@ def visual_search( raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ImageKnowledge', response)