From 48de406f29fa4de5a400b5cb6e175c7a570872a7 Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Wed, 4 Dec 2019 05:28:26 +0000 Subject: [PATCH 1/3] regenerated image search --- .../search/imagesearch/__init__.py | 7 +- .../search/imagesearch/_configuration.py | 48 + ..._search_api.py => _image_search_client.py} | 48 +- .../search/imagesearch/models/__init__.py | 252 +- ...enums.py => _image_search_client_enums.py} | 0 .../search/imagesearch/models/_models.py | 2703 +++++++++++++++++ .../search/imagesearch/models/_models_py3.py | 2703 +++++++++++++++++ .../imagesearch/models/aggregate_offer.py | 133 - .../imagesearch/models/aggregate_offer_py3.py | 133 - .../imagesearch/models/aggregate_rating.py | 57 - .../models/aggregate_rating_py3.py | 57 - .../search/imagesearch/models/answer.py | 56 - .../search/imagesearch/models/answer_py3.py | 56 - .../imagesearch/models/collection_page.py | 99 - .../imagesearch/models/collection_page_py3.py | 99 - .../imagesearch/models/creative_work.py | 104 - .../imagesearch/models/creative_work_py3.py | 104 - .../search/imagesearch/models/error.py | 72 - .../search/imagesearch/models/error_py3.py | 72 - .../imagesearch/models/error_response.py | 69 - .../imagesearch/models/error_response_py3.py | 69 - .../search/imagesearch/models/identifiable.py | 49 - .../imagesearch/models/identifiable_py3.py | 49 - .../imagesearch/models/image_gallery.py | 110 - .../imagesearch/models/image_gallery_py3.py | 110 - .../imagesearch/models/image_insights.py | 151 - .../models/image_insights_image_caption.py | 51 - .../image_insights_image_caption_py3.py | 51 - .../imagesearch/models/image_insights_py3.py | 151 - .../search/imagesearch/models/image_object.py | 166 - .../imagesearch/models/image_object_py3.py | 166 - .../imagesearch/models/image_tags_module.py | 38 - .../models/image_tags_module_py3.py | 38 - .../search/imagesearch/models/images.py | 94 - .../models/images_image_metadata.py | 53 - .../models/images_image_metadata_py3.py | 53 - .../imagesearch/models/images_module.py | 36 - .../imagesearch/models/images_module_py3.py | 36 - .../search/imagesearch/models/images_py3.py | 94 - .../search/imagesearch/models/insights_tag.py | 36 - .../imagesearch/models/insights_tag_py3.py | 36 - .../search/imagesearch/models/intangible.py | 83 - .../imagesearch/models/intangible_py3.py | 83 - .../search/imagesearch/models/media_object.py | 137 - .../imagesearch/models/media_object_py3.py | 137 - .../models/normalized_rectangle.py | 98 - .../models/normalized_rectangle_py3.py | 98 - .../search/imagesearch/models/offer.py | 139 - .../search/imagesearch/models/offer_py3.py | 139 - .../search/imagesearch/models/organization.py | 75 - .../imagesearch/models/organization_py3.py | 75 - .../search/imagesearch/models/person.py | 85 - .../search/imagesearch/models/person_py3.py | 85 - .../imagesearch/models/pivot_suggestions.py | 40 - .../models/pivot_suggestions_py3.py | 40 - .../imagesearch/models/properties_item.py | 49 - .../imagesearch/models/properties_item_py3.py | 49 - .../search/imagesearch/models/query.py | 67 - .../search/imagesearch/models/query_py3.py | 67 - .../search/imagesearch/models/rating.py | 60 - .../search/imagesearch/models/rating_py3.py | 60 - .../search/imagesearch/models/recipe.py | 113 - .../search/imagesearch/models/recipe_py3.py | 113 - .../imagesearch/models/recipes_module.py | 36 - .../imagesearch/models/recipes_module_py3.py | 36 - .../models/recognized_entities_module.py | 36 - .../models/recognized_entities_module_py3.py | 36 - .../imagesearch/models/recognized_entity.py | 62 - .../models/recognized_entity_group.py | 45 - .../models/recognized_entity_group_py3.py | 45 - .../models/recognized_entity_py3.py | 62 - .../models/recognized_entity_region.py | 70 - .../models/recognized_entity_region_py3.py | 70 - .../models/related_collections_module.py | 36 - .../models/related_collections_module_py3.py | 36 - .../models/related_searches_module.py | 36 - .../models/related_searches_module_py3.py | 36 - .../search/imagesearch/models/response.py | 60 - .../imagesearch/models/response_base.py | 41 - .../imagesearch/models/response_base_py3.py | 41 - .../search/imagesearch/models/response_py3.py | 60 - .../models/search_results_answer.py | 63 - .../models/search_results_answer_py3.py | 63 - .../imagesearch/models/structured_value.py | 82 - .../models/structured_value_py3.py | 82 - .../search/imagesearch/models/thing.py | 88 - .../search/imagesearch/models/thing_py3.py | 88 - .../imagesearch/models/trending_images.py | 57 - .../models/trending_images_category.py | 45 - .../models/trending_images_category_py3.py | 45 - .../imagesearch/models/trending_images_py3.py | 57 - .../models/trending_images_tile.py | 43 - .../models/trending_images_tile_py3.py | 43 - .../search/imagesearch/models/web_page.py | 99 - .../search/imagesearch/models/web_page_py3.py | 99 - .../search/imagesearch/operations/__init__.py | 2 +- ...es_operations.py => _images_operations.py} | 35 +- 97 files changed, 5621 insertions(+), 6615 deletions(-) create mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/_configuration.py rename sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/{image_search_api.py => _image_search_client.py} (55%) rename sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/{image_search_api_enums.py => _image_search_client_enums.py} (100%) create mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models.py create mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_rating.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_rating_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/identifiable.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/identifiable_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_image_metadata.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_image_metadata_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_module.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_module_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/person.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/person_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/properties_item.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/properties_item_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/query.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/query_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/rating.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/rating_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipes_module.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipes_module_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_module.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_module_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_module.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_module_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_searches_module.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_searches_module_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_base.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_base_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile_py3.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page.py delete mode 100644 sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page_py3.py rename sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/{images_operations.py => _images_operations.py} (98%) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/__init__.py index b90a6e73415d..d5bc73f82191 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .image_search_api import ImageSearchAPI -from .version import VERSION +from ._configuration import ImageSearchClientConfiguration +from ._image_search_client import ImageSearchClient +__all__ = ['ImageSearchClient', 'ImageSearchClientConfiguration'] -__all__ = ['ImageSearchAPI'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/_configuration.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/_configuration.py new file mode 100644 index 000000000000..ac8cc23129ff --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/_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 ImageSearchClientConfiguration(Configuration): + """Configuration for ImageSearchClient + 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(ImageSearchClientConfiguration, 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-imagesearch/{}'.format(VERSION)) + + self.endpoint = endpoint + self.credentials = credentials diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/image_search_api.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/_image_search_client.py similarity index 55% rename from sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/image_search_api.py rename to sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/_image_search_client.py index 8ff1ef3ca8ff..113f6bda9bcd 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/image_search_api.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/_image_search_client.py @@ -10,58 +10,36 @@ # -------------------------------------------------------------------------- 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 ImageSearchAPIConfiguration(Configuration): - """Configuration for ImageSearchAPI - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'https://api.cognitive.microsoft.com/bing/v7.0' +from msrest import Serializer, Deserializer - super(ImageSearchAPIConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-cognitiveservices-search-imagesearch/{}'.format(VERSION)) - - self.credentials = credentials +from ._configuration import ImageSearchClientConfiguration +from .operations import ImagesOperations +from . import models -class ImageSearchAPI(SDKClient): +class ImageSearchClient(SDKClient): """The Image Search API lets you send a search query to Bing and get back a list of relevant images. This section provides technical details about the query parameters and headers that you use to request images and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the Web for Images](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/search-the-web). :ivar config: Configuration for client. - :vartype config: ImageSearchAPIConfiguration + :vartype config: ImageSearchClientConfiguration :ivar images: Images operations :vartype images: azure.cognitiveservices.search.imagesearch.operations.ImagesOperations + :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 - :param str base_url: Service URL """ def __init__( - self, credentials, base_url=None): + self, endpoint, credentials): - self.config = ImageSearchAPIConfiguration(credentials, base_url) - super(ImageSearchAPI, self).__init__(self.config.credentials, self.config) + self.config = ImageSearchClientConfiguration(endpoint, credentials) + super(ImageSearchClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '1.0' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/__init__.py index 8abe388f0610..8ab0e7f1beb8 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/__init__.py @@ -10,157 +10,157 @@ # -------------------------------------------------------------------------- try: - 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 .query_py3 import Query - from .pivot_suggestions_py3 import PivotSuggestions - from .images_py3 import Images - from .search_results_answer_py3 import SearchResultsAnswer - from .answer_py3 import Answer - from .media_object_py3 import MediaObject - from .response_py3 import Response - from .thing_py3 import Thing - from .creative_work_py3 import CreativeWork - from .identifiable_py3 import Identifiable - from .error_py3 import Error - from .error_response_py3 import ErrorResponse, ErrorResponseException - from .image_insights_image_caption_py3 import ImageInsightsImageCaption - from .image_gallery_py3 import ImageGallery - from .related_collections_module_py3 import RelatedCollectionsModule - from .images_module_py3 import ImagesModule - from .related_searches_module_py3 import RelatedSearchesModule - from .recipe_py3 import Recipe - from .recipes_module_py3 import RecipesModule - from .normalized_rectangle_py3 import NormalizedRectangle - from .recognized_entity_py3 import RecognizedEntity - from .recognized_entity_region_py3 import RecognizedEntityRegion - from .recognized_entity_group_py3 import RecognizedEntityGroup - from .recognized_entities_module_py3 import RecognizedEntitiesModule - from .insights_tag_py3 import InsightsTag - from .image_tags_module_py3 import ImageTagsModule - from .image_insights_py3 import ImageInsights - from .trending_images_tile_py3 import TrendingImagesTile - from .trending_images_category_py3 import TrendingImagesCategory - from .trending_images_py3 import TrendingImages - from .properties_item_py3 import PropertiesItem - from .web_page_py3 import WebPage - from .response_base_py3 import ResponseBase - from .person_py3 import Person - from .intangible_py3 import Intangible - from .rating_py3 import Rating - from .collection_page_py3 import CollectionPage - from .structured_value_py3 import StructuredValue + from ._models_py3 import AggregateOffer + from ._models_py3 import AggregateRating + from ._models_py3 import Answer + from ._models_py3 import CollectionPage + from ._models_py3 import CreativeWork + from ._models_py3 import Error + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import Identifiable + from ._models_py3 import ImageGallery + from ._models_py3 import ImageInsights + from ._models_py3 import ImageInsightsImageCaption + from ._models_py3 import ImageObject + from ._models_py3 import Images + from ._models_py3 import ImagesImageMetadata + from ._models_py3 import ImagesModule + from ._models_py3 import ImageTagsModule + from ._models_py3 import InsightsTag + from ._models_py3 import Intangible + from ._models_py3 import MediaObject + from ._models_py3 import NormalizedRectangle + from ._models_py3 import Offer + from ._models_py3 import Organization + from ._models_py3 import Person + from ._models_py3 import PivotSuggestions + 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 RecognizedEntitiesModule + from ._models_py3 import RecognizedEntity + from ._models_py3 import RecognizedEntityGroup + from ._models_py3 import RecognizedEntityRegion + from ._models_py3 import RelatedCollectionsModule + from ._models_py3 import RelatedSearchesModule + from ._models_py3 import Response + from ._models_py3 import ResponseBase + from ._models_py3 import SearchResultsAnswer + from ._models_py3 import StructuredValue + from ._models_py3 import Thing + from ._models_py3 import TrendingImages + from ._models_py3 import TrendingImagesCategory + from ._models_py3 import TrendingImagesTile + from ._models_py3 import WebPage except (SyntaxError, ImportError): - 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 .query import Query - from .pivot_suggestions import PivotSuggestions - from .images import Images - from .search_results_answer import SearchResultsAnswer - from .answer import Answer - from .media_object import MediaObject - from .response import Response - from .thing import Thing - from .creative_work import CreativeWork - from .identifiable import Identifiable - from .error import Error - from .error_response import ErrorResponse, ErrorResponseException - from .image_insights_image_caption import ImageInsightsImageCaption - from .image_gallery import ImageGallery - from .related_collections_module import RelatedCollectionsModule - from .images_module import ImagesModule - from .related_searches_module import RelatedSearchesModule - from .recipe import Recipe - from .recipes_module import RecipesModule - from .normalized_rectangle import NormalizedRectangle - from .recognized_entity import RecognizedEntity - from .recognized_entity_region import RecognizedEntityRegion - from .recognized_entity_group import RecognizedEntityGroup - from .recognized_entities_module import RecognizedEntitiesModule - from .insights_tag import InsightsTag - from .image_tags_module import ImageTagsModule - from .image_insights import ImageInsights - from .trending_images_tile import TrendingImagesTile - from .trending_images_category import TrendingImagesCategory - from .trending_images import TrendingImages - from .properties_item import PropertiesItem - from .web_page import WebPage - from .response_base import ResponseBase - from .person import Person - from .intangible import Intangible - from .rating import Rating - from .collection_page import CollectionPage - from .structured_value import StructuredValue -from .image_search_api_enums import ( + from ._models import AggregateOffer + from ._models import AggregateRating + from ._models import Answer + from ._models import CollectionPage + from ._models import CreativeWork + from ._models import Error + from ._models import ErrorResponse, ErrorResponseException + from ._models import Identifiable + from ._models import ImageGallery + from ._models import ImageInsights + from ._models import ImageInsightsImageCaption + from ._models import ImageObject + from ._models import Images + from ._models import ImagesImageMetadata + from ._models import ImagesModule + from ._models import ImageTagsModule + from ._models import InsightsTag + from ._models import Intangible + from ._models import MediaObject + from ._models import NormalizedRectangle + from ._models import Offer + from ._models import Organization + from ._models import Person + from ._models import PivotSuggestions + from ._models import PropertiesItem + from ._models import Query + from ._models import Rating + from ._models import Recipe + from ._models import RecipesModule + from ._models import RecognizedEntitiesModule + from ._models import RecognizedEntity + from ._models import RecognizedEntityGroup + from ._models import RecognizedEntityRegion + from ._models import RelatedCollectionsModule + from ._models import RelatedSearchesModule + from ._models import Response + from ._models import ResponseBase + from ._models import SearchResultsAnswer + from ._models import StructuredValue + from ._models import Thing + from ._models import TrendingImages + from ._models import TrendingImagesCategory + from ._models import TrendingImagesTile + from ._models import WebPage +from ._image_search_client_enums import ( Currency, - ItemAvailability, ErrorCode, ErrorSubCode, + Freshness, ImageAspect, ImageColor, - Freshness, ImageContent, - ImageType, - ImageLicense, - SafeSearch, - ImageSize, ImageCropType, ImageInsightModule, + ImageLicense, + ImageSize, + ImageType, + ItemAvailability, + SafeSearch, ) __all__ = [ - 'Organization', - 'AggregateRating', - 'Offer', 'AggregateOffer', - 'ImagesImageMetadata', - 'ImageObject', - 'Query', - 'PivotSuggestions', - 'Images', - 'SearchResultsAnswer', + 'AggregateRating', 'Answer', - 'MediaObject', - 'Response', - 'Thing', + 'CollectionPage', 'CreativeWork', - 'Identifiable', 'Error', 'ErrorResponse', 'ErrorResponseException', - 'ImageInsightsImageCaption', + 'Identifiable', 'ImageGallery', - 'RelatedCollectionsModule', + 'ImageInsights', + 'ImageInsightsImageCaption', + 'ImageObject', + 'Images', + 'ImagesImageMetadata', 'ImagesModule', - 'RelatedSearchesModule', + 'ImageTagsModule', + 'InsightsTag', + 'Intangible', + 'MediaObject', + 'NormalizedRectangle', + 'Offer', + 'Organization', + 'Person', + 'PivotSuggestions', + 'PropertiesItem', + 'Query', + 'Rating', 'Recipe', 'RecipesModule', - 'NormalizedRectangle', + 'RecognizedEntitiesModule', 'RecognizedEntity', - 'RecognizedEntityRegion', 'RecognizedEntityGroup', - 'RecognizedEntitiesModule', - 'InsightsTag', - 'ImageTagsModule', - 'ImageInsights', - 'TrendingImagesTile', - 'TrendingImagesCategory', - 'TrendingImages', - 'PropertiesItem', - 'WebPage', + 'RecognizedEntityRegion', + 'RelatedCollectionsModule', + 'RelatedSearchesModule', + 'Response', 'ResponseBase', - 'Person', - 'Intangible', - 'Rating', - 'CollectionPage', + 'SearchResultsAnswer', 'StructuredValue', + 'Thing', + 'TrendingImages', + 'TrendingImagesCategory', + 'TrendingImagesTile', + 'WebPage', 'Currency', 'ItemAvailability', 'ErrorCode', diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_search_api_enums.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_image_search_client_enums.py similarity index 100% rename from sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_search_api_enums.py rename to sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_image_search_client_enums.py diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models.py new file mode 100644 index 000000000000..d371f7fe1ae9 --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models.py @@ -0,0 +1,2703 @@ +# 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 could be returned at the root of a + response should inherit from this. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Answer, Thing, ErrorResponse, RecognizedEntity, + RecognizedEntityRegion, ImageInsights, TrendingImages + + 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. + :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': {'Answer': 'Answer', 'Thing': 'Thing', 'ErrorResponse': 'ErrorResponse', 'RecognizedEntity': 'RecognizedEntity', 'RecognizedEntityRegion': 'RecognizedEntityRegion', 'ImageInsights': 'ImageInsights', 'TrendingImages': 'TrendingImages'} + } + + 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: 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. + :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.imagesearch.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': {'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 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. + :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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. + :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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 Answer(Response): + """Defines an answer. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SearchResultsAnswer + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param _type: Required. Constant filled by server. + :type _type: str + :ivar id: A String identifier. + :vartype id: str + :ivar read_link: The URL that returns this resource. + :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': {'SearchResultsAnswer': 'SearchResultsAnswer'} + } + + def __init__(self, **kwargs): + super(Answer, self).__init__(**kwargs) + self._type = 'Answer' + + +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: MediaObject, Recipe, WebPage + + 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. + :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.imagesearch.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.imagesearch.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': {'MediaObject': 'MediaObject', 'Recipe': 'Recipe', 'WebPage': 'WebPage'} + } + + 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 WebPage(CreativeWork): + """Defines a webpage that is relevant to the query. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CollectionPage + + 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. + :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.imagesearch.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.imagesearch.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': {'CollectionPage': 'CollectionPage'} + } + + def __init__(self, **kwargs): + super(WebPage, self).__init__(**kwargs) + self._type = 'WebPage' + + +class CollectionPage(WebPage): + """Defines a link to a webpage that contains a collection. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageGallery + + 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. + :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.imagesearch.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.imagesearch.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': {'ImageGallery': 'ImageGallery'} + } + + def __init__(self, **kwargs): + super(CollectionPage, self).__init__(**kwargs) + self._type = 'CollectionPage' + + +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.imagesearch.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.imagesearch.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. + :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.imagesearch.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 ImageGallery(CollectionPage): + """Defines a link to a webpage that contains a collection of related images. + + 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. + :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.imagesearch.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.imagesearch.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 source: The publisher or social network where the images were found. + You must attribute the publisher as the source where the collection was + found. + :vartype source: str + :ivar images_count: The number of related images found in the collection. + :vartype images_count: long + :ivar followers_count: The number of users on the social network that + follow the creator. + :vartype followers_count: long + """ + + _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}, + 'source': {'readonly': True}, + 'images_count': {'readonly': True}, + 'followers_count': {'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'}, + 'source': {'key': 'source', 'type': 'str'}, + 'images_count': {'key': 'imagesCount', 'type': 'long'}, + 'followers_count': {'key': 'followersCount', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(ImageGallery, self).__init__(**kwargs) + self.source = None + self.images_count = None + self.followers_count = None + self._type = 'ImageGallery' + + +class ImageInsights(Response): + """The top-level object that the response includes when an image insights + request succeeds. For information about requesting image insights, see the + [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken) + query parameter. The modules query parameter affects the fields that Bing + includes in the response. If you set + [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested) + to only Caption, then this object includes only the imageCaption field. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar image_insights_token: A token that you use in a subsequent call to + the Image Search API to get more information about the image. For + information about using this token, see the insightsToken query parameter. + This token has the same usage as the token in the Image object. + :vartype image_insights_token: str + :ivar best_representative_query: The query term that best represents the + image. Clicking the link in the Query object, takes the user to a webpage + with more pictures of the image. + :vartype best_representative_query: + ~azure.cognitiveservices.search.imagesearch.models.Query + :ivar image_caption: The caption to use for the image. + :vartype image_caption: + ~azure.cognitiveservices.search.imagesearch.models.ImageInsightsImageCaption + :ivar related_collections: A list of links to webpages that contain + related images. + :vartype related_collections: + ~azure.cognitiveservices.search.imagesearch.models.RelatedCollectionsModule + :ivar pages_including: A list of webpages that contain the image. To + access the webpage, use the URL in the image's hostPageUrl field. + :vartype pages_including: + ~azure.cognitiveservices.search.imagesearch.models.ImagesModule + :ivar shopping_sources: A list of merchants that offer items related to + the image. For example, if the image is of an apple pie, the list contains + merchants that are selling apple pies. + :vartype shopping_sources: + ~azure.cognitiveservices.search.imagesearch.models.AggregateOffer + :ivar related_searches: A list of related queries made by others. + :vartype related_searches: + ~azure.cognitiveservices.search.imagesearch.models.RelatedSearchesModule + :ivar recipes: A list of recipes related to the image. For example, if the + image is of an apple pie, the list contains recipes for making an apple + pie. + :vartype recipes: + ~azure.cognitiveservices.search.imagesearch.models.RecipesModule + :ivar visually_similar_images: A list of images that are visually similar + to the original image. For example, if the specified image is of a sunset + over a body of water, the list of similar images are of a sunset over a + body of water. If the specified image is of a person, similar images might + be of the same person or they might be of persons dressed similarly or in + a similar setting. The criteria for similarity continues to evolve. + :vartype visually_similar_images: + ~azure.cognitiveservices.search.imagesearch.models.ImagesModule + :ivar visually_similar_products: A list of images that contain products + that are visually similar to products found in the original image. For + example, if the specified image contains a dress, the list of similar + images contain a dress. The image provides summary information about + offers that Bing found online for the product. + :vartype visually_similar_products: + ~azure.cognitiveservices.search.imagesearch.models.ImagesModule + :ivar recognized_entity_groups: A list of groups that contain images of + entities that match the entity found in the specified image. For example, + the response might include images from the general celebrity group if the + entity was recognized in that group. + :vartype recognized_entity_groups: + ~azure.cognitiveservices.search.imagesearch.models.RecognizedEntitiesModule + :ivar image_tags: A list of characteristics of the content found in the + image. For example, if the image is of a person, the tags might indicate + the person's gender and the type of clothes they're wearing. + :vartype image_tags: + ~azure.cognitiveservices.search.imagesearch.models.ImageTagsModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'image_insights_token': {'readonly': True}, + 'best_representative_query': {'readonly': True}, + 'image_caption': {'readonly': True}, + 'related_collections': {'readonly': True}, + 'pages_including': {'readonly': True}, + 'shopping_sources': {'readonly': True}, + 'related_searches': {'readonly': True}, + 'recipes': {'readonly': True}, + 'visually_similar_images': {'readonly': True}, + 'visually_similar_products': {'readonly': True}, + 'recognized_entity_groups': {'readonly': True}, + 'image_tags': {'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'}, + 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, + 'best_representative_query': {'key': 'bestRepresentativeQuery', 'type': 'Query'}, + 'image_caption': {'key': 'imageCaption', 'type': 'ImageInsightsImageCaption'}, + 'related_collections': {'key': 'relatedCollections', 'type': 'RelatedCollectionsModule'}, + 'pages_including': {'key': 'pagesIncluding', 'type': 'ImagesModule'}, + 'shopping_sources': {'key': 'shoppingSources', 'type': 'AggregateOffer'}, + 'related_searches': {'key': 'relatedSearches', 'type': 'RelatedSearchesModule'}, + 'recipes': {'key': 'recipes', 'type': 'RecipesModule'}, + 'visually_similar_images': {'key': 'visuallySimilarImages', 'type': 'ImagesModule'}, + 'visually_similar_products': {'key': 'visuallySimilarProducts', 'type': 'ImagesModule'}, + 'recognized_entity_groups': {'key': 'recognizedEntityGroups', 'type': 'RecognizedEntitiesModule'}, + 'image_tags': {'key': 'imageTags', 'type': 'ImageTagsModule'}, + } + + def __init__(self, **kwargs): + super(ImageInsights, self).__init__(**kwargs) + self.image_insights_token = None + self.best_representative_query = None + self.image_caption = None + self.related_collections = None + self.pages_including = None + self.shopping_sources = None + self.related_searches = None + self.recipes = None + self.visually_similar_images = None + self.visually_similar_products = None + self.recognized_entity_groups = None + self.image_tags = None + self._type = 'ImageInsights' + + +class ImageInsightsImageCaption(Model): + """Defines an image's caption. + + All required parameters must be populated in order to send to Azure. + + :param caption: Required. A caption about the image. + :type caption: str + :param data_source_url: Required. The URL to the website where the caption + was found. You must attribute the caption to the source. For example, by + displaying the domain name from the URL next to the caption and using the + URL to link to the source website. + :type data_source_url: str + :param related_searches: Required. A list of entities found in the + caption. Use the contents of the Query object to find the entity in the + caption and create a link. The link takes the user to images of the + entity. + :type related_searches: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + """ + + _validation = { + 'caption': {'required': True}, + 'data_source_url': {'required': True}, + 'related_searches': {'required': True}, + } + + _attribute_map = { + 'caption': {'key': 'caption', 'type': 'str'}, + 'data_source_url': {'key': 'dataSourceUrl', 'type': 'str'}, + 'related_searches': {'key': 'relatedSearches', 'type': '[Query]'}, + } + + def __init__(self, **kwargs): + super(ImageInsightsImageCaption, self).__init__(**kwargs) + self.caption = kwargs.get('caption', None) + self.data_source_url = kwargs.get('data_source_url', None) + self.related_searches = kwargs.get('related_searches', None) + + +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. + :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. + :vartype width: int + :ivar height: The height of the source media object, in pixels. + :vartype height: int + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + '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. + :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. + :vartype width: int + :ivar height: The height of the source media object, in pixels. + :vartype height: int + :ivar thumbnail: The URL to a thumbnail of the image + :vartype thumbnail: + ~azure.cognitiveservices.search.imagesearch.models.ImageObject + :ivar image_insights_token: The token that you use in a subsequent call to + the Image Search API to get additional information about the image. For + information about using this token, see the insightsToken query 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 to get the + list of websites. + :vartype insights_metadata: + ~azure.cognitiveservices.search.imagesearch.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: Visual representation of the image. Used for getting + more sizes + :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 SearchResultsAnswer(Answer): + """Defines a search result answer. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Images + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar total_estimated_matches: The estimated number of webpages that are + relevant to the query. Use this number along with the count and offset + query parameters to page the results. + :vartype total_estimated_matches: long + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'total_estimated_matches': {'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'}, + 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, + } + + _subtype_map = { + '_type': {'Images': 'Images'} + } + + def __init__(self, **kwargs): + super(SearchResultsAnswer, self).__init__(**kwargs) + self.total_estimated_matches = None + self._type = 'SearchResultsAnswer' + + +class Images(SearchResultsAnswer): + """Defines an image answer. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param _type: Required. Constant filled by server. + :type _type: str + :ivar id: A String identifier. + :vartype id: str + :ivar read_link: The URL that returns this resource. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar total_estimated_matches: The estimated number of webpages that are + relevant to the query. Use this number along with the count and offset + query parameters to page the results. + :vartype total_estimated_matches: long + :ivar next_offset: Used as part of deduping. Tells client the next offset + that client should use in the next pagination request + :vartype next_offset: int + :param value: Required. A list of image objects that are relevant to the + query. If there are no results, the List is empty. + :type value: + list[~azure.cognitiveservices.search.imagesearch.models.ImageObject] + :ivar query_expansions: A list of expanded queries that narrows the + original query. For example, if the query was Microsoft Surface, the + expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, + Microsoft Surface Phone, and Microsoft Surface Hub. + :vartype query_expansions: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + :ivar pivot_suggestions: A list of segments in the original query. For + example, if the query was Red Flowers, Bing might segment the query into + Red and Flowers. The Flowers pivot may contain query suggestions such as + Red Peonies and Red Daisies, and the Red pivot may contain query + suggestions such as Green Flowers and Yellow Flowers. + :vartype pivot_suggestions: + list[~azure.cognitiveservices.search.imagesearch.models.PivotSuggestions] + :ivar similar_terms: A list of terms that are similar in meaning to the + user's query term. + :vartype similar_terms: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'total_estimated_matches': {'readonly': True}, + 'next_offset': {'readonly': True}, + 'value': {'required': True}, + 'query_expansions': {'readonly': True}, + 'pivot_suggestions': {'readonly': True}, + 'similar_terms': {'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'}, + 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, + 'next_offset': {'key': 'nextOffset', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[ImageObject]'}, + 'query_expansions': {'key': 'queryExpansions', 'type': '[Query]'}, + 'pivot_suggestions': {'key': 'pivotSuggestions', 'type': '[PivotSuggestions]'}, + 'similar_terms': {'key': 'similarTerms', 'type': '[Query]'}, + } + + def __init__(self, **kwargs): + super(Images, self).__init__(**kwargs) + self.next_offset = None + self.value = kwargs.get('value', None) + self.query_expansions = None + self.pivot_suggestions = None + self.similar_terms = None + self._type = 'Images' + + +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 offer goods of + 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.imagesearch.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.imagesearch.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 ImageTagsModule(Model): + """Defines the characteristics of content found in an image. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of tags that describe the characteristics + of the content found in the image. For example, if the image is of a + musical artist, the list might include Female, Dress, and Music to + indicate the person is female music artist that's wearing a dress. + :type value: + list[~azure.cognitiveservices.search.imagesearch.models.InsightsTag] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InsightsTag]'}, + } + + def __init__(self, **kwargs): + super(ImageTagsModule, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class InsightsTag(Model): + """Defines a characteristic of the content found in the image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the characteristic. For example, cat, kitty, + calico cat. + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InsightsTag, self).__init__(**kwargs) + self.name = 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. + :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.imagesearch.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 StructuredValue(Intangible): + """StructuredValue. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NormalizedRectangle + + 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. + :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.imagesearch.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': {'NormalizedRectangle': 'NormalizedRectangle'} + } + + def __init__(self, **kwargs): + super(StructuredValue, self).__init__(**kwargs) + self._type = 'StructuredValue' + + +class NormalizedRectangle(StructuredValue): + """Defines a region of an image. The region is defined by the coordinates of + the top, left corner and bottom, right corner of the region. 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. + :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.imagesearch.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 left: Required. The left coordinate. + :type left: float + :param top: Required. The top coordinate + :type top: float + :param right: Required. The right coordinate + :type right: float + :param bottom: Required. The bottom coordinate + :type bottom: 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}, + 'left': {'required': True}, + 'top': {'required': True}, + 'right': {'required': True}, + 'bottom': {'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'}, + 'left': {'key': 'left', 'type': 'float'}, + 'top': {'key': 'top', 'type': 'float'}, + 'right': {'key': 'right', 'type': 'float'}, + 'bottom': {'key': 'bottom', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(NormalizedRectangle, self).__init__(**kwargs) + self.left = kwargs.get('left', None) + self.top = kwargs.get('top', None) + self.right = kwargs.get('right', None) + self.bottom = kwargs.get('bottom', None) + self._type = 'NormalizedRectangle' + + +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. + :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.imagesearch.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. + :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.imagesearch.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 PivotSuggestions(Model): + """Defines the pivot segment. + + All required parameters must be populated in order to send to Azure. + + :param pivot: Required. The segment from the original query to pivot on. + :type pivot: str + :param suggestions: Required. A list of suggested queries for the pivot. + :type suggestions: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + """ + + _validation = { + 'pivot': {'required': True}, + 'suggestions': {'required': True}, + } + + _attribute_map = { + 'pivot': {'key': 'pivot', 'type': 'str'}, + 'suggestions': {'key': 'suggestions', 'type': '[Query]'}, + } + + def __init__(self, **kwargs): + super(PivotSuggestions, self).__init__(**kwargs) + self.pivot = kwargs.get('pivot', None) + self.suggestions = kwargs.get('suggestions', None) + + +class Query(Model): + """Defines a search query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param text: Required. The query string. Use this string as the query term + in a new search request. + :type text: str + :ivar display_text: The display version of the query term. This version of + the query term may contain special characters that highlight the search + term found in the query string. The string contains the highlighting + characters only if the query enabled hit highlighting + :vartype display_text: str + :ivar web_search_url: The URL that takes the user to the Bing search + results page for the query.Only related search results include this field. + :vartype web_search_url: str + :ivar search_link: 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.imagesearch.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. + :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.imagesearch.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.imagesearch.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.imagesearch.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 RecognizedEntitiesModule(Model): + """Defines a list of previously recognized entities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of recognized entities. + :vartype value: + list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityGroup] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecognizedEntityGroup]'}, + } + + def __init__(self, **kwargs): + super(RecognizedEntitiesModule, self).__init__(**kwargs) + self.value = None + + +class RecognizedEntity(Response): + """Defines a recognized entity. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar entity: The entity that was recognized. The following are the + possible entity objects: Person + :vartype entity: ~azure.cognitiveservices.search.imagesearch.models.Thing + :ivar match_confidence: The confidence that Bing has that the entity in + the image matches this entity. The confidence ranges from 0.0 through 1.0 + with 1.0 being very confident. + :vartype match_confidence: float + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'entity': {'readonly': True}, + 'match_confidence': {'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'}, + 'entity': {'key': 'entity', 'type': 'Thing'}, + 'match_confidence': {'key': 'matchConfidence', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(RecognizedEntity, self).__init__(**kwargs) + self.entity = None + self.match_confidence = None + self._type = 'RecognizedEntity' + + +class RecognizedEntityGroup(Model): + """Defines a group of previously recognized entities. + + All required parameters must be populated in order to send to Azure. + + :param recognized_entity_regions: Required. The regions of the image that + contain entities. + :type recognized_entity_regions: + list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityRegion] + :param name: Required. The name of the group where images of the entity + were also found. The following are possible groups. + CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides + a higher probability of an accurate match. CelebrityAnnotations: Contains + celebrities such as actors, politicians, athletes, and historical figures. + :type name: str + """ + + _validation = { + 'recognized_entity_regions': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'recognized_entity_regions': {'key': 'recognizedEntityRegions', 'type': '[RecognizedEntityRegion]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RecognizedEntityGroup, self).__init__(**kwargs) + self.recognized_entity_regions = kwargs.get('recognized_entity_regions', None) + self.name = kwargs.get('name', None) + + +class RecognizedEntityRegion(Response): + """Defines a region of the image where an entity was found and a list of + entities that might match it. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar region: A region of the image that contains an entity. The values of + the rectangle are relative to the width and height of the original image + and are in the range 0.0 through 1.0. For example, if the image is 300x200 + and the region's top, left corner is at point (10, 20) and the bottom, + right corner is at point (290, 150), then the normalized rectangle is: + Left = 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom = + 0.75. For people, the region represents the person's face. + :vartype region: + ~azure.cognitiveservices.search.imagesearch.models.NormalizedRectangle + :ivar matching_entities: A list of entities that Bing believes match the + entity found in the region. The entities are in descending order of + confidence (see the matchConfidence field of RecognizedEntity). + :vartype matching_entities: + list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntity] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'region': {'readonly': True}, + 'matching_entities': {'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'}, + 'region': {'key': 'region', 'type': 'NormalizedRectangle'}, + 'matching_entities': {'key': 'matchingEntities', 'type': '[RecognizedEntity]'}, + } + + def __init__(self, **kwargs): + super(RecognizedEntityRegion, self).__init__(**kwargs) + self.region = None + self.matching_entities = None + self._type = 'RecognizedEntityRegion' + + +class RelatedCollectionsModule(Model): + """Defines a list of webpages that contain related images. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of webpages that contain related images. + :vartype value: + list[~azure.cognitiveservices.search.imagesearch.models.ImageGallery] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImageGallery]'}, + } + + def __init__(self, **kwargs): + super(RelatedCollectionsModule, 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.imagesearch.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 TrendingImages(Response): + """The top-level object that the response includes when a trending images + request succeeds. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :param categories: Required. A list that identifies categories of images + and a list of trending images in that category. + :type categories: + list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesCategory] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'categories': {'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'}, + 'categories': {'key': 'categories', 'type': '[TrendingImagesCategory]'}, + } + + def __init__(self, **kwargs): + super(TrendingImages, self).__init__(**kwargs) + self.categories = kwargs.get('categories', None) + self._type = 'TrendingImages' + + +class TrendingImagesCategory(Model): + """Defines the category of trending images. + + All required parameters must be populated in order to send to Azure. + + :param title: Required. The name of the image category. For example, + Popular People Searches. + :type title: str + :param tiles: Required. A list of images that are trending in the + category. Each tile contains an image and a URL that returns more images + of the subject. For example, if the category is Popular People Searches, + the image is of a popular person and the URL would return more images of + that person. + :type tiles: + list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesTile] + """ + + _validation = { + 'title': {'required': True}, + 'tiles': {'required': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'tiles': {'key': 'tiles', 'type': '[TrendingImagesTile]'}, + } + + def __init__(self, **kwargs): + super(TrendingImagesCategory, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.tiles = kwargs.get('tiles', None) + + +class TrendingImagesTile(Model): + """Defines an image tile. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. A query that returns a Bing search results page + with more images of the subject. For example, if the category is Popular + People Searches, then the thumbnail is of a popular person. The query + would return a Bing search results page with more images of that person. + :type query: ~azure.cognitiveservices.search.imagesearch.models.Query + :param image: Required. The image's thumbnail. + :type image: + ~azure.cognitiveservices.search.imagesearch.models.ImageObject + """ + + _validation = { + 'query': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'Query'}, + 'image': {'key': 'image', 'type': 'ImageObject'}, + } + + def __init__(self, **kwargs): + super(TrendingImagesTile, self).__init__(**kwargs) + self.query = kwargs.get('query', None) + self.image = kwargs.get('image', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models_py3.py new file mode 100644 index 000000000000..509a3e2a679f --- /dev/null +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/_models_py3.py @@ -0,0 +1,2703 @@ +# 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 could be returned at the root of a + response should inherit from this. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Answer, Thing, ErrorResponse, RecognizedEntity, + RecognizedEntityRegion, ImageInsights, TrendingImages + + 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. + :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': {'Answer': 'Answer', 'Thing': 'Thing', 'ErrorResponse': 'ErrorResponse', 'RecognizedEntity': 'RecognizedEntity', 'RecognizedEntityRegion': 'RecognizedEntityRegion', 'ImageInsights': 'ImageInsights', 'TrendingImages': 'TrendingImages'} + } + + 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: 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. + :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.imagesearch.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': {'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 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. + :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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. + :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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 Answer(Response): + """Defines an answer. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SearchResultsAnswer + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param _type: Required. Constant filled by server. + :type _type: str + :ivar id: A String identifier. + :vartype id: str + :ivar read_link: The URL that returns this resource. + :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': {'SearchResultsAnswer': 'SearchResultsAnswer'} + } + + def __init__(self, **kwargs) -> None: + super(Answer, self).__init__(**kwargs) + self._type = 'Answer' + + +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: MediaObject, Recipe, WebPage + + 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. + :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.imagesearch.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.imagesearch.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': {'MediaObject': 'MediaObject', 'Recipe': 'Recipe', 'WebPage': 'WebPage'} + } + + 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 WebPage(CreativeWork): + """Defines a webpage that is relevant to the query. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CollectionPage + + 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. + :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.imagesearch.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.imagesearch.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': {'CollectionPage': 'CollectionPage'} + } + + def __init__(self, **kwargs) -> None: + super(WebPage, self).__init__(**kwargs) + self._type = 'WebPage' + + +class CollectionPage(WebPage): + """Defines a link to a webpage that contains a collection. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ImageGallery + + 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. + :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.imagesearch.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.imagesearch.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': {'ImageGallery': 'ImageGallery'} + } + + def __init__(self, **kwargs) -> None: + super(CollectionPage, self).__init__(**kwargs) + self._type = 'CollectionPage' + + +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.imagesearch.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.imagesearch.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. + :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.imagesearch.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 ImageGallery(CollectionPage): + """Defines a link to a webpage that contains a collection of related images. + + 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. + :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.imagesearch.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.imagesearch.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 source: The publisher or social network where the images were found. + You must attribute the publisher as the source where the collection was + found. + :vartype source: str + :ivar images_count: The number of related images found in the collection. + :vartype images_count: long + :ivar followers_count: The number of users on the social network that + follow the creator. + :vartype followers_count: long + """ + + _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}, + 'source': {'readonly': True}, + 'images_count': {'readonly': True}, + 'followers_count': {'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'}, + 'source': {'key': 'source', 'type': 'str'}, + 'images_count': {'key': 'imagesCount', 'type': 'long'}, + 'followers_count': {'key': 'followersCount', 'type': 'long'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageGallery, self).__init__(**kwargs) + self.source = None + self.images_count = None + self.followers_count = None + self._type = 'ImageGallery' + + +class ImageInsights(Response): + """The top-level object that the response includes when an image insights + request succeeds. For information about requesting image insights, see the + [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken) + query parameter. The modules query parameter affects the fields that Bing + includes in the response. If you set + [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested) + to only Caption, then this object includes only the imageCaption field. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar image_insights_token: A token that you use in a subsequent call to + the Image Search API to get more information about the image. For + information about using this token, see the insightsToken query parameter. + This token has the same usage as the token in the Image object. + :vartype image_insights_token: str + :ivar best_representative_query: The query term that best represents the + image. Clicking the link in the Query object, takes the user to a webpage + with more pictures of the image. + :vartype best_representative_query: + ~azure.cognitiveservices.search.imagesearch.models.Query + :ivar image_caption: The caption to use for the image. + :vartype image_caption: + ~azure.cognitiveservices.search.imagesearch.models.ImageInsightsImageCaption + :ivar related_collections: A list of links to webpages that contain + related images. + :vartype related_collections: + ~azure.cognitiveservices.search.imagesearch.models.RelatedCollectionsModule + :ivar pages_including: A list of webpages that contain the image. To + access the webpage, use the URL in the image's hostPageUrl field. + :vartype pages_including: + ~azure.cognitiveservices.search.imagesearch.models.ImagesModule + :ivar shopping_sources: A list of merchants that offer items related to + the image. For example, if the image is of an apple pie, the list contains + merchants that are selling apple pies. + :vartype shopping_sources: + ~azure.cognitiveservices.search.imagesearch.models.AggregateOffer + :ivar related_searches: A list of related queries made by others. + :vartype related_searches: + ~azure.cognitiveservices.search.imagesearch.models.RelatedSearchesModule + :ivar recipes: A list of recipes related to the image. For example, if the + image is of an apple pie, the list contains recipes for making an apple + pie. + :vartype recipes: + ~azure.cognitiveservices.search.imagesearch.models.RecipesModule + :ivar visually_similar_images: A list of images that are visually similar + to the original image. For example, if the specified image is of a sunset + over a body of water, the list of similar images are of a sunset over a + body of water. If the specified image is of a person, similar images might + be of the same person or they might be of persons dressed similarly or in + a similar setting. The criteria for similarity continues to evolve. + :vartype visually_similar_images: + ~azure.cognitiveservices.search.imagesearch.models.ImagesModule + :ivar visually_similar_products: A list of images that contain products + that are visually similar to products found in the original image. For + example, if the specified image contains a dress, the list of similar + images contain a dress. The image provides summary information about + offers that Bing found online for the product. + :vartype visually_similar_products: + ~azure.cognitiveservices.search.imagesearch.models.ImagesModule + :ivar recognized_entity_groups: A list of groups that contain images of + entities that match the entity found in the specified image. For example, + the response might include images from the general celebrity group if the + entity was recognized in that group. + :vartype recognized_entity_groups: + ~azure.cognitiveservices.search.imagesearch.models.RecognizedEntitiesModule + :ivar image_tags: A list of characteristics of the content found in the + image. For example, if the image is of a person, the tags might indicate + the person's gender and the type of clothes they're wearing. + :vartype image_tags: + ~azure.cognitiveservices.search.imagesearch.models.ImageTagsModule + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'image_insights_token': {'readonly': True}, + 'best_representative_query': {'readonly': True}, + 'image_caption': {'readonly': True}, + 'related_collections': {'readonly': True}, + 'pages_including': {'readonly': True}, + 'shopping_sources': {'readonly': True}, + 'related_searches': {'readonly': True}, + 'recipes': {'readonly': True}, + 'visually_similar_images': {'readonly': True}, + 'visually_similar_products': {'readonly': True}, + 'recognized_entity_groups': {'readonly': True}, + 'image_tags': {'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'}, + 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, + 'best_representative_query': {'key': 'bestRepresentativeQuery', 'type': 'Query'}, + 'image_caption': {'key': 'imageCaption', 'type': 'ImageInsightsImageCaption'}, + 'related_collections': {'key': 'relatedCollections', 'type': 'RelatedCollectionsModule'}, + 'pages_including': {'key': 'pagesIncluding', 'type': 'ImagesModule'}, + 'shopping_sources': {'key': 'shoppingSources', 'type': 'AggregateOffer'}, + 'related_searches': {'key': 'relatedSearches', 'type': 'RelatedSearchesModule'}, + 'recipes': {'key': 'recipes', 'type': 'RecipesModule'}, + 'visually_similar_images': {'key': 'visuallySimilarImages', 'type': 'ImagesModule'}, + 'visually_similar_products': {'key': 'visuallySimilarProducts', 'type': 'ImagesModule'}, + 'recognized_entity_groups': {'key': 'recognizedEntityGroups', 'type': 'RecognizedEntitiesModule'}, + 'image_tags': {'key': 'imageTags', 'type': 'ImageTagsModule'}, + } + + def __init__(self, **kwargs) -> None: + super(ImageInsights, self).__init__(**kwargs) + self.image_insights_token = None + self.best_representative_query = None + self.image_caption = None + self.related_collections = None + self.pages_including = None + self.shopping_sources = None + self.related_searches = None + self.recipes = None + self.visually_similar_images = None + self.visually_similar_products = None + self.recognized_entity_groups = None + self.image_tags = None + self._type = 'ImageInsights' + + +class ImageInsightsImageCaption(Model): + """Defines an image's caption. + + All required parameters must be populated in order to send to Azure. + + :param caption: Required. A caption about the image. + :type caption: str + :param data_source_url: Required. The URL to the website where the caption + was found. You must attribute the caption to the source. For example, by + displaying the domain name from the URL next to the caption and using the + URL to link to the source website. + :type data_source_url: str + :param related_searches: Required. A list of entities found in the + caption. Use the contents of the Query object to find the entity in the + caption and create a link. The link takes the user to images of the + entity. + :type related_searches: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + """ + + _validation = { + 'caption': {'required': True}, + 'data_source_url': {'required': True}, + 'related_searches': {'required': True}, + } + + _attribute_map = { + 'caption': {'key': 'caption', 'type': 'str'}, + 'data_source_url': {'key': 'dataSourceUrl', 'type': 'str'}, + 'related_searches': {'key': 'relatedSearches', 'type': '[Query]'}, + } + + def __init__(self, *, caption: str, data_source_url: str, related_searches, **kwargs) -> None: + super(ImageInsightsImageCaption, self).__init__(**kwargs) + self.caption = caption + self.data_source_url = data_source_url + self.related_searches = related_searches + + +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. + :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. + :vartype width: int + :ivar height: The height of the source media object, in pixels. + :vartype height: int + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + '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. + :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. + :vartype width: int + :ivar height: The height of the source media object, in pixels. + :vartype height: int + :ivar thumbnail: The URL to a thumbnail of the image + :vartype thumbnail: + ~azure.cognitiveservices.search.imagesearch.models.ImageObject + :ivar image_insights_token: The token that you use in a subsequent call to + the Image Search API to get additional information about the image. For + information about using this token, see the insightsToken query 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 to get the + list of websites. + :vartype insights_metadata: + ~azure.cognitiveservices.search.imagesearch.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: Visual representation of the image. Used for getting + more sizes + :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 SearchResultsAnswer(Answer): + """Defines a search result answer. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: Images + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar total_estimated_matches: The estimated number of webpages that are + relevant to the query. Use this number along with the count and offset + query parameters to page the results. + :vartype total_estimated_matches: long + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'total_estimated_matches': {'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'}, + 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, + } + + _subtype_map = { + '_type': {'Images': 'Images'} + } + + def __init__(self, **kwargs) -> None: + super(SearchResultsAnswer, self).__init__(**kwargs) + self.total_estimated_matches = None + self._type = 'SearchResultsAnswer' + + +class Images(SearchResultsAnswer): + """Defines an image answer. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param _type: Required. Constant filled by server. + :type _type: str + :ivar id: A String identifier. + :vartype id: str + :ivar read_link: The URL that returns this resource. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar total_estimated_matches: The estimated number of webpages that are + relevant to the query. Use this number along with the count and offset + query parameters to page the results. + :vartype total_estimated_matches: long + :ivar next_offset: Used as part of deduping. Tells client the next offset + that client should use in the next pagination request + :vartype next_offset: int + :param value: Required. A list of image objects that are relevant to the + query. If there are no results, the List is empty. + :type value: + list[~azure.cognitiveservices.search.imagesearch.models.ImageObject] + :ivar query_expansions: A list of expanded queries that narrows the + original query. For example, if the query was Microsoft Surface, the + expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, + Microsoft Surface Phone, and Microsoft Surface Hub. + :vartype query_expansions: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + :ivar pivot_suggestions: A list of segments in the original query. For + example, if the query was Red Flowers, Bing might segment the query into + Red and Flowers. The Flowers pivot may contain query suggestions such as + Red Peonies and Red Daisies, and the Red pivot may contain query + suggestions such as Green Flowers and Yellow Flowers. + :vartype pivot_suggestions: + list[~azure.cognitiveservices.search.imagesearch.models.PivotSuggestions] + :ivar similar_terms: A list of terms that are similar in meaning to the + user's query term. + :vartype similar_terms: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'total_estimated_matches': {'readonly': True}, + 'next_offset': {'readonly': True}, + 'value': {'required': True}, + 'query_expansions': {'readonly': True}, + 'pivot_suggestions': {'readonly': True}, + 'similar_terms': {'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'}, + 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, + 'next_offset': {'key': 'nextOffset', 'type': 'int'}, + 'value': {'key': 'value', 'type': '[ImageObject]'}, + 'query_expansions': {'key': 'queryExpansions', 'type': '[Query]'}, + 'pivot_suggestions': {'key': 'pivotSuggestions', 'type': '[PivotSuggestions]'}, + 'similar_terms': {'key': 'similarTerms', 'type': '[Query]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(Images, self).__init__(**kwargs) + self.next_offset = None + self.value = value + self.query_expansions = None + self.pivot_suggestions = None + self.similar_terms = None + self._type = 'Images' + + +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 offer goods of + 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.imagesearch.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.imagesearch.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 ImageTagsModule(Model): + """Defines the characteristics of content found in an image. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of tags that describe the characteristics + of the content found in the image. For example, if the image is of a + musical artist, the list might include Female, Dress, and Music to + indicate the person is female music artist that's wearing a dress. + :type value: + list[~azure.cognitiveservices.search.imagesearch.models.InsightsTag] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InsightsTag]'}, + } + + def __init__(self, *, value, **kwargs) -> None: + super(ImageTagsModule, self).__init__(**kwargs) + self.value = value + + +class InsightsTag(Model): + """Defines a characteristic of the content found in the image. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the characteristic. For example, cat, kitty, + calico cat. + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(InsightsTag, self).__init__(**kwargs) + self.name = 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. + :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.imagesearch.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 StructuredValue(Intangible): + """StructuredValue. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: NormalizedRectangle + + 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. + :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.imagesearch.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': {'NormalizedRectangle': 'NormalizedRectangle'} + } + + def __init__(self, **kwargs) -> None: + super(StructuredValue, self).__init__(**kwargs) + self._type = 'StructuredValue' + + +class NormalizedRectangle(StructuredValue): + """Defines a region of an image. The region is defined by the coordinates of + the top, left corner and bottom, right corner of the region. 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. + :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.imagesearch.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 left: Required. The left coordinate. + :type left: float + :param top: Required. The top coordinate + :type top: float + :param right: Required. The right coordinate + :type right: float + :param bottom: Required. The bottom coordinate + :type bottom: 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}, + 'left': {'required': True}, + 'top': {'required': True}, + 'right': {'required': True}, + 'bottom': {'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'}, + 'left': {'key': 'left', 'type': 'float'}, + 'top': {'key': 'top', 'type': 'float'}, + 'right': {'key': 'right', 'type': 'float'}, + 'bottom': {'key': 'bottom', 'type': 'float'}, + } + + def __init__(self, *, left: float, top: float, right: float, bottom: float, **kwargs) -> None: + super(NormalizedRectangle, self).__init__(**kwargs) + self.left = left + self.top = top + self.right = right + self.bottom = bottom + self._type = 'NormalizedRectangle' + + +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. + :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.imagesearch.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. + :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.imagesearch.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 PivotSuggestions(Model): + """Defines the pivot segment. + + All required parameters must be populated in order to send to Azure. + + :param pivot: Required. The segment from the original query to pivot on. + :type pivot: str + :param suggestions: Required. A list of suggested queries for the pivot. + :type suggestions: + list[~azure.cognitiveservices.search.imagesearch.models.Query] + """ + + _validation = { + 'pivot': {'required': True}, + 'suggestions': {'required': True}, + } + + _attribute_map = { + 'pivot': {'key': 'pivot', 'type': 'str'}, + 'suggestions': {'key': 'suggestions', 'type': '[Query]'}, + } + + def __init__(self, *, pivot: str, suggestions, **kwargs) -> None: + super(PivotSuggestions, self).__init__(**kwargs) + self.pivot = pivot + self.suggestions = suggestions + + +class Query(Model): + """Defines a search query. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param text: Required. The query string. Use this string as the query term + in a new search request. + :type text: str + :ivar display_text: The display version of the query term. This version of + the query term may contain special characters that highlight the search + term found in the query string. The string contains the highlighting + characters only if the query enabled hit highlighting + :vartype display_text: str + :ivar web_search_url: The URL that takes the user to the Bing search + results page for the query.Only related search results include this field. + :vartype web_search_url: str + :ivar search_link: 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.imagesearch.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. + :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.imagesearch.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.imagesearch.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.imagesearch.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 RecognizedEntitiesModule(Model): + """Defines a list of previously recognized entities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of recognized entities. + :vartype value: + list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityGroup] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RecognizedEntityGroup]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecognizedEntitiesModule, self).__init__(**kwargs) + self.value = None + + +class RecognizedEntity(Response): + """Defines a recognized entity. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar entity: The entity that was recognized. The following are the + possible entity objects: Person + :vartype entity: ~azure.cognitiveservices.search.imagesearch.models.Thing + :ivar match_confidence: The confidence that Bing has that the entity in + the image matches this entity. The confidence ranges from 0.0 through 1.0 + with 1.0 being very confident. + :vartype match_confidence: float + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'entity': {'readonly': True}, + 'match_confidence': {'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'}, + 'entity': {'key': 'entity', 'type': 'Thing'}, + 'match_confidence': {'key': 'matchConfidence', 'type': 'float'}, + } + + def __init__(self, **kwargs) -> None: + super(RecognizedEntity, self).__init__(**kwargs) + self.entity = None + self.match_confidence = None + self._type = 'RecognizedEntity' + + +class RecognizedEntityGroup(Model): + """Defines a group of previously recognized entities. + + All required parameters must be populated in order to send to Azure. + + :param recognized_entity_regions: Required. The regions of the image that + contain entities. + :type recognized_entity_regions: + list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityRegion] + :param name: Required. The name of the group where images of the entity + were also found. The following are possible groups. + CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides + a higher probability of an accurate match. CelebrityAnnotations: Contains + celebrities such as actors, politicians, athletes, and historical figures. + :type name: str + """ + + _validation = { + 'recognized_entity_regions': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'recognized_entity_regions': {'key': 'recognizedEntityRegions', 'type': '[RecognizedEntityRegion]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, recognized_entity_regions, name: str, **kwargs) -> None: + super(RecognizedEntityGroup, self).__init__(**kwargs) + self.recognized_entity_regions = recognized_entity_regions + self.name = name + + +class RecognizedEntityRegion(Response): + """Defines a region of the image where an entity was found and a list of + entities that might match it. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :ivar region: A region of the image that contains an entity. The values of + the rectangle are relative to the width and height of the original image + and are in the range 0.0 through 1.0. For example, if the image is 300x200 + and the region's top, left corner is at point (10, 20) and the bottom, + right corner is at point (290, 150), then the normalized rectangle is: + Left = 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom = + 0.75. For people, the region represents the person's face. + :vartype region: + ~azure.cognitiveservices.search.imagesearch.models.NormalizedRectangle + :ivar matching_entities: A list of entities that Bing believes match the + entity found in the region. The entities are in descending order of + confidence (see the matchConfidence field of RecognizedEntity). + :vartype matching_entities: + list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntity] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'region': {'readonly': True}, + 'matching_entities': {'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'}, + 'region': {'key': 'region', 'type': 'NormalizedRectangle'}, + 'matching_entities': {'key': 'matchingEntities', 'type': '[RecognizedEntity]'}, + } + + def __init__(self, **kwargs) -> None: + super(RecognizedEntityRegion, self).__init__(**kwargs) + self.region = None + self.matching_entities = None + self._type = 'RecognizedEntityRegion' + + +class RelatedCollectionsModule(Model): + """Defines a list of webpages that contain related images. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: A list of webpages that contain related images. + :vartype value: + list[~azure.cognitiveservices.search.imagesearch.models.ImageGallery] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImageGallery]'}, + } + + def __init__(self, **kwargs) -> None: + super(RelatedCollectionsModule, 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.imagesearch.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 TrendingImages(Response): + """The top-level object that the response includes when a trending images + request succeeds. + + 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. + :vartype read_link: str + :ivar web_search_url: The URL To Bing's search result for this item. + :vartype web_search_url: str + :param categories: Required. A list that identifies categories of images + and a list of trending images in that category. + :type categories: + list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesCategory] + """ + + _validation = { + '_type': {'required': True}, + 'id': {'readonly': True}, + 'read_link': {'readonly': True}, + 'web_search_url': {'readonly': True}, + 'categories': {'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'}, + 'categories': {'key': 'categories', 'type': '[TrendingImagesCategory]'}, + } + + def __init__(self, *, categories, **kwargs) -> None: + super(TrendingImages, self).__init__(**kwargs) + self.categories = categories + self._type = 'TrendingImages' + + +class TrendingImagesCategory(Model): + """Defines the category of trending images. + + All required parameters must be populated in order to send to Azure. + + :param title: Required. The name of the image category. For example, + Popular People Searches. + :type title: str + :param tiles: Required. A list of images that are trending in the + category. Each tile contains an image and a URL that returns more images + of the subject. For example, if the category is Popular People Searches, + the image is of a popular person and the URL would return more images of + that person. + :type tiles: + list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesTile] + """ + + _validation = { + 'title': {'required': True}, + 'tiles': {'required': True}, + } + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'tiles': {'key': 'tiles', 'type': '[TrendingImagesTile]'}, + } + + def __init__(self, *, title: str, tiles, **kwargs) -> None: + super(TrendingImagesCategory, self).__init__(**kwargs) + self.title = title + self.tiles = tiles + + +class TrendingImagesTile(Model): + """Defines an image tile. + + All required parameters must be populated in order to send to Azure. + + :param query: Required. A query that returns a Bing search results page + with more images of the subject. For example, if the category is Popular + People Searches, then the thumbnail is of a popular person. The query + would return a Bing search results page with more images of that person. + :type query: ~azure.cognitiveservices.search.imagesearch.models.Query + :param image: Required. The image's thumbnail. + :type image: + ~azure.cognitiveservices.search.imagesearch.models.ImageObject + """ + + _validation = { + 'query': {'required': True}, + 'image': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'Query'}, + 'image': {'key': 'image', 'type': 'ImageObject'}, + } + + def __init__(self, *, query, image, **kwargs) -> None: + super(TrendingImagesTile, self).__init__(**kwargs) + self.query = query + self.image = image diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer.py deleted file mode 100644 index ec7a2c53d066..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer.py +++ /dev/null @@ -1,133 +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. - :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer_py3.py deleted file mode 100644 index c47117c42873..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_offer_py3.py +++ /dev/null @@ -1,133 +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. - :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_rating.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_rating.py deleted file mode 100644 index 288a2a2d0ea4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_rating_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/aggregate_rating_py3.py deleted file mode 100644 index ec4fe8aec9f7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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 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-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer.py deleted file mode 100644 index d3c464d0ffc7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer.py +++ /dev/null @@ -1,56 +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 Answer(Response): - """Defines an answer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SearchResultsAnswer - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param _type: Required. Constant filled by server. - :type _type: str - :ivar id: A String identifier. - :vartype id: str - :ivar read_link: The URL that returns this resource. - :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': {'SearchResultsAnswer': 'SearchResultsAnswer'} - } - - def __init__(self, **kwargs): - super(Answer, self).__init__(**kwargs) - self._type = 'Answer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer_py3.py deleted file mode 100644 index d7d5df488ee5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/answer_py3.py +++ /dev/null @@ -1,56 +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 Answer(Response): - """Defines an answer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: SearchResultsAnswer - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param _type: Required. Constant filled by server. - :type _type: str - :ivar id: A String identifier. - :vartype id: str - :ivar read_link: The URL that returns this resource. - :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': {'SearchResultsAnswer': 'SearchResultsAnswer'} - } - - def __init__(self, **kwargs) -> None: - super(Answer, self).__init__(**kwargs) - self._type = 'Answer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page.py deleted file mode 100644 index a94de2ed640d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page.py +++ /dev/null @@ -1,99 +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 .web_page import WebPage - - -class CollectionPage(WebPage): - """Defines a link to a webpage that contains a collection. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageGallery - - 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. - :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.imagesearch.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.imagesearch.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': {'ImageGallery': 'ImageGallery'} - } - - def __init__(self, **kwargs): - super(CollectionPage, self).__init__(**kwargs) - self._type = 'CollectionPage' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page_py3.py deleted file mode 100644 index 94b42baa7a74..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/collection_page_py3.py +++ /dev/null @@ -1,99 +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 .web_page import WebPage - - -class CollectionPage(WebPage): - """Defines a link to a webpage that contains a collection. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: ImageGallery - - 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. - :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.imagesearch.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.imagesearch.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': {'ImageGallery': 'ImageGallery'} - } - - def __init__(self, **kwargs) -> None: - super(CollectionPage, self).__init__(**kwargs) - self._type = 'CollectionPage' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work.py deleted file mode 100644 index d9f42656bdde..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work.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 .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: MediaObject, Recipe, WebPage - - 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. - :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.imagesearch.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.imagesearch.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': {'MediaObject': 'MediaObject', 'Recipe': 'Recipe', 'WebPage': 'WebPage'} - } - - 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-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work_py3.py deleted file mode 100644 index cc4b45c27e1d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/creative_work_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 .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: MediaObject, Recipe, WebPage - - 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. - :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.imagesearch.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.imagesearch.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': {'MediaObject': 'MediaObject', 'Recipe': 'Recipe', 'WebPage': 'WebPage'} - } - - 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-imagesearch/azure/cognitiveservices/search/imagesearch/models/error.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error.py deleted file mode 100644 index 9b7b2cb42b2f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_py3.py deleted file mode 100644 index 30270cc26758..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response.py deleted file mode 100644 index afd3e0c64eb0..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response.py +++ /dev/null @@ -1,69 +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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response_py3.py deleted file mode 100644 index f3e9d9de27fe..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/error_response_py3.py +++ /dev/null @@ -1,69 +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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/identifiable.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/identifiable.py deleted file mode 100644 index 513e53d238bb..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/models/identifiable_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/identifiable_py3.py deleted file mode 100644 index c87dc0347e3d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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 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-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery.py deleted file mode 100644 index 54573b4d0a5a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery.py +++ /dev/null @@ -1,110 +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 .collection_page import CollectionPage - - -class ImageGallery(CollectionPage): - """Defines a link to a webpage that contains a collection of related images. - - 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. - :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.imagesearch.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.imagesearch.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 source: The publisher or social network where the images were found. - You must attribute the publisher as the source where the collection was - found. - :vartype source: str - :ivar images_count: The number of related images found in the collection. - :vartype images_count: long - :ivar followers_count: The number of users on the social network that - follow the creator. - :vartype followers_count: long - """ - - _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}, - 'source': {'readonly': True}, - 'images_count': {'readonly': True}, - 'followers_count': {'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'}, - 'source': {'key': 'source', 'type': 'str'}, - 'images_count': {'key': 'imagesCount', 'type': 'long'}, - 'followers_count': {'key': 'followersCount', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(ImageGallery, self).__init__(**kwargs) - self.source = None - self.images_count = None - self.followers_count = None - self._type = 'ImageGallery' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery_py3.py deleted file mode 100644 index c000f3a264f7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_gallery_py3.py +++ /dev/null @@ -1,110 +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 .collection_page import CollectionPage - - -class ImageGallery(CollectionPage): - """Defines a link to a webpage that contains a collection of related images. - - 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. - :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.imagesearch.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.imagesearch.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 source: The publisher or social network where the images were found. - You must attribute the publisher as the source where the collection was - found. - :vartype source: str - :ivar images_count: The number of related images found in the collection. - :vartype images_count: long - :ivar followers_count: The number of users on the social network that - follow the creator. - :vartype followers_count: long - """ - - _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}, - 'source': {'readonly': True}, - 'images_count': {'readonly': True}, - 'followers_count': {'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'}, - 'source': {'key': 'source', 'type': 'str'}, - 'images_count': {'key': 'imagesCount', 'type': 'long'}, - 'followers_count': {'key': 'followersCount', 'type': 'long'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageGallery, self).__init__(**kwargs) - self.source = None - self.images_count = None - self.followers_count = None - self._type = 'ImageGallery' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights.py deleted file mode 100644 index 7965e97519b7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights.py +++ /dev/null @@ -1,151 +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 ImageInsights(Response): - """The top-level object that the response includes when an image insights - request succeeds. For information about requesting image insights, see the - [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken) - query parameter. The modules query parameter affects the fields that Bing - includes in the response. If you set - [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested) - to only Caption, then this object includes only the imageCaption field. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar image_insights_token: A token that you use in a subsequent call to - the Image Search API to get more information about the image. For - information about using this token, see the insightsToken query parameter. - This token has the same usage as the token in the Image object. - :vartype image_insights_token: str - :ivar best_representative_query: The query term that best represents the - image. Clicking the link in the Query object, takes the user to a webpage - with more pictures of the image. - :vartype best_representative_query: - ~azure.cognitiveservices.search.imagesearch.models.Query - :ivar image_caption: The caption to use for the image. - :vartype image_caption: - ~azure.cognitiveservices.search.imagesearch.models.ImageInsightsImageCaption - :ivar related_collections: A list of links to webpages that contain - related images. - :vartype related_collections: - ~azure.cognitiveservices.search.imagesearch.models.RelatedCollectionsModule - :ivar pages_including: A list of webpages that contain the image. To - access the webpage, use the URL in the image's hostPageUrl field. - :vartype pages_including: - ~azure.cognitiveservices.search.imagesearch.models.ImagesModule - :ivar shopping_sources: A list of merchants that offer items related to - the image. For example, if the image is of an apple pie, the list contains - merchants that are selling apple pies. - :vartype shopping_sources: - ~azure.cognitiveservices.search.imagesearch.models.AggregateOffer - :ivar related_searches: A list of related queries made by others. - :vartype related_searches: - ~azure.cognitiveservices.search.imagesearch.models.RelatedSearchesModule - :ivar recipes: A list of recipes related to the image. For example, if the - image is of an apple pie, the list contains recipes for making an apple - pie. - :vartype recipes: - ~azure.cognitiveservices.search.imagesearch.models.RecipesModule - :ivar visually_similar_images: A list of images that are visually similar - to the original image. For example, if the specified image is of a sunset - over a body of water, the list of similar images are of a sunset over a - body of water. If the specified image is of a person, similar images might - be of the same person or they might be of persons dressed similarly or in - a similar setting. The criteria for similarity continues to evolve. - :vartype visually_similar_images: - ~azure.cognitiveservices.search.imagesearch.models.ImagesModule - :ivar visually_similar_products: A list of images that contain products - that are visually similar to products found in the original image. For - example, if the specified image contains a dress, the list of similar - images contain a dress. The image provides summary information about - offers that Bing found online for the product. - :vartype visually_similar_products: - ~azure.cognitiveservices.search.imagesearch.models.ImagesModule - :ivar recognized_entity_groups: A list of groups that contain images of - entities that match the entity found in the specified image. For example, - the response might include images from the general celebrity group if the - entity was recognized in that group. - :vartype recognized_entity_groups: - ~azure.cognitiveservices.search.imagesearch.models.RecognizedEntitiesModule - :ivar image_tags: A list of characteristics of the content found in the - image. For example, if the image is of a person, the tags might indicate - the person's gender and the type of clothes they're wearing. - :vartype image_tags: - ~azure.cognitiveservices.search.imagesearch.models.ImageTagsModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'image_insights_token': {'readonly': True}, - 'best_representative_query': {'readonly': True}, - 'image_caption': {'readonly': True}, - 'related_collections': {'readonly': True}, - 'pages_including': {'readonly': True}, - 'shopping_sources': {'readonly': True}, - 'related_searches': {'readonly': True}, - 'recipes': {'readonly': True}, - 'visually_similar_images': {'readonly': True}, - 'visually_similar_products': {'readonly': True}, - 'recognized_entity_groups': {'readonly': True}, - 'image_tags': {'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'}, - 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, - 'best_representative_query': {'key': 'bestRepresentativeQuery', 'type': 'Query'}, - 'image_caption': {'key': 'imageCaption', 'type': 'ImageInsightsImageCaption'}, - 'related_collections': {'key': 'relatedCollections', 'type': 'RelatedCollectionsModule'}, - 'pages_including': {'key': 'pagesIncluding', 'type': 'ImagesModule'}, - 'shopping_sources': {'key': 'shoppingSources', 'type': 'AggregateOffer'}, - 'related_searches': {'key': 'relatedSearches', 'type': 'RelatedSearchesModule'}, - 'recipes': {'key': 'recipes', 'type': 'RecipesModule'}, - 'visually_similar_images': {'key': 'visuallySimilarImages', 'type': 'ImagesModule'}, - 'visually_similar_products': {'key': 'visuallySimilarProducts', 'type': 'ImagesModule'}, - 'recognized_entity_groups': {'key': 'recognizedEntityGroups', 'type': 'RecognizedEntitiesModule'}, - 'image_tags': {'key': 'imageTags', 'type': 'ImageTagsModule'}, - } - - def __init__(self, **kwargs): - super(ImageInsights, self).__init__(**kwargs) - self.image_insights_token = None - self.best_representative_query = None - self.image_caption = None - self.related_collections = None - self.pages_including = None - self.shopping_sources = None - self.related_searches = None - self.recipes = None - self.visually_similar_images = None - self.visually_similar_products = None - self.recognized_entity_groups = None - self.image_tags = None - self._type = 'ImageInsights' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption.py deleted file mode 100644 index dc28e5ea5db5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption.py +++ /dev/null @@ -1,51 +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 ImageInsightsImageCaption(Model): - """Defines an image's caption. - - All required parameters must be populated in order to send to Azure. - - :param caption: Required. A caption about the image. - :type caption: str - :param data_source_url: Required. The URL to the website where the caption - was found. You must attribute the caption to the source. For example, by - displaying the domain name from the URL next to the caption and using the - URL to link to the source website. - :type data_source_url: str - :param related_searches: Required. A list of entities found in the - caption. Use the contents of the Query object to find the entity in the - caption and create a link. The link takes the user to images of the - entity. - :type related_searches: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - """ - - _validation = { - 'caption': {'required': True}, - 'data_source_url': {'required': True}, - 'related_searches': {'required': True}, - } - - _attribute_map = { - 'caption': {'key': 'caption', 'type': 'str'}, - 'data_source_url': {'key': 'dataSourceUrl', 'type': 'str'}, - 'related_searches': {'key': 'relatedSearches', 'type': '[Query]'}, - } - - def __init__(self, **kwargs): - super(ImageInsightsImageCaption, self).__init__(**kwargs) - self.caption = kwargs.get('caption', None) - self.data_source_url = kwargs.get('data_source_url', None) - self.related_searches = kwargs.get('related_searches', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption_py3.py deleted file mode 100644 index a116df059251..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_image_caption_py3.py +++ /dev/null @@ -1,51 +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 ImageInsightsImageCaption(Model): - """Defines an image's caption. - - All required parameters must be populated in order to send to Azure. - - :param caption: Required. A caption about the image. - :type caption: str - :param data_source_url: Required. The URL to the website where the caption - was found. You must attribute the caption to the source. For example, by - displaying the domain name from the URL next to the caption and using the - URL to link to the source website. - :type data_source_url: str - :param related_searches: Required. A list of entities found in the - caption. Use the contents of the Query object to find the entity in the - caption and create a link. The link takes the user to images of the - entity. - :type related_searches: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - """ - - _validation = { - 'caption': {'required': True}, - 'data_source_url': {'required': True}, - 'related_searches': {'required': True}, - } - - _attribute_map = { - 'caption': {'key': 'caption', 'type': 'str'}, - 'data_source_url': {'key': 'dataSourceUrl', 'type': 'str'}, - 'related_searches': {'key': 'relatedSearches', 'type': '[Query]'}, - } - - def __init__(self, *, caption: str, data_source_url: str, related_searches, **kwargs) -> None: - super(ImageInsightsImageCaption, self).__init__(**kwargs) - self.caption = caption - self.data_source_url = data_source_url - self.related_searches = related_searches diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_py3.py deleted file mode 100644 index d65240f36067..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_insights_py3.py +++ /dev/null @@ -1,151 +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 ImageInsights(Response): - """The top-level object that the response includes when an image insights - request succeeds. For information about requesting image insights, see the - [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken) - query parameter. The modules query parameter affects the fields that Bing - includes in the response. If you set - [modules](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#modulesrequested) - to only Caption, then this object includes only the imageCaption field. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar image_insights_token: A token that you use in a subsequent call to - the Image Search API to get more information about the image. For - information about using this token, see the insightsToken query parameter. - This token has the same usage as the token in the Image object. - :vartype image_insights_token: str - :ivar best_representative_query: The query term that best represents the - image. Clicking the link in the Query object, takes the user to a webpage - with more pictures of the image. - :vartype best_representative_query: - ~azure.cognitiveservices.search.imagesearch.models.Query - :ivar image_caption: The caption to use for the image. - :vartype image_caption: - ~azure.cognitiveservices.search.imagesearch.models.ImageInsightsImageCaption - :ivar related_collections: A list of links to webpages that contain - related images. - :vartype related_collections: - ~azure.cognitiveservices.search.imagesearch.models.RelatedCollectionsModule - :ivar pages_including: A list of webpages that contain the image. To - access the webpage, use the URL in the image's hostPageUrl field. - :vartype pages_including: - ~azure.cognitiveservices.search.imagesearch.models.ImagesModule - :ivar shopping_sources: A list of merchants that offer items related to - the image. For example, if the image is of an apple pie, the list contains - merchants that are selling apple pies. - :vartype shopping_sources: - ~azure.cognitiveservices.search.imagesearch.models.AggregateOffer - :ivar related_searches: A list of related queries made by others. - :vartype related_searches: - ~azure.cognitiveservices.search.imagesearch.models.RelatedSearchesModule - :ivar recipes: A list of recipes related to the image. For example, if the - image is of an apple pie, the list contains recipes for making an apple - pie. - :vartype recipes: - ~azure.cognitiveservices.search.imagesearch.models.RecipesModule - :ivar visually_similar_images: A list of images that are visually similar - to the original image. For example, if the specified image is of a sunset - over a body of water, the list of similar images are of a sunset over a - body of water. If the specified image is of a person, similar images might - be of the same person or they might be of persons dressed similarly or in - a similar setting. The criteria for similarity continues to evolve. - :vartype visually_similar_images: - ~azure.cognitiveservices.search.imagesearch.models.ImagesModule - :ivar visually_similar_products: A list of images that contain products - that are visually similar to products found in the original image. For - example, if the specified image contains a dress, the list of similar - images contain a dress. The image provides summary information about - offers that Bing found online for the product. - :vartype visually_similar_products: - ~azure.cognitiveservices.search.imagesearch.models.ImagesModule - :ivar recognized_entity_groups: A list of groups that contain images of - entities that match the entity found in the specified image. For example, - the response might include images from the general celebrity group if the - entity was recognized in that group. - :vartype recognized_entity_groups: - ~azure.cognitiveservices.search.imagesearch.models.RecognizedEntitiesModule - :ivar image_tags: A list of characteristics of the content found in the - image. For example, if the image is of a person, the tags might indicate - the person's gender and the type of clothes they're wearing. - :vartype image_tags: - ~azure.cognitiveservices.search.imagesearch.models.ImageTagsModule - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'image_insights_token': {'readonly': True}, - 'best_representative_query': {'readonly': True}, - 'image_caption': {'readonly': True}, - 'related_collections': {'readonly': True}, - 'pages_including': {'readonly': True}, - 'shopping_sources': {'readonly': True}, - 'related_searches': {'readonly': True}, - 'recipes': {'readonly': True}, - 'visually_similar_images': {'readonly': True}, - 'visually_similar_products': {'readonly': True}, - 'recognized_entity_groups': {'readonly': True}, - 'image_tags': {'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'}, - 'image_insights_token': {'key': 'imageInsightsToken', 'type': 'str'}, - 'best_representative_query': {'key': 'bestRepresentativeQuery', 'type': 'Query'}, - 'image_caption': {'key': 'imageCaption', 'type': 'ImageInsightsImageCaption'}, - 'related_collections': {'key': 'relatedCollections', 'type': 'RelatedCollectionsModule'}, - 'pages_including': {'key': 'pagesIncluding', 'type': 'ImagesModule'}, - 'shopping_sources': {'key': 'shoppingSources', 'type': 'AggregateOffer'}, - 'related_searches': {'key': 'relatedSearches', 'type': 'RelatedSearchesModule'}, - 'recipes': {'key': 'recipes', 'type': 'RecipesModule'}, - 'visually_similar_images': {'key': 'visuallySimilarImages', 'type': 'ImagesModule'}, - 'visually_similar_products': {'key': 'visuallySimilarProducts', 'type': 'ImagesModule'}, - 'recognized_entity_groups': {'key': 'recognizedEntityGroups', 'type': 'RecognizedEntitiesModule'}, - 'image_tags': {'key': 'imageTags', 'type': 'ImageTagsModule'}, - } - - def __init__(self, **kwargs) -> None: - super(ImageInsights, self).__init__(**kwargs) - self.image_insights_token = None - self.best_representative_query = None - self.image_caption = None - self.related_collections = None - self.pages_including = None - self.shopping_sources = None - self.related_searches = None - self.recipes = None - self.visually_similar_images = None - self.visually_similar_products = None - self.recognized_entity_groups = None - self.image_tags = None - self._type = 'ImageInsights' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object.py deleted file mode 100644 index 21d511be51cd..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object.py +++ /dev/null @@ -1,166 +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. - :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. - :vartype width: int - :ivar height: The height of the source media object, in pixels. - :vartype height: int - :ivar thumbnail: The URL to a thumbnail of the image - :vartype thumbnail: - ~azure.cognitiveservices.search.imagesearch.models.ImageObject - :ivar image_insights_token: The token that you use in a subsequent call to - the Image Search API to get additional information about the image. For - information about using this token, see the insightsToken query 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 imageInisghtsToken to get the - list of websites. - :vartype insights_metadata: - ~azure.cognitiveservices.search.imagesearch.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: Visual representation of the image. Used for getting - more sizes - :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-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object_py3.py deleted file mode 100644 index ebda17aa57ba..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_object_py3.py +++ /dev/null @@ -1,166 +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. - :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. - :vartype width: int - :ivar height: The height of the source media object, in pixels. - :vartype height: int - :ivar thumbnail: The URL to a thumbnail of the image - :vartype thumbnail: - ~azure.cognitiveservices.search.imagesearch.models.ImageObject - :ivar image_insights_token: The token that you use in a subsequent call to - the Image Search API to get additional information about the image. For - information about using this token, see the insightsToken query 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 imageInisghtsToken to get the - list of websites. - :vartype insights_metadata: - ~azure.cognitiveservices.search.imagesearch.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: Visual representation of the image. Used for getting - more sizes - :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-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module.py deleted file mode 100644 index 8af440f299b6..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module.py +++ /dev/null @@ -1,38 +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 ImageTagsModule(Model): - """Defines the characteristics of content found in an image. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. A list of tags that describe the characteristics - of the content found in the image. For example, if the image is of a - musical artist, the list might include Female, Dress, and Music to - indicate the person is female music artist that's wearing a dress. - :type value: - list[~azure.cognitiveservices.search.imagesearch.models.InsightsTag] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InsightsTag]'}, - } - - def __init__(self, **kwargs): - super(ImageTagsModule, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module_py3.py deleted file mode 100644 index 75b6ac825707..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/image_tags_module_py3.py +++ /dev/null @@ -1,38 +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 ImageTagsModule(Model): - """Defines the characteristics of content found in an image. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. A list of tags that describe the characteristics - of the content found in the image. For example, if the image is of a - musical artist, the list might include Female, Dress, and Music to - indicate the person is female music artist that's wearing a dress. - :type value: - list[~azure.cognitiveservices.search.imagesearch.models.InsightsTag] - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InsightsTag]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(ImageTagsModule, self).__init__(**kwargs) - self.value = value diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images.py deleted file mode 100644 index d0f27f917fb0..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images.py +++ /dev/null @@ -1,94 +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 .search_results_answer import SearchResultsAnswer - - -class Images(SearchResultsAnswer): - """Defines an image answer. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param _type: Required. Constant filled by server. - :type _type: str - :ivar id: A String identifier. - :vartype id: str - :ivar read_link: The URL that returns this resource. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar total_estimated_matches: The estimated number of webpages that are - relevant to the query. Use this number along with the count and offset - query parameters to page the results. - :vartype total_estimated_matches: long - :ivar next_offset: Used as part of deduping. Tells client the next offset - that client should use in the next pagination request - :vartype next_offset: int - :param value: Required. A list of image objects that are relevant to the - query. If there are no results, the List is empty. - :type value: - list[~azure.cognitiveservices.search.imagesearch.models.ImageObject] - :ivar query_expansions: A list of expanded queries that narrows the - original query. For example, if the query was Microsoft Surface, the - expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, - Microsoft Surface Phone, and Microsoft Surface Hub. - :vartype query_expansions: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - :ivar pivot_suggestions: A list of segments in the original query. For - example, if the query was Red Flowers, Bing might segment the query into - Red and Flowers. The Flowers pivot may contain query suggestions such as - Red Peonies and Red Daisies, and the Red pivot may contain query - suggestions such as Green Flowers and Yellow Flowers. - :vartype pivot_suggestions: - list[~azure.cognitiveservices.search.imagesearch.models.PivotSuggestions] - :ivar similar_terms: A list of terms that are similar in meaning to the - user's query term. - :vartype similar_terms: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'total_estimated_matches': {'readonly': True}, - 'next_offset': {'readonly': True}, - 'value': {'required': True}, - 'query_expansions': {'readonly': True}, - 'pivot_suggestions': {'readonly': True}, - 'similar_terms': {'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'}, - 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, - 'next_offset': {'key': 'nextOffset', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[ImageObject]'}, - 'query_expansions': {'key': 'queryExpansions', 'type': '[Query]'}, - 'pivot_suggestions': {'key': 'pivotSuggestions', 'type': '[PivotSuggestions]'}, - 'similar_terms': {'key': 'similarTerms', 'type': '[Query]'}, - } - - def __init__(self, **kwargs): - super(Images, self).__init__(**kwargs) - self.next_offset = None - self.value = kwargs.get('value', None) - self.query_expansions = None - self.pivot_suggestions = None - self.similar_terms = None - self._type = 'Images' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_image_metadata.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_image_metadata.py deleted file mode 100644 index b23fd9dab663..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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 offer goods of - 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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_image_metadata_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_image_metadata_py3.py deleted file mode 100644 index 3eb2f4ef07fa..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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 offer goods of - 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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_module.py deleted file mode 100644 index e449916802e7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_module_py3.py deleted file mode 100644 index 2fffb352a69b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_py3.py deleted file mode 100644 index 1b762f7c02e0..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/images_py3.py +++ /dev/null @@ -1,94 +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 .search_results_answer import SearchResultsAnswer - - -class Images(SearchResultsAnswer): - """Defines an image answer. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param _type: Required. Constant filled by server. - :type _type: str - :ivar id: A String identifier. - :vartype id: str - :ivar read_link: The URL that returns this resource. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar total_estimated_matches: The estimated number of webpages that are - relevant to the query. Use this number along with the count and offset - query parameters to page the results. - :vartype total_estimated_matches: long - :ivar next_offset: Used as part of deduping. Tells client the next offset - that client should use in the next pagination request - :vartype next_offset: int - :param value: Required. A list of image objects that are relevant to the - query. If there are no results, the List is empty. - :type value: - list[~azure.cognitiveservices.search.imagesearch.models.ImageObject] - :ivar query_expansions: A list of expanded queries that narrows the - original query. For example, if the query was Microsoft Surface, the - expanded queries might be: Microsoft Surface Pro 3, Microsoft Surface RT, - Microsoft Surface Phone, and Microsoft Surface Hub. - :vartype query_expansions: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - :ivar pivot_suggestions: A list of segments in the original query. For - example, if the query was Red Flowers, Bing might segment the query into - Red and Flowers. The Flowers pivot may contain query suggestions such as - Red Peonies and Red Daisies, and the Red pivot may contain query - suggestions such as Green Flowers and Yellow Flowers. - :vartype pivot_suggestions: - list[~azure.cognitiveservices.search.imagesearch.models.PivotSuggestions] - :ivar similar_terms: A list of terms that are similar in meaning to the - user's query term. - :vartype similar_terms: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'total_estimated_matches': {'readonly': True}, - 'next_offset': {'readonly': True}, - 'value': {'required': True}, - 'query_expansions': {'readonly': True}, - 'pivot_suggestions': {'readonly': True}, - 'similar_terms': {'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'}, - 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, - 'next_offset': {'key': 'nextOffset', 'type': 'int'}, - 'value': {'key': 'value', 'type': '[ImageObject]'}, - 'query_expansions': {'key': 'queryExpansions', 'type': '[Query]'}, - 'pivot_suggestions': {'key': 'pivotSuggestions', 'type': '[PivotSuggestions]'}, - 'similar_terms': {'key': 'similarTerms', 'type': '[Query]'}, - } - - def __init__(self, *, value, **kwargs) -> None: - super(Images, self).__init__(**kwargs) - self.next_offset = None - self.value = value - self.query_expansions = None - self.pivot_suggestions = None - self.similar_terms = None - self._type = 'Images' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag.py deleted file mode 100644 index 30589115f262..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag.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 InsightsTag(Model): - """Defines a characteristic of the content found in the image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the characteristic. For example, cat, kitty, - calico cat. - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(InsightsTag, self).__init__(**kwargs) - self.name = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag_py3.py deleted file mode 100644 index aa453e7ec93e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/insights_tag_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 InsightsTag(Model): - """Defines a characteristic of the content found in the image. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the characteristic. For example, cat, kitty, - calico cat. - :vartype name: str - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(InsightsTag, self).__init__(**kwargs) - self.name = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible.py deleted file mode 100644 index 209769de612a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible.py +++ /dev/null @@ -1,83 +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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible_py3.py deleted file mode 100644 index 60ba0360f40f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/intangible_py3.py +++ /dev/null @@ -1,83 +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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object.py deleted file mode 100644 index 1698f032b9a3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object.py +++ /dev/null @@ -1,137 +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. - :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. - :vartype width: int - :ivar height: The height of the source media object, in pixels. - :vartype height: int - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - '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-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object_py3.py deleted file mode 100644 index ef1a6ad24dca..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/media_object_py3.py +++ /dev/null @@ -1,137 +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. - :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.imagesearch.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.imagesearch.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 mp3, mp4, 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 source media object, in pixels. - :vartype width: int - :ivar height: The height of the source media object, in pixels. - :vartype height: int - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - '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-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle.py deleted file mode 100644 index 379d5d426036..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle.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 .structured_value import StructuredValue - - -class NormalizedRectangle(StructuredValue): - """Defines a region of an image. The region is defined by the coordinates of - the top, left corner and bottom, right corner of the region. 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. - :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.imagesearch.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 left: Required. The left coordinate. - :type left: float - :param top: Required. The top coordinate - :type top: float - :param right: Required. The right coordinate - :type right: float - :param bottom: Required. The bottom coordinate - :type bottom: 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}, - 'left': {'required': True}, - 'top': {'required': True}, - 'right': {'required': True}, - 'bottom': {'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'}, - 'left': {'key': 'left', 'type': 'float'}, - 'top': {'key': 'top', 'type': 'float'}, - 'right': {'key': 'right', 'type': 'float'}, - 'bottom': {'key': 'bottom', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(NormalizedRectangle, self).__init__(**kwargs) - self.left = kwargs.get('left', None) - self.top = kwargs.get('top', None) - self.right = kwargs.get('right', None) - self.bottom = kwargs.get('bottom', None) - self._type = 'NormalizedRectangle' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle_py3.py deleted file mode 100644 index fc8d22faf57d..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/normalized_rectangle_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 .structured_value import StructuredValue - - -class NormalizedRectangle(StructuredValue): - """Defines a region of an image. The region is defined by the coordinates of - the top, left corner and bottom, right corner of the region. 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. - :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.imagesearch.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 left: Required. The left coordinate. - :type left: float - :param top: Required. The top coordinate - :type top: float - :param right: Required. The right coordinate - :type right: float - :param bottom: Required. The bottom coordinate - :type bottom: 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}, - 'left': {'required': True}, - 'top': {'required': True}, - 'right': {'required': True}, - 'bottom': {'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'}, - 'left': {'key': 'left', 'type': 'float'}, - 'top': {'key': 'top', 'type': 'float'}, - 'right': {'key': 'right', 'type': 'float'}, - 'bottom': {'key': 'bottom', 'type': 'float'}, - } - - def __init__(self, *, left: float, top: float, right: float, bottom: float, **kwargs) -> None: - super(NormalizedRectangle, self).__init__(**kwargs) - self.left = left - self.top = top - self.right = right - self.bottom = bottom - self._type = 'NormalizedRectangle' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer.py deleted file mode 100644 index 9a3749017f01..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer.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 .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. - :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer_py3.py deleted file mode 100644 index 5a893296dae6..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/offer_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 .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. - :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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization.py deleted file mode 100644 index 71d030580c20..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization.py +++ /dev/null @@ -1,75 +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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization_py3.py deleted file mode 100644 index a23cd3694118..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/organization_py3.py +++ /dev/null @@ -1,75 +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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/person.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/person.py deleted file mode 100644 index 2f9d097a9a7a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/person.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 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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/person_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/person_py3.py deleted file mode 100644 index 5db418a3db8c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/person_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 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. - :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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions.py deleted file mode 100644 index 43727638599c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions.py +++ /dev/null @@ -1,40 +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 PivotSuggestions(Model): - """Defines the pivot segment. - - All required parameters must be populated in order to send to Azure. - - :param pivot: Required. The segment from the original query to pivot on. - :type pivot: str - :param suggestions: Required. A list of suggested queries for the pivot. - :type suggestions: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - """ - - _validation = { - 'pivot': {'required': True}, - 'suggestions': {'required': True}, - } - - _attribute_map = { - 'pivot': {'key': 'pivot', 'type': 'str'}, - 'suggestions': {'key': 'suggestions', 'type': '[Query]'}, - } - - def __init__(self, **kwargs): - super(PivotSuggestions, self).__init__(**kwargs) - self.pivot = kwargs.get('pivot', None) - self.suggestions = kwargs.get('suggestions', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions_py3.py deleted file mode 100644 index 83db74fb8b91..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/pivot_suggestions_py3.py +++ /dev/null @@ -1,40 +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 PivotSuggestions(Model): - """Defines the pivot segment. - - All required parameters must be populated in order to send to Azure. - - :param pivot: Required. The segment from the original query to pivot on. - :type pivot: str - :param suggestions: Required. A list of suggested queries for the pivot. - :type suggestions: - list[~azure.cognitiveservices.search.imagesearch.models.Query] - """ - - _validation = { - 'pivot': {'required': True}, - 'suggestions': {'required': True}, - } - - _attribute_map = { - 'pivot': {'key': 'pivot', 'type': 'str'}, - 'suggestions': {'key': 'suggestions', 'type': '[Query]'}, - } - - def __init__(self, *, pivot: str, suggestions, **kwargs) -> None: - super(PivotSuggestions, self).__init__(**kwargs) - self.pivot = pivot - self.suggestions = suggestions diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/properties_item.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/properties_item.py deleted file mode 100644 index 0826a1c9d662..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/models/properties_item_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/properties_item_py3.py deleted file mode 100644 index 17ca93eba774..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/models/query.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/query.py deleted file mode 100644 index e66f7ca9f493..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/query.py +++ /dev/null @@ -1,67 +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. This version of - the query term may contain special characters that highlight the search - term found in the query string. The string contains the highlighting - characters only if the query enabled hit highlighting - :vartype display_text: str - :ivar web_search_url: The URL that takes the user to the Bing search - results page for the query.Only related search results include this field. - :vartype web_search_url: str - :ivar search_link: 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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/query_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/query_py3.py deleted file mode 100644 index 0ceba96a2bd5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/query_py3.py +++ /dev/null @@ -1,67 +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. This version of - the query term may contain special characters that highlight the search - term found in the query string. The string contains the highlighting - characters only if the query enabled hit highlighting - :vartype display_text: str - :ivar web_search_url: The URL that takes the user to the Bing search - results page for the query.Only related search results include this field. - :vartype web_search_url: str - :ivar search_link: 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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/rating.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/rating.py deleted file mode 100644 index a749cf2f7c0b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/models/rating_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/rating_py3.py deleted file mode 100644 index cf4b1a32eec8..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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 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-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe.py deleted file mode 100644 index a094b46d360c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe.py +++ /dev/null @@ -1,113 +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. - :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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe_py3.py deleted file mode 100644 index f3e29acf8e61..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipe_py3.py +++ /dev/null @@ -1,113 +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. - :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.imagesearch.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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipes_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipes_module.py deleted file mode 100644 index 988d9ab561c2..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipes_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recipes_module_py3.py deleted file mode 100644 index 0764002ab9c6..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_module.py deleted file mode 100644 index 8c8719f50415..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_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 RecognizedEntitiesModule(Model): - """Defines a list of previously recognized entities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of recognized entities. - :vartype value: - list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityGroup] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecognizedEntityGroup]'}, - } - - def __init__(self, **kwargs): - super(RecognizedEntitiesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_module_py3.py deleted file mode 100644 index db80149bb933..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entities_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 RecognizedEntitiesModule(Model): - """Defines a list of previously recognized entities. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of recognized entities. - :vartype value: - list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityGroup] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RecognizedEntityGroup]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecognizedEntitiesModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity.py deleted file mode 100644 index 10972d8b6b5e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity.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 .response import Response - - -class RecognizedEntity(Response): - """Defines a recognized entity. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar entity: The entity that was recognized. The following are the - possible entity objects: Person - :vartype entity: ~azure.cognitiveservices.search.imagesearch.models.Thing - :ivar match_confidence: The confidence that Bing has that the entity in - the image matches this entity. The confidence ranges from 0.0 through 1.0 - with 1.0 being very confident. - :vartype match_confidence: float - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'entity': {'readonly': True}, - 'match_confidence': {'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'}, - 'entity': {'key': 'entity', 'type': 'Thing'}, - 'match_confidence': {'key': 'matchConfidence', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(RecognizedEntity, self).__init__(**kwargs) - self.entity = None - self.match_confidence = None - self._type = 'RecognizedEntity' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group.py deleted file mode 100644 index 3f839d01148b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group.py +++ /dev/null @@ -1,45 +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 RecognizedEntityGroup(Model): - """Defines a group of previously recognized entities. - - All required parameters must be populated in order to send to Azure. - - :param recognized_entity_regions: Required. The regions of the image that - contain entities. - :type recognized_entity_regions: - list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityRegion] - :param name: Required. The name of the group where images of the entity - were also found. The following are possible groups. - CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides - a higher probability of an accurate match. CelebrityAnnotations: Contains - celebrities such as actors, politicians, athletes, and historical figures. - :type name: str - """ - - _validation = { - 'recognized_entity_regions': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'recognized_entity_regions': {'key': 'recognizedEntityRegions', 'type': '[RecognizedEntityRegion]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RecognizedEntityGroup, self).__init__(**kwargs) - self.recognized_entity_regions = kwargs.get('recognized_entity_regions', None) - self.name = kwargs.get('name', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group_py3.py deleted file mode 100644 index 259b586f6526..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_group_py3.py +++ /dev/null @@ -1,45 +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 RecognizedEntityGroup(Model): - """Defines a group of previously recognized entities. - - All required parameters must be populated in order to send to Azure. - - :param recognized_entity_regions: Required. The regions of the image that - contain entities. - :type recognized_entity_regions: - list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntityRegion] - :param name: Required. The name of the group where images of the entity - were also found. The following are possible groups. - CelebRecognitionAnnotations: Similar to CelebrityAnnotations but provides - a higher probability of an accurate match. CelebrityAnnotations: Contains - celebrities such as actors, politicians, athletes, and historical figures. - :type name: str - """ - - _validation = { - 'recognized_entity_regions': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'recognized_entity_regions': {'key': 'recognizedEntityRegions', 'type': '[RecognizedEntityRegion]'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, recognized_entity_regions, name: str, **kwargs) -> None: - super(RecognizedEntityGroup, self).__init__(**kwargs) - self.recognized_entity_regions = recognized_entity_regions - self.name = name diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_py3.py deleted file mode 100644 index cdaa8c0cd3c3..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_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 .response import Response - - -class RecognizedEntity(Response): - """Defines a recognized entity. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar entity: The entity that was recognized. The following are the - possible entity objects: Person - :vartype entity: ~azure.cognitiveservices.search.imagesearch.models.Thing - :ivar match_confidence: The confidence that Bing has that the entity in - the image matches this entity. The confidence ranges from 0.0 through 1.0 - with 1.0 being very confident. - :vartype match_confidence: float - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'entity': {'readonly': True}, - 'match_confidence': {'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'}, - 'entity': {'key': 'entity', 'type': 'Thing'}, - 'match_confidence': {'key': 'matchConfidence', 'type': 'float'}, - } - - def __init__(self, **kwargs) -> None: - super(RecognizedEntity, self).__init__(**kwargs) - self.entity = None - self.match_confidence = None - self._type = 'RecognizedEntity' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region.py deleted file mode 100644 index 552c42221acd..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region.py +++ /dev/null @@ -1,70 +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 RecognizedEntityRegion(Response): - """Defines a region of the image where an entity was found and a list of - entities that might match it. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar region: A region of the image that contains an entity. The values of - the rectangle are relative to the width and height of the original image - and are in the range 0.0 through 1.0. For example, if the image is 300x200 - and the region's top, left corner is at point (10, 20) and the bottom, - right corner is at point (290, 150), then the normalized rectangle is: - Left = 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom = - 0.75. For people, the region represents the person's face. - :vartype region: - ~azure.cognitiveservices.search.imagesearch.models.NormalizedRectangle - :ivar matching_entities: A list of entities that Bing believes match the - entity found in the region. The entities are in descending order of - confidence (see the matchConfidence field of RecognizedEntity). - :vartype matching_entities: - list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntity] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'region': {'readonly': True}, - 'matching_entities': {'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'}, - 'region': {'key': 'region', 'type': 'NormalizedRectangle'}, - 'matching_entities': {'key': 'matchingEntities', 'type': '[RecognizedEntity]'}, - } - - def __init__(self, **kwargs): - super(RecognizedEntityRegion, self).__init__(**kwargs) - self.region = None - self.matching_entities = None - self._type = 'RecognizedEntityRegion' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region_py3.py deleted file mode 100644 index 70626031a667..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/recognized_entity_region_py3.py +++ /dev/null @@ -1,70 +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 RecognizedEntityRegion(Response): - """Defines a region of the image where an entity was found and a list of - entities that might match it. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar region: A region of the image that contains an entity. The values of - the rectangle are relative to the width and height of the original image - and are in the range 0.0 through 1.0. For example, if the image is 300x200 - and the region's top, left corner is at point (10, 20) and the bottom, - right corner is at point (290, 150), then the normalized rectangle is: - Left = 0.0333333333333333, Top = 0.1, Right = 0.9666666666666667, Bottom = - 0.75. For people, the region represents the person's face. - :vartype region: - ~azure.cognitiveservices.search.imagesearch.models.NormalizedRectangle - :ivar matching_entities: A list of entities that Bing believes match the - entity found in the region. The entities are in descending order of - confidence (see the matchConfidence field of RecognizedEntity). - :vartype matching_entities: - list[~azure.cognitiveservices.search.imagesearch.models.RecognizedEntity] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'region': {'readonly': True}, - 'matching_entities': {'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'}, - 'region': {'key': 'region', 'type': 'NormalizedRectangle'}, - 'matching_entities': {'key': 'matchingEntities', 'type': '[RecognizedEntity]'}, - } - - def __init__(self, **kwargs) -> None: - super(RecognizedEntityRegion, self).__init__(**kwargs) - self.region = None - self.matching_entities = None - self._type = 'RecognizedEntityRegion' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_module.py deleted file mode 100644 index db3497133cd9..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_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 RelatedCollectionsModule(Model): - """Defines a list of webpages that contain related images. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of webpages that contain related images. - :vartype value: - list[~azure.cognitiveservices.search.imagesearch.models.ImageGallery] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ImageGallery]'}, - } - - def __init__(self, **kwargs): - super(RelatedCollectionsModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_module_py3.py deleted file mode 100644 index f2a24c14199e..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_collections_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 RelatedCollectionsModule(Model): - """Defines a list of webpages that contain related images. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar value: A list of webpages that contain related images. - :vartype value: - list[~azure.cognitiveservices.search.imagesearch.models.ImageGallery] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ImageGallery]'}, - } - - def __init__(self, **kwargs) -> None: - super(RelatedCollectionsModule, self).__init__(**kwargs) - self.value = None diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_searches_module.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_searches_module.py deleted file mode 100644 index 40f72d04f7eb..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_searches_module_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/related_searches_module_py3.py deleted file mode 100644 index ce3f1bdad0f7..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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.imagesearch.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-imagesearch/azure/cognitiveservices/search/imagesearch/models/response.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response.py deleted file mode 100644 index bfe83453f37f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response.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 .identifiable import Identifiable - - -class Response(Identifiable): - """Defines a response. All schemas that could be returned at the root of a - response should inherit from this. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Answer, Thing, ErrorResponse, RecognizedEntity, - RecognizedEntityRegion, ImageInsights, TrendingImages - - 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. - :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': {'Answer': 'Answer', 'Thing': 'Thing', 'ErrorResponse': 'ErrorResponse', 'RecognizedEntity': 'RecognizedEntity', 'RecognizedEntityRegion': 'RecognizedEntityRegion', 'ImageInsights': 'ImageInsights', 'TrendingImages': 'TrendingImages'} - } - - 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-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_base.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_base.py deleted file mode 100644 index fd44632cfc0a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_base_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_base_py3.py deleted file mode 100644 index 680e0fe98ab4..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_py3.py deleted file mode 100644 index 85528bfc91e5..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/response_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 .identifiable import Identifiable - - -class Response(Identifiable): - """Defines a response. All schemas that could be returned at the root of a - response should inherit from this. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Answer, Thing, ErrorResponse, RecognizedEntity, - RecognizedEntityRegion, ImageInsights, TrendingImages - - 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. - :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': {'Answer': 'Answer', 'Thing': 'Thing', 'ErrorResponse': 'ErrorResponse', 'RecognizedEntity': 'RecognizedEntity', 'RecognizedEntityRegion': 'RecognizedEntityRegion', 'ImageInsights': 'ImageInsights', 'TrendingImages': 'TrendingImages'} - } - - 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-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer.py deleted file mode 100644 index 3ce089b82a6c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer.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 .answer import Answer - - -class SearchResultsAnswer(Answer): - """Defines a search result answer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Images - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar total_estimated_matches: The estimated number of webpages that are - relevant to the query. Use this number along with the count and offset - query parameters to page the results. - :vartype total_estimated_matches: long - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'total_estimated_matches': {'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'}, - 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, - } - - _subtype_map = { - '_type': {'Images': 'Images'} - } - - def __init__(self, **kwargs): - super(SearchResultsAnswer, self).__init__(**kwargs) - self.total_estimated_matches = None - self._type = 'SearchResultsAnswer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer_py3.py deleted file mode 100644 index f0bb1b5cf65b..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/search_results_answer_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 .answer import Answer - - -class SearchResultsAnswer(Answer): - """Defines a search result answer. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Images - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :ivar total_estimated_matches: The estimated number of webpages that are - relevant to the query. Use this number along with the count and offset - query parameters to page the results. - :vartype total_estimated_matches: long - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'total_estimated_matches': {'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'}, - 'total_estimated_matches': {'key': 'totalEstimatedMatches', 'type': 'long'}, - } - - _subtype_map = { - '_type': {'Images': 'Images'} - } - - def __init__(self, **kwargs) -> None: - super(SearchResultsAnswer, self).__init__(**kwargs) - self.total_estimated_matches = None - self._type = 'SearchResultsAnswer' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value.py deleted file mode 100644 index 9dd8c5101f8a..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value.py +++ /dev/null @@ -1,82 +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: NormalizedRectangle - - 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. - :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.imagesearch.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': {'NormalizedRectangle': 'NormalizedRectangle'} - } - - def __init__(self, **kwargs): - super(StructuredValue, self).__init__(**kwargs) - self._type = 'StructuredValue' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value_py3.py deleted file mode 100644 index 9d8b26aad49f..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/structured_value_py3.py +++ /dev/null @@ -1,82 +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: NormalizedRectangle - - 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. - :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.imagesearch.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': {'NormalizedRectangle': 'NormalizedRectangle'} - } - - def __init__(self, **kwargs) -> None: - super(StructuredValue, self).__init__(**kwargs) - self._type = 'StructuredValue' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing.py deleted file mode 100644 index bac48c5e64e1..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing.py +++ /dev/null @@ -1,88 +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: 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. - :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.imagesearch.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': {'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-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing_py3.py deleted file mode 100644 index 2a6cc114063c..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/thing_py3.py +++ /dev/null @@ -1,88 +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: 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. - :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.imagesearch.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': {'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-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images.py deleted file mode 100644 index 6ea1b01e76aa..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images.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 .response import Response - - -class TrendingImages(Response): - """The top-level object that the response includes when a trending images - request succeeds. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :param categories: Required. A list that identifies categories of images - and a list of trending images in that category. - :type categories: - list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesCategory] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'categories': {'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'}, - 'categories': {'key': 'categories', 'type': '[TrendingImagesCategory]'}, - } - - def __init__(self, **kwargs): - super(TrendingImages, self).__init__(**kwargs) - self.categories = kwargs.get('categories', None) - self._type = 'TrendingImages' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category.py deleted file mode 100644 index 85b7318cc537..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category.py +++ /dev/null @@ -1,45 +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 TrendingImagesCategory(Model): - """Defines the category of trending images. - - All required parameters must be populated in order to send to Azure. - - :param title: Required. The name of the image category. For example, - Popular People Searches. - :type title: str - :param tiles: Required. A list of images that are trending in the - category. Each tile contains an image and a URL that returns more images - of the subject. For example, if the category is Popular People Searches, - the image is of a popular person and the URL would return more images of - that person. - :type tiles: - list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesTile] - """ - - _validation = { - 'title': {'required': True}, - 'tiles': {'required': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'tiles': {'key': 'tiles', 'type': '[TrendingImagesTile]'}, - } - - def __init__(self, **kwargs): - super(TrendingImagesCategory, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.tiles = kwargs.get('tiles', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category_py3.py deleted file mode 100644 index c76479d9f687..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_category_py3.py +++ /dev/null @@ -1,45 +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 TrendingImagesCategory(Model): - """Defines the category of trending images. - - All required parameters must be populated in order to send to Azure. - - :param title: Required. The name of the image category. For example, - Popular People Searches. - :type title: str - :param tiles: Required. A list of images that are trending in the - category. Each tile contains an image and a URL that returns more images - of the subject. For example, if the category is Popular People Searches, - the image is of a popular person and the URL would return more images of - that person. - :type tiles: - list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesTile] - """ - - _validation = { - 'title': {'required': True}, - 'tiles': {'required': True}, - } - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'tiles': {'key': 'tiles', 'type': '[TrendingImagesTile]'}, - } - - def __init__(self, *, title: str, tiles, **kwargs) -> None: - super(TrendingImagesCategory, self).__init__(**kwargs) - self.title = title - self.tiles = tiles diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_py3.py deleted file mode 100644 index 9831a7d14339..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_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 .response import Response - - -class TrendingImages(Response): - """The top-level object that the response includes when a trending images - request succeeds. - - 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. - :vartype read_link: str - :ivar web_search_url: The URL To Bing's search result for this item. - :vartype web_search_url: str - :param categories: Required. A list that identifies categories of images - and a list of trending images in that category. - :type categories: - list[~azure.cognitiveservices.search.imagesearch.models.TrendingImagesCategory] - """ - - _validation = { - '_type': {'required': True}, - 'id': {'readonly': True}, - 'read_link': {'readonly': True}, - 'web_search_url': {'readonly': True}, - 'categories': {'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'}, - 'categories': {'key': 'categories', 'type': '[TrendingImagesCategory]'}, - } - - def __init__(self, *, categories, **kwargs) -> None: - super(TrendingImages, self).__init__(**kwargs) - self.categories = categories - self._type = 'TrendingImages' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile.py deleted file mode 100644 index ea1b93bead19..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile.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 TrendingImagesTile(Model): - """Defines an image tile. - - All required parameters must be populated in order to send to Azure. - - :param query: Required. A query that returns a Bing search results page - with more images of the subject. For example, if the category is Popular - People Searches, then the thumbnail is of a popular person. The query - would return a Bing search results page with more images of that person. - :type query: ~azure.cognitiveservices.search.imagesearch.models.Query - :param image: Required. The image's thumbnail. - :type image: - ~azure.cognitiveservices.search.imagesearch.models.ImageObject - """ - - _validation = { - 'query': {'required': True}, - 'image': {'required': True}, - } - - _attribute_map = { - 'query': {'key': 'query', 'type': 'Query'}, - 'image': {'key': 'image', 'type': 'ImageObject'}, - } - - def __init__(self, **kwargs): - super(TrendingImagesTile, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.image = kwargs.get('image', None) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile_py3.py deleted file mode 100644 index f2d12242a643..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/trending_images_tile_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 TrendingImagesTile(Model): - """Defines an image tile. - - All required parameters must be populated in order to send to Azure. - - :param query: Required. A query that returns a Bing search results page - with more images of the subject. For example, if the category is Popular - People Searches, then the thumbnail is of a popular person. The query - would return a Bing search results page with more images of that person. - :type query: ~azure.cognitiveservices.search.imagesearch.models.Query - :param image: Required. The image's thumbnail. - :type image: - ~azure.cognitiveservices.search.imagesearch.models.ImageObject - """ - - _validation = { - 'query': {'required': True}, - 'image': {'required': True}, - } - - _attribute_map = { - 'query': {'key': 'query', 'type': 'Query'}, - 'image': {'key': 'image', 'type': 'ImageObject'}, - } - - def __init__(self, *, query, image, **kwargs) -> None: - super(TrendingImagesTile, self).__init__(**kwargs) - self.query = query - self.image = image diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page.py deleted file mode 100644 index 9e5cb0c25202..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page.py +++ /dev/null @@ -1,99 +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 WebPage(CreativeWork): - """Defines a webpage that is relevant to the query. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CollectionPage - - 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. - :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.imagesearch.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.imagesearch.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': {'CollectionPage': 'CollectionPage'} - } - - def __init__(self, **kwargs): - super(WebPage, self).__init__(**kwargs) - self._type = 'WebPage' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page_py3.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page_py3.py deleted file mode 100644 index 50c8d7b02f23..000000000000 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/models/web_page_py3.py +++ /dev/null @@ -1,99 +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 WebPage(CreativeWork): - """Defines a webpage that is relevant to the query. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: CollectionPage - - 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. - :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.imagesearch.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.imagesearch.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': {'CollectionPage': 'CollectionPage'} - } - - def __init__(self, **kwargs) -> None: - super(WebPage, self).__init__(**kwargs) - self._type = 'WebPage' diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/__init__.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/__init__.py index 5dbea237465e..dd241d832e85 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/__init__.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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-imagesearch/azure/cognitiveservices/search/imagesearch/operations/images_operations.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/_images_operations.py similarity index 98% rename from sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/images_operations.py rename to sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/_images_operations.py index b23a2db51cb1..224cb6ab5d1a 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/operations/images_operations.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/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. @@ -411,6 +413,10 @@ def search( """ # Construct URL url = self.search.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} @@ -462,7 +468,7 @@ def search( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['X-BingApis-SDK'] = self._serialize.header("self.x_bing_apis_sdk", self.x_bing_apis_sdk, 'str') @@ -478,14 +484,13 @@ def search( header_parameters['X-Search-Location'] = self._serialize.header("location", location, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('Images', response) @@ -828,6 +833,10 @@ def details( """ # Construct URL url = self.details.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} @@ -861,7 +870,7 @@ def details( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['X-BingApis-SDK'] = self._serialize.header("self.x_bing_apis_sdk", self.x_bing_apis_sdk, 'str') @@ -879,14 +888,13 @@ def details( header_parameters['X-Search-Location'] = self._serialize.header("location", location, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ImageInsights', response) @@ -1111,6 +1119,10 @@ def trending( """ # Construct URL url = self.trending.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} @@ -1125,7 +1137,7 @@ def trending( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['X-BingApis-SDK'] = self._serialize.header("self.x_bing_apis_sdk", self.x_bing_apis_sdk, 'str') @@ -1141,14 +1153,13 @@ def trending( header_parameters['X-Search-Location'] = self._serialize.header("location", location, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('TrendingImages', response) From e335b76377f5fd580ab546afd92a4d5c8f4871ae Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Wed, 4 Dec 2019 05:35:52 +0000 Subject: [PATCH 2/3] Packaging update of azure-cognitiveservices-search-imagesearch --- .../azure-cognitiveservices-search-imagesearch/README.rst | 2 +- .../azure-cognitiveservices-search-imagesearch/setup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/README.rst b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/README.rst index be8fd6987bb3..7a2166a2b114 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/README.rst +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/README.rst @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python This is the Microsoft Azure Cognitive Services Image Search Client Library. -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For a more complete set of Azure libraries, see the `azure `__ bundle package. diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/setup.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/setup.py index c11fe4eaba1b..55b92d14149e 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/setup.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From 2cfe2b4054c0938d11d75bd3b8cba3daceb1d042 Mon Sep 17 00:00:00 2001 From: Zim Kalinowski Date: Wed, 4 Dec 2019 14:01:33 +0800 Subject: [PATCH 3/3] history and version --- .../HISTORY.rst | 22 +++++++++++++++++++ .../search/imagesearch/version.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/HISTORY.rst b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/HISTORY.rst index f4c81ffa5c63..dd6525db8ed1 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/HISTORY.rst +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/HISTORY.rst @@ -3,6 +3,28 @@ Release History =============== +2.0.0 (2019-12-04) +++++++++++++++++++ + +**Features** + +- Minor changes accumulated since last release + +**Breaking Changes** + +- ImageSearchAPI has been renamed to ImageSearchClient +- ImageSearchAPIConfiguration has been renamed to ImageSearchClientConfiguration + +**General Breaking changes** + +This version uses a next-generation code generator that might introduce breaking changes if from some import. In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place. +AdvisorManagementClient cannot be imported from azure.cognitiveservices.search.image_search_api anymore (import from azure.cognitiveservices.search.imagesearch works like before) +ImageSearchClientConfiguration import has been moved from azure.cognitiveservices.search.image_search_api to azure.cognitiveservices.search.imagesearch +A model MyClass from a "models" sub-module cannot be imported anymore using azure.cognitiveservices.search.imagesearch.models.my_class (import from azure.cognitiveservices.search.imagesearch.models works like before) +An operation class MyClassOperations from an operations sub-module cannot be imported anymore using azure.cognitiveservices.search.imagesearch.operations.my_class_operations (import from azure.cognitiveservices.search.imagesearch.operations works like before) +Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process. + + 1.0.0 (2018-05-02) ++++++++++++++++++ diff --git a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/version.py b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/version.py index a39916c162ce..53c4c7ea05e8 100644 --- a/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/version.py +++ b/sdk/cognitiveservices/azure-cognitiveservices-search-imagesearch/azure/cognitiveservices/search/imagesearch/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0"