Skip to content

Commit f5d3db0

Browse files
AutorestCIZim Kalinowski
authored andcommitted
[AutoPR datafactory/resource-manager] Enable Avro Dataset in public swagger (#6567)
* Generated from ec112148bf30430557ff3fac0c74f0706b1042de Enable Avro Dataset in public swagger * Generated from e41431428e45beaa5bbb12344d3332479c095e31 UPDATE
1 parent 9379260 commit f5d3db0

File tree

16 files changed

+551
-20
lines changed

16 files changed

+551
-20
lines changed

sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/__init__.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@
289289
from .binary_dataset_py3 import BinaryDataset
290290
from .delimited_text_dataset_py3 import DelimitedTextDataset
291291
from .parquet_dataset_py3 import ParquetDataset
292+
from .avro_dataset_py3 import AvroDataset
292293
from .amazon_s3_dataset_py3 import AmazonS3Dataset
293294
from .activity_policy_py3 import ActivityPolicy
294295
from .azure_function_activity_py3 import AzureFunctionActivity
@@ -403,6 +404,7 @@
403404
from .delimited_text_read_settings_py3 import DelimitedTextReadSettings
404405
from .delimited_text_source_py3 import DelimitedTextSource
405406
from .parquet_source_py3 import ParquetSource
407+
from .avro_source_py3 import AvroSource
406408
from .copy_source_py3 import CopySource
407409
from .lookup_activity_py3 import LookupActivity
408410
from .azure_data_explorer_command_activity_py3 import AzureDataExplorerCommandActivity
@@ -455,12 +457,14 @@
455457
from .azure_blob_storage_write_settings_py3 import AzureBlobStorageWriteSettings
456458
from .store_write_settings_py3 import StoreWriteSettings
457459
from .parquet_sink_py3 import ParquetSink
460+
from .delimited_text_write_settings_py3 import DelimitedTextWriteSettings
461+
from .format_write_settings_py3 import FormatWriteSettings
462+
from .avro_write_settings_py3 import AvroWriteSettings
463+
from .avro_sink_py3 import AvroSink
458464
from .azure_table_sink_py3 import AzureTableSink
459465
from .azure_queue_sink_py3 import AzureQueueSink
460466
from .sap_cloud_for_customer_sink_py3 import SapCloudForCustomerSink
461467
from .azure_postgre_sql_sink_py3 import AzurePostgreSqlSink
462-
from .format_write_settings_py3 import FormatWriteSettings
463-
from .delimited_text_write_settings_py3 import DelimitedTextWriteSettings
464468
from .delimited_text_sink_py3 import DelimitedTextSink
465469
from .copy_sink_py3 import CopySink
466470
from .copy_activity_py3 import CopyActivity
@@ -790,6 +794,7 @@
790794
from .binary_dataset import BinaryDataset
791795
from .delimited_text_dataset import DelimitedTextDataset
792796
from .parquet_dataset import ParquetDataset
797+
from .avro_dataset import AvroDataset
793798
from .amazon_s3_dataset import AmazonS3Dataset
794799
from .activity_policy import ActivityPolicy
795800
from .azure_function_activity import AzureFunctionActivity
@@ -904,6 +909,7 @@
904909
from .delimited_text_read_settings import DelimitedTextReadSettings
905910
from .delimited_text_source import DelimitedTextSource
906911
from .parquet_source import ParquetSource
912+
from .avro_source import AvroSource
907913
from .copy_source import CopySource
908914
from .lookup_activity import LookupActivity
909915
from .azure_data_explorer_command_activity import AzureDataExplorerCommandActivity
@@ -956,12 +962,14 @@
956962
from .azure_blob_storage_write_settings import AzureBlobStorageWriteSettings
957963
from .store_write_settings import StoreWriteSettings
958964
from .parquet_sink import ParquetSink
965+
from .delimited_text_write_settings import DelimitedTextWriteSettings
966+
from .format_write_settings import FormatWriteSettings
967+
from .avro_write_settings import AvroWriteSettings
968+
from .avro_sink import AvroSink
959969
from .azure_table_sink import AzureTableSink
960970
from .azure_queue_sink import AzureQueueSink
961971
from .sap_cloud_for_customer_sink import SapCloudForCustomerSink
962972
from .azure_postgre_sql_sink import AzurePostgreSqlSink
963-
from .format_write_settings import FormatWriteSettings
964-
from .delimited_text_write_settings import DelimitedTextWriteSettings
965973
from .delimited_text_sink import DelimitedTextSink
966974
from .copy_sink import CopySink
967975
from .copy_activity import CopyActivity
@@ -1062,6 +1070,7 @@
10621070
SybaseAuthenticationType,
10631071
DynamicsDeploymentType,
10641072
DynamicsAuthenticationType,
1073+
AvroCompressionCodec,
10651074
AzureFunctionActivityMethod,
10661075
WebActivityMethod,
10671076
NetezzaPartitionOption,
@@ -1371,6 +1380,7 @@
13711380
'BinaryDataset',
13721381
'DelimitedTextDataset',
13731382
'ParquetDataset',
1383+
'AvroDataset',
13741384
'AmazonS3Dataset',
13751385
'ActivityPolicy',
13761386
'AzureFunctionActivity',
@@ -1485,6 +1495,7 @@
14851495
'DelimitedTextReadSettings',
14861496
'DelimitedTextSource',
14871497
'ParquetSource',
1498+
'AvroSource',
14881499
'CopySource',
14891500
'LookupActivity',
14901501
'AzureDataExplorerCommandActivity',
@@ -1537,12 +1548,14 @@
15371548
'AzureBlobStorageWriteSettings',
15381549
'StoreWriteSettings',
15391550
'ParquetSink',
1551+
'DelimitedTextWriteSettings',
1552+
'FormatWriteSettings',
1553+
'AvroWriteSettings',
1554+
'AvroSink',
15401555
'AzureTableSink',
15411556
'AzureQueueSink',
15421557
'SapCloudForCustomerSink',
15431558
'AzurePostgreSqlSink',
1544-
'FormatWriteSettings',
1545-
'DelimitedTextWriteSettings',
15461559
'DelimitedTextSink',
15471560
'CopySink',
15481561
'CopyActivity',
@@ -1642,6 +1655,7 @@
16421655
'SybaseAuthenticationType',
16431656
'DynamicsDeploymentType',
16441657
'DynamicsAuthenticationType',
1658+
'AvroCompressionCodec',
16451659
'AzureFunctionActivityMethod',
16461660
'WebActivityMethod',
16471661
'NetezzaPartitionOption',
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .dataset import Dataset
13+
14+
15+
class AvroDataset(Dataset):
16+
"""Avro dataset.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param additional_properties: Unmatched properties from the message are
21+
deserialized this collection
22+
:type additional_properties: dict[str, object]
23+
:param description: Dataset description.
24+
:type description: str
25+
:param structure: Columns that define the structure of the dataset. Type:
26+
array (or Expression with resultType array), itemType: DatasetDataElement.
27+
:type structure: object
28+
:param schema: Columns that define the physical type schema of the
29+
dataset. Type: array (or Expression with resultType array), itemType:
30+
DatasetSchemaDataElement.
31+
:type schema: object
32+
:param linked_service_name: Required. Linked service reference.
33+
:type linked_service_name:
34+
~azure.mgmt.datafactory.models.LinkedServiceReference
35+
:param parameters: Parameters for dataset.
36+
:type parameters: dict[str,
37+
~azure.mgmt.datafactory.models.ParameterSpecification]
38+
:param annotations: List of tags that can be used for describing the
39+
Dataset.
40+
:type annotations: list[object]
41+
:param folder: The folder that this Dataset is in. If not specified,
42+
Dataset will appear at the root level.
43+
:type folder: ~azure.mgmt.datafactory.models.DatasetFolder
44+
:param type: Required. Constant filled by server.
45+
:type type: str
46+
:param location: Required. The location of the avro storage.
47+
:type location: ~azure.mgmt.datafactory.models.DatasetLocation
48+
:param avro_compression_codec: Possible values include: 'none', 'deflate',
49+
'snappy', 'xz', 'bzip2'
50+
:type avro_compression_codec: str or
51+
~azure.mgmt.datafactory.models.AvroCompressionCodec
52+
:param avro_compression_level:
53+
:type avro_compression_level: int
54+
"""
55+
56+
_validation = {
57+
'linked_service_name': {'required': True},
58+
'type': {'required': True},
59+
'location': {'required': True},
60+
'avro_compression_level': {'maximum': 9, 'minimum': 1},
61+
}
62+
63+
_attribute_map = {
64+
'additional_properties': {'key': '', 'type': '{object}'},
65+
'description': {'key': 'description', 'type': 'str'},
66+
'structure': {'key': 'structure', 'type': 'object'},
67+
'schema': {'key': 'schema', 'type': 'object'},
68+
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'},
69+
'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'},
70+
'annotations': {'key': 'annotations', 'type': '[object]'},
71+
'folder': {'key': 'folder', 'type': 'DatasetFolder'},
72+
'type': {'key': 'type', 'type': 'str'},
73+
'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'},
74+
'avro_compression_codec': {'key': 'typeProperties.avroCompressionCodec', 'type': 'str'},
75+
'avro_compression_level': {'key': 'typeProperties.avroCompressionLevel', 'type': 'int'},
76+
}
77+
78+
def __init__(self, **kwargs):
79+
super(AvroDataset, self).__init__(**kwargs)
80+
self.location = kwargs.get('location', None)
81+
self.avro_compression_codec = kwargs.get('avro_compression_codec', None)
82+
self.avro_compression_level = kwargs.get('avro_compression_level', None)
83+
self.type = 'Avro'
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .dataset_py3 import Dataset
13+
14+
15+
class AvroDataset(Dataset):
16+
"""Avro dataset.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param additional_properties: Unmatched properties from the message are
21+
deserialized this collection
22+
:type additional_properties: dict[str, object]
23+
:param description: Dataset description.
24+
:type description: str
25+
:param structure: Columns that define the structure of the dataset. Type:
26+
array (or Expression with resultType array), itemType: DatasetDataElement.
27+
:type structure: object
28+
:param schema: Columns that define the physical type schema of the
29+
dataset. Type: array (or Expression with resultType array), itemType:
30+
DatasetSchemaDataElement.
31+
:type schema: object
32+
:param linked_service_name: Required. Linked service reference.
33+
:type linked_service_name:
34+
~azure.mgmt.datafactory.models.LinkedServiceReference
35+
:param parameters: Parameters for dataset.
36+
:type parameters: dict[str,
37+
~azure.mgmt.datafactory.models.ParameterSpecification]
38+
:param annotations: List of tags that can be used for describing the
39+
Dataset.
40+
:type annotations: list[object]
41+
:param folder: The folder that this Dataset is in. If not specified,
42+
Dataset will appear at the root level.
43+
:type folder: ~azure.mgmt.datafactory.models.DatasetFolder
44+
:param type: Required. Constant filled by server.
45+
:type type: str
46+
:param location: Required. The location of the avro storage.
47+
:type location: ~azure.mgmt.datafactory.models.DatasetLocation
48+
:param avro_compression_codec: Possible values include: 'none', 'deflate',
49+
'snappy', 'xz', 'bzip2'
50+
:type avro_compression_codec: str or
51+
~azure.mgmt.datafactory.models.AvroCompressionCodec
52+
:param avro_compression_level:
53+
:type avro_compression_level: int
54+
"""
55+
56+
_validation = {
57+
'linked_service_name': {'required': True},
58+
'type': {'required': True},
59+
'location': {'required': True},
60+
'avro_compression_level': {'maximum': 9, 'minimum': 1},
61+
}
62+
63+
_attribute_map = {
64+
'additional_properties': {'key': '', 'type': '{object}'},
65+
'description': {'key': 'description', 'type': 'str'},
66+
'structure': {'key': 'structure', 'type': 'object'},
67+
'schema': {'key': 'schema', 'type': 'object'},
68+
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'},
69+
'parameters': {'key': 'parameters', 'type': '{ParameterSpecification}'},
70+
'annotations': {'key': 'annotations', 'type': '[object]'},
71+
'folder': {'key': 'folder', 'type': 'DatasetFolder'},
72+
'type': {'key': 'type', 'type': 'str'},
73+
'location': {'key': 'typeProperties.location', 'type': 'DatasetLocation'},
74+
'avro_compression_codec': {'key': 'typeProperties.avroCompressionCodec', 'type': 'str'},
75+
'avro_compression_level': {'key': 'typeProperties.avroCompressionLevel', 'type': 'int'},
76+
}
77+
78+
def __init__(self, *, linked_service_name, location, additional_properties=None, description: str=None, structure=None, schema=None, parameters=None, annotations=None, folder=None, avro_compression_codec=None, avro_compression_level: int=None, **kwargs) -> None:
79+
super(AvroDataset, self).__init__(additional_properties=additional_properties, description=description, structure=structure, schema=schema, linked_service_name=linked_service_name, parameters=parameters, annotations=annotations, folder=folder, **kwargs)
80+
self.location = location
81+
self.avro_compression_codec = avro_compression_codec
82+
self.avro_compression_level = avro_compression_level
83+
self.type = 'Avro'
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .copy_sink import CopySink
13+
14+
15+
class AvroSink(CopySink):
16+
"""A copy activity Avro sink.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param additional_properties: Unmatched properties from the message are
21+
deserialized this collection
22+
:type additional_properties: dict[str, object]
23+
:param write_batch_size: Write batch size. Type: integer (or Expression
24+
with resultType integer), minimum: 0.
25+
:type write_batch_size: object
26+
:param write_batch_timeout: Write batch timeout. Type: string (or
27+
Expression with resultType string), pattern:
28+
((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
29+
:type write_batch_timeout: object
30+
:param sink_retry_count: Sink retry count. Type: integer (or Expression
31+
with resultType integer).
32+
:type sink_retry_count: object
33+
:param sink_retry_wait: Sink retry wait. Type: string (or Expression with
34+
resultType string), pattern:
35+
((\\d+)\\.)?(\\d\\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
36+
:type sink_retry_wait: object
37+
:param max_concurrent_connections: The maximum concurrent connection count
38+
for the sink data store. Type: integer (or Expression with resultType
39+
integer).
40+
:type max_concurrent_connections: object
41+
:param type: Required. Constant filled by server.
42+
:type type: str
43+
:param store_settings: Avro store settings.
44+
:type store_settings: ~azure.mgmt.datafactory.models.StoreWriteSettings
45+
:param format_settings: Avro format settings.
46+
:type format_settings: ~azure.mgmt.datafactory.models.AvroWriteSettings
47+
"""
48+
49+
_validation = {
50+
'type': {'required': True},
51+
}
52+
53+
_attribute_map = {
54+
'additional_properties': {'key': '', 'type': '{object}'},
55+
'write_batch_size': {'key': 'writeBatchSize', 'type': 'object'},
56+
'write_batch_timeout': {'key': 'writeBatchTimeout', 'type': 'object'},
57+
'sink_retry_count': {'key': 'sinkRetryCount', 'type': 'object'},
58+
'sink_retry_wait': {'key': 'sinkRetryWait', 'type': 'object'},
59+
'max_concurrent_connections': {'key': 'maxConcurrentConnections', 'type': 'object'},
60+
'type': {'key': 'type', 'type': 'str'},
61+
'store_settings': {'key': 'storeSettings', 'type': 'StoreWriteSettings'},
62+
'format_settings': {'key': 'formatSettings', 'type': 'AvroWriteSettings'},
63+
}
64+
65+
def __init__(self, **kwargs):
66+
super(AvroSink, self).__init__(**kwargs)
67+
self.store_settings = kwargs.get('store_settings', None)
68+
self.format_settings = kwargs.get('format_settings', None)
69+
self.type = 'AvroSink'

0 commit comments

Comments
 (0)