Skip to content

Commit

Permalink
[AutoPR datafactory/resource-manager] Refactor delete activity payload (
Browse files Browse the repository at this point in the history
#3983)

* Generated from 6effad585c2bd2f1de30e2c6e5467750384a3d0b

Refactor delete activity content

* Generated from fd13d7e45b8d65c0f81299d8ef0e5f977d1f149a

Update
  • Loading branch information
AutorestCI authored Dec 6, 2018
1 parent b335e0b commit df51f3b
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
from .azure_table_source_py3 import AzureTableSource
from .copy_source_py3 import CopySource
from .lookup_activity_py3 import LookupActivity
from .log_storage_settings_py3 import LogStorageSettings
from .delete_activity_py3 import DeleteActivity
from .sql_server_stored_procedure_activity_py3 import SqlServerStoredProcedureActivity
from .custom_activity_reference_object_py3 import CustomActivityReferenceObject
Expand Down Expand Up @@ -652,6 +653,7 @@
from .azure_table_source import AzureTableSource
from .copy_source import CopySource
from .lookup_activity import LookupActivity
from .log_storage_settings import LogStorageSettings
from .delete_activity import DeleteActivity
from .sql_server_stored_procedure_activity import SqlServerStoredProcedureActivity
from .custom_activity_reference_object import CustomActivityReferenceObject
Expand Down Expand Up @@ -1077,6 +1079,7 @@
'AzureTableSource',
'CopySource',
'LookupActivity',
'LogStorageSettings',
'DeleteActivity',
'SqlServerStoredProcedureActivity',
'CustomActivityReferenceObject',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,29 @@ class DeleteActivity(ExecutionActivity):
~azure.mgmt.datafactory.models.LinkedServiceReference
:param policy: Activity policy.
:type policy: ~azure.mgmt.datafactory.models.ActivityPolicy
:param recursive: If true, files under the folder path will be deleted
recursively. Default is true. Type: boolean (or Expression with resultType
boolean).
:param recursive: If true, files or sub-folders under current folder path
will be deleted recursively. Default is false. Type: boolean (or
Expression with resultType boolean).
:type recursive: object
:param max_concurrent_connections: The max concurrent connections to
connect data source at the same time.
:type max_concurrent_connections: int
:param enable_logging: Whether to record detailed logs of delete-activity
execution. Default value is false. Type: boolean (or Expression with
resultType boolean).
:type enable_logging: object
:param log_storage_settings: Log storage settings customer need to provide
when enableLogging is true.
:type log_storage_settings:
~azure.mgmt.datafactory.models.LogStorageSettings
:param dataset: Required. Delete activity dataset reference.
:type dataset: ~azure.mgmt.datafactory.models.DatasetReference
"""

_validation = {
'name': {'required': True},
'type': {'required': True},
'max_concurrent_connections': {'minimum': 1},
'dataset': {'required': True},
}

Expand All @@ -59,11 +71,17 @@ class DeleteActivity(ExecutionActivity):
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'},
'policy': {'key': 'policy', 'type': 'ActivityPolicy'},
'recursive': {'key': 'typeProperties.recursive', 'type': 'object'},
'max_concurrent_connections': {'key': 'typeProperties.maxConcurrentConnections', 'type': 'int'},
'enable_logging': {'key': 'typeProperties.enableLogging', 'type': 'object'},
'log_storage_settings': {'key': 'typeProperties.logStorageSettings', 'type': 'LogStorageSettings'},
'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'},
}

def __init__(self, **kwargs):
super(DeleteActivity, self).__init__(**kwargs)
self.recursive = kwargs.get('recursive', None)
self.max_concurrent_connections = kwargs.get('max_concurrent_connections', None)
self.enable_logging = kwargs.get('enable_logging', None)
self.log_storage_settings = kwargs.get('log_storage_settings', None)
self.dataset = kwargs.get('dataset', None)
self.type = 'Delete'
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,29 @@ class DeleteActivity(ExecutionActivity):
~azure.mgmt.datafactory.models.LinkedServiceReference
:param policy: Activity policy.
:type policy: ~azure.mgmt.datafactory.models.ActivityPolicy
:param recursive: If true, files under the folder path will be deleted
recursively. Default is true. Type: boolean (or Expression with resultType
boolean).
:param recursive: If true, files or sub-folders under current folder path
will be deleted recursively. Default is false. Type: boolean (or
Expression with resultType boolean).
:type recursive: object
:param max_concurrent_connections: The max concurrent connections to
connect data source at the same time.
:type max_concurrent_connections: int
:param enable_logging: Whether to record detailed logs of delete-activity
execution. Default value is false. Type: boolean (or Expression with
resultType boolean).
:type enable_logging: object
:param log_storage_settings: Log storage settings customer need to provide
when enableLogging is true.
:type log_storage_settings:
~azure.mgmt.datafactory.models.LogStorageSettings
:param dataset: Required. Delete activity dataset reference.
:type dataset: ~azure.mgmt.datafactory.models.DatasetReference
"""

_validation = {
'name': {'required': True},
'type': {'required': True},
'max_concurrent_connections': {'minimum': 1},
'dataset': {'required': True},
}

Expand All @@ -59,11 +71,17 @@ class DeleteActivity(ExecutionActivity):
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'},
'policy': {'key': 'policy', 'type': 'ActivityPolicy'},
'recursive': {'key': 'typeProperties.recursive', 'type': 'object'},
'max_concurrent_connections': {'key': 'typeProperties.maxConcurrentConnections', 'type': 'int'},
'enable_logging': {'key': 'typeProperties.enableLogging', 'type': 'object'},
'log_storage_settings': {'key': 'typeProperties.logStorageSettings', 'type': 'LogStorageSettings'},
'dataset': {'key': 'typeProperties.dataset', 'type': 'DatasetReference'},
}

def __init__(self, *, name: str, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, recursive=None, **kwargs) -> None:
def __init__(self, *, name: str, dataset, additional_properties=None, description: str=None, depends_on=None, user_properties=None, linked_service_name=None, policy=None, recursive=None, max_concurrent_connections: int=None, enable_logging=None, log_storage_settings=None, **kwargs) -> None:
super(DeleteActivity, self).__init__(additional_properties=additional_properties, name=name, description=description, depends_on=depends_on, user_properties=user_properties, linked_service_name=linked_service_name, policy=policy, **kwargs)
self.recursive = recursive
self.max_concurrent_connections = max_concurrent_connections
self.enable_logging = enable_logging
self.log_storage_settings = log_storage_settings
self.dataset = dataset
self.type = 'Delete'
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 msrest.serialization import Model


class LogStorageSettings(Model):
"""Log storage settings.
All required parameters must be populated in order to send to Azure.
:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param linked_service_name: Required. Log storage linked service
reference.
:type linked_service_name:
~azure.mgmt.datafactory.models.LinkedServiceReference
:param path: The path to storage for storing detailed logs of activity
execution. Type: string (or Expression with resultType string).
:type path: object
"""

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

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'},
'path': {'key': 'path', 'type': 'object'},
}

def __init__(self, **kwargs):
super(LogStorageSettings, self).__init__(**kwargs)
self.additional_properties = kwargs.get('additional_properties', None)
self.linked_service_name = kwargs.get('linked_service_name', None)
self.path = kwargs.get('path', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 msrest.serialization import Model


class LogStorageSettings(Model):
"""Log storage settings.
All required parameters must be populated in order to send to Azure.
:param additional_properties: Unmatched properties from the message are
deserialized this collection
:type additional_properties: dict[str, object]
:param linked_service_name: Required. Log storage linked service
reference.
:type linked_service_name:
~azure.mgmt.datafactory.models.LinkedServiceReference
:param path: The path to storage for storing detailed logs of activity
execution. Type: string (or Expression with resultType string).
:type path: object
"""

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

_attribute_map = {
'additional_properties': {'key': '', 'type': '{object}'},
'linked_service_name': {'key': 'linkedServiceName', 'type': 'LinkedServiceReference'},
'path': {'key': 'path', 'type': 'object'},
}

def __init__(self, *, linked_service_name, additional_properties=None, path=None, **kwargs) -> None:
super(LogStorageSettings, self).__init__(**kwargs)
self.additional_properties = additional_properties
self.linked_service_name = linked_service_name
self.path = path

0 comments on commit df51f3b

Please sign in to comment.