Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regenerate code from preview/2020-06-30 #14056

Merged
merged 1 commit into from
Oct 1, 2020
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
Expand Up @@ -57,6 +57,7 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class SearchIndexClient(object):
:type endpoint: str
:param index_name: The name of the index.
:type index_name: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

def __init__(
Expand All @@ -45,6 +44,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.documents = DocumentsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._search_index_client_async import SearchIndexClient
from ._search_index_client import SearchIndexClient
__all__ = ['SearchIndexClient']
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@
from azure.core import AsyncPipelineClient
from msrest import Deserializer, Serializer

from ._configuration_async import SearchIndexClientConfiguration
from .operations_async import DocumentsOperations
from ._configuration import SearchIndexClientConfiguration
from .operations import DocumentsOperations
from .. import models


class SearchIndexClient(object):
"""Client that can be used to query an index and upload, merge, or delete documents.

:ivar documents: DocumentsOperations operations
:vartype documents: azure.search.documents.aio.operations_async.DocumentsOperations
:vartype documents: azure.search.documents.aio.operations.DocumentsOperations
:param endpoint: The endpoint URL of the search service.
:type endpoint: str
:param index_name: The name of the index.
:type index_name: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

def __init__(
Expand All @@ -40,6 +39,7 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.documents = DocumentsOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._documents_operations_async import DocumentsOperations
from ._documents_operations import DocumentsOperations

__all__ = [
'DocumentsOperations',
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
AutocompleteMode,
IndexActionType,
QueryType,
ScoringStatistics,
SearchMode,
)

Expand All @@ -77,5 +78,6 @@
'AutocompleteMode',
'IndexActionType',
'QueryType',
'ScoringStatistics',
'SearchMode',
]
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,17 @@ class SearchOptions(msrest.serialization.Model):
:param search_mode: A value that specifies whether any or all of the search terms must be
matched in order to count the document as a match. Possible values include: "any", "all".
:type search_mode: str or ~azure.search.documents.models.SearchMode
:param scoring_statistics: A value that specifies whether we want to calculate scoring
statistics (such as document frequency) globally for more consistent scoring, or locally, for
lower latency. Possible values include: "local", "global".
:type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics
:param session_id: A value to be used to create a sticky session, which can help to get more
consistent results. As long as the same sessionId is used, a best-effort attempt will be made
to target the same replica set. Be wary that reusing the same sessionID values repeatedly can
interfere with the load balancing of the requests across replicas and adversely affect the
performance of the search service. The value used as sessionId cannot start with a '_'
character.
:type session_id: str
:param select: The list of fields to retrieve. If unspecified, all fields marked as retrievable
in the schema are included.
:type select: list[str]
Expand Down Expand Up @@ -569,6 +580,8 @@ class SearchOptions(msrest.serialization.Model):
'scoring_profile': {'key': 'scoringProfile', 'type': 'str'},
'search_fields': {'key': 'searchFields', 'type': '[str]'},
'search_mode': {'key': 'searchMode', 'type': 'str'},
'scoring_statistics': {'key': 'scoringStatistics', 'type': 'str'},
'session_id': {'key': 'sessionId', 'type': 'str'},
'select': {'key': '$select', 'type': '[str]'},
'skip': {'key': '$skip', 'type': 'int'},
'top': {'key': '$top', 'type': 'int'},
Expand All @@ -592,6 +605,8 @@ def __init__(
self.scoring_profile = kwargs.get('scoring_profile', None)
self.search_fields = kwargs.get('search_fields', None)
self.search_mode = kwargs.get('search_mode', None)
self.scoring_statistics = kwargs.get('scoring_statistics', None)
self.session_id = kwargs.get('session_id', None)
self.select = kwargs.get('select', None)
self.skip = kwargs.get('skip', None)
self.top = kwargs.get('top', None)
Expand Down Expand Up @@ -635,6 +650,19 @@ class SearchRequest(msrest.serialization.Model):
'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include:
"simple", "full".
:type query_type: str or ~azure.search.documents.models.QueryType
:param scoring_statistics: A value that specifies whether we want to calculate scoring
statistics (such as document frequency) globally for more consistent scoring, or locally, for
lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally
before scoring. Using global scoring statistics can increase latency of search queries.
Possible values include: "local", "global".
:type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics
:param session_id: A value to be used to create a sticky session, which can help getting more
consistent results. As long as the same sessionId is used, a best-effort attempt will be made
to target the same replica set. Be wary that reusing the same sessionID values repeatedly can
interfere with the load balancing of the requests across replicas and adversely affect the
performance of the search service. The value used as sessionId cannot start with a '_'
character.
:type session_id: str
:param scoring_parameters: The list of parameter values to be used in scoring functions (for
example, referencePointParameter) using the format name-values. For example, if the scoring
profile defines a function with a parameter called 'mylocation' the parameter string would be
Expand Down Expand Up @@ -678,6 +706,8 @@ class SearchRequest(msrest.serialization.Model):
'minimum_coverage': {'key': 'minimumCoverage', 'type': 'float'},
'order_by': {'key': 'orderby', 'type': 'str'},
'query_type': {'key': 'queryType', 'type': 'str'},
'scoring_statistics': {'key': 'scoringStatistics', 'type': 'str'},
'session_id': {'key': 'sessionId', 'type': 'str'},
'scoring_parameters': {'key': 'scoringParameters', 'type': '[str]'},
'scoring_profile': {'key': 'scoringProfile', 'type': 'str'},
'search_text': {'key': 'search', 'type': 'str'},
Expand All @@ -702,6 +732,8 @@ def __init__(
self.minimum_coverage = kwargs.get('minimum_coverage', None)
self.order_by = kwargs.get('order_by', None)
self.query_type = kwargs.get('query_type', None)
self.scoring_statistics = kwargs.get('scoring_statistics', None)
self.session_id = kwargs.get('session_id', None)
self.scoring_parameters = kwargs.get('scoring_parameters', None)
self.scoring_profile = kwargs.get('scoring_profile', None)
self.search_text = kwargs.get('search_text', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,17 @@ class SearchOptions(msrest.serialization.Model):
:param search_mode: A value that specifies whether any or all of the search terms must be
matched in order to count the document as a match. Possible values include: "any", "all".
:type search_mode: str or ~azure.search.documents.models.SearchMode
:param scoring_statistics: A value that specifies whether we want to calculate scoring
statistics (such as document frequency) globally for more consistent scoring, or locally, for
lower latency. Possible values include: "local", "global".
:type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics
:param session_id: A value to be used to create a sticky session, which can help to get more
consistent results. As long as the same sessionId is used, a best-effort attempt will be made
to target the same replica set. Be wary that reusing the same sessionID values repeatedly can
interfere with the load balancing of the requests across replicas and adversely affect the
performance of the search service. The value used as sessionId cannot start with a '_'
character.
:type session_id: str
:param select: The list of fields to retrieve. If unspecified, all fields marked as retrievable
in the schema are included.
:type select: list[str]
Expand Down Expand Up @@ -602,6 +613,8 @@ class SearchOptions(msrest.serialization.Model):
'scoring_profile': {'key': 'scoringProfile', 'type': 'str'},
'search_fields': {'key': 'searchFields', 'type': '[str]'},
'search_mode': {'key': 'searchMode', 'type': 'str'},
'scoring_statistics': {'key': 'scoringStatistics', 'type': 'str'},
'session_id': {'key': 'sessionId', 'type': 'str'},
'select': {'key': '$select', 'type': '[str]'},
'skip': {'key': '$skip', 'type': 'int'},
'top': {'key': '$top', 'type': 'int'},
Expand All @@ -623,6 +636,8 @@ def __init__(
scoring_profile: Optional[str] = None,
search_fields: Optional[List[str]] = None,
search_mode: Optional[Union[str, "SearchMode"]] = None,
scoring_statistics: Optional[Union[str, "ScoringStatistics"]] = None,
session_id: Optional[str] = None,
select: Optional[List[str]] = None,
skip: Optional[int] = None,
top: Optional[int] = None,
Expand All @@ -642,6 +657,8 @@ def __init__(
self.scoring_profile = scoring_profile
self.search_fields = search_fields
self.search_mode = search_mode
self.scoring_statistics = scoring_statistics
self.session_id = session_id
self.select = select
self.skip = skip
self.top = top
Expand Down Expand Up @@ -685,6 +702,19 @@ class SearchRequest(msrest.serialization.Model):
'simple'. Use 'full' if your query uses the Lucene query syntax. Possible values include:
"simple", "full".
:type query_type: str or ~azure.search.documents.models.QueryType
:param scoring_statistics: A value that specifies whether we want to calculate scoring
statistics (such as document frequency) globally for more consistent scoring, or locally, for
lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally
before scoring. Using global scoring statistics can increase latency of search queries.
Possible values include: "local", "global".
:type scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics
:param session_id: A value to be used to create a sticky session, which can help getting more
consistent results. As long as the same sessionId is used, a best-effort attempt will be made
to target the same replica set. Be wary that reusing the same sessionID values repeatedly can
interfere with the load balancing of the requests across replicas and adversely affect the
performance of the search service. The value used as sessionId cannot start with a '_'
character.
:type session_id: str
:param scoring_parameters: The list of parameter values to be used in scoring functions (for
example, referencePointParameter) using the format name-values. For example, if the scoring
profile defines a function with a parameter called 'mylocation' the parameter string would be
Expand Down Expand Up @@ -728,6 +758,8 @@ class SearchRequest(msrest.serialization.Model):
'minimum_coverage': {'key': 'minimumCoverage', 'type': 'float'},
'order_by': {'key': 'orderby', 'type': 'str'},
'query_type': {'key': 'queryType', 'type': 'str'},
'scoring_statistics': {'key': 'scoringStatistics', 'type': 'str'},
'session_id': {'key': 'sessionId', 'type': 'str'},
'scoring_parameters': {'key': 'scoringParameters', 'type': '[str]'},
'scoring_profile': {'key': 'scoringProfile', 'type': 'str'},
'search_text': {'key': 'search', 'type': 'str'},
Expand All @@ -750,6 +782,8 @@ def __init__(
minimum_coverage: Optional[float] = None,
order_by: Optional[str] = None,
query_type: Optional[Union[str, "QueryType"]] = None,
scoring_statistics: Optional[Union[str, "ScoringStatistics"]] = None,
session_id: Optional[str] = None,
scoring_parameters: Optional[List[str]] = None,
scoring_profile: Optional[str] = None,
search_text: Optional[str] = None,
Expand All @@ -770,6 +804,8 @@ def __init__(
self.minimum_coverage = minimum_coverage
self.order_by = order_by
self.query_type = query_type
self.scoring_statistics = scoring_statistics
self.session_id = session_id
self.scoring_parameters = scoring_parameters
self.scoring_profile = scoring_profile
self.search_text = search_text
Expand Down
Loading