Skip to content

Commit

Permalink
Update to d95c18e (#18374)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyan99 authored Apr 28, 2021
1 parent 56e571e commit 487b8c9
Show file tree
Hide file tree
Showing 3 changed files with 587 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
from ._models_py3 import SearchIndexerDataContainer
from ._models_py3 import SearchIndexerDataSource
from ._models_py3 import SearchIndexerError
from ._models_py3 import SearchIndexerKnowledgeStore
from ._models_py3 import SearchIndexerKnowledgeStoreBlobProjectionSelector
from ._models_py3 import SearchIndexerKnowledgeStoreFileProjectionSelector
from ._models_py3 import SearchIndexerKnowledgeStoreObjectProjectionSelector
from ._models_py3 import SearchIndexerKnowledgeStoreProjection
from ._models_py3 import SearchIndexerKnowledgeStoreProjectionSelector
from ._models_py3 import SearchIndexerKnowledgeStoreTableProjectionSelector
from ._models_py3 import SearchIndexerLimits
from ._models_py3 import SearchIndexerSkill
from ._models_py3 import SearchIndexerSkillset
Expand Down Expand Up @@ -228,6 +235,13 @@
from ._models import SearchIndexerDataContainer # type: ignore
from ._models import SearchIndexerDataSource # type: ignore
from ._models import SearchIndexerError # type: ignore
from ._models import SearchIndexerKnowledgeStore # type: ignore
from ._models import SearchIndexerKnowledgeStoreBlobProjectionSelector # type: ignore
from ._models import SearchIndexerKnowledgeStoreFileProjectionSelector # type: ignore
from ._models import SearchIndexerKnowledgeStoreObjectProjectionSelector # type: ignore
from ._models import SearchIndexerKnowledgeStoreProjection # type: ignore
from ._models import SearchIndexerKnowledgeStoreProjectionSelector # type: ignore
from ._models import SearchIndexerKnowledgeStoreTableProjectionSelector # type: ignore
from ._models import SearchIndexerLimits # type: ignore
from ._models import SearchIndexerSkill # type: ignore
from ._models import SearchIndexerSkillset # type: ignore
Expand Down Expand Up @@ -398,6 +412,13 @@
'SearchIndexerDataContainer',
'SearchIndexerDataSource',
'SearchIndexerError',
'SearchIndexerKnowledgeStore',
'SearchIndexerKnowledgeStoreBlobProjectionSelector',
'SearchIndexerKnowledgeStoreFileProjectionSelector',
'SearchIndexerKnowledgeStoreObjectProjectionSelector',
'SearchIndexerKnowledgeStoreProjection',
'SearchIndexerKnowledgeStoreProjectionSelector',
'SearchIndexerKnowledgeStoreTableProjectionSelector',
'SearchIndexerLimits',
'SearchIndexerSkill',
'SearchIndexerSkillset',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4410,6 +4410,261 @@ def __init__(
self.documentation_link = None


class SearchIndexerKnowledgeStore(msrest.serialization.Model):
"""Definition of additional projections to azure blob, table, or files, of enriched data.
All required parameters must be populated in order to send to Azure.
:param storage_connection_string: Required. The connection string to the storage account
projections will be stored in.
:type storage_connection_string: str
:param projections: Required. A list of additional projections to perform during indexing.
:type projections:
list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreProjection]
"""

_validation = {
'storage_connection_string': {'required': True},
'projections': {'required': True},
}

_attribute_map = {
'storage_connection_string': {'key': 'storageConnectionString', 'type': 'str'},
'projections': {'key': 'projections', 'type': '[SearchIndexerKnowledgeStoreProjection]'},
}

def __init__(
self,
**kwargs
):
super(SearchIndexerKnowledgeStore, self).__init__(**kwargs)
self.storage_connection_string = kwargs['storage_connection_string']
self.projections = kwargs['projections']


class SearchIndexerKnowledgeStoreProjectionSelector(msrest.serialization.Model):
"""Abstract class to share properties between concrete selectors.
:param reference_key_name: Name of reference key to different projection.
:type reference_key_name: str
:param generated_key_name: Name of generated key to store projection under.
:type generated_key_name: str
:param source: Source data to project.
:type source: str
:param source_context: Source context for complex projections.
:type source_context: str
:param inputs: Nested inputs for complex projections.
:type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
"""

_attribute_map = {
'reference_key_name': {'key': 'referenceKeyName', 'type': 'str'},
'generated_key_name': {'key': 'generatedKeyName', 'type': 'str'},
'source': {'key': 'source', 'type': 'str'},
'source_context': {'key': 'sourceContext', 'type': 'str'},
'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'},
}

def __init__(
self,
**kwargs
):
super(SearchIndexerKnowledgeStoreProjectionSelector, self).__init__(**kwargs)
self.reference_key_name = kwargs.get('reference_key_name', None)
self.generated_key_name = kwargs.get('generated_key_name', None)
self.source = kwargs.get('source', None)
self.source_context = kwargs.get('source_context', None)
self.inputs = kwargs.get('inputs', None)


class SearchIndexerKnowledgeStoreBlobProjectionSelector(SearchIndexerKnowledgeStoreProjectionSelector):
"""Abstract class to share properties between concrete selectors.
All required parameters must be populated in order to send to Azure.
:param reference_key_name: Name of reference key to different projection.
:type reference_key_name: str
:param generated_key_name: Name of generated key to store projection under.
:type generated_key_name: str
:param source: Source data to project.
:type source: str
:param source_context: Source context for complex projections.
:type source_context: str
:param inputs: Nested inputs for complex projections.
:type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
:param storage_container: Required. Blob container to store projections in.
:type storage_container: str
"""

_validation = {
'storage_container': {'required': True},
}

_attribute_map = {
'reference_key_name': {'key': 'referenceKeyName', 'type': 'str'},
'generated_key_name': {'key': 'generatedKeyName', 'type': 'str'},
'source': {'key': 'source', 'type': 'str'},
'source_context': {'key': 'sourceContext', 'type': 'str'},
'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'},
'storage_container': {'key': 'storageContainer', 'type': 'str'},
}

def __init__(
self,
**kwargs
):
super(SearchIndexerKnowledgeStoreBlobProjectionSelector, self).__init__(**kwargs)
self.storage_container = kwargs['storage_container']


class SearchIndexerKnowledgeStoreFileProjectionSelector(SearchIndexerKnowledgeStoreBlobProjectionSelector):
"""Projection definition for what data to store in Azure Files.
All required parameters must be populated in order to send to Azure.
:param reference_key_name: Name of reference key to different projection.
:type reference_key_name: str
:param generated_key_name: Name of generated key to store projection under.
:type generated_key_name: str
:param source: Source data to project.
:type source: str
:param source_context: Source context for complex projections.
:type source_context: str
:param inputs: Nested inputs for complex projections.
:type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
:param storage_container: Required. Blob container to store projections in.
:type storage_container: str
"""

_validation = {
'storage_container': {'required': True},
}

_attribute_map = {
'reference_key_name': {'key': 'referenceKeyName', 'type': 'str'},
'generated_key_name': {'key': 'generatedKeyName', 'type': 'str'},
'source': {'key': 'source', 'type': 'str'},
'source_context': {'key': 'sourceContext', 'type': 'str'},
'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'},
'storage_container': {'key': 'storageContainer', 'type': 'str'},
}

def __init__(
self,
**kwargs
):
super(SearchIndexerKnowledgeStoreFileProjectionSelector, self).__init__(**kwargs)


class SearchIndexerKnowledgeStoreObjectProjectionSelector(SearchIndexerKnowledgeStoreBlobProjectionSelector):
"""Projection definition for what data to store in Azure Blob.
All required parameters must be populated in order to send to Azure.
:param reference_key_name: Name of reference key to different projection.
:type reference_key_name: str
:param generated_key_name: Name of generated key to store projection under.
:type generated_key_name: str
:param source: Source data to project.
:type source: str
:param source_context: Source context for complex projections.
:type source_context: str
:param inputs: Nested inputs for complex projections.
:type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
:param storage_container: Required. Blob container to store projections in.
:type storage_container: str
"""

_validation = {
'storage_container': {'required': True},
}

_attribute_map = {
'reference_key_name': {'key': 'referenceKeyName', 'type': 'str'},
'generated_key_name': {'key': 'generatedKeyName', 'type': 'str'},
'source': {'key': 'source', 'type': 'str'},
'source_context': {'key': 'sourceContext', 'type': 'str'},
'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'},
'storage_container': {'key': 'storageContainer', 'type': 'str'},
}

def __init__(
self,
**kwargs
):
super(SearchIndexerKnowledgeStoreObjectProjectionSelector, self).__init__(**kwargs)


class SearchIndexerKnowledgeStoreProjection(msrest.serialization.Model):
"""Container object for various projection selectors.
:param tables: Projections to Azure Table storage.
:type tables:
list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreTableProjectionSelector]
:param objects: Projections to Azure Blob storage.
:type objects:
list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreObjectProjectionSelector]
:param files: Projections to Azure File storage.
:type files:
list[~azure.search.documents.indexes.models.SearchIndexerKnowledgeStoreFileProjectionSelector]
"""

_attribute_map = {
'tables': {'key': 'tables', 'type': '[SearchIndexerKnowledgeStoreTableProjectionSelector]'},
'objects': {'key': 'objects', 'type': '[SearchIndexerKnowledgeStoreObjectProjectionSelector]'},
'files': {'key': 'files', 'type': '[SearchIndexerKnowledgeStoreFileProjectionSelector]'},
}

def __init__(
self,
**kwargs
):
super(SearchIndexerKnowledgeStoreProjection, self).__init__(**kwargs)
self.tables = kwargs.get('tables', None)
self.objects = kwargs.get('objects', None)
self.files = kwargs.get('files', None)


class SearchIndexerKnowledgeStoreTableProjectionSelector(SearchIndexerKnowledgeStoreProjectionSelector):
"""Description for what data to store in Azure Tables.
All required parameters must be populated in order to send to Azure.
:param reference_key_name: Name of reference key to different projection.
:type reference_key_name: str
:param generated_key_name: Name of generated key to store projection under.
:type generated_key_name: str
:param source: Source data to project.
:type source: str
:param source_context: Source context for complex projections.
:type source_context: str
:param inputs: Nested inputs for complex projections.
:type inputs: list[~azure.search.documents.indexes.models.InputFieldMappingEntry]
:param table_name: Required. Name of the Azure table to store projected data in.
:type table_name: str
"""

_validation = {
'table_name': {'required': True},
}

_attribute_map = {
'reference_key_name': {'key': 'referenceKeyName', 'type': 'str'},
'generated_key_name': {'key': 'generatedKeyName', 'type': 'str'},
'source': {'key': 'source', 'type': 'str'},
'source_context': {'key': 'sourceContext', 'type': 'str'},
'inputs': {'key': 'inputs', 'type': '[InputFieldMappingEntry]'},
'table_name': {'key': 'tableName', 'type': 'str'},
}

def __init__(
self,
**kwargs
):
super(SearchIndexerKnowledgeStoreTableProjectionSelector, self).__init__(**kwargs)
self.table_name = kwargs['table_name']


class SearchIndexerLimits(msrest.serialization.Model):
"""SearchIndexerLimits.
Expand Down Expand Up @@ -4463,6 +4718,9 @@ class SearchIndexerSkillset(msrest.serialization.Model):
skills.
:type cognitive_services_account:
~azure.search.documents.indexes.models.CognitiveServicesAccount
:param knowledge_store: Definition of additional projections to azure blob, table, or files, of
enriched data.
:type knowledge_store: ~azure.search.documents.indexes.models.SearchIndexerKnowledgeStore
:param e_tag: The ETag of the skillset.
:type e_tag: str
:param encryption_key: A description of an encryption key that you create in Azure Key Vault.
Expand All @@ -4487,6 +4745,7 @@ class SearchIndexerSkillset(msrest.serialization.Model):
'description': {'key': 'description', 'type': 'str'},
'skills': {'key': 'skills', 'type': '[SearchIndexerSkill]'},
'cognitive_services_account': {'key': 'cognitiveServices', 'type': 'CognitiveServicesAccount'},
'knowledge_store': {'key': 'knowledgeStore', 'type': 'SearchIndexerKnowledgeStore'},
'e_tag': {'key': '@odata\\.etag', 'type': 'str'},
'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'},
}
Expand All @@ -4500,6 +4759,7 @@ def __init__(
self.description = kwargs.get('description', None)
self.skills = kwargs['skills']
self.cognitive_services_account = kwargs.get('cognitive_services_account', None)
self.knowledge_store = kwargs.get('knowledge_store', None)
self.e_tag = kwargs.get('e_tag', None)
self.encryption_key = kwargs.get('encryption_key', None)

Expand Down Expand Up @@ -4717,7 +4977,7 @@ class ServiceCounters(msrest.serialization.Model):
:type storage_size_counter: ~azure.search.documents.indexes.models.ResourceCounter
:param synonym_map_counter: Required. Total number of synonym maps.
:type synonym_map_counter: ~azure.search.documents.indexes.models.ResourceCounter
:param skillset_counter: Required. Total number of skillsets.
:param skillset_counter: Total number of skillsets.
:type skillset_counter: ~azure.search.documents.indexes.models.ResourceCounter
"""

Expand All @@ -4728,7 +4988,6 @@ class ServiceCounters(msrest.serialization.Model):
'data_source_counter': {'required': True},
'storage_size_counter': {'required': True},
'synonym_map_counter': {'required': True},
'skillset_counter': {'required': True},
}

_attribute_map = {
Expand All @@ -4752,7 +5011,7 @@ def __init__(
self.data_source_counter = kwargs['data_source_counter']
self.storage_size_counter = kwargs['storage_size_counter']
self.synonym_map_counter = kwargs['synonym_map_counter']
self.skillset_counter = kwargs['skillset_counter']
self.skillset_counter = kwargs.get('skillset_counter', None)


class ServiceLimits(msrest.serialization.Model):
Expand Down
Loading

0 comments on commit 487b8c9

Please sign in to comment.