From 2d1e7c48c1cef4826a3ba9d94e208f1053087bb7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 3 Dec 2018 09:51:11 -0800 Subject: [PATCH] [AutoPR cognitiveservices/data-plane/EntitySearch] typo: cognitiveservices/data-plane/EntitySearch (#3917) * Generated from 0f5faf9b3f417c79e23b5360aed6c7d56d5dea91 typo: cognitiveservices/data-plane/EntitySearch - countr -> country * Packaging update of azure-cognitiveservices-search-entitysearch --- .../MANIFEST.in | 4 +++ .../search/entitysearch/__init__.py | 4 +-- ..._search_api.py => entity_search_client.py} | 34 ++++++++++++------- .../search/entitysearch/models/__init__.py | 2 +- .../search/entitysearch/models/airport_py3.py | 2 +- .../search/entitysearch/models/answer_py3.py | 2 +- .../models/civic_structure_py3.py | 2 +- .../contractual_rules_attribution_py3.py | 2 +- ...ntractual_rules_license_attribution_py3.py | 2 +- .../contractual_rules_link_attribution_py3.py | 2 +- ...contractual_rules_media_attribution_py3.py | 2 +- .../contractual_rules_text_attribution_py3.py | 2 +- .../entitysearch/models/creative_work_py3.py | 2 +- .../models/entertainment_business_py3.py | 2 +- .../entitysearch/models/entities_py3.py | 2 +- ...enums.py => entity_search_client_enums.py} | 0 .../entitysearch/models/error_response_py3.py | 2 +- .../models/food_establishment_py3.py | 2 +- .../search/entitysearch/models/hotel_py3.py | 2 +- .../entitysearch/models/identifiable_py3.py | 2 +- .../entitysearch/models/image_object_py3.py | 2 +- .../entitysearch/models/intangible_py3.py | 2 +- .../search/entitysearch/models/license_py3.py | 2 +- .../entitysearch/models/local_business_py3.py | 2 +- .../models/lodging_business_py3.py | 2 +- .../entitysearch/models/media_object_py3.py | 2 +- .../entitysearch/models/movie_theater_py3.py | 2 +- .../entitysearch/models/organization_py3.py | 2 +- .../search/entitysearch/models/place_py3.py | 2 +- .../search/entitysearch/models/places_py3.py | 2 +- .../entitysearch/models/postal_address.py | 2 +- .../entitysearch/models/postal_address_py3.py | 4 +-- .../entitysearch/models/response_py3.py | 2 +- .../entitysearch/models/restaurant_py3.py | 2 +- .../models/search_response_py3.py | 2 +- .../models/search_results_answer_py3.py | 2 +- .../models/structured_value_py3.py | 2 +- .../search/entitysearch/models/thing_py3.py | 2 +- .../models/tourist_attraction_py3.py | 2 +- .../operations/entities_operations.py | 10 ++++-- .../search/entitysearch/version.py | 2 +- .../setup.py | 1 + 42 files changed, 72 insertions(+), 55 deletions(-) rename azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/{entity_search_api.py => entity_search_client.py} (67%) rename azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/{entity_search_api_enums.py => entity_search_client_enums.py} (100%) diff --git a/azure-cognitiveservices-search-entitysearch/MANIFEST.in b/azure-cognitiveservices-search-entitysearch/MANIFEST.in index bb37a2723dae..d1c7ea0ea56b 100644 --- a/azure-cognitiveservices-search-entitysearch/MANIFEST.in +++ b/azure-cognitiveservices-search-entitysearch/MANIFEST.in @@ -1 +1,5 @@ include *.rst +include azure/__init__.py +include azure/cognitiveservices/__init__.py +include azure/cognitiveservices/search/__init__.py + diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/__init__.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/__init__.py index dab7faf6916e..57888e4e74c8 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/__init__.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/__init__.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .entity_search_api import EntitySearchAPI +from .entity_search_client import EntitySearchClient from .version import VERSION -__all__ = ['EntitySearchAPI'] +__all__ = ['EntitySearchClient'] __version__ = VERSION diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/entity_search_api.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/entity_search_client.py similarity index 67% rename from azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/entity_search_api.py rename to azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/entity_search_client.py index 849d3b3943f1..3c5804473f9f 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/entity_search_api.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/entity_search_client.py @@ -16,52 +16,60 @@ from . import models -class EntitySearchAPIConfiguration(Configuration): - """Configuration for EntitySearchAPI +class EntitySearchClientConfiguration(Configuration): + """Configuration for EntitySearchClient 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 - :param str base_url: Service URL """ def __init__( - self, credentials, base_url=None): + 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.") - if not base_url: - base_url = 'https://api.cognitive.microsoft.com/bing/v7.0' + base_url = '{Endpoint}/bing/v7.0' - super(EntitySearchAPIConfiguration, self).__init__(base_url) + super(EntitySearchClientConfiguration, self).__init__(base_url) self.add_user_agent('azure-cognitiveservices-search-entitysearch/{}'.format(VERSION)) + self.endpoint = endpoint self.credentials = credentials -class EntitySearchAPI(SDKClient): +class EntitySearchClient(SDKClient): """The Entity Search API lets you send a search query to Bing and get back search results that include entities and places. Place results include restaurants, hotel, or other local businesses. For places, the query can specify the name of the local business or it can ask for a list (for example, restaurants near me). Entity results include persons, places, or things. Place in this context is tourist attractions, states, countries, etc. :ivar config: Configuration for client. - :vartype config: EntitySearchAPIConfiguration + :vartype config: EntitySearchClientConfiguration :ivar entities: Entities operations :vartype entities: azure.cognitiveservices.search.entitysearch.operations.EntitiesOperations + :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 = EntitySearchAPIConfiguration(credentials, base_url) - super(EntitySearchAPI, self).__init__(self.config.credentials, self.config) + self.config = EntitySearchClientConfiguration(endpoint, credentials) + super(EntitySearchClient, 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/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/__init__.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/__init__.py index d6685cc561d8..c8d9902ca310 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/__init__.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/__init__.py @@ -87,7 +87,7 @@ from .lodging_business import LodgingBusiness from .restaurant import Restaurant from .hotel import Hotel -from .entity_search_api_enums import ( +from .entity_search_client_enums import ( EntityQueryScenario, EntityScenario, EntityType, diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/airport_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/airport_py3.py index a459309cbf1a..9e90d4b16e71 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/airport_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/airport_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .civic_structure import CivicStructure +from .civic_structure_py3 import CivicStructure class Airport(CivicStructure): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/answer_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/answer_py3.py index ce87c250adec..d6864af03070 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/answer_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/answer_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .response import Response +from .response_py3 import Response class Answer(Response): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/civic_structure_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/civic_structure_py3.py index 6c1ec3513824..b2cf3a4131e2 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/civic_structure_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/civic_structure_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .place import Place +from .place_py3 import Place class CivicStructure(Place): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_attribution_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_attribution_py3.py index 1ce884db74e6..e9ddba83adde 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_attribution_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_attribution_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .contractual_rules_contractual_rule import ContractualRulesContractualRule +from .contractual_rules_contractual_rule_py3 import ContractualRulesContractualRule class ContractualRulesAttribution(ContractualRulesContractualRule): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_license_attribution_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_license_attribution_py3.py index dc826c5aa422..bda8873631ca 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_license_attribution_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_license_attribution_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .contractual_rules_attribution import ContractualRulesAttribution +from .contractual_rules_attribution_py3 import ContractualRulesAttribution class ContractualRulesLicenseAttribution(ContractualRulesAttribution): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_link_attribution_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_link_attribution_py3.py index ee497c17ec50..dd17ff623a8b 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_link_attribution_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_link_attribution_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .contractual_rules_attribution import ContractualRulesAttribution +from .contractual_rules_attribution_py3 import ContractualRulesAttribution class ContractualRulesLinkAttribution(ContractualRulesAttribution): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_media_attribution_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_media_attribution_py3.py index d939d36c26e5..6de9155af581 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_media_attribution_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_media_attribution_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .contractual_rules_attribution import ContractualRulesAttribution +from .contractual_rules_attribution_py3 import ContractualRulesAttribution class ContractualRulesMediaAttribution(ContractualRulesAttribution): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_text_attribution_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_text_attribution_py3.py index 77af35b739e8..a0611a75fb90 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_text_attribution_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/contractual_rules_text_attribution_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .contractual_rules_attribution import ContractualRulesAttribution +from .contractual_rules_attribution_py3 import ContractualRulesAttribution class ContractualRulesTextAttribution(ContractualRulesAttribution): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/creative_work_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/creative_work_py3.py index ba6eb84c8bb9..0eae3a182caa 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/creative_work_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/creative_work_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .thing import Thing +from .thing_py3 import Thing class CreativeWork(Thing): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entertainment_business_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entertainment_business_py3.py index 998bba6a616d..6f32e48fc73c 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entertainment_business_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entertainment_business_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .local_business import LocalBusiness +from .local_business_py3 import LocalBusiness class EntertainmentBusiness(LocalBusiness): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entities_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entities_py3.py index bd5e67425e7c..ca53d8634e70 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entities_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entities_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .search_results_answer import SearchResultsAnswer +from .search_results_answer_py3 import SearchResultsAnswer class Entities(SearchResultsAnswer): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entity_search_api_enums.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entity_search_client_enums.py similarity index 100% rename from azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entity_search_api_enums.py rename to azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/entity_search_client_enums.py diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/error_response_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/error_response_py3.py index 611a6274b16c..eb548d4ff909 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/error_response_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/error_response_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .response import Response +from .response_py3 import Response from msrest.exceptions import HttpOperationError diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/food_establishment_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/food_establishment_py3.py index d95a0b077264..d951ffa3feca 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/food_establishment_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/food_establishment_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .local_business import LocalBusiness +from .local_business_py3 import LocalBusiness class FoodEstablishment(LocalBusiness): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/hotel_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/hotel_py3.py index d143549ed5f0..46fe71d3f455 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/hotel_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/hotel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .lodging_business import LodgingBusiness +from .lodging_business_py3 import LodgingBusiness class Hotel(LodgingBusiness): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/identifiable_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/identifiable_py3.py index c87dc0347e3d..2d24a2c45775 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/identifiable_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/identifiable_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .response_base import ResponseBase +from .response_base_py3 import ResponseBase class Identifiable(ResponseBase): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/image_object_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/image_object_py3.py index ba0fc2acdd21..acbe44446d33 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/image_object_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/image_object_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .media_object import MediaObject +from .media_object_py3 import MediaObject class ImageObject(MediaObject): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/intangible_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/intangible_py3.py index 5655a035ee76..56cebfdb0ac9 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/intangible_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/intangible_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .thing import Thing +from .thing_py3 import Thing class Intangible(Thing): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/license_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/license_py3.py index db5aa7a1ff21..1f88443f8af3 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/license_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/license_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .creative_work import CreativeWork +from .creative_work_py3 import CreativeWork class License(CreativeWork): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/local_business_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/local_business_py3.py index d5b98a18d424..ee5e92b20f58 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/local_business_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/local_business_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .place import Place +from .place_py3 import Place class LocalBusiness(Place): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/lodging_business_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/lodging_business_py3.py index 9caf104a1b52..9d9c7fd9d7bc 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/lodging_business_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/lodging_business_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .local_business import LocalBusiness +from .local_business_py3 import LocalBusiness class LodgingBusiness(LocalBusiness): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/media_object_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/media_object_py3.py index a8c789ea2c3e..fcf89a924de9 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/media_object_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/media_object_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .creative_work import CreativeWork +from .creative_work_py3 import CreativeWork class MediaObject(CreativeWork): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/movie_theater_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/movie_theater_py3.py index 0e4da1631afe..5fc5207dd506 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/movie_theater_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/movie_theater_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .entertainment_business import EntertainmentBusiness +from .entertainment_business_py3 import EntertainmentBusiness class MovieTheater(EntertainmentBusiness): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/organization_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/organization_py3.py index 8b12a4c212ce..ac1eec444fb9 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/organization_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/organization_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .thing import Thing +from .thing_py3 import Thing class Organization(Thing): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/place_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/place_py3.py index 1aa3b357f72d..a171cd13a276 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/place_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/place_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .thing import Thing +from .thing_py3 import Thing class Place(Thing): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/places_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/places_py3.py index d37c5584d19e..366f09847523 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/places_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/places_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .search_results_answer import SearchResultsAnswer +from .search_results_answer_py3 import SearchResultsAnswer class Places(SearchResultsAnswer): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address.py index 7b89ceb1e429..e6ecc4005efe 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address.py @@ -68,7 +68,7 @@ class PostalAddress(StructuredValue): located. This could be the two-letter ISO code. For example, US, or the full name, United States. :vartype address_country: str - :ivar country_iso: The two letter ISO code of this countr. For example, + :ivar country_iso: The two letter ISO code of this country. For example, US. :vartype country_iso: str :ivar neighborhood: The neighborhood where the street address is located. diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address_py3.py index 93878b9c98e0..c362a98e2b6b 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/postal_address_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .structured_value import StructuredValue +from .structured_value_py3 import StructuredValue class PostalAddress(StructuredValue): @@ -68,7 +68,7 @@ class PostalAddress(StructuredValue): located. This could be the two-letter ISO code. For example, US, or the full name, United States. :vartype address_country: str - :ivar country_iso: The two letter ISO code of this countr. For example, + :ivar country_iso: The two letter ISO code of this country. For example, US. :vartype country_iso: str :ivar neighborhood: The neighborhood where the street address is located. diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/response_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/response_py3.py index 1a9742695e5b..4ca9b1f2d07a 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/response_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/response_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .identifiable import Identifiable +from .identifiable_py3 import Identifiable class Response(Identifiable): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/restaurant_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/restaurant_py3.py index 4e8f8333572f..8ab97a91294c 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/restaurant_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/restaurant_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .food_establishment import FoodEstablishment +from .food_establishment_py3 import FoodEstablishment class Restaurant(FoodEstablishment): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_response_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_response_py3.py index f2f3d33ce6e5..fc4d21b8646c 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_response_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_response_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .response import Response +from .response_py3 import Response class SearchResponse(Response): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_results_answer_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_results_answer_py3.py index ba96bdafff5b..fd189e966a97 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_results_answer_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/search_results_answer_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .answer import Answer +from .answer_py3 import Answer class SearchResultsAnswer(Answer): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/structured_value_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/structured_value_py3.py index 889fa719399d..a2dad6604db4 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/structured_value_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/structured_value_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .intangible import Intangible +from .intangible_py3 import Intangible class StructuredValue(Intangible): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/thing_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/thing_py3.py index 9faea48431a3..c10acf4351f2 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/thing_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/thing_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .response import Response +from .response_py3 import Response class Thing(Response): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/tourist_attraction_py3.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/tourist_attraction_py3.py index 1217039bdce8..de5e78ad3a42 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/tourist_attraction_py3.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/models/tourist_attraction_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .place import Place +from .place_py3 import Place class TouristAttraction(Place): diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/operations/entities_operations.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/operations/entities_operations.py index 685d86b8ff1b..195f166604bd 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/operations/entities_operations.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/operations/entities_operations.py @@ -231,6 +231,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 = {} @@ -250,7 +254,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') @@ -268,8 +272,8 @@ 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) diff --git a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/version.py b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/version.py index a39916c162ce..63d89bfb54fa 100644 --- a/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/version.py +++ b/azure-cognitiveservices-search-entitysearch/azure/cognitiveservices/search/entitysearch/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0" diff --git a/azure-cognitiveservices-search-entitysearch/setup.py b/azure-cognitiveservices-search-entitysearch/setup.py index 00b00ddd7b05..e13a00aaf116 100644 --- a/azure-cognitiveservices-search-entitysearch/setup.py +++ b/azure-cognitiveservices-search-entitysearch/setup.py @@ -79,6 +79,7 @@ ]), install_requires=[ 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], extras_require={