Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .visual_search_api import VisualSearchAPI
from .version import VERSION

__all__ = ['VisualSearchAPI']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# 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.
# --------------------------------------------------------------------------

try:
from .point2_d_py3 import Point2D
from .normalized_quadrilateral_py3 import NormalizedQuadrilateral
from .image_tag_region_py3 import ImageTagRegion
from .image_action_py3 import ImageAction
from .image_tag_py3 import ImageTag
from .organization_py3 import Organization
from .aggregate_rating_py3 import AggregateRating
from .offer_py3 import Offer
from .aggregate_offer_py3 import AggregateOffer
from .images_image_metadata_py3 import ImagesImageMetadata
from .image_object_py3 import ImageObject
from .image_knowledge_py3 import ImageKnowledge
from .response_py3 import Response
from .identifiable_py3 import Identifiable
from .error_py3 import Error
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .thing_py3 import Thing
from .action_py3 import Action
from .media_object_py3 import MediaObject
from .response_base_py3 import ResponseBase
from .creative_work_py3 import CreativeWork
from .person_py3 import Person
from .intangible_py3 import Intangible
from .image_entity_action_py3 import ImageEntityAction
from .images_module_py3 import ImagesModule
from .image_module_action_py3 import ImageModuleAction
from .recipe_py3 import Recipe
from .recipes_module_py3 import RecipesModule
from .image_recipes_action_py3 import ImageRecipesAction
from .query_py3 import Query
from .related_searches_module_py3 import RelatedSearchesModule
from .image_related_searches_action_py3 import ImageRelatedSearchesAction
from .image_shopping_sources_action_py3 import ImageShoppingSourcesAction
from .structured_value_py3 import StructuredValue
from .properties_item_py3 import PropertiesItem
from .rating_py3 import Rating
from .crop_area_py3 import CropArea
from .image_info_py3 import ImageInfo
from .filters_py3 import Filters
from .knowledge_request_py3 import KnowledgeRequest
from .visual_search_request_py3 import VisualSearchRequest
except (SyntaxError, ImportError):
from .point2_d import Point2D
from .normalized_quadrilateral import NormalizedQuadrilateral
from .image_tag_region import ImageTagRegion
from .image_action import ImageAction
from .image_tag import ImageTag
from .organization import Organization
from .aggregate_rating import AggregateRating
from .offer import Offer
from .aggregate_offer import AggregateOffer
from .images_image_metadata import ImagesImageMetadata
from .image_object import ImageObject
from .image_knowledge import ImageKnowledge
from .response import Response
from .identifiable import Identifiable
from .error import Error
from .error_response import ErrorResponse, ErrorResponseException
from .thing import Thing
from .action import Action
from .media_object import MediaObject
from .response_base import ResponseBase
from .creative_work import CreativeWork
from .person import Person
from .intangible import Intangible
from .image_entity_action import ImageEntityAction
from .images_module import ImagesModule
from .image_module_action import ImageModuleAction
from .recipe import Recipe
from .recipes_module import RecipesModule
from .image_recipes_action import ImageRecipesAction
from .query import Query
from .related_searches_module import RelatedSearchesModule
from .image_related_searches_action import ImageRelatedSearchesAction
from .image_shopping_sources_action import ImageShoppingSourcesAction
from .structured_value import StructuredValue
from .properties_item import PropertiesItem
from .rating import Rating
from .crop_area import CropArea
from .image_info import ImageInfo
from .filters import Filters
from .knowledge_request import KnowledgeRequest
from .visual_search_request import VisualSearchRequest
from .visual_search_api_enums import (
Currency,
ItemAvailability,
ErrorCode,
ErrorSubCode,
)

__all__ = [
'Point2D',
'NormalizedQuadrilateral',
'ImageTagRegion',
'ImageAction',
'ImageTag',
'Organization',
'AggregateRating',
'Offer',
'AggregateOffer',
'ImagesImageMetadata',
'ImageObject',
'ImageKnowledge',
'Response',
'Identifiable',
'Error',
'ErrorResponse', 'ErrorResponseException',
'Thing',
'Action',
'MediaObject',
'ResponseBase',
'CreativeWork',
'Person',
'Intangible',
'ImageEntityAction',
'ImagesModule',
'ImageModuleAction',
'Recipe',
'RecipesModule',
'ImageRecipesAction',
'Query',
'RelatedSearchesModule',
'ImageRelatedSearchesAction',
'ImageShoppingSourcesAction',
'StructuredValue',
'PropertiesItem',
'Rating',
'CropArea',
'ImageInfo',
'Filters',
'KnowledgeRequest',
'VisualSearchRequest',
'Currency',
'ItemAvailability',
'ErrorCode',
'ErrorSubCode',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .creative_work import CreativeWork


class Action(CreativeWork):
"""Action.

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

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

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

:param _type: Required. Constant filled by server.
:type _type: str
:ivar id: A String identifier.
:vartype id: str
:ivar read_link: The URL that returns this resource. To use the URL,
append query parameters as appropriate and include the
Ocp-Apim-Subscription-Key header.
:vartype read_link: str
:ivar web_search_url: The URL to Bing's search result for this item.
:vartype web_search_url: str
:ivar name: The name of the thing represented by this object.
:vartype name: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar image: An image of the item.
:vartype image:
~azure.cognitiveservices.search.visualsearch.models.ImageObject
:ivar description: A short description of the item.
:vartype description: str
:ivar alternate_name: An alias for the item.
:vartype alternate_name: str
:ivar bing_id: An ID that uniquely identifies this item.
:vartype bing_id: str
:ivar thumbnail_url: The URL to a thumbnail of the item.
:vartype thumbnail_url: str
:ivar provider: The source of the creative work.
:vartype provider:
list[~azure.cognitiveservices.search.visualsearch.models.Thing]
:ivar date_published: The date on which the CreativeWork was published.
:vartype date_published: str
:ivar text: Text content of this creative work.
:vartype text: str
:ivar result: The result produced in the action.
:vartype result:
list[~azure.cognitiveservices.search.visualsearch.models.Thing]
:ivar display_name: A display name for the action.
:vartype display_name: str
:ivar is_top_action: A Boolean representing whether this result is the top
action.
:vartype is_top_action: bool
:ivar service_url: Use this URL to get additional data to determine how to
take the appropriate action. For example, the serviceUrl might return JSON
along with an image URL.
:vartype service_url: str
"""

_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'read_link': {'readonly': True},
'web_search_url': {'readonly': True},
'name': {'readonly': True},
'url': {'readonly': True},
'image': {'readonly': True},
'description': {'readonly': True},
'alternate_name': {'readonly': True},
'bing_id': {'readonly': True},
'thumbnail_url': {'readonly': True},
'provider': {'readonly': True},
'date_published': {'readonly': True},
'text': {'readonly': True},
'result': {'readonly': True},
'display_name': {'readonly': True},
'is_top_action': {'readonly': True},
'service_url': {'readonly': True},
}

_attribute_map = {
'_type': {'key': '_type', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'read_link': {'key': 'readLink', 'type': 'str'},
'web_search_url': {'key': 'webSearchUrl', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'image': {'key': 'image', 'type': 'ImageObject'},
'description': {'key': 'description', 'type': 'str'},
'alternate_name': {'key': 'alternateName', 'type': 'str'},
'bing_id': {'key': 'bingId', 'type': 'str'},
'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'},
'provider': {'key': 'provider', 'type': '[Thing]'},
'date_published': {'key': 'datePublished', 'type': 'str'},
'text': {'key': 'text', 'type': 'str'},
'result': {'key': 'result', 'type': '[Thing]'},
'display_name': {'key': 'displayName', 'type': 'str'},
'is_top_action': {'key': 'isTopAction', 'type': 'bool'},
'service_url': {'key': 'serviceUrl', 'type': 'str'},
}

_subtype_map = {
'_type': {'ImageAction': 'ImageAction'}
}

def __init__(self, **kwargs):
super(Action, self).__init__(**kwargs)
self.result = None
self.display_name = None
self.is_top_action = None
self.service_url = None
self._type = 'Action'
Loading