Skip to content

Commit

Permalink
[AutoPR cognitiveservices/data-plane/AutoSuggest] Add bing AutoSugges…
Browse files Browse the repository at this point in the history
…t Spec (#2686)

* Generated from 3c97f2f096db0a70f33aefeea74399963aecf84b

update spec

* Generated from 78b0ffab51e34bd623178af8fbae067f755aa447

add name in SuggestionGroup

* Generated from 65c2b3d0a8d19d23482be01dec65f6618306470c

update spec

* Generated from 4a7c236ecccc70ae4476757aef255a56237d22ff

update spec

* Generated from 9c480eede855a9c96ace45a597f92e950c74c6ad

update spec
  • Loading branch information
AutorestCI committed Jul 19, 2018
1 parent df0e798 commit 65f062d
Show file tree
Hide file tree
Showing 33 changed files with 3,045 additions and 0 deletions.
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 .auto_suggest_search_api import AutoSuggestSearchAPI
from .version import VERSION

__all__ = ['AutoSuggestSearchAPI']

__version__ = VERSION

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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 .search_action_py3 import SearchAction
from .suggestions_suggestion_group_py3 import SuggestionsSuggestionGroup
from .suggestions_py3 import Suggestions
from .query_context_py3 import QueryContext
from .search_results_answer_py3 import SearchResultsAnswer
from .answer_py3 import Answer
from .thing_py3 import Thing
from .action_py3 import Action
from .response_py3 import Response
from .identifiable_py3 import Identifiable
from .error_py3 import Error
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .creative_work_py3 import CreativeWork
from .response_base_py3 import ResponseBase
except (SyntaxError, ImportError):
from .search_action import SearchAction
from .suggestions_suggestion_group import SuggestionsSuggestionGroup
from .suggestions import Suggestions
from .query_context import QueryContext
from .search_results_answer import SearchResultsAnswer
from .answer import Answer
from .thing import Thing
from .action import Action
from .response import Response
from .identifiable import Identifiable
from .error import Error
from .error_response import ErrorResponse, ErrorResponseException
from .creative_work import CreativeWork
from .response_base import ResponseBase
from .auto_suggest_search_api_enums import (
ScenarioType,
SearchKind,
ErrorCode,
SafeSearch,
ResponseFormat,
)

__all__ = [
'SearchAction',
'SuggestionsSuggestionGroup',
'Suggestions',
'QueryContext',
'SearchResultsAnswer',
'Answer',
'Thing',
'Action',
'Response',
'Identifiable',
'Error',
'ErrorResponse', 'ErrorResponseException',
'CreativeWork',
'ResponseBase',
'ScenarioType',
'SearchKind',
'ErrorCode',
'SafeSearch',
'ResponseFormat',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# 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: SearchAction
Variables are only 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 potential_action:
:vartype potential_action:
list[~azure.cognitiveservices.search.autosuggest.models.Action]
:ivar immediate_action:
:vartype immediate_action:
list[~azure.cognitiveservices.search.autosuggest.models.Action]
:ivar preferred_clickthrough_url:
:vartype preferred_clickthrough_url: str
:ivar adaptive_card:
:vartype adaptive_card: str
:ivar url: The URL to get more information about the thing represented by
this object.
:vartype url: str
:ivar thumbnail_url: The URL to a thumbnail of the item.
:vartype thumbnail_url: str
:ivar about: For internal use only.
:vartype about:
list[~azure.cognitiveservices.search.autosuggest.models.Thing]
:ivar mentions: For internal use only.
:vartype mentions:
list[~azure.cognitiveservices.search.autosuggest.models.Thing]
:ivar provider: The source of the creative work.
:vartype provider:
list[~azure.cognitiveservices.search.autosuggest.models.Thing]
:ivar creator:
:vartype creator: ~azure.cognitiveservices.search.autosuggest.models.Thing
:ivar text: Text content of this creative work
:vartype text: str
:ivar discussion_url:
:vartype discussion_url: str
:ivar comment_count:
:vartype comment_count: int
:ivar main_entity:
:vartype main_entity:
~azure.cognitiveservices.search.autosuggest.models.Thing
:ivar head_line:
:vartype head_line: str
:ivar copyright_holder:
:vartype copyright_holder:
~azure.cognitiveservices.search.autosuggest.models.Thing
:ivar copyright_year:
:vartype copyright_year: int
:ivar disclaimer:
:vartype disclaimer: str
:ivar is_accessible_for_free:
:vartype is_accessible_for_free: bool
:ivar genre:
:vartype genre: list[str]
:ivar is_family_friendly:
:vartype is_family_friendly: bool
:ivar result:
:vartype result:
list[~azure.cognitiveservices.search.autosuggest.models.Thing]
:ivar display_name:
:vartype display_name: str
:ivar is_top_action:
:vartype is_top_action: bool
:ivar service_url:
:vartype service_url: str
"""

_validation = {
'_type': {'required': True},
'id': {'readonly': True},
'read_link': {'readonly': True},
'web_search_url': {'readonly': True},
'potential_action': {'readonly': True},
'immediate_action': {'readonly': True},
'preferred_clickthrough_url': {'readonly': True},
'adaptive_card': {'readonly': True},
'url': {'readonly': True},
'thumbnail_url': {'readonly': True},
'about': {'readonly': True},
'mentions': {'readonly': True},
'provider': {'readonly': True},
'creator': {'readonly': True},
'text': {'readonly': True},
'discussion_url': {'readonly': True},
'comment_count': {'readonly': True},
'main_entity': {'readonly': True},
'head_line': {'readonly': True},
'copyright_holder': {'readonly': True},
'copyright_year': {'readonly': True},
'disclaimer': {'readonly': True},
'is_accessible_for_free': {'readonly': True},
'genre': {'readonly': True},
'is_family_friendly': {'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'},
'potential_action': {'key': 'potentialAction', 'type': '[Action]'},
'immediate_action': {'key': 'immediateAction', 'type': '[Action]'},
'preferred_clickthrough_url': {'key': 'preferredClickthroughUrl', 'type': 'str'},
'adaptive_card': {'key': 'adaptiveCard', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'thumbnail_url': {'key': 'thumbnailUrl', 'type': 'str'},
'about': {'key': 'about', 'type': '[Thing]'},
'mentions': {'key': 'mentions', 'type': '[Thing]'},
'provider': {'key': 'provider', 'type': '[Thing]'},
'creator': {'key': 'creator', 'type': 'Thing'},
'text': {'key': 'text', 'type': 'str'},
'discussion_url': {'key': 'discussionUrl', 'type': 'str'},
'comment_count': {'key': 'commentCount', 'type': 'int'},
'main_entity': {'key': 'mainEntity', 'type': 'Thing'},
'head_line': {'key': 'headLine', 'type': 'str'},
'copyright_holder': {'key': 'copyrightHolder', 'type': 'Thing'},
'copyright_year': {'key': 'copyrightYear', 'type': 'int'},
'disclaimer': {'key': 'disclaimer', 'type': 'str'},
'is_accessible_for_free': {'key': 'isAccessibleForFree', 'type': 'bool'},
'genre': {'key': 'genre', 'type': '[str]'},
'is_family_friendly': {'key': 'isFamilyFriendly', 'type': 'bool'},
'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': {'SearchAction': 'SearchAction'}
}

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

0 comments on commit 65f062d

Please sign in to comment.